You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
440 lines
1.4 MiB
440 lines
1.4 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[305,5,7,9,11,16],{"+GGh":function(tt,Ee){tt.exports="data:image/png;base64,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"},"+NIl":function(tt,Ee,H){(function(ae){ae(H("VrN/"))})(function(ae){"use strict";ae.defineMode("stex",function(X,k){"use strict";function G(u,c){u.cmdState.push(c)}function b(u){return u.cmdState.length>0?u.cmdState[u.cmdState.length-1]:null}function N(u){var c=u.cmdState.pop();c&&c.closeBracket()}function K(u){for(var c=u.cmdState,p=c.length-1;p>=0;p--){var l=c[p];if(l.name=="DEFAULT")continue;return l}return{styleIdentifier:function(){return null}}}function W(u,c,p){return function(){this.name=u,this.bracketNo=0,this.style=c,this.styles=p,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var n={};n.importmodule=W("importmodule","tag",["string","builtin"]),n.documentclass=W("documentclass","tag",["","atom"]),n.usepackage=W("usepackage","tag",["atom"]),n.begin=W("begin","tag",["atom"]),n.end=W("end","tag",["atom"]),n.label=W("label","tag",["atom"]),n.ref=W("ref","tag",["atom"]),n.eqref=W("eqref","tag",["atom"]),n.cite=W("cite","tag",["atom"]),n.bibitem=W("bibitem","tag",["atom"]),n.Bibitem=W("Bibitem","tag",["atom"]),n.RBibitem=W("RBibitem","tag",["atom"]),n.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function I(u,c){u.f=c}function y(u,c){var p;if(u.match(/^\\[a-zA-Z@]+/)){var l=u.current().slice(1);return p=n.hasOwnProperty(l)?n[l]:n.DEFAULT,p=new p,G(c,p),I(c,g),p.style}if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/\\]/))return"tag";if(u.match("\\["))return I(c,function(s,a){return m(s,a,"\\]")}),"keyword";if(u.match("\\("))return I(c,function(s,a){return m(s,a,"\\)")}),"keyword";if(u.match("$$"))return I(c,function(s,a){return m(s,a,"$$")}),"keyword";if(u.match("$"))return I(c,function(s,a){return m(s,a,"$")}),"keyword";var o=u.next();if(o=="%")return u.skipToEnd(),"comment";if(o=="}"||o=="]"){if(p=b(c),p)p.closeBracket(o),I(c,g);else return"error";return"bracket"}else return o=="{"||o=="["?(p=n.DEFAULT,p=new p,G(c,p),"bracket"):/\d/.test(o)?(u.eatWhile(/[\w.%]/),"atom"):(u.eatWhile(/[\w\-_]/),p=K(c),p.name=="begin"&&(p.argument=u.current()),p.styleIdentifier())}function m(u,c,p){if(u.eatSpace())return null;if(p&&u.match(p))return I(c,y),"keyword";if(u.match(/^\\[a-zA-Z@]+/))return"tag";if(u.match(/^[a-zA-Z]+/))return"variable-2";if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/]/))return"tag";if(u.match(/^[\^_&]/))return"tag";if(u.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(u.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var l=u.next();return l=="{"||l=="}"||l=="["||l=="]"||l=="("||l==")"?"bracket":l=="%"?(u.skipToEnd(),"comment"):"error"}function g(u,c){var p=u.peek(),l;return p=="{"||p=="["?(l=b(c),l.openBracket(p),u.eat(p),I(c,y),"bracket"):/[ \t\r]/.test(p)?(u.eat(p),null):(I(c,y),N(c),y(u,c))}return{startState:function(){var u=k.inMathMode?function(c,p){return m(c,p)}:y;return{cmdState:[],f:u}},copyState:function(u){return{cmdState:u.cmdState.slice(),f:u.f}},token:function(u,c){return c.f(u,c)},blankLine:function(u){u.f=y,u.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},"+oxA":function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___1SA8P",flex_space_between:"flex_space_between___3iSxN",flex_box_vertical_center:"flex_box_vertical_center___2JAtS",flex_box_center_end:"flex_box_center_end___2w-PB",flex_box_column:"flex_box_column___2s4Ak",head:"head___3iBvF",node:"node____ISDx"}},"+ua5":function(tt,Ee,H){},"/cxE":function(tt,Ee,H){"use strict";H.d(Ee,"f",function(){return k}),H.d(Ee,"g",function(){return G}),H.d(Ee,"h",function(){return b}),H.d(Ee,"e",function(){return K}),H.d(Ee,"b",function(){return W}),H.d(Ee,"c",function(){return n}),H.d(Ee,"d",function(){return I}),H.d(Ee,"a",function(){return y});class ae{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(m){setTimeout(()=>{throw m.stack?new Error(m.message+`
|
|
|
|
`+m.stack):m},0)}}emit(m){this.listeners.forEach(g=>{g(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}const X=new ae;function k(m){K(m)||X.onUnexpectedError(m);return}function G(m){K(m)||X.onUnexpectedExternalError(m);return}function b(m){if(m instanceof Error){let{name:g,message:u}=m;const c=m.stacktrace||m.stack;return{$isError:!0,name:g,message:u,stack:c}}return m}const N="Canceled";function K(m){return m instanceof Error&&m.name===N&&m.message===N}function W(){const m=new Error(N);return m.name=m.message,m}function n(m){return m?new Error(`Illegal argument: ${m}`):new Error("Illegal argument")}function I(m){return m?new Error(`Illegal state: ${m}`):new Error("Illegal state")}class y extends Error{constructor(m){super("NotSupported");m&&(this.message=m)}}},"19Vz":function(tt,Ee,H){(function(ae){ae(H("VrN/"))})(function(ae){ae.defineOption("placeholder","",function(W,n,I){var y=I&&I!=ae.Init;if(n&&!y)W.on("blur",b),W.on("change",N),W.on("swapDoc",N),ae.on(W.getInputField(),"compositionupdate",W.state.placeholderCompose=function(){G(W)}),N(W);else if(!n&&y){W.off("blur",b),W.off("change",N),W.off("swapDoc",N),ae.off(W.getInputField(),"compositionupdate",W.state.placeholderCompose),X(W);var m=W.getWrapperElement();m.className=m.className.replace(" CodeMirror-empty","")}n&&!W.hasFocus()&&b(W)});function X(W){W.state.placeholder&&(W.state.placeholder.parentNode.removeChild(W.state.placeholder),W.state.placeholder=null)}function k(W){X(W);var n=W.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=W.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var I=W.getOption("placeholder");typeof I=="string"&&(I=document.createTextNode(I)),n.appendChild(I),W.display.lineSpace.insertBefore(n,W.display.lineSpace.firstChild)}function G(W){setTimeout(function(){var n=!1,I=W.getInputField();I.nodeName=="TEXTAREA"?n=!I.value:W.lineCount()==1&&(n=!/[^\u200b]/.test(I.querySelector(".CodeMirror-line").textContent)),n?k(W):X(W)},20)}function b(W){K(W)&&k(W)}function N(W){var n=W.getWrapperElement(),I=K(W);n.className=n.className.replace(" CodeMirror-empty","")+(I?" CodeMirror-empty":""),I?k(W):X(W)}function K(W){return W.lineCount()===1&&W.getLine(0)===""}})},"1eCo":function(tt,Ee,H){(function(ae){ae(H("VrN/"))})(function(ae){"use strict";var X={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},k={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ae.defineMode("xml",function(G,b){var N=G.indentUnit,K={},W=b.htmlMode?X:k;for(var n in W)K[n]=W[n];for(var n in b)K[n]=b[n];var I,y;function m(d,E){function f(B){return E.tokenize=B,B(d,E)}var v=d.next();if(v=="<")return d.eat("!")?d.eat("[")?d.match("CDATA[")?f(c("atom","]]>")):null:d.match("--")?f(c("comment","-->")):d.match("DOCTYPE",!0,!0)?(d.eatWhile(/[\w\._\-]/),f(p(1))):null:d.eat("?")?(d.eatWhile(/[\w\._\-]/),E.tokenize=c("meta","?>"),"meta"):(I=d.eat("/")?"closeTag":"openTag",E.tokenize=g,"tag bracket");if(v=="&"){var T;return d.eat("#")?d.eat("x")?T=d.eatWhile(/[a-fA-F\d]/)&&d.eat(";"):T=d.eatWhile(/[\d]/)&&d.eat(";"):T=d.eatWhile(/[\w\.\-:]/)&&d.eat(";"),T?"atom":"error"}else return d.eatWhile(/[^&<]/),null}m.isInText=!0;function g(d,E){var f=d.next();if(f==">"||f=="/"&&d.eat(">"))return E.tokenize=m,I=f==">"?"endTag":"selfcloseTag","tag bracket";if(f=="=")return I="equals",null;if(f=="<"){E.tokenize=m,E.state=a,E.tagName=E.tagStart=null;var v=E.tokenize(d,E);return v?v+" tag error":"tag error"}else return/[\'\"]/.test(f)?(E.tokenize=u(f),E.stringStartCol=d.column(),E.tokenize(d,E)):(d.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function u(d){var E=function(f,v){for(;!f.eol();)if(f.next()==d){v.tokenize=g;break}return"string"};return E.isInAttribute=!0,E}function c(d,E){return function(f,v){for(;!f.eol();){if(f.match(E)){v.tokenize=m;break}f.next()}return d}}function p(d){return function(E,f){for(var v;(v=E.next())!=null;){if(v=="<")return f.tokenize=p(d+1),f.tokenize(E,f);if(v==">")if(d==1){f.tokenize=m;break}else return f.tokenize=p(d-1),f.tokenize(E,f)}return"meta"}}function l(d,E,f){this.prev=d.context,this.tagName=E,this.indent=d.indented,this.startOfLine=f,(K.doNotIndent.hasOwnProperty(E)||d.context&&d.context.noIndent)&&(this.noIndent=!0)}function o(d){d.context&&(d.context=d.context.prev)}function s(d,E){for(var f;;){if(!d.context)return;if(f=d.context.tagName,!K.contextGrabbers.hasOwnProperty(f)||!K.contextGrabbers[f].hasOwnProperty(E))return;o(d)}}function a(d,E,f){return d=="openTag"?(f.tagStart=E.column(),A):d=="closeTag"?S:a}function A(d,E,f){return d=="word"?(f.tagName=E.current(),y="tag",D):K.allowMissingTagName&&d=="endTag"?(y="tag bracket",D(d,E,f)):(y="error",A)}function S(d,E,f){if(d=="word"){var v=E.current();return f.context&&f.context.tagName!=v&&K.implicitlyClosed.hasOwnProperty(f.context.tagName)&&o(f),f.context&&f.context.tagName==v||K.matchClosing===!1?(y="tag",C):(y="tag error",L)}else return K.allowMissingTagName&&d=="endTag"?(y="tag bracket",C(d,E,f)):(y="error",L)}function C(d,E,f){return d!="endTag"?(y="error",C):(o(f),a)}function L(d,E,f){return y="error",C(d,E,f)}function D(d,E,f){if(d=="word")return y="attribute",O;if(d=="endTag"||d=="selfcloseTag"){var v=f.tagName,T=f.tagStart;return f.tagName=f.tagStart=null,d=="selfcloseTag"||K.autoSelfClosers.hasOwnProperty(v)?s(f,v):(s(f,v),f.context=new l(f,v,T==f.indented)),a}return y="error",D}function O(d,E,f){return d=="equals"?w:(K.allowMissing||(y="error"),D(d,E,f))}function w(d,E,f){return d=="string"?x:d=="word"&&K.allowUnquoted?(y="string",D):(y="error",D(d,E,f))}function x(d,E,f){return d=="string"?x:D(d,E,f)}return{startState:function(d){var E={tokenize:m,state:a,indented:d||0,tagName:null,tagStart:null,context:null};return d!=null&&(E.baseIndent=d),E},token:function(d,E){if(!E.tagName&&d.sol()&&(E.indented=d.indentation()),d.eatSpace())return null;I=null;var f=E.tokenize(d,E);return(f||I)&&f!="comment"&&(y=null,E.state=E.state(I||f,d,E),y&&(f=y=="error"?f+" error":y)),f},indent:function(d,E,f){var v=d.context;if(d.tokenize.isInAttribute)return d.tagStart==d.indented?d.stringStartCol+1:d.indented+N;if(v&&v.noIndent)return ae.Pass;if(d.tokenize!=g&&d.tokenize!=m)return f?f.match(/^(\s*)/)[0].length:0;if(d.tagName)return K.multilineTagIndentPastTag!==!1?d.tagStart+d.tagName.length+2:d.tagStart+N*(K.multilineTagIndentFactor||1);if(K.alignCDATA&&/<!\[CDATA\[/.test(E))return 0;var T=E&&/^<(\/)?([\w_:\.-]*)/.exec(E);if(T&&T[1])for(;v;)if(v.tagName==T[2]){v=v.prev;break}else if(K.implicitlyClosed.hasOwnProperty(v.tagName))v=v.prev;else break;else if(T)for(;v;){var B=K.contextGrabbers[v.tagName];if(B&&B.hasOwnProperty(T[2]))v=v.prev;else break}for(;v&&v.prev&&!v.startOfLine;)v=v.prev;return v?v.indent+N:d.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:K.htmlMode?"html":"xml",helperType:K.htmlMode?"html":"xml",skipAttribute:function(d){d.state==w&&(d.state=D)},xmlCurrentTag:function(d){return d.tagName?{name:d.tagName,close:d.type=="closeTag"}:null},xmlCurrentContext:function(d){for(var E=[],f=d.context;f;f=f.prev)f.tagName&&E.push(f.tagName);return E.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"24hK":function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return X});class ae{constructor(k){this.element=k,this.next=ae.Undefined,this.prev=ae.Undefined}}ae.Undefined=new ae(void 0);class X{constructor(){this._first=ae.Undefined,this._last=ae.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ae.Undefined}clear(){let k=this._first;for(;k!==ae.Undefined;){const G=k.next;k.prev=ae.Undefined,k.next=ae.Undefined,k=G}this._first=ae.Undefined,this._last=ae.Undefined,this._size=0}unshift(k){return this._insert(k,!1)}push(k){return this._insert(k,!0)}_insert(k,G){const b=new ae(k);if(this._first===ae.Undefined)this._first=b,this._last=b;else if(G){const K=this._last;this._last=b,b.prev=K,K.next=b}else{const K=this._first;this._first=b,b.next=K,K.prev=b}this._size+=1;let N=!1;return()=>{N||(N=!0,this._remove(b))}}shift(){if(this._first===ae.Undefined)return;{const k=this._first.element;return this._remove(this._first),k}}pop(){if(this._last===ae.Undefined)return;{const k=this._last.element;return this._remove(this._last),k}}_remove(k){if(k.prev!==ae.Undefined&&k.next!==ae.Undefined){const G=k.prev;G.next=k.next,k.next.prev=G}else k.prev===ae.Undefined&&k.next===ae.Undefined?(this._first=ae.Undefined,this._last=ae.Undefined):k.next===ae.Undefined?(this._last=this._last.prev,this._last.next=ae.Undefined):k.prev===ae.Undefined&&(this._first=this._first.next,this._first.prev=ae.Undefined);this._size-=1}*[Symbol.iterator](){let k=this._first;for(;k!==ae.Undefined;)yield k.element,k=k.next}}},"3/fG":function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return X});function ae(k,G){let b;return G.length===0?b=k:b=k.replace(/\{(\d+)\}/g,function(N,K){const W=K[0];return typeof G[W]!="undefined"?G[W]:N}),b}function X(k,G,...b){return ae(G,b)}},"55Ip":function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return s});var ae=H("Ty5D"),X=H("dI71"),k=H("q1tI"),G=H.n(k),b=H("YS25"),N=H("17x9"),K=H.n(N),W=H("wx14"),n=H("zLVn"),I=H("9R94"),y=function(w){Object(X.a)(x,w);function x(){for(var E,f=arguments.length,v=new Array(f),T=0;T<f;T++)v[T]=arguments[T];return E=w.call.apply(w,[this].concat(v))||this,E.history=Object(b.a)(E.props),E}var d=x.prototype;return d.render=function(){return G.a.createElement(ae.c,{history:this.history,children:this.props.children})},x}(G.a.Component),m=function(w){Object(X.a)(x,w);function x(){for(var E,f=arguments.length,v=new Array(f),T=0;T<f;T++)v[T]=arguments[T];return E=w.call.apply(w,[this].concat(v))||this,E.history=Object(b.b)(E.props),E}var d=x.prototype;return d.render=function(){return G.a.createElement(ae.c,{history:this.history,children:this.props.children})},x}(G.a.Component),g=function(x,d){return typeof x=="function"?x(d):x},u=function(x,d){return typeof x=="string"?Object(b.c)(x,null,null,d):x},c=function(x){return x},p=G.a.forwardRef;typeof p=="undefined"&&(p=c);function l(w){return!!(w.metaKey||w.altKey||w.ctrlKey||w.shiftKey)}var o=p(function(w,x){var d=w.innerRef,E=w.navigate,f=w.onClick,v=Object(n.a)(w,["innerRef","navigate","onClick"]),T=v.target,B=Object(W.a)({},v,{onClick:function(j){try{f&&f(j)}catch(U){throw j.preventDefault(),U}!j.defaultPrevented&&j.button===0&&(!T||T==="_self")&&!l(j)&&(j.preventDefault(),E())}});return c!==p?B.ref=x||d:B.ref=d,G.a.createElement("a",B)}),s=p(function(w,x){var d=w.component,E=d===void 0?o:d,f=w.replace,v=w.to,T=w.innerRef,B=Object(n.a)(w,["component","replace","to","innerRef"]);return G.a.createElement(ae.e.Consumer,null,function(R){R||Object(I.a)(!1);var j=R.history,U=u(g(v,R.location),R.location),_=U?j.createHref(U):"",J=Object(W.a)({},B,{href:_,navigate:function(){var he=g(v,R.location),be=f?j.replace:j.push;be(he)}});return c!==p?J.ref=x||T:J.innerRef=T,G.a.createElement(E,J)})});if(!1)var a,A;var S=function(x){return x},C=G.a.forwardRef;typeof C=="undefined"&&(C=S);function L(){for(var w=arguments.length,x=new Array(w),d=0;d<w;d++)x[d]=arguments[d];return x.filter(function(E){return E}).join(" ")}var D=C(function(w,x){var d=w["aria-current"],E=d===void 0?"page":d,f=w.activeClassName,v=f===void 0?"active":f,T=w.activeStyle,B=w.className,R=w.exact,j=w.isActive,U=w.location,_=w.sensitive,J=w.strict,ne=w.style,he=w.to,be=w.innerRef,Ke=Object(n.a)(w,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return G.a.createElement(ae.e.Consumer,null,function(De){De||Object(I.a)(!1);var je=U||De.location,Be=u(g(he,je),je),Ge=Be.pathname,_e=Ge&&Ge.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Y=_e?Object(ae.f)(je.pathname,{path:_e,exact:R,sensitive:_,strict:J}):null,M=!!(j?j(Y,je):Y),F=M?L(B,v):B,Q=M?Object(W.a)({},ne,{},T):ne,te=Object(W.a)({"aria-current":M&&E||null,className:F,style:Q,to:Be},Ke);return S!==C?te.ref=x||be:te.innerRef=be,G.a.createElement(s,te)})});if(!1)var O},"5VLF":function(tt,Ee,H){"use strict";var ae,X;function k(G,b,N){var K=function(W,n){return G.js_beautify(W,n)};return K.js=G.js_beautify,K.css=b.css_beautify,K.html=N.html_beautify,K.js_beautify=G.js_beautify,K.css_beautify=b.css_beautify,K.html_beautify=N.html_beautify,K}!(ae=[H("6UM0"),H("TXwP"),H("psGv")],X=function(G,b,N){return k(G,b,N)}.apply(Ee,ae),X!==void 0&&(tt.exports=X))},"5Y4S":function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return k});var ae=H("MNsG");const X=ae.b.performance&&typeof ae.b.performance.now=="function";class k{constructor(G){this._highResolution=X&&G,this._startTime=this._now(),this._stopTime=-1}static create(G=!0){return new k(G)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?ae.b.performance.now():Date.now()}}},"6UM0":function(tt,Ee,H){var ae,X;(function(){var k;(function(){"use strict";var b=[function(n,I,y){var m=y(1).Beautifier,g=y(5).Options;function u(c,p){var l=new m(c,p);return l.beautify()}n.exports=u,n.exports.defaultOptions=function(){return new g}},function(n,I,y){var m=y(2).Output,g=y(3).Token,u=y(4),c=y(5).Options,p=y(7).Tokenizer,l=y(7).line_starters,o=y(7).positionable_operators,s=y(7).TOKEN;function a(_,J){return J.indexOf(_)!==-1}function A(_){return _.replace(/^\s+/g,"")}function S(_){for(var J={},ne=0;ne<_.length;ne++)J[_[ne].replace(/-/g,"_")]=_[ne];return J}function C(_,J){return _&&_.type===s.RESERVED&&_.text===J}function L(_,J){return _&&_.type===s.RESERVED&&a(_.text,J)}var D=["case","return","do","if","throw","else","await","break","continue","async"],O=["before-newline","after-newline","preserve-newline"],w=S(O),x=[w.before_newline,w.preserve_newline],d={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function E(_,J){if(J.multiline_frame||J.mode===d.ForInitializer||J.mode===d.Conditional)return;_.remove_indent(J.start_line_index)}function f(_){_=_.replace(u.allLineBreaks,`
|
|
`);for(var J=[],ne=_.indexOf(`
|
|
`);ne!==-1;)J.push(_.substring(0,ne)),_=_.substring(ne+1),ne=_.indexOf(`
|
|
`);return _.length&&J.push(_),J}function v(_){return _===d.ArrayLiteral}function T(_){return a(_,[d.Expression,d.ForInitializer,d.Conditional])}function B(_,J){for(var ne=0;ne<_.length;ne++){var he=_[ne].trim();if(he.charAt(0)!==J)return!1}return!0}function R(_,J){for(var ne=0,he=_.length,be;ne<he;ne++)if(be=_[ne],be&&be.indexOf(J)!==0)return!1;return!0}function j(_,J){J=J||{},this._source_text=_||"",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 c(J)}j.prototype.create_flags=function(_,J){var ne=0;_&&(ne=_.indentation_level,!this._output.just_added_newline()&&_.line_indent_level>ne&&(ne=_.line_indent_level));var he={mode:J,parent:_,last_token:_?_.last_token:new g(s.START_BLOCK,""),last_word:_?_.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:ne,alignment:0,line_indent_level:_?_.line_indent_level:ne,start_line_index:this._output.get_line_number(),ternary_depth:0};return he},j.prototype._reset=function(_){var J=_.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new m(this._options,J),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(d.BlockStatement);var ne=new p(_,this._options);return this._tokens=ne.tokenize(),_},j.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _,J=this._reset(this._source_text),ne=this._options.eol;this._options.eol==="auto"&&(ne=`
|
|
`,J&&u.lineBreak.test(J||"")&&(ne=J.match(u.lineBreak)[0]));for(var he=this._tokens.next();he;)this.handle_token(he),this._last_last_text=this._flags.last_token.text,this._flags.last_token=he,he=this._tokens.next();return _=this._output.get_code(ne),_},j.prototype.handle_token=function(_,J){_.type===s.START_EXPR?this.handle_start_expr(_):_.type===s.END_EXPR?this.handle_end_expr(_):_.type===s.START_BLOCK?this.handle_start_block(_):_.type===s.END_BLOCK?this.handle_end_block(_):_.type===s.WORD?this.handle_word(_):_.type===s.RESERVED?this.handle_word(_):_.type===s.SEMICOLON?this.handle_semicolon(_):_.type===s.STRING?this.handle_string(_):_.type===s.EQUALS?this.handle_equals(_):_.type===s.OPERATOR?this.handle_operator(_):_.type===s.COMMA?this.handle_comma(_):_.type===s.BLOCK_COMMENT?this.handle_block_comment(_,J):_.type===s.COMMENT?this.handle_comment(_,J):_.type===s.DOT?this.handle_dot(_):_.type===s.EOF?this.handle_eof(_):_.type===s.UNKNOWN?this.handle_unknown(_,J):this.handle_unknown(_,J)},j.prototype.handle_whitespace_and_comments=function(_,J){var ne=_.newlines,he=this._options.keep_array_indentation&&v(this._flags.mode);if(_.comments_before)for(var be=_.comments_before.next();be;)this.handle_whitespace_and_comments(be,J),this.handle_token(be,J),be=_.comments_before.next();if(he)for(var Ke=0;Ke<ne;Ke+=1)this.print_newline(Ke>0,J);else if(this._options.max_preserve_newlines&&ne>this._options.max_preserve_newlines&&(ne=this._options.max_preserve_newlines),this._options.preserve_newlines&&ne>1){this.print_newline(!1,J);for(var De=1;De<ne;De+=1)this.print_newline(!0,J)}};var U=["async","break","continue","return","throw","yield"];j.prototype.allow_wrap_or_preserved_newline=function(_,J){if(J=J===void 0?!1:J,this._output.just_added_newline())return;var ne=this._options.preserve_newlines&&_.newlines||J,he=a(this._flags.last_token.text,o)||a(_.text,o);if(he){var be=a(this._flags.last_token.text,o)&&a(this._options.operator_position,x)||a(_.text,o);ne=ne&&be}if(ne)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(L(this._flags.last_token,U))return;this._output.set_wrap_point()}},j.prototype.print_newline=function(_,J){if(!J&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var ne=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&C(ne,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(_)&&(this._flags.multiline_frame=!0)},j.prototype.print_token_line_indentation=function(_){this._output.just_added_newline()&&(this._options.keep_array_indentation&&_.newlines&&(_.text==="["||v(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(_.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))},j.prototype.print_token=function(_){if(this._output.raw){this._output.add_raw_token(_);return}if(this._options.comma_first&&_.previous&&_.previous.type===s.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var J=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(J),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(_),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(_),this._output.non_breaking_space=!0,this._output.add_token(_.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},j.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},j.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))},j.prototype.set_mode=function(_){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,_),this._flags=this.create_flags(this._previous_flags,_),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},j.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===d.Statement&&E(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},j.prototype.start_of_object_property=function(){return this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"]))},j.prototype.start_of_statement=function(_){var J=!1;return J=J||L(this._flags.last_token,["var","let","const"])&&_.type===s.WORD,J=J||C(this._flags.last_token,"do"),J=J||!(this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement)&&L(this._flags.last_token,U)&&!_.newlines,J=J||C(this._flags.last_token,"else")&&!(C(_,"if")&&!_.comments_before),J=J||this._flags.last_token.type===s.END_EXPR&&(this._previous_flags.mode===d.ForInitializer||this._previous_flags.mode===d.Conditional),J=J||this._flags.last_token.type===s.WORD&&this._flags.mode===d.BlockStatement&&!this._flags.in_case&&!(_.text==="--"||_.text==="++")&&this._last_last_text!=="function"&&_.type!==s.WORD&&_.type!==s.RESERVED,J=J||this._flags.mode===d.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"])),J?(this.set_mode(d.Statement),this.indent(),this.handle_whitespace_and_comments(_,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_,L(_,["do","for","if","while"])),!0):!1},j.prototype.handle_start_expr=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_);var J=d.Expression;if(_.text==="["){if(this._flags.last_token.type===s.WORD||this._flags.last_token.text===")"){L(this._flags.last_token,l)&&(this._output.space_before_token=!0),this.print_token(_),this.set_mode(J),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}J=d.ArrayLiteral,v(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())),a(this._flags.last_token.type,[s.START_EXPR,s.END_EXPR,s.WORD,s.OPERATOR,s.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===s.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,J=d.ForInitializer):a(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,J=d.Conditional):a(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&_.whitespace_before===""?this._output.space_before_token=!1:(a(this._flags.last_token.text,l)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_);else if(this._flags.last_token.type===s.WORD){this._output.space_before_token=!1;var ne=this._tokens.peek(-3);if(this._options.space_after_named_function&&ne){var he=this._tokens.peek(-4);L(ne,["async","function"])||ne.text==="*"&&L(he,["async","function"])?this._output.space_before_token=!0:this._flags.mode===d.ObjectLiteral?(ne.text==="{"||ne.text===","||ne.text==="*"&&(he.text==="{"||he.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(_);(this._flags.last_token.type===s.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(a(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&a(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===s.START_BLOCK?this.print_newline():(this._flags.last_token.type===s.END_EXPR||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===s.COMMA)&&this.allow_wrap_or_preserved_newline(_,_.newlines),this.print_token(_),this.set_mode(J),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},j.prototype.handle_end_expr=function(_){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(_,_.text==="]"&&v(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===s.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(_),this.restore_mode(),E(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===d.Conditional&&(this._previous_flags.mode=d.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},j.prototype.handle_start_block=function(_){this.handle_whitespace_and_comments(_);var J=this._tokens.peek(),ne=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===s.END_EXPR?(this.set_mode(d.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(d.BlockStatement):ne&&(a(ne.text,[":",","])&&a(J.type,[s.STRING,s.WORD,s.RESERVED])||a(J.text,["get","set","..."])&&a(ne.type,[s.WORD,s.RESERVED]))?a(this._last_last_text,["class","interface"])&&!a(ne.text,[":",","])?this.set_mode(d.BlockStatement):this.set_mode(d.ObjectLiteral):this._flags.last_token.type===s.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(d.BlockStatement):a(this._flags.last_token.type,[s.EQUALS,s.START_EXPR,s.COMMA,s.OPERATOR])||L(this._flags.last_token,["return","throw","import","default"])?this.set_mode(d.ObjectLiteral):this.set_mode(d.BlockStatement),this._flags.last_token&&(L(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var he=!J.comments_before&&J.text==="}",be=he&&this._flags.last_word==="function"&&this._flags.last_token.type===s.END_EXPR;if(this._options.brace_preserve_inline){var Ke=0,De=null;this._flags.inline_frame=!0;do if(Ke+=1,De=this._tokens.peek(Ke-1),De.newlines){this._flags.inline_frame=!1;break}while(De.type!==s.EOF&&!(De.type===s.END_BLOCK&&De.opened===_))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==s.OPERATOR&&(be||this._flags.last_token.type===s.EQUALS||L(this._flags.last_token,D)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(v(this._previous_flags.mode)&&(this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.COMMA)&&((this._flags.last_token.type===s.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(_),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==s.OPERATOR&&this._flags.last_token.type!==s.START_EXPR&&(this._flags.last_token.type===s.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(_),this.indent(),!he&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},j.prototype.handle_end_block=function(_){for(this.handle_whitespace_and_comments(_);this._flags.mode===d.Statement;)this.restore_mode();var J=this._flags.last_token.type===s.START_BLOCK;this._flags.inline_frame&&!J?this._output.space_before_token=!0:this._options.brace_style==="expand"?J||this.print_newline():J||(v(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(_)},j.prototype.handle_word=function(_){if(_.type===s.RESERVED){if(a(_.text,["set","get"])&&this._flags.mode!==d.ObjectLiteral)_.type=s.WORD;else if(_.text==="import"&&a(this._tokens.peek().text,["(","."]))_.type=s.WORD;else if(a(_.text,["as","from"])&&!this._flags.import_block)_.type=s.WORD;else if(this._flags.mode===d.ObjectLiteral){var J=this._tokens.peek();J.text===":"&&(_.type=s.WORD)}}if(this.start_of_statement(_)?L(this._flags.last_token,["var","let","const"])&&_.type===s.WORD&&(this._flags.declaration_statement=!0):_.newlines&&!T(this._flags.mode)&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==s.EQUALS&&(this._options.preserve_newlines||!L(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(_),this.print_newline()):this.handle_whitespace_and_comments(_),this._flags.do_block&&!this._flags.do_while)if(C(_,"while")){this._output.space_before_token=!0,this.print_token(_),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&&C(_,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===d.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&L(_,["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(_),this._flags.in_case=!0;return}if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_)),C(_,"function")){(a(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(a(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===s.OPERATOR))&&(!this._output.just_added_blankline()&&!_.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD?L(this._flags.last_token,["get","set","new","export"])||L(this._flags.last_token,U)?this._output.space_before_token=!0:C(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===s.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(T(this._flags.mode)||v(this._flags.mode))||this.print_newline(),this.print_token(_),this._flags.last_word=_.text;return}var ne="NONE";if(this._flags.last_token.type===s.END_BLOCK?this._previous_flags.inline_frame?ne="SPACE":L(_,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines?ne="NEWLINE":(ne="SPACE",this._output.space_before_token=!0):ne="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&this._flags.mode===d.BlockStatement?ne="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&T(this._flags.mode)?ne="SPACE":this._flags.last_token.type===s.STRING?ne="NEWLINE":this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.last_token.text==="*"&&(a(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&a(this._last_last_text,["{",","]))?ne="SPACE":this._flags.last_token.type===s.START_BLOCK?this._flags.inline_frame?ne="SPACE":ne="NEWLINE":this._flags.last_token.type===s.END_EXPR&&(this._output.space_before_token=!0,ne="NEWLINE"),L(_,l)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ne="SPACE":ne="NEWLINE"),L(_,["else","catch","finally"]))if((!(this._flags.last_token.type===s.END_BLOCK&&this._previous_flags.mode===d.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&_.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var he=this._output.current_line;he.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ne==="NEWLINE"?L(this._flags.last_token,D)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&L(_,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==s.END_EXPR?(this._flags.last_token.type!==s.START_EXPR||!L(_,["var","let","const"]))&&this._flags.last_token.text!==":"&&(C(_,"if")&&C(_.previous,"else")?this._output.space_before_token=!0:this.print_newline()):L(_,l)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&v(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ne==="SPACE"&&(this._output.space_before_token=!0);_.previous&&(_.previous.type===s.WORD||_.previous.type===s.RESERVED)&&(this._output.space_before_token=!0),this.print_token(_),this._flags.last_word=_.text,_.type===s.RESERVED&&(_.text==="do"?this._flags.do_block=!0:_.text==="if"?this._flags.if_block=!0:_.text==="import"?this._flags.import_block=!0:this._flags.import_block&&C(_,"from")&&(this._flags.import_block=!1))},j.prototype.handle_semicolon=function(_){this.start_of_statement(_)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(_);for(var J=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&C(J,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(_)},j.prototype.handle_string=function(_){_.text.startsWith("`")&&_.newlines===0&&_.whitespace_before===""&&(_.previous.text===")"||this._flags.last_token.type===s.WORD)||(this.start_of_statement(_)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(_),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(_):_.text.startsWith("`")&&this._flags.last_token.type===s.END_EXPR&&(_.previous.text==="]"||_.previous.text===")")&&_.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(_)},j.prototype.handle_equals=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0},j.prototype.handle_comma=function(_){this.handle_whitespace_and_comments(_,!0),this.print_token(_),this._output.space_before_token=!0,this._flags.declaration_statement?(T(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(_)):this._flags.mode===d.ObjectLiteral||this._flags.mode===d.Statement&&this._flags.parent.mode===d.ObjectLiteral?(this._flags.mode===d.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(_)},j.prototype.handle_operator=function(_){var J=_.text==="*"&&(L(this._flags.last_token,["function","yield"])||a(this._flags.last_token.type,[s.START_BLOCK,s.COMMA,s.END_BLOCK,s.SEMICOLON])),ne=a(_.text,["-","+"])&&(a(this._flags.last_token.type,[s.START_BLOCK,s.START_EXPR,s.EQUALS,s.OPERATOR])||a(this._flags.last_token.text,l)||this._flags.last_token.text===",");if(!this.start_of_statement(_)){var he=!J;this.handle_whitespace_and_comments(_,he)}if(_.text==="*"&&this._flags.last_token.type===s.DOT){this.print_token(_);return}if(_.text==="::"){this.print_token(_);return}if(this._flags.last_token.type===s.OPERATOR&&a(this._options.operator_position,x)&&this.allow_wrap_or_preserved_newline(_),_.text===":"&&this._flags.in_case){this.print_token(_),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==s.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 be=!0,Ke=!0,De=!1;if(_.text===":"?this._flags.ternary_depth===0?be=!1:(this._flags.ternary_depth-=1,De=!0):_.text==="?"&&(this._flags.ternary_depth+=1),!ne&&!J&&this._options.preserve_newlines&&a(_.text,o)){var je=_.text===":",Be=je&&De,Ge=je&&!De;switch(this._options.operator_position){case w.before_newline:this._output.space_before_token=!Ge,this.print_token(_),(!je||Be)&&this.allow_wrap_or_preserved_newline(_),this._output.space_before_token=!0;return;case w.after_newline:this._output.space_before_token=!0,!je||Be?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(_):this._output.space_before_token=!1,this.print_token(_),this._output.space_before_token=!0;return;case w.preserve_newline:Ge||this.allow_wrap_or_preserved_newline(_),be=!(this._output.just_added_newline()||Ge),this._output.space_before_token=be,this.print_token(_),this._output.space_before_token=!0;return}}if(J){this.allow_wrap_or_preserved_newline(_),be=!1;var _e=this._tokens.peek();Ke=_e&&a(_e.type,[s.WORD,s.RESERVED])}else if(_.text==="...")this.allow_wrap_or_preserved_newline(_),be=this._flags.last_token.type===s.START_BLOCK,Ke=!1;else if(a(_.text,["--","++","!","~"])||ne){if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR)&&this.allow_wrap_or_preserved_newline(_),be=!1,Ke=!1,_.newlines&&(_.text==="--"||_.text==="++"||_.text==="~")){var Y=L(this._flags.last_token,D)&&_.newlines;Y&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Y,!0)}this._flags.last_token.text===";"&&T(this._flags.mode)&&(be=!0),this._flags.last_token.type===s.RESERVED?be=!0:this._flags.last_token.type===s.END_EXPR?be=!(this._flags.last_token.text==="]"&&(_.text==="--"||_.text==="++")):this._flags.last_token.type===s.OPERATOR&&(be=a(_.text,["--","-","++","+"])&&a(this._flags.last_token.text,["--","-","++","+"]),a(_.text,["+","-"])&&a(this._flags.last_token.text,["--","++"])&&(Ke=!0)),(this._flags.mode===d.BlockStatement&&!this._flags.inline_frame||this._flags.mode===d.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||be,this.print_token(_),this._output.space_before_token=Ke},j.prototype.handle_block_comment=function(_,J){if(this._output.raw){this._output.add_raw_token(_),_.directives&&_.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(_.directives){this.print_newline(!1,J),this.print_token(_),_.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!u.newline.test(_.text)&&!_.newlines){this._output.space_before_token=!0,this.print_token(_),this._output.space_before_token=!0;return}else this.print_block_commment(_,J)},j.prototype.print_block_commment=function(_,J){var ne=f(_.text),he,be=!1,Ke=!1,De=_.whitespace_before,je=De.length;if(this.print_newline(!1,J),this.print_token_line_indentation(_),this._output.add_token(ne[0]),this.print_newline(!1,J),ne.length>1){for(ne=ne.slice(1),be=B(ne,"*"),Ke=R(ne,De),be&&(this._flags.alignment=1),he=0;he<ne.length;he++)be?(this.print_token_line_indentation(_),this._output.add_token(A(ne[he]))):Ke&&ne[he]?(this.print_token_line_indentation(_),this._output.add_token(ne[he].substring(je))):(this._output.current_line.set_indent(-1),this._output.add_token(ne[he])),this.print_newline(!1,J);this._flags.alignment=0}},j.prototype.handle_comment=function(_,J){_.newlines?this.print_newline(!1,J):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(_),this.print_newline(!1,J)},j.prototype.handle_dot=function(_){this.start_of_statement(_)||this.handle_whitespace_and_comments(_,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),L(this._flags.last_token,D)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(_,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(_)},j.prototype.handle_unknown=function(_,J){this.print_token(_),_.text[_.text.length-1]===`
|
|
`&&this.print_newline(!1,J)},j.prototype.handle_eof=function(_){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(_)},n.exports.Beautifier=j},function(n){function I(g){this.__parent=g,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=[]}I.prototype.clone_empty=function(){var g=new I(this.__parent);return g.set_indent(this.__indent_count,this.__alignment_count),g},I.prototype.item=function(g){return g<0?this.__items[this.__items.length+g]:this.__items[g]},I.prototype.has_match=function(g){for(var u=this.__items.length-1;u>=0;u--)if(this.__items[u].match(g))return!0;return!1},I.prototype.set_indent=function(g,u){this.is_empty()&&(this.__indent_count=g||0,this.__alignment_count=u||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},I.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)},I.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},I.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var g=this.__parent.current_line;return g.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),g.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),g.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,g.__items[0]===" "&&(g.__items.splice(0,1),g.__character_count-=1),!0}return!1},I.prototype.is_empty=function(){return this.__items.length===0},I.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},I.prototype.push=function(g){this.__items.push(g);var u=g.lastIndexOf(`
|
|
`);u!==-1?this.__character_count=g.length-u:this.__character_count+=g.length},I.prototype.pop=function(){var g=null;return this.is_empty()||(g=this.__items.pop(),this.__character_count-=g.length),g},I.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},I.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},I.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},I.prototype.toString=function(){var g="";return this.is_empty()?this.__parent.indent_empty_lines&&(g=this.__parent.get_indent_string(this.__indent_count)):(g=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),g+=this.__items.join("")),g};function y(g,u){this.__cache=[""],this.__indent_size=g.indent_size,this.__indent_string=g.indent_char,g.indent_with_tabs||(this.__indent_string=new Array(g.indent_size+1).join(g.indent_char)),u=u||"",g.indent_level>0&&(u=new Array(g.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}y.prototype.get_indent_size=function(g,u){var c=this.__base_string_length;return u=u||0,g<0&&(c=0),c+=g*this.__indent_size,c+=u,c},y.prototype.get_indent_string=function(g,u){var c=this.__base_string;return u=u||0,g<0&&(g=0,c=""),u+=g*this.__indent_size,this.__ensure_cache(u),c+=this.__cache[u],c},y.prototype.__ensure_cache=function(g){for(;g>=this.__cache.length;)this.__add_column()},y.prototype.__add_column=function(){var g=this.__cache.length,u=0,c="";this.__indent_size&&g>=this.__indent_size&&(u=Math.floor(g/this.__indent_size),g-=u*this.__indent_size,c=new Array(u+1).join(this.__indent_string)),g&&(c+=new Array(g+1).join(" ")),this.__cache.push(c)};function m(g,u){this.__indent_cache=new y(g,u),this.raw=!1,this._end_with_newline=g.end_with_newline,this.indent_size=g.indent_size,this.wrap_line_length=g.wrap_line_length,this.indent_empty_lines=g.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new I(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(g,u){return this.__indent_cache.get_indent_string(g,u)},m.prototype.get_indent_size=function(g,u){return this.__indent_cache.get_indent_size(g,u)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(g){return this.is_empty()||!g&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(g){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
|
|
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(`
|
|
`);return g!==`
|
|
`&&(c=c.replace(/[\n]/g,g)),c},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(g,u){return g=g||0,u=u||0,this.next_line.set_indent(g,u),this.__lines.length>1?(this.current_line.set_indent(g,u),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(g){for(var u=0;u<g.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(g.whitespace_before),this.current_line.push(g.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},m.prototype.add_token=function(g){this.__add_space_before_token(),this.current_line.push(g),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},m.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(" "))},m.prototype.remove_indent=function(g){for(var u=this.__lines.length;g<u;)this.__lines[g]._remove_indent(),g++;this.current_line._remove_wrap_indent()},m.prototype.trim=function(g){for(g=g===void 0?!1:g,this.current_line.trim();g&&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},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(g,u){for(var c=this.__lines.length-2;c>=0;){var p=this.__lines[c];if(p.is_empty())break;if(p.item(0).indexOf(g)!==0&&p.item(-1)!==u){this.__lines.splice(c+1,0,new I(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},n.exports.Output=m},function(n){function I(y,m,g,u){this.type=y,this.text=m,this.comments_before=null,this.newlines=g||0,this.whitespace_before=u||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=I},function(n,I){var y="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",m="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",g="\\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",u="\\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",c="(?:\\\\u[0-9a-fA-F]{4}|["+y+g+"])",p="(?:\\\\u[0-9a-fA-F]{4}|["+m+g+u+"])*";I.identifier=new RegExp(c+p,"g"),I.identifierStart=new RegExp(c),I.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+m+g+u+"])+");var l=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;I.newline=/[\n\r\u2028\u2029]/,I.lineBreak=new RegExp(`\r
|
|
|`+I.newline.source),I.allLineBreaks=new RegExp(I.lineBreak.source,"g")},function(n,I,y){var m=y(6).Options,g=["before-newline","after-newline","preserve-newline"];function u(c){m.call(this,c,"js");var p=this.raw_options.brace_style||null;p==="expand-strict"?this.raw_options.brace_style="expand":p==="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 l=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o<l.length;o++)l[o]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=l[o];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",g),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}u.prototype=new m,n.exports.Options=u},function(n){function I(g,u){this.raw_options=y(g,u),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"])}I.prototype._get_array=function(g,u){var c=this.raw_options[g],p=u||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(p=c.concat()):typeof c=="string"&&(p=c.split(/[^a-zA-Z0-9_\/\-]+/)),p},I.prototype._get_boolean=function(g,u){var c=this.raw_options[g],p=c===void 0?!!u:!!c;return p},I.prototype._get_characters=function(g,u){var c=this.raw_options[g],p=u||"";return typeof c=="string"&&(p=c.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),p},I.prototype._get_number=function(g,u){var c=this.raw_options[g];u=parseInt(u,10),isNaN(u)&&(u=0);var p=parseInt(c,10);return isNaN(p)&&(p=u),p},I.prototype._get_selection=function(g,u,c){var p=this._get_selection_list(g,u,c);if(p.length!==1)throw new Error("Invalid Option Value: The option '"+g+`' can only be one of the following values:
|
|
`+u+`
|
|
You passed in: '`+this.raw_options[g]+"'");return p[0]},I.prototype._get_selection_list=function(g,u,c){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[u[0]],!this._is_valid_selection(c,u))throw new Error("Invalid Default Value!");var p=this._get_array(g,c);if(!this._is_valid_selection(p,u))throw new Error("Invalid Option Value: The option '"+g+`' can contain only the following values:
|
|
`+u+`
|
|
You passed in: '`+this.raw_options[g]+"'");return p},I.prototype._is_valid_selection=function(g,u){return g.length&&u.length&&!g.some(function(c){return u.indexOf(c)===-1})};function y(g,u){var c={};g=m(g);var p;for(p in g)p!==u&&(c[p]=g[p]);if(u&&g[u])for(p in g[u])c[p]=g[u][p];return c}function m(g){var u={},c;for(c in g){var p=c.replace(/-/g,"_");u[p]=g[c]}return u}n.exports.Options=I,n.exports.normalizeOpts=m,n.exports.mergeOpts=y},function(n,I,y){var m=y(8).InputScanner,g=y(9).Tokenizer,u=y(9).TOKEN,c=y(13).Directives,p=y(4),l=y(12).Pattern,o=y(14).TemplatablePattern;function s(B,R){return R.indexOf(B)!==-1}var a={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:u.START,RAW:u.RAW,EOF:u.EOF},A=new c(/\/\*/,/\*\//),S=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,C=/[0-9]/,L=/[^\d\.]/,D=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),O=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";O=O.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),O="\\?\\.(?!\\d) "+O,O=O.replace(/ /g,"|");var w=new RegExp(O),x="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),d=x.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),E=new RegExp("^(?:"+d.join("|")+")$"),f,v=function(B,R){g.call(this,B,R),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var j=new l(this._input),U=new o(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(p.identifier).matching(p.identifierMatch),number:j.matching(S),punct:j.matching(w),comment:j.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:j.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:j.matching(/<!--/),html_comment_end:j.matching(/-->/),include:j.starting_with(/#include/).until_after(p.lineBreak),shebang:j.starting_with(/#!/).until_after(p.lineBreak),xml:j.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:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};v.prototype=new g,v.prototype._is_comment=function(B){return B.type===a.COMMENT||B.type===a.BLOCK_COMMENT||B.type===a.UNKNOWN},v.prototype._is_opening=function(B){return B.type===a.START_BLOCK||B.type===a.START_EXPR},v.prototype._is_closing=function(B,R){return(B.type===a.END_BLOCK||B.type===a.END_EXPR)&&R&&(B.text==="]"&&R.text==="["||B.text===")"&&R.text==="("||B.text==="}"&&R.text==="{")},v.prototype._reset=function(){f=!1},v.prototype._get_next_token=function(B,R){var j=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(a.EOF,""):(j=j||this._read_non_javascript(U),j=j||this._read_string(U),j=j||this._read_word(B),j=j||this._read_singles(U),j=j||this._read_comment(U),j=j||this._read_regexp(U,B),j=j||this._read_xml(U,B),j=j||this._read_punctuation(),j=j||this._create_token(a.UNKNOWN,this._input.next()),j)},v.prototype._read_word=function(B){var R;if(R=this.__patterns.identifier.read(),R!=="")return R=R.replace(p.allLineBreaks,`
|
|
`),!(B.type===a.DOT||B.type===a.RESERVED&&(B.text==="set"||B.text==="get"))&&E.test(R)?(R==="in"||R==="of")&&(B.type===a.WORD||B.type===a.STRING)?this._create_token(a.OPERATOR,R):this._create_token(a.RESERVED,R):this._create_token(a.WORD,R);if(R=this.__patterns.number.read(),R!=="")return this._create_token(a.WORD,R)},v.prototype._read_singles=function(B){var R=null;return B==="("||B==="["?R=this._create_token(a.START_EXPR,B):B===")"||B==="]"?R=this._create_token(a.END_EXPR,B):B==="{"?R=this._create_token(a.START_BLOCK,B):B==="}"?R=this._create_token(a.END_BLOCK,B):B===";"?R=this._create_token(a.SEMICOLON,B):B==="."&&L.test(this._input.peek(1))?R=this._create_token(a.DOT,B):B===","&&(R=this._create_token(a.COMMA,B)),R&&this._input.next(),R},v.prototype._read_punctuation=function(){var B=this.__patterns.punct.read();if(B!=="")return B==="="?this._create_token(a.EQUALS,B):B==="?."?this._create_token(a.DOT,B):this._create_token(a.OPERATOR,B)},v.prototype._read_non_javascript=function(B){var R="";if(B==="#"){if(this._is_first_token()&&(R=this.__patterns.shebang.read(),R))return this._create_token(a.UNKNOWN,R.trim()+`
|
|
`);if(R=this.__patterns.include.read(),R)return this._create_token(a.UNKNOWN,R.trim()+`
|
|
`);B=this._input.next();var j="#";if(this._input.hasNext()&&this._input.testChar(C)){do B=this._input.next(),j+=B;while(this._input.hasNext()&&B!=="#"&&B!=="=");return B==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(j+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(j+="{}",this._input.next(),this._input.next())),this._create_token(a.WORD,j)}this._input.back()}else if(B==="<"&&this._is_first_token()){if(R=this.__patterns.html_comment_start.read(),R){for(;this._input.hasNext()&&!this._input.testChar(p.newline);)R+=this._input.next();return f=!0,this._create_token(a.COMMENT,R)}}else if(f&&B==="-"&&(R=this.__patterns.html_comment_end.read(),R))return f=!1,this._create_token(a.COMMENT,R);return null},v.prototype._read_comment=function(B){var R=null;if(B==="/"){var j="";if(this._input.peek(1)==="*"){j=this.__patterns.block_comment.read();var U=A.get_directives(j);U&&U.ignore==="start"&&(j+=A.readIgnored(this._input)),j=j.replace(p.allLineBreaks,`
|
|
`),R=this._create_token(a.BLOCK_COMMENT,j),R.directives=U}else this._input.peek(1)==="/"&&(j=this.__patterns.comment.read(),R=this._create_token(a.COMMENT,j))}return R},v.prototype._read_string=function(B){if(B==="`"||B==="'"||B==='"'){var R=this._input.next();return this.has_char_escapes=!1,B==="`"?R+=this._read_string_recursive("`",!0,"${"):R+=this._read_string_recursive(B),this.has_char_escapes&&this._options.unescape_strings&&(R=T(R)),this._input.peek()===B&&(R+=this._input.next()),R=R.replace(p.allLineBreaks,`
|
|
`),this._create_token(a.STRING,R)}return null},v.prototype._allow_regexp_or_xml=function(B){return B.type===a.RESERVED&&s(B.text,["return","case","throw","else","do","typeof","yield"])||B.type===a.END_EXPR&&B.text===")"&&B.opened.previous.type===a.RESERVED&&s(B.opened.previous.text,["if","while","for"])||s(B.type,[a.COMMENT,a.START_EXPR,a.START_BLOCK,a.START,a.END_BLOCK,a.OPERATOR,a.EQUALS,a.EOF,a.SEMICOLON,a.COMMA])},v.prototype._read_regexp=function(B,R){if(B==="/"&&this._allow_regexp_or_xml(R)){for(var j=this._input.next(),U=!1,_=!1;this._input.hasNext()&&(U||_||this._input.peek()!==B)&&!this._input.testChar(p.newline);)j+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?_=!0:this._input.peek()==="]"&&(_=!1)),this._input.next();return this._input.peek()===B&&(j+=this._input.next(),j+=this._input.read(p.identifier)),this._create_token(a.STRING,j)}return null},v.prototype._read_xml=function(B,R){if(this._options.e4x&&B==="<"&&this._allow_regexp_or_xml(R)){var j="",U=this.__patterns.xml.read_match();if(U){for(var _=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),J=_.indexOf("{")===0,ne=0;U;){var he=!!U[1],be=U[2],Ke=!!U[U.length-1]||be.slice(0,8)==="![CDATA[";if(!Ke&&(be===_||J&&be.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(he?--ne:++ne),j+=U[0],ne<=0)break;U=this.__patterns.xml.read_match()}return U||(j+=this._input.match(/[\s\S]*/g)[0]),j=j.replace(p.allLineBreaks,`
|
|
`),this._create_token(a.STRING,j)}}return null};function T(B){for(var R="",j=0,U=new m(B),_=null;U.hasNext();)if(_=U.match(/([\s]|[^\\]|\\\\)+/g),_&&(R+=_[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")_=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")_=U.match(/u([0-9A-Fa-f]{4})/g);else{R+="\\",U.hasNext()&&(R+=U.next());continue}if(!_)return B;if(j=parseInt(_[1],16),j>126&&j<=255&&_[0].indexOf("x")===0)return B;if(j>=0&&j<32){R+="\\"+_[0];continue}else j===34||j===39||j===92?R+="\\"+String.fromCharCode(j):R+=String.fromCharCode(j)}return R}v.prototype._read_string_recursive=function(B,R,j){var U,_;B==="'"?_=this.__patterns.single_quote:B==='"'?_=this.__patterns.double_quote:B==="`"?_=this.__patterns.template_text:B==="}"&&(_=this.__patterns.template_expression);for(var J=_.read(),ne="";this._input.hasNext();){if(ne=this._input.next(),ne===B||!R&&p.newline.test(ne)){this._input.back();break}else ne==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),ne+=this._input.next()):j&&(j==="${"&&ne==="$"&&this._input.peek()==="{"&&(ne+=this._input.next()),j===ne&&(B==="`"?ne+=this._read_string_recursive("}",R,"`"):ne+=this._read_string_recursive("`",R,"${"),this._input.hasNext()&&(ne+=this._input.next())));ne+=_.read(),J+=ne}return J},n.exports.Tokenizer=v,n.exports.TOKEN=a,n.exports.positionable_operators=D.slice(),n.exports.line_starters=x.slice()},function(n){var I=RegExp.prototype.hasOwnProperty("sticky");function y(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}y.prototype.restart=function(){this.__position=0},y.prototype.back=function(){this.__position>0&&(this.__position-=1)},y.prototype.hasNext=function(){return this.__position<this.__input_length},y.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__input.charAt(this.__position),this.__position+=1),m},y.prototype.peek=function(m){var g=null;return m=m||0,m+=this.__position,m>=0&&m<this.__input_length&&(g=this.__input.charAt(m)),g},y.prototype.__match=function(m,g){m.lastIndex=g;var u=m.exec(this.__input);return u&&!(I&&m.sticky)&&(u.index!==g&&(u=null)),u},y.prototype.test=function(m,g){return g=g||0,g+=this.__position,g>=0&&g<this.__input_length?!!this.__match(m,g):!1},y.prototype.testChar=function(m,g){var u=this.peek(g);return m.lastIndex=0,u!==null&&m.test(u)},y.prototype.match=function(m){var g=this.__match(m,this.__position);return g?this.__position+=g[0].length:g=null,g},y.prototype.read=function(m,g,u){var c="",p;return m&&(p=this.match(m),p&&(c+=p[0])),g&&(p||!m)&&(c+=this.readUntil(g,u)),c},y.prototype.readUntil=function(m,g){var u="",c=this.__position;m.lastIndex=this.__position;var p=m.exec(this.__input);return p?(c=p.index,g&&(c+=p[0].length)):c=this.__input_length,u=this.__input.substring(this.__position,c),this.__position=c,u},y.prototype.readUntilAfter=function(m){return this.readUntil(m,!0)},y.prototype.get_regexp=function(m,g){var u=null,c="g";return g&&I&&(c="y"),typeof m=="string"&&m!==""?u=new RegExp(m,c):m&&(u=new RegExp(m.source,c)),u},y.prototype.get_literal_regexp=function(m){return RegExp(m.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},y.prototype.peekUntilAfter=function(m){var g=this.__position,u=this.readUntilAfter(m);return this.__position=g,u},y.prototype.lookBack=function(m){var g=this.__position-1;return g>=m.length&&this.__input.substring(g-m.length,g).toLowerCase()===m},n.exports.InputScanner=y},function(n,I,y){var m=y(8).InputScanner,g=y(3).Token,u=y(10).TokenStream,c=y(11).WhitespacePattern,p={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},l=function(o,s){this._input=new m(o),this._options=s||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new c(this._input)};l.prototype.tokenize=function(){this._input.restart(),this.__tokens=new u,this._reset();for(var o,s=new g(p.START,""),a=null,A=[],S=new u;s.type!==p.EOF;){for(o=this._get_next_token(s,a);this._is_comment(o);)S.add(o),o=this._get_next_token(s,a);S.isEmpty()||(o.comments_before=S,S=new u),o.parent=a,this._is_opening(o)?(A.push(a),a=o):a&&this._is_closing(o,a)&&(o.opened=a,a.closed=o,a=A.pop(),o.parent=a),o.previous=s,s.next=o,this.__tokens.add(o),s=o}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(o,s){this._readWhitespace();var a=this._input.read(/.+/g);return a?this._create_token(p.RAW,a):this._create_token(p.EOF,"")},l.prototype._is_comment=function(o){return!1},l.prototype._is_opening=function(o){return!1},l.prototype._is_closing=function(o,s){return!1},l.prototype._create_token=function(o,s){var a=new g(o,s,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return a},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=l,n.exports.TOKEN=p},function(n){function I(y){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=y}I.prototype.restart=function(){this.__position=0},I.prototype.isEmpty=function(){return this.__tokens_length===0},I.prototype.hasNext=function(){return this.__position<this.__tokens_length},I.prototype.next=function(){var y=null;return this.hasNext()&&(y=this.__tokens[this.__position],this.__position+=1),y},I.prototype.peek=function(y){var m=null;return y=y||0,y+=this.__position,y>=0&&y<this.__tokens_length&&(m=this.__tokens[y]),m},I.prototype.add=function(y){this.__parent_token&&(y.parent=this.__parent_token),this.__tokens.push(y),this.__tokens_length+=1},n.exports.TokenStream=I},function(n,I,y){var m=y(12).Pattern;function g(u,c){m.call(this,u,c),c?this._line_regexp=this._input.get_regexp(c._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}g.prototype=new m,g.prototype.__set_whitespace_patterns=function(u,c){u+="\\t ",c+="\\n\\r",this._match_pattern=this._input.get_regexp("["+u+c+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+c+"]")},g.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var u=this._input.read(this._match_pattern);if(u===" ")this.whitespace_before_token=" ";else if(u){var c=this.__split(this._newline_regexp,u);this.newline_count=c.length-1,this.whitespace_before_token=c[this.newline_count]}return u},g.prototype.matching=function(u,c){var p=this._create();return p.__set_whitespace_patterns(u,c),p._update(),p},g.prototype._create=function(){return new g(this._input,this)},g.prototype.__split=function(u,c){u.lastIndex=0;for(var p=0,l=[],o=u.exec(c);o;)l.push(c.substring(p,o.index)),p=o.index+o[0].length,o=u.exec(c);return p<c.length?l.push(c.substring(p,c.length)):l.push(""),l},n.exports.WhitespacePattern=g},function(n){function I(y,m){this._input=y,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,m&&(this._starting_pattern=this._input.get_regexp(m._starting_pattern,!0),this._match_pattern=this._input.get_regexp(m._match_pattern,!0),this._until_pattern=this._input.get_regexp(m._until_pattern),this._until_after=m._until_after)}I.prototype.read=function(){var y=this._input.read(this._starting_pattern);return(!this._starting_pattern||y)&&(y+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),y},I.prototype.read_match=function(){return this._input.match(this._match_pattern)},I.prototype.until_after=function(y){var m=this._create();return m._until_after=!0,m._until_pattern=this._input.get_regexp(y),m._update(),m},I.prototype.until=function(y){var m=this._create();return m._until_after=!1,m._until_pattern=this._input.get_regexp(y),m._update(),m},I.prototype.starting_with=function(y){var m=this._create();return m._starting_pattern=this._input.get_regexp(y,!0),m._update(),m},I.prototype.matching=function(y){var m=this._create();return m._match_pattern=this._input.get_regexp(y,!0),m._update(),m},I.prototype._create=function(){return new I(this._input,this)},I.prototype._update=function(){},n.exports.Pattern=I},function(n){function I(y,m){y=typeof y=="string"?y:y.source,m=typeof m=="string"?m:m.source,this.__directives_block_pattern=new RegExp(y+/ beautify( \w+[:]\w+)+ /.source+m,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(y+/\sbeautify\signore:end\s/.source+m,"g")}I.prototype.get_directives=function(y){if(!y.match(this.__directives_block_pattern))return null;var m={};this.__directive_pattern.lastIndex=0;for(var g=this.__directive_pattern.exec(y);g;)m[g[1]]=g[2],g=this.__directive_pattern.exec(y);return m},I.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=I},function(n,I,y){var m=y(12).Pattern,g={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function u(c,p){m.call(this,c,p),this.__template_pattern=null,this._disabled=Object.assign({},g),this._excluded=Object.assign({},g),p&&(this.__template_pattern=this._input.get_regexp(p.__template_pattern),this._excluded=Object.assign(this._excluded,p._excluded),this._disabled=Object.assign(this._disabled,p._disabled));var l=new m(c);this.__patterns={handlebars_comment:l.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:l.starting_with(/{{{/).until_after(/}}}/),handlebars:l.starting_with(/{{/).until_after(/}}/),php:l.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:l.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:l.starting_with(/{%/).until_after(/%}/),django_value:l.starting_with(/{{/).until_after(/}}/),django_comment:l.starting_with(/{#/).until_after(/#}/),smarty:l.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:l.starting_with(/{\*/).until_after(/\*}/),smarty_literal:l.starting_with(/{literal}/).until_after(/{\/literal}/)}}u.prototype=new m,u.prototype._create=function(){return new u(this._input,this)},u.prototype._update=function(){this.__set_templated_pattern()},u.prototype.disable=function(c){var p=this._create();return p._disabled[c]=!0,p._update(),p},u.prototype.read_options=function(c){var p=this._create();for(var l in g)p._disabled[l]=c.templating.indexOf(l)===-1;return p._update(),p},u.prototype.exclude=function(c){var p=this._create();return p._excluded[c]=!0,p._update(),p},u.prototype.read=function(){var c="";this._match_pattern?c=this._input.read(this._starting_pattern):c=this._input.read(this._starting_pattern,this.__template_pattern);for(var p=this._read_template();p;)this._match_pattern?p+=this._input.read(this._match_pattern):p+=this._input.readUntil(this.__template_pattern),c+=p,p=this._read_template();return this._until_after&&(c+=this._input.readUntilAfter(this._until_pattern)),c},u.prototype.__set_templated_pattern=function(){var c=[];this._disabled.php||c.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||c.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||c.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(c.push(this.__patterns.django._starting_pattern.source),c.push(this.__patterns.django_value._starting_pattern.source),c.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||c.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&c.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+c.join("|")+")")},u.prototype._read_template=function(){var c="",p=this._input.peek();if(p==="<"){var l=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&l==="?"&&(c=c||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&l==="%"&&(c=c||this.__patterns.erb.read())}else p==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(c=c||this.__patterns.handlebars_comment.read(),c=c||this.__patterns.handlebars_unescaped.read(),c=c||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(c=c||this.__patterns.django_value.read()),this._excluded.django||(c=c||this.__patterns.django_comment.read(),c=c||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(c=c||this.__patterns.smarty_comment.read(),c=c||this.__patterns.smarty_literal.read(),c=c||this.__patterns.smarty.read()));return c},n.exports.TemplatablePattern=u}],N={};function K(n){var I=N[n];if(I!==void 0)return I.exports;var y=N[n]={exports:{}};return b[n](y,y.exports,K),y.exports}var W=K(0);k=W})();var G=k;!(ae=[],X=function(){return{js_beautify:G}}.apply(Ee,ae),X!==void 0&&(tt.exports=X))})()},"6nfa":function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___24EuS",flex_space_between:"flex_space_between___H0sq_",flex_box_vertical_center:"flex_box_vertical_center___lroQv",flex_box_center_end:"flex_box_center_end___2zqAg",flex_box_column:"flex_box_column___1sePp",row:"row___FQAuJ",title:"title___1l3-g",tagsWrap:"tagsWrap___18FE-",action:"action___asdVT",bar:"bar___M_nl0",name:"name___BKyJY",active:"active___1eybt",tagsBorderWrap:"tagsBorderWrap___1NzgL"}},"746U":function(tt,Ee,H){"use strict";H.d(Ee,"f",function(){return ae}),H.d(Ee,"l",function(){return X}),H.d(Ee,"k",function(){return k}),H.d(Ee,"j",function(){return G}),H.d(Ee,"g",function(){return b}),H.d(Ee,"m",function(){return N}),H.d(Ee,"h",function(){return K}),H.d(Ee,"n",function(){return W}),H.d(Ee,"c",function(){return n}),H.d(Ee,"a",function(){return I}),H.d(Ee,"i",function(){return y}),H.d(Ee,"o",function(){return m}),H.d(Ee,"e",function(){return c}),H.d(Ee,"d",function(){return p}),H.d(Ee,"p",function(){return l}),H.d(Ee,"b",function(){return o});function ae(s){return Array.isArray(s)}function X(s){return typeof s=="string"}function k(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}function G(s){return typeof s=="number"&&!isNaN(s)}function b(s){return s===!0||s===!1}function N(s){return typeof s=="undefined"}function K(s){return!W(s)}function W(s){return N(s)||s===null}function n(s,a){if(!s)throw new Error(a?`Unexpected type, expected '${a}'`:"Unexpected type")}function I(s){if(W(s))throw new Error("Assertion Failed: argument is undefined or null");return s}function y(s){return typeof s=="function"}function m(s,a){const A=Math.min(s.length,a.length);for(let S=0;S<A;S++)g(s[S],a[S])}function g(s,a){if(X(a)){if(typeof s!==a)throw new Error(`argument does not match constraint: typeof ${a}`)}else if(y(a)){try{if(s instanceof a)return}catch(A){}if(!W(s)&&s.constructor===a)return;if(a.length===1&&a.call(void 0,s)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function u(s){let a=[],A=Object.getPrototypeOf(s);for(;Object.prototype!==A;)a=a.concat(Object.getOwnPropertyNames(A)),A=Object.getPrototypeOf(A);return a}function c(s){const a=[];for(const A of u(s))typeof s[A]=="function"&&a.push(A);return a}function p(s,a){const A=C=>function(){const L=Array.prototype.slice.call(arguments,0);return a(C,L)};let S={};for(const C of s)S[C]=A(C);return S}function l(s){return s===null?void 0:s}function o(s,a="Unreachable"){throw new Error(a)}},"7Cbv":function(tt,Ee,H){"use strict";var ae=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),X=new Uint8Array(16);function k(){if(!ae)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ae(X)}var G=/^(?:[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 b(g){return typeof g=="string"&&G.test(g)}for(var N=b,K=[],W=0;W<256;++W)K.push((W+256).toString(16).substr(1));function n(g){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,c=(K[g[u+0]]+K[g[u+1]]+K[g[u+2]]+K[g[u+3]]+"-"+K[g[u+4]]+K[g[u+5]]+"-"+K[g[u+6]]+K[g[u+7]]+"-"+K[g[u+8]]+K[g[u+9]]+"-"+K[g[u+10]]+K[g[u+11]]+K[g[u+12]]+K[g[u+13]]+K[g[u+14]]+K[g[u+15]]).toLowerCase();if(!N(c))throw TypeError("Stringified UUID is invalid");return c}var I=n;function y(g,u,c){g=g||{};var p=g.random||(g.rng||k)();if(p[6]=p[6]&15|64,p[8]=p[8]&63|128,u){c=c||0;for(var l=0;l<16;++l)u[c+l]=p[l];return u}return I(p)}var m=Ee.a=y},"7ahc":function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return A});var ae=H("k1fw"),X=H("0Owb"),k=H("+L6B"),G=H("2/Rp"),b=H("y8nQ"),N=H("Vl3Y"),K=H("tJVT"),W=H("OaEy"),n=H("2fM7"),I=H("q1tI"),y=H.n(I),m=H("VrN/"),g=H.n(m),u=H("p77/"),c=H.n(u),p=H("c5Ni"),l=H.n(p),o=n.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},a={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(S){var C=S.callback,L=S.onCancel,D=Object(I.useState)("python"),O=Object(K.a)(D,2),w=O[0],x=O[1];function d(f){x(a[f][1])}function E(f){C(f)}return y.a.createElement(N.a,Object(X.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:E}),y.a.createElement(N.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},y.a.createElement(n.a,{onChange:d},Object.keys(a).map(function(f){return y.a.createElement(o,{key:f,value:f},a[f][0])}))),y.a.createElement(N.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},y.a.createElement(A,{mode:w})),y.a.createElement("div",{className:"flex-container flex-end"},y.a.createElement(G.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),y.a.createElement(G.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function A(S){var C=S.value,L=S.onChange,D=S.mode,O=S.options,w=O===void 0?{}:O,x=Object(I.useRef)(),d=Object(I.useState)(),E=Object(K.a)(d,2),f=E[0],v=E[1];return Object(I.useEffect)(function(){if(f){function T(B){var R=B.getValue();L&&L(R)}return f.on("change",T),function(){f.off("change",T)}}},[f,L]),Object(I.useEffect)(function(){f&&f.setOption("mode",D)},[f,D]),Object(I.useEffect)(function(){f&&((C!==f.getValue()||C==="")&&setTimeout(function(){f.setValue(C||" ")},300))},[f,C]),Object(I.useEffect)(function(){if(x.current&&!f){var T=g.a.fromTextArea(x.current,Object(ae.a)({mode:D,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},w));v(T)}},[x.current,f]),y.a.createElement("div",{className:"my-codemirror-container"},y.a.createElement("textarea",{ref:x}))}},"7qnI":function(tt,Ee,H){"use strict";var ae=H("5Dmo"),X=H("3S7+"),k=H("fWQN"),G=H("mtLc"),b=H("yKVA"),N=H("879j"),K=H("5NDa"),W=H("5rEg"),n=H("q1tI"),I=H.n(n),y=H("O2Wb"),m=H.n(y),g=W.a.TextArea,u=function(c){Object(b.a)(l,c);var p=Object(N.a)(l);function l(){return Object(k.a)(this,l),p.apply(this,arguments)}return Object(G.a)(l,[{key:"render",value:function(){var s=this,a=this.props,A=a.index,S=a.onAnswerChange,C=a.addChildAnswer,L=a.exerciseIsPublish,D=a.answers,O=a.activeOptionErrorIndex,w=a.flex,x=w===void 0?"0 0 1000px":w;return I.a.createElement("div",{className:m.a.flex},I.a.createElement("div",{className:"".concat(m.a.color666," mb5 mt6"),style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",A+1,"):"),I.a.createElement("div",{className:"".concat(m.a.flex," ").concat(m.a.flex1),style:{flexDirection:"column"}},D.map(function(d,E){var f="".concat(A,"-").concat(E);return I.a.createElement("div",{className:"".concat(m.a.flex," ").concat(m.a.flex1),key:E},I.a.createElement("div",{className:m.a.flex1,style:{flex:x}},I.a.createElement("div",null,I.a.createElement(g,{className:f===O?m.a.error:"",spellCheck:!1,rows:4,value:d||"",defaultValue:"\u8BF7\u8F93\u5165\u53C2\u8003\u7B54\u6848".concat(E==0?"":"(\u53EF\u9009)"),onChange:function(T){return S(A,E,T.target.value)},style:{minHeight:95}}))),!L&&I.a.createElement(I.a.Fragment,null,E!=0&&I.a.createElement(X.a,{title:"\u5220\u9664"},I.a.createElement("i",{className:"".concat(m.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return s.props.deleteChildAnswer(A,E)},style:{float:"right"}})),E===0&&I.a.createElement(X.a,{title:"\u5220\u9664"},I.a.createElement("i",{className:"".concat(m.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return s.props.deleteChildAnswermain(A,E)},style:{float:"right"}})),I.a.createElement(X.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},I.a.createElement("i",{className:"".concat(m.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return C(A)},style:{float:"right",visibility:E==D.length-1?"":"hidden"}}))))})))}}]),l}(n.Component);Ee.a=u},"8EBN":function(tt,Ee,H){(function(ae){ae(H("VrN/"))})(function(ae){"use strict";ae.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 X=0;X<ae.modeInfo.length;X++){var k=ae.modeInfo[X];k.mimes&&(k.mime=k.mimes[0])}ae.findModeByMIME=function(G){G=G.toLowerCase();for(var b=0;b<ae.modeInfo.length;b++){var N=ae.modeInfo[b];if(N.mime==G)return N;if(N.mimes){for(var K=0;K<N.mimes.length;K++)if(N.mimes[K]==G)return N}}if(/\+xml$/.test(G))return ae.findModeByMIME("application/xml");if(/\+json$/.test(G))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(G){G=G.toLowerCase();for(var b=0;b<ae.modeInfo.length;b++){var N=ae.modeInfo[b];if(N.ext){for(var K=0;K<N.ext.length;K++)if(N.ext[K]==G)return N}}},ae.findModeByFileName=function(G){for(var b=0;b<ae.modeInfo.length;b++){var N=ae.modeInfo[b];if(N.file&&N.file.test(G))return N}var K=G.lastIndexOf("."),W=K>-1&&G.substring(K+1,G.length);if(W)return ae.findModeByExtension(W)},ae.findModeByName=function(G){G=G.toLowerCase();for(var b=0;b<ae.modeInfo.length;b++){var N=ae.modeInfo[b];if(N.name.toLowerCase()==G)return N;if(N.alias){for(var K=0;K<N.alias.length;K++)if(N.alias[K].toLowerCase()==G)return N}}}})},"8HAY":function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return b}),H.d(Ee,"b",function(){return N}),H.d(Ee,"d",function(){return K}),H.d(Ee,"e",function(){return W}),H.d(Ee,"c",function(){return n});var ae=H("MI8n"),X=H("pmY6"),k=H("3/fG"),G=function(I,y,m,g){function u(c){return c instanceof m?c:new m(function(p){p(c)})}return new(m||(m=Promise))(function(c,p){function l(a){try{s(g.next(a))}catch(A){p(A)}}function o(a){try{s(g.throw(a))}catch(A){p(A)}}function s(a){a.done?c(a.value):u(a.value).then(l,o)}s((g=g.apply(I,y||[])).next())})};class b extends X.a{constructor(I,y="",m="",g=!0,u){super();this._onDidChange=this._register(new ae.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=I,this._label=y,this._cssClass=m,this._enabled=g,this._actionCallback=u}get id(){return this._id}get label(){return this._label}set label(I){this._setLabel(I)}_setLabel(I){this._label!==I&&(this._label=I,this._onDidChange.fire({label:I}))}get tooltip(){return this._tooltip||""}set tooltip(I){this._setTooltip(I)}_setTooltip(I){this._tooltip!==I&&(this._tooltip=I,this._onDidChange.fire({tooltip:I}))}get class(){return this._cssClass}set class(I){this._setClass(I)}_setClass(I){this._cssClass!==I&&(this._cssClass=I,this._onDidChange.fire({class:I}))}get enabled(){return this._enabled}set enabled(I){this._setEnabled(I)}_setEnabled(I){this._enabled!==I&&(this._enabled=I,this._onDidChange.fire({enabled:I}))}get checked(){return this._checked}set checked(I){this._setChecked(I)}_setChecked(I){this._checked!==I&&(this._checked=I,this._onDidChange.fire({checked:I}))}run(I,y){return G(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(I))})}}class N extends X.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new ae.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new ae.b),this.onDidRun=this._onDidRun.event}run(I,y){return G(this,void 0,void 0,function*(){if(!I.enabled)return;this._onBeforeRun.fire({action:I});let m;try{yield this.runAction(I,y)}catch(g){m=g}this._onDidRun.fire({action:I,error:m})})}runAction(I,y){return G(this,void 0,void 0,function*(){yield I.run(y)})}}class K extends b{constructor(I){super(K.ID,I,I?"separator text":"separator");this.checked=!1,this.enabled=!1}}K.ID="vs.actions.separator";class W{constructor(I,y,m,g){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=I,this.label=y,this.class=g,this._actions=m}get actions(){return this._actions}dispose(){}run(){return G(this,void 0,void 0,function*(){})}}class n extends b{constructor(){super(n.ID,k.a("submenu.empty","(empty)"),void 0,!1)}}n.ID="vs.actions.empty"},"8WcF":function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___2fahw",flex_space_between:"flex_space_between___1h4HM",flex_box_vertical_center:"flex_box_vertical_center___2kxeE",flex_box_center_end:"flex_box_center_end___OjPB4",flex_box_column:"flex_box_column___3zY1h",orderWrap:"orderWrap___VQuq1",orderIconWrap:"orderIconWrap___18q7W",orderAsc:"orderAsc___3WBGg",orderDesc:"orderDesc____ipxK",active:"active___3EMfI",cursorPointer:"cursorPointer___3og_L",orderTextWrap:"orderTextWrap___XQlmv"}},"8hTe":function(tt,Ee,H){tt.exports={button:"button___1wy9m"}},"8mKB":function(tt,Ee,H){"use strict";var ae=H("rePB"),X=H("1OyB"),k=H("vuIU"),G=H("Ji7U"),b=H("md7G"),N=H("foSv"),K=H("q1tI"),W=H.n(K),n=H("m+aA"),I=H("TSYQ"),y=H.n(I),m=H("4IlW");function g(w){var x=w.pageXOffset,d="scrollLeft";if(typeof x!="number"){var E=w.document;x=E.documentElement[d],typeof x!="number"&&(x=E.body[d])}return x}function u(w){var x,d,E=w.ownerDocument,f=E.body,v=E&&E.documentElement,T=w.getBoundingClientRect();return x=T.left,d=T.top,x-=v.clientLeft||f.clientLeft||0,d-=v.clientTop||f.clientTop||0,{left:x,top:d}}function c(w){var x=u(w),d=w.ownerDocument,E=d.defaultView||d.parentWindow;return x.left+=g(E),x.left}function p(w){var x=l();return function(){var E=Object(N.a)(w),f;if(x){var v=Object(N.a)(this).constructor;f=Reflect.construct(E,arguments,v)}else f=E.apply(this,arguments);return Object(b.a)(this,f)}}function l(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(w){return!1}}var o=function(w){Object(G.a)(d,w);var x=p(d);function d(){var E;return Object(X.a)(this,d),E=x.apply(this,arguments),E.onHover=function(f){var v=E.props,T=v.onHover,B=v.index;T(f,B)},E.onClick=function(f){var v=E.props,T=v.onClick,B=v.index;T(f,B)},E.onKeyDown=function(f){var v=E.props,T=v.onClick,B=v.index;f.keyCode===13&&T(f,B)},E}return Object(k.a)(d,[{key:"getClassName",value:function(){var f=this.props,v=f.prefixCls,T=f.index,B=f.value,R=f.allowHalf,j=f.focused,U=T+1,_=v;return B===0&&T===0&&j?_+=" ".concat(v,"-focused"):R&&B+.5>=U&&B<U?(_+=" ".concat(v,"-half ").concat(v,"-active"),j&&(_+=" ".concat(v,"-focused"))):(_+=U<=B?" ".concat(v,"-full"):" ".concat(v,"-zero"),U===B&&j&&(_+=" ".concat(v,"-focused"))),_}},{key:"render",value:function(){var f=this.onHover,v=this.onClick,T=this.onKeyDown,B=this.props,R=B.disabled,j=B.prefixCls,U=B.character,_=B.characterRender,J=B.index,ne=B.count,he=B.value,be=typeof U=="function"?U(this.props):U,Ke=W.a.createElement("li",{className:this.getClassName()},W.a.createElement("div",{onClick:R?null:v,onKeyDown:R?null:T,onMouseMove:R?null:f,role:"radio","aria-checked":he>J?"true":"false","aria-posinset":J+1,"aria-setsize":ne,tabIndex:R?-1:0},W.a.createElement("div",{className:"".concat(j,"-first")},be),W.a.createElement("div",{className:"".concat(j,"-second")},be)));return _&&(Ke=_(Ke,this.props)),Ke}}]),d}(W.a.Component);function s(w,x){var d=Object.keys(w);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(w);x&&(E=E.filter(function(f){return Object.getOwnPropertyDescriptor(w,f).enumerable})),d.push.apply(d,E)}return d}function a(w){for(var x=1;x<arguments.length;x++){var d=arguments[x]!=null?arguments[x]:{};x%2?s(Object(d),!0).forEach(function(E){Object(ae.a)(w,E,d[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(d)):s(Object(d)).forEach(function(E){Object.defineProperty(w,E,Object.getOwnPropertyDescriptor(d,E))})}return w}function A(w){var x=S();return function(){var E=Object(N.a)(w),f;if(x){var v=Object(N.a)(this).constructor;f=Reflect.construct(E,arguments,v)}else f=E.apply(this,arguments);return Object(b.a)(this,f)}}function S(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(w){return!1}}function C(){}var L=function(w){Object(G.a)(d,w);var x=A(d);function d(E){var f;Object(X.a)(this,d),f=x.call(this,E),f.onHover=function(T,B){var R=f.props.onHoverChange,j=f.getStarValue(B,T.pageX),U=f.state.cleanedValue;j!==U&&f.setState({hoverValue:j,cleanedValue:null}),R(j)},f.onMouseLeave=function(){var T=f.props.onHoverChange;f.setState({hoverValue:void 0,cleanedValue:null}),T(void 0)},f.onClick=function(T,B){var R=f.props.allowClear,j=f.state.value,U=f.getStarValue(B,T.pageX),_=!1;R&&(_=U===j),f.onMouseLeave(),f.changeValue(_?0:U),f.setState({cleanedValue:_?U:null})},f.onFocus=function(){var T=f.props.onFocus;f.setState({focused:!0}),T&&T()},f.onBlur=function(){var T=f.props.onBlur;f.setState({focused:!1}),T&&T()},f.onKeyDown=function(T){var B=T.keyCode,R=f.props,j=R.count,U=R.allowHalf,_=R.onKeyDown,J=R.direction,ne=J==="rtl",he=f.state.value;B===m.a.RIGHT&&he<j&&!ne?(U?he+=.5:he+=1,f.changeValue(he),T.preventDefault()):B===m.a.LEFT&&he>0&&!ne||B===m.a.RIGHT&&he>0&&ne?(U?he-=.5:he-=1,f.changeValue(he),T.preventDefault()):B===m.a.LEFT&&he<j&&ne&&(U?he+=.5:he+=1,f.changeValue(he),T.preventDefault()),_&&_(T)},f.saveRef=function(T){return function(B){f.stars[T]=B}},f.saveRate=function(T){f.rate=T};var v=E.value;return v===void 0&&(v=E.defaultValue),f.stars={},f.state={value:v,focused:!1,cleanedValue:null},f}return Object(k.a)(d,[{key:"componentDidMount",value:function(){var f=this.props,v=f.autoFocus,T=f.disabled;v&&!T&&this.focus()}},{key:"getStarDOM",value:function(f){return Object(n.a)(this.stars[f])}},{key:"getStarValue",value:function(f,v){var T=this.props,B=T.allowHalf,R=T.direction,j=R==="rtl",U=f+1;if(B){var _=this.getStarDOM(f),J=c(_),ne=_.clientWidth;(j&&v-J>ne/2||!j&&v-J<ne/2)&&(U-=.5)}return U}},{key:"focus",value:function(){var f=this.props.disabled;f||this.rate.focus()}},{key:"blur",value:function(){var f=this.props.disabled;f||this.rate.blur()}},{key:"changeValue",value:function(f){var v=this.props.onChange;"value"in this.props||this.setState({value:f}),v(f)}},{key:"render",value:function(){for(var f=this.props,v=f.count,T=f.allowHalf,B=f.style,R=f.prefixCls,j=f.disabled,U=f.className,_=f.character,J=f.characterRender,ne=f.tabIndex,he=f.direction,be=this.state,Ke=be.value,De=be.hoverValue,je=be.focused,Be=[],Ge=j?"".concat(R,"-disabled"):"",_e=0;_e<v;_e+=1)Be.push(W.a.createElement(o,{ref:this.saveRef(_e),index:_e,count:v,disabled:j,prefixCls:"".concat(R,"-star"),allowHalf:T,value:De===void 0?Ke:De,onClick:this.onClick,onHover:this.onHover,key:_e,character:_,characterRender:J,focused:je}));var Y=y()(R,Ge,U,Object(ae.a)({},"".concat(R,"-rtl"),he==="rtl"));return W.a.createElement("ul",{className:Y,style:B,onMouseLeave:j?null:this.onMouseLeave,tabIndex:j?-1:ne,onFocus:j?null:this.onFocus,onBlur:j?null:this.onBlur,onKeyDown:j?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},Be)}}],[{key:"getDerivedStateFromProps",value:function(f,v){return"value"in f&&f.value!==void 0?a(a({},v),{},{value:f.value}):v}}]),d}(W.a.Component);L.defaultProps={defaultValue:0,count:5,allowHalf:!1,allowClear:!0,style:{},prefixCls:"rc-rate",onChange:C,character:"\u2605",onHoverChange:C,tabIndex:0,direction:"ltr"};var D=L,O=Ee.a=D},"9Bee":function(tt,Ee,H){"use strict";var ae=H("DYRE"),X=H("zeV3"),k=H("+L6B"),G=H("2/Rp"),b=H("k1fw"),N=H("9og8"),K=H("tJVT"),W=H("WmNS"),n=H.n(W),I=H("q1tI"),y=H.n(I),m=H("vg9a"),g=H("DlQD"),u=H.n(g),c=H("rUJ1");function p(ce,q){var ee=ce.match(/^(\s+)(?:```)/);if(ee===null)return q;var oe=ee[1];return q.split(`
|
|
`).map(function(fe){var ie=fe.match(/^\s+/);if(ie===null)return fe;var le=Object(K.a)(ie,1),me=le[0];return me.length>=oe.length?fe.slice(oe.length):fe}).join(`
|
|
`)}var l=[],o=["<ul>"],s=new u.a.Renderer,a=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function A(){l.length=0,o=["<ul>"]}var S={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function C(ce,q,ee,oe){if(q>=ce.length||ce[q].level<=ee)return q;var fe=ce[q];oe.push("<li><a href='#"+fe.anchor+"'>"+fe.text+"</a>"),q++;var ie=[];return q=C(ce,q,fe.level,ie),ie.length>0&&(oe.push("<ul>"),ie.forEach(function(le){oe.push(le)}),oe.push("</ul>")),oe.push("</li>"),q=C(ce,q,ee,oe),q}function L(){return C(l,0,0,o),o.push("</ul>"),o.join("")}var D={heading:function(q){var ee=a.exec(q);if(ee)return{type:"heading",raw:ee[0],depth:ee[1].length,text:ee[2]}},fences:function(q){var ee=this.rules.block.fences.exec(q);if(ee){var oe=ee[0],fe=p(oe,ee[3]||""),ie=ee[2]?ee[2].trim():ee[2];if(["latex","katex","math"].indexOf(ie)>=0){var le=x(),me=fe;fe=le,d[le]={type:"block",expression:me}}return{type:"code",raw:oe,lang:ie,text:fe}}}},O=/(?:\${2})([^\n`]+?)(?:\${2})/gi,w=0,x=function(){return"__special_katext_id_".concat(w++,"__")},d={};function E(){return d}function f(){w=0,d={}}function v(ce){return ce=ce.replace(O,function(q,ee){var oe=x();return d[oe]={type:"inline",expression:ee},oe}),ce}var T=s.listitem;s.listitem=function(ce){return T(v(ce))};var B=s.paragraph;s.paragraph=function(ce){return B(v(ce))};var R=s.tablecell;s.tablecell=function(ce,q){return R(v(ce),q)},s.code=function(ce,q,ee){var oe=(q||"").match(/\S*/)[0];return oe?["latex","katex","math"].indexOf(oe)>=0?"<p class='editormd-tex'>".concat(ce,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(q,'">').concat(ee?ce:Object(c.escape)(ce,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(ee?ce:Object(c.escape)(ce,!0))+"</code></pre>"},s.heading=function(ce,q,ee){var oe=this.options.headerPrefix+ee.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return l.push({anchor:oe,level:q,text:ce}),"<h"+q+' id="'+oe+'">'+ce+"</h"+q+">"},u.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),u.a.use({tokenizer:D,renderer:s});var j=u.a,U=H("SJMd"),_=H("ulZh"),J=H.n(_),ne=H("m3rI"),he=H("Oy/b"),be=H("p5ED"),Ke=H("ErOA"),De=H("STEk");/* **********************************
|
|
cropro version 1.2.0
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
copyright Alan Mendelevich
|
|
see README and LICENSE for details
|
|
********************************** *//*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var je=function(ce,q){return(je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,oe){ee.__proto__=oe}||function(ee,oe){for(var fe in oe)Object.prototype.hasOwnProperty.call(oe,fe)&&(ee[fe]=oe[fe])})(ce,q)};function Be(ce,q){if(typeof q!="function"&&q!==null)throw new TypeError("Class extends value "+String(q)+" is not a constructor or null");function ee(){this.constructor=ce}je(ce,q),ce.prototype=q===null?Object.create(q):(ee.prototype=q.prototype,new ee)}function Ge(ce,q,ee,oe){return new(ee||(ee=Promise))(function(fe,ie){function le(Ae){try{ve(oe.next(Ae))}catch(Re){ie(Re)}}function me(Ae){try{ve(oe.throw(Ae))}catch(Re){ie(Re)}}function ve(Ae){var Re;Ae.done?fe(Ae.value):(Re=Ae.value,Re instanceof ee?Re:new ee(function(Pe){Pe(Re)})).then(le,me)}ve((oe=oe.apply(ce,q||[])).next())})}function _e(ce,q){var ee,oe,fe,ie,le={label:0,sent:function(){if(1&fe[0])throw fe[1];return fe[1]},trys:[],ops:[]};return ie={next:me(0),throw:me(1),return:me(2)},typeof Symbol=="function"&&(ie[Symbol.iterator]=function(){return this}),ie;function me(ve){return function(Ae){return function(Re){if(ee)throw new TypeError("Generator is already executing.");for(;le;)try{if(ee=1,oe&&(fe=2&Re[0]?oe.return:Re[0]?oe.throw||((fe=oe.return)&&fe.call(oe),0):oe.next)&&!(fe=fe.call(oe,Re[1])).done)return fe;switch(oe=0,fe&&(Re=[2&Re[0],fe.value]),Re[0]){case 0:case 1:fe=Re;break;case 4:return le.label++,{value:Re[1],done:!1};case 5:le.label++,oe=Re[1],Re=[0];continue;case 7:Re=le.ops.pop(),le.trys.pop();continue;default:if(!(fe=le.trys,(fe=fe.length>0&&fe[fe.length-1])||Re[0]!==6&&Re[0]!==2)){le=0;continue}if(Re[0]===3&&(!fe||Re[1]>fe[0]&&Re[1]<fe[3])){le.label=Re[1];break}if(Re[0]===6&&le.label<fe[1]){le.label=fe[1],fe=Re;break}if(fe&&le.label<fe[2]){le.label=fe[2],le.ops.push(Re);break}fe[2]&&le.ops.pop(),le.trys.pop();continue}Re=q.call(ce,le)}catch(Pe){Re=[6,Pe],oe=0}finally{ee=fe=0}if(5&Re[0])throw Re[1];return{value:Re[0]?Re[1]:void 0,done:!0}}([ve,Ae])}}}var Y=function(){function ce(){}return ce.addKey=function(q){ce.key=q},Object.defineProperty(ce,"isLicensed",{get:function(){return!!ce.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ce.key)},enumerable:!1,configurable:!0}),ce}(),M=function(){function ce(){}return ce.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ce.setAttributes=function(q,ee){for(var oe=0,fe=ee;oe<fe.length;oe++){var ie=fe[oe],le=ie[0],me=ie[1];q.setAttribute(le,me)}},ce.createRect=function(q,ee,oe){var fe=document.createElementNS("http://www.w3.org/2000/svg","rect");return fe.setAttribute("width",q.toString()),fe.setAttribute("height",ee.toString()),oe&&ce.setAttributes(fe,oe),fe},ce.createLine=function(q,ee,oe,fe,ie){var le=document.createElementNS("http://www.w3.org/2000/svg","line");return le.setAttribute("x1",q.toString()),le.setAttribute("y1",ee.toString()),le.setAttribute("x2",oe.toString()),le.setAttribute("y2",fe.toString()),ie&&ce.setAttributes(le,ie),le},ce.createPolygon=function(q,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return oe.setAttribute("points",q),ee&&ce.setAttributes(oe,ee),oe},ce.createCircle=function(q,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","circle");return oe.setAttribute("cx",(q/2).toString()),oe.setAttribute("cy",(q/2).toString()),oe.setAttribute("r",q.toString()),ee&&ce.setAttributes(oe,ee),oe},ce.createEllipse=function(q,ee,oe){var fe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return fe.setAttribute("cx",(q/2).toString()),fe.setAttribute("cy",(ee/2).toString()),fe.setAttribute("rx",(q/2).toString()),fe.setAttribute("ry",(ee/2).toString()),oe&&ce.setAttributes(fe,oe),fe},ce.createGroup=function(q){var ee=document.createElementNS("http://www.w3.org/2000/svg","g");return q&&ce.setAttributes(ee,q),ee},ce.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ce.createMarker=function(q,ee,oe,fe,ie,le,me){var ve=document.createElementNS("http://www.w3.org/2000/svg","marker");return ce.setAttributes(ve,[["id",q],["orient",ee],["markerWidth",oe.toString()],["markerHeight",fe.toString()],["refX",ie.toString()],["refY",le.toString()]]),ve.appendChild(me),ve},ce.createText=function(q){var ee=document.createElementNS("http://www.w3.org/2000/svg","text");return ee.setAttribute("x","0"),ee.setAttribute("y","0"),q&&ce.setAttributes(ee,q),ee},ce.createTSpan=function(q,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return oe.textContent=q,ee&&ce.setAttributes(oe,ee),oe},ce.createImage=function(q){var ee=document.createElementNS("http://www.w3.org/2000/svg","image");return q&&ce.setAttributes(ee,q),ee},ce.createPoint=function(q,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return oe.x=q,oe.y=ee,oe},ce.createPath=function(q,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg","path");return oe.setAttribute("d",q),ee&&ce.setAttributes(oe,ee),oe},ce.createElement=function(q,ee){var oe=document.createElementNS("http://www.w3.org/2000/svg",q);return ee&&ce.setAttributes(oe,ee),oe},ce.getHollowRectanglePath=function(q,ee,oe,fe,ie,le,me,ve){return"M"+q+","+ee+"V"+(ee+fe)+"H"+(q+oe)+"V"+ee+"H"+ie+"V"+le+"H"+(ie+me)+"V"+(le+ve)+"H"+ie+"V"+ee+"Z"},ce}(),F=function(){function ce(q){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+q+"_"}return Object.defineProperty(ce.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ce.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(ce.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),ce.prototype.addClass=function(q){return this.styleSheet===void 0&&this.addStyleSheet(),q.name=""+this.classNamePrefix+q.localName,this.classes.push(q),this.styleSheet.sheet.insertRule("."+q.name+" {"+q.style+"}",this.styleSheet.sheet.cssRules.length),q},ce.prototype.addRule=function(q){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(q),this.styleSheet.sheet.insertRule(q.selector+" {"+q.style+"}",this.styleSheet.sheet.cssRules.length)},ce.prototype.addStyleSheet=function(){var q;this.styleSheet=document.createElement("style"),((q=this.styleSheetRoot)!==null&&q!==void 0?q:document.head).appendChild(this.styleSheet),this.addRule(new Q("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Q("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Q("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new te("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new te("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},ce.prototype.removeStyleSheet=function(){var q;this.styleSheet&&(((q=this.styleSheetRoot)!==null&&q!==void 0?q:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ce}(),Q=function(ce,q){this.selector=ce,this.style=q},te=function(ce,q){this.localName=ce,this.style=q},V=function(){function ce(){this.blocks=[],this.display=""}return ce.prototype.addButtonBlock=function(q){q.className=this.blockClassName,q.buttonClassName=this.buttonClassName,q.buttonColorsClassName=this.buttonColorsClassName,q.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(q)},ce.prototype.addElementBlock=function(q){q.className===void 0&&(q.className=this.blockClassName),this.blocks.push(q)},ce.prototype.getUI=function(){var q=document.createElement("div");return q.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,q.style.display=this.display,this.blocks.forEach(function(ee){return q.appendChild(ee.getUI())}),q},ce}(),ge=function(){function ce(){}return ce.prototype.getUI=function(){var q=document.createElement("div");if(q.className=this.className,this.minWidth!==void 0&&(q.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":q.style.justifyContent="flex-start";break;case"center":q.style.justifyContent="center";break;case"end":q.style.justifyContent="flex-end"}return q.style.whiteSpace="nowrap",q},ce}(),Ue=function(ce){function q(){var ee=ce!==null&&ce.apply(this,arguments)||this;return ee.buttons=[],ee}return Be(q,ce),q.prototype.addButton=function(ee){ee.className=this.buttonClassName,ee.colorsClassName=this.buttonColorsClassName,ee.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(ee)},q.prototype.getUI=function(){var ee=ce.prototype.getUI.call(this);return this.buttons.forEach(function(oe){return ee.appendChild(oe.getUI())}),ee},q}(ge),Ye=function(){function ce(q,ee){this._isActive=!1,this._isHidden=!1,this._icon=q,this.title=ee,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(ce.prototype,"icon",{get:function(){return this._icon},set:function(q){this._icon=q,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isActive",{get:function(){return this._isActive},set:function(q){this._isActive=q,this.adjustClassName()},enumerable:!1,configurable:!0}),ce.prototype.getUI=function(){var q=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return q.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},ce.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,"")))},ce.prototype.hide=function(){this._isHidden=!0},ce}(),de=function(ce){function q(){var ee=ce!==null&&ce.apply(this,arguments)||this;return ee.elements=[],ee}return Be(q,ce),q.prototype.addElement=function(ee){this.elements.push(ee)},q.prototype.getUI=function(){var ee=ce.prototype.getUI.call(this);return this.elements.forEach(function(oe){return ee.appendChild(oe)}),ee},q}(ge),xe=function(){function ce(q,ee){this.horizontal=q,this.vertical=ee}return Object.defineProperty(ce.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),ce.prototype.getVerticalLength=function(q){return q/this.ratio},ce.prototype.getHorizontalLength=function(q){return q*this.ratio},ce}(),Me=function(){function ce(){}return ce.getIcon=function(q,ee){if(q>0&&ee>0){var oe=new xe(q,ee),fe=oe.ratio>=1?20:oe.getHorizontalLength(20),ie=oe.ratio<1?20:oe.getVerticalLength(20),le=document.createElementNS("http://www.w3.org/2000/svg","svg");le.setAttribute("xmlns","http://www.w3.org/2000/svg"),le.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(le);var me=M.createDefs();le.appendChild(me);var ve=M.createElement("clipPath",[["id","text-bg-clip"]]);me.appendChild(ve);var Ae=M.createPath(M.getHollowRectanglePath((24-fe)/2,(24-ie)/2,fe,ie,(24-fe)/2+2,(24-ie)/2+2,fe-4,ie-4));le.appendChild(Ae);var Re=M.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Re.appendChild(M.createTSpan(q+":"+ee)),le.appendChild(Re);var Pe=Re.getBBox();M.setAttributes(Re,[["x",((24-Pe.width)/2).toString()],["y",((24-Pe.height)/2-Pe.y).toString()]]);var it=M.createPath(M.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Pe.width))/2,(24-Math.ceil(Pe.height))/2,Math.ceil(Pe.width),Math.ceil(Pe.height)));return ve.appendChild(it),M.setAttributes(Ae,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(le),le.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>'},ce}(),Fe=function(ce){function q(ee,oe,fe){var ie=ce.call(this,ee,oe)||this;return ie.isDropdownOpen=!1,ie.onClick=ie.dropdownButtonClicked,ie.dropdownButtons=fe,ie}return Be(q,ce),q.prototype.setupDropdown=function(){var ee=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(oe){oe.className=ee.className,oe.colorsClassName=ee.colorsClassName,ee.dropdownBlock.appendChild(oe.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},q.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},q.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},q.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},q.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},q.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},q}(Ye),$e=function(){function ce(q,ee){this.GRIP_SIZE=10,this.color=q,this.fillColor=ee,this.visual=M.createGroup(),this.visual.appendChild(M.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(M.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ce.prototype.ownsTarget=function(q){return q===this.visual||q===this.visual.childNodes[0]||q===this.visual.childNodes[1]},ce.prototype.setCenter=function(q,ee){this.visual.childNodes.forEach(function(oe){return M.setAttributes(oe,[["cx",q.toString()],["cy",ee.toString()]])})},ce}(),st=function(){function ce(q,ee,oe,fe){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=q,this.canvasHeight=ee,this.margin=oe,this.container=fe,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(ce.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(q){this._aspectRatio=q,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(q){this._isGridVisible=q,this.gridContainer&&M.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(q){this._zoomFactor=q,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ce.prototype.open=function(){var q=this;this.cropShadeElement=M.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=M.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var ee=0;ee<this.numberOfGridLines;ee++)this.horizontalGridLines.push(M.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(M.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(oe){return q.gridContainer.appendChild(oe)}),this.verticalGridLines.forEach(function(oe){return q.gridContainer.appendChild(oe)}),this.cropRectElement=M.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new $e(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new $e(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new $e(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new $e(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},ce.prototype.setCropRectangle=function(q){this.cropRect=q;var ee=Object.assign({},this.cropRect);this.zoomFactor!==1&&(ee.width=this.cropRect.width*this.zoomFactor,ee.height=this.cropRect.height*this.zoomFactor,ee.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-ee.width/2,ee.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-ee.height/2),M.setAttributes(this.cropRectElement,[["x",ee.x.toString()],["y",ee.y.toString()],["width",ee.width.toString()],["height",ee.height.toString()]]);var oe=ee.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ie,le){var me=ee.y+oe*(le+1);M.setAttributes(ie,[["x1",""+ee.x],["y1",""+me],["x2",""+(ee.x+ee.width)],["y2",""+me]])});var fe=ee.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ie,le){var me=ee.x+fe*(le+1);M.setAttributes(ie,[["x1",""+me],["y1",""+ee.y],["x2",""+me],["y2",""+(ee.y+ee.height)]])}),M.setAttributes(this.cropShadeElement,[["d",M.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,ee.x,ee.y,ee.width,ee.height)]]),this.topLeftGrip.setCenter(ee.x,ee.y),this.topRightGrip.setCenter(ee.x+ee.width,ee.y),this.bottomLeftGrip.setCenter(ee.x,ee.y+ee.height),this.bottomRightGrip.setCenter(ee.x+ee.width,ee.y+ee.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ce.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)},ce.prototype.clientToLocalCoordinates=function(q,ee){var oe=this.container.getBoundingClientRect();return{x:q-oe.left+this.margin,y:ee-oe.top+this.margin}},ce.prototype.onPointerDown=function(q){this.container.setPointerCapture(q.pointerId),this.previousPoint=this.clientToLocalCoordinates(q.clientX,q.clientY),this.cropRectElement===q.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(q.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(q.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(q.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(q.target)&&(this.activeGrip=this.bottomRightGrip)},ce.prototype.onPointerMove=function(q){if(this.isMoving)this.move(this.clientToLocalCoordinates(q.clientX,q.clientY));else if(this.activeGrip){var ee=this.clientToLocalCoordinates(q.clientX,q.clientY);this.resize(ee)}q.preventDefault()},ce.prototype.onPointerUp=function(q){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(q.pointerId)},ce.prototype.move=function(q){var ee=q.x-this.previousPoint.x,oe=q.y-this.previousPoint.y;this.zoomFactor!==1&&(ee=-ee/this.zoomFactor,oe=-oe/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+ee),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+oe),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=q},ce.prototype.resize=function(q){var ee=Object.assign({},this.cropRect),oe=q.x-this.previousPoint.x,fe=q.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:ee.x+oe<this.margin&&(oe=this.margin-ee.x),ee.x+=oe,ee.width=this.cropRect.x+this.cropRect.width-ee.x;break;case this.bottomRightGrip:case this.topRightGrip:ee.width+oe>this.canvasWidth*this.zoomFactor&&(oe=this.canvasWidth*this.zoomFactor-ee.width),ee.width+=oe}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(ee.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(oe),ee.height=this.aspectRatio.getVerticalLength(ee.width)):(ee.y+=fe,ee.height=this.cropRect.y+this.cropRect.height-ee.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?ee.height=this.aspectRatio.getVerticalLength(ee.width):ee.height+=fe}ee.width<10&&(ee.x=this.cropRect.x,ee.width=10),ee.height<10&&(ee.y=this.cropRect.y,ee.height=10),this.previousPoint=q,ee.x>=this.margin&&ee.y>=this.margin&&ee.x-this.margin+ee.width<=this.canvasWidth&&ee.y-this.margin+ee.height<=this.canvasHeight&&(this.cropRect=ee,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ce.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var q=this.cropRect.x+this.cropRect.width/2,ee=this.cropRect.y+this.cropRect.height/2,oe=this.aspectRatio.getHorizontalLength(this.cropRect.height),fe=this.aspectRatio.getVerticalLength(this.cropRect.width);oe/this.canvasWidth<fe/this.canvasHeight?this.cropRect.width=oe:this.cropRect.height=fe,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=q-this.cropRect.width/2,this.cropRect.y=ee-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)}},ce.prototype.getRescaledRect=function(q,ee,oe,fe,ie,le){var me=oe/q,ve=fe/ee;return{x:(ie.x-le)*me+le,y:(ie.y-le)*ve+le,width:ie.width*me,height:ie.height*ve}},ce.prototype.scaleCanvas=function(q,ee){var oe=this.getRescaledRect(this.canvasWidth,this.canvasHeight,q,ee,this.cropRect,this.margin);this.canvasWidth=q,this.canvasHeight=ee,this.onCropChange&&this.onCropChange(oe),this.setCropRectangle(oe)},ce}(),mt=function(){function ce(q){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=q,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(ce.prototype,"angle",{get:function(){return this._angle},set:function(q){this._angle=q,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ce.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},ce.prototype.onPointerDown=function(q){this.controlContainer.setPointerCapture(q.pointerId),this.isDragging=!0,this.previousPoint={x:q.clientX,y:q.clientY}},ce.prototype.onPointerMove=function(q){this.isDragging&&(this.onAngleChange&&this.onAngleChange((q.clientX-this.previousPoint.x)/5),this.previousPoint.x=q.clientX)},ce.prototype.onPointerUp=function(q){this.isDragging&&this.onAngleChange&&this.onAngleChange((q.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(q.pointerId)},ce.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var q=this.angleLabelText.getBBox();M.setAttributes(this.angleLabelElement,[["x",((this.width-q.width)/2).toString()],["y",(this.height/2).toString()]])}},ce.prototype.positionScaleShape=function(){if(this.scaleShape){var q=this.scaleShape.transform.baseVal.getItem(0);q.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(q,0)}},ce.prototype.getVisual=function(){var q=document.createElementNS("http://www.w3.org/2000/svg","svg");q.setAttribute("xmlns","http://www.w3.org/2000/svg"),q.setAttribute("width",this.width+"px"),q.setAttribute("height",this.height+"px"),q.setAttribute("viewBox","0 0 "+this.width+" "+this.height),q.style.flexShrink="0",document.body.appendChild(q);for(var ee="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,oe=1;oe<=this.width/5+10;oe++){var fe=oe%5==0?this.height/3:this.height/6;ee+="h4v"+-fe+"h1v"+fe}ee+="v1H0Z",this.scaleShape=M.createPath(ee);var ie=M.createTransform();this.scaleShape.transform.baseVal.appendItem(ie),q.appendChild(this.scaleShape),this.angleLabelElement=M.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=M.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var le=M.createTSpan("");return le.innerHTML="°",this.angleLabelElement.appendChild(le),q.appendChild(this.angleLabelElement),document.body.removeChild(q),q},ce}(),ut=function(){function ce(){this.naturalSize=!1,this.imageType="image/png"}return ce.prototype.rasterize=function(q,ee,oe,fe,ie,le,me){var ve=this;return new Promise(function(Ae){var Re=document.createElement("canvas");Re.width=q.width.baseVal.value-2*fe,Re.height=q.height.baseVal.value-2*fe;var Pe=1,it=1;ve.naturalSize===!0?(Pe=ee.naturalWidth/(q.width.baseVal.value-2*fe)/le,it=ee.naturalHeight/(q.height.baseVal.value-2*fe)/me,Re.width=ee.naturalWidth/le,Re.height=ee.naturalHeight/me):ve.width!==void 0&&ve.height!==void 0&&(Pe=ve.width/oe.width,it=ve.height/oe.height,Re.width*=Pe,Re.height*=it);var ct=Re.getContext("2d");ct.translate(Re.width/2,Re.height/2),ct.rotate(ie*Math.PI/180),ct.scale(le,me),ct.translate(-Re.width/2,-Re.height/2),ct.drawImage(ee,0,0,Re.width,Re.height);var Ot=document.createElement("canvas");Ot.width=oe.width*Pe,Ot.height=oe.height*it,Ot.getContext("2d").putImageData(ct.getImageData((oe.x-fe)*Pe,(oe.y-fe)*it,oe.width*Pe,oe.height*it),0,0),Ae(Ot.toDataURL(ve.imageType,ve.imageQuality))})},ce}(),Pt=function(){function ce(q){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=ce.instanceCounter++,this.styles=new F(this.instanceNo),this.target=q,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(ce.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(q){this._zoomToCropEnabled=q,q?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(q){this._isGridVisible=q,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"gridLines",{get:function(){return this._gridLines},set:function(q){this._gridLines=q,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(q){this._rotationAngle=q,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"aspectRatio",{get:function(){var q;return(q=this._aspectRatio)!==null&&q!==void 0?q:this.aspectRatios[0]},set:function(q){this._aspectRatio=q},enumerable:!1,configurable:!0}),ce.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},ce.prototype.show=function(){this.showUI(),this.open()},ce.prototype.close=function(q){q===void 0&&(q=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),q||this.closeEventListeners.forEach(function(ee){return ee()}),this._isOpen=!1)},ce.prototype.addRenderEventListener=function(q){this.renderEventListeners.push(q)},ce.prototype.removeRenderEventListener=function(q){this.renderEventListeners.indexOf(q)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(q),1)},ce.prototype.addCloseEventListener=function(q){this.closeEventListeners.push(q)},ce.prototype.removeCloseEventListener=function(q){this.closeEventListeners.indexOf(q)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(q),1)},ce.prototype.setupResizeObserver=function(){var q=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){q.resize(q.target.clientWidth,q.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))},ce.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var q=1*this.target.clientWidth/this.target.clientHeight,ee=this.contentDiv.clientWidth/q>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*q:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,oe=ee+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/q;this.resize(ee,oe)}},ce.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ce.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",M.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},ce.prototype.resize=function(q,ee){this.imageWidth=Math.round(q),this.imageHeight=Math.round(ee),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()},ce.prototype.setEditingTarget=function(){var q=document.createElement("canvas");q.width=this.target.naturalWidth,q.height=this.target.naturalHeight,q.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var ee=q.toDataURL();M.setAttributes(this.editingTarget,[["href",ee]]),this.setEditingTargetSize()},ce.prototype.setTopLeft=function(){var q=this.target.getBoundingClientRect(),ee=this.editorCanvas.getBoundingClientRect();this.left=q.left-ee.left-this.CANVAS_MARGIN,this.top=q.top-ee.top-this.CANVAS_MARGIN},ce.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=M.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=M.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=M.createGroup(),this.editingTargetRotationScaleContainer=M.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var q=M.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(q);var ee=M.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(ee),this.editingTargetContainer=M.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)},ce.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},ce.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=M.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new st(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},ce.prototype.zoomToCrop=function(){if(this.cropRect){var q=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,ee=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=q+"px "+ee+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-q+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-ee+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},ce.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)},ce.prototype.cropRectChanged=function(q){this.cropRect=q,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},ce.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},ce.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"},ce.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ce.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var q=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,ee=this.target.offsetTop>q+this.CANVAS_MARGIN?this.target.offsetTop-(q+this.CANVAS_MARGIN):0;this.coverDiv.style.top=ee+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},ce.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ce.prototype.addTopToolbar=function(){var q=this;this.topToolbar=new V,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 ee=new Ue;ee.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(ee);var oe=[];this.aspectRatios.forEach(function(it){var ct=new Ye(Me.getIcon(it.horizontal,it.vertical),it.horizontal===0&&it.vertical===0?"FREE":it.horizontal+":"+it.vertical);ct.onClick=function(){return q.ratioButtonClicked(it)},oe.push(ct)}),this.aspectRatioButton=new Fe(Me.getIcon(0,0),"Aspect ratio",oe),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,ee.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var fe=new Ye('<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");fe.isActive=this.isGridVisible,fe.onClick=function(){q.isGridVisible=!q.isGridVisible,fe.isActive=q.isGridVisible},ee.addButton(fe);var ie=new Ye('<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(ie.isActive=this.zoomToCropEnabled,ie.onClick=function(){q.zoomToCropEnabled=!q.zoomToCropEnabled,ie.isActive=q.zoomToCropEnabled},ee.addButton(ie),!Y.isLicensed){var le=new de;this.topToolbar.addElementBlock(le);var me=document.createElement("div");me.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var ve=document.createElement("a");ve.style.color="currentColor",ve.href="https://markerjs.com/products/cropro",ve.target="_blank",ve.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>',me.appendChild(ve),le.addElement(me)}var Ae=new Ue;Ae.minWidth=3*this.toolbarHeight+"px",Ae.contentAlign="end",this.topToolbar.addButtonBlock(Ae);var Re=new Ye('<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");Re.onClick=this.startRenderAndClose,Ae.addButton(Re),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Re.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Pe=new Ye('<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");Pe.onClick=this.close,Ae.addButton(Pe),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Pe.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ce.prototype.addBottomToolbar=function(){var q=this;this.bottomToolbar=new V,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 ee=new Ue;ee.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(ee);var oe=new Ye('<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");oe.onClick=this.rotateLeftButtonClicked,ee.addButton(oe);var fe=new Ye('<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");fe.onClick=this.rotateRightButtonClicked,ee.addButton(fe);var ie=new de;ie.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ie),this.straightener=new mt("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(Ae){q.rotateBy(Ae),q.straightener.angle=q.rotationAngle},ie.addElement(this.straightener.getUI());var le=new Ue;le.minWidth=2*this.toolbarHeight+"px",le.contentAlign="end",this.bottomToolbar.addButtonBlock(le);var me=new Ye('<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");me.onClick=this.flipHorizontallyButtonClicked,le.addButton(me);var ve=new Ye('<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");ve.onClick=this.flipVerticallyButtonClicked,le.addButton(ve)},ce.prototype.ratioButtonClicked=function(q){this.aspectRatio=q,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ce.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Me.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ce.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new xe(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ce.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ce.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ce.prototype.restoreState=function(q){if(q){var ee=this.cropLayer.getRescaledRect(q.width,q.height,this.imageWidth,this.imageHeight,q.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(ee),this.cropRectChanged(ee),this.flippedHorizontally=q.flippedHorizontally,this.flippedVertically=q.flippedVertically,this.applyFlip(),this.rotationAngle=q.rotationAngle,this.applyRotation()}},ce.prototype.clientToLocalCoordinates=function(q,ee){var oe=this.cropImage.getBoundingClientRect();return{x:q-oe.left,y:ee-oe.top}},ce.prototype.onWindowResize=function(){this.positionUI()},ce.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var q=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=q+"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()},ce.prototype.rotateLeftButtonClicked=function(){var q=this.rotationAngle-90;this.rotationAngle%90!=0&&(q+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(q)},ce.prototype.rotateRightButtonClicked=function(){var q=this.rotationAngle+90;this.rotationAngle%90!=0&&(q-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(q)},ce.prototype.rotateTo=function(q){q=(q=q>180?q-360:q)<=-180?q+360:q,this.rotationAngle=q,this.applyRotation()},ce.prototype.rotateBy=function(q){this.rotateTo((this.rotationAngle+q)%360)},ce.prototype.applyRotation=function(){var q=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var ee=this.editingTargetRotationContainer.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(ee,0);var oe=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/oe.width,this.imageHeight/oe.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=q},ce.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ce.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ce.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ce.prototype.startRenderAndClose=function(){return Ge(this,void 0,void 0,function(){var q,ee;return _e(this,function(oe){switch(oe.label){case 0:return[4,this.render()];case 1:return q=oe.sent(),ee=this.getState(),this.renderEventListeners.forEach(function(fe){return fe(q,ee)}),this.close(!0),[2]}})})},ce.prototype.render=function(){return Ge(this,void 0,void 0,function(){var q;return _e(this,function(ee){switch(ee.label){case 0:return(q=new ut).naturalSize=this.renderAtNaturalSize,q.imageType=this.renderImageType,q.imageQuality=this.renderImageQuality,q.width=this.renderWidth,q.height=this.renderHeight,this.unzoomFromCrop(),M.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,q.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 ee.sent(),[4,q.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,ee.sent()]}})})},ce.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new te("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 te("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new te("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var q=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new te("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*q)+`px;
|
|
height: `+(this.toolbarHeight-2*q)+`px;
|
|
padding: `+q+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new te("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new te("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new Q("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Q("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new te("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 te("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new te("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 te("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*q)+`px;
|
|
padding: `+q+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new te("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},ce.instanceCounter=0,ce}(),Et=H("8hTe"),At=H.n(Et),Je=/<pre[^>]*>/g;function Kt(ce){var q=document.createElement("div");return q.innerHTML=ce,q.childNodes.length===0?"":q.childNodes[0].nodeValue}var Bt=Ee.a=function(ce){var q=ce.value,ee=q===void 0?"":q,oe=ce.edit,fe=oe===void 0?!1:oe,ie=ce.className,le=ce.showTextOnly,me=ce.showLines,ve=ce.replaces,Ae=ce.zoomImg,Re=ce.hasMask,Pe=ce.style,it=Pe===void 0?{}:Pe,ct=ce.stylesPrev,Ot=ct===void 0?{}:ct,$t=String(ee),bt=Object(I.useRef)(),Ze=Object(I.useRef)(),vn=Object(I.useState)(""),Xe=Object(K.a)(vn,2),bn=Xe[0],mn=Xe[1],Gt=Object(I.useState)("office"),qt=Object(K.a)(Gt,2),gn=qt[0],xn=qt[1],Ln=function(){var Tt=new Pt(Ze.current);Tt.displayMode="popup",Tt.addRenderEventListener(function(){var wt=Object(N.a)(n.a.mark(function gt(dt){var Nt;return n.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return bt.current.style.display="none",Yt.next=3,Object(Ke.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:dt}});case 3:Nt=Yt.sent,Nt!=null&&Nt.id&&ve(Ze.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Nt==null?void 0:Nt.id,"?type=").concat(Nt.content_type));case 5:case"end":return Yt.stop()}},gt)}));return function(gt){return wt.apply(this,arguments)}}()),Tt.show()},Rt=function(){var Tt=new De.a(Ze.current);Tt.settings.displayMode="popup",Tt.addEventListener("render",function(){var wt=Object(N.a)(n.a.mark(function gt(dt){var Nt;return n.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:if(bt.current.style.display="none",!Ze.current){Yt.next=6;break}return Yt.next=4,Object(Ke.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:dt.dataUrl}});case 4:Nt=Yt.sent,Nt!=null&&Nt.id&&ve(Ze.current.getAttribute("src").replace(ne.a.API_SERVER,""),"/api/attachments/".concat(Nt==null?void 0:Nt.id,"?type=").concat(Nt.content_type));case 6:case"end":return Yt.stop()}},gt)}));return function(gt){return wt.apply(this,arguments)}}()),Tt.show(),window.markerArea=Tt},Ve=Object(I.useMemo)(function(){bt.current&&(bt.current.style.zIndex=-1);try{var et=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Tt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,wt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;$t=$t.replace(et,"("+ne.a.API_SERVER+"/api/attachments/").replace(Tt,'"'+ne.a.API_SERVER+"/api/attachments/").replace(wt,'"'+ne.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(Zt){}var gt=j($t),dt=E();if($t.match(/\[TOC\]/)&&(gt=gt.replace("<p>[TOC]</p>",L()),A()),gt=gt.replace(/(__special_katext_id_\d+__)/g,function(Zt,Yt){var Qe=dt[Yt],St=Qe.type,yn=Qe.expression;return Object(he.renderToString)(Kt(yn)||"",{displayMode:St==="block",throwOnError:!1,output:"html"})}),gt=gt.replace(/▁/g,"\u2581\u2581\u2581"),f(),le){var Nt=document.createElement("div");return Nt.innerHTML=gt,Nt.innerText}return setTimeout(function(){return Lt()},500),gt},[$t]),ft=Object(I.useRef)();S.WebkitLineClamp=me,me&&(it=Object(b.a)(Object(b.a)({},it),S));function xt(et){var Tt=et.target;if(Tt.tagName.toUpperCase()==="IMG"){if(Ae){var wt=Tt.getAttribute("src");mn(wt),xn("image")}}else if(Tt.tagName.toUpperCase()==="A"){var gt=Tt.getAttribute("href");if(gt.indexOf("office")>-1)et.preventDefault(),mn(gt),xn("office");else if(gt.indexOf("application/pdf")>-1)et.preventDefault(),mn(gt),xn("pdf");else if(gt.indexOf("text/html")>-1)et.preventDefault(),mn(gt),xn("html");else if(gt.startsWith("#")){et.preventDefault();var dt=document.getElementById(gt.replace("#",""));dt&&dt.scrollIntoView(!0)}}}var Lt=function(){var Tt,wt=(Tt=ft.current)===null||Tt===void 0?void 0:Tt.querySelectorAll("video");wt==null||wt.forEach(function(gt){if(gt.oncontextmenu=function(){return!1},gt.src.indexOf(".m3u8")>-1&&!gt.canPlayType("application/vnd.apple.mpegurl")){if(J.a.isSupported()){var dt=new J.a;dt.loadSource(gt.src),dt.attachMedia(gt)}}})};Object(I.useEffect)(function(){if(ft.current&&Ve&&(Ve.match(Je)&&window.PR.prettyPrint()),ft.current)return ft.current.addEventListener("click",xt),function(){ft.current.removeEventListener("click",xt),f(),A()}},[Ve,ft.current,xt]);var Ct=function(Tt){if(!fe)return;Tt.target.nodeName==="IMG"?(bt.current.style.zIndex=1,bt.current.style.display="flex",bt.current.style.width=Tt.target.clientWidth+"px",bt.current.style.height=Tt.target.clientHeight+"px",bt.current.style.top=Tt.target.offsetTop+"px",bt.current.style.left=Tt.target.offsetLeft+"px",Ze.current.src=Tt.target.getAttribute("src")):bt.current.style.display="none"};return y.a.createElement("div",{style:{position:"relative"}},y.a.createElement("div",{ref:ft,style:Object(b.a)({},it),className:"".concat(ie||""," markdown-body ").concat(At.a.mdBody),onMouseOver:Ct,dangerouslySetInnerHTML:{__html:Ve}}),y.a.createElement("div",{ref:bt,className:At.a.button},y.a.createElement(X.a,null,y.a.createElement(G.a,{onClick:function(){return Ln()}},"\u88C1\u526A"),y.a.createElement(G.a,{onClick:function(){return Rt()}},"\u7F16\u8F91"))),y.a.createElement("img",{ref:Ze,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),y.a.createElement(be.a,{close:!0,data:bn,type:bn!=null&&bn.length?gn:"",style:Object(b.a)({},Ot),onClose:function(){return mn("")}}))}},"9JIy":function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___Hq8-r",flex_space_between:"flex_space_between___3Nl1U",flex_box_vertical_center:"flex_box_vertical_center___1hgum",flex_box_center_end:"flex_box_center_end___i5ldC",flex_box_column:"flex_box_column____1u-K",table:"table___2yPMl"}},"9VGf":function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return k});var ae=H("q1tI"),X=H.n(ae);function k(G,b){var N=Object(ae.useRef)();Object(ae.useEffect)(function(){N.current=G}),Object(ae.useEffect)(function(){function K(){N.current()}if(b!==null){var W=setInterval(K,b);return function(){return clearInterval(W)}}},[b])}},BU3w:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return N});var ae=H("MNnm"),X="rc-util-key";function k(K){if(K.attachTo)return K.attachTo;var W=document.querySelector("head");return W||document.body}function G(K){var W,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ae.a)())return null;var I=document.createElement("style");if((W=n.csp)===null||W===void 0?void 0:W.nonce){var y;I.nonce=(y=n.csp)===null||y===void 0?void 0:y.nonce}I.innerHTML=K;var m=k(n),g=m.firstChild;return n.prepend&&m.prepend?m.prepend(I):n.prepend&&g?m.insertBefore(I,g):m.appendChild(I),I}var b=new Map;function N(K,W){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},I=k(n);if(!b.has(I)){var y=G("",n),m=y.parentNode;b.set(I,m),m.removeChild(y)}var g=Array.from(b.get(I).children).find(function(o){return o.tagName==="STYLE"&&o[X]===W});if(g){var u,c;if(((u=n.csp)===null||u===void 0?void 0:u.nonce)&&g.nonce!==((c=n.csp)===null||c===void 0?void 0:c.nonce)){var p;g.nonce=(p=n.csp)===null||p===void 0?void 0:p.nonce}return g.innerHTML!==K&&(g.innerHTML=K),g}var l=G(K,n);return l[X]=W,l}},Bd2K:function(tt,Ee,H){(function(ae){ae(H("VrN/"),H("osHv"))})(function(ae){ae.defineOption("autoCloseTags",!1,function(n,I,y){if(y!=ae.Init&&y&&n.removeKeyMap("autoCloseTags"),!I)return;var m={name:"autoCloseTags"};(typeof I!="object"||I.whenClosing!==!1)&&(m["'/'"]=function(g){return N(g)}),(typeof I!="object"||I.whenOpening!==!1)&&(m["'>'"]=function(g){return G(g)}),n.addKeyMap(m)});var X=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],k=["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 G(n){if(n.getOption("disableInput"))return ae.Pass;for(var I=n.listSelections(),y=[],m=n.getOption("autoCloseTags"),g=0;g<I.length;g++){if(!I[g].empty())return ae.Pass;var u=I[g].head,c=n.getTokenAt(u),p=ae.innerMode(n.getMode(),c.state),l=p.state,o=p.mode.xmlCurrentTag&&p.mode.xmlCurrentTag(l),s=o&&o.name;if(!s)return ae.Pass;var a=p.mode.configuration=="html",A=typeof m=="object"&&m.dontCloseTags||a&&X,S=typeof m=="object"&&m.indentTags||a&&k;c.end>u.ch&&(s=s.slice(0,s.length-c.end+u.ch));var C=s.toLowerCase();if(!s||c.type=="string"&&(c.end!=u.ch||!/[\"\']/.test(c.string.charAt(c.string.length-1))||c.string.length==1)||c.type=="tag"&&o.close||c.string.indexOf("/")==u.ch-c.start-1||A&&K(A,C)>-1||W(n,p.mode.xmlCurrentContext&&p.mode.xmlCurrentContext(l)||[],s,u,!0))return ae.Pass;var L=typeof m=="object"&&m.emptyTags;if(L&&K(L,s)>-1){y[g]={text:"/>",newPos:ae.Pos(u.line,u.ch+2)};continue}var D=S&&K(S,C)>-1;y[g]={indent:D,text:">"+(D?`
|
|
|
|
`:"")+"</"+s+">",newPos:D?ae.Pos(u.line+1,0):ae.Pos(u.line,u.ch+1)}}for(var O=typeof m=="object"&&m.dontIndentOnAutoClose,g=I.length-1;g>=0;g--){var w=y[g];n.replaceRange(w.text,I[g].head,I[g].anchor,"+insert");var x=n.listSelections().slice(0);x[g]={head:w.newPos,anchor:w.newPos},n.setSelections(x),!O&&w.indent&&(n.indentLine(w.newPos.line,null,!0),n.indentLine(w.newPos.line+1,null,!0))}}function b(n,I){for(var y=n.listSelections(),m=[],g=I?"/":"</",u=n.getOption("autoCloseTags"),c=typeof u=="object"&&u.dontIndentOnSlash,p=0;p<y.length;p++){if(!y[p].empty())return ae.Pass;var l=y[p].head,o=n.getTokenAt(l),s=ae.innerMode(n.getMode(),o.state),a=s.state;if(I&&(o.type=="string"||o.string.charAt(0)!="<"||o.start!=l.ch-1))return ae.Pass;var A,S=s.mode.name!="xml"&&n.getMode().name=="htmlmixed";if(S&&s.mode.name=="javascript")A=g+"script";else if(S&&s.mode.name=="css")A=g+"style";else{var C=s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(a);if(!C||C.length&&W(n,C,C[C.length-1],l))return ae.Pass;A=g+C[C.length-1]}n.getLine(l.line).charAt(o.end)!=">"&&(A+=">"),m[p]=A}if(n.replaceSelections(m),y=n.listSelections(),!c)for(var p=0;p<y.length;p++)(p==y.length-1||y[p].head.line<y[p+1].head.line)&&n.indentLine(y[p].head.line)}function N(n){return n.getOption("disableInput")?ae.Pass:b(n,!0)}ae.commands.closeTag=function(n){return b(n)};function K(n,I){if(n.indexOf)return n.indexOf(I);for(var y=0,m=n.length;y<m;++y)if(n[y]==I)return y;return-1}function W(n,I,y,m,g){if(!ae.scanForClosingTag)return!1;var u=Math.min(n.lastLine()+1,m.line+500),c=ae.scanForClosingTag(n,m,null,u);if(!c||c.tag!=y)return!1;for(var p=g?1:0,l=I.length-1;l>=0&&I[l]==y;l--)++p;m=c.to;for(var l=1;l<p;l++){var o=ae.scanForClosingTag(n,m,null,u);if(!o||o.tag!=y)return!1;m=o.to}return!0}})},BdwD:function(tt,Ee,H){"use strict";var ae=H("+L6B"),X=H("2/Rp"),k=H("0Owb"),G=H("k1fw"),b=H("q1tI"),N=H.n(b),K=H("FOrL"),W=H.n(K),n=function(y){var m=y.buttonProps,g=m===void 0?{}:m,u=y.styles,c=u===void 0?{}:u,p=y.imgStyles,l=p===void 0?{}:p,o=y.customText,s=y.ButtonText,a=y.ButtonClick,A=y.Buttonclass,S=y.ButtonTwo;return N.a.createElement("section",{className:"tc animated fadeIn",style:Object(G.a)(Object(G.a)({},{color:"#999",margin:"0 auto",padding:"100px 0"}),c)},N.a.createElement("img",{src:W.a,style:Object(G.a)(Object(G.a)({},{width:"200px",height:"150px"}),l)}),N.a.createElement("p",{className:"mt10 font14"},o||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),s&&N.a.createElement(X.a,Object(k.a)({className:A,onClick:a},g),s),S&&S)};Ee.a=n},BjJ7:function(tt,Ee,H){"use strict";H.d(Ee,"d",function(){return X}),H.d(Ee,"c",function(){return k}),H.d(Ee,"e",function(){return G}),H.d(Ee,"b",function(){return b}),H.d(Ee,"a",function(){return K});var ae=H("m3rI");function X(W){var n=!0;if(W.length>0){for(var I=0;I<W.length;I++)if(W[I].compile_success==0||!W[I].compile_success){n=!1;break}}else n=!1;return n}function k(W){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",I=[],y=0;y<W.length;y++){var m=W[y],g=n?"".concat(n,"/").concat(m.name):"".concat(m.name);I.push({title:m.name,isLeaf:!(m.type==="tree"),key:g})}return I}function G(W,n,I){for(var y=0;y<W.length;y++){var m=W[y];if(m.key===n){m.children=I;break}m.children&&G(m.children,n,I)}return W}function b(W,n,I){var y;return function(){var m=this,g=arguments,u=function(){y=null,I||W.apply(m,g)},c=I&&!y;clearTimeout(y),y=setTimeout(u,n),c&&W.apply(m,g)}}var N=!0,K=ae.a.API_SERVER},Bq7L:function(tt,Ee){tt.exports="data:image/png;base64,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"},"C+DQ":function(tt,Ee,H){},"C/vA":function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return ae});function ae(X){const k=this;let G=!1,b;return function(){return G||(G=!0,b=X.apply(k,arguments)),b}}},"Cg/j":function(tt,Ee,H){"use strict";H.d(Ee,"b",function(){return ae}),H.d(Ee,"a",function(){return X}),H.d(Ee,"c",function(){return G}),H.d(Ee,"d",function(){return b});var ae;(function(N){N.serviceIds=new Map,N.DI_TARGET="$di$target",N.DI_DEPENDENCIES="$di$dependencies";function K(W){return W[N.DI_DEPENDENCIES]||[]}N.getServiceDependencies=K})(ae||(ae={}));const X=G("instantiationService");function k(N,K,W,n){K[ae.DI_TARGET]===K?K[ae.DI_DEPENDENCIES].push({id:N,index:W,optional:n}):(K[ae.DI_DEPENDENCIES]=[{id:N,index:W,optional:n}],K[ae.DI_TARGET]=K)}function G(N){if(ae.serviceIds.has(N))return ae.serviceIds.get(N);const K=function(W,n,I){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");k(K,W,I,!1)};return K.toString=()=>N,ae.serviceIds.set(N,K),K}function b(N){return function(K,W,n){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");k(N,K,n,!0)}}},DlQD:function(tt,Ee,H){(function(ae,X){tt.exports=X()})(this,function(){"use strict";function ae(ee,oe){for(var fe=0;fe<oe.length;fe++){var ie=oe[fe];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(ee,ie.key,ie)}}function X(ee,oe,fe){return oe&&ae(ee.prototype,oe),fe&&ae(ee,fe),ee}function k(ee,oe){if(!ee)return;if(typeof ee=="string")return G(ee,oe);var fe=Object.prototype.toString.call(ee).slice(8,-1);if(fe==="Object"&&ee.constructor&&(fe=ee.constructor.name),fe==="Map"||fe==="Set")return Array.from(ee);if(fe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fe))return G(ee,oe)}function G(ee,oe){(oe==null||oe>ee.length)&&(oe=ee.length);for(var fe=0,ie=new Array(oe);fe<oe;fe++)ie[fe]=ee[fe];return ie}function b(ee,oe){var fe;if(typeof Symbol=="undefined"||ee[Symbol.iterator]==null){if(Array.isArray(ee)||(fe=k(ee))||oe&&ee&&typeof ee.length=="number"){fe&&(ee=fe);var ie=0;return function(){return ie>=ee.length?{done:!0}:{done:!1,value:ee[ie++]}}}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 fe=ee[Symbol.iterator](),fe.next.bind(fe)}function N(ee,oe){return oe={exports:{}},ee(oe,oe.exports),oe.exports}var K=N(function(ee){function oe(){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 fe(ie){ee.exports.defaults=ie}ee.exports={defaults:oe(),getDefaults:oe,changeDefaults:fe}}),W=K.defaults,n=K.getDefaults,I=K.changeDefaults,y=/[&<>"']/,m=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,c={"&":"&","<":"<",">":">",'"':""","'":"'"},p=function(oe){return c[oe]};function l(ee,oe){if(oe){if(y.test(ee))return ee.replace(m,p)}else if(g.test(ee))return ee.replace(u,p);return ee}var o=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(ee){return ee.replace(o,function(oe,fe){return fe=fe.toLowerCase(),fe==="colon"?":":fe.charAt(0)==="#"?fe.charAt(1)==="x"?String.fromCharCode(parseInt(fe.substring(2),16)):String.fromCharCode(+fe.substring(1)):""})}var a=/(^|[^\[])\^/g;function A(ee,oe){ee=ee.source||ee,oe=oe||"";var fe={replace:function(le,me){return me=me.source||me,me=me.replace(a,"$1"),ee=ee.replace(le,me),fe},getRegex:function(){return new RegExp(ee,oe)}};return fe}var S=/[^\w:]/g,C=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(ee,oe,fe){if(ee){var ie;try{ie=decodeURIComponent(s(fe)).replace(S,"").toLowerCase()}catch(le){return null}if(ie.indexOf("javascript:")===0||ie.indexOf("vbscript:")===0||ie.indexOf("data:")===0)return null}oe&&!C.test(fe)&&(fe=d(oe,fe));try{fe=encodeURI(fe).replace(/%25/g,"%")}catch(le){return null}return fe}var D={},O=/^[^:]+:\/*[^/]*$/,w=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function d(ee,oe){D[" "+ee]||(O.test(ee)?D[" "+ee]=ee+"/":D[" "+ee]=T(ee,"/",!0)),ee=D[" "+ee];var fe=ee.indexOf(":")===-1;return oe.substring(0,2)==="//"?fe?oe:ee.replace(w,"$1")+oe:oe.charAt(0)==="/"?fe?oe:ee.replace(x,"$1")+oe:ee+oe}var E={exec:function(){}};function f(ee){for(var oe=1,fe,ie;oe<arguments.length;oe++){fe=arguments[oe];for(ie in fe)Object.prototype.hasOwnProperty.call(fe,ie)&&(ee[ie]=fe[ie])}return ee}function v(ee,oe){var fe=ee.replace(/\|/g,function(me,ve,Ae){for(var Re=!1,Pe=ve;--Pe>=0&&Ae[Pe]==="\\";)Re=!Re;return Re?"|":" |"}),ie=fe.split(/ \|/),le=0;if(ie.length>oe)ie.splice(oe);else for(;ie.length<oe;)ie.push("");for(;le<ie.length;le++)ie[le]=ie[le].trim().replace(/\\\|/g,"|");return ie}function T(ee,oe,fe){var ie=ee.length;if(ie===0)return"";for(var le=0;le<ie;){var me=ee.charAt(ie-le-1);if(me===oe&&!fe)le++;else if(me!==oe&&fe)le++;else break}return ee.substr(0,ie-le)}function B(ee,oe){if(ee.indexOf(oe[1])===-1)return-1;for(var fe=ee.length,ie=0,le=0;le<fe;le++)if(ee[le]==="\\")le++;else if(ee[le]===oe[0])ie++;else if(ee[le]===oe[1]&&(ie--,ie<0))return le;return-1}function R(ee){ee&&ee.sanitize&&!ee.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 j={escape:l,unescape:s,edit:A,cleanUrl:L,resolveUrl:d,noopTest:E,merge:f,splitCells:v,rtrim:T,findClosingBracket:B,checkSanitizeDeprecation:R},U=K.defaults,_=j.rtrim,J=j.splitCells,ne=j.escape,he=j.findClosingBracket;function be(ee,oe,fe){var ie=oe.href,le=oe.title?ne(oe.title):null,me=ee[1].replace(/\\([\[\]])/g,"$1");return ee[0].charAt(0)!=="!"?{type:"link",raw:fe,href:ie,title:le,text:me}:{type:"image",raw:fe,href:ie,title:le,text:ne(me)}}function Ke(ee,oe){var fe=ee.match(/^(\s+)(?:```)/);if(fe===null)return oe;var ie=fe[1];return oe.split(`
|
|
`).map(function(le){var me=le.match(/^\s+/);if(me===null)return le;var ve=me[0];return ve.length>=ie.length?le.slice(ie.length):le}).join(`
|
|
`)}var De=function(){function ee(fe){this.options=fe||U}var oe=ee.prototype;return oe.space=function(ie){var le=this.rules.block.newline.exec(ie);if(le)return le[0].length>1?{type:"space",raw:le[0]}:{raw:`
|
|
`}},oe.code=function(ie,le){var me=this.rules.block.code.exec(ie);if(me){var ve=le[le.length-1];if(ve&&ve.type==="paragraph")return{raw:me[0],text:me[0].trimRight()};var Ae=me[0].replace(/^ {4}/gm,"");return{type:"code",raw:me[0],codeBlockStyle:"indented",text:this.options.pedantic?Ae:_(Ae,`
|
|
`)}}},oe.fences=function(ie){var le=this.rules.block.fences.exec(ie);if(le){var me=le[0],ve=Ke(me,le[3]||"");return{type:"code",raw:me,lang:le[2]?le[2].trim():le[2],text:ve}}},oe.heading=function(ie){var le=this.rules.block.heading.exec(ie);if(le)return{type:"heading",raw:le[0],depth:le[1].length,text:le[2]}},oe.nptable=function(ie){var le=this.rules.block.nptable.exec(ie);if(le){var me={type:"table",header:J(le[1].replace(/^ *| *\| *$/g,"")),align:le[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:le[3]?le[3].replace(/\n$/,"").split(`
|
|
`):[],raw:le[0]};if(me.header.length===me.align.length){var ve=me.align.length,Ae;for(Ae=0;Ae<ve;Ae++)/^ *-+: *$/.test(me.align[Ae])?me.align[Ae]="right":/^ *:-+: *$/.test(me.align[Ae])?me.align[Ae]="center":/^ *:-+ *$/.test(me.align[Ae])?me.align[Ae]="left":me.align[Ae]=null;for(ve=me.cells.length,Ae=0;Ae<ve;Ae++)me.cells[Ae]=J(me.cells[Ae],me.header.length);return me}}},oe.hr=function(ie){var le=this.rules.block.hr.exec(ie);if(le)return{type:"hr",raw:le[0]}},oe.blockquote=function(ie){var le=this.rules.block.blockquote.exec(ie);if(le){var me=le[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:le[0],text:me}}},oe.list=function(ie){var le=this.rules.block.list.exec(ie);if(le){for(var me=le[0],ve=le[2],Ae=ve.length>1,Re=ve[ve.length-1]===")",Pe={type:"list",raw:me,ordered:Ae,start:Ae?+ve.slice(0,-1):"",loose:!1,items:[]},it=le[0].match(this.rules.block.item),ct=!1,Ot,$t,bt,Ze,vn,Xe,bn,mn=it.length,Gt=0;Gt<mn;Gt++)Ot=it[Gt],me=Ot,$t=Ot.length,Ot=Ot.replace(/^ *([*+-]|\d+[.)]) */,""),~Ot.indexOf(`
|
|
`)&&($t-=Ot.length,Ot=this.options.pedantic?Ot.replace(/^ {1,4}/gm,""):Ot.replace(new RegExp("^ {1,"+$t+"}","gm"),"")),Gt!==mn-1&&(bt=this.rules.block.bullet.exec(it[Gt+1])[0],(Ae?bt.length===1||!Re&&bt[bt.length-1]===")":bt.length>1||this.options.smartLists&&bt!==ve)&&(Ze=it.slice(Gt+1).join(`
|
|
`),Pe.raw=Pe.raw.substring(0,Pe.raw.length-Ze.length),Gt=mn-1)),vn=ct||/\n\n(?!\s*$)/.test(Ot),Gt!==mn-1&&(ct=Ot.charAt(Ot.length-1)===`
|
|
`,vn||(vn=ct)),vn&&(Pe.loose=!0),Xe=/^\[[ xX]\] /.test(Ot),bn=void 0,Xe&&(bn=Ot[1]!==" ",Ot=Ot.replace(/^\[[ xX]\] +/,"")),Pe.items.push({type:"list_item",raw:me,task:Xe,checked:bn,loose:vn,text:Ot});return Pe}},oe.html=function(ie){var le=this.rules.block.html.exec(ie);if(le)return{type:this.options.sanitize?"paragraph":"html",raw:le[0],pre:!this.options.sanitizer&&(le[1]==="pre"||le[1]==="script"||le[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(le[0]):ne(le[0]):le[0]}},oe.def=function(ie){var le=this.rules.block.def.exec(ie);if(le){le[3]&&(le[3]=le[3].substring(1,le[3].length-1));var me=le[1].toLowerCase().replace(/\s+/g," ");return{tag:me,raw:le[0],href:le[2],title:le[3]}}},oe.table=function(ie){var le=this.rules.block.table.exec(ie);if(le){var me={type:"table",header:J(le[1].replace(/^ *| *\| *$/g,"")),align:le[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:le[3]?le[3].replace(/\n$/,"").split(`
|
|
`):[]};if(me.header.length===me.align.length){me.raw=le[0];var ve=me.align.length,Ae;for(Ae=0;Ae<ve;Ae++)/^ *-+: *$/.test(me.align[Ae])?me.align[Ae]="right":/^ *:-+: *$/.test(me.align[Ae])?me.align[Ae]="center":/^ *:-+ *$/.test(me.align[Ae])?me.align[Ae]="left":me.align[Ae]=null;for(ve=me.cells.length,Ae=0;Ae<ve;Ae++)me.cells[Ae]=J(me.cells[Ae].replace(/^ *\| *| *\| *$/g,""),me.header.length);return me}}},oe.lheading=function(ie){var le=this.rules.block.lheading.exec(ie);if(le)return{type:"heading",raw:le[0],depth:le[2].charAt(0)==="="?1:2,text:le[1]}},oe.paragraph=function(ie){var le=this.rules.block.paragraph.exec(ie);if(le)return{type:"paragraph",raw:le[0],text:le[1].charAt(le[1].length-1)===`
|
|
`?le[1].slice(0,-1):le[1]}},oe.text=function(ie,le){var me=this.rules.block.text.exec(ie);if(me){var ve=le[le.length-1];return ve&&ve.type==="text"?{raw:me[0],text:me[0]}:{type:"text",raw:me[0],text:me[0]}}},oe.escape=function(ie){var le=this.rules.inline.escape.exec(ie);if(le)return{type:"escape",raw:le[0],text:ne(le[1])}},oe.tag=function(ie,le,me){var ve=this.rules.inline.tag.exec(ie);if(ve)return!le&&/^<a /i.test(ve[0])?le=!0:le&&/^<\/a>/i.test(ve[0])&&(le=!1),!me&&/^<(pre|code|kbd|script)(\s|>)/i.test(ve[0])?me=!0:me&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ve[0])&&(me=!1),{type:this.options.sanitize?"text":"html",raw:ve[0],inLink:le,inRawBlock:me,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):ne(ve[0]):ve[0]}},oe.link=function(ie){var le=this.rules.inline.link.exec(ie);if(le){var me=he(le[2],"()");if(me>-1){var ve=le[0].indexOf("!")===0?5:4,Ae=ve+le[1].length+me;le[2]=le[2].substring(0,me),le[0]=le[0].substring(0,Ae).trim(),le[3]=""}var Re=le[2],Pe="";if(this.options.pedantic){var it=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Re);it?(Re=it[1],Pe=it[3]):Pe=""}else Pe=le[3]?le[3].slice(1,-1):"";Re=Re.trim().replace(/^<([\s\S]*)>$/,"$1");var ct=be(le,{href:Re&&Re.replace(this.rules.inline._escapes,"$1"),title:Pe&&Pe.replace(this.rules.inline._escapes,"$1")},le[0]);return ct}},oe.reflink=function(ie,le){var me;if((me=this.rules.inline.reflink.exec(ie))||(me=this.rules.inline.nolink.exec(ie))){var ve=(me[2]||me[1]).replace(/\s+/g," ");if(ve=le[ve.toLowerCase()],!ve||!ve.href){var Ae=me[0].charAt(0);return{type:"text",raw:Ae,text:Ae}}var Re=be(me,ve,me[0]);return Re}},oe.strong=function(ie,le,me){me===void 0&&(me="");var ve=this.rules.inline.strong.start.exec(ie);if(ve&&(!ve[1]||ve[1]&&(me===""||this.rules.inline.punctuation.exec(me)))){le=le.slice(-1*ie.length);var Ae=ve[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ae.lastIndex=0;for(var Re;(ve=Ae.exec(le))!=null;)if(Re=this.rules.inline.strong.middle.exec(le.slice(0,ve.index+3)),Re)return{type:"strong",raw:ie.slice(0,Re[0].length),text:ie.slice(2,Re[0].length-2)}}},oe.em=function(ie,le,me){me===void 0&&(me="");var ve=this.rules.inline.em.start.exec(ie);if(ve&&(!ve[1]||ve[1]&&(me===""||this.rules.inline.punctuation.exec(me)))){le=le.slice(-1*ie.length);var Ae=ve[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ae.lastIndex=0;for(var Re;(ve=Ae.exec(le))!=null;)if(Re=this.rules.inline.em.middle.exec(le.slice(0,ve.index+2)),Re)return{type:"em",raw:ie.slice(0,Re[0].length),text:ie.slice(1,Re[0].length-1)}}},oe.codespan=function(ie){var le=this.rules.inline.code.exec(ie);if(le){var me=le[2].replace(/\n/g," "),ve=/[^ ]/.test(me),Ae=me.startsWith(" ")&&me.endsWith(" ");return ve&&Ae&&(me=me.substring(1,me.length-1)),me=ne(me,!0),{type:"codespan",raw:le[0],text:me}}},oe.br=function(ie){var le=this.rules.inline.br.exec(ie);if(le)return{type:"br",raw:le[0]}},oe.del=function(ie){var le=this.rules.inline.del.exec(ie);if(le)return{type:"del",raw:le[0],text:le[1]}},oe.autolink=function(ie,le){var me=this.rules.inline.autolink.exec(ie);if(me){var ve,Ae;return me[2]==="@"?(ve=ne(this.options.mangle?le(me[1]):me[1]),Ae="mailto:"+ve):(ve=ne(me[1]),Ae=ve),{type:"link",raw:me[0],text:ve,href:Ae,tokens:[{type:"text",raw:ve,text:ve}]}}},oe.url=function(ie,le){var me;if(me=this.rules.inline.url.exec(ie)){var ve,Ae;if(me[2]==="@")ve=ne(this.options.mangle?le(me[0]):me[0]),Ae="mailto:"+ve;else{var Re;do Re=me[0],me[0]=this.rules.inline._backpedal.exec(me[0])[0];while(Re!==me[0]);ve=ne(me[0]),me[1]==="www."?Ae="http://"+ve:Ae=ve}return{type:"link",raw:me[0],text:ve,href:Ae,tokens:[{type:"text",raw:ve,text:ve}]}}},oe.inlineText=function(ie,le,me){var ve=this.rules.inline.text.exec(ie);if(ve){var Ae;return le?Ae=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):ne(ve[0]):ve[0]:Ae=ne(this.options.smartypants?me(ve[0]):ve[0]),{type:"text",raw:ve[0],text:Ae}}},ee}(),je=j.noopTest,Be=j.edit,Ge=j.merge,_e={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:je,table:je,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};_e._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_e._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,_e.def=Be(_e.def).replace("label",_e._label).replace("title",_e._title).getRegex(),_e.bullet=/(?:[*+-]|\d{1,9}[.)])/,_e.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,_e.item=Be(_e.item,"gm").replace(/bull/g,_e.bullet).getRegex(),_e.list=Be(_e.list).replace(/bull/g,_e.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+_e.def.source+")").getRegex(),_e._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",_e._comment=/<!--(?!-?>)[\s\S]*?-->/,_e.html=Be(_e.html,"i").replace("comment",_e._comment).replace("tag",_e._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_e.paragraph=Be(_e._paragraph).replace("hr",_e.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",_e._tag).getRegex(),_e.blockquote=Be(_e.blockquote).replace("paragraph",_e.paragraph).getRegex(),_e.normal=Ge({},_e),_e.gfm=Ge({},_e.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*|$)"}),_e.gfm.nptable=Be(_e.gfm.nptable).replace("hr",_e.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",_e._tag).getRegex(),_e.gfm.table=Be(_e.gfm.table).replace("hr",_e.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",_e._tag).getRegex(),_e.pedantic=Ge({},_e.normal,{html:Be(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_e._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:je,paragraph:Be(_e.normal._paragraph).replace("hr",_e.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",_e.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Y={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:je,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:je,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Y._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Y.punctuation=Be(Y.punctuation).replace(/punctuation/g,Y._punctuation).getRegex(),Y._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Y._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Y.em.start=Be(Y.em.start).replace(/punctuation/g,Y._punctuation).getRegex(),Y.em.middle=Be(Y.em.middle).replace(/punctuation/g,Y._punctuation).replace(/overlapSkip/g,Y._overlapSkip).getRegex(),Y.em.endAst=Be(Y.em.endAst,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.em.endUnd=Be(Y.em.endUnd,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.strong.start=Be(Y.strong.start).replace(/punctuation/g,Y._punctuation).getRegex(),Y.strong.middle=Be(Y.strong.middle).replace(/punctuation/g,Y._punctuation).replace(/blockSkip/g,Y._blockSkip).getRegex(),Y.strong.endAst=Be(Y.strong.endAst,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.strong.endUnd=Be(Y.strong.endUnd,"g").replace(/punctuation/g,Y._punctuation).getRegex(),Y.blockSkip=Be(Y._blockSkip,"g").getRegex(),Y.overlapSkip=Be(Y._overlapSkip,"g").getRegex(),Y._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Y._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Y._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])?)+(?![-_])/,Y.autolink=Be(Y.autolink).replace("scheme",Y._scheme).replace("email",Y._email).getRegex(),Y._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Y.tag=Be(Y.tag).replace("comment",_e._comment).replace("attribute",Y._attribute).getRegex(),Y._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Y._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Y._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Y.link=Be(Y.link).replace("label",Y._label).replace("href",Y._href).replace("title",Y._title).getRegex(),Y.reflink=Be(Y.reflink).replace("label",Y._label).getRegex(),Y.reflinkSearch=Be(Y.reflinkSearch,"g").replace("reflink",Y.reflink).replace("nolink",Y.nolink).getRegex(),Y.normal=Ge({},Y),Y.pedantic=Ge({},Y.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:Be(/^!?\[(label)\]\((.*?)\)/).replace("label",Y._label).getRegex(),reflink:Be(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y._label).getRegex()}),Y.gfm=Ge({},Y.normal,{escape:Be(Y.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),Y.gfm.url=Be(Y.gfm.url,"i").replace("email",Y.gfm._extended_email).getRegex(),Y.breaks=Ge({},Y.gfm,{br:Be(Y.br).replace("{2,}","*").getRegex(),text:Be(Y.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var M={block:_e,inline:Y},F=K.defaults,Q=M.block,te=M.inline;function V(ee){return ee.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 ge(ee){var oe="",fe,ie,le=ee.length;for(fe=0;fe<le;fe++)ie=ee.charCodeAt(fe),Math.random()>.5&&(ie="x"+ie.toString(16)),oe+="&#"+ie+";";return oe}var Ue=function(){function ee(fe){this.tokens=[],this.tokens.links=Object.create(null),this.options=fe||F,this.options.tokenizer=this.options.tokenizer||new De,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ie={block:Q.normal,inline:te.normal};this.options.pedantic?(ie.block=Q.pedantic,ie.inline=te.pedantic):this.options.gfm&&(ie.block=Q.gfm,this.options.breaks?ie.inline=te.breaks:ie.inline=te.gfm),this.tokenizer.rules=ie}ee.lex=function(ie,le){var me=new ee(le);return me.lex(ie)};var oe=ee.prototype;return oe.lex=function(ie){return ie=ie.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(ie,this.tokens,!0),this.inline(this.tokens),this.tokens},oe.blockTokens=function(ie,le,me){le===void 0&&(le=[]),me===void 0&&(me=!0),ie=ie.replace(/^ +$/gm,"");for(var ve,Ae,Re,Pe;ie;){if(ve=this.tokenizer.space(ie)){ie=ie.substring(ve.raw.length),ve.type&&le.push(ve);continue}if(ve=this.tokenizer.code(ie,le)){ie=ie.substring(ve.raw.length),ve.type?le.push(ve):(Pe=le[le.length-1],Pe.raw+=`
|
|
`+ve.raw,Pe.text+=`
|
|
`+ve.text);continue}if(ve=this.tokenizer.fences(ie)){ie=ie.substring(ve.raw.length),le.push(ve);continue}if(ve=this.tokenizer.heading(ie)){ie=ie.substring(ve.raw.length),le.push(ve);continue}if(ve=this.tokenizer.nptable(ie)){ie=ie.substring(ve.raw.length),le.push(ve);continue}if(ve=this.tokenizer.hr(ie)){ie=ie.substring(ve.raw.length),le.push(ve);continue}if(ve=this.tokenizer.blockquote(ie)){ie=ie.substring(ve.raw.length),ve.tokens=this.blockTokens(ve.text,[],me),le.push(ve);continue}if(ve=this.tokenizer.list(ie)){for(ie=ie.substring(ve.raw.length),Re=ve.items.length,Ae=0;Ae<Re;Ae++)ve.items[Ae].tokens=this.blockTokens(ve.items[Ae].text,[],!1);le.push(ve);continue}if(ve=this.tokenizer.html(ie)){ie=ie.substring(ve.raw.length),le.push(ve);continue}if(me&&(ve=this.tokenizer.def(ie))){ie=ie.substring(ve.raw.length),this.tokens.links[ve.tag]||(this.tokens.links[ve.tag]={href:ve.href,title:ve.title});continue}if(ve=this.tokenizer.table(ie)){ie=ie.substring(ve.raw.length),le.push(ve);continue}if(ve=this.tokenizer.lheading(ie)){ie=ie.substring(ve.raw.length),le.push(ve);continue}if(me&&(ve=this.tokenizer.paragraph(ie))){ie=ie.substring(ve.raw.length),le.push(ve);continue}if(ve=this.tokenizer.text(ie,le)){ie=ie.substring(ve.raw.length),ve.type?le.push(ve):(Pe=le[le.length-1],Pe.raw+=`
|
|
`+ve.raw,Pe.text+=`
|
|
`+ve.text);continue}if(ie){var it="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(it);break}else throw new Error(it)}}return le},oe.inline=function(ie){var le,me,ve,Ae,Re,Pe,it=ie.length;for(le=0;le<it;le++){Pe=ie[le];switch(Pe.type){case"paragraph":case"text":case"heading":{Pe.tokens=[],this.inlineTokens(Pe.text,Pe.tokens);break}case"table":{for(Pe.tokens={header:[],cells:[]},Ae=Pe.header.length,me=0;me<Ae;me++)Pe.tokens.header[me]=[],this.inlineTokens(Pe.header[me],Pe.tokens.header[me]);for(Ae=Pe.cells.length,me=0;me<Ae;me++)for(Re=Pe.cells[me],Pe.tokens.cells[me]=[],ve=0;ve<Re.length;ve++)Pe.tokens.cells[me][ve]=[],this.inlineTokens(Re[ve],Pe.tokens.cells[me][ve]);break}case"blockquote":{this.inline(Pe.tokens);break}case"list":{for(Ae=Pe.items.length,me=0;me<Ae;me++)this.inline(Pe.items[me].tokens);break}}}return ie},oe.inlineTokens=function(ie,le,me,ve,Ae){le===void 0&&(le=[]),me===void 0&&(me=!1),ve===void 0&&(ve=!1),Ae===void 0&&(Ae="");var Re,Pe=ie,it;if(this.tokens.links){var ct=Object.keys(this.tokens.links);if(ct.length>0)for(;(it=this.tokenizer.rules.inline.reflinkSearch.exec(Pe))!=null;)ct.includes(it[0].slice(it[0].lastIndexOf("[")+1,-1))&&(Pe=Pe.slice(0,it.index)+"["+"a".repeat(it[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(it=this.tokenizer.rules.inline.blockSkip.exec(Pe))!=null;)Pe=Pe.slice(0,it.index)+"["+"a".repeat(it[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ie;){if(Re=this.tokenizer.escape(ie)){ie=ie.substring(Re.raw.length),le.push(Re);continue}if(Re=this.tokenizer.tag(ie,me,ve)){ie=ie.substring(Re.raw.length),me=Re.inLink,ve=Re.inRawBlock,le.push(Re);continue}if(Re=this.tokenizer.link(ie)){ie=ie.substring(Re.raw.length),Re.type==="link"&&(Re.tokens=this.inlineTokens(Re.text,[],!0,ve)),le.push(Re);continue}if(Re=this.tokenizer.reflink(ie,this.tokens.links)){ie=ie.substring(Re.raw.length),Re.type==="link"&&(Re.tokens=this.inlineTokens(Re.text,[],!0,ve)),le.push(Re);continue}if(Re=this.tokenizer.strong(ie,Pe,Ae)){ie=ie.substring(Re.raw.length),Re.tokens=this.inlineTokens(Re.text,[],me,ve),le.push(Re);continue}if(Re=this.tokenizer.em(ie,Pe,Ae)){ie=ie.substring(Re.raw.length),Re.tokens=this.inlineTokens(Re.text,[],me,ve),le.push(Re);continue}if(Re=this.tokenizer.codespan(ie)){ie=ie.substring(Re.raw.length),le.push(Re);continue}if(Re=this.tokenizer.br(ie)){ie=ie.substring(Re.raw.length),le.push(Re);continue}if(Re=this.tokenizer.del(ie)){ie=ie.substring(Re.raw.length),Re.tokens=this.inlineTokens(Re.text,[],me,ve),le.push(Re);continue}if(Re=this.tokenizer.autolink(ie,ge)){ie=ie.substring(Re.raw.length),le.push(Re);continue}if(!me&&(Re=this.tokenizer.url(ie,ge))){ie=ie.substring(Re.raw.length),le.push(Re);continue}if(Re=this.tokenizer.inlineText(ie,ve,V)){ie=ie.substring(Re.raw.length),Ae=Re.raw.slice(-1),le.push(Re);continue}if(ie){var Ot="Infinite loop on byte: "+ie.charCodeAt(0);if(this.options.silent){console.error(Ot);break}else throw new Error(Ot)}}return le},X(ee,null,[{key:"rules",get:function(){return{block:Q,inline:te}}}]),ee}(),Ye=K.defaults,de=j.cleanUrl,xe=j.escape,Me=function(){function ee(fe){this.options=fe||Ye}var oe=ee.prototype;return oe.code=function(ie,le,me){var ve=(le||"").match(/\S*/)[0];if(this.options.highlight){var Ae=this.options.highlight(ie,ve);Ae!=null&&Ae!==ie&&(me=!0,ie=Ae)}return ve?'<pre><code class="'+this.options.langPrefix+xe(ve,!0)+'">'+(me?ie:xe(ie,!0))+`</code></pre>
|
|
`:"<pre><code>"+(me?ie:xe(ie,!0))+`</code></pre>
|
|
`},oe.blockquote=function(ie){return`<blockquote>
|
|
`+ie+`</blockquote>
|
|
`},oe.html=function(ie){return ie},oe.heading=function(ie,le,me,ve){return this.options.headerIds?"<h"+le+' id="'+this.options.headerPrefix+ve.slug(me)+'">'+ie+"</h"+le+`>
|
|
`:"<h"+le+">"+ie+"</h"+le+`>
|
|
`},oe.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},oe.list=function(ie,le,me){var ve=le?"ol":"ul",Ae=le&&me!==1?' start="'+me+'"':"";return"<"+ve+Ae+`>
|
|
`+ie+"</"+ve+`>
|
|
`},oe.listitem=function(ie){return"<li>"+ie+`</li>
|
|
`},oe.checkbox=function(ie){return"<input "+(ie?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},oe.paragraph=function(ie){return"<p>"+ie+`</p>
|
|
`},oe.table=function(ie,le){return le&&(le="<tbody>"+le+"</tbody>"),`<table>
|
|
<thead>
|
|
`+ie+`</thead>
|
|
`+le+`</table>
|
|
`},oe.tablerow=function(ie){return`<tr>
|
|
`+ie+`</tr>
|
|
`},oe.tablecell=function(ie,le){var me=le.header?"th":"td",ve=le.align?"<"+me+' align="'+le.align+'">':"<"+me+">";return ve+ie+"</"+me+`>
|
|
`},oe.strong=function(ie){return"<strong>"+ie+"</strong>"},oe.em=function(ie){return"<em>"+ie+"</em>"},oe.codespan=function(ie){return"<code>"+ie+"</code>"},oe.br=function(){return this.options.xhtml?"<br/>":"<br>"},oe.del=function(ie){return"<del>"+ie+"</del>"},oe.link=function(ie,le,me){if(ie=de(this.options.sanitize,this.options.baseUrl,ie),ie===null)return me;var ve='<a href="'+xe(ie)+'"';return le&&(ve+=' title="'+le+'"'),ve+=">"+me+"</a>",ve},oe.image=function(ie,le,me){if(ie=de(this.options.sanitize,this.options.baseUrl,ie),ie===null)return me;var ve='<img src="'+ie+'" alt="'+me+'"';return le&&(ve+=' title="'+le+'"'),ve+=this.options.xhtml?"/>":">",ve},oe.text=function(ie){return ie},ee}(),Fe=function(){function ee(){}var oe=ee.prototype;return oe.strong=function(ie){return ie},oe.em=function(ie){return ie},oe.codespan=function(ie){return ie},oe.del=function(ie){return ie},oe.html=function(ie){return ie},oe.text=function(ie){return ie},oe.link=function(ie,le,me){return""+me},oe.image=function(ie,le,me){return""+me},oe.br=function(){return""},ee}(),$e=function(){function ee(){this.seen={}}var oe=ee.prototype;return oe.slug=function(ie){var le=ie.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(le)){var me=le;do this.seen[me]++,le=me+"-"+this.seen[me];while(this.seen.hasOwnProperty(le))}return this.seen[le]=0,le},ee}(),st=K.defaults,mt=j.unescape,ut=function(){function ee(fe){this.options=fe||st,this.options.renderer=this.options.renderer||new Me,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Fe,this.slugger=new $e}ee.parse=function(ie,le){var me=new ee(le);return me.parse(ie)};var oe=ee.prototype;return oe.parse=function(ie,le){le===void 0&&(le=!0);var me="",ve,Ae,Re,Pe,it,ct,Ot,$t,bt,Ze,vn,Xe,bn,mn,Gt,qt,gn,xn,Ln=ie.length;for(ve=0;ve<Ln;ve++){Ze=ie[ve];switch(Ze.type){case"space":continue;case"hr":{me+=this.renderer.hr();continue}case"heading":{me+=this.renderer.heading(this.parseInline(Ze.tokens),Ze.depth,mt(this.parseInline(Ze.tokens,this.textRenderer)),this.slugger);continue}case"code":{me+=this.renderer.code(Ze.text,Ze.lang,Ze.escaped);continue}case"table":{for($t="",Ot="",Pe=Ze.header.length,Ae=0;Ae<Pe;Ae++)Ot+=this.renderer.tablecell(this.parseInline(Ze.tokens.header[Ae]),{header:!0,align:Ze.align[Ae]});for($t+=this.renderer.tablerow(Ot),bt="",Pe=Ze.cells.length,Ae=0;Ae<Pe;Ae++){for(ct=Ze.tokens.cells[Ae],Ot="",it=ct.length,Re=0;Re<it;Re++)Ot+=this.renderer.tablecell(this.parseInline(ct[Re]),{header:!1,align:Ze.align[Re]});bt+=this.renderer.tablerow(Ot)}me+=this.renderer.table($t,bt);continue}case"blockquote":{bt=this.parse(Ze.tokens),me+=this.renderer.blockquote(bt);continue}case"list":{for(vn=Ze.ordered,Xe=Ze.start,bn=Ze.loose,Pe=Ze.items.length,bt="",Ae=0;Ae<Pe;Ae++)Gt=Ze.items[Ae],qt=Gt.checked,gn=Gt.task,mn="",Gt.task&&(xn=this.renderer.checkbox(qt),bn?Gt.tokens.length>0&&Gt.tokens[0].type==="text"?(Gt.tokens[0].text=xn+" "+Gt.tokens[0].text,Gt.tokens[0].tokens&&Gt.tokens[0].tokens.length>0&&Gt.tokens[0].tokens[0].type==="text"&&(Gt.tokens[0].tokens[0].text=xn+" "+Gt.tokens[0].tokens[0].text)):Gt.tokens.unshift({type:"text",text:xn}):mn+=xn),mn+=this.parse(Gt.tokens,bn),bt+=this.renderer.listitem(mn,gn,qt);me+=this.renderer.list(bt,vn,Xe);continue}case"html":{me+=this.renderer.html(Ze.text);continue}case"paragraph":{me+=this.renderer.paragraph(this.parseInline(Ze.tokens));continue}case"text":{for(bt=Ze.tokens?this.parseInline(Ze.tokens):Ze.text;ve+1<Ln&&ie[ve+1].type==="text";)Ze=ie[++ve],bt+=`
|
|
`+(Ze.tokens?this.parseInline(Ze.tokens):Ze.text);me+=le?this.renderer.paragraph(bt):bt;continue}default:{var Rt='Token with "'+Ze.type+'" type was not found.';if(this.options.silent){console.error(Rt);return}else throw new Error(Rt)}}}return me},oe.parseInline=function(ie,le){le=le||this.renderer;var me="",ve,Ae,Re=ie.length;for(ve=0;ve<Re;ve++){Ae=ie[ve];switch(Ae.type){case"escape":{me+=le.text(Ae.text);break}case"html":{me+=le.html(Ae.text);break}case"link":{me+=le.link(Ae.href,Ae.title,this.parseInline(Ae.tokens,le));break}case"image":{me+=le.image(Ae.href,Ae.title,Ae.text);break}case"strong":{me+=le.strong(this.parseInline(Ae.tokens,le));break}case"em":{me+=le.em(this.parseInline(Ae.tokens,le));break}case"codespan":{me+=le.codespan(Ae.text);break}case"br":{me+=le.br();break}case"del":{me+=le.del(this.parseInline(Ae.tokens,le));break}case"text":{me+=le.text(Ae.text);break}default:{var Pe='Token with "'+Ae.type+'" type was not found.';if(this.options.silent){console.error(Pe);return}else throw new Error(Pe)}}}return me},ee}(),Pt=j.merge,Et=j.checkSanitizeDeprecation,At=j.escape,Je=K.getDefaults,Kt=K.changeDefaults,Bt=K.defaults;function ce(ee,oe,fe){if(typeof ee=="undefined"||ee===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ee!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ee)+", string expected");if(typeof oe=="function"&&(fe=oe,oe=null),oe=Pt({},ce.defaults,oe||{}),Et(oe),fe){var ie=oe.highlight,le;try{le=Ue.lex(ee,oe)}catch(Re){return fe(Re)}var me=function(Pe){var it;if(!Pe)try{it=ut.parse(le,oe)}catch(ct){Pe=ct}return oe.highlight=ie,Pe?fe(Pe):fe(null,it)};if(!ie||ie.length<3)return me();if(delete oe.highlight,!le.length)return me();var ve=0;ce.walkTokens(le,function(Re){Re.type==="code"&&(ve++,setTimeout(function(){ie(Re.text,Re.lang,function(Pe,it){if(Pe)return me(Pe);it!=null&&it!==Re.text&&(Re.text=it,Re.escaped=!0),ve--,ve===0&&me()})},0))}),ve===0&&me();return}try{var Ae=Ue.lex(ee,oe);return oe.walkTokens&&ce.walkTokens(Ae,oe.walkTokens),ut.parse(Ae,oe)}catch(Re){if(Re.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,oe.silent)return"<p>An error occurred:</p><pre>"+At(Re.message+"",!0)+"</pre>";throw Re}}ce.options=ce.setOptions=function(ee){return Pt(ce.defaults,ee),Kt(ce.defaults),ce},ce.getDefaults=Je,ce.defaults=Bt,ce.use=function(ee){var oe=Pt({},ee);if(ee.renderer&&function(){var ie=ce.defaults.renderer||new Me,le=function(Ae){var Re=ie[Ae];ie[Ae]=function(){for(var Pe=arguments.length,it=new Array(Pe),ct=0;ct<Pe;ct++)it[ct]=arguments[ct];var Ot=ee.renderer[Ae].apply(ie,it);return Ot===!1&&(Ot=Re.apply(ie,it)),Ot}};for(var me in ee.renderer)le(me);oe.renderer=ie}(),ee.tokenizer&&function(){var ie=ce.defaults.tokenizer||new De,le=function(Ae){var Re=ie[Ae];ie[Ae]=function(){for(var Pe=arguments.length,it=new Array(Pe),ct=0;ct<Pe;ct++)it[ct]=arguments[ct];var Ot=ee.tokenizer[Ae].apply(ie,it);return Ot===!1&&(Ot=Re.apply(ie,it)),Ot}};for(var me in ee.tokenizer)le(me);oe.tokenizer=ie}(),ee.walkTokens){var fe=ce.defaults.walkTokens;oe.walkTokens=function(ie){ee.walkTokens(ie),fe&&fe(ie)}}ce.setOptions(oe)},ce.walkTokens=function(ee,oe){for(var fe=b(ee),ie;!(ie=fe()).done;){var le=ie.value;oe(le);switch(le.type){case"table":{for(var me=b(le.tokens.header),ve;!(ve=me()).done;){var Ae=ve.value;ce.walkTokens(Ae,oe)}for(var Re=b(le.tokens.cells),Pe;!(Pe=Re()).done;)for(var it=Pe.value,ct=b(it),Ot;!(Ot=ct()).done;){var $t=Ot.value;ce.walkTokens($t,oe)}break}case"list":{ce.walkTokens(le.items,oe);break}default:le.tokens&&ce.walkTokens(le.tokens,oe)}}},ce.Parser=ut,ce.parser=ut.parse,ce.Renderer=Me,ce.TextRenderer=Fe,ce.Lexer=Ue,ce.lexer=Ue.lex,ce.Tokenizer=De,ce.Slugger=$e,ce.parse=ce;var q=ce;return q})},ELLl:function(tt,Ee,H){(function(ae){ae(H("VrN/"))})(function(ae){var X={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},k=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(c,p,l){l&&l!=ae.Init&&(c.removeKeyMap(b),c.state.closeBrackets=null),p&&(N(G(p,"pairs")),c.state.closeBrackets=p,c.addKeyMap(b))});function G(c,p){return p=="pairs"&&typeof c=="string"?c:typeof c=="object"&&c[p]!=null?c[p]:X[p]}var b={Backspace:n,Enter:I};function N(c){for(var p=0;p<c.length;p++){var l=c.charAt(p),o="'"+l+"'";b[o]||(b[o]=K(l))}}N(X.pairs+"`");function K(c){return function(p){return m(p,c)}}function W(c){var p=c.state.closeBrackets;if(!p||p.override)return p;var l=c.getModeAt(c.getCursor());return l.closeBrackets||p}function n(c){var p=W(c);if(!p||c.getOption("disableInput"))return ae.Pass;for(var l=G(p,"pairs"),o=c.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return ae.Pass;var a=g(c,o[s].head);if(!a||l.indexOf(a)%2!=0)return ae.Pass}for(var s=o.length-1;s>=0;s--){var A=o[s].head;c.replaceRange("",k(A.line,A.ch-1),k(A.line,A.ch+1),"+delete")}}function I(c){var p=W(c),l=p&&G(p,"explode");if(!l||c.getOption("disableInput"))return ae.Pass;for(var o=c.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return ae.Pass;var a=g(c,o[s].head);if(!a||l.indexOf(a)%2!=0)return ae.Pass}c.operation(function(){var A=c.lineSeparator()||`
|
|
`;c.replaceSelection(A+A,null),c.execCommand("goCharLeft"),o=c.listSelections();for(var S=0;S<o.length;S++){var C=o[S].head.line;c.indentLine(C,null,!0),c.indentLine(C+1,null,!0)}})}function y(c){var p=ae.cmpPos(c.anchor,c.head)>0;return{anchor:new k(c.anchor.line,c.anchor.ch+(p?-1:1)),head:new k(c.head.line,c.head.ch+(p?1:-1))}}function m(c,p){var l=W(c);if(!l||c.getOption("disableInput"))return ae.Pass;var o=G(l,"pairs"),s=o.indexOf(p);if(s==-1)return ae.Pass;for(var a=G(l,"closeBefore"),A=G(l,"triples"),S=o.charAt(s+1)==p,C=c.listSelections(),L=s%2==0,D,O=0;O<C.length;O++){var w=C[O],x=w.head,d,E=c.getRange(x,k(x.line,x.ch+1));if(L&&!w.empty())d="surround";else if((S||!L)&&E==p)S&&u(c,x)?d="both":A.indexOf(p)>=0&&c.getRange(x,k(x.line,x.ch+3))==p+p+p?d="skipThree":d="skip";else if(S&&x.ch>1&&A.indexOf(p)>=0&&c.getRange(k(x.line,x.ch-2),x)==p+p){if(x.ch>2&&/\bstring/.test(c.getTokenTypeAt(k(x.line,x.ch-2))))return ae.Pass;d="addFour"}else if(S){var f=x.ch==0?" ":c.getRange(k(x.line,x.ch-1),x);if(!ae.isWordChar(E)&&f!=p&&!ae.isWordChar(f))d="both";else return ae.Pass}else if(L&&(E.length===0||/\s/.test(E)||a.indexOf(E)>-1))d="both";else return ae.Pass;if(!D)D=d;else if(D!=d)return ae.Pass}var v=s%2?o.charAt(s-1):p,T=s%2?p:o.charAt(s+1);c.operation(function(){if(D=="skip")c.execCommand("goCharRight");else if(D=="skipThree")for(var B=0;B<3;B++)c.execCommand("goCharRight");else if(D=="surround"){for(var R=c.getSelections(),B=0;B<R.length;B++)R[B]=v+R[B]+T;c.replaceSelections(R,"around"),R=c.listSelections().slice();for(var B=0;B<R.length;B++)R[B]=y(R[B]);c.setSelections(R)}else D=="both"?(c.replaceSelection(v+T,null),c.triggerElectric(v+T),c.execCommand("goCharLeft")):D=="addFour"&&(c.replaceSelection(v+v+v+v,"before"),c.execCommand("goCharRight"))})}function g(c,p){var l=c.getRange(k(p.line,p.ch-1),k(p.line,p.ch+1));return l.length==2?l:null}function u(c,p){var l=c.getTokenAt(k(p.line,p.ch+1));return/\bstring/.test(l.type)&&l.start==p.ch&&(p.ch==0||!/\bstring/.test(c.getTokenTypeAt(p)))}})},FOrL:function(tt,Ee,H){tt.exports=H.p+"static/nodata.a6b3f948.png"},FWmy:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return ae});function ae(X,k){if(!X)throw new Error(k?`Assertion failed (${k})`:"Assertion Failed")}},Fhpe:function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___1W7Bl",flex_space_between:"flex_space_between___3S4Sp",flex_box_vertical_center:"flex_box_vertical_center___5mGEA",flex_box_center_end:"flex_box_center_end___1blqp",flex_box_column:"flex_box_column___4i1E0",CustomCss:"CustomCss___3thFA",CustomTipsModalCss:"CustomTipsModalCss___2aNwC",dropdownmenus:"dropdownmenus___19dGk",popupClassNames:"popupClassNames___3LOFQ",selectdown:"selectdown___1_utH"}},HmJG:function(tt,Ee,H){},JAbv:function(tt,Ee){tt.exports="data:image/png;base64,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"},JYp7:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return ae});var ae;(function(X){function k(a){return a&&typeof a=="object"&&typeof a[Symbol.iterator]=="function"}X.is=k;const G=Object.freeze([]);function b(){return G}X.empty=b;function*N(a){yield a}X.single=N;function K(a){return a||G}X.from=K;function W(a){return!a||a[Symbol.iterator]().next().done===!0}X.isEmpty=W;function n(a){return a[Symbol.iterator]().next().value}X.first=n;function I(a,A){for(const S of a)if(A(S))return!0;return!1}X.some=I;function y(a,A){for(const S of a)if(A(S))return S;return}X.find=y;function*m(a,A){for(const S of a)A(S)&&(yield S)}X.filter=m;function*g(a,A){let S=0;for(const C of a)yield A(C,S++)}X.map=g;function*u(...a){for(const A of a)for(const S of A)yield S}X.concat=u;function*c(a){for(const A of a)for(const S of A)yield S}X.concatNested=c;function p(a,A,S){let C=S;for(const L of a)C=A(C,L);return C}X.reduce=p;function*l(a,A,S=a.length){for(A<0&&(A+=a.length),S<0?S+=a.length:S>a.length&&(S=a.length);A<S;A++)yield a[A]}X.slice=l;function o(a,A=Number.POSITIVE_INFINITY){const S=[];if(A===0)return[S,a];const C=a[Symbol.iterator]();for(let L=0;L<A;L++){const D=C.next();if(D.done)return[S,X.empty()];S.push(D.value)}return[S,{[Symbol.iterator](){return C}}]}X.consume=o;function s(a,A,S=(C,L)=>C===L){const C=a[Symbol.iterator](),L=A[Symbol.iterator]();for(;;){const D=C.next(),O=L.next();if(D.done!==O.done)return!1;if(D.done)return!0;if(!S(D.value,O.value))return!1}}X.equals=s})(ae||(ae={}))},KOXS:function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___4BHX-",flex_space_between:"flex_space_between___fH2oM",flex_box_vertical_center:"flex_box_vertical_center___TgSS9",flex_box_center_end:"flex_box_center_end___1vKaD",flex_box_column:"flex_box_column___1kCgI",input:"input___2mV-b",dropdown:"dropdown___1QKW2",menu:"menu___37CBn",text:"text___159fF",b1:"b1___2uGyF",b2:"b2___2DXw1"}},LdHM:function(tt,Ee,H){"use strict";H.d(Ee,"b",function(){return a}),H.d(Ee,"a",function(){return S});var ae=H("1OyB"),X=H("vuIU"),k=H("Ji7U"),G=H("LK+K"),b=H("q1tI"),N=H("rePB"),K=H("Ff2n"),W=H("ODXe"),n=H("4IlW"),I=H("bX4T"),y=H("YrtM"),m=H("TSYQ"),g=H.n(m),u=H("+nKL"),c=H("8OUc"),p=function(J,ne){var he=J.prefixCls,be=J.id,Ke=J.flattenOptions,De=J.childrenAsData,je=J.values,Be=J.searchValue,Ge=J.multiple,_e=J.defaultActiveFirstOption,Y=J.height,M=J.itemHeight,F=J.notFoundContent,Q=J.open,te=J.menuItemSelectedIcon,V=J.virtual,ge=J.onSelect,Ue=J.onToggleOpen,Ye=J.onActiveValue,de=J.onScroll,xe=J.onMouseEnter,Me="".concat(he,"-item"),Fe=Object(y.a)(function(){return Ke},[Q,Ke],function(q,ee){return ee[0]&&q[1]!==ee[1]}),$e=b.useRef(null),st=function(ee){ee.preventDefault()},mt=function(ee){$e.current&&$e.current.scrollTo({index:ee})},ut=function(ee){for(var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,fe=Fe.length,ie=0;ie<fe;ie+=1){var le=(ee+ie*oe+fe)%fe,me=Fe[le],ve=me.group,Ae=me.data;if(!ve&&!Ae.disabled)return le}return-1},Pt=b.useState(function(){return ut(0)}),Et=Object(W.a)(Pt,2),At=Et[0],Je=Et[1],Kt=function(ee){Je(ee);var oe=Fe[ee];if(!oe){Ye(null,-1);return}Ye(oe.data.value,ee)};b.useEffect(function(){Kt(_e!==!1?ut(0):-1)},[Fe.length,Be]),b.useEffect(function(){var q=setTimeout(function(){if(!Ge&&Q&&je.size===1){var ee=Array.from(je)[0],oe=Fe.findIndex(function(fe){var ie=fe.data;return ie.value===ee});Kt(oe),mt(oe)}});return function(){return clearTimeout(q)}},[Q]);var Bt=function(ee){ee!==void 0&&ge(ee,{selected:!je.has(ee)}),Ge||Ue(!1)};if(b.useImperativeHandle(ne,function(){return{onKeyDown:function(ee){var oe=ee.which;switch(oe){case n.a.UP:case n.a.DOWN:{var fe=0;if(oe===n.a.UP?fe=-1:oe===n.a.DOWN&&(fe=1),fe!==0){var ie=ut(At+fe,fe);mt(ie),Kt(ie)}break}case n.a.ENTER:{var le=Fe[At];le&&!le.data.disabled?Bt(le.data.value):Bt(void 0),Q&&ee.preventDefault();break}case n.a.ESC:Ue(!1)}},onKeyUp:function(){},scrollTo:function(ee){mt(ee)}}}),Fe.length===0)return b.createElement("div",{role:"listbox",id:"".concat(be,"_list"),className:"".concat(Me,"-empty"),onMouseDown:st},F);function ce(q){var ee=Fe[q];if(!ee)return null;var oe=ee.data||{},fe=oe.value,ie=oe.label,le=oe.children,me=Object(I.a)(oe,!0),ve=De?le:ie;return ee?b.createElement("div",Object.assign({"aria-label":typeof ve=="string"?ve:null},me,{key:q,role:"option",id:"".concat(be,"_list_").concat(q),"aria-selected":je.has(fe)}),fe):null}return b.createElement(b.Fragment,null,b.createElement("div",{role:"listbox",id:"".concat(be,"_list"),style:{height:0,width:0,overflow:"hidden"}},ce(At-1),ce(At),ce(At+1)),b.createElement(u.a,{itemKey:"key",ref:$e,data:Fe,height:Y,itemHeight:M,fullHeight:!1,onMouseDown:st,onScroll:de,virtual:V,onMouseEnter:xe},function(q,ee){var oe,fe=q.group,ie=q.groupOption,le=q.data,me=le.label,ve=le.key;if(fe)return b.createElement("div",{className:g()(Me,"".concat(Me,"-group"))},me!==void 0?me:ve);var Ae=le.disabled,Re=le.value,Pe=le.title,it=le.children,ct=le.style,Ot=le.className,$t=Object(K.a)(le,["disabled","value","title","children","style","className"]),bt=je.has(Re),Ze="".concat(Me,"-option"),vn=g()(Me,Ze,Ot,(oe={},Object(N.a)(oe,"".concat(Ze,"-grouped"),ie),Object(N.a)(oe,"".concat(Ze,"-active"),At===ee&&!Ae),Object(N.a)(oe,"".concat(Ze,"-disabled"),Ae),Object(N.a)(oe,"".concat(Ze,"-selected"),bt),oe)),Xe=De?it:me,bn=!te||typeof te=="function"||bt;return b.createElement("div",Object.assign({},$t,{"aria-selected":bt,className:vn,title:Pe,onMouseMove:function(){if(At===ee||Ae)return;Kt(ee)},onClick:function(){Ae||Bt(Re)},style:ct}),b.createElement("div",{className:"".concat(Ze,"-content")},Xe||Re),b.isValidElement(te)||bt,bn&&b.createElement(c.a,{className:"".concat(Me,"-option-state"),customizeIcon:te,customizeIconProps:{isSelected:bt}},bt?"\u2713":null))}))},l=b.forwardRef(p);l.displayName="OptionList";var o=l,s=function(){return null};s.isSelectOption=!0;var a=s,A=function(){return null};A.isSelectOptGroup=!0;var S=A,C=H("VTBJ"),L=H("Zm9Q");function D(_){var J=_.key,ne=_.props,he=ne.children,be=ne.value,Ke=Object(K.a)(ne,["children","value"]);return Object(C.a)({key:J,value:be!==void 0?be:J,children:he},Ke)}function O(_){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(_).map(function(ne,he){if(!b.isValidElement(ne)||!ne.type)return null;var be=ne.type.isSelectOptGroup,Ke=ne.key,De=ne.props,je=De.children,Be=Object(K.a)(De,["children"]);return J||!be?D(ne):Object(C.a)(Object(C.a)({key:"__RC_SELECT_GRP__".concat(Ke===null?he:Ke,"__"),label:Ke},Be),{},{options:O(je)})}).filter(function(ne){return ne})}var w=H("2Qr1"),x=H("qNPg"),d=H("U8pU"),E=H("Kwbf"),f=H("WKfj");function v(_){var J=_.mode,ne=_.options,he=_.children,be=_.backfill,Ke=_.allowClear,De=_.placeholder,je=_.getInputElement,Be=_.showSearch,Ge=_.onSearch,_e=_.defaultOpen,Y=_.autoFocus,M=_.labelInValue,F=_.value,Q=_.inputValue,te=_.optionLabelProp,V=J==="multiple"||J==="tags",ge=Be!==void 0?Be:V||J==="combobox",Ue=ne||O(he);if(Object(E.a)(J!=="tags"||Ue.every(function(Me){return!Me.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),J==="tags"||J==="combobox"){var Ye=Ue.some(function(Me){return Me.options?Me.options.some(function(Fe){return typeof("value"in Fe?Fe.value:Fe.key)=="number"}):typeof("value"in Me?Me.value:Me.key)=="number"});Object(E.a)(!Ye,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(E.a)(J!=="combobox"||!te,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(E.a)(J==="combobox"||!be,"`backfill` only works with `combobox` mode."),Object(E.a)(J==="combobox"||!je,"`getInputElement` only work with `combobox` mode."),Object(E.b)(J!=="combobox"||!je||!Ke||!De,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ge&&!ge&&J!=="combobox"&&J!=="tags"&&Object(E.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(E.b)(!_e||Y,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),F!=null){var de=Object(f.d)(F);Object(E.a)(!M||de.every(function(Me){return Object(d.a)(Me)==="object"&&("key"in Me||"value"in Me)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(E.a)(!V||Array.isArray(F),"`value` should be array when `mode` is `multiple` or `tags`")}if(he){var xe=null;Object(L.a)(he).some(function(Me){if(!b.isValidElement(Me)||!Me.type)return!1;var Fe=Me.type;if(Fe.isSelectOption)return!1;if(Fe.isSelectOptGroup){var $e=Object(L.a)(Me.props.children).every(function(st){return!b.isValidElement(st)||!Me.type||st.type.isSelectOption?!0:(xe=st.type,!1)});return!$e}return xe=Fe,!0}),xe&&Object(E.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(xe.displayName||xe.name||xe,"`.")),Object(E.a)(Q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var T=v,B=Object(x.a)({prefixCls:"rc-select",components:{optionList:o},convertChildrenToData:O,flattenOptions:w.d,getLabeledValue:w.e,filterOptions:w.b,isValueDisabled:w.g,findValueOption:w.c,warningProps:T,fillOptionsWithMissingValue:w.a}),R=function(_){Object(k.a)(ne,_);var J=Object(G.a)(ne);function ne(){var he;return Object(ae.a)(this,ne),he=J.apply(this,arguments),he.selectRef=b.createRef(),he.focus=function(){he.selectRef.current.focus()},he.blur=function(){he.selectRef.current.blur()},he}return Object(X.a)(ne,[{key:"render",value:function(){return b.createElement(B,Object.assign({ref:this.selectRef},this.props))}}]),ne}(b.Component);R.Option=a,R.OptGroup=S;var j=R,U=Ee.c=j},M8RZ:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return n});var ae=H("fWQN"),X=H("mtLc"),k=H("yKVA"),G=H("879j"),b=H("q1tI"),N=H.n(b),K=H("i8i4"),W=H.n(K),n=function(I){Object(k.a)(m,I);var y=Object(G.a)(m);function m(g){var u;Object(ae.a)(this,m),u=y.call(this,g);var c=window.document;return u.node=c.createElement("div"),c.body.appendChild(u.node),u}return Object(X.a)(m,[{key:"render",value:function(){var u=this.props.children;return Object(K.createPortal)(u,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),m}(N.a.Component)},MEgm:function(tt,Ee){tt.exports="data:image/png;base64,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"},MI8n:function(tt,Ee,H){"use strict";H.d(Ee,"c",function(){return b}),H.d(Ee,"b",function(){return n}),H.d(Ee,"e",function(){return I}),H.d(Ee,"a",function(){return y}),H.d(Ee,"d",function(){return m}),H.d(Ee,"f",function(){return g});var ae=H("/cxE"),X=H("pmY6"),k=H("24hK"),G=H("5Y4S"),b;(function(u){u.None=()=>X.a.None;function c(v){return(T,B=null,R)=>{let j=!1,U;return U=v(_=>j?void 0:(U?U.dispose():j=!0,T.call(B,_)),null,R),j&&U.dispose(),U}}u.once=c;function p(v,T){return S((B,R=null,j)=>v(U=>B.call(R,T(U)),null,j))}u.map=p;function l(v,T){return S((B,R=null,j)=>v(U=>{T(U),B.call(R,U)},null,j))}u.forEach=l;function o(v,T){return S((B,R=null,j)=>v(U=>T(U)&&B.call(R,U),null,j))}u.filter=o;function s(v){return v}u.signal=s;function a(...v){return(T,B=null,R)=>Object(X.e)(...v.map(j=>j(U=>T.call(B,U),null,R)))}u.any=a;function A(v,T,B){let R=B;return p(v,j=>(R=T(R,j),R))}u.reduce=A;function S(v){let T;const B=new n({onFirstListenerAdd(){T=v(B.fire,B)},onLastListenerRemove(){T.dispose()}});return B.event}function C(v,T,B=100,R=!1,j){let U,_,J,ne=0;const he=new n({leakWarningThreshold:j,onFirstListenerAdd(){U=v(be=>{ne++,_=T(_,be),R&&!J&&(he.fire(_),_=void 0),clearTimeout(J),J=setTimeout(()=>{const Ke=_;_=void 0,J=void 0,(!R||ne>1)&&he.fire(Ke),ne=0},B)})},onLastListenerRemove(){U.dispose()}});return he.event}u.debounce=C;function L(v,T=(B,R)=>B===R){let B=!0,R;return o(v,j=>{const U=B||!T(j,R);return B=!1,R=j,U})}u.latch=L;function D(v,T){return[u.filter(v,T),u.filter(v,B=>!T(B))]}u.split=D;function O(v,T=!1,B=[]){let R=B.slice(),j=v(J=>{R?R.push(J):_.fire(J)});const U=()=>{R&&R.forEach(J=>_.fire(J)),R=null},_=new n({onFirstListenerAdd(){j||(j=v(J=>_.fire(J)))},onFirstListenerDidAdd(){R&&(T?setTimeout(U):U())},onLastListenerRemove(){j&&j.dispose(),j=null}});return _.event}u.buffer=O;class w{constructor(v){this.event=v}map(v){return new w(p(this.event,v))}forEach(v){return new w(l(this.event,v))}filter(v){return new w(o(this.event,v))}reduce(v,T){return new w(A(this.event,v,T))}latch(){return new w(L(this.event))}debounce(v,T=100,B=!1,R){return new w(C(this.event,v,T,B,R))}on(v,T,B){return this.event(v,T,B)}once(v,T,B){return c(this.event)(v,T,B)}}function x(v){return new w(v)}u.chain=x;function d(v,T,B=R=>R){const R=(...J)=>_.fire(B(...J)),j=()=>v.on(T,R),U=()=>v.removeListener(T,R),_=new n({onFirstListenerAdd:j,onLastListenerRemove:U});return _.event}u.fromNodeEventEmitter=d;function E(v,T,B=R=>R){const R=(...J)=>_.fire(B(...J)),j=()=>v.addEventListener(T,R),U=()=>v.removeEventListener(T,R),_=new n({onFirstListenerAdd:j,onLastListenerRemove:U});return _.event}u.fromDOMEventEmitter=E;function f(v){return new Promise(T=>c(v)(T))}u.toPromise=f})(b||(b={}));class N{constructor(u){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${u}_${N._idPool++}`}start(u){this._stopWatch=new G.a(!0),this._listenerCount=u}stop(){if(this._stopWatch){const u=this._stopWatch.elapsed();this._elapsedOverall+=u,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${u.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}N._idPool=0;let K=-1;class W{constructor(u,c=Math.random().toString(18).slice(2,5)){this.customThreshold=u,this.name=c,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(u){let c=K;if(typeof this.customThreshold=="number"&&(c=this.customThreshold),c<=0||u<c)return;this._stacks||(this._stacks=new Map);const p=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),l=this._stacks.get(p)||0;if(this._stacks.set(p,l+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=c*.5;let o,s=0;for(const[a,A]of this._stacks)(!o||s<A)&&(o=a,s=A);console.warn(`[${this.name}] potential listener LEAK detected, having ${u} listeners already. MOST frequent listener (${s}):`),console.warn(o)}return()=>{const o=this._stacks.get(p)||0;this._stacks.set(p,o-1)}}}class n{constructor(u){var c;this._disposed=!1,this._options=u,this._leakageMon=K>0?new W(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((c=this._options)===null||c===void 0?void 0:c._profName)?new N(this._options._profName):void 0}get event(){return this._event||(this._event=(u,c,p)=>{var l;this._listeners||(this._listeners=new k.a);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(c?[u,c]:u);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,u,c);const a=(l=this._leakageMon)===null||l===void 0?void 0:l.check(this._listeners.size),A=Object(X.i)(()=>{if(a&&a(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const S=this._listeners&&!this._listeners.isEmpty();S||this._options.onLastListenerRemove(this)}});return p instanceof X.b?p.add(A):Array.isArray(p)&&p.push(A),A}),this._event}fire(u){var c,p;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new k.a);for(let l of this._listeners)this._deliveryQueue.push([l,u]);for((c=this._perfMon)===null||c===void 0||c.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[l,o]=this._deliveryQueue.shift();try{typeof l=="function"?l.call(void 0,o):l[0].call(l[1],o)}catch(s){Object(ae.f)(s)}}(p=this._perfMon)===null||p===void 0||p.stop()}}dispose(){var u,c,p,l,o;this._disposed||(this._disposed=!0,(u=this._listeners)===null||u===void 0||u.clear(),(c=this._deliveryQueue)===null||c===void 0||c.clear(),(l=(p=this._options)===null||p===void 0?void 0:p.onLastListenerRemove)===null||l===void 0||l.call(p),(o=this._leakageMon)===null||o===void 0||o.dispose())}}class I extends n{constructor(u){super(u);this._isPaused=0,this._eventQueue=new k.a,this._mergeFn=u==null?void 0:u.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const u=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(u))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(u){this._listeners&&(this._isPaused!==0?this._eventQueue.push(u):super.fire(u))}}class y extends I{constructor(u){var c;super(u);this._delay=(c=u.delay)!==null&&c!==void 0?c:100}fire(u){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(u)}}class m{constructor(){this.buffers=[]}wrapEvent(u){return(c,p,l)=>u(o=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>c.call(p,o)):c.call(p,o)},void 0,l)}bufferEvents(u){const c=[];this.buffers.push(c);const p=u();return this.buffers.pop(),c.forEach(l=>l()),p}}class g{constructor(){this.listening=!1,this.inputEvent=b.None,this.inputEventListener=X.a.None,this.emitter=new n({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(u){this.inputEvent=u,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=u(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(tt,Ee,H){"use strict";(function(ae,X){H.d(Ee,"b",function(){return p}),H.d(Ee,"i",function(){return a}),H.d(Ee,"f",function(){return A}),H.d(Ee,"d",function(){return S}),H.d(Ee,"g",function(){return C}),H.d(Ee,"h",function(){return L}),H.d(Ee,"c",function(){return D}),H.d(Ee,"k",function(){return O}),H.d(Ee,"j",function(){return w}),H.d(Ee,"a",function(){return x}),H.d(Ee,"e",function(){return f});var k;const G="en";let b=!1,N=!1,K=!1,W=!1,n=!1,I=!1,y=!1,m,g=G,u,c;const p=typeof self=="object"?self:typeof ae=="object"?ae:{};let l;typeof p.vscode!="undefined"&&typeof p.vscode.process!="undefined"?l=p.vscode.process:typeof X!="undefined"&&(l=X);const o=typeof((k=l==null?void 0:l.versions)===null||k===void 0?void 0:k.electron)=="string"&&l.type==="renderer";if(typeof navigator=="object"&&!o)c=navigator.userAgent,b=c.indexOf("Windows")>=0,N=c.indexOf("Macintosh")>=0,y=(c.indexOf("Macintosh")>=0||c.indexOf("iPad")>=0||c.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,K=c.indexOf("Linux")>=0,I=!0,m=navigator.language,g=m;else if(typeof l=="object"){b=l.platform==="win32",N=l.platform==="darwin",K=l.platform==="linux",W=K&&!!l.env.SNAP&&!!l.env.SNAP_REVISION,m=G,g=G;const v=l.env.VSCODE_NLS_CONFIG;if(v)try{const T=JSON.parse(v),B=T.availableLanguages["*"];m=T.locale,g=B||G,u=T._translationsConfigFile}catch(T){}n=!0}else console.error("Unable to resolve platform.");let s=0;N?s=1:b?s=3:K&&(s=2);const a=b,A=N,S=K,C=n,L=I,D=y,O=c,w=function(){if(p.setImmediate)return p.setImmediate.bind(p);if(typeof p.postMessage=="function"&&!p.importScripts){let B=[];p.addEventListener("message",j=>{if(j.data&&j.data.vscodeSetImmediateId)for(let U=0,_=B.length;U<_;U++){const J=B[U];if(J.id===j.data.vscodeSetImmediateId){B.splice(U,1),J.callback();return}}});let R=0;return j=>{const U=++R;B.push({id:U,callback:j}),p.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(l==null?void 0:l.nextTick)=="function")return l.nextTick.bind(l);const T=Promise.resolve();return B=>T.then(B)}(),x=N||y?2:b?1:3;let d=!0,E=!1;function f(){if(!E){E=!0;const v=new Uint8Array(2);v[0]=1,v[1]=2;const T=new Uint16Array(v.buffer);d=T[0]===(2<<8)+1}return d}}).call(this,H("IyRk"),H("Q2Ig"))},N0LK:function(tt,Ee,H){"use strict";H.d(Ee,"C",function(){return ae}),H.d(Ee,"v",function(){return k}),H.d(Ee,"s",function(){return G}),H.d(Ee,"t",function(){return b}),H.d(Ee,"U",function(){return N}),H.d(Ee,"J",function(){return K}),H.d(Ee,"O",function(){return W}),H.d(Ee,"p",function(){return n}),H.d(Ee,"T",function(){return I}),H.d(Ee,"q",function(){return y}),H.d(Ee,"N",function(){return m}),H.d(Ee,"M",function(){return g}),H.d(Ee,"Q",function(){return u}),H.d(Ee,"u",function(){return c}),H.d(Ee,"x",function(){return p}),H.d(Ee,"I",function(){return l}),H.d(Ee,"f",function(){return o}),H.d(Ee,"h",function(){return s}),H.d(Ee,"g",function(){return a}),H.d(Ee,"i",function(){return A}),H.d(Ee,"G",function(){return S}),H.d(Ee,"H",function(){return C}),H.d(Ee,"r",function(){return L}),H.d(Ee,"R",function(){return D}),H.d(Ee,"d",function(){return O}),H.d(Ee,"e",function(){return w}),H.d(Ee,"E",function(){return x}),H.d(Ee,"F",function(){return d}),H.d(Ee,"j",function(){return E}),H.d(Ee,"z",function(){return f}),H.d(Ee,"K",function(){return T}),H.d(Ee,"L",function(){return B}),H.d(Ee,"m",function(){return j}),H.d(Ee,"k",function(){return _}),H.d(Ee,"A",function(){return ne}),H.d(Ee,"a",function(){return he}),H.d(Ee,"n",function(){return be}),H.d(Ee,"l",function(){return Ke}),H.d(Ee,"D",function(){return De}),H.d(Ee,"B",function(){return je}),H.d(Ee,"b",function(){return Be}),H.d(Ee,"S",function(){return Ge}),H.d(Ee,"o",function(){return _e}),H.d(Ee,"P",function(){return Y}),H.d(Ee,"w",function(){return M}),H.d(Ee,"c",function(){return F}),H.d(Ee,"y",function(){return V});function ae(de){return!de||typeof de!="string"?!0:de.trim().length===0}const X=/{(\d+)}/g;function k(de,...xe){return xe.length===0?de:de.replace(X,function(Me,Fe){const $e=parseInt(Fe,10);return isNaN($e)||$e<0||$e>=xe.length?Me:xe[$e]})}function G(de){return de.replace(/[<>&]/g,function(xe){switch(xe){case"<":return"<";case">":return">";case"&":return"&";default:return xe}})}function b(de){return de.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function N(de,xe=" "){const Me=K(de,xe);return W(Me,xe)}function K(de,xe){if(!de||!xe)return de;const Me=xe.length;if(Me===0||de.length===0)return de;let Fe=0;for(;de.indexOf(xe,Fe)===Fe;)Fe=Fe+Me;return de.substring(Fe)}function W(de,xe){if(!de||!xe)return de;const Me=xe.length,Fe=de.length;if(Me===0||Fe===0)return de;let $e=Fe,st=-1;for(;!(st=de.lastIndexOf(xe,$e-1),st===-1||st+Me!==$e);){if(st===0)return"";$e=st}return de.substring(0,$e)}function n(de){return de.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function I(de){return de.replace(/\*/g,"")}function y(de,xe,Me={}){if(!de)throw new Error("Cannot create regex from empty string");xe||(de=b(de)),Me.wholeWord&&(/\B/.test(de.charAt(0))||(de="\\b"+de),/\B/.test(de.charAt(de.length-1))||(de=de+"\\b"));let Fe="";return Me.global&&(Fe+="g"),Me.matchCase||(Fe+="i"),Me.multiline&&(Fe+="m"),Me.unicode&&(Fe+="u"),new RegExp(de,Fe)}function m(de){if(de.source==="^"||de.source==="^$"||de.source==="$"||de.source==="^\\s*$")return!1;const xe=de.exec("");return!!(xe&&de.lastIndex===0)}function g(de){return(de.global?"g":"")+(de.ignoreCase?"i":"")+(de.multiline?"m":"")+(de.unicode?"u":"")}function u(de){return de.split(/\r\n|\r|\n/)}function c(de){for(let xe=0,Me=de.length;xe<Me;xe++){const Fe=de.charCodeAt(xe);if(Fe!==32&&Fe!==9)return xe}return-1}function p(de,xe=0,Me=de.length){for(let Fe=xe;Fe<Me;Fe++){const $e=de.charCodeAt(Fe);if($e!==32&&$e!==9)return de.substring(xe,Fe)}return de.substring(xe,Me)}function l(de,xe=de.length-1){for(let Me=xe;Me>=0;Me--){const Fe=de.charCodeAt(Me);if(Fe!==32&&Fe!==9)return Me}return-1}function o(de,xe){return de<xe?-1:de>xe?1:0}function s(de,xe,Me=0,Fe=de.length,$e=0,st=xe.length){for(;Me<Fe&&$e<st;Me++,$e++){let Pt=de.charCodeAt(Me),Et=xe.charCodeAt($e);if(Pt<Et)return-1;if(Pt>Et)return 1}const mt=Fe-Me,ut=st-$e;return mt<ut?-1:mt>ut?1:0}function a(de,xe){return A(de,xe,0,de.length,0,xe.length)}function A(de,xe,Me=0,Fe=de.length,$e=0,st=xe.length){for(;Me<Fe&&$e<st;Me++,$e++){let Pt=de.charCodeAt(Me),Et=xe.charCodeAt($e);if(Pt===Et)continue;if(Pt>=128||Et>=128)return s(de.toLowerCase(),xe.toLowerCase(),Me,Fe,$e,st);S(Pt)&&(Pt-=32),S(Et)&&(Et-=32);const At=Pt-Et;if(At===0)continue;return At}const mt=Fe-Me,ut=st-$e;return mt<ut?-1:mt>ut?1:0}function S(de){return de>=97&&de<=122}function C(de){return de>=65&&de<=90}function L(de,xe){return de.length===xe.length&&A(de,xe)===0}function D(de,xe){const Me=xe.length;return xe.length>de.length?!1:A(de,xe,0,Me)===0}function O(de,xe){let Me,Fe=Math.min(de.length,xe.length);for(Me=0;Me<Fe;Me++)if(de.charCodeAt(Me)!==xe.charCodeAt(Me))return Me;return Fe}function w(de,xe){let Me,Fe=Math.min(de.length,xe.length);const $e=de.length-1,st=xe.length-1;for(Me=0;Me<Fe;Me++)if(de.charCodeAt($e-Me)!==xe.charCodeAt(st-Me))return Me;return Fe}function x(de){return 55296<=de&&de<=56319}function d(de){return 56320<=de&&de<=57343}function E(de,xe){return(de-55296<<10)+(xe-56320)+65536}function f(de,xe,Me){const Fe=de.charCodeAt(Me);if(x(Fe)&&Me+1<xe){const $e=de.charCodeAt(Me+1);if(d($e))return E(Fe,$e)}return Fe}function v(de,xe){const Me=de.charCodeAt(xe-1);if(d(Me)&&xe>1){const Fe=de.charCodeAt(xe-2);if(x(Fe))return E(Fe,Me)}return Me}function T(de,xe){const Me=Q.getInstance(),Fe=xe,$e=de.length,st=f(de,$e,xe);xe+=st>=65536?2:1;let mt=Me.getGraphemeBreakType(st);for(;xe<$e;){const ut=f(de,$e,xe),Pt=Me.getGraphemeBreakType(ut);if(F(mt,Pt))break;xe+=ut>=65536?2:1,mt=Pt}return xe-Fe}function B(de,xe){const Me=Q.getInstance(),Fe=xe,$e=v(de,xe);xe-=$e>=65536?2:1;let st=Me.getGraphemeBreakType($e);for(;xe>0;){const mt=v(de,xe),ut=Me.getGraphemeBreakType(mt);if(F(ut,st))break;xe-=mt>=65536?2:1,st=ut}return Fe-xe}const R=/(?:[\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 j(de){return R.test(de)}const U=/(?:[\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 _(de){return U.test(de)}const J=/^[\t\n\r\x20-\x7E]*$/;function ne(de){return J.test(de)}const he=/[\u2028\u2029]/;function be(de){return he.test(de)}function Ke(de){for(let xe=0,Me=de.length;xe<Me;xe++)if(De(de.charCodeAt(xe)))return!0;return!1}function De(de){return de=+de,de>=11904&&de<=55215||de>=63744&&de<=64255||de>=65281&&de<=65374}function je(de){return de>=127462&&de<=127487||de===8986||de===8987||de===9200||de===9203||de>=9728&&de<=10175||de===11088||de===11093||de>=127744&&de<=128591||de>=128640&&de<=128764||de>=128992&&de<=129003||de>=129280&&de<=129535||de>=129648&&de<=129750}const Be=String.fromCharCode(65279);function Ge(de){return!!(de&&de.length>0&&de.charCodeAt(0)===65279)}function _e(de,xe=!1){return de?(xe&&(de=de.replace(/\\./g,"")),de.toLowerCase()!==de):!1}function Y(de){const xe=90-65+1;return de=de%(2*xe),de<xe?String.fromCharCode(97+de):String.fromCharCode(65+de-xe)}function M(de){const xe=Q.getInstance();return xe.getGraphemeBreakType(de)}function F(de,xe){return de===0?xe!==5&&xe!==7:de===2&&xe===3?!1:de===4||de===2||de===3||(xe===4||xe===2||xe===3)?!0:de===8&&(xe===8||xe===9||xe===11||xe===12)||((de===11||de===9)&&(xe===9||xe===10)||((de===12||de===10)&&xe===10||(xe===5||xe===13||(xe===7||(de===1||de===13&&xe===14)))))?!1:!(de===6&&xe===6)}class Q{constructor(){this._data=te()}static getInstance(){return Q._INSTANCE||(Q._INSTANCE=new Q),Q._INSTANCE}getGraphemeBreakType(de){if(de<32)return de===10?3:de===13?2:4;if(de<127)return 0;const xe=this._data,Me=xe.length/3;let Fe=1;for(;Fe<=Me;)if(de<xe[3*Fe])Fe=2*Fe;else if(de>xe[3*Fe+1])Fe=2*Fe+1;else return xe[3*Fe+2];return 0}}Q._INSTANCE=null;function te(){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 V(de,xe){if(de===0)return 0;const Me=ge(de,xe);if(Me!==void 0)return Me;const Fe=v(xe,de);return de-=Ue(Fe),de}function ge(de,xe){let Me=v(xe,de);for(de-=Ue(Me);Ye(Me)||Me===65039||Me===8419;){if(de===0)return;Me=v(xe,de),de-=Ue(Me)}if(!je(Me))return;if(de>=0){const Fe=v(xe,de);Fe===8205&&(de-=Ue(Fe))}return de}function Ue(de){return de>=65536?2:1}function Ye(de){return 127995<=de&&de<=127999}},NQs2:function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___3K14R",flex_space_between:"flex_space_between___1KE7t",flex_box_vertical_center:"flex_box_vertical_center___3Yslx",flex_box_center_end:"flex_box_center_end___2RmV-",flex_box_column:"flex_box_column___3k3IQ",banner:"banner___3caau",content:"content___fxe_p",btns:"btns___Vv-WB",img_noactive:"img_noactive___s1naU",img_active:"img_active___11s7p",input_warp:"input_warp___3Y7JU"}},NcEG:function(tt,Ee,H){"use strict";H.r(Ee);var ae=H("+L6B"),X=H("2/Rp"),k=H("5NDa"),G=H("5rEg"),b=H("Znn+"),N=H("ZTPi"),K=H("2qtc"),W=H("kLXV"),n=H("14J3"),I=H("BMrR"),y=H("jCWc"),m=H("kPKH"),g=H("sPJy"),u=H("bE4q"),c=H("/zsF"),p=H("PArb"),l=H("miYZ"),o=H("tsqr"),s=H("9og8"),a=H("k1fw"),A=H("oBTY"),S=H("y8nQ"),C=H("Vl3Y"),L=H("tJVT"),D=H("PpiC"),O=H("B9cy"),w=H("Ol7k"),x=H("lUTK"),d=H("BvKs"),E=H("WmNS"),f=H.n(E),v=H("q1tI"),T=H.n(v),B=H("Ty5D"),R=H("55Ip"),j=H("9kvl"),U=H("tgas"),_=H("jb+D"),J=H("BdwD"),ne=H("giR+"),he=H("fyUT"),be=H("sRBo"),Ke=H("kaz8"),De=H("5Dmo"),je=H("3S7+"),Be=H("V0Rq"),Ge=H("Ot1p"),_e=H("9Bee"),Y=H("xvzu"),M=H.n(Y),F=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Q=function(Pe,it){var ct=Pe.problemset,Ot=Pe.globalSetting,$t=Pe.loading,bt=Pe.dispatch,Ze=Pe.onRef,vn=Ze===void 0?function(){}:Ze,Xe=Pe.editData,bn=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","onRef","editData"]),mn=Object(v.useState)([]),Gt=Object(L.a)(mn,2),qt=Gt[0],gn=Gt[1],xn=Object(v.useState)(),Ln=Object(L.a)(xn,2),Rt=Ln[0],Ve=Ln[1],ft=Object(v.useState)([]),xt=Object(L.a)(ft,2),Lt=xt[0],Ct=xt[1],et=Object(v.useState)(""),Tt=Object(L.a)(et,2),wt=Tt[0],gt=Tt[1],dt=Object(v.useState)(5),Nt=Object(L.a)(dt,2),Zt=Nt[0],Yt=Nt[1],Qe=Object(v.useState)(!1),St=Object(L.a)(Qe,2),yn=St[0],lt=St[1],jt=Object(B.i)();Object(v.useEffect)(function(){gn(["","","",""])},[]),Object(v.useEffect)(function(){if(!(Xe!=null&&Xe.question_choices)){lt(!0);return}gt(Xe==null?void 0:Xe.question_title),Yt(parseInt(Xe==null?void 0:Xe.question_score)),gn(Xe==null?void 0:Xe.question_choices.map(function(vt){return vt.choice_text}));var Dt=[];Xe==null||Xe.standard_answer.map(function(vt,yt){Dt.push(vt-1)}),Ct(Dt)},[Xe]),Object(v.useImperativeHandle)(it,function(){return{onSave:en,isEdit:yn}});var en=function(){var Dt=Object(s.a)(f.a.mark(function vt(){var yt,an,Ht;return f.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:if(wt){un.next=3;break}return o.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),un.abrupt("return",!1);case 3:if(yt=qt.findIndex(function(cn){return!cn}),!(yt>-1)){un.next=7;break}return o.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(F[yt]," \u9009\u9879\u7684\u5185\u5BB9")),un.abrupt("return",!1);case 7:if(Lt.length){un.next=10;break}return o.b.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),un.abrupt("return",!1);case 10:if(!(Lt.length<1)){un.next=13;break}return o.b.info("\u8BF7\u9009\u62E9\u7B54\u6848"),un.abrupt("return",!1);case 13:if(an=qt.map(function(cn,Jn){return{choice_text:cn,is_answer:Lt.includes(Jn)?Jn+1:0}}),!Xe.question_id){un.next=20;break}return un.next=17,bt({type:"exercise/editExerciseQuestion",payload:{id:Xe.question_id,question_title:wt,question_type:1,question_score:"5.0",question_choices:an.map(function(cn){return cn.choice_text}),standard_answers:an.filter(function(cn){return cn.is_answer}).map(function(cn){return cn.is_answer})}});case 17:Ht=un.sent,un.next=23;break;case 20:return un.next=22,bt({type:"exercise/addExerciseQuestion",payload:{categoryId:jt.categoryId,question_title:wt,question_type:1,question_score:"5.0",question_choices:an.map(function(cn){return cn.choice_text}),standard_answers:an.filter(function(cn){return cn.is_answer}).map(function(cn){return cn.is_answer})}});case 22:Ht=un.sent;case 23:Ht.status===0&&(o.b.success("\u4FDD\u5B58\u6210\u529F"),lt(!1),bt({type:"exercise/editExercise",payload:Object(a.a)({},jt)}));case 24:case"end":return un.stop()}},vt)}));return function(){return Dt.apply(this,arguments)}}(),rn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],at=function(){var Dt=Object(s.a)(f.a.mark(function vt(yt){return f.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:Ht.t0=yt.id,Ht.next=Ht.t0==="del"?3:Ht.t0==="up"||Ht.t0==="down"?5:Ht.t0==="edit"?9:11;break;case 3:return W.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(f.a.mark(function un(){return f.a.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:return Jn.next=2,Object(Be.n)({id:Xe.question_id});case 2:bt({type:"exercise/editExercise",payload:Object(a.a)({},jt)});case 3:case"end":return Jn.stop()}},un)}))()}}),Ht.abrupt("break",11);case 5:return Ht.next=7,bt({type:"exercise/exeriseMoveUpDown",payload:{id:Xe.question_id,opr:yt.id}});case 7:return bt({type:"exercise/editExercise",payload:Object(a.a)({},jt)}),Ht.abrupt("break",11);case 9:return lt(!0),Ht.abrupt("break",11);case 11:case"end":return Ht.stop()}},vt)}));return function(yt){return Dt.apply(this,arguments)}}(),Ft=function(){var vt;return T.a.createElement("aside",null,T.a.createElement("div",{className:M.a.questionType},T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},Xe.key,"\u3001\u591A\u9009\u9898"),"\uFF08",Xe.question_score,"\u5206\uFF09"),!Xe.hideAction&&rn.map(function(yt,an){return yt.id==="up"&&Xe.key===1||yt.id==="down"&&Xe.key===Xe.len?null:T.a.createElement(je.a,{key:an,placement:"bottom",title:yt.name},T.a.createElement("span",{onClick:function(){return at(yt)},className:yt.icon}))})),T.a.createElement("div",{className:"mt5"},T.a.createElement(_e.a,{value:Xe.question_title})),T.a.createElement("div",{className:M.a.questionChoices},Xe==null||((vt=Xe.question_choices)===null||vt===void 0)?void 0:vt.map(function(yt,an){return T.a.createElement(I.a,null,T.a.createElement(m.a,null,T.a.createElement(Ke.a,{key:an,checked:Xe.standard_answer.includes(an+1),disabled:!0},F[an],".")),T.a.createElement(m.a,{flex:"1"},T.a.createElement("span",{className:"c-black font14"},T.a.createElement(_e.a,{value:yt.choice_text}))))})))},rt=function(){return T.a.createElement("aside",null,T.a.createElement("div",{className:M.a.questionType},T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),T.a.createElement("p",{className:M.a.titleWrap},T.a.createElement("span",{className:M.a.required},"*"),T.a.createElement("span",{className:M.a.title},"\u9898\u5E72\uFF1A")),T.a.createElement(Ge.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:wt,onChange:function(yt){return gt(yt)}}),T.a.createElement("p",{className:M.a.titleWrap},T.a.createElement("span",{className:M.a.required},"*"),T.a.createElement("span",{className:M.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",T.a.createElement("span",{className:M.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),qt.map(function(vt,yt){return T.a.createElement("div",{className:M.a.choiceWrap,key:yt},T.a.createElement(je.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},T.a.createElement("div",{className:"".concat(M.a.answer," ").concat(Lt.includes(yt)?M.a.activeAnswer:""),onClick:function(){Lt.includes(yt)?Ct(Lt.filter(function(Ht){return Ht!==yt})):Ct([].concat(Object(A.a)(Lt),[yt]))}},F[yt])),T.a.createElement("div",{className:M.a.editorWrap},Rt===yt?T.a.createElement(Ge.a,{id:"single-question-option-".concat(yt),watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:vt,onChange:function(Ht){qt[yt]=Ht,gn(qt)}}):T.a.createElement("div",{className:M.a.htmlWrap,onClick:function(){return Ve(yt)}},T.a.createElement(_e.a,{value:vt}))),yt>1&&T.a.createElement(je.a,{title:"\u5220\u9664"},T.a.createElement("i",{className:"".concat(M.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return gn(qt.filter(function(Ht,ui){return ui!==yt}))}})),yt<7&&yt===qt.length-1&&T.a.createElement(je.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},T.a.createElement("i",{className:"".concat(M.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return gn([].concat(Object(A.a)(qt),[""]))}})))}),T.a.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),T.a.createElement("p",{className:""},"\u5206\u503C\uFF1A",T.a.createElement(he.a,{value:Zt,max:1e4,min:-1,onChange:function(yt){Yt(yt)}})," ","\u5206"),T.a.createElement("aside",{className:"tr"},Xe.question_id&&T.a.createElement(X.a,{type:"default",onClick:function(){return lt(!1)}},"\u53D6\u6D88"),T.a.createElement(X.a,{className:"ml20",type:"primary",onClick:function(){return en()}},"\u4FDD\u5B58")))};return T.a.createElement("section",{className:M.a.wrap},!yn&&Ft(),yn&&rt())},te=Object(j.a)(function(Re){var Pe=Re.problemset,it=Re.loading,ct=Re.globalSetting;return{problemset:Pe,globalSetting:ct,loading:it.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(Q)),V=H("7Kak"),ge=H("9yH6"),Ue=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Ye=function(Pe,it){var ct=Pe.problemset,Ot=Pe.globalSetting,$t=Pe.loading,bt=Pe.dispatch,Ze=Pe.onRef,vn=Ze===void 0?function(){}:Ze,Xe=Pe.editData,bn=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","onRef","editData"]),mn=Object(v.useState)([]),Gt=Object(L.a)(mn,2),qt=Gt[0],gn=Gt[1],xn=Object(v.useState)(),Ln=Object(L.a)(xn,2),Rt=Ln[0],Ve=Ln[1],ft=Object(v.useState)([]),xt=Object(L.a)(ft,2),Lt=xt[0],Ct=xt[1],et=Object(v.useState)(""),Tt=Object(L.a)(et,2),wt=Tt[0],gt=Tt[1],dt=Object(v.useState)(0),Nt=Object(L.a)(dt,2),Zt=Nt[0],Yt=Nt[1],Qe=Object(v.useState)(!1),St=Object(L.a)(Qe,2),yn=St[0],lt=St[1],jt=Object(B.i)();Object(v.useEffect)(function(){gn(["","","",""])},[]),Object(v.useEffect)(function(){if(!(Xe!=null&&Xe.question_choices)){lt(!0);return}gt(Xe==null?void 0:Xe.question_title),Yt(parseInt(Xe==null?void 0:Xe.question_score)),gn(Xe==null?void 0:Xe.question_choices.map(function(vt){return vt.choice_text}));var Dt=[];Xe==null||Xe.standard_answer.map(function(vt,yt){Dt.push(vt-1)}),Ct(Dt)},[Xe]),Object(v.useImperativeHandle)(it,function(){return{onSave:en,isEdit:yn}});var en=function(){var Dt=Object(s.a)(f.a.mark(function vt(){var yt,an,Ht;return f.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:if(wt){un.next=3;break}return o.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),un.abrupt("return",!1);case 3:if(yt=qt.findIndex(function(cn){return!cn}),!(yt>-1)){un.next=7;break}return o.b.info("\u8BF7\u5148\u8F93\u5165 ".concat(Ue[yt]," \u9009\u9879\u7684\u5185\u5BB9")),un.abrupt("return",!1);case 7:if(Lt.length){un.next=10;break}return o.b.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),un.abrupt("return",!1);case 10:if(!(Lt.length<1)){un.next=13;break}return o.b.info("\u8BF7\u9009\u62E9\u7B54\u6848"),un.abrupt("return",!1);case 13:if(an=qt.map(function(cn,Jn){return{choice_text:cn,is_answer:Lt.includes(Jn)?Jn+1:0}}),!Xe.question_id){un.next=20;break}return un.next=17,Object(U.u)({id:Xe.question_id,question_title:wt,question_type:1,question_score:Zt,question_choices:an.map(function(cn){return cn.choice_text}),standard_answers:an.filter(function(cn){return cn.is_answer}).map(function(cn){return cn.is_answer})});case 17:Ht=un.sent,un.next=23;break;case 20:return un.next=22,Object(U.a)({exercise_bank_id:jt.topicId,question_title:wt,question_type:1,question_score:"5.0",question_choices:an.map(function(cn){return cn.choice_text}),standard_answers:an.filter(function(cn){return cn.is_answer}).map(function(cn){return cn.is_answer})});case 22:Ht=un.sent;case 23:return Ht.status===0&&(o.b.success("\u4FDD\u5B58\u6210\u529F"),lt(!1)),un.next=26,bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},jt)});case 26:case"end":return un.stop()}},vt)}));return function(){return Dt.apply(this,arguments)}}(),rn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],at=function(){var Dt=Object(s.a)(f.a.mark(function vt(yt){return f.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:Ht.t0=yt.id,Ht.next=Ht.t0==="del"?3:Ht.t0==="up"||Ht.t0==="down"?5:Ht.t0==="edit"?9:11;break;case 3:return W.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(f.a.mark(function un(){return f.a.wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:return Jn.next=2,Object(U.e)({pollsId:Xe.question_id});case 2:bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},jt)});case 3:case"end":return Jn.stop()}},un)}))()}}),Ht.abrupt("break",11);case 5:return Ht.next=7,Object(U.j)({exerciseId:Xe==null?void 0:Xe.question_id,opr:yt.id});case 7:return bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},jt)}),Ht.abrupt("break",11);case 9:return lt(!0),Ht.abrupt("break",11);case 11:case"end":return Ht.stop()}},vt)}));return function(yt){return Dt.apply(this,arguments)}}(),Ft=function(){var vt;return T.a.createElement("aside",null,T.a.createElement("div",{className:M.a.questionType},T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},Xe.key,"\u3001\u5355\u9009\u9898"),"\uFF08",Xe.question_score,"\u5206\uFF09"),!Xe.hideAction&&rn.map(function(yt,an){return yt.id==="up"&&Xe.key===1||yt.id==="down"&&Xe.key===Xe.len?null:T.a.createElement(je.a,{key:an,placement:"bottom",title:yt.name},T.a.createElement("span",{onClick:function(){return at(yt)},className:yt.icon}))})),T.a.createElement("div",{className:"mt5"},T.a.createElement(_e.a,{value:Xe.question_title})),T.a.createElement("div",{className:M.a.questionChoices},Xe==null||((vt=Xe.question_choices)===null||vt===void 0)?void 0:vt.map(function(yt,an){return T.a.createElement(I.a,null,T.a.createElement(m.a,null,T.a.createElement(ge.a,{key:an,checked:Xe.standard_answer.includes(an+1),disabled:!0},Ue[an],".")),T.a.createElement(m.a,{flex:"1"},T.a.createElement("span",{className:"c-black font14"},T.a.createElement(_e.a,{value:yt.choice_text}))))})))},rt=function(){return T.a.createElement("aside",null,T.a.createElement("div",{className:M.a.questionType},T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),T.a.createElement("p",{className:M.a.titleWrap},T.a.createElement("span",{className:M.a.required},"*"),T.a.createElement("span",{className:M.a.title},"\u9898\u5E72\uFF1A")),T.a.createElement(Ge.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:wt,onChange:function(yt){return gt(yt)}}),T.a.createElement("p",{className:M.a.titleWrap},T.a.createElement("span",{className:M.a.required},"*"),T.a.createElement("span",{className:M.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",T.a.createElement("span",{className:M.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),qt.map(function(vt,yt){return T.a.createElement("div",{className:M.a.choiceWrap,key:yt},T.a.createElement(je.a,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},T.a.createElement("div",{className:"".concat(M.a.answer," ").concat(Lt.includes(yt)?M.a.activeAnswer:""),onClick:function(){Lt.includes(yt)?Ct(Lt.filter(function(Ht){return Ht!==yt})):Ct([].concat(Object(A.a)(Lt),[yt]))}},Ue[yt])),T.a.createElement("div",{className:M.a.editorWrap},Rt===yt?T.a.createElement(Ge.a,{id:"single-question-option-".concat(yt),watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:vt,onChange:function(Ht){qt[yt]=Ht,gn(qt)}}):T.a.createElement("div",{className:M.a.htmlWrap,onClick:function(){return Ve(yt)}},T.a.createElement(_e.a,{value:vt}))),yt>1&&T.a.createElement(je.a,{title:"\u5220\u9664"},T.a.createElement("i",{className:"".concat(M.a.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){return gn(qt.filter(function(Ht,ui){return ui!==yt}))}})),yt<7&&yt===qt.length-1&&T.a.createElement(je.a,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},T.a.createElement("i",{className:"".concat(M.a.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return gn([].concat(Object(A.a)(qt),[""]))}})))}),T.a.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),T.a.createElement("p",{className:""},"\u5206\u503C\uFF1A",T.a.createElement(he.a,{value:Zt,max:1e4,min:-1,onChange:function(yt){Yt(yt)}})," ","\u5206"),T.a.createElement("aside",{className:"tr"},Xe.question_id&&T.a.createElement(X.a,{type:"default",onClick:function(){return lt(!1)}},"\u53D6\u6D88"),T.a.createElement(X.a,{className:"ml20",type:"primary",onClick:function(){return en()}},"\u4FDD\u5B58")))};return T.a.createElement("section",{className:M.a.wrap},!yn&&Ft(),yn&&rt())},de=Object(j.a)(function(Re){var Pe=Re.problemset,it=Re.loading,ct=Re.globalSetting;return{problemset:Pe,globalSetting:ct,loading:it.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(Ye)),xe=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Me=function(Pe,it){var ct=Pe.problemset,Ot=Pe.globalSetting,$t=Pe.loading,bt=Pe.dispatch,Ze=Pe.onRef,vn=Ze===void 0?function(){}:Ze,Xe=Pe.editData,bn=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","onRef","editData"]),mn=Object(v.useState)(),Gt=Object(L.a)(mn,2),qt=Gt[0],gn=Gt[1],xn=Object(v.useState)(""),Ln=Object(L.a)(xn,2),Rt=Ln[0],Ve=Ln[1],ft=Object(v.useState)(!1),xt=Object(L.a)(ft,2),Lt=xt[0],Ct=xt[1],et=Object(v.useState)(5),Tt=Object(L.a)(et,2),wt=Tt[0],gt=Tt[1],dt=Object(B.i)();Object(v.useEffect)(function(){if(!(Xe!=null&&Xe.question_choices)){Ct(!0);return}Ve(Xe==null?void 0:Xe.question_title),gt(Xe==null?void 0:Xe.question_score),gn(Xe.standard_answer[0]+"")},[Xe]),Object(v.useImperativeHandle)(it,function(){return{onSave:Nt,isEdit:Lt}});var Nt=function(){var yn=Object(s.a)(f.a.mark(function lt(){var jt,en;return f.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(Rt){at.next=3;break}return o.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),at.abrupt("return",!1);case 3:if(qt){at.next=6;break}return o.b.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),at.abrupt("return",!1);case 6:if(jt=[{choice_text:"\u6B63\u786E",is_answer:qt==="1"?1:0},{choice_text:"\u9519\u8BEF",is_answer:qt==="2"?2:0}],!Xe.question_id){at.next=13;break}return at.next=10,Object(U.u)({id:Xe.question_id,question_title:Rt,question_type:2,question_score:wt,question_choices:jt.map(function(Ft){return Ft.choice_text}),standard_answers:jt.filter(function(Ft){return Ft.is_answer}).map(function(Ft){return Ft.is_answer})});case 10:en=at.sent,at.next=16;break;case 13:return at.next=15,Object(U.a)({exercise_bank_id:dt.topicId,question_title:Rt,question_type:2,question_score:wt,question_choices:jt.map(function(Ft){return Ft.choice_text}),standard_answers:jt.filter(function(Ft){return Ft.is_answer}).map(function(Ft){return Ft.is_answer})});case 15:en=at.sent;case 16:return en.status===0&&(o.b.success("\u4FDD\u5B58\u6210\u529F"),Ct(!1)),bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},dt)}),at.abrupt("return",{name:Rt,choices:jt});case 19:case"end":return at.stop()}},lt)}));return function(){return yn.apply(this,arguments)}}(),Zt=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Yt=function(){var yn=Object(s.a)(f.a.mark(function lt(jt){return f.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:rn.t0=jt.id,rn.next=rn.t0==="del"?3:rn.t0==="up"||rn.t0==="down"?5:rn.t0==="edit"?9:11;break;case 3:return W.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(f.a.mark(function Ft(){return f.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Dt.next=2,Object(U.e)({pollsId:Xe.question_id});case 2:bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},dt)});case 3:case"end":return Dt.stop()}},Ft)}))()}}),rn.abrupt("break",11);case 5:return rn.next=7,Object(U.j)({exerciseId:Xe==null?void 0:Xe.question_id,opr:jt.id});case 7:return bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},dt)}),rn.abrupt("break",11);case 9:return Ct(!0),rn.abrupt("break",11);case 11:case"end":return rn.stop()}},lt)}));return function(jt){return yn.apply(this,arguments)}}(),Qe=function(){var lt;return T.a.createElement("aside",null,T.a.createElement("div",{className:M.a.questionType},T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},Xe.key,"\u3001\u5224\u65AD\u9898"),"\uFF08",Xe.question_score,"\u5206\uFF09"),!Xe.hideAction&&Zt.map(function(jt,en){return jt.id==="up"&&Xe.key===1||jt.id==="down"&&Xe.key===Xe.len?null:T.a.createElement(je.a,{key:en,placement:"bottom",title:jt.name},T.a.createElement("span",{onClick:function(){return Yt(jt)},className:jt.icon}))})),T.a.createElement("div",{className:"mt5"},Xe.question_title),T.a.createElement("div",{className:M.a.questionChoices},Xe==null||((lt=Xe.question_choices)===null||lt===void 0)?void 0:lt.map(function(jt,en){return T.a.createElement(ge.a,{key:en,checked:Xe.standard_answer.includes(en+1),disabled:!0},xe[en],"."," ",T.a.createElement("span",{className:"c-black font14"},jt.choice_text))})))},St=function(){return T.a.createElement("aside",null,T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},"\u5224\u65AD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09"),T.a.createElement("p",{className:M.a.titleWrap},T.a.createElement("span",{className:M.a.required},"*"),T.a.createElement("span",{className:M.a.title},"\u9898\u5E72\uFF1A")),T.a.createElement(Ge.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Rt,onChange:function(jt){return Ve(jt)}}),T.a.createElement("p",{className:M.a.titleWrap},T.a.createElement("span",{className:M.a.required},"*"),T.a.createElement("span",{className:M.a.title},"\u7B54\u6848\u9009\u9879\uFF1A",T.a.createElement("span",{className:M.a.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),T.a.createElement(ge.a.Group,{buttonStyle:"solid",value:qt,onChange:function(jt){return gn(jt.target.value)}},T.a.createElement(ge.a.Button,{value:"1",className:"".concat(M.a.radio," mr40")},"\u6B63\u786E"),T.a.createElement(ge.a.Button,{value:"2",className:M.a.radio},"\u9519\u8BEF")),T.a.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\uFF0C\u53EF\u4EE5\u76F4\u63A5\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848"),T.a.createElement("p",{className:""},"\u5206\u503C\uFF1A",T.a.createElement(he.a,{value:wt,max:1e4,min:-1,onChange:function(jt){gt(jt)}})," ","\u5206"),T.a.createElement("aside",{className:"tr"},Xe.question_id&&T.a.createElement(X.a,{type:"default",onClick:function(){return Ct(!1)}},"\u53D6\u6D88"),T.a.createElement(X.a,{className:"ml20",type:"primary",onClick:function(){return Nt()}},"\u4FDD\u5B58")))};return T.a.createElement("section",{className:M.a.wrap},!Lt&&Qe(),Lt&&St())},Fe=Object(j.a)(function(Re){var Pe=Re.problemset,it=Re.loading,ct=Re.globalSetting;return{problemset:Pe,globalSetting:ct,loading:it.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(Me)),$e=H("kqOp"),st=H("7qnI"),mt=H("1vsH"),ut=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Pt=function(Pe,it){var ct=Pe.problemset,Ot=Pe.globalSetting,$t=Pe.loading,bt=Pe.dispatch,Ze=Pe.editData,vn=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","editData"]),Xe=Object(v.useState)(""),bn=Object(L.a)(Xe,2),mn=bn[0],Gt=bn[1],qt=Object(v.useState)(""),gn=Object(L.a)(qt,2),xn=gn[0],Ln=gn[1],Rt=Object(v.useState)([]),Ve=Object(L.a)(Rt,2),ft=Ve[0],xt=Ve[1],Lt=Object(v.useState)(""),Ct=Object(L.a)(Lt,2),et=Ct[0],Tt=Ct[1],wt=Object(v.useState)(),gt=Object(L.a)(wt,2),dt=gt[0],Nt=gt[1],Zt=Object(v.useState)(!1),Yt=Object(L.a)(Zt,2),Qe=Yt[0],St=Yt[1],yn=Object(v.useState)(5),lt=Object(L.a)(yn,2),jt=lt[0],en=lt[1],rn=Object(v.useState)(!1),at=Object(L.a)(rn,2),Ft=at[0],rt=at[1],Dt=Object(B.i)();Object(v.useEffect)(function(){if(!(Ze!=null&&Ze.question_title)){rt(!0);return}Gt(Ze==null?void 0:Ze.question_title),Nt(Ze==null?void 0:Ze.is_ordered),en(Ze==null?void 0:Ze.question_score);var _n=Ze==null?void 0:Ze.standard_answer.map(function(Vt){return Vt.answer_text});xt(_n)},[ct.editData]),Object(v.useEffect)(function(){St(!1)},[Ft]),Object(v.useImperativeHandle)(it,function(){return{onSave:vt,isEdit:Ft}});var vt=function(){var _n=Object(s.a)(f.a.mark(function Vt(){var zt,ln,dn;return f.a.wrap(function(ri){for(;;)switch(ri.prev=ri.next){case 0:if(zt=[],ln=!1,ft.forEach(function(pn,ci){zt.push({choice_id:ci+1,answer_text:[]}),pn.forEach(function(hr,Br){zt[ci].answer_text.push(hr),(!hr||!Object(mt.eb)(hr,1e4))&&(Tt("".concat(ci,"-").concat(Br)),o.b.info(hr?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),ln=!0)})}),!ln){ri.next=5;break}return ri.abrupt("return",!1);case 5:if(!Ze.question_id){ri.next=11;break}return ri.next=8,Object(U.u)({id:Ze.question_id,question_title:mn,question_type:3,question_score:jt,is_ordered:dt,standard_answers:zt});case 8:dn=ri.sent,ri.next=14;break;case 11:return ri.next=13,Object(U.a)({exercise_bank_id:Dt.topicId,question_title:mn,question_type:3,question_score:jt,is_ordered:dt,standard_answers:zt});case 13:dn=ri.sent;case 14:return dn.status===0&&(o.b.success("\u4FDD\u5B58\u6210\u529F"),rt(!1)),bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Dt)}),ri.abrupt("return",{name:mn,analysis:xn,standard_answers:zt,is_ordered:dt});case 17:case"end":return ri.stop()}},Vt)}));return function(){return _n.apply(this,arguments)}}(),yt=function(Vt,zt,ln){var dn=ft.slice();if(zt&&dn.splice(Vt,zt),ln&&Qe)for(var Dn=0;Dn<ln;Dn++)dn.splice(Vt+Dn,0,[""]);St(!0),xt(dn)},an=function(Vt,zt,ln){Tt("");var dn=ft.slice();dn[Vt][zt]=ln,xt(dn)},Ht=function(Vt){var zt=ft.slice();zt[Vt]=[].concat(Object(A.a)(zt[Vt]),[""]),xt(zt)},ui=function(Vt,zt){var ln=ft.slice();if(!ln[Vt][zt]){ln[Vt]=ln[Vt].filter(function(dn,Dn){return Dn!==zt}),xt(ln);return}W.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:M.a.modal,onOk:function(){ln[Vt]=ln[Vt].filter(function(Dn,ri){return ri!==zt}),xt(ln)}})},un=function(Vt){W.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:M.a.modal,onOk:function(){var ln=ft.slice();ln=ft.filter(function(dn,Dn){return Vt!==Dn}),xt(ln)}})},cn=function(){return T.a.createElement("aside",null,T.a.createElement("div",{className:M.a.questionType},T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},"\u586B\u7A7A\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848 \uFF1B\u652F\u6301\u6700\u591A5\u4E2A\u7A7A\uFF0C\u6BCF\u7A7A\u5F97\u5206\u6309\u7167\u672C\u9898\u7684\u603B\u5206\u5E73\u5747\u8BA1\u7B97\uFF09")),T.a.createElement("div",null,T.a.createElement($e.a,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:mn,onChange:function(zt){return Gt(zt)},showNullButton:!0,onPlaceholderChange:yt})),T.a.createElement("div",{className:"mt20"},ft.map(function(Vt,zt){return T.a.createElement(st.a,{key:zt,answers:Vt,index:zt,is_md:!0,activeOptionErrorIndex:et,onAnswerChange:an,addChildAnswer:Ht,deleteChildAnswer:ui,deleteChildAnswermain:un})})),T.a.createElement("div",{className:"mt20"},ft.length>1&&T.a.createElement("span",null,T.a.createElement(Ke.a,{checked:dt,onChange:function(zt){return Nt(zt.target.checked)},className:"".concat(M.a.color333," font14")},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),T.a.createElement("span",{className:"".concat(M.a.color999," font12")},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),T.a.createElement("p",{className:""},"\u5206\u503C\uFF1A",T.a.createElement(he.a,{value:jt,max:1e4,min:-1,onChange:function(zt){en(zt)}})," ","\u5206"),T.a.createElement("aside",{className:"tr"},Ze.question_id&&T.a.createElement(X.a,{type:"default",onClick:function(){return rt(!1)}},"\u53D6\u6D88"),T.a.createElement(X.a,{className:"ml20",type:"primary",onClick:function(){return vt()}},"\u4FDD\u5B58")))},Jn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],lr=function(){var _n=Object(s.a)(f.a.mark(function Vt(zt){return f.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:dn.t0=zt.id,dn.next=dn.t0==="del"?3:dn.t0==="up"||dn.t0==="down"?5:dn.t0==="edit"?9:11;break;case 3:return W.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(f.a.mark(function ri(){return f.a.wrap(function(ci){for(;;)switch(ci.prev=ci.next){case 0:return ci.next=2,Object(U.e)({pollsId:Ze.question_id});case 2:bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Dt)});case 3:case"end":return ci.stop()}},ri)}))()}}),dn.abrupt("break",11);case 5:return dn.next=7,Object(U.j)({exerciseId:Ze==null?void 0:Ze.question_id,opr:zt.id});case 7:return bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Dt)}),dn.abrupt("break",11);case 9:return rt(!0),dn.abrupt("break",11);case 11:case"end":return dn.stop()}},Vt)}));return function(zt){return _n.apply(this,arguments)}}(),pi=function(){var Vt;return T.a.createElement("aside",null,T.a.createElement("div",{className:M.a.questionType},T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},Ze.key,"\u3001\u586B\u7A7A\u9898"),"\uFF08",Ze.question_score,"\u5206\uFF09"),!Ze.hideAction&&Jn.map(function(zt,ln){return zt.id==="up"&&Ze.key===1||zt.id==="down"&&Ze.key===Ze.len?null:T.a.createElement(je.a,{key:ln,placement:"bottom",title:zt.name},T.a.createElement("span",{onClick:function(){return lr(zt)},className:zt.icon}))})),T.a.createElement("div",{className:"mt5"},Ze.question_title),T.a.createElement("div",{className:M.a.questionChoices},Ze==null||((Vt=Ze.standard_answer)===null||Vt===void 0)?void 0:Vt.map(function(zt,ln){return T.a.createElement(I.a,null,T.a.createElement(m.a,null,"\u7B54\u6848\uFF08\u586B\u7A7A",zt.choice_id,"\uFF09\uFF1A"),T.a.createElement(m.a,{flex:"1"},T.a.createElement(G.a,{key:ln,checked:Ze.standard_answer.includes(ln),disabled:!0,value:zt.answer_text})))})))};return T.a.createElement("section",{className:M.a.wrap},!Ft&&pi(),Ft&&cn())},Et=Object(j.a)(function(Re){var Pe=Re.problemset,it=Re.loading,ct=Re.globalSetting;return{problemset:Pe,globalSetting:ct,loading:it.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(Pt)),At=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Je=function(Pe,it){var ct=Pe.problemset,Ot=Pe.globalSetting,$t=Pe.loading,bt=Pe.dispatch,Ze=Pe.onRef,vn=Ze===void 0?function(){}:Ze,Xe=Pe.editData,bn=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","onRef","editData"]),mn=Object(v.useState)(""),Gt=Object(L.a)(mn,2),qt=Gt[0],gn=Gt[1],xn=Object(v.useState)(""),Ln=Object(L.a)(xn,2),Rt=Ln[0],Ve=Ln[1],ft=Object(v.useState)(""),xt=Object(L.a)(ft,2),Lt=xt[0],Ct=xt[1],et=Object(v.useState)(5),Tt=Object(L.a)(et,2),wt=Tt[0],gt=Tt[1],dt=Object(v.useState)(!1),Nt=Object(L.a)(dt,2),Zt=Nt[0],Yt=Nt[1],Qe=Object(B.i)();Object(v.useEffect)(function(){var rn;if(!(Xe!=null&&Xe.question_title)){Yt(!0);return}gn(Xe==null?void 0:Xe.question_title),Ct(Xe==null||((rn=Xe.standard_answer)===null||rn===void 0)?void 0:rn[0]),gt(Xe==null?void 0:Xe.question_score)},[ct.editData]),Object(v.useImperativeHandle)(it,function(){return{onSave:St,isEdit:Zt}});var St=function(){var rn=Object(s.a)(f.a.mark(function at(){var Ft;return f.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:if(qt){Dt.next=3;break}return o.b.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),Dt.abrupt("return",!1);case 3:if(!Xe.question_id){Dt.next=9;break}return Dt.next=6,Object(U.u)({id:Xe.question_id,question_title:qt,question_type:4,question_score:wt,standard_answers:[Lt]});case 6:Ft=Dt.sent,Dt.next=12;break;case 9:return Dt.next=11,Object(U.a)({exercise_bank_id:Qe.topicId,question_title:qt,question_type:4,question_score:wt,standard_answers:[Lt]});case 11:Ft=Dt.sent;case 12:return Ft.status===0&&(o.b.success("\u4FDD\u5B58\u6210\u529F"),Yt(!1),bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Qe)})),Dt.abrupt("return",{name:qt,answer_texts:[Lt],analysis:Rt});case 14:case"end":return Dt.stop()}},at)}));return function(){return rn.apply(this,arguments)}}(),yn=function(){return T.a.createElement("aside",null,T.a.createElement("div",{className:M.a.questionType},T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},"\u7B80\u7B54\u9898"),"\uFF08\u4E3B\u89C2\u9898\uFF0C\u672A\u4F5C\u7B54\u7684\u60C5\u51B5\u4E0B\u81EA\u52A8\u8BC4\u4E3A\u96F6\u5206\uFF09")),T.a.createElement(Ge.a,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:qt,onChange:function(Ft){return gn(Ft)}}),T.a.createElement("p",{className:M.a.titleWrap},T.a.createElement("span",{className:M.a.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),T.a.createElement(Ge.a,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:Lt,onChange:function(Ft){return Ct(Ft)}}),T.a.createElement("p",{className:""},"\u5206\u503C\uFF1A",T.a.createElement(he.a,{value:wt,max:1e4,min:-1,onChange:function(Ft){gt(Ft)}})," ","\u5206"),T.a.createElement("aside",{className:"tr"},Xe.question_id&&T.a.createElement(X.a,{type:"default",onClick:function(){return Yt(!1)}},"\u53D6\u6D88"),T.a.createElement(X.a,{className:"ml20",type:"primary",onClick:function(){return St()}},"\u4FDD\u5B58")))},lt=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],jt=function(){var rn=Object(s.a)(f.a.mark(function at(Ft){return f.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:Dt.t0=Ft.id,Dt.next=Dt.t0==="del"?3:Dt.t0==="up"||Dt.t0==="down"?5:Dt.t0==="edit"?9:11;break;case 3:return W.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(f.a.mark(function yt(){return f.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,Object(U.e)({pollsId:Xe.question_id});case 2:bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Qe)});case 3:case"end":return Ht.stop()}},yt)}))()}}),Dt.abrupt("break",11);case 5:return Dt.next=7,Object(U.j)({exerciseId:Xe==null?void 0:Xe.question_id,opr:Ft.id});case 7:return bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Qe)}),Dt.abrupt("break",11);case 9:return Yt(!0),Dt.abrupt("break",11);case 11:case"end":return Dt.stop()}},at)}));return function(Ft){return rn.apply(this,arguments)}}(),en=function(){return T.a.createElement("aside",null,T.a.createElement("div",{className:M.a.questionType},T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},Xe.key,"\u3001\u7B80\u7B54\u9898"),"\uFF08",Xe.question_score,"\u5206\uFF09"),!Xe.hideAction&<.map(function(at,Ft){return at.id==="up"&&Xe.key===1||at.id==="down"&&Xe.key===Xe.len?null:T.a.createElement(je.a,{key:Ft,placement:"bottom",title:at.name},T.a.createElement("span",{onClick:function(){return jt(at)},className:at.icon}))})),T.a.createElement("div",{className:"mt5"},Xe.question_title),T.a.createElement("div",{className:M.a.questionChoices},T.a.createElement("p",null,T.a.createElement("strong",null,"\u53C2\u8003\u7B54\u6848\uFF1A")),T.a.createElement(_e.a,{value:Lt})))};return T.a.createElement("section",{className:M.a.wrap},!Zt&&en(),Zt&&yn())},Kt=Object(j.a)(function(Re){var Pe=Re.problemset,it=Re.loading,ct=Re.globalSetting;return{problemset:Pe,globalSetting:ct,loading:it.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(Je)),Bt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ce=function(Pe,it){var ct=Pe.problemset,Ot=Pe.globalSetting,$t=Pe.loading,bt=Pe.dispatch,Ze=Pe.editData,vn=Object(D.a)(Pe,["problemset","globalSetting","loading","dispatch","editData"]),Xe=Object(v.useState)(""),bn=Object(L.a)(Xe,2),mn=bn[0],Gt=bn[1],qt=Object(v.useState)(""),gn=Object(L.a)(qt,2),xn=gn[0],Ln=gn[1],Rt=Object(v.useState)(""),Ve=Object(L.a)(Rt,2),ft=Ve[0],xt=Ve[1],Lt=Object(v.useState)([]),Ct=Object(L.a)(Lt,2),et=Ct[0],Tt=Ct[1],wt=Object(v.useState)(""),gt=Object(L.a)(wt,2),dt=gt[0],Nt=gt[1],Zt=Object(v.useState)(),Yt=Object(L.a)(Zt,2),Qe=Yt[0],St=Yt[1],yn=Object(v.useState)(!1),lt=Object(L.a)(yn,2),jt=lt[0],en=lt[1],rn=Object(v.useState)([]),at=Object(L.a)(rn,2),Ft=at[0],rt=at[1],Dt=Object(v.useState)(!1),vt=Object(L.a)(Dt,2),yt=vt[0],an=vt[1],Ht=Object(B.i)();Object(v.useEffect)(function(){var pi;Ze.edit&&an(!0),Gt(Ze.shixun_name),Ln(Ze.question_title);var _n=[];(pi=Ze.shixun)===null||pi===void 0||pi.map(function(Vt){_n.push(Vt.challenge_score)}),rt(_n)},[Ze]),Object(v.useEffect)(function(){en(!1)},[yt]),Object(v.useImperativeHandle)(it,function(){return{onSave:ui,isEdit:yt}});var ui=function(){var pi=Object(s.a)(f.a.mark(function _n(){var Vt,zt,ln;return f.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:if(Vt=[],zt=!1,!zt){Dn.next=4;break}return Dn.abrupt("return",!1);case 4:if(!Ze.question_id){Dn.next=10;break}return Dn.next=7,Object(U.u)({id:Ze.question_id,question_title:xn,shixun_name:mn,shixun_id:Ze.shixun_id,question_type:5,question_scores:Ft});case 7:ln=Dn.sent,Dn.next=13;break;case 10:return Dn.next=12,Object(U.a)({exercise_bank_id:Ht.topicId,question_title:xn,shixun_name:mn,shixun_id:Ze.shixun_id,question_type:5,question_scores:Ft});case 12:ln=Dn.sent;case 13:return ln.status===0&&(o.b.success("\u4FDD\u5B58\u6210\u529F"),an(!1)),Dn.next=16,bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Ht)});case 16:return Dn.abrupt("return",{name:xn,analysis:ft,standard_answers:Vt,is_ordered:Qe});case 17:case"end":return Dn.stop()}},_n)}));return function(){return pi.apply(this,arguments)}}(),un=function(){var _n;return T.a.createElement("aside",null,T.a.createElement("div",{className:M.a.questionType},T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},"\u5B9E\u8BAD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF09")),T.a.createElement("div",{className:"mt10"},T.a.createElement(G.a,{defaultValue:mn,onChange:function(zt){Gt(zt.target.value)}})),T.a.createElement("div",{className:"mt10"},T.a.createElement(Ge.a,{id:"single-question-option-0",height:155,placeholder:"\u8BF7\u8F93\u5165\u5B9E\u8BAD\u9898\u5B8C\u6210\u8981\u6C42",defaultValue:xn,onChange:function(zt){Ln(zt)}})),T.a.createElement("div",{className:"mt20"},(_n=Ze.shixun)===null||_n===void 0?void 0:_n.map(function(Vt,zt){return T.a.createElement(I.a,{gutter:[20,20]},T.a.createElement(m.a,{flex:"1"},zt+1,".",Vt.challenge_name),T.a.createElement(m.a,null,T.a.createElement(he.a,{defaultValue:Ft[zt],onChange:function(dn){Ft[zt]=dn,rt(Ft),console.log("srore:L",Ft[zt])}})))})),T.a.createElement("div",{className:"mt20"},et.length>1&&T.a.createElement("span",null,T.a.createElement(Ke.a,{checked:Qe,onChange:function(zt){return St(zt.target.checked)},className:"".concat(M.a.color333," font14")},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),T.a.createElement("span",{className:"".concat(M.a.color999," font12")},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),T.a.createElement("aside",{className:"tr"},!(Ze!=null&&Ze.edit)&&T.a.createElement(X.a,{type:"default",onClick:function(){return an(!1)}},"\u53D6\u6D88"),T.a.createElement(X.a,{className:"ml20",type:"primary",onClick:function(){return ui()}},"\u4FDD\u5B58")))},cn=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Jn=function(){var pi=Object(s.a)(f.a.mark(function _n(Vt){return f.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:ln.t0=Vt.id,ln.next=ln.t0==="del"?3:ln.t0==="up"||ln.t0==="down"?5:ln.t0==="edit"?9:11;break;case 3:return W.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk:function(){return Object(s.a)(f.a.mark(function Dn(){return f.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return pn.next=2,Object(U.e)({pollsId:Ze.question_id});case 2:bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Ht)});case 3:case"end":return pn.stop()}},Dn)}))()}}),ln.abrupt("break",11);case 5:return ln.next=7,Object(U.j)({exerciseId:Ze==null?void 0:Ze.question_id,opr:Vt.id});case 7:return bt({type:"polls/getExerciseBanks",payload:Object(a.a)({},Ht)}),ln.abrupt("break",11);case 9:return an(!0),ln.abrupt("break",11);case 11:case"end":return ln.stop()}},_n)}));return function(Vt){return pi.apply(this,arguments)}}(),lr=function(){var _n;return T.a.createElement("aside",null,T.a.createElement("div",{className:M.a.questionType},T.a.createElement("div",null,T.a.createElement("span",{className:"font16 c-blue"},Ze.key,"\u3001\u5B9E\u8BAD\u9898"),"\uFF08",Ze.question_score,"\u5206\uFF09"),T.a.createElement("div",{className:"tr"},T.a.createElement(R.a,{target:"_blank",to:"/shixuns/".concat(Ze.shixun_identifier,"/challenges")},"\u5B9E\u8BAD\u8BE6\u60C5"),!Ze.hideAction&&cn.map(function(Vt,zt){return Vt.id==="up"&&Ze.key===1||Vt.id==="down"&&Ze.key===Ze.len?null:T.a.createElement(je.a,{key:zt,placement:"bottom",title:Vt.name},T.a.createElement("span",{onClick:function(){return Jn(Vt)},className:Vt.icon}))}))),T.a.createElement("div",{className:"font16"},Ze.shixun_name),T.a.createElement("div",{className:"mt30"}),(_n=Ze.shixun)===null||_n===void 0?void 0:_n.map(function(Vt,zt){return T.a.createElement("div",{key:zt},"\u7B2C",zt+1,"\u5173"," ",T.a.createElement("span",{className:"ml10"},Vt.challenge_name)," ",T.a.createElement("span",{className:"ml10"},Vt.challenge_score))}))};return T.a.createElement("section",{className:M.a.wrap},!yt&&lr(),yt&&un())},q=Object(j.a)(function(Re){var Pe=Re.problemset,it=Re.loading,ct=Re.globalSetting;return{problemset:Pe,globalSetting:ct,loading:it.effects}},null,null,{forwardRef:!0})(Object(v.forwardRef)(ce)),ee=H("UU91"),oe=H.n(ee),fe=H("fJjg"),ie=d.a.SubMenu,le=w.a.Content,me=w.a.Sider,ve=function(Pe){var it,ct,Ot,$t,bt,Ze,vn,Xe,bn,mn,Gt,qt,gn,xn,Ln,Rt,Ve,ft,xt,Lt,Ct,et,Tt,wt,gt,dt,Nt,Zt,Yt,Qe,St,yn,lt,jt,en,rn,at,Ft,rt,Dt,vt,yt,an,Ht,ui,un,cn,Jn,lr,pi,_n,Vt,zt,ln,dn,Dn,ri,pn=Pe.polls,ci=Pe.globalSetting,hr=Pe.loading,Br=Pe.user,xr=Pe.dispatch,la=Object(D.a)(Pe,["polls","globalSetting","loading","user","dispatch"]),xi=Object(B.i)(),ur=Object(B.h)(),Tr=Br.userInfo,ua=C.a.useForm(),jr=Object(L.a)(ua,1),er=jr[0],wr=Object(v.useState)([]),tr=Object(L.a)(wr,2),Oi=tr[0],nr=tr[1],fr=Object(v.useState)(!1),br=Object(L.a)(fr,2),Jr=br[0],Fi=br[1],ca=[{name:"\u9009\u62E9\u9898",id:0},{name:"\u5224\u65AD\u9898",id:2},{name:"\u586B\u7A7A\u9898",id:3},{name:"\u7B80\u7B54\u9898",id:4},{name:"\u5B9E\u8BAD\u9898",id:5}],ir=Object(v.useRef)();Object(v.useEffect)(function(){var ai;if((ai=pn.exerciseBanks)!==null&&ai!==void 0&&ai.exercise_questions){var Wn,vi,mi,Ki,Ut;nr(Object(A.a)((Wn=pn.exerciseBanks)===null||Wn===void 0?void 0:Wn.exercise_questions)),er.setFieldsValue({exercise_name:(vi=pn.exerciseBanks)===null||vi===void 0||((mi=vi.exercise)===null||mi===void 0)?void 0:mi.exercise_name,exercise_description:(Ki=pn.exerciseBanks)===null||Ki===void 0||((Ut=Ki.exercise)===null||Ut===void 0)?void 0:Ut.exercise_description})}},[pn.exerciseBanks]),Object(v.useEffect)(function(){xr({type:"polls/getExerciseBanks",payload:Object(a.a)({},xi)})},[xi.categoryId]);var _r=function(){var ai=Object(s.a)(f.a.mark(function Wn(){var vi,mi,Ki;return f.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return sn.next=2,er.validateFields();case 2:return Ki=er.getFieldValue(),Ki.is_md=!0,Ki.topicId=(vi=pn.exerciseBanks)===null||vi===void 0||((mi=vi.exercise)===null||mi===void 0)?void 0:mi.id,Fi(!1),sn.next=8,Object(U.v)(Object(a.a)({},Ki));case 8:xr({type:"polls/getExerciseBanks",payload:Object(a.a)({},xi)});case 9:case"end":return sn.stop()}},Wn)}));return function(){return ai.apply(this,arguments)}}(),Xi=function(){var ai=Object(s.a)(f.a.mark(function Wn(vi){var mi;return f.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Ut.next=2,ir==null?void 0:ir.current;case 2:if(mi=Ut.sent,!(mi!=null&&mi.isEdit)){Ut.next=6;break}return o.b.error("\u4E0D\u80FD\u540C\u65F6\u7F16\u8F91\u4E24\u9898"),Ut.abrupt("return");case 6:vi===5?xr({type:"classroomList/setActionTabs",payload:{key:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"}}):nr([].concat(Object(A.a)(Oi),[{question_type:vi}]));case 7:case"end":return Ut.stop()}},Wn)}));return function(vi){return ai.apply(this,arguments)}}(),Wi=function(){xr({type:"userDetail/setActionTabs",payload:{key:"UserDetail-SendToClass",params:{object_id:[xi.topicId],object_type:"exercise"}}})},Hr=function(){return Oi==null?void 0:Oi.map(function(Wn,vi){if(Wn.key=vi+1,Wn.len=Oi.length,Wn.question_type===0)return T.a.createElement("aside",null,T.a.createElement(de,{ref:ir,editData:Wn}),T.a.createElement(p.a,null));if(Wn.question_type===1)return T.a.createElement("aside",null,T.a.createElement(te,{ref:ir,editData:Wn}),T.a.createElement(p.a,null));if(Wn.question_type===2)return T.a.createElement("aside",null,T.a.createElement(Fe,{ref:ir,editData:Wn}),T.a.createElement(p.a,null));if(Wn.question_type===3)return T.a.createElement("aside",null,T.a.createElement(Et,{editData:Wn}),T.a.createElement(p.a,null));if(Wn.question_type===4)return T.a.createElement("aside",null,T.a.createElement(Kt,{editData:Wn}),T.a.createElement(p.a,null));if(Wn.question_type===5)return T.a.createElement("aside",null,T.a.createElement(q,{editData:Wn}),T.a.createElement(p.a,null))})};return T.a.createElement("section",{className:"edu-container"},T.a.createElement("section",{className:"animated fadeIn"},T.a.createElement("aside",{className:"mt10"},Tr&&T.a.createElement(u.a,{separator:">"},T.a.createElement(u.a.Item,null,T.a.createElement(R.a,{to:"/users/".concat(xi.username,"/").concat(xi.topictype==="personal"?"topics":"topicbank","/").concat(xi.topictype)},xi.topictype==="personal"?"\u6211\u7684\u9898\u5E93":"\u516C\u5171\u9898\u5E93")),T.a.createElement(u.a.Item,null,"\u8BE6\u60C5"))),T.a.createElement("aside",{className:[oe.a.title,"mt20"].join(" ")},T.a.createElement(I.a,{style:{width:"100%"},align:"middle"},T.a.createElement(m.a,{flex:"1"},T.a.createElement("strong",{className:"font20 ml5"},(it=pn.exerciseBanks)===null||it===void 0||((ct=it.exercise)===null||ct===void 0)?void 0:ct.exercise_name),T.a.createElement(mt.m,{status:[(Ot=pn.exerciseBanks)!==null&&Ot!==void 0&&($t=Ot.exercise)!==null&&$t!==void 0&&$t.is_public?"\u516C\u5F00":"\u79C1\u6709"]})),T.a.createElement(m.a,null,T.a.createElement(R.a,{className:"font16 c-light-black",to:"/users/".concat(Tr.login,"/topics/").concat(xi.topictype)},"\u8FD4\u56DE"))))),T.a.createElement("section",{className:[oe.a.bg,"pl30","pr30","pb30","mt20 relative"].join(" ")},T.a.createElement("div",{className:oe.a.export},((bt=pn.exerciseBanks)===null||bt===void 0?void 0:bt.authorize)&&T.a.createElement(T.a.Fragment,null,T.a.createElement("a",{onClick:function(Wn){Wn.preventDefault(),W.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:function(){var vi=Object(s.a)(f.a.mark(function Ki(){var Ut;return f.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return Qt.next=2,Object(_.g)({object_type:"normal",object_id:[xi.topicId]});case 2:Ut=Qt.sent,Ut.status===0&&j.d.push("/users/".concat(xi.username,"/topics/personal"));case 4:case"end":return Qt.stop()}},Ki)}));function mi(){return vi.apply(this,arguments)}return mi}()})}},"\u5220\u9664"),T.a.createElement(R.a,{to:"/users/".concat(Tr.login,"/topics/").concat(xi.topicId,"/").concat(xi.topictype,"/exercise/edit")},"\u7F16\u8F91")),T.a.createElement("a",{onClick:function(Wn){Wn.preventDefault(),Wi()}},"\u53D1\u9001")),T.a.createElement(N.a,{className:oe.a.tabs},T.a.createElement(N.a.TabPane,{tab:T.a.createElement("span",{className:"font16 pt10 pb12"},"\u5185\u5BB9\u8BE6\u60C5"),key:"1"},T.a.createElement("div",{className:"c-light-black"},(Ze=pn.exerciseBanks)===null||Ze===void 0||((vn=Ze.exercise)===null||vn===void 0)?void 0:vn.exercise_description))),Jr&&T.a.createElement(C.a,{layout:"vertical",form:er},T.a.createElement(C.a.Item,{name:"exercise_name",label:"\u8BD5\u5377\u6807\u9898\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},T.a.createElement(G.a,{maxLength:60,placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),T.a.createElement(C.a.Item,{label:"\u8BD5\u5377\u987B\u77E5\uFF1A",name:"exercise_description"},T.a.createElement(G.a.TextArea,{rows:6,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u672C\u6B21\u8BD5\u5377\u7B54\u9898\u7684\u76F8\u5173\u8BF4\u660E\uFF0C\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26"})),T.a.createElement(C.a.Item,{className:"tr"},T.a.createElement(X.a,{type:"primary",onClick:function(){_r()}},"\u4FDD\u5B58")))),T.a.createElement("p",{className:"mt10",style:{display:"flex"}},T.a.createElement("span",{className:"fl",style:{flex:"1"}},!!((Xe=pn.exerciseBanks)!==null&&Xe!==void 0&&(bn=Xe.exercise_types)!==null&&bn!==void 0&&bn.q_singles)&&T.a.createElement("span",{className:"ml20"},"\u5355\u9009\u9898",(mn=pn.exerciseBanks)===null||mn===void 0||((Gt=mn.exercise_types)===null||Gt===void 0)?void 0:Gt.q_singles,"\u9898\uFF0C\u5171",(qt=pn.exerciseBanks)===null||qt===void 0||((gn=qt.exercise_types)===null||gn===void 0)?void 0:gn.q_singles_scores,"\u5206"),!!((xn=pn.exerciseBanks)!==null&&xn!==void 0&&(Ln=xn.exercise_types)!==null&&Ln!==void 0&&Ln.q_doubles)&&T.a.createElement("span",{className:"ml20"},"\u591A\u9009\u9898",(Rt=pn.exerciseBanks)===null||Rt===void 0||((Ve=Rt.exercise_types)===null||Ve===void 0)?void 0:Ve.q_doubles,"\u9898\uFF0C\u5171",(ft=pn.exerciseBanks)===null||ft===void 0||((xt=ft.exercise_types)===null||xt===void 0)?void 0:xt.q_doubles_scores,"\u5206"),!!((Lt=pn.exerciseBanks)!==null&&Lt!==void 0&&(Ct=Lt.exercise_types)!==null&&Ct!==void 0&&Ct.q_judges)&&T.a.createElement("span",{className:"ml20"},"\u5224\u65AD\u9898",(et=pn.exerciseBanks)===null||et===void 0||((Tt=et.exercise_types)===null||Tt===void 0)?void 0:Tt.q_judges,"\u9898\uFF0C\u5171",(wt=pn.exerciseBanks)===null||wt===void 0||((gt=wt.exercise_types)===null||gt===void 0)?void 0:gt.q_judges_scores,"\u5206"),!!((dt=pn.exerciseBanks)!==null&&dt!==void 0&&(Nt=dt.exercise_types)!==null&&Nt!==void 0&&Nt.q_nulls)&&T.a.createElement("span",{className:"ml20"},"\u586B\u7A7A\u9898",(Zt=pn.exerciseBanks)===null||Zt===void 0||((Yt=Zt.exercise_types)===null||Yt===void 0)?void 0:Yt.q_nulls,"\u9898\uFF0C\u5171",(Qe=pn.exerciseBanks)===null||Qe===void 0||((St=Qe.exercise_types)===null||St===void 0)?void 0:St.q_nulls_scores,"\u5206"),!!((yn=pn.exerciseBanks)!==null&&yn!==void 0&&(lt=yn.exercise_types)!==null&<!==void 0&<.q_mains)&&T.a.createElement("span",{className:"ml20"},"\u7B80\u7B54\u9898",(jt=pn.exerciseBanks)===null||jt===void 0||((en=jt.exercise_types)===null||en===void 0)?void 0:en.q_mains,"\u9898\uFF0C\u5171",(rn=pn.exerciseBanks)===null||rn===void 0||((at=rn.exercise_types)===null||at===void 0)?void 0:at.q_mains_scores,"\u5206"),!!((Ft=pn.exerciseBanks)!==null&&Ft!==void 0&&(rt=Ft.exercise_types)!==null&&rt!==void 0&&rt.q_shixuns)&&T.a.createElement("span",{className:"ml20"},"\u5B9E\u8BAD\u9898",(Dt=pn.exerciseBanks)===null||Dt===void 0||((vt=Dt.exercise_types)===null||vt===void 0)?void 0:vt.q_shixuns,"\u9898\uFF0C\u5171",(yt=pn.exerciseBanks)===null||yt===void 0||((an=yt.exercise_types)===null||an===void 0)?void 0:an.q_shixuns_scores,"\u5206"),!!((Ht=pn.exerciseBanks)!==null&&Ht!==void 0&&(ui=Ht.exercise_types)!==null&&ui!==void 0&&ui.q_pros)&&T.a.createElement("span",{className:"ml20"},"\u7F16\u7A0B\u9898",(un=pn.exerciseBanks)===null||un===void 0||((cn=un.exercise_types)===null||cn===void 0)?void 0:cn.q_pros,"\u9898\uFF0C\u5171",(Jn=pn.exerciseBanks)===null||Jn===void 0||((lr=Jn.exercise_types)===null||lr===void 0)?void 0:lr.q_pros_scores,"\u5206")),T.a.createElement("span",{className:"fr"},!!((pi=pn.exerciseBanks)!==null&&pi!==void 0&&(_n=pi.exercise_types)!==null&&_n!==void 0&&_n.q_counts)&&T.a.createElement("span",null,"\u5408\u8BA1"," ",T.a.createElement("span",{className:"color-blue"},(Vt=pn.exerciseBanks)===null||Vt===void 0||((zt=Vt.exercise_types)===null||zt===void 0)?void 0:zt.q_counts)," ","\u9898\uFF0C \u5171"," ",T.a.createElement("span",{className:"".concat(((ln=pn.exerciseBanks)===null||ln===void 0||((dn=ln.exercise_types)===null||dn===void 0)?void 0:dn.q_scores)>100?"color-red font-bd":"color-orange")},(Dn=pn.exerciseBanks)===null||Dn===void 0||((ri=Dn.exercise_types)===null||ri===void 0)?void 0:ri.q_scores)," ","\u5206"))),T.a.createElement("section",{className:[oe.a.bg,"pt30","pl20","pr20","pb20","mt20"].join(" ")},Oi!=""&&Hr(),Oi==""&&T.a.createElement(J.a,null)),T.a.createElement(fe.a,null))},Ae=Ee.default=Object(j.a)(function(Re){var Pe=Re.polls,it=Re.loading,ct=Re.user,Ot=Re.globalSetting;return{polls:Pe,globalSetting:Ot,user:ct,loading:it.effects}})(ve)},Nf5h:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return n}),H.d(Ee,"i",function(){return c}),H.d(Ee,"l",function(){return s}),H.d(Ee,"f",function(){return C}),H.d(Ee,"j",function(){return w}),H.d(Ee,"d",function(){return Ue}),H.d(Ee,"b",function(){return Fe}),H.d(Ee,"h",function(){return ut}),H.d(Ee,"g",function(){return Je}),H.d(Ee,"k",function(){return le}),H.d(Ee,"e",function(){return vn}),H.d(Ee,"c",function(){return Ln});var ae=H("5NDa"),X=H("5rEg"),k=H("tJVT"),G=H("q1tI"),b=H.n(G),N=H("NQs2"),K=H.n(N),W=function(Ve){var ft=Ve.dataSource,xt=ft===void 0?[]:ft,Lt=Ve.bannerImg,Ct=Ve.img,et=Ve.imgWidth,Tt=et===void 0?346:et,wt=Ve.title,gt=Ve.sunTitle,dt=Ve.bannerExtraContent,Nt=Ve.placeholder,Zt=Ve.onChange,Yt=Object(G.useState)(""),Qe=Object(k.a)(Yt,2),St=Qe[0],yn=Qe[1];return b.a.createElement("div",{className:K.a.banner,style:{backgroundImage:"url('".concat(Lt,"')"),backgroundPosition:"center",backgroundSize:"cover"}},b.a.createElement("div",{className:K.a.content},b.a.createElement("aside",null,b.a.createElement("p",{style:{marginBottom:"".concat(xt.length==0?"0":"")}},b.a.createElement("b",null,wt),b.a.createElement("span",null,gt)),xt.length>0&&b.a.createElement("div",{className:K.a.btns},xt.map(function(lt,jt){return lt.buttonShow&&b.a.createElement(b.a.Fragment,null,lt.Button?lt.Button:b.a.createElement("div",{key:jt,onClick:lt.click},b.a.createElement("img",{src:lt.img,className:K.a.img_noactive}),b.a.createElement("img",{src:lt.img_active,className:K.a.img_active}),lt.name))})),dt),xt.length>0&&b.a.createElement("div",{className:K.a.input_warp},b.a.createElement(X.a,{value:St,onChange:function(jt){yn(jt.target.value)},placeholder:Nt,onPressEnter:function(){return Zt(St)},color:"#fff"}),b.a.createElement("i",{onClick:function(){return Zt(St)},className:"iconfont icon-sousuo9 font14 pl10 current"}))))},n=W,I=H("6nfa"),y=H.n(I),m=H("TSYQ"),g=H.n(m),u=function(Ve){var ft=Ve.dataSource,xt=ft===void 0?[]:ft,Lt=Ve.value,Ct=Ve.onChange,et=Ve.className,Tt=Ve.title,wt=Ve.titleWidth,gt=wt===void 0?56:wt,dt=Ve.style,Nt=dt===void 0?{}:dt,Zt=Ve.fontColor,Yt=Zt===void 0?"#6A7283":Zt,Qe=Ve.isId,St=Qe===void 0?!1:Qe,yn=Object(G.useState)(0),lt=Object(k.a)(yn,2),jt=lt[0],en=lt[1],rn=Object(G.useState)(!1),at=Object(k.a)(rn,2),Ft=at[0],rt=at[1],Dt=Object(G.useRef)(null);return Object(G.useEffect)(function(){if(xt.length!==0){var vt;(Dt==null||((vt=Dt.current)===null||vt===void 0)?void 0:vt.clientHeight)>98?en(1):en(0)}xt.length===0&&en(0)},[xt]),b.a.createElement("div",{className:g()(y.a.row,et),style:Nt},b.a.createElement("div",{style:{width:gt,marginTop:Ft?12:4},className:y.a.title},Tt),b.a.createElement("div",{className:Ft?"".concat(y.a.tagsWrap," ").concat(y.a.tagsBorderWrap):y.a.tagsWrap},b.a.createElement("div",{className:y.a.bar,style:jt>0?{height:jt===1?100:"auto",overflow:jt===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},b.a.createElement("div",{className:y.a.name,ref:Dt},xt==null?void 0:xt.map(function(vt){return b.a.createElement("span",{onClick:function(){return Ct(St?vt.id:vt.name)},key:St?vt.id:vt.name,title:vt.name,style:{color:Yt},className:Lt===(St?vt.id:vt.name)?y.a.active:""},vt.name)}))),!!jt&&b.a.createElement(G.Fragment,null,jt===1?b.a.createElement("div",{onClick:function(){var yt;en(2),(Dt==null||((yt=Dt.current)===null||yt===void 0)?void 0:yt.clientHeight)>205?rt(!0):rt(!1)},className:y.a.action},"\u5C55\u5F00",b.a.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):b.a.createElement("div",{onClick:function(){en(1),rt(!1)},className:y.a.action},"\u6536\u8D77",b.a.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},c=u,p=H("cz0n"),l=H.n(p),o=function(Ve){var ft=Ve.dataSource,xt=ft===void 0?[]:ft,Lt=Ve.value,Ct=Ve.onChange,et=Ve.className;return b.a.createElement("div",{className:g()(l.a.tabs,et)},xt.map(function(Tt){return b.a.createElement("span",{onClick:function(){return Ct(Tt.id)},className:Lt===Tt.id?l.a.active:"",key:Tt.id},Tt.name)}))},s=o,a=H("KOXS"),A=H.n(a),S=function(Ve){var ft,xt=Ve.dataSource,Lt=xt===void 0?[]:xt,Ct=Ve.value,et=Ve.onChange,Tt=Ve.className,wt=Ve.style,gt=wt===void 0?{}:wt,dt=Ve.placeholder,Nt=Object(G.useState)(""),Zt=Object(k.a)(Nt,2),Yt=Zt[0],Qe=Zt[1],St=Object(G.useState)(""),yn=Object(k.a)(St,2),lt=yn[0],jt=yn[1];Object(G.useEffect)(function(){var at;(at=JSON.stringify(Ct))!==null&&at!==void 0&&at.includes("{")?(Qe(Ct.id),jt(Ct.value)):jt(Ct)},[Ct]);var en=function(){et(lt||null,Yt||"")},rn=function(Ft){if(Ft===Yt)return;Qe(Ft),et(lt,Ft)};return b.a.createElement("div",{className:g()(A.a.input,Tt),style:gt},!!Lt.length&&b.a.createElement("div",{className:A.a.dropdown},b.a.createElement("div",{className:A.a.text},(ft=Lt.find(function(at){return at.id===Yt}))===null||ft===void 0?void 0:ft.name,b.a.createElement("i",{className:"iconfont icon-zhankai4"}),b.a.createElement("b",{className:A.a.b1}),b.a.createElement("b",{className:A.a.b2})),b.a.createElement("div",{className:A.a.menu},Lt.map(function(at,Ft){return b.a.createElement("div",{key:Ft,onClick:function(){return rn(at.id)}},at.name)}))),b.a.createElement(X.a,{onPressEnter:en,value:lt,onChange:function(Ft){return jt(Ft.target.value||"")},bordered:!1,placeholder:dt}),b.a.createElement("i",{onClick:en,className:"iconfont icon-sousuo9 font14 pl10 current"}))},C=S,L=H("f9pc"),D=H.n(L),O=function(Ve){var ft=Ve.value,xt=Ve.onChange,Lt=Ve.className,Ct=Ve.total,et=Ve.pageSize,Tt=Ve.style,wt=Tt===void 0?{}:Tt,gt=ft<2,dt=ft>=Math.ceil(Ct/et);return Ct<=et?b.a.createElement(b.a.Fragment,null):b.a.createElement("div",{className:g()(D.a.quickPager,Lt),style:wt},b.a.createElement("div",{onClick:function(){gt||xt(ft-1,"prev")},className:gt?D.a.disabled:""},"\u4E0A\u4E00\u9875"),b.a.createElement("div",{onClick:function(){dt||xt(ft+1,"next")},className:dt?D.a.disabled:""},"\u4E0B\u4E00\u9875"))},w=O,x=H("T2oS"),d=H("W9HT"),E=H("pC0b"),f=H("GzdX"),v=H("5Dmo"),T=H("3S7+"),B=H("Oe0F"),R=H.n(B),j=H("m3rI"),U=H("1vsH"),_=H("JAbv"),J=H.n(_),ne=H("Bq7L"),he=H.n(ne),be=H("MEgm"),Ke=H.n(be),De=H("BdwD"),je=function(Ve){var ft=Ve.className,xt=Ve.dataSource,Lt=xt===void 0?[]:xt,Ct=Ve.col,et=Ct===void 0?4:Ct,Tt=Ve.right,wt=Ve.bottom,gt=wt===void 0?23:wt,dt=Ve.precision,Nt=dt===void 0?0:dt,Zt=Ve.wrapWidth,Yt=Zt===void 0?1200:Zt,Qe=Ve.trackEventItems,St=Ve.loading,yn=Math.floor((Yt-(et-1)*Tt)/et);return b.a.createElement(d.a,{spinning:St},b.a.createElement("div",{className:g()(R.a.list,ft)},!!Lt.length&&Lt.map(function(lt,jt){var en=lt.name,rn=lt.id,at=lt.identifier,Ft=lt.power,rt=lt.cover_image_id,Dt=lt.pic;return b.a.createElement("div",{className:R.a.wrap,key:rn,style:{width:yn,marginRight:(1+jt)%et===0?0:Tt+Nt,marginBottom:gt}},b.a.createElement("a",{target:"_blank",href:"/shixuns/".concat(at,"/challenges"),className:R.a.li,onClick:function(yt){yt.preventDefault(),Qe&&Object(U.db)([Qe]),Ft&&Object(U.S)("/shixuns/".concat(at,"/challenges"))}},b.a.createElement("div",{className:R.a.img},b.a.createElement("img",{className:R.a.cover,src:rt?"".concat(j.a.API_SERVER,"/api/attachments/").concat(rt):"".concat(j.a.IMG_SERVER,"/").concat(Dt)}),lt.is_jupyter&&b.a.createElement("img",{className:R.a.sign,src:J.a}),lt.is_jupyter_lab&&b.a.createElement("img",{className:R.a.sign,src:he.a}),lt.is_unity_3d&&b.a.createElement("img",{className:R.a.sign,src:Ke.a})),b.a.createElement("div",{className:R.a.name},b.a.createElement(T.a,{title:en||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},b.a.createElement("span",{className:R.a.e},en||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),b.a.createElement("div",{className:R.a.tags},b.a.createElement(T.a,{placement:"bottom",title:"\u5173\u5361\u6570"},b.a.createElement("span",null,b.a.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr3"}),b.a.createElement("span",null,lt.challenges_count))),!!lt.myshixuns_count&&b.a.createElement(T.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},b.a.createElement("span",null,b.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),b.a.createElement("span",null,lt.myshixuns_count))),b.a.createElement(T.a,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},b.a.createElement("span",null,b.a.createElement("span",null,lt.level))),b.a.createElement("div",{className:R.a.rate},b.a.createElement(f.a,{allowHalf:!0,disabled:!0,defaultValue:lt.score_info}),b.a.createElement("span",null,"\xA0",lt.score_info?"".concat(lt.score_info,"\u5206"):"5\u5206")))),!Ft&&b.a.createElement("div",{className:R.a.lockWrap},b.a.createElement("img",{src:"".concat(j.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),b.a.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Lt.length&&b.a.createElement(De.a,null)))},Be=je,Ge=H("ZJlW"),_e=H.n(Ge),Y=H("z4EP"),M=H.n(Y),F=H("+GGh"),Q=H.n(F),te=H("cFMs"),V=H.n(te),ge=function(Ve){var ft=Ve.className,xt=Ve.dataSource,Lt=xt===void 0?[]:xt,Ct=Ve.col,et=Ct===void 0?4:Ct,Tt=Ve.right,wt=Ve.bottom,gt=wt===void 0?23:wt,dt=Ve.precision,Nt=dt===void 0?0:dt,Zt=Ve.wrapWidth,Yt=Zt===void 0?1200:Zt,Qe=Ve.trackEventItems,St=Ve.loading,yn=Math.floor((Yt-(et-1)*Tt)/et);return b.a.createElement(d.a,{spinning:St},b.a.createElement("div",{className:g()(_e.a.list,ft)},!!Lt.length&&Lt.map(function(lt,jt){var en=lt.name,rn=lt.id,at=lt.identifier,Ft=lt.featured,rt=lt.school_name,Dt=lt.image_url,vt=lt.excellent;return b.a.createElement("div",{key:rn,className:_e.a.wrap,style:{width:yn,marginRight:(1+jt)%et===0?0:Tt+Nt,marginBottom:gt}},b.a.createElement("a",{target:"_blank",href:"/paths/".concat(at),className:_e.a.li,onClick:function(an){an.preventDefault(),Qe&&Object(U.db)([Qe]),Object(U.S)("/paths/".concat(at))}},b.a.createElement("div",{className:_e.a.img},b.a.createElement("img",{className:_e.a.cover,src:"".concat(j.a.IMG_SERVER,"/").concat(Dt)}),Ft===1&&b.a.createElement("img",{className:_e.a.sign,src:M.a}),Ft===2&&b.a.createElement("img",{className:_e.a.sign,src:""}),Ft===3&&b.a.createElement("img",{className:_e.a.sign,src:Q.a}),Ft===4&&b.a.createElement("img",{className:_e.a.sign,src:""}),Ft===5&&b.a.createElement("img",{className:_e.a.sign,src:V.a})),b.a.createElement("div",{className:_e.a.name},b.a.createElement(T.a,{title:en},b.a.createElement("span",{className:_e.a.e},en))),b.a.createElement(T.a,{title:"\u53D1\u5E03\u5355\u4F4D\uFF1A".concat(rt)},b.a.createElement("div",{className:_e.a.unit},b.a.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),rt)),b.a.createElement("div",{className:_e.a.tags},b.a.createElement(T.a,{placement:"bottom",title:"\u7AE0\u8282\u6570"},b.a.createElement("span",null,b.a.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),b.a.createElement("span",null,lt.stages_count))),b.a.createElement(T.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},b.a.createElement("span",null,b.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),b.a.createElement("span",null,lt.members_count))),vt&&b.a.createElement("div",{className:_e.a.tag},"\u5F00\u653E\u8BFE\u7A0B"))))}),!Lt.length&&b.a.createElement(De.a,null)))},Ue=ge,Ye=H("iL++"),de=H.n(Ye),xe=H("xiVL"),Me=function(Ve){var ft=Ve.className,xt=Ve.dataSource,Lt=xt===void 0?[]:xt,Ct=Ve.col,et=Ct===void 0?4:Ct,Tt=Ve.right,wt=Ve.bottom,gt=wt===void 0?23:wt,dt=Ve.precision,Nt=dt===void 0?0:dt,Zt=Ve.wrapWidth,Yt=Zt===void 0?1200:Zt,Qe=Ve.trackEventItems,St=Ve.loading,yn=Math.floor((Yt-(et-1)*Tt)/et);return b.a.createElement(d.a,{spinning:St},b.a.createElement("div",{className:g()(de.a.list,ft)},!!Lt.length&&Lt.map(function(lt,jt){var en=lt.subject_identifier,rn=lt.id,at=lt.identifier,Ft=lt.power,rt=lt.is_public!=0&<.is_public;return b.a.createElement("div",{className:de.a.wrap,key:rn,style:{width:yn,marginRight:(1+jt)%et===0?0:Tt+Nt,marginBottom:gt}},b.a.createElement("a",{className:de.a.li,onClick:function(vt){vt.preventDefault()}},b.a.createElement("div",{className:de.a.top},b.a.createElement(T.a,{title:lt.name},b.a.createElement("div",{className:de.a.name},lt.name)),b.a.createElement("img",{className:de.a.img,src:j.a.IMG_SERVER+"/images/"+lt.avatar_url}),b.a.createElement("div",{className:de.a.text},lt.creator),en&&b.a.createElement("div",{className:de.a.btns},b.a.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),b.a.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),rt&&b.a.createElement("div",{className:de.a.sign},"\u516C\u5F00")),b.a.createElement("div",{className:de.a.bottom},lt.visits>0&&b.a.createElement(T.a,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},b.a.createElement("span",null,b.a.createElement("i",{className:"iconfont icon-liulanyan"}),b.a.createElement("span",null,lt.visits))),lt.course_members_count>0&&b.a.createElement(T.a,{title:"\u6210\u5458",placement:"bottom"},b.a.createElement("span",null,b.a.createElement("i",{className:"iconfont icon-chengyuan"}),lt.course_members_count)),lt.tasks_count>0&&b.a.createElement(T.a,{title:"\u4F5C\u4E1A",placement:"bottom"},b.a.createElement("span",null,b.a.createElement("i",{className:"iconfont icon-zuoye"}),lt.tasks_count)),lt.is_end?b.a.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):b.a.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),b.a.createElement("div",{className:de.a.lockWrap},lt.is_accessible?b.a.createElement(b.a.Fragment,null,en&&b.a.createElement("div",{onClick:function(){return Object(U.S)("/paths/".concat(en))}},"\u8FDB\u5165\u5B9E\u8DF5\u8BFE\u7A0B"),b.a.createElement("div",{onClick:function(vt){Qe&&Object(U.db)([Qe]),Object(U.S)(lt.first_category_url)}},"\u8FDB\u5165\u6559\u5B66\u8BFE\u5802")):b.a.createElement(b.a.Fragment,null,b.a.createElement("img",{src:"".concat(j.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),b.a.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165"))))}),!Lt.length&&b.a.createElement(De.a,null)))},Fe=Me,$e=H("f0W+"),st=H.n($e),mt=function(Ve){var ft=Ve.dataSource,xt=ft===void 0?[]:ft,Lt=Ve.value,Ct=Ve.onChange,et=Ve.className,Tt=Ve.style,wt=Tt===void 0?{}:Tt,gt=Ve.tabBarExtraContent;return b.a.createElement("div",{className:g()(st.a.tabs,et),style:wt},b.a.createElement("div",{className:st.a.tabsWrap},xt.map(function(dt,Nt){return b.a.createElement("div",{onClick:function(){return Ct(dt.id)},className:Lt===dt.id?st.a.active:"",key:Nt},dt.name)})),b.a.createElement("div",{className:st.a.tabBar},gt))},ut=mt,Pt=H("9JIy"),Et=H.n(Pt),At=function(Ve){var ft=Ve.className,xt=Ve.style,Lt=xt===void 0?{}:xt,Ct=Ve.children;return b.a.createElement("div",{className:g()(Et.a.table,ft),style:Lt},Ct)},Je=At,Kt=H("qVdP"),Bt=H("jsC+"),ce=H("lUTK"),q=H("BvKs"),ee=H("8WcF"),oe=H.n(ee),fe=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}],ie=function(Ve){var ft,xt=Ve.sortValue,Lt=Ve.dropValue,Ct=Ve.className,et=Ve.onSort,Tt=Ve.onDrop,wt=Ve.dataSource,gt=wt===void 0?fe:wt;return b.a.createElement("div",{className:g()(oe.a.orderWrap,Ct)},b.a.createElement(Bt.a,{overlay:b.a.createElement(q.a,null,gt.map(function(dt,Nt){return b.a.createElement(q.a.Item,{key:Nt,onClick:function(){return Tt(dt.id)}},dt.name)}))},b.a.createElement("span",{className:oe.a.orderTextWrap},(ft=gt.find(function(dt){return Lt===dt.id}))===null||ft===void 0?void 0:ft.name)),b.a.createElement("span",{className:oe.a.orderIconWrap},b.a.createElement("span",{className:oe.a.orderAsc},b.a.createElement("i",{className:xt==="asc"?"iconfont icon-sanjiaoxing-up font12 ".concat(oe.a.cursorPointer," ").concat(oe.a.active):"iconfont icon-sanjiaoxing-up font12 ".concat(oe.a.cursorPointer),onClick:function(){return et(xt==="asc"?"desc":"asc")}})),b.a.createElement("span",{className:oe.a.orderDesc},b.a.createElement("i",{className:xt==="desc"?"iconfont icon-sanjiaoxing-down font12 ".concat(oe.a.cursorPointer," ").concat(oe.a.active):"iconfont icon-sanjiaoxing-down font12 ".concat(oe.a.cursorPointer),onClick:function(){return et(xt==="asc"?"desc":"asc")}}))))},le=ie,me=H("+L6B"),ve=H("2/Rp"),Ae=H("0Owb"),Re=H("9og8"),Pe=H("PpiC"),it=H("WmNS"),ct=H.n(it),Ot=H("siWv"),$t=H.n(Ot),bt=H("LvDl"),Ze=function(Ve){var ft=Ve.className,xt=Ve.style,Lt=Ve.children,Ct=Ve.loading,et=Ct===void 0?!1:Ct,Tt=Ve.openLoading,wt=Ve.onClick,gt=wt===void 0?function(){}:wt,dt=Ve.size,Nt=dt===void 0?"middle":dt,Zt=Ve.shape,Yt=Zt===void 0?"round":Zt,Qe=Ve.type,St=Qe===void 0?"default":Qe,yn=Object(Pe.a)(Ve,["className","style","children","loading","openLoading","onClick","size","shape","type"]),lt=Object(G.useState)(!1),jt=Object(k.a)(lt,2),en=jt[0],rn=jt[1];return b.a.createElement(ve.a,Object(Ae.a)({onClick:Object(bt.throttle)(function(){var at=Object(Re.a)(ct.a.mark(function Ft(rt){return ct.a.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:return Tt&&rn(!0),vt.prev=1,vt.next=4,gt(rt);case 4:vt.next=9;break;case 6:vt.prev=6,vt.t0=vt.catch(1),console.log("error",vt.t0);case 9:Tt&&rn(!1);case 10:case"end":return vt.stop()}},Ft,null,[[1,6]])}));return function(Ft){return at.apply(this,arguments)}}(),2e3,{leading:!0,trailing:!1}),className:g()($t.a.btn,$t.a["".concat(Nt,"-").concat(Yt)],ft),style:xt,size:Nt,shape:Yt,type:St,loading:en||et},yn),Lt)},vn=Ze,Xe=H("+oxA"),bn=H.n(Xe),mn=function(Ve){var ft=Ve.className,xt=Ve.style,Lt=Ve.children,Ct=Lt===void 0?null:Lt,et=Ve.onClick,Tt=Ve.title;return b.a.createElement("div",{className:g()(bn.a.head,ft),style:xt},b.a.createElement("span",{className:"primary-hover",onClick:et},b.a.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),b.a.createElement("b",{title:Tt},Tt),b.a.createElement("div",{className:bn.a.node},Ct))},Gt=mn,qt=H("fgAr"),gn=H.n(qt),xn=function(Ve){var ft=Ve.confirmShow,xt=ft===void 0?!0:ft,Lt=Ve.confirmTitle,Ct=Ve.confirmClick,et=Ve.cancelShow,Tt=et===void 0?!0:et,wt=Ve.cancelTitle,gt=Ve.cancelClick,dt=Ve.className,Nt=Ve.style,Zt=Ve.confirmLoading,Yt=Zt===void 0?!1:Zt;return b.a.createElement("div",{className:g()(gn.a.btns,dt),style:Nt},xt&&b.a.createElement(ve.a,{loading:Yt,onClick:Ct,type:"primary",className:gn.a.confirm},Lt),Tt&&b.a.createElement(ve.a,{onClick:gt,className:gn.a.cancel},wt))},Ln=xn},Nska:function(tt,Ee,H){tt.exports={title:"title___18s87",radioWrap:"radioWrap___3ZobS",radio:"radio___19YEl",colorFF0000:"colorFF0000___2BuLq",pagination:"pagination___18hXH"}},O2Wb:function(tt,Ee,H){tt.exports={flex:"flex___2gmSR",flex1:"flex1___3Tu1g",color666:"color666___2uyGL",error:"error___yJ86W",deleteIcon:"deleteIcon___1D2tg",addIcon:"addIcon___2VIYB"}},Oe0F:function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___1lU21",flex_space_between:"flex_space_between___3CfJd",flex_box_vertical_center:"flex_box_vertical_center___20q2h",flex_box_center_end:"flex_box_center_end___1jeZT",flex_box_column:"flex_box_column___2EyZF",list:"list___3Kz8E",wrap:"wrap___12_X7",lockWrap:"lockWrap___9zL4z",li:"li___2bcH1",cover:"cover___1j6mq",img:"img___3itdG",sign:"sign___1Bm21",name:"name___3H1zU",e:"e___1W7k4",tags:"tags___G1tID",rate:"rate___aZiJa"}},Ot1p:function(tt,Ee,H){"use strict";var ae=H("2qtc"),X=H("kLXV"),k=H("rAM+"),G=H("miYZ"),b=H("tsqr"),N=H("9og8"),K=H("tJVT"),W=H("jrin"),n=H("WmNS"),I=H.n(n),y=H("q1tI"),m=H.n(y),g=H("VrN/"),u=H.n(g),c=H("bdgK"),p=H("p77/"),l=H("Bd2K"),o=H("ELLl"),s=H("19Vz"),a=H("lZu9"),A=H("+NIl"),S=H("kSUc"),C=H("9Bee"),L=function(Ae){var Re=Ae.value,Pe=Re===void 0?"":Re,it=Ae.className,ct=Ae.showTextOnly,Ot=Ae.showLines,$t=Ae.style,bt=$t===void 0?{}:$t,Ze=Object(y.useMemo)(function(){return""},[Pe]);return m.a.createElement(m.a.Fragment,null,m.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ze}}))},D=H("0Owb"),O=H("dejd"),w=H("C+DQ"),x=H("1vsH"),d=H("m3rI"),E=[{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 f(Ae){var Re=Ae.onActionCallback,Pe=Ae.title,it=Ae.icon,ct=Ae.actionName,Ot=Ae.className,$t=Ot===void 0?"":Ot,bt=Ae.children;function Ze(){Re(ct)}return m.a.createElement("a",{title:Pe,className:$t,onClick:Ze},m.a.createElement("i",{className:"md-iconfont ".concat(it)}),bt)}var v=function(Ae){var Re=Ae.watch,Pe=Ae.showNullButton,it=Ae.onActionCallback,ct=Ae.fullScreen,Ot=Ae.insertTemp,$t=Ae.hidetoolBar,bt=Ae.uuid,Ze=Ae.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(x.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(x.F)("_educoder_session"),"&key=").concat(bt,"&api=").concat(encodeURIComponent(d.a.PROXY_SERVER)));var vn=[].concat(E,[{title:"".concat(Re?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Re?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return m.a.createElement("ul",{className:"markdown-toolbar-container"},!$t&&vn.map(function(Xe,bn){return m.a.createElement("li",{key:bn},Xe.actionName?m.a.createElement(f,Object(D.a)({},Xe,{onActionCallback:it})):m.a.createElement("span",{className:"v-line"}))}),Pe?m.a.createElement("li",null,m.a.createElement(f,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:it},m.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ot&&m.a.createElement("li",null,m.a.createElement(f,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ot),onActionCallback:it},m.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),m.a.createElement("li",{className:"btn-full-screen"},m.a.createElement(f,{icon:"".concat(ct?"icon-shrink":"icon-enlarge"),title:ct?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:it})))},T=H("M8RZ"),B=H("+L6B"),R=H("2/Rp"),j=H("y8nQ"),U=H("Vl3Y"),_=H("5NDa"),J=H("5rEg"),ne={labelCol:{span:4},wrapperCol:{span:20}},he=function(Ae){var Re=Ae.callback,Pe=Ae.onCancel;function it(ct){Re(ct)}return m.a.createElement(U.a,Object(D.a)({},ne,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:it}),m.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},m.a.createElement(J.a,null)),m.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},m.a.createElement(J.a,null)),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(R.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))},be=H("7ahc"),Ke=H("HmJG"),De=H("BjJ7"),je=U.a.useForm,Be={width:280,marginRight:10},Ge={labelCol:{span:5},wrapperCol:{span:19}},_e=function(Ae){var Re=Ae.callback,Pe=Ae.onCancel,it=je(),ct=Object(K.a)(it,1),Ot=ct[0];function $t(vn){Re(vn)}function bt(vn,Xe){if(vn.status===-1){b.b.error(vn.message);return}Ot.setFieldsValue({src:"/api/attachments/".concat(vn.id),type:Xe.type})}function Ze(vn){var Xe=vn.target.files[0];M(Xe,bt)}return m.a.createElement(U.a,Object(D.a)({form:Ot},Ge,{className:"upload-image-panel",onFinish:$t}),m.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},m.a.createElement("div",{className:"flex-container"},m.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},m.a.createElement(J.a,{style:Be})),m.a.createElement(Y,{onFileChange:Ze}))),m.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},m.a.createElement(J.a,{style:{width:264}})),m.a.createElement(U.a.Item,{style:{textAlign:"right"}},m.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(R.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))};function Y(Ae){var Re=Ae.onFileChange;return m.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",m.a.createElement("input",{type:"file",onChange:Re}))}function M(Ae,Re){if(!Ae)throw new String("\u6CA1\u6709\u6587\u4EF6");var Pe=new FormData;Pe.append("editormd-image-file",Ae),Pe.append("file_param_name","editormd-image-file"),Pe.append("byxhr","true");var it=new window.XMLHttpRequest;it.withCredentials=!0,it.addEventListener("load",function(ct){Re(JSON.parse(ct.target.responseText),Ae)},!1),it.addEventListener("error",function(ct){console.error(ct)},!1),it.open("POST","".concat(De.a,"/api/attachments.json")),it.send(Pe)}var F=H("giR+"),Q=H("fyUT"),te=H("7Kak"),V=H("9yH6"),ge=V.a.Group,Ue={margin:"0 8px"},Ye=function(Ae){var Re=Ae.callback,Pe=Ae.onCancel;function it(ct){Re(ct)}return m.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:it},m.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},m.a.createElement("span",{style:Ue},"\u5355\u5143\u683C\u6570\uFF1A"),m.a.createElement("span",{style:Ue},"\u884C\u6570"),m.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},m.a.createElement(Q.a,null)),m.a.createElement("span",{style:Ue},"\u5217\u6570"),m.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},m.a.createElement(Q.a,null))),m.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},m.a.createElement("span",{style:Ue},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),m.a.createElement(U.a.Item,{name:"align"},m.a.createElement(ge,null,m.a.createElement(V.a,{value:"default"},m.a.createElement("i",{className:"fa fa-align-justify"})),m.a.createElement(V.a,{value:"left"},m.a.createElement("i",{className:"fa fa-align-left"})),m.a.createElement(V.a,{value:"center"},m.a.createElement("i",{className:"fa fa-align-center"})),m.a.createElement(V.a,{value:"right"},m.a.createElement("i",{className:"fa fa-align-right"}))))),m.a.createElement("div",{className:"flex-container flex-end"},m.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),m.a.createElement(R.a,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))},de=H("ErOA"),xe=H("7Cbv"),Me="link",Fe="upload-image",$e="code-block",st="add-table",mt="------------",ut={default:mt,left:":".concat(mt),center:":".concat(mt,":"),right:"".concat(mt,":")},Pt=H("9VGf"),Et,At;function Je(){}var Kt=0,Bt=1e4,ce="\u2581",q=`
|
|
**\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 ee(Ae){return/^\d+$/.test(Ae)?"".concat(Ae,"px"):Ae}var oe=navigator.platform.toUpperCase().indexOf("MAC")>=0,fe=oe?"Cmd":"Ctrl",ie=["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"],le=(Et={},Object(W.a)(Et,fe+"-B","bold"),Object(W.a)(Et,fe+"-I","italic"),Et),me=(At={},Object(W.a)(At,Me,"\u6DFB\u52A0\u94FE\u63A5"),Object(W.a)(At,$e,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(W.a)(At,Fe,"\u6DFB\u52A0\u6587\u4EF6"),Object(W.a)(At,st,"\u6DFB\u52A0\u8868\u683C"),At),ve=Ee.a=function(Ae){var Re=Ae.defaultValue,Pe=Re===void 0?"":Re,it=Ae.onChange,ct=Ae.width,Ot=ct===void 0?"100%":ct,$t=Ae.height,bt=$t===void 0?400:$t,Ze=Ae.miniToolbar,vn=Ze===void 0?!1:Ze,Xe=Ae.isFocus,bn=Xe===void 0?!1:Xe,mn=Ae.watch,Gt=Ae.insertTemp,qt=Ae.mode,gn=qt===void 0?"markdown":qt,xn=Ae.id,Ln=xn===void 0?"markdown-editor-id":xn,Rt=Ae.showResizeBar,Ve=Rt===void 0?!1:Rt,ft=Ae.noStorage,xt=ft===void 0?!1:ft,Lt=Ae.showNullButton,Ct=Lt===void 0?!1:Lt,et=Ae.hidetoolBar,Tt=et===void 0?!1:et,wt=Ae.fullScreen,gt=wt===void 0?!1:wt,dt=Ae.onBlur,Nt=Ae.onCMBeforeChange,Zt=Ae.onFullScreen,Yt=Ae.className,Qe=Yt===void 0?"":Yt,St=Ae.disablePaste,yn=St===void 0?!1:St,lt=Ae.placeholder,jt=lt===void 0?"":lt,en=Ae.values,rn=en===void 0?"":en,at=Object(y.useState)(null),Ft=Object(K.a)(at,2),rt=Ft[0],Dt=Ft[1],vt=Object(y.useState)(Pe),yt=Object(K.a)(vt,2),an=yt[0],Ht=yt[1],ui=Object(y.useState)(mn),un=Object(K.a)(ui,2),cn=un[0],Jn=un[1],lr=Object(y.useState)(gt),pi=Object(K.a)(lr,2),_n=pi[0],Vt=pi[1],zt=Object(y.useState)(""),ln=Object(K.a)(zt,2),dn=ln[0],Dn=ln[1],ri=Object(y.useState)(0),pn=Object(K.a)(ri,2),ci=pn[0],hr=pn[1],Br=Object(y.useState)(bt),xr=Object(K.a)(Br,2),la=xr[0],xi=xr[1],ur=Object(y.useState)(!1),Tr=Object(K.a)(ur,2),ua=Tr[0],jr=Tr[1],er=Object(y.useRef)(Object(xe.a)()),wr=Object(y.useRef)(!1),tr=Object(y.useRef)(),Oi=Object(y.useRef)(),nr=Object(y.useRef)(),fr=Object(y.useRef)(),br=Object(y.useRef)(),Jr=function(){var Ut=Object(N.a)(I.a.mark(function sn(){var Qt,On;return I.a.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return Xn.next=2,Object(de.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:er.current}});case 2:On=Xn.sent,On!=null&&(Qt=On.attachments)!==null&&Qt!==void 0&&Qt.length&&(console.log("cm:",rt,Oi),On.attachments.map(function(Un){Un.content_type.indexOf("image")>-1?rt.replaceSelection(".concat(Un.content_type,")")):Un.content_type.indexOf("video")>-1?rt.replaceSelection('<video width="100%" controls src="'.concat(d.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Un.content_type.indexOf("pdf")>-1?rt.replaceSelection('<a href="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Un.id,"?type=").concat(Un.content_type,'&disposition=inline" target="_blank">').concat(Un.name,"</a>")):rt.replaceSelection("[".concat(Un.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(Un.id,"?type=").concat(Un.content_type,")"))}));case 4:case"end":return Xn.stop()}},sn)}));return function(){return Ut.apply(this,arguments)}}();Object(y.useEffect)(function(){Ht(rn),rt==null||rt.setValue(rn)},[rn]),Object(y.useEffect)(function(){Zt==null||Zt(_n)},[_n]),Object(y.useEffect)(function(){if(Oi.current){var Ut=u.a.fromTextArea(Oi.current,{mode:gn,lineNumbers:!vn,lineWrapping:!0,value:Pe,autoCloseTags:!0,autoCloseBrackets:!0});bn&&Ut.focus();function sn(Qt,On){if(yn){On.preventDefault();return}var jn=On.clipboardData;if(jn){var Xn=jn.types.toString(),Un=jn.items;if(Xn==="Files"||jn.types.indexOf("Files")>-1){if(On.preventDefault(),gn=="stex")return;try{var yi,Yi=Un[1];((yi=Un[0])===null||yi===void 0?void 0:yi.kind)==="file"&&(Yi=Un[0]);var In=Yi.getAsFile(),Sr=In.name.split(".").pop();M(In,function(Gn){if(Gn.id){var Bi,Pi,cr;(In==null||((Bi=In.type)===null||Bi===void 0)?void 0:Bi.indexOf("image"))>-1?Ut.replaceSelection(".concat(Gn.content_type,")")):(In==null||((Pi=In.type)===null||Pi===void 0)?void 0:Pi.indexOf("video"))>-1?Ut.replaceSelection('<video width="100%" controls src="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Gn.id,'"></video>')):(In==null||((cr=In.type)===null||cr===void 0)?void 0:cr.indexOf("pdf"))>-1?Ut.replaceSelection('<a href="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Gn.id,"?type=").concat(In.type,'&disposition=inline" target="_blank">').concat(In.name,"</a>")):ie.includes(Sr)?Ut.replaceSelection('<a href="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Gn.id,'?type=office&disposition=inline" target="_blank">').concat(In.name,"</a>")):Ut.replaceSelection("[".concat(In.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(Gn.id,"?type=").concat(Gn.content_type,")"))}else(Gn==null?void 0:Gn.status)===401&&(document.location.href="/user/login")})}catch(Gn){b.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Ut.on("paste",sn),Ut.on("dragleave",function(Qt,On){nr.current.classList.remove("mouse-hover-md")}),Ut.on("dragover",function(Qt,On){nr.current.classList.add("mouse-hover-md")}),Ut.on("drop",function(Qt,On){nr.current.classList.add("mouse-hover-md");var jn;if(jn=On.dataTransfer.files,jn.length>0){On.preventDefault(),On.stopPropagation();for(var Xn=function(Yi){var In=jn[Yi],Sr=In.name.split(".").pop();M(In,function(Gn){if(Gn.id){var Bi,Pi,cr;(In==null||((Bi=In.type)===null||Bi===void 0)?void 0:Bi.indexOf("image"))>-1?Ut.replaceSelection(".concat(Gn.content_type,")")):(In==null||((Pi=In.type)===null||Pi===void 0)?void 0:Pi.indexOf("video"))>-1?Ut.replaceSelection('<video width="100%" controls src="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Gn.id,'"></video>')):(In==null||((cr=In.type)===null||cr===void 0)?void 0:cr.indexOf("pdf"))>-1?Ut.replaceSelection('<a href="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Gn.id,"?type=").concat(In.type,'&disposition=inline" target="_blank">').concat(In.name,"</a>")):ie.includes(Sr)?Ut.replaceSelection('<a href="'.concat(d.a.API_SERVER,"/api/attachments/").concat(Gn.id,'?type=office&disposition=inline" target="_blank">').concat(In.name,"</a>")):Ut.replaceSelection("[".concat(In.name,"](").concat(d.a.API_SERVER,"/api/attachments/").concat(Gn.id,"?type=").concat(Gn.content_type,")"))}else(Gn==null?void 0:Gn.status)===401&&(document.location.href="/user/login")})},Un=0;Un<jn.length;Un++)Xn(Un)}}),Dt(Ut),function(){Ut.off("paste",sn)}}},[]);var Fi=Object(y.useCallback)(function(){if(nr.current)try{}catch(Ut){console.log(Ut,"---- to set md editor body height")}},[la,nr,_n]);Object(y.useEffect)(function(){function Ut(){var Qt=new c.default(function(On){var jn=Object(k.a)(On),Xn;try{for(jn.s();!(Xn=jn.n()).done;){var Un=Xn.value;(Un.target.offsetHeight>0||Un.target.offsetWidth>0)&&(Fi(),rt.setSize("100%","100%"),rt.refresh())}}catch(yi){jn.e(yi)}finally{jn.f()}});return Qt.observe(Oi.current.parentElement),Qt}if(rt){var sn=Ut();return function(){sn.unobserve(Oi.current.parentElement)}}},[rt,Fi]),Object(y.useEffect)(function(){if(rt){for(var Ut=[],sn=function(){var Un=On[Qt];jn=Object(K.a)(Un,2);var yi=jn[0],Yi=jn[1],In=Object(W.a)({},yi,function(){ca(Yi)});Ut.push(In),rt.addKeyMap(In)},Qt=0,On=Object.entries(le);Qt<On.length;Qt++){var jn;sn()}return tr.current=setInterval(function(){wr.current&&Jr()},4e3),function(){clearInterval(tr.current);var Xn=Object(k.a)(Ut),Un;try{for(Xn.s();!(Un=Xn.n()).done;){var yi=Un.value;rt.removeKeyMap(yi)}}catch(Yi){Xn.e(Yi)}finally{Xn.f()}}}},[rt]),Object(y.useEffect)(function(){gt!==_n&&Vt(gt)},[gt]),Object(Pt.a)(function(){if(!xt&&ci>0){var Ut=new Date().getTime(),sn=window.sessionStorage.getItem(Ln);Ut>=ci+Bt&&(!sn||sn!==an)&&(window.sessionStorage.setItem(Ln,an),jr(!0))}},Bt),Object(y.useEffect)(function(){Jn(mn)},[rt,mn]),Object(y.useEffect)(function(){rt&&(bn&&rt.focus())},[rt,bn]),Object(y.useEffect)(function(){if(cn&&rt){var Ut=rt.getScrollerElement();function sn(Qt){var On=Qt.target;if(br.current){var jn=On.scrollTop/On.scrollHeight;br.current.scrollTop=br.current.scrollHeight*jn}}return Ut.addEventListener("scroll",sn),function(){Ut.removeEventListener("scroll",sn)}}},[rt,cn]),Object(y.useEffect)(function(){if(rt&&Nt){function Ut(sn,Qt){Nt(sn,Qt)}return rt.on("beforeChange",Ut),function(){rt.off("beforeChange",Ut)}}},[rt,Nt]),Object(y.useEffect)(function(){if(rt&&dt){function Ut(){dt(rt.getValue())}return rt.on("blur",Ut),function(){rt.off("blur",Ut)}}},[rt,dt]),Object(y.useEffect)(function(){if(rt){function Ut(sn){var Qt=sn.getValue();Ht(Qt),hr(new Date().getTime()),sn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),it&&it(Qt)}return rt.on("change",Ut),function(){rt.off("change",Ut)}}},[rt,it]),Object(y.useEffect)(function(){rt&&(Pe==null?(rt.setValue(""),Ht("")):Pe!==rt.getValue()&&(rt.setValue(Pe),Ht(Pe),rt.setCursor(rt.lineCount(),0)))},[rt,Pe]);var ca=Object(y.useCallback)(function(Ut){var sn=rt.getCursor(),Qt=rt.getSelection(),On=Qt.split(`
|
|
`);switch(Ut){case"bold":return rt.replaceSelection("**"+Qt+"**"),Qt===""&&rt.setCursor(sn.line,sn.ch+2),rt.focus();case"italic":return rt.replaceSelection("*"+Qt+"*"),Qt===""&&rt.setCursor(sn.line,sn.ch+1),rt.focus();case"code":return rt.replaceSelection("`"+Qt+"`"),Qt===""&&rt.setCursor(sn.line,sn.ch+1),rt.focus();case"inline-latex":return rt.replaceSelection("`$$"+Qt+"$$`"),Qt===""&&rt.setCursor(sn.line,sn.ch+3),rt.focus();case"latex":return rt.replaceSelection("```latex\n"+Qt+"\n```"),rt.setCursor(sn.line+1,Qt.length+1),rt.focus();case"line-break":return rt.replaceSelection(`<br/>
|
|
`),rt.focus();case"list-ul":return Qt===""?rt.replaceSelection("- "+Qt):rt.replaceSelection(On.map(function(jn){return jn===""?"":"- ".concat(jn)}).join(`
|
|
`)),rt.focus();case"list-ol":return Qt===""?rt.replaceSelection("1. "+Qt):rt.replaceSelection(On.map(function(jn,Xn){return jn===""?"":"".concat(Xn+1,". ").concat(jn)}).join(`
|
|
`)),rt.focus();case"add-null-ch":return Qt===""&&rt.setCursor(sn.line,sn.ch+1),rt.replaceSelection(ce),rt.focus();case"inster-template-1":return Qt===""&&rt.setCursor(sn.line,sn.ch),rt.replaceSelection(q),rt.focus();case"eraser":return rt.setValue(""),rt.focus();case"trigger-watch":return Jn(!cn),rt.focus();case"trigger-full-screen":return Vt(!_n),rt.focus();case Me:Dn(Me);return;case $e:Dn($e);return;case Fe:Dn(Fe);return;case st:Dn(st);return;default:throw new Error}},[rt,cn,_n]),ir=Object(y.useCallback)(function(Ut){Dn("");switch(dn){case Me:var sn=Ut.title,Qt=Ut.link;return rt.replaceSelection("[".concat(sn,"](").concat(Qt,")")),rt.focus();case $e:var On=Ut.language,jn=Ut.content;return rt.replaceSelection(["```"+On,jn,"```"].join(`
|
|
`)),rt.focus();case Fe:var Xn=Ut.src,Un=Ut.alt;return Un?rt.replaceSelection(".concat(Xn,' "').concat(Un,'" )')):rt.replaceSelection("")),rt.focus();case st:for(var yi=Ut.row,Yi=Ut.col,In=Ut.align,Sr=`
|
|
`,Gn=0;Gn<yi;Gn++){for(var Bi=[],Pi=[],cr=0;cr<Yi;cr++)Gn===1&&Pi.push(ut[In]),Bi.push(" ");Gn===1&&(Sr+="| ".concat(Pi.join(" | "),` |
|
|
`)),Sr+="| ".concat(Bi.join(Yi===1?"":" | "),` |
|
|
`)}return rt.replaceSelection(Sr+`
|
|
`),rt.focus();default:throw new Error}},[rt,dn]),_r=Object(y.useMemo)(function(){switch(dn){case Me:return m.a.createElement(he,{callback:ir,onCancel:Xi});case $e:return m.a.createElement(be.b,{callback:ir,onCancel:Xi});case Fe:return m.a.createElement(_e,{callback:ir,onCancel:Xi});case st:return m.a.createElement(Ye,{callback:ir,onCancel:Xi});default:return null}},[dn]);function Xi(){Dn("")}Object(y.useEffect)(function(){if(fr.current){var Ut=fr.current,sn=!1,Qt=0;function On(Un){sn=!0,Qt=Un.pageY}function jn(){sn=!1}function Xn(Un){if(sn){var yi=Un.pageY-Qt;yi<0&&(yi=0),yi>300&&(yi=300);var Yi=bt+yi+"px";xi(Yi)}}return Ut.addEventListener("mousedown",On),document.addEventListener("mousemove",Xn),document.addEventListener("mouseup",jn),function(){Ut.removeEventListener("mousedown",On),document.removeEventListener("mousemove",Xn),document.removeEventListener("mouseup",jn)}}},[rt,fr]),Object(y.useEffect)(function(){xi(bt)},[bt]);var Wi=ee(Ot),Hr=ee(la),ai={width:Wi,height:Hr},Wn=Object(y.useMemo)(function(){if(ci){var Ut=new Date(ci),sn=Ut.getHours(),Qt=Ut.getMinutes(),On=Ut.getSeconds();return sn=sn<10?"0"+sn:sn,Qt=Qt<10?"0"+Qt:Qt,On=On<10?"0"+On:On,"".concat(sn,":").concat(Qt,":").concat(On)}return 0},[ci]);function vi(){window.sessionStorage.removeItem(Ln),jr(!1),hr(0)}function mi(){jr(!1),hr(0),rt.setValue(window.sessionStorage.getItem(Ln))}function Ki(Ut,sn){var Qt=rt.getValue();Qt=Qt.replace(Ut,sn),Ht(Qt),rt==null||rt.setValue(Qt)}return m.a.createElement(y.Fragment,null,m.a.createElement("div",{className:"markdown-editor-wrapper",ref:nr},m.a.createElement("div",{className:"markdown-editor-container ".concat(Qe," ").concat(cn?"on-preview":""," ").concat(vn?"mini":""," ").concat(_n?"full-screen":""),style:ai},m.a.createElement(v,{insertTemp:Gt,watch:cn,fullScreen:_n,showNullButton:Ct,onActionCallback:ca,hidetoolBar:Tt,uuid:er.current,setOpenPhones:function(){wr.current=!0}}),m.a.createElement("div",{className:"markdown-editor-body"},m.a.createElement("div",{className:"codemirror-container"},m.a.createElement("textarea",{ref:Oi,placeholder:jt})),cn?m.a.createElement("div",{ref:br,className:"preview-container"},gn==="stex"&&m.a.createElement(L,{value:an}),gn!=="stex"&&m.a.createElement(C.a,{edit:!0,value:an,replaces:Ki})):null))),Ve?m.a.createElement("a",{ref:fr,className:"editor-resize"}):null,m.a.createElement(T.a,null,me[dn]?m.a.createElement(X.a,{centered:!0,title:me[dn],visible:!0,onCancel:Xi,footer:null,className:"markdown-popup-form"},_r):null))}},SJMd:function(tt,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 H,ae,X,k=!1,G,b;window.PR_SHOULD_USE_CONTINUATION=!0;var N,K;(function(){var W=window,n=["break,continue,do,else,for,if,return,while"],I=[n,"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"],y=[I,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],m=[y,"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"],g=[y,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],u=[y,"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"],c="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",p=[y,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],l="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",o=[n,"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"],s=[n,"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"],a=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],A=[m,u,g,p,l,o,s,a],S=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,C="str",L="kwd",D="com",O="typ",w="lit",x="pun",d="pln",E="tag",f="dec",v="src",T="atn",B="atv",R="nocode",j="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ge){for(var Ue=0,Ye=!1,de=!1,xe=0,Me=ge.length;xe<Me;++xe){var Fe=ge[xe];if(Fe.ignoreCase)de=!0;else if(/[a-z]/i.test(Fe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ye=!0,de=!1;break}}var $e={b:8,t:9,n:10,v:11,f:12,r:13};function st(At){var Je=At.charCodeAt(0);if(Je!==92)return Je;var Kt=At.charAt(1);return Je=$e[Kt],Je||("0"<=Kt&&Kt<="7"?parseInt(At.substring(1),8):Kt==="u"||Kt==="x"?parseInt(At.substring(2),16):At.charCodeAt(1))}function mt(At){if(At<32)return(At<16?"\\x0":"\\x")+At.toString(16);var Je=String.fromCharCode(At);return Je==="\\"||Je==="-"||Je==="]"||Je==="^"?"\\"+Je:Je}function ut(At){var Je=At.substring(1,At.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")),Kt=[],Bt=Je[0]==="^",ce=["["];Bt&&ce.push("^");for(var q=Bt?1:0,ee=Je.length;q<ee;++q){var oe=Je[q];if(/\\[bdsw]/i.test(oe))ce.push(oe);else{var fe=st(oe),ie;q+2<ee&&Je[q+1]==="-"?(ie=st(Je[q+2]),q+=2):ie=fe,Kt.push([fe,ie]),ie<65||fe>122||(ie<65||fe>90||Kt.push([Math.max(65,fe)|32,Math.min(ie,90)|32]),ie<97||fe>122||Kt.push([Math.max(97,fe)&~32,Math.min(ie,122)&~32]))}}Kt.sort(function(Ae,Re){return Ae[0]-Re[0]||Re[1]-Ae[1]});for(var le=[],me=[],q=0;q<Kt.length;++q){var ve=Kt[q];ve[0]<=me[1]+1?me[1]=Math.max(me[1],ve[1]):le.push(me=ve)}for(var q=0;q<le.length;++q){var ve=le[q];ce.push(mt(ve[0])),ve[1]>ve[0]&&(ve[1]+1>ve[0]&&ce.push("-"),ce.push(mt(ve[1])))}return ce.push("]"),ce.join("")}function Pt(At){for(var Je=At.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")),Kt=Je.length,Bt=[],ce=0,q=0;ce<Kt;++ce){var ee=Je[ce];if(ee==="(")++q;else if(ee.charAt(0)==="\\"){var oe=+ee.substring(1);oe&&(oe<=q?Bt[oe]=-1:Je[ce]=mt(oe))}}for(var ce=1;ce<Bt.length;++ce)Bt[ce]===-1&&(Bt[ce]=++Ue);for(var ce=0,q=0;ce<Kt;++ce){var ee=Je[ce];if(ee==="(")++q,Bt[q]||(Je[ce]="(?:");else if(ee.charAt(0)==="\\"){var oe=+ee.substring(1);oe&&oe<=q&&(Je[ce]="\\"+Bt[oe])}}for(var ce=0;ce<Kt;++ce)Je[ce]==="^"&&Je[ce+1]!=="^"&&(Je[ce]="");if(At.ignoreCase&&Ye)for(var ce=0;ce<Kt;++ce){var ee=Je[ce],fe=ee.charAt(0);ee.length>=2&&fe==="["?Je[ce]=ut(ee):fe!=="\\"&&(Je[ce]=ee.replace(/[a-zA-Z]/g,function(me){var ve=me.charCodeAt(0);return"["+String.fromCharCode(ve&~32,ve|32)+"]"}))}return Je.join("")}for(var Et=[],xe=0,Me=ge.length;xe<Me;++xe){var Fe=ge[xe];if(Fe.global||Fe.multiline)throw new Error(""+Fe);Et.push("(?:"+Pt(Fe)+")")}return new RegExp(Et.join("|"),de?"gi":"g")}function _(ge,Ue){var Ye=/(?:^|\s)nocode(?:\s|$)/,de=[],xe=0,Me=[],Fe=0;function $e(st){var mt=st.nodeType;if(mt==1){if(Ye.test(st.className))return;for(var ut=st.firstChild;ut;ut=ut.nextSibling)$e(ut);var Pt=st.nodeName.toLowerCase();(Pt==="br"||Pt==="li")&&(de[Fe]=`
|
|
`,Me[Fe<<1]=xe++,Me[Fe++<<1|1]=st)}else if(mt==3||mt==4){var Et=st.nodeValue;Et.length&&(Ue?Et=Et.replace(/\r\n?/g,`
|
|
`):Et=Et.replace(/[ \t\r\n]+/g," "),de[Fe]=Et,Me[Fe<<1]=xe,xe+=Et.length,Me[Fe++<<1|1]=st)}}return $e(ge),{sourceCode:de.join("").replace(/\n$/,""),spans:Me}}function J(ge,Ue,Ye,de,xe){if(!Ye)return;var Me={sourceNode:ge,pre:1,langExtension:null,numberLines:null,sourceCode:Ye,spans:null,basePos:Ue,decorations:null};de(Me),xe.push.apply(xe,Me.decorations)}var ne=/\S/;function he(ge){for(var Ue=void 0,Ye=ge.firstChild;Ye;Ye=Ye.nextSibling){var de=Ye.nodeType;Ue=de===1?Ue?ge:Ye:de===3&&ne.test(Ye.nodeValue)?ge:Ue}return Ue===ge?void 0:Ue}function be(ge,Ue){var Ye={},de;(function(){for(var Fe=ge.concat(Ue),$e=[],st={},mt=0,ut=Fe.length;mt<ut;++mt){var Pt=Fe[mt],Et=Pt[3];if(Et)for(var At=Et.length;--At>=0;)Ye[Et.charAt(At)]=Pt;var Je=Pt[1],Kt=""+Je;st.hasOwnProperty(Kt)||($e.push(Je),st[Kt]=null)}$e.push(/[\0-\uffff]/),de=U($e)})();var xe=Ue.length,Me=function(Fe){for(var $e=Fe.sourceCode,st=Fe.basePos,mt=Fe.sourceNode,ut=[st,d],Pt=0,Et=$e.match(de)||[],At={},Je=0,Kt=Et.length;Je<Kt;++Je){var Bt=Et[Je],ce=At[Bt],q=void 0,ee;if(typeof ce=="string")ee=!1;else{var oe=Ye[Bt.charAt(0)];if(oe)q=Bt.match(oe[1]),ce=oe[0];else{for(var fe=0;fe<xe;++fe)if(oe=Ue[fe],q=Bt.match(oe[1]),q){ce=oe[0];break}q||(ce=d)}ee=ce.length>=5&&ce.substring(0,5)==="lang-",ee&&!(q&&typeof q[1]=="string")&&(ee=!1,ce=v),ee||(At[Bt]=ce)}var ie=Pt;if(Pt+=Bt.length,!ee)ut.push(st+ie,ce);else{var le=q[1],me=Bt.indexOf(le),ve=me+le.length;q[2]&&(ve=Bt.length-q[2].length,me=ve-le.length);var Ae=ce.substring(5);J(mt,st+ie,Bt.substring(0,me),Me,ut),J(mt,st+ie+me,le,Y(Ae,le),ut),J(mt,st+ie+ve,Bt.substring(ve),Me,ut)}}Fe.decorations=ut};return Me}function Ke(ge){var Ue=[],Ye=[];ge.tripleQuotedStrings?Ue.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ge.multiLineStrings?Ue.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ue.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ge.verbatimStrings&&Ye.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var de=ge.hashComments;de&&(ge.cStyleComments?(de>1?Ue.push([D,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ue.push([D,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ye.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ue.push([D,/^#[^\r\n]*/,null,"#"])),ge.cStyleComments&&(Ye.push([D,/^\/\/[^\r\n]*/,null]),Ye.push([D,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var xe=ge.regexLiterals;if(xe){var Me=xe>1?"":`
|
|
\r`,Fe=Me?".":"[\\S\\s]",$e="/(?=[^/*"+Me+"])(?:[^/\\x5B\\x5C"+Me+"]|\\x5C"+Fe+"|\\x5B(?:[^\\x5C\\x5D"+Me+"]|\\x5C"+Fe+")*(?:\\x5D|$))+/";Ye.push(["lang-regex",RegExp("^"+j+"("+$e+")")])}var st=ge.types;st&&Ye.push([O,st]);var mt=(""+ge.keywords).replace(/^ | $/g,"");mt.length&&Ye.push([L,new RegExp("^(?:"+mt.replace(/[\s,]+/g,"|")+")\\b"),null]),Ue.push([d,/^\s+/,null,` \r
|
|
\xA0`]);var ut="^.[^\\s\\w.$@'\"`/\\\\]*";return ge.regexLiterals&&(ut+="(?!s*/)"),Ye.push([w,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[d,/^[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"],[d,/^\\[\s\S]?/,null],[x,new RegExp(ut),null]),be(Ue,Ye)}var De=Ke({keywords:A,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function je(ge,Ue,Ye){for(var de=/(?:^|\s)nocode(?:\s|$)/,xe=/\r\n?|\n/,Me=ge.ownerDocument,Fe=Me.createElement("li");ge.firstChild;)Fe.appendChild(ge.firstChild);var $e=[Fe];function st(Je){var Kt=Je.nodeType;if(Kt==1&&!de.test(Je.className))if(Je.nodeName==="br")mt(Je),Je.parentNode&&Je.parentNode.removeChild(Je);else for(var Bt=Je.firstChild;Bt;Bt=Bt.nextSibling)st(Bt);else if((Kt==3||Kt==4)&&Ye){var ce=Je.nodeValue,q=ce.match(xe);if(q){var ee=ce.substring(0,q.index);Je.nodeValue=ee;var oe=ce.substring(q.index+q[0].length);if(oe){var fe=Je.parentNode;fe.insertBefore(Me.createTextNode(oe),Je.nextSibling)}mt(Je),ee||Je.parentNode.removeChild(Je)}}}function mt(Je){for(;!Je.nextSibling;)if(Je=Je.parentNode,!Je)return;function Kt(q,ee){var oe=ee?q.cloneNode(!1):q,fe=q.parentNode;if(fe){var ie=Kt(fe,1),le=q.nextSibling;ie.appendChild(oe);for(var me=le;me;me=le)le=me.nextSibling,ie.appendChild(me)}return oe}for(var Bt=Kt(Je.nextSibling,0),ce;(ce=Bt.parentNode)&&ce.nodeType===1;)Bt=ce;$e.push(Bt)}for(var ut=0;ut<$e.length;++ut)st($e[ut]);Ue===(Ue|0)&&$e[0].setAttribute("value",Ue);var Pt=Me.createElement("ol");Pt.className="linenums";for(var Et=Math.max(0,Ue-1|0)||0,ut=0,At=$e.length;ut<At;++ut)Fe=$e[ut],Fe.className="L"+(ut+Et)%10,Fe.firstChild||Fe.appendChild(Me.createTextNode("\xA0")),Pt.appendChild(Fe);ge.appendChild(Pt)}function Be(ge){var Ue=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ue=Ue&&+Ue[1]<=8;var Ye=/\n/g,de=ge.sourceCode,xe=de.length,Me=0,Fe=ge.spans,$e=Fe.length,st=0,mt=ge.decorations,ut=mt.length,Pt=0;mt[ut]=xe;var Et,At;for(At=Et=0;At<ut;)mt[At]!==mt[At+2]?(mt[Et++]=mt[At++],mt[Et++]=mt[At++]):At+=2;for(ut=Et,At=Et=0;At<ut;){for(var Je=mt[At],Kt=mt[At+1],Bt=At+2;Bt+2<=ut&&mt[Bt+1]===Kt;)Bt+=2;mt[Et++]=Je,mt[Et++]=Kt,At=Bt}ut=mt.length=Et;var ce=ge.sourceNode,q="";ce&&(q=ce.style.display,ce.style.display="none");try{for(var ee=null;st<$e;){var oe=Fe[st],fe=Fe[st+2]||xe,ie=mt[Pt+2]||xe,Bt=Math.min(fe,ie),le=Fe[st+1],me;if(le.nodeType!==1&&(me=de.substring(Me,Bt))){Ue&&(me=me.replace(Ye,"\r")),le.nodeValue=me;var ve=le.ownerDocument,Ae=ve.createElement("span");Ae.className=mt[Pt+1];var Re=le.parentNode;Re.replaceChild(Ae,le),Ae.appendChild(le),Me<fe&&(Fe[st+1]=le=ve.createTextNode(de.substring(Bt,fe)),Re.insertBefore(le,Ae.nextSibling))}Me=Bt,Me>=fe&&(st+=2),Me>=ie&&(Pt+=2)}}finally{ce&&(ce.style.display=q)}}var Ge={};function _e(ge,Ue){for(var Ye=Ue.length;--Ye>=0;){var de=Ue[Ye];Ge.hasOwnProperty(de)?W.console&&console.warn("cannot override language handler %s",de):Ge[de]=ge}}function Y(ge,Ue){return ge&&Ge.hasOwnProperty(ge)||(ge=/^\s*</.test(Ue)?"default-markup":"default-code"),Ge[ge]}_e(De,["default-code"]),_e(be([],[[d,/^[^<?]+/],[f,/^<!\w[^>]*(?:>|$)/],[D,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[x,/^(?:<[%?]|[%?]>)/],["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"]),_e(be([[d,/^[\s]+/,null,` \r
|
|
`],[B,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[E,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[T,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[x,/^[=<>\/]+/],["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"]),_e(be([],[[B,/^[\s\S]+/]]),["uq.val"]),_e(Ke({keywords:m,hashComments:!0,cStyleComments:!0,types:S}),["c","cc","cpp","cxx","cyc","m"]),_e(Ke({keywords:"null,true,false"}),["json"]),_e(Ke({keywords:u,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:S}),["cs"]),_e(Ke({keywords:g,cStyleComments:!0}),["java"]),_e(Ke({keywords:a,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),_e(Ke({keywords:o,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),_e(Ke({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),_e(Ke({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),_e(Ke({keywords:p,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),_e(Ke({keywords:c,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),_e(be([],[[C,/^[\s\S]+/]]),["regex"]);function M(ge){var Ue=ge.langExtension;try{var Ye=_(ge.sourceNode,ge.pre),de=Ye.sourceCode;ge.sourceCode=de,ge.spans=Ye.spans,ge.basePos=0,Y(Ue,de)(ge),Be(ge)}catch(xe){W.console&&console.log(xe&&xe.stack||xe)}}function F(ge,Ue,Ye){var de=Ye||!1,xe=Ue||null,Me=document.createElement("div");Me.innerHTML="<pre>"+ge+"</pre>",Me=Me.firstChild,de&&je(Me,de,!0);var Fe={langExtension:xe,numberLines:de,sourceNode:Me,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return M(Fe),Me.innerHTML}function Q(ge,Ue){var Ye=Ue||document.body,de=Ye.ownerDocument||document;function xe(oe){return Ye.getElementsByTagName(oe)}for(var Me=[xe("pre"),xe("code"),xe("xmp")],Fe=[],$e=0;$e<Me.length;++$e)for(var st=0,mt=Me[$e].length;st<mt;++st)Fe.push(Me[$e][st]);Me=null;var ut=Date;ut.now||(ut={now:function(){return+new Date}});var Pt=0,Et=/\blang(?:uage)?-([\w.]+)(?!\S)/,At=/\bprettyprint\b/,Je=/\bprettyprinted\b/,Kt=/pre|xmp/i,Bt=/^code$/i,ce=/^(?:pre|code|xmp)$/i,q={};function ee(){for(var oe=W.PR_SHOULD_USE_CONTINUATION?ut.now()+250:Infinity;Pt<Fe.length&&ut.now()<oe;Pt++){for(var fe=Fe[Pt],ie=q,le=fe;le=le.previousSibling;){var me=le.nodeType,ve=(me===7||me===8)&&le.nodeValue;if(ve?!/^\??prettify\b/.test(ve):me!==3||/\S/.test(le.nodeValue))break;if(ve){ie={},ve.replace(/\b(\w+)=([\w:.%+-]+)/g,function(mn,Gt,qt){ie[Gt]=qt});break}}var Ae=fe.className;if((ie!==q||At.test(Ae))&&!Je.test(Ae)){for(var Re=!1,Pe=fe.parentNode;Pe;Pe=Pe.parentNode){var it=Pe.tagName;if(ce.test(it)&&Pe.className&&At.test(Pe.className)){Re=!0;break}}if(!Re){fe.className+=" prettyprinted";var ct=ie.lang;if(!ct){ct=Ae.match(Et);var Ot;!ct&&(Ot=he(fe))&&Bt.test(Ot.tagName)&&(ct=Ot.className.match(Et)),ct&&(ct=ct[1])}var $t;if(Kt.test(fe.tagName))$t=1;else{var bt=fe.currentStyle,Ze=de.defaultView,vn=bt?bt.whiteSpace:Ze&&Ze.getComputedStyle?Ze.getComputedStyle(fe,null).getPropertyValue("white-space"):0;$t=vn&&vn.substring(0,3)==="pre"}var Xe=ie.linenums;(Xe=Xe==="true"||+Xe)||(Xe=Ae.match(/\blinenums\b(?::(\d+))?/),Xe=Xe?Xe[1]&&Xe[1].length?+Xe[1]:!0:!1),Xe&&je(fe,Xe,$t);var bn={langExtension:ct,sourceNode:fe,numberLines:Xe,pre:$t,sourceCode:null,basePos:null,spans:null,decorations:null};M(bn)}}}Pt<Fe.length?W.setTimeout(ee,250):typeof ge=="function"&&ge()}ee()}var te=W.PR={createSimpleLexer:be,registerLangHandler:_e,sourceDecorator:Ke,PR_ATTRIB_NAME:T,PR_ATTRIB_VALUE:B,PR_COMMENT:D,PR_DECLARATION:f,PR_KEYWORD:L,PR_LITERAL:w,PR_NOCODE:R,PR_PLAIN:d,PR_PUNCTUATION:x,PR_SOURCE:v,PR_STRING:C,PR_TAG:E,PR_TYPE:O,prettyPrintOne:k?W.prettyPrintOne=F:N=F,prettyPrint:K=k?W.prettyPrint=Q:K=Q},V=W.define;typeof V=="function"&&V.amd&&V("google-code-prettify",[],function(){return te})})()},STEk:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return _e});/*! *****************************************************************************
|
|
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 ae=function(Y,M){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(F,Q){F.__proto__=Q}||function(F,Q){for(var te in Q)Object.prototype.hasOwnProperty.call(Q,te)&&(F[te]=Q[te])})(Y,M)};function X(Y,M){function F(){this.constructor=Y}ae(Y,M),Y.prototype=M===null?Object.create(M):(F.prototype=M.prototype,new F)}function k(Y,M,F,Q){return new(F||(F=Promise))(function(te,V){function ge(de){try{Ye(Q.next(de))}catch(xe){V(xe)}}function Ue(de){try{Ye(Q.throw(de))}catch(xe){V(xe)}}function Ye(de){var xe;de.done?te(de.value):(xe=de.value,xe instanceof F?xe:new F(function(Me){Me(xe)})).then(ge,Ue)}Ye((Q=Q.apply(Y,M||[])).next())})}function G(Y,M){var F,Q,te,V,ge={label:0,sent:function(){if(1&te[0])throw te[1];return te[1]},trys:[],ops:[]};return V={next:Ue(0),throw:Ue(1),return:Ue(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function Ue(Ye){return function(de){return function(xe){if(F)throw new TypeError("Generator is already executing.");for(;ge;)try{if(F=1,Q&&(te=2&xe[0]?Q.return:xe[0]?Q.throw||((te=Q.return)&&te.call(Q),0):Q.next)&&!(te=te.call(Q,xe[1])).done)return te;switch(Q=0,te&&(xe=[2&xe[0],te.value]),xe[0]){case 0:case 1:te=xe;break;case 4:return ge.label++,{value:xe[1],done:!1};case 5:ge.label++,Q=xe[1],xe=[0];continue;case 7:xe=ge.ops.pop(),ge.trys.pop();continue;default:if(!(te=ge.trys,(te=te.length>0&&te[te.length-1])||xe[0]!==6&&xe[0]!==2)){ge=0;continue}if(xe[0]===3&&(!te||xe[1]>te[0]&&xe[1]<te[3])){ge.label=xe[1];break}if(xe[0]===6&&ge.label<te[1]){ge.label=te[1],te=xe;break}if(te&&ge.label<te[2]){ge.label=te[2],ge.ops.push(xe);break}te[2]&&ge.ops.pop(),ge.trys.pop();continue}xe=M.call(Y,ge)}catch(Me){xe=[6,Me],Q=0}finally{F=te=0}if(5&xe[0])throw xe[1];return{value:xe[0]?xe[1]:void 0,done:!0}}([Ye,de])}}}function b(){for(var Y=0,M=0,F=arguments.length;M<F;M++)Y+=arguments[M].length;var Q=Array(Y),te=0;for(M=0;M<F;M++)for(var V=arguments[M],ge=0,Ue=V.length;ge<Ue;ge++,te++)Q[te]=V[ge];return Q}var N=function(){function Y(){}return Y.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Y.setAttributes=function(M,F){for(var Q=0,te=F;Q<te.length;Q++){var V=te[Q],ge=V[0],Ue=V[1];M.setAttribute(ge,Ue)}},Y.createRect=function(M,F,Q){var te=document.createElementNS("http://www.w3.org/2000/svg","rect");return te.setAttribute("width",M.toString()),te.setAttribute("height",F.toString()),Q&&Y.setAttributes(te,Q),te},Y.createLine=function(M,F,Q,te,V){var ge=document.createElementNS("http://www.w3.org/2000/svg","line");return ge.setAttribute("x1",M.toString()),ge.setAttribute("y1",F.toString()),ge.setAttribute("x2",Q.toString()),ge.setAttribute("y2",te.toString()),V&&Y.setAttributes(ge,V),ge},Y.createPolygon=function(M,F){var Q=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Q.setAttribute("points",M),F&&Y.setAttributes(Q,F),Q},Y.createCircle=function(M,F){var Q=document.createElementNS("http://www.w3.org/2000/svg","circle");return Q.setAttribute("cx",(M/2).toString()),Q.setAttribute("cy",(M/2).toString()),Q.setAttribute("r",M.toString()),F&&Y.setAttributes(Q,F),Q},Y.createEllipse=function(M,F,Q){var te=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return te.setAttribute("cx",(M/2).toString()),te.setAttribute("cy",(F/2).toString()),te.setAttribute("rx",(M/2).toString()),te.setAttribute("ry",(F/2).toString()),Q&&Y.setAttributes(te,Q),te},Y.createGroup=function(M){var F=document.createElementNS("http://www.w3.org/2000/svg","g");return M&&Y.setAttributes(F,M),F},Y.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Y.createMarker=function(M,F,Q,te,V,ge,Ue){var Ye=document.createElementNS("http://www.w3.org/2000/svg","marker");return Y.setAttributes(Ye,[["id",M],["orient",F],["markerWidth",Q.toString()],["markerHeight",te.toString()],["refX",V.toString()],["refY",ge.toString()]]),Ye.appendChild(Ue),Ye},Y.createText=function(M){var F=document.createElementNS("http://www.w3.org/2000/svg","text");return F.setAttribute("x","0"),F.setAttribute("y","0"),M&&Y.setAttributes(F,M),F},Y.createTSpan=function(M,F){var Q=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Q.textContent=M,F&&Y.setAttributes(Q,F),Q},Y.createImage=function(M){var F=document.createElementNS("http://www.w3.org/2000/svg","image");return M&&Y.setAttributes(F,M),F},Y.createPoint=function(M,F){var Q=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Q.x=M,Q.y=F,Q},Y.createPath=function(M,F){var Q=document.createElementNS("http://www.w3.org/2000/svg","path");return Q.setAttribute("d",M),F&&Y.setAttributes(Q,F),Q},Y}(),K=function(){function Y(){}return Y.addKey=function(M){Y.key=M},Object.defineProperty(Y,"isLicensed",{get:function(){return!!Y.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Y.key)},enumerable:!1,configurable:!0}),Y}(),W=function(){function Y(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Y.prototype.rasterize=function(M,F,Q){var te=this;return new Promise(function(V){var ge=Q!==void 0?Q:document.createElement("canvas");M===null&&(te.markersOnly=!0,te.naturalSize=!1);var Ue=document.createElementNS("http://www.w3.org/2000/svg","svg");Ue.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ue.setAttribute("width",F.width.baseVal.valueAsString),Ue.setAttribute("height",F.height.baseVal.valueAsString),Ue.setAttribute("viewBox","0 0 "+F.viewBox.baseVal.width.toString()+" "+F.viewBox.baseVal.height.toString()),Ue.innerHTML=F.innerHTML,te.naturalSize===!0?(Ue.width.baseVal.value=M.naturalWidth,Ue.height.baseVal.value=M.naturalHeight):te.width!==void 0&&te.height!==void 0&&(Ue.width.baseVal.value=te.width,Ue.height.baseVal.value=te.height),ge.width=Ue.width.baseVal.value,ge.height=Ue.height.baseVal.value;var Ye=Ue.outerHTML,de=ge.getContext("2d");te.markersOnly!==!0&&de.drawImage(M,0,0,ge.width,ge.height);var xe=window.URL,Me=new Image(ge.width,ge.height);Me.setAttribute("crossOrigin","anonymous");var Fe=new Blob([Ye],{type:"image/svg+xml"}),$e=xe.createObjectURL(Fe);Me.onload=function(){de.drawImage(Me,0,0),xe.revokeObjectURL($e);var st=ge.toDataURL(te.imageType,te.imageQuality);V(st)},Me.src=$e})},Y}(),n=function(){},I=function(){function Y(M){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+M+"_"}return Object.defineProperty(Y.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Y.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(Y.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Y.prototype.addClass=function(M){return this.styleSheet===void 0&&this.addStyleSheet(),M.name=""+this.classNamePrefix+M.localName,this.classes.push(M),this.styleSheet.sheet.insertRule("."+M.name+" {"+M.style+"}",this.styleSheet.sheet.cssRules.length),M},Y.prototype.addRule=function(M){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(M),this.styleSheet.sheet.insertRule(M.selector+" {"+M.style+"}",this.styleSheet.sheet.cssRules.length)},Y.prototype.addStyleSheet=function(){var M;this.styleSheet=document.createElement("style"),((M=this.styleSheetRoot)!==null&&M!==void 0?M:document.head).appendChild(this.styleSheet),this.addRule(new y("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new y("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new y("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new m("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new m("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Y.prototype.removeStyleSheet=function(){var M;this.styleSheet&&(((M=this.styleSheetRoot)!==null&&M!==void 0?M:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Y}(),y=function(Y,M){this.selector=Y,this.style=M},m=function(Y,M){this.localName=Y,this.style=M},g=function(){function Y(M,F,Q,te,V){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=M,this.displayMode=F,this.markerItems=Q,this.uiStyleSettings=te,this.styles=V,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Y.prototype.show=function(M){var F=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=M,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Q=document.createElement("div");Q.className=this.toolbarBlockStyleClass.name,Q.style.whiteSpace="nowrap",this.uiContainer.appendChild(Q),this.addActionButton(Q,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(Q,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Q,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Q,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Q,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Q,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Q,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Q,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(V){var ge=document.createElement("div");ge.className=""+F.toolbarButtonStyleClass.name,ge.setAttribute("data-type-name",V.typeName),ge.innerHTML=V.icon,ge.addEventListener("click",function(){F.markerToolbarButtonClicked(ge,V)}),F.buttons.push(ge),F.markerButtons.push(ge)}),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 te=document.createElement("div");te.className=this.toolbarBlockStyleClass.name,te.style.whiteSpace="nowrap",te.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(te),this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Y.prototype.addButtonClickListener=function(M){this.buttonClickListeners.push(M)},Y.prototype.removeButtonClickListener=function(M){this.buttonClickListeners.indexOf(M)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(M),1)},Y.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Y.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var M=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var F=0;F<this.markerButtons.length;F++)F<M||F===M&&this.markerButtons.length-1===M?this.markerButtonBlock.appendChild(this.markerButtons[F]):(F===M&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[F]))}},Y.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")},Y.prototype.resetButtonStyles=function(){var M=this;this.buttons.forEach(function(F){F.className=F.className.replace(M.uiStyleSettings.toolbarButtonStyleColorsClassName?M.uiStyleSettings.toolbarButtonStyleColorsClassName:M.toolbarButtonStyleColorsClass.name,"").trim(),F.className=F.className.replace(M.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?M.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:M.toolbarActiveButtonStyleColorsClass.name,"").trim(),F.className+=" "+(M.uiStyleSettings.toolbarButtonStyleColorsClassName?M.uiStyleSettings.toolbarButtonStyleColorsClassName:M.toolbarButtonStyleColorsClass.name)})},Y.prototype.addActionButton=function(M,F,Q){var te=this,V=document.createElement("div");switch(V.className=""+this.toolbarButtonStyleClass.name,V.innerHTML=F,V.setAttribute("data-action",Q),V.addEventListener("click",function(){te.actionToolbarButtonClicked(V,Q)}),Q){case"select":V.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":V.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":V.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":V.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":V.style.fill=this.uiStyleSettings.closeButtonColor}M.appendChild(V),this.buttons.push(V)},Y.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new m("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 m("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new m("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new m("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 m("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var M=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new m("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*M)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*M)+`px;
|
|
padding: `+M+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new m("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new m("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new y("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new y("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},Y.prototype.markerToolbarButtonClicked=function(M,F){this.setActiveButton(M),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Q){return Q("marker",F)}),this.markerButtonOverflowBlock.style.display="none"},Y.prototype.actionToolbarButtonClicked=function(M,F){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Q){return Q("action",F)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Y.prototype.setActiveButton=function(M){this.resetButtonStyles(),M.className=M.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),M.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Y.prototype.setActiveMarkerButton=function(M){var F=this.markerButtons.find(function(Q){return Q.getAttribute("data-type-name")===M});F&&this.setActiveButton(F)},Y.prototype.setCurrentMarker=function(M){var F=this;this.currentMarker=M,this.buttons.filter(function(Q){return/delete|notes/.test(Q.getAttribute("data-action"))}).forEach(function(Q){F.currentMarker===void 0?(Q.style.fillOpacity="0.4",Q.style.pointerEvents="none"):(Q.style.fillOpacity="1",Q.style.pointerEvents="all")})},Y}(),u=function(){function Y(M,F,Q,te){this.panels=[],this.panelButtons=[],this.markerjsContainer=M,this.displayMode=F,this.uiStyleSettings=Q,this.styles=te,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Y.prototype.addStyles=function(){var M;this.toolboxStyleClass=this.styles.addClass(new m("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 m("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var F=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new m("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new m("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new m("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 m("toolbox-panel-row_colors",`
|
|
background-color: `+((M=this.uiStyleSettings.toolboxBackgroundColor)!==null&&M!==void 0?M:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new m("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*F)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*F)+`px;
|
|
padding: `+F+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new m("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new m("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new y("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new y("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},Y.prototype.show=function(M){var F;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=M,this.uiContainer.className=this.toolboxStyleClass.name+" "+((F=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&F!==void 0?F:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Y.prototype.setPanelButtons=function(M){var F,Q,te=this;this.panels=M,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((F=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&F!==void 0?F:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Q=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Q!==void 0?Q:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(V){var ge;V.uiStyleSettings=te.uiStyleSettings;var Ue=document.createElement("div");Ue.className=te.toolboxButtonStyleClass.name+" "+((ge=te.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ge!==void 0?ge:te.toolboxButtonStyleColorsClass.name),Ue.innerHTML=V.icon,Ue.title=V.title,Ue.addEventListener("click",function(){te.panelButtonClick(V)}),te.panelButtons.push(Ue),te.buttonRow.appendChild(Ue)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Y.prototype.panelButtonClick=function(M){var F=this,Q=-1;if(M!==this.activePanel){Q=this.panels.indexOf(M),this.panelRow.innerHTML="";var te=M.getUi();te.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(te),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=M}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){F.displayMode==="inline"?F.panelRow.style.display="none":F.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(V,ge){var Ue,Ye;V.className=F.toolboxButtonStyleClass.name+" "+(ge===Q?""+((Ue=F.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ue!==void 0?Ue:F.toolboxActiveButtonStyleColorsClass.name):""+((Ye=F.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ye!==void 0?Ye:F.toolboxButtonStyleColorsClass.name))})},Y}(),c=function(Y,M){this.title=Y,this.icon=M},p=function(Y){function M(F,Q,te,V){var ge=Y.call(this,F,V||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return ge.colors=[],ge.addTransparent=!1,ge.colorBoxes=[],ge.colors=Q,ge.currentColor=te,ge.setCurrentColor=ge.setCurrentColor.bind(ge),ge.getColorBox=ge.getColorBox.bind(ge),ge}return X(M,Y),M.prototype.getUi=function(){var F=this,Q=document.createElement("div");return Q.style.overflow="hidden",Q.style.whiteSpace="nowrap",this.colors.forEach(function(te){var V=F.getColorBox(te);Q.appendChild(V),F.colorBoxes.push(V)}),Q},M.prototype.getColorBox=function(F){var Q=this,te=this.uiStyleSettings.toolbarHeight/4,V=this.uiStyleSettings.toolbarHeight-te,ge=document.createElement("div");ge.style.display="inline-block",ge.style.boxSizing="content-box",ge.style.width=V-2+"px",ge.style.height=V-2+"px",ge.style.padding="1px",ge.style.marginRight="2px",ge.style.marginBottom="2px",ge.style.borderWidth="2px",ge.style.borderStyle="solid",ge.style.borderRadius=(V+2)/2+"px",ge.style.borderColor=F===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ge.addEventListener("click",function(){Q.setCurrentColor(F,ge)});var Ue=document.createElement("div");return Ue.style.display="inline-block",Ue.style.width=V-2+"px",Ue.style.height=V-2+"px",Ue.style.backgroundColor=F,Ue.style.borderRadius=V/2+"px",F==="transparent"&&(Ue.style.fill=this.uiStyleSettings.toolboxAccentColor,Ue.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>`),ge.appendChild(Ue),ge},M.prototype.setCurrentColor=function(F,Q){var te=this;this.currentColor=F,this.colorBoxes.forEach(function(V){V.style.borderColor=V===Q?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(F)},M}(c),l=function(){function Y(M,F,Q){this._state="new",this._isSelected=!1,this._container=M,this._overlayContainer=F,this.globalSettings=Q,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Y.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Y.prototype.ownsTarget=function(M){return!1},Object.defineProperty(Y.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Y.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Y.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Y.prototype.pointerDown=function(M,F){},Y.prototype.dblClick=function(M,F){},Y.prototype.manipulate=function(M){},Y.prototype.pointerUp=function(M){this.stateChanged()},Y.prototype.dispose=function(){},Y.prototype.addMarkerVisualToContainer=function(M){this.container.childNodes.length>0?this.container.insertBefore(M,this.container.childNodes[0]):this.container.appendChild(M)},Y.prototype.getState=function(){return{typeName:Y.typeName,state:this.state,notes:this.notes}},Y.prototype.restoreState=function(M){this._state=M.state,this.notes=M.notes},Y.prototype.scale=function(M,F){},Y.prototype.colorChanged=function(M){this.onColorChanged&&this.onColorChanged(M),this.stateChanged()},Y.prototype.fillColorChanged=function(M){this.onFillColorChanged&&this.onFillColorChanged(M),this.stateChanged()},Y.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var M=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),M.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(M)&&this.onStateChanged(this)}},Y.typeName="MarkerBase",Y}(),o=function(){function Y(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Y.prototype.findGripByVisual=function(M){return this.topLeft.ownsTarget(M)?this.topLeft:this.topCenter.ownsTarget(M)?this.topCenter:this.topRight.ownsTarget(M)?this.topRight:this.centerLeft.ownsTarget(M)?this.centerLeft:this.centerRight.ownsTarget(M)?this.centerRight:this.bottomLeft.ownsTarget(M)?this.bottomLeft:this.bottomCenter.ownsTarget(M)?this.bottomCenter:this.bottomRight.ownsTarget(M)?this.bottomRight:void 0},Y}(),s=function(){function Y(){this.GRIP_SIZE=10,this.visual=N.createGroup(),this.visual.appendChild(N.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(N.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Y.prototype.ownsTarget=function(M){return M===this.visual||M===this.visual.childNodes[0]||M===this.visual.childNodes[1]},Y}(),a=function(){function Y(){}return Y.toITransformMatrix=function(M){return{a:M.a,b:M.b,c:M.c,d:M.d,e:M.e,f:M.f}},Y.toSVGMatrix=function(M,F){return M.a=F.a,M.b=F.b,M.c=F.c,M.d=F.d,M.e=F.e,M.f=F.f,M},Y}(),A=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.left=0,V.top=0,V.width=0,V.height=0,V.defaultSize={x:50,y:20},V.offsetX=0,V.offsetY=0,V.rotationAngle=0,V.CB_DISTANCE=10,V._suppressMarkerCreateEvent=!1,V.container.transform.baseVal.appendItem(N.createTransform()),V.setupControlBox(),V}return X(M,Y),Object.defineProperty(M.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"visual",{get:function(){return this._visual},set:function(F){this._visual=F;var Q=N.createTransform();this._visual.transform.baseVal.appendItem(Q)},enumerable:!1,configurable:!0}),M.prototype.ownsTarget=function(F){return!!Y.prototype.ownsTarget.call(this,F)||!!(this.controlGrips.findGripByVisual(F)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(F))},M.prototype.pointerDown=function(F,Q){Y.prototype.pointerDown.call(this,F,Q),this.state==="new"&&(this.left=F.x,this.top=F.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var te=this.unrotatePoint(F);if(this.manipulationStartX=te.x,this.manipulationStartY=te.y,this.offsetX=te.x-this.left,this.offsetY=te.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Q),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Q)){this.activeGrip=this.rotatorGrip;var V=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=V.x-this.width/2,this.top=V.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ge=this.container.transform.baseVal.getItem(0);ge.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ge,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},M.prototype.pointerUp=function(F){var Q=this.state;Y.prototype.pointerUp.call(this,F),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(F),this._state="select",Q==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},M.prototype.moveVisual=function(F){this.visual.style.transform="translate("+F.x+"px, "+F.y+"px)"},M.prototype.manipulate=function(F){var Q=this.unrotatePoint(F);this.state==="creating"?this.resize(F):this.state==="move"?(this.left=this.manipulationStartLeft+(Q.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Q.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Q):this.state==="rotate"&&this.rotate(F)},M.prototype.resize=function(F){var Q=this.manipulationStartLeft,te=this.manipulationStartWidth,V=this.manipulationStartTop,ge=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Q=this.manipulationStartLeft+F.x-this.manipulationStartX,te=this.manipulationStartWidth+this.manipulationStartLeft-Q;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:te=this.manipulationStartWidth+F.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:V=this.manipulationStartTop+F.y-this.manipulationStartY,ge=this.manipulationStartHeight+this.manipulationStartTop-V;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ge=this.manipulationStartHeight+F.y-this.manipulationStartY}te>=0?(this.left=Q,this.width=te):(this.left=Q+te,this.width=-te),ge>=0?(this.top=V,this.height=ge):(this.top=V+ge,this.height=-ge),this.setSize()},M.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},M.prototype.rotate=function(F){if(Math.abs(F.x-this.centerX)>.1){var Q=Math.sign(F.x-this.centerX);this.rotationAngle=180*Math.atan((F.y-this.centerY)/(F.x-this.centerX))/Math.PI+90*Q,this.applyRotation()}},M.prototype.applyRotation=function(){var F=this.container.transform.baseVal.getItem(0);F.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(F,0)},M.prototype.rotatePoint=function(F){if(this.rotationAngle===0)return F;var Q=this.container.getCTM(),te=N.createPoint(F.x,F.y);return{x:(te=te.matrixTransform(Q)).x,y:te.y}},M.prototype.unrotatePoint=function(F){if(this.rotationAngle===0)return F;var Q=this.container.getCTM();Q=Q.inverse();var te=N.createPoint(F.x,F.y);return{x:(te=te.matrixTransform(Q)).x,y:te.y}},M.prototype.select=function(){Y.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},M.prototype.deselect=function(){Y.prototype.deselect.call(this),this.controlBox.style.display="none"},M.prototype.setupControlBox=function(){this.controlBox=N.createGroup();var F=N.createTransform();F.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(F),this.container.appendChild(this.controlBox),this.controlRect=N.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=N.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 o,this.addControlGrips(),this.controlBox.style.display="none"},M.prototype.adjustControlBox=function(){var F=this.controlBox.transform.baseVal.getItem(0);F.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(F,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},M.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()},M.prototype.createGrip=function(){var F=new s;return F.visual.transform.baseVal.appendItem(N.createTransform()),this.controlBox.appendChild(F.visual),F},M.prototype.positionGrips=function(){var F=this.controlGrips.topLeft.GRIP_SIZE,Q=-F/2,te=Q,V=(this.width+this.CB_DISTANCE)/2-F/2,ge=(this.height+this.CB_DISTANCE)/2-F/2,Ue=this.height+this.CB_DISTANCE-F/2,Ye=this.width+this.CB_DISTANCE-F/2;this.positionGrip(this.controlGrips.topLeft.visual,Q,te),this.positionGrip(this.controlGrips.topCenter.visual,V,te),this.positionGrip(this.controlGrips.topRight.visual,Ye,te),this.positionGrip(this.controlGrips.centerLeft.visual,Q,ge),this.positionGrip(this.controlGrips.centerRight.visual,Ye,ge),this.positionGrip(this.controlGrips.bottomLeft.visual,Q,Ue),this.positionGrip(this.controlGrips.bottomCenter.visual,V,Ue),this.positionGrip(this.controlGrips.bottomRight.visual,Ye,Ue),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,V,te-3*this.CB_DISTANCE)},M.prototype.positionGrip=function(F,Q,te){var V=F.transform.baseVal.getItem(0);V.setTranslate(Q,te),F.transform.baseVal.replaceItem(V,0)},M.prototype.hideControlBox=function(){this.controlBox.style.display="none"},M.prototype.showControlBox=function(){this.controlBox.style.display=""},M.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:a.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:a.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Y.prototype.getState.call(this))},M.prototype.restoreState=function(F){Y.prototype.restoreState.call(this,F);var Q=F;this.left=Q.left,this.top=Q.top,this.width=Q.width,this.height=Q.height,this.rotationAngle=Q.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(a.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Q.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(a.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Q.containerTransformMatrix))},M.prototype.scale=function(F,Q){Y.prototype.scale.call(this,F,Q);var te=this.rotatePoint({x:this.left,y:this.top}),V=this.unrotatePoint({x:te.x*F,y:te.y*Q});this.left=V.x,this.top=V.y,this.width=this.width*F,this.height=this.height*Q,this.adjustControlBox()},M}(l),S=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.fillColor="transparent",V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.opacity=1,V.setStrokeColor=V.setStrokeColor.bind(V),V.setFillColor=V.setFillColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.createVisual=V.createVisual.bind(V),V}return X(M,Y),M.prototype.ownsTarget=function(F){return!(!Y.prototype.ownsTarget.call(this,F)&&F!==this.visual)},M.prototype.createVisual=function(){this.visual=N.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)},M.prototype.pointerDown=function(F,Q){Y.prototype.pointerDown.call(this,F,Q),this.state==="new"&&(this.createVisual(),this.moveVisual(F),this._state="creating")},M.prototype.manipulate=function(F){Y.prototype.manipulate.call(this,F)},M.prototype.resize=function(F){Y.prototype.resize.call(this,F),this.setSize()},M.prototype.setSize=function(){Y.prototype.setSize.call(this),N.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},M.prototype.pointerUp=function(F){Y.prototype.pointerUp.call(this,F),this.setSize()},M.prototype.setStrokeColor=function(F){this.strokeColor=F,this.visual&&N.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(F),this.stateChanged()},M.prototype.setFillColor=function(F){this.fillColor=F,this.visual&&N.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},M.prototype.setStrokeWidth=function(F){this.strokeWidth=F,this.visual&&N.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},M.prototype.setStrokeDasharray=function(F){this.strokeDasharray=F,this.visual&&N.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},M.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Y.prototype.getState.call(this))},M.prototype.restoreState=function(F){var Q=F;this.fillColor=Q.fillColor,this.strokeColor=Q.strokeColor,this.strokeWidth=Q.strokeWidth,this.strokeDasharray=Q.strokeDasharray,this.opacity=Q.opacity,this.createVisual(),Y.prototype.restoreState.call(this,F),this.setSize()},M.prototype.scale=function(F,Q){Y.prototype.scale.call(this,F,Q),this.setSize()},M.title="Rectangle marker",M}(A),C=function(Y){function M(F,Q,te,V){var ge=Y.call(this,F,V||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ge.widths=[],ge.widthBoxes=[],ge.widths=Q,ge.currentWidth=te,ge.setCurrentWidth=ge.setCurrentWidth.bind(ge),ge}return X(M,Y),M.prototype.getUi=function(){var F=this,Q=document.createElement("div");return Q.style.display="flex",Q.style.overflow="hidden",Q.style.flexGrow="2",this.widths.forEach(function(te){var V=document.createElement("div");V.style.display="flex",V.style.flexGrow="2",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.borderColor=te===F.currentWidth?F.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){F.setCurrentWidth(te,V)}),Q.appendChild(V);var ge=document.createElement("div");ge.innerText=te.toString(),ge.style.marginRight="5px",V.appendChild(ge);var Ue=document.createElement("div");Ue.style.minHeight="20px",Ue.style.flexGrow="2",Ue.style.display="flex",Ue.style.alignItems="center";var Ye=document.createElement("hr");Ye.style.minWidth="20px",Ye.style.border="0px",Ye.style.borderTop=te+"px solid "+F.uiStyleSettings.toolboxColor,Ye.style.flexGrow="2",Ue.appendChild(Ye),V.appendChild(Ue),F.widthBoxes.push(V)}),Q},M.prototype.setCurrentWidth=function(F,Q){var te=this;this.currentWidth=F,this.widthBoxes.forEach(function(V){V.style.borderColor=V===Q?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},M}(c),L=function(Y){function M(F,Q,te,V){var ge=Y.call(this,F,V||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return ge.styles=[],ge.styleBoxes=[],ge.styles=Q,ge.currentStyle=te,ge.setCurrentStyle=ge.setCurrentStyle.bind(ge),ge}return X(M,Y),M.prototype.getUi=function(){var F=this,Q=document.createElement("div");return Q.style.display="flex",Q.style.overflow="hidden",Q.style.flexGrow="2",this.styles.forEach(function(te){var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.overflow="hidden",V.style.maxWidth=100/F.styles.length-5+"%",V.style.borderColor=te===F.currentStyle?F.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){F.setCurrentStyle(te,V)}),Q.appendChild(V);var ge=document.createElement("div");ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.overflow="hidden";var Ue=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+F.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(te!==""?'stroke-dasharray="'+te+'"':"")+` />
|
|
</svg>`;ge.innerHTML=Ue,V.appendChild(ge),F.styleBoxes.push(V)}),Q},M.prototype.setCurrentStyle=function(F,Q){var te=this;this.currentStyle=F,this.styleBoxes.forEach(function(V){V.style.borderColor=V===Q?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},M}(c),D=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.strokeColor=te.defaultColor,V.strokeWidth=te.defaultStrokeWidth,V.strokeDasharray=te.defaultStrokeDasharray,V.strokePanel=new p("Line color",te.defaultColorSet,te.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new C("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new L("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return X(M,Y),Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var F=Y.prototype.getState.call(this);return F.typeName=M.typeName,F},M.typeName="FrameMarker",M.title="Frame marker",M.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',M}(S),O=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},w=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.x1=0,V.y1=0,V.x2=0,V.y2=0,V.defaultLength=50,V.manipulationStartX=0,V.manipulationStartY=0,V.manipulationStartX1=0,V.manipulationStartY1=0,V.manipulationStartX2=0,V.manipulationStartY2=0,V.setupControlBox(),V}return X(M,Y),M.prototype.ownsTarget=function(F){return!!Y.prototype.ownsTarget.call(this,F)||!(!this.grip1.ownsTarget(F)&&!this.grip2.ownsTarget(F))},M.prototype.pointerDown=function(F,Q){Y.prototype.pointerDown.call(this,F,Q),this.manipulationStartX=F.x,this.manipulationStartY=F.y,this.state==="new"&&(this.x1=F.x,this.y1=F.y,this.x2=F.x,this.y2=F.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(Q)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Q)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},M.prototype.pointerUp=function(F){var Q=this.state;Y.prototype.pointerUp.call(this,F),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(F),this._state="select",Q==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},M.prototype.adjustVisual=function(){},M.prototype.manipulate=function(F){this.state==="creating"?this.resize(F):this.state==="move"?(this.x1=this.manipulationStartX1+F.x-this.manipulationStartX,this.y1=this.manipulationStartY1+F.y-this.manipulationStartY,this.x2=this.manipulationStartX2+F.x-this.manipulationStartX,this.y2=this.manipulationStartY2+F.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(F)},M.prototype.resize=function(F){switch(this.activeGrip){case this.grip1:this.x1=F.x,this.y1=F.y;break;case this.grip2:case void 0:this.x2=F.x,this.y2=F.y}this.adjustVisual(),this.adjustControlBox()},M.prototype.select=function(){Y.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},M.prototype.deselect=function(){Y.prototype.deselect.call(this),this.controlBox.style.display="none"},M.prototype.setupControlBox=function(){this.controlBox=N.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},M.prototype.adjustControlBox=function(){this.positionGrips()},M.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},M.prototype.createGrip=function(){var F=new s;return F.visual.transform.baseVal.appendItem(N.createTransform()),this.controlBox.appendChild(F.visual),F},M.prototype.positionGrips=function(){var F=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-F/2,this.y1-F/2),this.positionGrip(this.grip2.visual,this.x2-F/2,this.y2-F/2)},M.prototype.positionGrip=function(F,Q,te){var V=F.transform.baseVal.getItem(0);V.setTranslate(Q,te),F.transform.baseVal.replaceItem(V,0)},M.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Y.prototype.getState.call(this))},M.prototype.restoreState=function(F){Y.prototype.restoreState.call(this,F);var Q=F;this.x1=Q.x1,this.y1=Q.y1,this.x2=Q.x2,this.y2=Q.y2},M.prototype.scale=function(F,Q){Y.prototype.scale.call(this,F,Q),this.x1=this.x1*F,this.y1=this.y1*Q,this.x2=this.x2*F,this.y2=this.y2*Q,this.adjustVisual(),this.adjustControlBox()},M}(l),x=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.strokeColor=te.defaultColor,V.strokeWidth=te.defaultStrokeWidth,V.strokeDasharray=te.defaultStrokeDasharray,V.strokePanel=new p("Line color",te.defaultColorSet,te.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new C("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new L("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return X(M,Y),M.prototype.ownsTarget=function(F){return!(!Y.prototype.ownsTarget.call(this,F)&&F!==this.visual&&F!==this.selectorLine&&F!==this.visibleLine)},M.prototype.createVisual=function(){this.visual=N.createGroup(),this.selectorLine=N.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=N.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)},M.prototype.pointerDown=function(F,Q){Y.prototype.pointerDown.call(this,F,Q),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},M.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()),N.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),N.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),N.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},M.prototype.setStrokeColor=function(F){this.strokeColor=F,this.adjustVisual(),this.colorChanged(F)},M.prototype.setStrokeWidth=function(F){this.strokeWidth=F,this.adjustVisual()},M.prototype.setStrokeDasharray=function(F){this.strokeDasharray=F,this.adjustVisual(),this.stateChanged()},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var F=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Y.prototype.getState.call(this));return F.typeName=M.typeName,F},M.prototype.restoreState=function(F){Y.prototype.restoreState.call(this,F);var Q=F;this.strokeColor=Q.strokeColor,this.strokeWidth=Q.strokeWidth,this.strokeDasharray=Q.strokeDasharray,this.createVisual(),this.adjustVisual()},M.typeName="LineMarker",M.title="Line marker",M.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',M}(w),d=function(Y){function M(F,Q,te,V){var ge=Y.call(this,F,V||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return ge.fonts=[],ge.fontBoxes=[],ge.fonts=Q,ge.currentFont=te,ge.setCurrentFont=ge.setCurrentFont.bind(ge),ge}return X(M,Y),M.prototype.getUi=function(){var F=this,Q=document.createElement("div");return Q.style.overflow="hidden",Q.style.flexGrow="2",this.fonts.forEach(function(te){var V=document.createElement("div");V.style.display="inline-block",V.style.alignItems="center",V.style.justifyContent="space-between",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.overflow="hidden",V.style.maxWidth=100/F.fonts.length-5+"%",V.style.borderColor=te===F.currentFont?F.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){F.setCurrentFont(te,V)}),Q.appendChild(V);var ge=document.createElement("div");ge.style.display="flex",ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.fontFamily=te,ge.style.overflow="hidden";var Ue=document.createElement("div");Ue.style.whiteSpace="nowrap",Ue.style.overflow="hidden",Ue.style.textOverflow="ellipsis",Ue.innerHTML="The quick brown fox jumps over the lazy dog",ge.appendChild(Ue),V.appendChild(ge),F.fontBoxes.push(V)}),Q},M.prototype.setCurrentFont=function(F,Q){var te=this;this.currentFont=F,this.fontBoxes.forEach(function(V){V.style.borderColor=V===Q?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},M}(c),E=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.color="transparent",V.padding=5,V.DEFAULT_TEXT="your text here",V.text=V.DEFAULT_TEXT,V.isMoved=!1,V.color=te.defaultColor,V.fontFamily=te.defaultFontFamily,V.defaultSize={x:100,y:30},V.setColor=V.setColor.bind(V),V.setFont=V.setFont.bind(V),V.renderText=V.renderText.bind(V),V.sizeText=V.sizeText.bind(V),V.textEditDivClicked=V.textEditDivClicked.bind(V),V.showTextEditor=V.showTextEditor.bind(V),V.setSize=V.setSize.bind(V),V.positionTextEditor=V.positionTextEditor.bind(V),V.colorPanel=new p("Color",te.defaultColorSet,te.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.fontFamilyPanel=new d("Font",te.defaultFontFamilies,te.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V}return X(M,Y),M.prototype.ownsTarget=function(F){if(Y.prototype.ownsTarget.call(this,F)||F===this.visual||F===this.textElement||F===this.bgRectangle)return!0;var Q=!1;return this.textElement.childNodes.forEach(function(te){te===F&&(Q=!0)}),Q},M.prototype.createVisual=function(){this.visual=N.createGroup(),this.bgRectangle=N.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=N.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(N.createTransform()),this.textElement.transform.baseVal.appendItem(N.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},M.prototype.pointerDown=function(F,Q){Y.prototype.pointerDown.call(this,F,Q),this.isMoved=!1,this.pointerDownPoint=F,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(F),this._state="creating")},M.prototype.renderText=function(){var F=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(Q){F.textElement.appendChild(N.createTSpan(Q.trim()===""?" ":Q.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},M.prototype.getTextScale=function(){var F=this.textElement.getBBox(),Q=1;if(F.width>0&&F.height>0){var te=(1*this.width-this.width*this.padding*2/100)/F.width,V=(1*this.height-this.height*this.padding*2/100)/F.height;Q=Math.min(te,V)}return Q},M.prototype.getTextPosition=function(F){var Q=this.textElement.getBBox(),te=0,V=0;return Q.width>0&&Q.height>0&&(te=(this.width-Q.width*F)/2,V=this.height/2-Q.height*F/2),{x:te,y:V}},M.prototype.sizeText=function(){var F=this.textElement.getBBox(),Q=this.getTextScale(),te=this.getTextPosition(Q);te.y-=F.y*Q,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+te.x+"px, "+te.y+"px) scale("+Q+", "+Q+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(te.x,te.y),this.textElement.transform.baseVal.getItem(1).setScale(Q,Q))},M.prototype.manipulate=function(F){Y.prototype.manipulate.call(this,F),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(F.x-this.pointerDownPoint.x)>5||Math.abs(F.y-this.pointerDownPoint.y)>5)},M.prototype.resize=function(F){Y.prototype.resize.call(this,F),this.isMoved=!0,this.setSize(),this.sizeText()},M.prototype.setSize=function(){Y.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(N.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),N.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},M.prototype.pointerUp=function(F){var Q=this.state;Q==="creating"&&(this._suppressMarkerCreateEvent=!0),Y.prototype.pointerUp.call(this,F),this.setSize(),(Q==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},M.prototype.showTextEditor=function(){var F=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(Q){Q.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Q=Number.parseFloat(F.textEditor.style.fontSize);F.textEditor.clientWidth>=Number.parseInt(F.textEditor.style.maxWidth)&&Q>.9;)Q-=.1,F.textEditor.style.fontSize=Math.max(Q,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Q){Q.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Q){if(Q.clipboardData){var te=Q.clipboardData.getData("text"),V=window.getSelection();if(!V.rangeCount)return!1;V.deleteFromDocument(),V.getRangeAt(0).insertNode(document.createTextNode(te)),Q.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){F.textEditDivClicked(F.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},M.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var F=this.getTextScale(),Q=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),te=this.textElement.getBBox(),V={x:te.width*F,y:te.height*F};Q.x-=V.x/2,Q.y-=V.y/2,this.textEditor.style.top=Q.y+"px",this.textEditor.style.left=Q.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Q.x+"px",this.textEditor.style.fontSize=Math.max(16*F,12)+"px",this.textElement.style.display="none"}},M.prototype.textEditDivClicked=function(F){this.text=F.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},M.prototype.select=function(){Y.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},M.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Y.prototype.deselect.call(this)},M.prototype.dblClick=function(F,Q){Y.prototype.dblClick.call(this,F,Q),this.showTextEditor()},M.prototype.setColor=function(F){this.textElement&&N.setAttributes(this.textElement,[["fill",F]]),this.color=F,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(F)},M.prototype.setFont=function(F){this.textElement&&N.setAttributes(this.textElement,[["font-family",F]]),this.fontFamily=F,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},M.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},M.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var F=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Y.prototype.getState.call(this));return F.typeName=M.typeName,F},M.prototype.restoreState=function(F){var Q=F;this.color=Q.color,this.fontFamily=Q.fontFamily,this.padding=Q.padding,this.text=Q.text,this.createVisual(),Y.prototype.restoreState.call(this,F),this.setSize()},M.prototype.scale=function(F,Q){Y.prototype.scale.call(this,F,Q),this.setSize(),this.sizeText(),this.positionTextEditor()},M.typeName="TextMarker",M.title="Text marker",M.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>',M}(A),f=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.color="transparent",V.lineWidth=3,V.drawing=!1,V.pixelRatio=1,V.color=te.defaultColor,V.lineWidth=te.defaultStrokeWidth,V.pixelRatio=te.freehandPixelRatio,V.setColor=V.setColor.bind(V),V.addCanvas=V.addCanvas.bind(V),V.finishCreation=V.finishCreation.bind(V),V.setLineWidth=V.setLineWidth.bind(V),V.colorPanel=new p("Color",te.defaultColorSet,te.defaultColor),V.colorPanel.onColorChanged=V.setColor,V.lineWidthPanel=new C("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),V.lineWidthPanel.onWidthChanged=V.setLineWidth,V}return X(M,Y),M.prototype.ownsTarget=function(F){return!(!Y.prototype.ownsTarget.call(this,F)&&F!==this.visual&&F!==this.drawingImage)},M.prototype.createVisual=function(){this.visual=N.createGroup(),this.drawingImage=N.createImage(),this.visual.appendChild(this.drawingImage);var F=N.createTransform();this.visual.transform.baseVal.appendItem(F),this.addMarkerVisualToContainer(this.visual)},M.prototype.pointerDown=function(F,Q){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(F.x,F.y),this.drawing=!0):Y.prototype.pointerDown.call(this,F,Q)},M.prototype.manipulate=function(F){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(F.x,F.y),this.canvasContext.stroke()):Y.prototype.manipulate.call(this,F)},M.prototype.resize=function(F){Y.prototype.resize.call(this,F),N.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),N.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},M.prototype.pointerUp=function(F){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Y.prototype.pointerUp.call(this,F)},M.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)},M.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Y.prototype.select.call(this)},M.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Y.prototype.deselect.call(this)},M.prototype.finishCreation=function(){for(var F=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Q=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],te=Q[0],V=Q[1],ge=Q[2],Ue=Q[3],Ye=!1,de=0;de<this.canvasElement.height;de++)for(var xe=0;xe<this.canvasElement.width;xe++)F.data[de*this.canvasElement.width*4+4*xe+3]>0&&(Ye=!0,de<V&&(V=de),xe<te&&(te=xe),de>Ue&&(Ue=de),xe>ge&&(ge=xe));if(Ye){this.left=te/this.pixelRatio,this.top=V/this.pixelRatio,this.width=(ge-te)/this.pixelRatio,this.height=(Ue-V)/this.pixelRatio;var Me=document.createElement("canvas");Me.width=ge-te,Me.height=Ue-V,Me.getContext("2d").putImageData(this.canvasContext.getImageData(te,V,ge-te,Ue-V),0,0),this.drawingImgUrl=Me.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},M.prototype.setDrawingImage=function(){N.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),N.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},M.prototype.setColor=function(F){this.color=F,this.colorChanged(F)},M.prototype.setLineWidth=function(F){this.lineWidth=F},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var F=Object.assign({drawingImgUrl:this.drawingImgUrl},Y.prototype.getState.call(this));return F.typeName=M.typeName,F},M.prototype.restoreState=function(F){this.createVisual(),Y.prototype.restoreState.call(this,F),this.drawingImgUrl=F.drawingImgUrl,this.setDrawingImage()},M.prototype.scale=function(F,Q){Y.prototype.scale.call(this,F,Q),this.setDrawingImage()},M.typeName="FreehandMarker",M.title="Freehand marker",M.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>',M}(A),v=function(Y){function M(F,Q,te){var V=Y.call(this,F,te||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return V.typeBoxes=[],V.currentType=Q,V.setCurrentType=V.setCurrentType.bind(V),V}return X(M,Y),M.prototype.getUi=function(){var F=this,Q=document.createElement("div");Q.style.display="flex",Q.style.overflow="hidden",Q.style.flexGrow="2";for(var te=function(Ue){var Ye="both";switch(Ue){case 0:Ye="both";break;case 1:Ye="start";break;case 2:Ye="end";break;case 3:Ye="none"}var de=document.createElement("div");if(de.style.display="flex",de.style.flexGrow="2",de.style.alignItems="center",de.style.justifyContent="space-between",de.style.padding="5px",de.style.borderWidth="2px",de.style.borderStyle="solid",de.style.borderColor=Ye===V.currentType?V.uiStyleSettings.toolboxAccentColor:"transparent",de.addEventListener("click",function(){F.setCurrentType(Ye,de)}),Q.appendChild(de),Ye==="both"||Ye==="start"){var xe=document.createElement("div");xe.style.display="flex",xe.style.alignItems="center",xe.style.minHeight="20px",xe.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="`+(V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,xe.style.marginLeft="5px",de.appendChild(xe)}var Me=document.createElement("div");Me.style.display="flex",Me.style.alignItems="center",Me.style.minHeight="20px",Me.style.flexGrow="2";var Fe=document.createElement("hr");if(Fe.style.minWidth="20px",Fe.style.border="0px",Fe.style.borderTop="3px solid "+(V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxColor:"#eeeeee"),Fe.style.flexGrow="2",Me.appendChild(Fe),de.appendChild(Me),Ye==="both"||Ye==="end"){var $e=document.createElement("div");$e.style.display="flex",$e.style.alignItems="center",$e.style.minHeight="20px",$e.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="`+(V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,$e.style.marginRight="5px",de.appendChild($e)}V.typeBoxes.push(de)},V=this,ge=0;ge<4;ge++)te(ge);return Q},M.prototype.setCurrentType=function(F,Q){var te=this;this.currentType=F,this.typeBoxes.forEach(function(V){V.style.borderColor=V===Q?te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},M}(c),T=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.arrowType="end",V.arrowBaseHeight=10,V.arrowBaseWidth=10,V.getArrowPoints=V.getArrowPoints.bind(V),V.setArrowType=V.setArrowType.bind(V),V.arrowTypePanel=new v("Arrow type","end"),V.arrowTypePanel.onArrowTypeChanged=V.setArrowType,V}return X(M,Y),M.prototype.ownsTarget=function(F){return!(!Y.prototype.ownsTarget.call(this,F)&&F!==this.arrow1&&F!==this.arrow2)},M.prototype.getArrowPoints=function(F,Q){var te=this.arrowBaseWidth+2*this.strokeWidth,V=this.arrowBaseHeight+2*this.strokeWidth;return F-te/2+","+(Q+V/2)+" "+F+","+(Q-V/2)+" "+(F+te/2)+","+(Q+V/2)},M.prototype.createTips=function(){this.arrow1=N.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(N.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=N.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(N.createTransform()),this.visual.appendChild(this.arrow2)},M.prototype.pointerDown=function(F,Q){Y.prototype.pointerDown.call(this,F,Q),this.state==="creating"&&this.createTips()},M.prototype.adjustVisual=function(){if(Y.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",N.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),N.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var F=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Q=this.arrow1.transform.baseVal.getItem(0);Q.setRotate(F,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Q,0);var te=this.arrow2.transform.baseVal.getItem(0);te.setRotate(F+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(te,0)}},M.prototype.setArrowType=function(F){this.arrowType=F,this.adjustVisual(),this.stateChanged()},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var F=Object.assign({arrowType:this.arrowType},Y.prototype.getState.call(this));return F.typeName=M.typeName,F},M.prototype.restoreState=function(F){Y.prototype.restoreState.call(this,F);var Q=F;this.arrowType=Q.arrowType,this.createTips(),this.adjustVisual()},M.typeName="ArrowMarker",M.title="Arrow marker",M.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',M}(x),B=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.fillColor=te.defaultFillColor,V.strokeWidth=0,V.fillPanel=new p("Color",te.defaultColorSet,te.defaultFillColor),V.fillPanel.onColorChanged=V.setFillColor,V}return X(M,Y),Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var F=Y.prototype.getState.call(this);return F.typeName=M.typeName,F},M.typeName="CoverMarker",M.title="Cover marker",M.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',M}(S),R=function(Y){function M(F,Q,te,V){var ge=Y.call(this,F,V||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return ge.opacities=[],ge.opacityBoxes=[],ge.opacities=Q,ge.currentOpacity=te,ge.setCurrentOpacity=ge.setCurrentOpacity.bind(ge),ge}return X(M,Y),M.prototype.getUi=function(){var F=this,Q=document.createElement("div");return Q.style.display="flex",Q.style.overflow="hidden",Q.style.flexGrow="2",Q.style.justifyContent="space-between",this.opacities.forEach(function(te){var V=document.createElement("div");V.style.display="flex",V.style.alignItems="center",V.style.justifyContent="center",V.style.padding="5px",V.style.borderWidth="2px",V.style.borderStyle="solid",V.style.borderColor=te===F.currentOpacity?F.uiStyleSettings.toolboxAccentColor:"transparent",V.addEventListener("click",function(){F.setCurrentOpacity(te,V)}),Q.appendChild(V);var ge=document.createElement("div");ge.innerText=100*te+"%",V.appendChild(ge),F.opacityBoxes.push(V)}),Q},M.prototype.setCurrentOpacity=function(F,Q){var te=this;this.currentOpacity=F,this.opacityBoxes.forEach(function(V){V.style.borderColor=V===Q?te.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},M}(c),j=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.setOpacity=V.setOpacity.bind(V),V.fillColor=te.defaultHighlightColor,V.strokeWidth=0,V.opacity=te.defaultHighlightOpacity,V.fillPanel=new p("Color",te.defaultColorSet,V.fillColor),V.fillPanel.onColorChanged=V.setFillColor,V.opacityPanel=new R("Opacity",te.defaultOpacitySteps,V.opacity),V.opacityPanel.onOpacityChanged=V.setOpacity,V}return X(M,Y),M.prototype.setOpacity=function(F){this.opacity=F,this.visual&&N.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var F=Y.prototype.getState.call(this);return F.typeName=M.typeName,F},M.typeName="HighlightMarker",M.title="Highlight marker",M.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>',M}(B),U='<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>',_=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.bgColor="transparent",V.tipPosition={x:0,y:0},V.tipBase1Position={x:0,y:0},V.tipBase2Position={x:0,y:0},V.tipMoving=!1,V.color=te.defaultStrokeColor,V.bgColor=te.defaultFillColor,V.fontFamily=te.defaultFontFamily,V.defaultSize={x:100,y:30},V.setBgColor=V.setBgColor.bind(V),V.getTipPoints=V.getTipPoints.bind(V),V.positionTip=V.positionTip.bind(V),V.setTipPoints=V.setTipPoints.bind(V),V.colorPanel=new p("Text color",te.defaultColorSet,V.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),V.colorPanel.onColorChanged=V.setColor,V.bgColorPanel=new p("Fill color",te.defaultColorSet,V.bgColor,U),V.bgColorPanel.onColorChanged=V.setBgColor,V.fontFamilyPanel=new d("Font",te.defaultFontFamilies,te.defaultFontFamily),V.fontFamilyPanel.onFontChanged=V.setFont,V.tipGrip=new s,V.tipGrip.visual.transform.baseVal.appendItem(N.createTransform()),V.controlBox.appendChild(V.tipGrip.visual),V}return X(M,Y),M.prototype.ownsTarget=function(F){return Y.prototype.ownsTarget.call(this,F)||this.tipGrip.ownsTarget(F)||this.tip===F},M.prototype.createTip=function(){N.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=N.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},M.prototype.pointerDown=function(F,Q){this.state==="new"&&Y.prototype.pointerDown.call(this,F,Q),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Q)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Y.prototype.pointerDown.call(this,F,Q)},M.prototype.pointerUp=function(F){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Y.prototype.pointerUp.call(this,F);else{var Q=this.state==="creating";Y.prototype.pointerUp.call(this,F),this.setTipPoints(Q),this.positionTip()}},M.prototype.manipulate=function(F){if(this.tipMoving){var Q=this.unrotatePoint(F);this.tipPosition={x:Q.x-this.manipulationStartLeft,y:Q.y-this.manipulationStartTop},this.positionTip()}else Y.prototype.manipulate.call(this,F)},M.prototype.setBgColor=function(F){this.bgRectangle&&this.tip&&(N.setAttributes(this.bgRectangle,[["fill",F]]),N.setAttributes(this.tip,[["fill",F]])),this.bgColor=F,this.fillColorChanged(F)},M.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},M.prototype.setTipPoints=function(F){F===void 0&&(F=!1);var Q=Math.min(this.height/2,15),te=this.height/5;F&&(this.tipPosition={x:Q+te/2,y:this.height+20});var V=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?V<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(te=this.width/5,Q=Math.min(this.width/2,15),this.tipBase1Position={x:Q,y:0},this.tipBase2Position={x:Q+te,y:0}):(this.tipBase1Position={x:0,y:Q},this.tipBase2Position={x:0,y:Q+te}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?V<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(te=this.width/5,Q=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Q-te,y:0},this.tipBase2Position={x:this.width-Q,y:0}):(this.tipBase1Position={x:this.width,y:Q},this.tipBase2Position={x:this.width,y:Q+te}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?V<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(te=this.width/5,Q=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Q-te,y:this.height},this.tipBase2Position={x:this.width-Q,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Q-te},this.tipBase2Position={x:this.width,y:this.height-Q}):V<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(te=this.width/5,Q=Math.min(this.width/2,15),this.tipBase1Position={x:Q,y:this.height},this.tipBase2Position={x:Q+te,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Q},this.tipBase2Position={x:0,y:this.height-Q-te})},M.prototype.resize=function(F){Y.prototype.resize.call(this,F),this.positionTip()},M.prototype.positionTip=function(){N.setAttributes(this.tip,[["points",this.getTipPoints()]]);var F=this.tipGrip.visual.transform.baseVal.getItem(0);F.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(F,0)},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),M.prototype.select=function(){this.positionTip(),Y.prototype.select.call(this)},M.prototype.getState=function(){var F=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Y.prototype.getState.call(this));return F.typeName=M.typeName,F},M.prototype.restoreState=function(F){var Q=F;this.bgColor=Q.bgColor,this.tipPosition=Q.tipPosition,Y.prototype.restoreState.call(this,F),this.createTip(),this.setTipPoints()},M.prototype.scale=function(F,Q){Y.prototype.scale.call(this,F,Q),this.tipPosition={x:this.tipPosition.x*F,y:this.tipPosition.y*Q},this.positionTip()},M.typeName="CalloutMarker",M.title="Callout marker",M.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>',M}(E),J=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.fillColor="transparent",V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.opacity=1,V.strokeColor=te.defaultColor,V.strokeWidth=te.defaultStrokeWidth,V.strokeDasharray=te.defaultStrokeDasharray,V.fillColor=te.defaultFillColor,V.setStrokeColor=V.setStrokeColor.bind(V),V.setFillColor=V.setFillColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.setOpacity=V.setOpacity.bind(V),V.createVisual=V.createVisual.bind(V),V.strokePanel=new p("Line color",b(te.defaultColorSet,["transparent"]),te.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.fillPanel=new p("Fill color",b(te.defaultColorSet,["transparent"]),V.fillColor,U),V.fillPanel.onColorChanged=V.setFillColor,V.strokeWidthPanel=new C("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new L("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V.opacityPanel=new R("Opacity",te.defaultOpacitySteps,V.opacity),V.opacityPanel.onOpacityChanged=V.setOpacity,V}return X(M,Y),M.prototype.ownsTarget=function(F){return!(!Y.prototype.ownsTarget.call(this,F)&&F!==this.visual)},M.prototype.createVisual=function(){this.visual=N.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)},M.prototype.pointerDown=function(F,Q){Y.prototype.pointerDown.call(this,F,Q),this.state==="new"&&(this.createVisual(),this.moveVisual(F),this._state="creating")},M.prototype.manipulate=function(F){Y.prototype.manipulate.call(this,F)},M.prototype.resize=function(F){Y.prototype.resize.call(this,F),this.setSize()},M.prototype.setSize=function(){Y.prototype.setSize.call(this),N.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},M.prototype.pointerUp=function(F){Y.prototype.pointerUp.call(this,F),this.setSize()},M.prototype.setStrokeColor=function(F){this.strokeColor=F,this.visual&&N.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(F),this.stateChanged()},M.prototype.setFillColor=function(F){this.fillColor=F,this.visual&&N.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(F),this.stateChanged()},M.prototype.setStrokeWidth=function(F){this.strokeWidth=F,this.visual&&N.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},M.prototype.setStrokeDasharray=function(F){this.strokeDasharray=F,this.visual&&N.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},M.prototype.setOpacity=function(F){this.opacity=F,this.visual&&N.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var F=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Y.prototype.getState.call(this));return F.typeName=M.typeName,F},M.prototype.restoreState=function(F){var Q=F;this.fillColor=Q.fillColor,this.strokeColor=Q.strokeColor,this.strokeWidth=Q.strokeWidth,this.strokeDasharray=Q.strokeDasharray,this.opacity=Q.opacity,this.createVisual(),Y.prototype.restoreState.call(this,F),this.setSize()},M.prototype.scale=function(F,Q){Y.prototype.scale.call(this,F,Q),this.setSize()},M.typeName="EllipseMarker",M.title="Ellipse marker",M.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>',M}(A),ne=function(Y){function M(F,Q,te){return Y.call(this,F,Q,te)||this}return X(M,Y),Object.defineProperty(M.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),M.prototype.ownsTarget=function(F){return!(!Y.prototype.ownsTarget.call(this,F)&&F!==this.tip1&&F!==this.tip2)},M.prototype.createTips=function(){this.tip1=N.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(N.createTransform()),this.visual.appendChild(this.tip1),this.tip2=N.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(N.createTransform()),this.visual.appendChild(this.tip2)},M.prototype.pointerDown=function(F,Q){Y.prototype.pointerDown.call(this,F,Q),this.state==="creating"&&this.createTips()},M.prototype.adjustVisual=function(){if(Y.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(N.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()]]),N.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var F=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Q=this.tip1.transform.baseVal.getItem(0);Q.setRotate(F,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Q,0);var te=this.tip2.transform.baseVal.getItem(0);te.setRotate(F+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(te,0)}},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var F=Y.prototype.getState.call(this);return F.typeName=M.typeName,F},M.prototype.restoreState=function(F){Y.prototype.restoreState.call(this,F),this.createTips(),this.adjustVisual()},M.typeName="MeasurementMarker",M.title="Measurement marker",M.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>',M}(x),he=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.strokePanel.colors=te.defaultColorSet,V.fillColor="transparent",V}return X(M,Y),Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var F=Y.prototype.getState.call(this);return F.typeName=M.typeName,F},M.typeName="EllipseFrameMarker",M.title="Ellipse frame marker",M.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>',M}(J),be=function(){function Y(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Y.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Y.prototype.addUndoStep=function(M){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(M)||(this.undoStack.push(M),JSON.stringify(this.lastRedoStep)!==JSON.stringify(M)&&this.redoStack.splice(0,this.redoStack.length))},Y.prototype.replaceLastUndoStep=function(M){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=M)},Y.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Y.prototype.undo=function(){if(this.undoStack.length>1){var M=this.undoStack.pop();return M!==void 0&&this.redoStack.push(M),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Y.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Y}(),Ke=function(Y){function M(F,Q,te){var V=Y.call(this,F,Q,te)||this;return V.strokeColor="transparent",V.strokeWidth=0,V.strokeDasharray="",V.curveX=0,V.curveY=0,V.manipulationStartCurveX=0,V.manipulationStartCurveY=0,V.setStrokeColor=V.setStrokeColor.bind(V),V.setStrokeWidth=V.setStrokeWidth.bind(V),V.setStrokeDasharray=V.setStrokeDasharray.bind(V),V.positionGrips=V.positionGrips.bind(V),V.addControlGrips=V.addControlGrips.bind(V),V.adjustVisual=V.adjustVisual.bind(V),V.setupControlBox=V.setupControlBox.bind(V),V.resize=V.resize.bind(V),V.strokeColor=te.defaultColor,V.strokeWidth=te.defaultStrokeWidth,V.strokeDasharray=te.defaultStrokeDasharray,V.strokePanel=new p("Line color",te.defaultColorSet,te.defaultColor),V.strokePanel.onColorChanged=V.setStrokeColor,V.strokeWidthPanel=new C("Line width",te.defaultStrokeWidths,te.defaultStrokeWidth),V.strokeWidthPanel.onWidthChanged=V.setStrokeWidth,V.strokeStylePanel=new L("Line style",te.defaultStrokeDasharrays,te.defaultStrokeDasharray),V.strokeStylePanel.onStyleChanged=V.setStrokeDasharray,V}return X(M,Y),M.prototype.ownsTarget=function(F){return!(!Y.prototype.ownsTarget.call(this,F)&&F!==this.visual&&F!==this.selectorCurve&&F!==this.visibleCurve&&!this.curveGrip.ownsTarget(F))},M.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},M.prototype.createVisual=function(){this.visual=N.createGroup(),this.selectorCurve=N.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=N.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)},M.prototype.pointerDown=function(F,Q){Y.prototype.pointerDown.call(this,F,Q),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=F.x,this.curveY=F.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Q)&&(this.activeGrip=this.curveGrip,this._state="resize")},M.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),N.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),N.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),N.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},M.prototype.setupControlBox=function(){Y.prototype.setupControlBox.call(this),this.curveControlLine1=N.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=N.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)},M.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Y.prototype.addControlGrips.call(this)},M.prototype.positionGrips=function(){Y.prototype.positionGrips.call(this);var F=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-F/2,this.curveY-F/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},M.prototype.manipulate=function(F){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+F.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+F.y-this.manipulationStartY),Y.prototype.manipulate.call(this,F)},M.prototype.resize=function(F){this.activeGrip===this.curveGrip&&(this.curveX=F.x,this.curveY=F.y),Y.prototype.resize.call(this,F),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},M.prototype.setStrokeColor=function(F){this.strokeColor=F,this.adjustVisual(),this.colorChanged(F)},M.prototype.setStrokeWidth=function(F){this.strokeWidth=F,this.adjustVisual()},M.prototype.setStrokeDasharray=function(F){this.strokeDasharray=F,this.adjustVisual()},M.prototype.scale=function(F,Q){this.curveX=this.curveX*F,this.curveY=this.curveY*Q,Y.prototype.scale.call(this,F,Q)},Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),M.prototype.getState=function(){var F=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Y.prototype.getState.call(this));return F.typeName=M.typeName,F},M.prototype.restoreState=function(F){Y.prototype.restoreState.call(this,F);var Q=F;this.strokeColor=Q.strokeColor,this.strokeWidth=Q.strokeWidth,this.strokeDasharray=Q.strokeDasharray,this.curveX=Q.curveX,this.curveY=Q.curveY,this.createVisual(),this.adjustVisual()},M.typeName="CurveMarker",M.title="Curve marker",M.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>',M}(w),De=function(){function Y(M,F){F===void 0&&(F=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=M,this.cancelable=F}return Object.defineProperty(Y.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Y.prototype.preventDefault=function(){this._defaultPrevented=!0},Y}(),je=function(Y){function M(F,Q,te){var V=Y.call(this,F,!1)||this;return V.dataUrl=Q,V.state=te,V}return X(M,Y),M}(De),Be=function(Y){function M(F,Q,te){te===void 0&&(te=!1);var V=Y.call(this,F,te)||this;return V.marker=Q,V}return X(M,Y),M}(De),Ge=function(){function Y(){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 Y.prototype.addEventListener=function(M,F){this[M].push(F)},Y.prototype.removeEventListener=function(M,F){var Q=this[M].indexOf(F);Q>-1&&this[M].splice(Q,1)},Y}(),_e=function(){function Y(M){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new O,this._isOpen=!1,this.undoRedoManager=new be,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 Ge,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Y.instanceCounter++,this.styles=new I(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=M,this.targetRoot=document.body,this.width=M.clientWidth,this.height=M.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Y.prototype,"ALL_MARKER_TYPES",{get:function(){return[D,f,T,E,he,J,j,_,ne,B,x,Ke]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[D,f,T,E,J,j,_]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"BASIC_MARKER_TYPES",{get:function(){return[D,f,T,E,j]},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(M){var F=this;this._availableMarkerTypes.splice(0),M.forEach(function(Q){if(typeof Q=="string"){var te=F.ALL_MARKER_TYPES.find(function(V){return V.typeName===Q});te!==void 0&&F._availableMarkerTypes.push(te)}else F._availableMarkerTypes.push(Q)})},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Y.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(M){this._zoomLevel=M,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(Y.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Y.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),K.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Y.prototype.show=function(){var M=this;this.styles.styleSheetRoot===void 0&&n.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=n.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(F){return F(new De(M))})},Y.prototype.render=function(){return k(this,void 0,void 0,function(){var M;return G(this,function(F){switch(F.label){case 0:return this.setCurrentMarker(),(M=new W).naturalSize=this.renderAtNaturalSize,M.imageType=this.renderImageType,M.imageQuality=this.renderImageQuality,M.markersOnly=this.renderMarkersOnly,M.width=this.renderWidth,M.height=this.renderHeight,[4,M.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return F.sent(),[4,M.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,F.sent()]}})})},Y.prototype.close=function(M){var F=this;if(M===void 0&&(M=!1),this.isOpen){var Q=!1;M||this.eventListeners.beforeclose.forEach(function(te){var V=new De(F,!0);te(V),V.defaultPrevented&&(Q=!0)}),Q||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(te){return te(new De(F))}),this.detachEvents(),this._isOpen=!1)}},Y.prototype.addMarkersToToolbar=function(){for(var M,F=[],Q=0;Q<arguments.length;Q++)F[Q]=arguments[Q];(M=this._availableMarkerTypes).push.apply(M,F)},Y.prototype.addRenderEventListener=function(M){this.addEventListener("render",function(F){M(F.dataUrl,F.state)})},Y.prototype.removeRenderEventListener=function(M){},Y.prototype.addCloseEventListener=function(M){this.addEventListener("close",function(){M()})},Y.prototype.removeCloseEventListener=function(M){},Y.prototype.setupResizeObserver=function(){var M=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){M.resize(M.target.clientWidth,M.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return M.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Y.prototype.onPopupTargetResize=function(){var M=1*this.target.clientWidth/this.target.clientHeight,F=this.editorCanvas.clientWidth/M>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*M:this.editorCanvas.clientWidth,Q=F<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/M;this.resize(F,Q)},Y.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Y.prototype.resize=function(M,F){this._isResizing=!0;var Q=M/this.imageWidth,te=F/this.imageHeight;this.imageWidth=Math.round(M),this.imageHeight=Math.round(F),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(Q,te),this._isResizing=!1},Y.prototype.scaleMarkers=function(M,F){var Q,te=this;this._currentMarker&&this._currentMarker instanceof E?this._currentMarker.scale(M,F):(Q=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(V){V!==te._currentMarker&&V.scale(M,F)}),Q!==void 0&&this.setCurrentMarker(Q)},Y.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"},Y.prototype.setTopLeft=function(){var M=this.editingTarget.getBoundingClientRect(),F=this.editorCanvas.getBoundingClientRect();this.left=M.left-F.left,this.top=M.top-F.top},Y.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)},Y.prototype.addDefs=function(){for(var M,F=[],Q=0;Q<arguments.length;Q++)F[Q]=arguments[Q];this.defs=N.createDefs(),this.addDefsToImage(),(M=this.defs).append.apply(M,F)},Y.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Y.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)},Y.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Y.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Y.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)},Y.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Y.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)},Y.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 M=document.createElement("a");M.href="https://markerjs.com/",M.target="_blank",M.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>',M.title="Powered by marker.js",M.style.display="grid",M.style.alignItems="center",M.style.justifyItems="center",M.style.padding="3px",M.style.width="20px",M.style.height="20px",this.logoUI.appendChild(M),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Y.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")},Y.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"},Y.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Y.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var M=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=M+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new g(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new u(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Y.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Y.prototype.removeMarker=function(M){this.markerImage.removeChild(M.container),this.markers.indexOf(M)>-1&&this.markers.splice(this.markers.indexOf(M),1),M.dispose()},Y.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())},Y.prototype.toolbarButtonClicked=function(M,F){if(M==="marker"&&F!==void 0)this.createNewMarker(F);else if(M==="action")switch(F){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Y.prototype.deleteSelectedMarker=function(){var M=this;if(this._currentMarker!==void 0){var F=!1;if(this.eventListeners.markerbeforedelete.forEach(function(te){var V=new Be(M,M._currentMarker,!0);te(V),V.defaultPrevented&&(F=!0)}),!F){var Q=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(te){return te(new Be(M,Q))})}}},Y.prototype.clear=function(){var M=this,F=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ge){var Ue=new Be(M,void 0,!0);ge(Ue),Ue.defaultPrevented&&(F=!0)}),!F)){this.setCurrentMarker();for(var Q=function(ge){var Ue=te.markers[ge];te.setCurrentMarker(te.markers[ge]),te._currentMarker.dispose(),te.markerImage.removeChild(te._currentMarker.container),te.markers.splice(te.markers.indexOf(te._currentMarker),1),te.eventListeners.markerdelete.forEach(function(Ye){return Ye(new Be(M,Ue))})},te=this,V=this.markers.length-1;V>=0;V--)Q(V);this.addUndoStep()}},Object.defineProperty(Y.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Y.prototype.showNotesEditor=function(){var M;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=(M=this._currentMarker.notes)!==null&&M!==void 0?M:"",this.overlayContainer.appendChild(this.notesArea))},Y.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)},Y.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Y.prototype.addUndoStep=function(){var M=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var F=this.getState(),Q=this.undoRedoManager.getLastUndoStep();if(!Q||Q.width===F.width&&Q.height===F.height){var te=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(F),te<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(V){return V(new De(M))})}else this.undoRedoManager.replaceLastUndoStep(F),this.eventListeners.statechange.forEach(function(V){return V(new De(M))})}},Y.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Y.prototype.undoStep=function(){var M=this,F=this.undoRedoManager.undo();F!==void 0&&(this.restoreState(F),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Q){return Q(new De(M))}))},Y.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Y.prototype.redoStep=function(){var M=this,F=this.undoRedoManager.redo();F!==void 0&&(this.restoreState(F),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Q){return Q(new De(M))}))},Y.prototype.stepZoom=function(){var M=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=M<this.zoomSteps.length-1?this.zoomSteps[M+1]:this.zoomSteps[0]},Y.prototype.panTo=function(M){this.contentDiv.scrollBy({left:this.prevPanPoint.x-M.x,top:this.prevPanPoint.y-M.y}),this.prevPanPoint=M},Y.prototype.startRenderAndClose=function(){return k(this,void 0,void 0,function(){var M,F,Q=this;return G(this,function(te){switch(te.label){case 0:return[4,this.render()];case 1:return M=te.sent(),F=this.getState(),this.eventListeners.render.forEach(function(V){return V(new je(Q,M,F))}),this.close(!0),[2]}})})},Y.prototype.getState=function(M){M===!0&&this.setCurrentMarker();var F={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Q){return F.markers.push(Q.getState())}),F},Y.prototype.restoreState=function(M){var F=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);M.markers.forEach(function(Q){var te=F._availableMarkerTypes.find(function(ge){return ge.typeName===Q.typeName});if(te!==void 0){var V=F.addNewMarker(te);V.restoreState(Q),F.markers.push(V)}}),M.width&&M.height&&(M.width!==this.imageWidth||M.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/M.width,this.imageHeight/M.height),this.eventListeners.restorestate.forEach(function(Q){return Q(new De(F))})},Y.prototype.addNewMarker=function(M){var F=N.createGroup();return this.markerImage.appendChild(F),new M(F,this.overlayContainer,this.settings)},Y.prototype.createNewMarker=function(M){var F,Q=this;(F=typeof M=="string"?this._availableMarkerTypes.find(function(te){return te.typeName===M}):M)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(F),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(F.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(te){return te(new Be(Q,Q._currentMarker))}))},Y.prototype.markerCreated=function(M){var F=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(M),this.setCurrentMarker(M),M instanceof f&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(f):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Q){return Q(new Be(F,F._currentMarker))})},Y.prototype.colorChanged=function(M){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=M,this.settings.defaultStrokeColor=M)},Y.prototype.fillColorChanged=function(M){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=M)},Y.prototype.markerStateChanged=function(M){var F=this;this.eventListeners.markerchange.forEach(function(Q){return Q(new Be(F,M))})},Y.prototype.setCurrentMarker=function(M){var F=this;this._currentMarker!==M&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Q){return Q(new Be(F,F._currentMarker))})),this._currentMarker=M,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(Q){return Q(new Be(F,F._currentMarker))}))},Y.prototype.onPointerDown=function(M){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||M.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var F=this.markers.find(function(Q){return Q.ownsTarget(M.target)});F!==void 0?(this.setCurrentMarker(F),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(M.clientX,M.clientY),M.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:M.clientX,y:M.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(M.clientX,M.clientY))},Y.prototype.onDblClick=function(M){if(this._isFocused||this.focus(),this.mode==="select"){var F=this.markers.find(function(Q){return Q.ownsTarget(M.target)});F!==void 0&&F!==this._currentMarker&&this.setCurrentMarker(F),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(M.clientX,M.clientY),M.target):this.setCurrentMarker()}},Y.prototype.onPointerMove=function(M){this.touchPoints!==1&&M.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||M.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(M.clientX,M.clientY)):this.zoomLevel>1&&this.panTo({x:M.clientX,y:M.clientY}))},Y.prototype.onPointerUp=function(M){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(M.clientX,M.clientY)),this.isDragging=!1,this.addUndoStep()},Y.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Y.prototype.onKeyUp=function(M){this._currentMarker===void 0||this.notesArea!==void 0||M.key!=="Delete"&&M.key!=="Backspace"||this.deleteSelectedMarker()},Y.prototype.clientToLocalCoordinates=function(M,F){var Q=this.markerImage.getBoundingClientRect();return{x:(M-Q.left)/this.zoomLevel,y:(F-Q.top)/this.zoomLevel}},Y.prototype.onWindowResize=function(){this.positionUI()},Y.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var M=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=M+"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()},Y.prototype.addLicenseKey=function(M){K.addKey(M)},Y.prototype.addEventListener=function(M,F){this.eventListeners.addEventListener(M,F)},Y.prototype.removeEventListener=function(M,F){this.eventListeners.removeEventListener(M,F)},Y.prototype.renderState=function(M){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(M),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Y.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Y.prototype.focus=function(){var M=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(F){return F(new De(M))}))},Y.prototype.blur=function(){var M=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(F){return F(new De(M))}))},Y.instanceCounter=0,Y}()},T8No:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return K}),H.d(Ee,"e",function(){return W}),H.d(Ee,"c",function(){return x}),H.d(Ee,"b",function(){return d}),H.d(Ee,"d",function(){return E}),H.d(Ee,"f",function(){return T});var ae=H("MNsG"),X=H("N0LK"),k=H("Cg/j");let G=ae.k||"";const b=new Map;b.set("false",!1),b.set("true",!0),b.set("isMac",ae.f),b.set("isLinux",ae.d),b.set("isWindows",ae.i),b.set("isWeb",ae.h),b.set("isMacNative",ae.f&&!ae.h),b.set("isEdge",G.indexOf("Edg/")>=0),b.set("isFirefox",G.indexOf("Firefox")>=0),b.set("isChrome",G.indexOf("Chrome")>=0),b.set("isSafari",G.indexOf("Safari")>=0);const N=Object.prototype.hasOwnProperty;class K{static has(R){return m.create(R)}static equals(R,j){return g.create(R,j)}static regex(R,j){return C.create(R,j)}static not(R){return l.create(R)}static and(...R){return O.create(R,null)}static or(...R){return w.create(R,null,!0)}static deserialize(R,j=!1){return R?this._deserializeOrExpression(R,j):void 0}static _deserializeOrExpression(R,j){let U=R.split("||");return w.create(U.map(_=>this._deserializeAndExpression(_,j)),null,!0)}static _deserializeAndExpression(R,j){let U=R.split("&&");return O.create(U.map(_=>this._deserializeOne(_,j)),null)}static _deserializeOne(R,j){if(R=R.trim(),R.indexOf("!=")>=0){let U=R.split("!=");return p.create(U[0].trim(),this._deserializeValue(U[1],j))}if(R.indexOf("==")>=0){let U=R.split("==");return g.create(U[0].trim(),this._deserializeValue(U[1],j))}if(R.indexOf("=~")>=0){let U=R.split("=~");return C.create(U[0].trim(),this._deserializeRegexValue(U[1],j))}if(R.indexOf(" in ")>=0){let U=R.split(" in ");return u.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(R)){const U=R.split(">=");return a.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(R)){const U=R.split(">");return s.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(R)){const U=R.split("<=");return S.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(R)){const U=R.split("<");return A.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(R)?l.create(R.substr(1).trim()):m.create(R)}static _deserializeValue(R,j){if(R=R.trim(),R==="true")return!0;if(R==="false")return!1;let U=/^'([^']*)'$/.exec(R);return U?U[1].trim():R}static _deserializeRegexValue(R,j){if(Object(X.C)(R)){if(j)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=R.indexOf("/"),_=R.lastIndexOf("/");if(U===_||U<0){if(j)throw new Error(`bad regexp-value '${R}', missing /-enclosure`);return console.warn(`bad regexp-value '${R}', missing /-enclosure`),null}let J=R.slice(U+1,_),ne=R[_+1]==="i"?"i":"";try{return new RegExp(J,ne)}catch(he){if(j)throw new Error(`bad regexp-value '${R}', parse error: ${he}`);return console.warn(`bad regexp-value '${R}', parse error: ${he}`),null}}}function W(R,j){const U=R?R.substituteConstants():void 0,_=j?j.substituteConstants():void 0;return!U&&!_?!0:!U||!_?!1:U.equals(_)}function n(R,j){return R.cmp(j)}class I{constructor(){this.type=0}cmp(R){return this.type-R.type}equals(R){return R.type===this.type}substituteConstants(){return this}evaluate(R){return!1}serialize(){return"false"}keys(){return[]}negate(){return y.INSTANCE}}I.INSTANCE=new I;class y{constructor(){this.type=1}cmp(R){return this.type-R.type}equals(R){return R.type===this.type}substituteConstants(){return this}evaluate(R){return!0}serialize(){return"true"}keys(){return[]}negate(){return I.INSTANCE}}y.INSTANCE=new y;class m{constructor(R,j){this.key=R,this.negated=j,this.type=2}static create(R,j=null){const U=b.get(R);return typeof U=="boolean"?U?y.INSTANCE:I.INSTANCE:new m(R,j)}cmp(R){return R.type!==this.type?this.type-R.type:f(this.key,R.key)}equals(R){return R.type===this.type?this.key===R.key:!1}substituteConstants(){const R=b.get(this.key);return typeof R=="boolean"?R?y.INSTANCE:I.INSTANCE:this}evaluate(R){return!!R.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this)),this.negated}}class g{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=4}static create(R,j,U=null){if(typeof j=="boolean")return j?m.create(R,U):l.create(R,U);const _=b.get(R);if(typeof _=="boolean"){const J=_?"true":"false";return j===J?y.INSTANCE:I.INSTANCE}return new g(R,j,U)}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){const R=b.get(this.key);if(typeof R=="boolean"){const j=R?"true":"false";return this.value===j?y.INSTANCE:I.INSTANCE}return this}evaluate(R){return R.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}class u{constructor(R,j){this.key=R,this.valueKey=j,this.type=10,this.negated=null}static create(R,j){return new u(R,j)}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.valueKey,R.key,R.valueKey)}equals(R){return R.type===this.type?this.key===R.key&&this.valueKey===R.valueKey:!1}substituteConstants(){return this}evaluate(R){const j=R.getValue(this.valueKey),U=R.getValue(this.key);return Array.isArray(j)?j.indexOf(U)>=0:typeof U=="string"&&typeof j=="object"&&j!==null?N.call(j,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=c.create(this)),this.negated}}class c{constructor(R){this._actual=R,this.type=11}static create(R){return new c(R)}cmp(R){return R.type!==this.type?this.type-R.type:this._actual.cmp(R._actual)}equals(R){return R.type===this.type?this._actual.equals(R._actual):!1}substituteConstants(){return this}evaluate(R){return!this._actual.evaluate(R)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class p{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=5}static create(R,j,U=null){if(typeof j=="boolean")return j?l.create(R,U):m.create(R,U);const _=b.get(R);if(typeof _=="boolean"){const J=_?"true":"false";return j===J?I.INSTANCE:y.INSTANCE}return new p(R,j,U)}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){const R=b.get(this.key);if(typeof R=="boolean"){const j=R?"true":"false";return this.value===j?I.INSTANCE:y.INSTANCE}return this}evaluate(R){return R.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=g.create(this.key,this.value,this)),this.negated}}class l{constructor(R,j){this.key=R,this.negated=j,this.type=3}static create(R,j=null){const U=b.get(R);return typeof U=="boolean"?U?I.INSTANCE:y.INSTANCE:new l(R,j)}cmp(R){return R.type!==this.type?this.type-R.type:f(this.key,R.key)}equals(R){return R.type===this.type?this.key===R.key:!1}substituteConstants(){const R=b.get(this.key);return typeof R=="boolean"?R?I.INSTANCE:y.INSTANCE:this}evaluate(R){return!R.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this)),this.negated}}function o(R,j){if(typeof R=="string"){const U=parseFloat(R);isNaN(U)||(R=U)}return typeof R=="string"||typeof R=="number"?j(R):I.INSTANCE}class s{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=12}static create(R,j,U=null){return o(j,_=>new s(R,_,U))}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this.value,this)),this.negated}}class a{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=13}static create(R,j,U=null){return o(j,_=>new a(R,_,U))}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class A{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=14}static create(R,j,U=null){return o(j,_=>new A(R,_,U))}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}class S{constructor(R,j,U){this.key=R,this.value=j,this.negated=U,this.type=15}static create(R,j,U=null){return o(j,_=>new S(R,_,U))}cmp(R){return R.type!==this.type?this.type-R.type:v(this.key,this.value,R.key,R.value)}equals(R){return R.type===this.type?this.key===R.key&&this.value===R.value:!1}substituteConstants(){return this}evaluate(R){return typeof this.value=="string"?!1:parseFloat(R.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class C{constructor(R,j){this.key=R,this.regexp=j,this.type=7,this.negated=null}static create(R,j){return new C(R,j)}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.key<R.key)return-1;if(this.key>R.key)return 1;const j=this.regexp?this.regexp.source:"",U=R.regexp?R.regexp.source:"";return j<U?-1:j>U?1:0}equals(R){if(R.type===this.type){const j=this.regexp?this.regexp.source:"",U=R.regexp?R.regexp.source:"";return this.key===R.key&&j===U}return!1}substituteConstants(){return this}evaluate(R){let j=R.getValue(this.key);return this.regexp?this.regexp.test(j):!1}serialize(){const R=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${R}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this)),this.negated}}class L{constructor(R){this._actual=R,this.type=8}static create(R){return new L(R)}cmp(R){return R.type!==this.type?this.type-R.type:this._actual.cmp(R._actual)}equals(R){return R.type===this.type?this._actual.equals(R._actual):!1}substituteConstants(){return this}evaluate(R){return!this._actual.evaluate(R)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function D(R){let j=null;for(let U=0,_=R.length;U<_;U++){const J=R[U].substituteConstants();if(R[U]!==J&&j===null){j=[];for(let ne=0;ne<U;ne++)j[ne]=R[ne]}j!==null&&(j[U]=J)}return j===null?R:j}class O{constructor(R,j){this.expr=R,this.negated=j,this.type=6}static create(R,j){return O._normalizeArr(R,j)}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.expr.length<R.expr.length)return-1;if(this.expr.length>R.expr.length)return 1;for(let j=0,U=this.expr.length;j<U;j++){const _=n(this.expr[j],R.expr[j]);if(_!==0)return _}return 0}equals(R){if(R.type===this.type){if(this.expr.length!==R.expr.length)return!1;for(let j=0,U=this.expr.length;j<U;j++)if(!this.expr[j].equals(R.expr[j]))return!1;return!0}return!1}substituteConstants(){const R=D(this.expr);return R===this.expr?this:O.create(R,this.negated)}evaluate(R){for(let j=0,U=this.expr.length;j<U;j++)if(!this.expr[j].evaluate(R))return!1;return!0}static _normalizeArr(R,j){const U=[];let _=!1;for(const J of R){if(!J)continue;if(J.type===1){_=!0;continue}if(J.type===0)return I.INSTANCE;if(J.type===6){U.push(...J.expr);continue}U.push(J)}if(U.length===0&&_)return y.INSTANCE;if(U.length===0)return;if(U.length===1)return U[0];U.sort(n);for(let J=1;J<U.length;J++)U[J-1].equals(U[J])&&(U.splice(J,1),J--);if(U.length===1)return U[0];for(;U.length>1;){const J=U[U.length-1];if(J.type!==9)break;U.pop();const ne=U.pop(),he=U.length===0,be=w.create(J.expr.map(Ke=>O.create([Ke,ne],null)),null,he);be&&(U.push(be),U.sort(n))}return U.length===1?U[0]:new O(U,j)}serialize(){return this.expr.map(R=>R.serialize()).join(" && ")}keys(){const R=[];for(let j of this.expr)R.push(...j.keys());return R}negate(){if(!this.negated){const R=[];for(let j of this.expr)R.push(j.negate());this.negated=w.create(R,this,!0)}return this.negated}}class w{constructor(R,j){this.expr=R,this.negated=j,this.type=9}static create(R,j,U){return w._normalizeArr(R,j,U)}cmp(R){if(R.type!==this.type)return this.type-R.type;if(this.expr.length<R.expr.length)return-1;if(this.expr.length>R.expr.length)return 1;for(let j=0,U=this.expr.length;j<U;j++){const _=n(this.expr[j],R.expr[j]);if(_!==0)return _}return 0}equals(R){if(R.type===this.type){if(this.expr.length!==R.expr.length)return!1;for(let j=0,U=this.expr.length;j<U;j++)if(!this.expr[j].equals(R.expr[j]))return!1;return!0}return!1}substituteConstants(){const R=D(this.expr);return R===this.expr?this:w.create(R,this.negated,!1)}evaluate(R){for(let j=0,U=this.expr.length;j<U;j++)if(this.expr[j].evaluate(R))return!0;return!1}static _normalizeArr(R,j,U){let _=[],J=!1;if(R){for(let ne=0,he=R.length;ne<he;ne++){const be=R[ne];if(!be)continue;if(be.type===0){J=!0;continue}if(be.type===1)return y.INSTANCE;if(be.type===9){_=_.concat(be.expr);continue}_.push(be)}if(_.length===0&&J)return I.INSTANCE;_.sort(n)}if(_.length===0)return;if(_.length===1)return _[0];for(let ne=1;ne<_.length;ne++)_[ne-1].equals(_[ne])&&(_.splice(ne,1),ne--);if(_.length===1)return _[0];if(U){for(let ne=0;ne<_.length;ne++)for(let he=ne+1;he<_.length;he++)T(_[ne],_[he])&&(_.splice(he,1),he--);if(_.length===1)return _[0]}return new w(_,j)}serialize(){return this.expr.map(R=>R.serialize()).join(" || ")}keys(){const R=[];for(let j of this.expr)R.push(...j.keys());return R}negate(){if(!this.negated){let R=[];for(let j of this.expr)R.push(j.negate());for(;R.length>1;){const j=R.shift(),U=R.shift(),_=[];for(const ne of B(j))for(const he of B(U))_.push(O.create([ne,he],null));const J=R.length===0;R.unshift(w.create(_,null,J))}this.negated=R[0]}return this.negated}}class x extends m{constructor(R,j,U){super(R,null);this._defaultValue=j,typeof U=="object"?x._info.push(Object.assign(Object.assign({},U),{key:R})):U!==!0&&x._info.push({key:R,description:U,type:j!=null?typeof j:void 0})}static all(){return x._info.values()}bindTo(R){return R.createKey(this.key,this._defaultValue)}getValue(R){return R.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(R){return g.create(this.key,R)}}x._info=[];const d=Object(k.c)("contextKeyService"),E="setContext";function f(R,j){return R<j?-1:R>j?1:0}function v(R,j,U,_){return R<U?-1:R>U?1:j<_?-1:j>_?1:0}function T(R,j){if(j.type===6&&R.type!==9&&R.type!==6){for(const J of j.expr)if(R.equals(J))return!0}const U=R.negate(),_=B(U).concat(B(j));_.sort(n);for(let J=0;J<_.length;J++){const ne=_[J],he=ne.negate();for(let be=J+1;be<_.length;be++){const Ke=_[be];if(he.equals(Ke))return!0}}return!1}function B(R){return R.type===9?R.expr:[R]}},TXwP:function(tt,Ee,H){var ae,X;(function(){var k;(function(){"use strict";var b=[,,function(n){function I(g){this.__parent=g,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=[]}I.prototype.clone_empty=function(){var g=new I(this.__parent);return g.set_indent(this.__indent_count,this.__alignment_count),g},I.prototype.item=function(g){return g<0?this.__items[this.__items.length+g]:this.__items[g]},I.prototype.has_match=function(g){for(var u=this.__items.length-1;u>=0;u--)if(this.__items[u].match(g))return!0;return!1},I.prototype.set_indent=function(g,u){this.is_empty()&&(this.__indent_count=g||0,this.__alignment_count=u||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},I.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)},I.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},I.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var g=this.__parent.current_line;return g.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),g.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),g.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,g.__items[0]===" "&&(g.__items.splice(0,1),g.__character_count-=1),!0}return!1},I.prototype.is_empty=function(){return this.__items.length===0},I.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},I.prototype.push=function(g){this.__items.push(g);var u=g.lastIndexOf(`
|
|
`);u!==-1?this.__character_count=g.length-u:this.__character_count+=g.length},I.prototype.pop=function(){var g=null;return this.is_empty()||(g=this.__items.pop(),this.__character_count-=g.length),g},I.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},I.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},I.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},I.prototype.toString=function(){var g="";return this.is_empty()?this.__parent.indent_empty_lines&&(g=this.__parent.get_indent_string(this.__indent_count)):(g=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),g+=this.__items.join("")),g};function y(g,u){this.__cache=[""],this.__indent_size=g.indent_size,this.__indent_string=g.indent_char,g.indent_with_tabs||(this.__indent_string=new Array(g.indent_size+1).join(g.indent_char)),u=u||"",g.indent_level>0&&(u=new Array(g.indent_level+1).join(this.__indent_string)),this.__base_string=u,this.__base_string_length=u.length}y.prototype.get_indent_size=function(g,u){var c=this.__base_string_length;return u=u||0,g<0&&(c=0),c+=g*this.__indent_size,c+=u,c},y.prototype.get_indent_string=function(g,u){var c=this.__base_string;return u=u||0,g<0&&(g=0,c=""),u+=g*this.__indent_size,this.__ensure_cache(u),c+=this.__cache[u],c},y.prototype.__ensure_cache=function(g){for(;g>=this.__cache.length;)this.__add_column()},y.prototype.__add_column=function(){var g=this.__cache.length,u=0,c="";this.__indent_size&&g>=this.__indent_size&&(u=Math.floor(g/this.__indent_size),g-=u*this.__indent_size,c=new Array(u+1).join(this.__indent_string)),g&&(c+=new Array(g+1).join(" ")),this.__cache.push(c)};function m(g,u){this.__indent_cache=new y(g,u),this.raw=!1,this._end_with_newline=g.end_with_newline,this.indent_size=g.indent_size,this.wrap_line_length=g.wrap_line_length,this.indent_empty_lines=g.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new I(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(g,u){return this.__indent_cache.get_indent_string(g,u)},m.prototype.get_indent_size=function(g,u){return this.__indent_cache.get_indent_size(g,u)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(g){return this.is_empty()||!g&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(g){this.trim(!0);var u=this.current_line.pop();u&&(u[u.length-1]===`
|
|
`&&(u=u.replace(/\n+$/g,"")),this.current_line.push(u)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(`
|
|
`);return g!==`
|
|
`&&(c=c.replace(/[\n]/g,g)),c},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(g,u){return g=g||0,u=u||0,this.next_line.set_indent(g,u),this.__lines.length>1?(this.current_line.set_indent(g,u),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(g){for(var u=0;u<g.newlines;u++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(g.whitespace_before),this.current_line.push(g.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},m.prototype.add_token=function(g){this.__add_space_before_token(),this.current_line.push(g),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},m.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(" "))},m.prototype.remove_indent=function(g){for(var u=this.__lines.length;g<u;)this.__lines[g]._remove_indent(),g++;this.current_line._remove_wrap_indent()},m.prototype.trim=function(g){for(g=g===void 0?!1:g,this.current_line.trim();g&&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},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(g,u){for(var c=this.__lines.length-2;c>=0;){var p=this.__lines[c];if(p.is_empty())break;if(p.item(0).indexOf(g)!==0&&p.item(-1)!==u){this.__lines.splice(c+1,0,new I(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},n.exports.Output=m},,,,function(n){function I(g,u){this.raw_options=y(g,u),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"])}I.prototype._get_array=function(g,u){var c=this.raw_options[g],p=u||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(p=c.concat()):typeof c=="string"&&(p=c.split(/[^a-zA-Z0-9_\/\-]+/)),p},I.prototype._get_boolean=function(g,u){var c=this.raw_options[g],p=c===void 0?!!u:!!c;return p},I.prototype._get_characters=function(g,u){var c=this.raw_options[g],p=u||"";return typeof c=="string"&&(p=c.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),p},I.prototype._get_number=function(g,u){var c=this.raw_options[g];u=parseInt(u,10),isNaN(u)&&(u=0);var p=parseInt(c,10);return isNaN(p)&&(p=u),p},I.prototype._get_selection=function(g,u,c){var p=this._get_selection_list(g,u,c);if(p.length!==1)throw new Error("Invalid Option Value: The option '"+g+`' can only be one of the following values:
|
|
`+u+`
|
|
You passed in: '`+this.raw_options[g]+"'");return p[0]},I.prototype._get_selection_list=function(g,u,c){if(!u||u.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[u[0]],!this._is_valid_selection(c,u))throw new Error("Invalid Default Value!");var p=this._get_array(g,c);if(!this._is_valid_selection(p,u))throw new Error("Invalid Option Value: The option '"+g+`' can contain only the following values:
|
|
`+u+`
|
|
You passed in: '`+this.raw_options[g]+"'");return p},I.prototype._is_valid_selection=function(g,u){return g.length&&u.length&&!g.some(function(c){return u.indexOf(c)===-1})};function y(g,u){var c={};g=m(g);var p;for(p in g)p!==u&&(c[p]=g[p]);if(u&&g[u])for(p in g[u])c[p]=g[u][p];return c}function m(g){var u={},c;for(c in g){var p=c.replace(/-/g,"_");u[p]=g[c]}return u}n.exports.Options=I,n.exports.normalizeOpts=m,n.exports.mergeOpts=y},,function(n){var I=RegExp.prototype.hasOwnProperty("sticky");function y(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}y.prototype.restart=function(){this.__position=0},y.prototype.back=function(){this.__position>0&&(this.__position-=1)},y.prototype.hasNext=function(){return this.__position<this.__input_length},y.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__input.charAt(this.__position),this.__position+=1),m},y.prototype.peek=function(m){var g=null;return m=m||0,m+=this.__position,m>=0&&m<this.__input_length&&(g=this.__input.charAt(m)),g},y.prototype.__match=function(m,g){m.lastIndex=g;var u=m.exec(this.__input);return u&&!(I&&m.sticky)&&(u.index!==g&&(u=null)),u},y.prototype.test=function(m,g){return g=g||0,g+=this.__position,g>=0&&g<this.__input_length?!!this.__match(m,g):!1},y.prototype.testChar=function(m,g){var u=this.peek(g);return m.lastIndex=0,u!==null&&m.test(u)},y.prototype.match=function(m){var g=this.__match(m,this.__position);return g?this.__position+=g[0].length:g=null,g},y.prototype.read=function(m,g,u){var c="",p;return m&&(p=this.match(m),p&&(c+=p[0])),g&&(p||!m)&&(c+=this.readUntil(g,u)),c},y.prototype.readUntil=function(m,g){var u="",c=this.__position;m.lastIndex=this.__position;var p=m.exec(this.__input);return p?(c=p.index,g&&(c+=p[0].length)):c=this.__input_length,u=this.__input.substring(this.__position,c),this.__position=c,u},y.prototype.readUntilAfter=function(m){return this.readUntil(m,!0)},y.prototype.get_regexp=function(m,g){var u=null,c="g";return g&&I&&(c="y"),typeof m=="string"&&m!==""?u=new RegExp(m,c):m&&(u=new RegExp(m.source,c)),u},y.prototype.get_literal_regexp=function(m){return RegExp(m.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},y.prototype.peekUntilAfter=function(m){var g=this.__position,u=this.readUntilAfter(m);return this.__position=g,u},y.prototype.lookBack=function(m){var g=this.__position-1;return g>=m.length&&this.__input.substring(g-m.length,g).toLowerCase()===m},n.exports.InputScanner=y},,,,,function(n){function I(y,m){y=typeof y=="string"?y:y.source,m=typeof m=="string"?m:m.source,this.__directives_block_pattern=new RegExp(y+/ beautify( \w+[:]\w+)+ /.source+m,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(y+/\sbeautify\signore:end\s/.source+m,"g")}I.prototype.get_directives=function(y){if(!y.match(this.__directives_block_pattern))return null;var m={};this.__directive_pattern.lastIndex=0;for(var g=this.__directive_pattern.exec(y);g;)m[g[1]]=g[2],g=this.__directive_pattern.exec(y);return m},I.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=I},,function(n,I,y){var m=y(16).Beautifier,g=y(17).Options;function u(c,p){var l=new m(c,p);return l.beautify()}n.exports=u,n.exports.defaultOptions=function(){return new g}},function(n,I,y){var m=y(17).Options,g=y(2).Output,u=y(8).InputScanner,c=y(13).Directives,p=new c(/\/\*/,/\*\//),l=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,s=/\s/,a=/(?:\s|\n)+/g,A=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,S=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function C(L,D){this._source_text=L||"",this._options=new m(D),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"]}C.prototype.eatString=function(L){var D="";for(this._ch=this._input.next();this._ch;){if(D+=this._ch,this._ch==="\\")D+=this._input.next();else if(L.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return D},C.prototype.eatWhitespace=function(L){for(var D=s.test(this._input.peek()),O=0;s.test(this._input.peek());)this._ch=this._input.next(),L&&this._ch===`
|
|
`&&((O===0||O<this._options.max_preserve_newlines)&&(O++,this._output.add_new_line(!0)));return D},C.prototype.foundNestedPseudoClass=function(){for(var L=0,D=1,O=this._input.peek(D);O;){if(O==="{")return!0;if(O==="(")L+=1;else if(O===")"){if(L===0)return!1;L-=1}else if(O===";"||O==="}")return!1;D++,O=this._input.peek(D)}return!1},C.prototype.print_string=function(L){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(L)},C.prototype.preserveSingleSpace=function(L){L&&(this._output.space_before_token=!0)},C.prototype.indent=function(){this._indentLevel++},C.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},C.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L=this._source_text,D=this._options.eol;D==="auto"&&(D=`
|
|
`,L&&l.test(L||"")&&(D=L.match(l)[0])),L=L.replace(o,`
|
|
`);var O=L.match(/^[\t ]*/)[0];this._output=new g(this._options,O),this._input=new u(L),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var w=0,x=!1,d=!1,E=!1,f=!1,v=!1,T=!1,B=this._ch,R=!1,j,U,_;j=this._input.read(a),U=j!=="",_=B,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),B=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var J=this._input.read(A),ne=p.get_directives(J);ne&&ne.ignore==="start"&&(J+=p.readIgnored(this._input)),this.print_string(J),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(S)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(U),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var he=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);he.match(/[ :]$/)&&(he=this.eatString(": ").replace(/\s$/,""),this.print_string(he),this._output.space_before_token=!0),he=he.replace(/\s$/,""),he==="extend"?f=!0:he==="import"&&(v=!0),he in this.NESTED_AT_RULE?(this._nestedLevel+=1,he in this.CONDITIONAL_GROUP_RULE&&(E=!0)):!x&&w===0&&he.indexOf(":")!==-1&&(d=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")d&&(d=!1,this.outdent()),E?(E=!1,x=this._indentLevel>=this._nestedLevel):x=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&x&&(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)):(_==="("?this._output.space_before_token=!1:_!==","&&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(),_==="{"&&this._output.trim(!0),v=!1,f=!1,d&&(this.outdent(),d=!1),this.print_string(this._ch),x=!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 be=0;be<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;be++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[be])){R=!0;break}(x||E)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!f&&w===0?(this.print_string(":"),d||(d=!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 Ke=_==='"'||_==="'";this.preserveSingleSpace(Ke||U),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")R=!1,w===0?(d&&(this.outdent(),d=!1),f=!1,v=!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 De=!1;this._input.lookBack("with")&&(De=!0),this.preserveSingleSpace(U||De),this.print_string(this._ch),d&&_==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),T=!0):(this.eatWhitespace(),w++,this.indent())}else if(this._ch===")")w&&(w--,this.outdent()),T&&this._input.peek()===";"&&this._options.selector_separator_newline&&(T=!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&&(!d||T)&&w===0&&!v&&!f?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!d&&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&&s.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(U),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),s.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 je=_==='"'||_==="'";this.preserveSingleSpace(je||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&R&&this._output.add_new_line()}var Be=this._output.get_code(D);return Be},n.exports.Beautifier=C},function(n,I,y){var m=y(6).Options;function g(u){m.call(this,u,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var c=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||c;var p=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var l=0;l<p.length;l++)p[l]!=="expand"?this.brace_style="collapse":this.brace_style=p[l]}g.prototype=new m,n.exports.Options=g}],N={};function K(n){var I=N[n];if(I!==void 0)return I.exports;var y=N[n]={exports:{}};return b[n](y,y.exports,K),y.exports}var W=K(15);k=W})();var G=k;!(ae=[],X=function(){return{css_beautify:G}}.apply(Ee,ae),X!==void 0&&(tt.exports=X))})()},UU91:function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___W-luD",flex_space_between:"flex_space_between___MDZOl",flex_box_vertical_center:"flex_box_vertical_center___GF3w8",flex_box_center_end:"flex_box_center_end___UZLKo",flex_box_column:"flex_box_column___26ZEG",bg:"bg___Lrg3h",containerTitle:"containerTitle___36aFc",containerDesc:"containerDesc___1ITIo",listItem:"listItem___3yIgk",info:"info___1J349",title:"title___1poFp",titleLeft:"titleLeft___1G4yJ",titleRight:"titleRight___3ZAtk",acitons:"acitons___rsUze",export:"export___23Ina"}},Vhoy:function(tt,Ee,H){"use strict";H.d(Ee,"d",function(){return G}),H.d(Ee,"e",function(){return b}),H.d(Ee,"c",function(){return N}),H.d(Ee,"b",function(){return K}),H.d(Ee,"a",function(){return W});var ae=H("MI8n");class X{constructor(){this._icons=new Map,this._onDidRegister=new ae.b}add(n){const I=this._icons.get(n.id);I?n.description?I.description=n.description:console.error(`Duplicate registration of codicon ${n.id}`):(this._icons.set(n.id,n),this._onDidRegister.fire(n))}get(n){return this._icons.get(n)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const k=new X,G=k;function b(n,I){return new K(n,I)}function N(n){return n?n.replace(/\$\((.*?)\)/g,(I,y)=>` ${y} `).trim():""}class K{constructor(n,I,y){this.id=n,this.definition=I,this.description=y,k.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var W;(function(n){n.iconNameSegment="[A-Za-z0-9]+",n.iconNameExpression="[A-Za-z0-9\\-]+",n.iconModifierExpression="~[A-Za-z]+";const I=new RegExp(`^(${n.iconNameExpression})(${n.iconModifierExpression})?$`);function y(u){if(u instanceof K)return["codicon","codicon-"+u.id];const c=I.exec(u.id);if(!c)return y(K.error);let[,p,l]=c;const o=["codicon","codicon-"+p];return l&&o.push("codicon-modifier-"+l.substr(1)),o}n.asClassNameArray=y;function m(u){return y(u).join(" ")}n.asClassName=m;function g(u){return"."+y(u).join(".")}n.asCSSSelector=g})(W||(W={})),function(n){n.add=new n("add",{fontCharacter:"\\ea60"}),n.plus=new n("plus",n.add.definition),n.gistNew=new n("gist-new",n.add.definition),n.repoCreate=new n("repo-create",n.add.definition),n.lightbulb=new n("lightbulb",{fontCharacter:"\\ea61"}),n.lightBulb=new n("light-bulb",{fontCharacter:"\\ea61"}),n.repo=new n("repo",{fontCharacter:"\\ea62"}),n.repoDelete=new n("repo-delete",{fontCharacter:"\\ea62"}),n.gistFork=new n("gist-fork",{fontCharacter:"\\ea63"}),n.repoForked=new n("repo-forked",{fontCharacter:"\\ea63"}),n.gitPullRequest=new n("git-pull-request",{fontCharacter:"\\ea64"}),n.gitPullRequestAbandoned=new n("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),n.recordKeys=new n("record-keys",{fontCharacter:"\\ea65"}),n.keyboard=new n("keyboard",{fontCharacter:"\\ea65"}),n.tag=new n("tag",{fontCharacter:"\\ea66"}),n.tagAdd=new n("tag-add",{fontCharacter:"\\ea66"}),n.tagRemove=new n("tag-remove",{fontCharacter:"\\ea66"}),n.person=new n("person",{fontCharacter:"\\ea67"}),n.personFollow=new n("person-follow",{fontCharacter:"\\ea67"}),n.personOutline=new n("person-outline",{fontCharacter:"\\ea67"}),n.personFilled=new n("person-filled",{fontCharacter:"\\ea67"}),n.gitBranch=new n("git-branch",{fontCharacter:"\\ea68"}),n.gitBranchCreate=new n("git-branch-create",{fontCharacter:"\\ea68"}),n.gitBranchDelete=new n("git-branch-delete",{fontCharacter:"\\ea68"}),n.sourceControl=new n("source-control",{fontCharacter:"\\ea68"}),n.mirror=new n("mirror",{fontCharacter:"\\ea69"}),n.mirrorPublic=new n("mirror-public",{fontCharacter:"\\ea69"}),n.star=new n("star",{fontCharacter:"\\ea6a"}),n.starAdd=new n("star-add",{fontCharacter:"\\ea6a"}),n.starDelete=new n("star-delete",{fontCharacter:"\\ea6a"}),n.starEmpty=new n("star-empty",{fontCharacter:"\\ea6a"}),n.comment=new n("comment",{fontCharacter:"\\ea6b"}),n.commentAdd=new n("comment-add",{fontCharacter:"\\ea6b"}),n.alert=new n("alert",{fontCharacter:"\\ea6c"}),n.warning=new n("warning",{fontCharacter:"\\ea6c"}),n.search=new n("search",{fontCharacter:"\\ea6d"}),n.searchSave=new n("search-save",{fontCharacter:"\\ea6d"}),n.logOut=new n("log-out",{fontCharacter:"\\ea6e"}),n.signOut=new n("sign-out",{fontCharacter:"\\ea6e"}),n.logIn=new n("log-in",{fontCharacter:"\\ea6f"}),n.signIn=new n("sign-in",{fontCharacter:"\\ea6f"}),n.eye=new n("eye",{fontCharacter:"\\ea70"}),n.eyeUnwatch=new n("eye-unwatch",{fontCharacter:"\\ea70"}),n.eyeWatch=new n("eye-watch",{fontCharacter:"\\ea70"}),n.circleFilled=new n("circle-filled",{fontCharacter:"\\ea71"}),n.primitiveDot=new n("primitive-dot",{fontCharacter:"\\ea71"}),n.closeDirty=new n("close-dirty",{fontCharacter:"\\ea71"}),n.debugBreakpoint=new n("debug-breakpoint",{fontCharacter:"\\ea71"}),n.debugBreakpointDisabled=new n("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),n.debugHint=new n("debug-hint",{fontCharacter:"\\ea71"}),n.primitiveSquare=new n("primitive-square",{fontCharacter:"\\ea72"}),n.edit=new n("edit",{fontCharacter:"\\ea73"}),n.pencil=new n("pencil",{fontCharacter:"\\ea73"}),n.info=new n("info",{fontCharacter:"\\ea74"}),n.issueOpened=new n("issue-opened",{fontCharacter:"\\ea74"}),n.gistPrivate=new n("gist-private",{fontCharacter:"\\ea75"}),n.gitForkPrivate=new n("git-fork-private",{fontCharacter:"\\ea75"}),n.lock=new n("lock",{fontCharacter:"\\ea75"}),n.mirrorPrivate=new n("mirror-private",{fontCharacter:"\\ea75"}),n.close=new n("close",{fontCharacter:"\\ea76"}),n.removeClose=new n("remove-close",{fontCharacter:"\\ea76"}),n.x=new n("x",{fontCharacter:"\\ea76"}),n.repoSync=new n("repo-sync",{fontCharacter:"\\ea77"}),n.sync=new n("sync",{fontCharacter:"\\ea77"}),n.clone=new n("clone",{fontCharacter:"\\ea78"}),n.desktopDownload=new n("desktop-download",{fontCharacter:"\\ea78"}),n.beaker=new n("beaker",{fontCharacter:"\\ea79"}),n.microscope=new n("microscope",{fontCharacter:"\\ea79"}),n.vm=new n("vm",{fontCharacter:"\\ea7a"}),n.deviceDesktop=new n("device-desktop",{fontCharacter:"\\ea7a"}),n.file=new n("file",{fontCharacter:"\\ea7b"}),n.fileText=new n("file-text",{fontCharacter:"\\ea7b"}),n.more=new n("more",{fontCharacter:"\\ea7c"}),n.ellipsis=new n("ellipsis",{fontCharacter:"\\ea7c"}),n.kebabHorizontal=new n("kebab-horizontal",{fontCharacter:"\\ea7c"}),n.mailReply=new n("mail-reply",{fontCharacter:"\\ea7d"}),n.reply=new n("reply",{fontCharacter:"\\ea7d"}),n.organization=new n("organization",{fontCharacter:"\\ea7e"}),n.organizationFilled=new n("organization-filled",{fontCharacter:"\\ea7e"}),n.organizationOutline=new n("organization-outline",{fontCharacter:"\\ea7e"}),n.newFile=new n("new-file",{fontCharacter:"\\ea7f"}),n.fileAdd=new n("file-add",{fontCharacter:"\\ea7f"}),n.newFolder=new n("new-folder",{fontCharacter:"\\ea80"}),n.fileDirectoryCreate=new n("file-directory-create",{fontCharacter:"\\ea80"}),n.trash=new n("trash",{fontCharacter:"\\ea81"}),n.trashcan=new n("trashcan",{fontCharacter:"\\ea81"}),n.history=new n("history",{fontCharacter:"\\ea82"}),n.clock=new n("clock",{fontCharacter:"\\ea82"}),n.folder=new n("folder",{fontCharacter:"\\ea83"}),n.fileDirectory=new n("file-directory",{fontCharacter:"\\ea83"}),n.symbolFolder=new n("symbol-folder",{fontCharacter:"\\ea83"}),n.logoGithub=new n("logo-github",{fontCharacter:"\\ea84"}),n.markGithub=new n("mark-github",{fontCharacter:"\\ea84"}),n.github=new n("github",{fontCharacter:"\\ea84"}),n.terminal=new n("terminal",{fontCharacter:"\\ea85"}),n.console=new n("console",{fontCharacter:"\\ea85"}),n.repl=new n("repl",{fontCharacter:"\\ea85"}),n.zap=new n("zap",{fontCharacter:"\\ea86"}),n.symbolEvent=new n("symbol-event",{fontCharacter:"\\ea86"}),n.error=new n("error",{fontCharacter:"\\ea87"}),n.stop=new n("stop",{fontCharacter:"\\ea87"}),n.variable=new n("variable",{fontCharacter:"\\ea88"}),n.symbolVariable=new n("symbol-variable",{fontCharacter:"\\ea88"}),n.array=new n("array",{fontCharacter:"\\ea8a"}),n.symbolArray=new n("symbol-array",{fontCharacter:"\\ea8a"}),n.symbolModule=new n("symbol-module",{fontCharacter:"\\ea8b"}),n.symbolPackage=new n("symbol-package",{fontCharacter:"\\ea8b"}),n.symbolNamespace=new n("symbol-namespace",{fontCharacter:"\\ea8b"}),n.symbolObject=new n("symbol-object",{fontCharacter:"\\ea8b"}),n.symbolMethod=new n("symbol-method",{fontCharacter:"\\ea8c"}),n.symbolFunction=new n("symbol-function",{fontCharacter:"\\ea8c"}),n.symbolConstructor=new n("symbol-constructor",{fontCharacter:"\\ea8c"}),n.symbolBoolean=new n("symbol-boolean",{fontCharacter:"\\ea8f"}),n.symbolNull=new n("symbol-null",{fontCharacter:"\\ea8f"}),n.symbolNumeric=new n("symbol-numeric",{fontCharacter:"\\ea90"}),n.symbolNumber=new n("symbol-number",{fontCharacter:"\\ea90"}),n.symbolStructure=new n("symbol-structure",{fontCharacter:"\\ea91"}),n.symbolStruct=new n("symbol-struct",{fontCharacter:"\\ea91"}),n.symbolParameter=new n("symbol-parameter",{fontCharacter:"\\ea92"}),n.symbolTypeParameter=new n("symbol-type-parameter",{fontCharacter:"\\ea92"}),n.symbolKey=new n("symbol-key",{fontCharacter:"\\ea93"}),n.symbolText=new n("symbol-text",{fontCharacter:"\\ea93"}),n.symbolReference=new n("symbol-reference",{fontCharacter:"\\ea94"}),n.goToFile=new n("go-to-file",{fontCharacter:"\\ea94"}),n.symbolEnum=new n("symbol-enum",{fontCharacter:"\\ea95"}),n.symbolValue=new n("symbol-value",{fontCharacter:"\\ea95"}),n.symbolRuler=new n("symbol-ruler",{fontCharacter:"\\ea96"}),n.symbolUnit=new n("symbol-unit",{fontCharacter:"\\ea96"}),n.activateBreakpoints=new n("activate-breakpoints",{fontCharacter:"\\ea97"}),n.archive=new n("archive",{fontCharacter:"\\ea98"}),n.arrowBoth=new n("arrow-both",{fontCharacter:"\\ea99"}),n.arrowDown=new n("arrow-down",{fontCharacter:"\\ea9a"}),n.arrowLeft=new n("arrow-left",{fontCharacter:"\\ea9b"}),n.arrowRight=new n("arrow-right",{fontCharacter:"\\ea9c"}),n.arrowSmallDown=new n("arrow-small-down",{fontCharacter:"\\ea9d"}),n.arrowSmallLeft=new n("arrow-small-left",{fontCharacter:"\\ea9e"}),n.arrowSmallRight=new n("arrow-small-right",{fontCharacter:"\\ea9f"}),n.arrowSmallUp=new n("arrow-small-up",{fontCharacter:"\\eaa0"}),n.arrowUp=new n("arrow-up",{fontCharacter:"\\eaa1"}),n.bell=new n("bell",{fontCharacter:"\\eaa2"}),n.bold=new n("bold",{fontCharacter:"\\eaa3"}),n.book=new n("book",{fontCharacter:"\\eaa4"}),n.bookmark=new n("bookmark",{fontCharacter:"\\eaa5"}),n.debugBreakpointConditionalUnverified=new n("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),n.debugBreakpointConditional=new n("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),n.debugBreakpointConditionalDisabled=new n("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),n.debugBreakpointDataUnverified=new n("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),n.debugBreakpointData=new n("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),n.debugBreakpointDataDisabled=new n("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),n.debugBreakpointLogUnverified=new n("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),n.debugBreakpointLog=new n("debug-breakpoint-log",{fontCharacter:"\\eaab"}),n.debugBreakpointLogDisabled=new n("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),n.briefcase=new n("briefcase",{fontCharacter:"\\eaac"}),n.broadcast=new n("broadcast",{fontCharacter:"\\eaad"}),n.browser=new n("browser",{fontCharacter:"\\eaae"}),n.bug=new n("bug",{fontCharacter:"\\eaaf"}),n.calendar=new n("calendar",{fontCharacter:"\\eab0"}),n.caseSensitive=new n("case-sensitive",{fontCharacter:"\\eab1"}),n.check=new n("check",{fontCharacter:"\\eab2"}),n.checklist=new n("checklist",{fontCharacter:"\\eab3"}),n.chevronDown=new n("chevron-down",{fontCharacter:"\\eab4"}),n.dropDownButton=new n("drop-down-button",n.chevronDown.definition),n.chevronLeft=new n("chevron-left",{fontCharacter:"\\eab5"}),n.chevronRight=new n("chevron-right",{fontCharacter:"\\eab6"}),n.chevronUp=new n("chevron-up",{fontCharacter:"\\eab7"}),n.chromeClose=new n("chrome-close",{fontCharacter:"\\eab8"}),n.chromeMaximize=new n("chrome-maximize",{fontCharacter:"\\eab9"}),n.chromeMinimize=new n("chrome-minimize",{fontCharacter:"\\eaba"}),n.chromeRestore=new n("chrome-restore",{fontCharacter:"\\eabb"}),n.circleOutline=new n("circle-outline",{fontCharacter:"\\eabc"}),n.debugBreakpointUnverified=new n("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),n.circleSlash=new n("circle-slash",{fontCharacter:"\\eabd"}),n.circuitBoard=new n("circuit-board",{fontCharacter:"\\eabe"}),n.clearAll=new n("clear-all",{fontCharacter:"\\eabf"}),n.clippy=new n("clippy",{fontCharacter:"\\eac0"}),n.closeAll=new n("close-all",{fontCharacter:"\\eac1"}),n.cloudDownload=new n("cloud-download",{fontCharacter:"\\eac2"}),n.cloudUpload=new n("cloud-upload",{fontCharacter:"\\eac3"}),n.code=new n("code",{fontCharacter:"\\eac4"}),n.collapseAll=new n("collapse-all",{fontCharacter:"\\eac5"}),n.colorMode=new n("color-mode",{fontCharacter:"\\eac6"}),n.commentDiscussion=new n("comment-discussion",{fontCharacter:"\\eac7"}),n.compareChanges=new n("compare-changes",{fontCharacter:"\\eafd"}),n.creditCard=new n("credit-card",{fontCharacter:"\\eac9"}),n.dash=new n("dash",{fontCharacter:"\\eacc"}),n.dashboard=new n("dashboard",{fontCharacter:"\\eacd"}),n.database=new n("database",{fontCharacter:"\\eace"}),n.debugContinue=new n("debug-continue",{fontCharacter:"\\eacf"}),n.debugDisconnect=new n("debug-disconnect",{fontCharacter:"\\ead0"}),n.debugPause=new n("debug-pause",{fontCharacter:"\\ead1"}),n.debugRestart=new n("debug-restart",{fontCharacter:"\\ead2"}),n.debugStart=new n("debug-start",{fontCharacter:"\\ead3"}),n.debugStepInto=new n("debug-step-into",{fontCharacter:"\\ead4"}),n.debugStepOut=new n("debug-step-out",{fontCharacter:"\\ead5"}),n.debugStepOver=new n("debug-step-over",{fontCharacter:"\\ead6"}),n.debugStop=new n("debug-stop",{fontCharacter:"\\ead7"}),n.debug=new n("debug",{fontCharacter:"\\ead8"}),n.deviceCameraVideo=new n("device-camera-video",{fontCharacter:"\\ead9"}),n.deviceCamera=new n("device-camera",{fontCharacter:"\\eada"}),n.deviceMobile=new n("device-mobile",{fontCharacter:"\\eadb"}),n.diffAdded=new n("diff-added",{fontCharacter:"\\eadc"}),n.diffIgnored=new n("diff-ignored",{fontCharacter:"\\eadd"}),n.diffModified=new n("diff-modified",{fontCharacter:"\\eade"}),n.diffRemoved=new n("diff-removed",{fontCharacter:"\\eadf"}),n.diffRenamed=new n("diff-renamed",{fontCharacter:"\\eae0"}),n.diff=new n("diff",{fontCharacter:"\\eae1"}),n.discard=new n("discard",{fontCharacter:"\\eae2"}),n.editorLayout=new n("editor-layout",{fontCharacter:"\\eae3"}),n.emptyWindow=new n("empty-window",{fontCharacter:"\\eae4"}),n.exclude=new n("exclude",{fontCharacter:"\\eae5"}),n.extensions=new n("extensions",{fontCharacter:"\\eae6"}),n.eyeClosed=new n("eye-closed",{fontCharacter:"\\eae7"}),n.fileBinary=new n("file-binary",{fontCharacter:"\\eae8"}),n.fileCode=new n("file-code",{fontCharacter:"\\eae9"}),n.fileMedia=new n("file-media",{fontCharacter:"\\eaea"}),n.filePdf=new n("file-pdf",{fontCharacter:"\\eaeb"}),n.fileSubmodule=new n("file-submodule",{fontCharacter:"\\eaec"}),n.fileSymlinkDirectory=new n("file-symlink-directory",{fontCharacter:"\\eaed"}),n.fileSymlinkFile=new n("file-symlink-file",{fontCharacter:"\\eaee"}),n.fileZip=new n("file-zip",{fontCharacter:"\\eaef"}),n.files=new n("files",{fontCharacter:"\\eaf0"}),n.filter=new n("filter",{fontCharacter:"\\eaf1"}),n.flame=new n("flame",{fontCharacter:"\\eaf2"}),n.foldDown=new n("fold-down",{fontCharacter:"\\eaf3"}),n.foldUp=new n("fold-up",{fontCharacter:"\\eaf4"}),n.fold=new n("fold",{fontCharacter:"\\eaf5"}),n.folderActive=new n("folder-active",{fontCharacter:"\\eaf6"}),n.folderOpened=new n("folder-opened",{fontCharacter:"\\eaf7"}),n.gear=new n("gear",{fontCharacter:"\\eaf8"}),n.gift=new n("gift",{fontCharacter:"\\eaf9"}),n.gistSecret=new n("gist-secret",{fontCharacter:"\\eafa"}),n.gist=new n("gist",{fontCharacter:"\\eafb"}),n.gitCommit=new n("git-commit",{fontCharacter:"\\eafc"}),n.gitCompare=new n("git-compare",{fontCharacter:"\\eafd"}),n.gitMerge=new n("git-merge",{fontCharacter:"\\eafe"}),n.githubAction=new n("github-action",{fontCharacter:"\\eaff"}),n.githubAlt=new n("github-alt",{fontCharacter:"\\eb00"}),n.globe=new n("globe",{fontCharacter:"\\eb01"}),n.grabber=new n("grabber",{fontCharacter:"\\eb02"}),n.graph=new n("graph",{fontCharacter:"\\eb03"}),n.gripper=new n("gripper",{fontCharacter:"\\eb04"}),n.heart=new n("heart",{fontCharacter:"\\eb05"}),n.home=new n("home",{fontCharacter:"\\eb06"}),n.horizontalRule=new n("horizontal-rule",{fontCharacter:"\\eb07"}),n.hubot=new n("hubot",{fontCharacter:"\\eb08"}),n.inbox=new n("inbox",{fontCharacter:"\\eb09"}),n.issueClosed=new n("issue-closed",{fontCharacter:"\\eba4"}),n.issueReopened=new n("issue-reopened",{fontCharacter:"\\eb0b"}),n.issues=new n("issues",{fontCharacter:"\\eb0c"}),n.italic=new n("italic",{fontCharacter:"\\eb0d"}),n.jersey=new n("jersey",{fontCharacter:"\\eb0e"}),n.json=new n("json",{fontCharacter:"\\eb0f"}),n.kebabVertical=new n("kebab-vertical",{fontCharacter:"\\eb10"}),n.key=new n("key",{fontCharacter:"\\eb11"}),n.law=new n("law",{fontCharacter:"\\eb12"}),n.lightbulbAutofix=new n("lightbulb-autofix",{fontCharacter:"\\eb13"}),n.linkExternal=new n("link-external",{fontCharacter:"\\eb14"}),n.link=new n("link",{fontCharacter:"\\eb15"}),n.listOrdered=new n("list-ordered",{fontCharacter:"\\eb16"}),n.listUnordered=new n("list-unordered",{fontCharacter:"\\eb17"}),n.liveShare=new n("live-share",{fontCharacter:"\\eb18"}),n.loading=new n("loading",{fontCharacter:"\\eb19"}),n.location=new n("location",{fontCharacter:"\\eb1a"}),n.mailRead=new n("mail-read",{fontCharacter:"\\eb1b"}),n.mail=new n("mail",{fontCharacter:"\\eb1c"}),n.markdown=new n("markdown",{fontCharacter:"\\eb1d"}),n.megaphone=new n("megaphone",{fontCharacter:"\\eb1e"}),n.mention=new n("mention",{fontCharacter:"\\eb1f"}),n.milestone=new n("milestone",{fontCharacter:"\\eb20"}),n.mortarBoard=new n("mortar-board",{fontCharacter:"\\eb21"}),n.move=new n("move",{fontCharacter:"\\eb22"}),n.multipleWindows=new n("multiple-windows",{fontCharacter:"\\eb23"}),n.mute=new n("mute",{fontCharacter:"\\eb24"}),n.noNewline=new n("no-newline",{fontCharacter:"\\eb25"}),n.note=new n("note",{fontCharacter:"\\eb26"}),n.octoface=new n("octoface",{fontCharacter:"\\eb27"}),n.openPreview=new n("open-preview",{fontCharacter:"\\eb28"}),n.package_=new n("package",{fontCharacter:"\\eb29"}),n.paintcan=new n("paintcan",{fontCharacter:"\\eb2a"}),n.pin=new n("pin",{fontCharacter:"\\eb2b"}),n.play=new n("play",{fontCharacter:"\\eb2c"}),n.run=new n("run",{fontCharacter:"\\eb2c"}),n.plug=new n("plug",{fontCharacter:"\\eb2d"}),n.preserveCase=new n("preserve-case",{fontCharacter:"\\eb2e"}),n.preview=new n("preview",{fontCharacter:"\\eb2f"}),n.project=new n("project",{fontCharacter:"\\eb30"}),n.pulse=new n("pulse",{fontCharacter:"\\eb31"}),n.question=new n("question",{fontCharacter:"\\eb32"}),n.quote=new n("quote",{fontCharacter:"\\eb33"}),n.radioTower=new n("radio-tower",{fontCharacter:"\\eb34"}),n.reactions=new n("reactions",{fontCharacter:"\\eb35"}),n.references=new n("references",{fontCharacter:"\\eb36"}),n.refresh=new n("refresh",{fontCharacter:"\\eb37"}),n.regex=new n("regex",{fontCharacter:"\\eb38"}),n.remoteExplorer=new n("remote-explorer",{fontCharacter:"\\eb39"}),n.remote=new n("remote",{fontCharacter:"\\eb3a"}),n.remove=new n("remove",{fontCharacter:"\\eb3b"}),n.replaceAll=new n("replace-all",{fontCharacter:"\\eb3c"}),n.replace=new n("replace",{fontCharacter:"\\eb3d"}),n.repoClone=new n("repo-clone",{fontCharacter:"\\eb3e"}),n.repoForcePush=new n("repo-force-push",{fontCharacter:"\\eb3f"}),n.repoPull=new n("repo-pull",{fontCharacter:"\\eb40"}),n.repoPush=new n("repo-push",{fontCharacter:"\\eb41"}),n.report=new n("report",{fontCharacter:"\\eb42"}),n.requestChanges=new n("request-changes",{fontCharacter:"\\eb43"}),n.rocket=new n("rocket",{fontCharacter:"\\eb44"}),n.rootFolderOpened=new n("root-folder-opened",{fontCharacter:"\\eb45"}),n.rootFolder=new n("root-folder",{fontCharacter:"\\eb46"}),n.rss=new n("rss",{fontCharacter:"\\eb47"}),n.ruby=new n("ruby",{fontCharacter:"\\eb48"}),n.saveAll=new n("save-all",{fontCharacter:"\\eb49"}),n.saveAs=new n("save-as",{fontCharacter:"\\eb4a"}),n.save=new n("save",{fontCharacter:"\\eb4b"}),n.screenFull=new n("screen-full",{fontCharacter:"\\eb4c"}),n.screenNormal=new n("screen-normal",{fontCharacter:"\\eb4d"}),n.searchStop=new n("search-stop",{fontCharacter:"\\eb4e"}),n.server=new n("server",{fontCharacter:"\\eb50"}),n.settingsGear=new n("settings-gear",{fontCharacter:"\\eb51"}),n.settings=new n("settings",{fontCharacter:"\\eb52"}),n.shield=new n("shield",{fontCharacter:"\\eb53"}),n.smiley=new n("smiley",{fontCharacter:"\\eb54"}),n.sortPrecedence=new n("sort-precedence",{fontCharacter:"\\eb55"}),n.splitHorizontal=new n("split-horizontal",{fontCharacter:"\\eb56"}),n.splitVertical=new n("split-vertical",{fontCharacter:"\\eb57"}),n.squirrel=new n("squirrel",{fontCharacter:"\\eb58"}),n.starFull=new n("star-full",{fontCharacter:"\\eb59"}),n.starHalf=new n("star-half",{fontCharacter:"\\eb5a"}),n.symbolClass=new n("symbol-class",{fontCharacter:"\\eb5b"}),n.symbolColor=new n("symbol-color",{fontCharacter:"\\eb5c"}),n.symbolConstant=new n("symbol-constant",{fontCharacter:"\\eb5d"}),n.symbolEnumMember=new n("symbol-enum-member",{fontCharacter:"\\eb5e"}),n.symbolField=new n("symbol-field",{fontCharacter:"\\eb5f"}),n.symbolFile=new n("symbol-file",{fontCharacter:"\\eb60"}),n.symbolInterface=new n("symbol-interface",{fontCharacter:"\\eb61"}),n.symbolKeyword=new n("symbol-keyword",{fontCharacter:"\\eb62"}),n.symbolMisc=new n("symbol-misc",{fontCharacter:"\\eb63"}),n.symbolOperator=new n("symbol-operator",{fontCharacter:"\\eb64"}),n.symbolProperty=new n("symbol-property",{fontCharacter:"\\eb65"}),n.wrench=new n("wrench",{fontCharacter:"\\eb65"}),n.wrenchSubaction=new n("wrench-subaction",{fontCharacter:"\\eb65"}),n.symbolSnippet=new n("symbol-snippet",{fontCharacter:"\\eb66"}),n.tasklist=new n("tasklist",{fontCharacter:"\\eb67"}),n.telescope=new n("telescope",{fontCharacter:"\\eb68"}),n.textSize=new n("text-size",{fontCharacter:"\\eb69"}),n.threeBars=new n("three-bars",{fontCharacter:"\\eb6a"}),n.thumbsdown=new n("thumbsdown",{fontCharacter:"\\eb6b"}),n.thumbsup=new n("thumbsup",{fontCharacter:"\\eb6c"}),n.tools=new n("tools",{fontCharacter:"\\eb6d"}),n.triangleDown=new n("triangle-down",{fontCharacter:"\\eb6e"}),n.triangleLeft=new n("triangle-left",{fontCharacter:"\\eb6f"}),n.triangleRight=new n("triangle-right",{fontCharacter:"\\eb70"}),n.triangleUp=new n("triangle-up",{fontCharacter:"\\eb71"}),n.twitter=new n("twitter",{fontCharacter:"\\eb72"}),n.unfold=new n("unfold",{fontCharacter:"\\eb73"}),n.unlock=new n("unlock",{fontCharacter:"\\eb74"}),n.unmute=new n("unmute",{fontCharacter:"\\eb75"}),n.unverified=new n("unverified",{fontCharacter:"\\eb76"}),n.verified=new n("verified",{fontCharacter:"\\eb77"}),n.versions=new n("versions",{fontCharacter:"\\eb78"}),n.vmActive=new n("vm-active",{fontCharacter:"\\eb79"}),n.vmOutline=new n("vm-outline",{fontCharacter:"\\eb7a"}),n.vmRunning=new n("vm-running",{fontCharacter:"\\eb7b"}),n.watch=new n("watch",{fontCharacter:"\\eb7c"}),n.whitespace=new n("whitespace",{fontCharacter:"\\eb7d"}),n.wholeWord=new n("whole-word",{fontCharacter:"\\eb7e"}),n.window=new n("window",{fontCharacter:"\\eb7f"}),n.wordWrap=new n("word-wrap",{fontCharacter:"\\eb80"}),n.zoomIn=new n("zoom-in",{fontCharacter:"\\eb81"}),n.zoomOut=new n("zoom-out",{fontCharacter:"\\eb82"}),n.listFilter=new n("list-filter",{fontCharacter:"\\eb83"}),n.listFlat=new n("list-flat",{fontCharacter:"\\eb84"}),n.listSelection=new n("list-selection",{fontCharacter:"\\eb85"}),n.selection=new n("selection",{fontCharacter:"\\eb85"}),n.listTree=new n("list-tree",{fontCharacter:"\\eb86"}),n.debugBreakpointFunctionUnverified=new n("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),n.debugBreakpointFunction=new n("debug-breakpoint-function",{fontCharacter:"\\eb88"}),n.debugBreakpointFunctionDisabled=new n("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),n.debugStackframeActive=new n("debug-stackframe-active",{fontCharacter:"\\eb89"}),n.debugStackframeDot=new n("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),n.debugStackframe=new n("debug-stackframe",{fontCharacter:"\\eb8b"}),n.debugStackframeFocused=new n("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),n.debugBreakpointUnsupported=new n("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),n.symbolString=new n("symbol-string",{fontCharacter:"\\eb8d"}),n.debugReverseContinue=new n("debug-reverse-continue",{fontCharacter:"\\eb8e"}),n.debugStepBack=new n("debug-step-back",{fontCharacter:"\\eb8f"}),n.debugRestartFrame=new n("debug-restart-frame",{fontCharacter:"\\eb90"}),n.callIncoming=new n("call-incoming",{fontCharacter:"\\eb92"}),n.callOutgoing=new n("call-outgoing",{fontCharacter:"\\eb93"}),n.menu=new n("menu",{fontCharacter:"\\eb94"}),n.expandAll=new n("expand-all",{fontCharacter:"\\eb95"}),n.feedback=new n("feedback",{fontCharacter:"\\eb96"}),n.groupByRefType=new n("group-by-ref-type",{fontCharacter:"\\eb97"}),n.ungroupByRefType=new n("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),n.account=new n("account",{fontCharacter:"\\eb99"}),n.bellDot=new n("bell-dot",{fontCharacter:"\\eb9a"}),n.debugConsole=new n("debug-console",{fontCharacter:"\\eb9b"}),n.library=new n("library",{fontCharacter:"\\eb9c"}),n.output=new n("output",{fontCharacter:"\\eb9d"}),n.runAll=new n("run-all",{fontCharacter:"\\eb9e"}),n.syncIgnored=new n("sync-ignored",{fontCharacter:"\\eb9f"}),n.pinned=new n("pinned",{fontCharacter:"\\eba0"}),n.githubInverted=new n("github-inverted",{fontCharacter:"\\eba1"}),n.debugAlt=new n("debug-alt",{fontCharacter:"\\eb91"}),n.serverProcess=new n("server-process",{fontCharacter:"\\eba2"}),n.serverEnvironment=new n("server-environment",{fontCharacter:"\\eba3"}),n.pass=new n("pass",{fontCharacter:"\\eba4"}),n.stopCircle=new n("stop-circle",{fontCharacter:"\\eba5"}),n.playCircle=new n("play-circle",{fontCharacter:"\\eba6"}),n.record=new n("record",{fontCharacter:"\\eba7"}),n.debugAltSmall=new n("debug-alt-small",{fontCharacter:"\\eba8"}),n.vmConnect=new n("vm-connect",{fontCharacter:"\\eba9"}),n.cloud=new n("cloud",{fontCharacter:"\\ebaa"}),n.merge=new n("merge",{fontCharacter:"\\ebab"}),n.exportIcon=new n("export",{fontCharacter:"\\ebac"}),n.graphLeft=new n("graph-left",{fontCharacter:"\\ebad"}),n.magnet=new n("magnet",{fontCharacter:"\\ebae"}),n.notebook=new n("notebook",{fontCharacter:"\\ebaf"}),n.redo=new n("redo",{fontCharacter:"\\ebb0"}),n.checkAll=new n("check-all",{fontCharacter:"\\ebb1"}),n.pinnedDirty=new n("pinned-dirty",{fontCharacter:"\\ebb2"}),n.passFilled=new n("pass-filled",{fontCharacter:"\\ebb3"}),n.circleLargeFilled=new n("circle-large-filled",{fontCharacter:"\\ebb4"}),n.circleLargeOutline=new n("circle-large-outline",{fontCharacter:"\\ebb5"}),n.combine=new n("combine",{fontCharacter:"\\ebb6"}),n.gather=new n("gather",{fontCharacter:"\\ebb6"}),n.table=new n("table",{fontCharacter:"\\ebb7"}),n.variableGroup=new n("variable-group",{fontCharacter:"\\ebb8"}),n.typeHierarchy=new n("type-hierarchy",{fontCharacter:"\\ebb9"}),n.typeHierarchySub=new n("type-hierarchy-sub",{fontCharacter:"\\ebba"}),n.typeHierarchySuper=new n("type-hierarchy-super",{fontCharacter:"\\ebbb"}),n.gitPullRequestCreate=new n("git-pull-request-create",{fontCharacter:"\\ebbc"}),n.runAbove=new n("run-above",{fontCharacter:"\\ebbd"}),n.runBelow=new n("run-below",{fontCharacter:"\\ebbe"}),n.notebookTemplate=new n("notebook-template",{fontCharacter:"\\ebbf"}),n.debugRerun=new n("debug-rerun",{fontCharacter:"\\ebc0"}),n.workspaceTrusted=new n("workspace-trusted",{fontCharacter:"\\ebc1"}),n.workspaceUntrusted=new n("workspace-untrusted",{fontCharacter:"\\ebc2"}),n.workspaceUnspecified=new n("workspace-unspecified",{fontCharacter:"\\ebc3"}),n.terminalCmd=new n("terminal-cmd",{fontCharacter:"\\ebc4"}),n.terminalDebian=new n("terminal-debian",{fontCharacter:"\\ebc5"}),n.terminalLinux=new n("terminal-linux",{fontCharacter:"\\ebc6"}),n.terminalPowershell=new n("terminal-powershell",{fontCharacter:"\\ebc7"}),n.terminalTmux=new n("terminal-tmux",{fontCharacter:"\\ebc8"}),n.terminalUbuntu=new n("terminal-ubuntu",{fontCharacter:"\\ebc9"}),n.terminalBash=new n("terminal-bash",{fontCharacter:"\\ebca"}),n.arrowSwap=new n("arrow-swap",{fontCharacter:"\\ebcb"}),n.copy=new n("copy",{fontCharacter:"\\ebcc"}),n.personAdd=new n("person-add",{fontCharacter:"\\ebcd"}),n.filterFilled=new n("filter-filled",{fontCharacter:"\\ebce"}),n.wand=new n("wand",{fontCharacter:"\\ebcf"}),n.debugLineByLine=new n("debug-line-by-line",{fontCharacter:"\\ebd0"}),n.inspect=new n("inspect",{fontCharacter:"\\ebd1"}),n.layers=new n("layers",{fontCharacter:"\\ebd2"}),n.layersDot=new n("layers-dot",{fontCharacter:"\\ebd3"}),n.layersActive=new n("layers-active",{fontCharacter:"\\ebd4"}),n.compass=new n("compass",{fontCharacter:"\\ebd5"}),n.compassDot=new n("compass-dot",{fontCharacter:"\\ebd6"}),n.compassActive=new n("compass-active",{fontCharacter:"\\ebd7"}),n.azure=new n("azure",{fontCharacter:"\\ebd8"}),n.issueDraft=new n("issue-draft",{fontCharacter:"\\ebd9"}),n.gitPullRequestClosed=new n("git-pull-request-closed",{fontCharacter:"\\ebda"}),n.gitPullRequestDraft=new n("git-pull-request-draft",{fontCharacter:"\\ebdb"}),n.debugAll=new n("debug-all",{fontCharacter:"\\ebdc"}),n.debugCoverage=new n("debug-coverage",{fontCharacter:"\\ebdd"}),n.runErrors=new n("run-errors",{fontCharacter:"\\ebde"}),n.folderLibrary=new n("folder-library",{fontCharacter:"\\ebdf"}),n.debugContinueSmall=new n("debug-continue-small",{fontCharacter:"\\ebe0"}),n.beakerStop=new n("beaker-stop",{fontCharacter:"\\ebe1"}),n.graphLine=new n("graph-line",{fontCharacter:"\\ebe2"}),n.graphScatter=new n("graph-scatter",{fontCharacter:"\\ebe3"}),n.pieChart=new n("pie-chart",{fontCharacter:"\\ebe4"}),n.bracket=new n("bracket",n.json.definition),n.bracketDot=new n("bracket-dot",{fontCharacter:"\\ebe5"}),n.bracketError=new n("bracket-error",{fontCharacter:"\\ebe6"}),n.lockSmall=new n("lock-small",{fontCharacter:"\\ebe7"}),n.azureDevops=new n("azure-devops",{fontCharacter:"\\ebe8"}),n.verifiedFilled=new n("verified-filled",{fontCharacter:"\\ebe9"})}(K||(K={}))},"VrN/":function(tt,Ee,H){(function(ae,X){tt.exports=X()})(this,function(){"use strict";var ae=navigator.userAgent,X=navigator.platform,k=/gecko\/\d/i.test(ae),G=/MSIE \d/.test(ae),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ae),N=/Edge\/(\d+)/.exec(ae),K=G||b||N,W=K&&(G?document.documentMode||6:+(N||b)[1]),n=!N&&/WebKit\//.test(ae),I=n&&/Qt\/\d+\.\d+/.test(ae),y=!N&&/Chrome\//.test(ae),m=/Opera\//.test(ae),g=/Apple Computer/.test(navigator.vendor),u=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ae),c=/PhantomJS/.test(ae),p=!N&&/AppleWebKit/.test(ae)&&/Mobile\/\w+/.test(ae),l=/Android/.test(ae),o=p||l||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ae),s=p||/Mac/.test(X),a=/\bCrOS\b/.test(ae),A=/win/i.test(X),S=m&&ae.match(/Version\/(\d*\.\d*)/);S&&(S=Number(S[1])),S&&S>=15&&(m=!1,n=!0);var C=s&&(I||m&&(S==null||S<12.11)),L=k||K&&W>=9;function D(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var O=function(e,t){var r=e.className,i=D(t).exec(r);if(i){var h=r.slice(i.index+i[0].length);e.className=r.slice(0,i.index)+(h?i[1]+h:"")}};function w(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function x(e,t){return w(e).appendChild(t)}function d(e,t,r,i){var h=document.createElement(e);if(r&&(h.className=r),i&&(h.style.cssText=i),typeof t=="string")h.appendChild(document.createTextNode(t));else if(t)for(var P=0;P<t.length;++P)h.appendChild(t[P]);return h}function E(e,t,r,i){var h=d(e,t,r,i);return h.setAttribute("role","presentation"),h}var f;document.createRange?f=function(e,t,r,i){var h=document.createRange();return h.setEnd(i||e,r),h.setStart(e,t),h}:f=function(e,t,r){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(h){return i}return i.collapse(!0),i.moveEnd("character",r),i.moveStart("character",t),i};function v(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function T(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function B(e,t){var r=e.className;D(t).test(r)||(e.className+=(r?" ":"")+t)}function R(e,t){for(var r=e.split(" "),i=0;i<r.length;i++)r[i]&&!D(r[i]).test(t)&&(t+=" "+r[i]);return t}var j=function(e){e.select()};p?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:K&&(j=function(e){try{e.select()}catch(t){}});function U(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function _(e,t,r){t||(t={});for(var i in e)e.hasOwnProperty(i)&&(r!==!1||!t.hasOwnProperty(i))&&(t[i]=e[i]);return t}function J(e,t,r,i,h){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var P=i||0,z=h||0;;){var Z=e.indexOf(" ",P);if(Z<0||Z>=t)return z+(t-P);z+=Z-P,z+=r-z%r,P=Z+1}}var ne=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};ne.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ne.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function he(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var be=50,Ke={toString:function(){return"CodeMirror.Pass"}},De={scroll:!1},je={origin:"*mouse"},Be={origin:"+move"};function Ge(e,t,r){for(var i=0,h=0;;){var P=e.indexOf(" ",i);P==-1&&(P=e.length);var z=P-i;if(P==e.length||h+z>=t)return i+Math.min(z,t-h);if(h+=P-i,h+=r-h%r,i=P+1,h>=t)return i}}var _e=[""];function Y(e){for(;_e.length<=e;)_e.push(M(_e)+" ");return _e[e]}function M(e){return e[e.length-1]}function F(e,t){for(var r=[],i=0;i<e.length;i++)r[i]=t(e[i],i);return r}function Q(e,t,r){for(var i=0,h=r(t);i<e.length&&r(e[i])<=h;)i++;e.splice(i,0,t)}function te(){}function V(e,t){var r;return Object.create?r=Object.create(e):(te.prototype=e,r=new te),t&&_(t,r),r}var ge=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ue(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ge.test(e))}function Ye(e,t){return t?t.source.indexOf("\\w")>-1&&Ue(e)?!0:t.test(e):Ue(e)}function de(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var xe=/[\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 Me(e){return e.charCodeAt(0)>=768&&xe.test(e)}function Fe(e,t,r){for(;(r<0?t>0:t<e.length)&&Me(e.charAt(t));)t+=r;return t}function $e(e,t,r){for(var i=t>r?-1:1;;){if(t==r)return t;var h=(t+r)/2,P=i<0?Math.ceil(h):Math.floor(h);if(P==t)return e(P)?t:r;e(P)?r=P:t=P+i}}function st(e,t,r,i){if(!e)return i(t,r,"ltr",0);for(var h=!1,P=0;P<e.length;++P){var z=e[P];(z.from<r&&z.to>t||t==r&&z.to==t)&&(i(Math.max(z.from,t),Math.min(z.to,r),z.level==1?"rtl":"ltr",P),h=!0)}h||i(t,r,"ltr")}var mt=null;function ut(e,t,r){var i;mt=null;for(var h=0;h<e.length;++h){var P=e[h];if(P.from<t&&P.to>t)return h;P.to==t&&(P.from!=P.to&&r=="before"?i=h:mt=h),P.from==t&&(P.from!=P.to&&r!="before"?i=h:mt=h)}return i!=null?i:mt}var Pt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(se){return se<=247?e.charAt(se):1424<=se&&se<=1524?"R":1536<=se&&se<=1785?t.charAt(se-1536):1774<=se&&se<=2220?"r":8192<=se&&se<=8203?"w":se==8204?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,h=/[stwN]/,P=/[LRr]/,z=/[Lb1n]/,Z=/[1n]/;function $(se,we,Oe){this.level=se,this.from=we,this.to=Oe}return function(se,we){var Oe=we=="ltr"?"L":"R";if(se.length==0||we=="ltr"&&!i.test(se))return!1;for(var ze=se.length,He=[],nt=0;nt<ze;++nt)He.push(r(se.charCodeAt(nt)));for(var ot=0,_t=Oe;ot<ze;++ot){var Mt=He[ot];Mt=="m"?He[ot]=_t:_t=Mt}for(var Wt=0,kt=Oe;Wt<ze;++Wt){var Xt=He[Wt];Xt=="1"&&kt=="r"?He[Wt]="n":P.test(Xt)&&(kt=Xt,Xt=="r"&&(He[Wt]="R"))}for(var fn=1,nn=He[0];fn<ze-1;++fn){var Rn=He[fn];Rn=="+"&&nn=="1"&&He[fn+1]=="1"?He[fn]="1":Rn==","&&nn==He[fn+1]&&(nn=="1"||nn=="n")&&(He[fn]=nn),nn=Rn}for(var ii=0;ii<ze;++ii){var Ni=He[ii];if(Ni==",")He[ii]="N";else if(Ni=="%"){var gi=void 0;for(gi=ii+1;gi<ze&&He[gi]=="%";++gi);for(var dr=ii&&He[ii-1]=="!"||gi<ze&&He[gi]=="1"?"1":"N",ar=ii;ar<gi;++ar)He[ar]=dr;ii=gi-1}}for(var Ci=0,sr=Oe;Ci<ze;++Ci){var Hi=He[Ci];sr=="L"&&Hi=="1"?He[Ci]="L":P.test(Hi)&&(sr=Hi)}for(var ki=0;ki<ze;++ki)if(h.test(He[ki])){var Ai=void 0;for(Ai=ki+1;Ai<ze&&h.test(He[Ai]);++Ai);for(var Ei=(ki?He[ki-1]:Oe)=="L",or=(Ai<ze?He[Ai]:Oe)=="L",Ua=Ei==or?Ei?"L":"R":Oe,oa=ki;oa<Ai;++oa)He[oa]=Ua;ki=Ai-1}for(var Vi=[],Fr,Ui=0;Ui<ze;)if(z.test(He[Ui])){var po=Ui;for(++Ui;Ui<ze&&z.test(He[Ui]);++Ui);Vi.push(new $(0,po,Ui))}else{var Yr=Ui,va=Vi.length,ya=we=="rtl"?1:0;for(++Ui;Ui<ze&&He[Ui]!="L";++Ui);for(var $i=Yr;$i<Ui;)if(Z.test(He[$i])){Yr<$i&&(Vi.splice(va,0,new $(1,Yr,$i)),va+=ya);var Fa=$i;for(++$i;$i<Ui&&Z.test(He[$i]);++$i);Vi.splice(va,0,new $(2,Fa,$i)),va+=ya,Yr=$i}else++$i;Yr<Ui&&Vi.splice(va,0,new $(1,Yr,Ui))}return we=="ltr"&&(Vi[0].level==1&&(Fr=se.match(/^\s+/))&&(Vi[0].from=Fr[0].length,Vi.unshift(new $(0,0,Fr[0].length))),M(Vi).level==1&&(Fr=se.match(/\s+$/))&&(M(Vi).to-=Fr[0].length,Vi.push(new $(0,ze-Fr[0].length,ze)))),we=="rtl"?Vi.reverse():Vi}}();function Et(e,t){var r=e.order;return r==null&&(r=e.order=Pt(e.text,t)),r}var At=[],Je=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var i=e._handlers||(e._handlers={});i[t]=(i[t]||At).concat(r)}};function Kt(e,t){return e._handlers&&e._handlers[t]||At}function Bt(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var i=e._handlers,h=i&&i[t];if(h){var P=he(h,r);P>-1&&(i[t]=h.slice(0,P).concat(h.slice(P+1)))}}}function ce(e,t){var r=Kt(e,t);if(!r.length)return;for(var i=Array.prototype.slice.call(arguments,2),h=0;h<r.length;++h)r[h].apply(null,i)}function q(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ce(e,r||t.type,e,t),me(t)||t.codemirrorIgnore}function ee(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),i=0;i<t.length;++i)he(r,t[i])==-1&&r.push(t[i])}function oe(e,t){return Kt(e,t).length>0}function fe(e){e.prototype.on=function(t,r){Je(this,t,r)},e.prototype.off=function(t,r){Bt(this,t,r)}}function ie(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function le(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function me(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ve(e){ie(e),le(e)}function Ae(e){return e.target||e.srcElement}function Re(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),s&&e.ctrlKey&&t==1&&(t=3),t}var Pe=function(){if(K&&W<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e}(),it;function ct(e){if(it==null){var t=d("span","\u200B");x(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(it=t.offsetWidth<=1&&t.offsetHeight>2&&!(K&&W<8))}var r=it?d("span","\u200B"):d("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Ot;function $t(e){if(Ot!=null)return Ot;var t=x(e,document.createTextNode("A\u062EA")),r=f(t,0,1).getBoundingClientRect(),i=f(t,1,2).getBoundingClientRect();return w(e),!r||r.left==r.right?!1:Ot=i.right-r.right<3}var bt=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],i=e.length;t<=i;){var h=e.indexOf(`
|
|
`,t);h==-1&&(h=e.length);var P=e.slice(t,e.charAt(h-1)=="\r"?h-1:h),z=P.indexOf("\r");z!=-1?(r.push(P.slice(0,z)),t+=z+1):(r.push(P),t=h+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ze=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},vn=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Xe=null;function bn(e){if(Xe!=null)return Xe;var t=x(e,d("span","x")),r=t.getBoundingClientRect(),i=f(t,0,1).getBoundingClientRect();return Xe=Math.abs(r.left-i.left)>1}var mn={},Gt={};function qt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),mn[e]=t}function gn(e,t){Gt[e]=t}function xn(e){if(typeof e=="string"&&Gt.hasOwnProperty(e))e=Gt[e];else if(e&&typeof e.name=="string"&&Gt.hasOwnProperty(e.name)){var t=Gt[e.name];typeof t=="string"&&(t={name:t}),e=V(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return xn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return xn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Ln(e,t){t=xn(t);var r=mn[t.name];if(!r)return Ln(e,"text/plain");var i=r(e,t);if(Rt.hasOwnProperty(t.name)){var h=Rt[t.name];for(var P in h){if(!h.hasOwnProperty(P))continue;i.hasOwnProperty(P)&&(i["_"+P]=i[P]),i[P]=h[P]}}if(i.name=t.name,t.helperType&&(i.helperType=t.helperType),t.modeProps)for(var z in t.modeProps)i[z]=t.modeProps[z];return i}var Rt={};function Ve(e,t){var r=Rt.hasOwnProperty(e)?Rt[e]:Rt[e]={};_(t,r)}function ft(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var i in t){var h=t[i];h instanceof Array&&(h=h.concat([])),r[i]=h}return r}function xt(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Lt(e,t,r){return e.startState?e.startState(t,r):!0}var Ct=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Ct.prototype.eol=function(){return this.pos>=this.string.length},Ct.prototype.sol=function(){return this.pos==this.lineStart},Ct.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ct.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ct.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},Ct.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ct.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ct.prototype.skipToEnd=function(){this.pos=this.string.length},Ct.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ct.prototype.backUp=function(e){this.pos-=e},Ct.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=J(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?J(this.string,this.lineStart,this.tabSize):0)},Ct.prototype.indentation=function(){return J(this.string,null,this.tabSize)-(this.lineStart?J(this.string,this.lineStart,this.tabSize):0)},Ct.prototype.match=function(e,t,r){if(typeof e=="string"){var i=function(z){return r?z.toLowerCase():z},h=this.string.substr(this.pos,e.length);if(i(h)==i(e))return t!==!1&&(this.pos+=e.length),!0}else{var P=this.string.slice(this.pos).match(e);return P&&P.index>0?null:(P&&t!==!1&&(this.pos+=P[0].length),P)}},Ct.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ct.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ct.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ct.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function et(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var i=0;;++i){var h=r.children[i],P=h.chunkSize();if(t<P){r=h;break}t-=P}return r.lines[t]}function Tt(e,t,r){var i=[],h=t.line;return e.iter(t.line,r.line+1,function(P){var z=P.text;h==r.line&&(z=z.slice(0,r.ch)),h==t.line&&(z=z.slice(t.ch)),i.push(z),++h}),i}function wt(e,t,r){var i=[];return e.iter(t,r,function(h){i.push(h.text)}),i}function gt(e,t){var r=t-e.height;if(r)for(var i=e;i;i=i.parent)i.height+=r}function dt(e){if(e.parent==null)return null;for(var t=e.parent,r=he(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var h=0;!(i.children[h]==t);++h)r+=i.children[h].chunkSize();return r+t.first}function Nt(e,t){var r=e.first;e:do{for(var i=0;i<e.children.length;++i){var h=e.children[i],P=h.height;if(t<P){e=h;continue e}t-=P,r+=h.chunkSize()}return r}while(!e.lines);for(var z=0;z<e.lines.length;++z){var Z=e.lines[z],$=Z.height;if(t<$)break;t-=$}return r+z}function Zt(e,t){return t>=e.first&&t<e.first+e.size}function Yt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Qe(e,t,r){if(r===void 0&&(r=null),!(this instanceof Qe))return new Qe(e,t,r);this.line=e,this.ch=t,this.sticky=r}function St(e,t){return e.line-t.line||e.ch-t.ch}function yn(e,t){return e.sticky==t.sticky&&St(e,t)==0}function lt(e){return Qe(e.line,e.ch)}function jt(e,t){return St(e,t)<0?t:e}function en(e,t){return St(e,t)<0?e:t}function rn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function at(e,t){if(t.line<e.first)return Qe(e.first,0);var r=e.first+e.size-1;return t.line>r?Qe(r,et(e,r).text.length):Ft(t,et(e,t.line).text.length)}function Ft(e,t){var r=e.ch;return r==null||r>t?Qe(e.line,t):r<0?Qe(e.line,0):e}function rt(e,t){for(var r=[],i=0;i<t.length;i++)r[i]=at(e,t[i]);return r}var Dt=function(e,t){this.state=e,this.lookAhead=t},vt=function(e,t,r,i){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};vt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},vt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vt.fromSaved=function(e,t,r){return t instanceof Dt?new vt(e,ft(e.mode,t.state),r,t.lookAhead):new vt(e,ft(e.mode,t),r)},vt.prototype.save=function(e){var t=e!==!1?ft(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Dt(t,this.maxLookAhead):t};function yt(e,t,r,i){var h=[e.state.modeGen],P={};_n(e,t.text,e.doc.mode,r,function(se,we){return h.push(se,we)},P,i);for(var z=r.state,Z=function(se){r.baseTokens=h;var we=e.state.overlays[se],Oe=1,ze=0;r.state=!0,_n(e,t.text,we.mode,r,function(He,nt){for(var ot=Oe;ze<He;){var _t=h[Oe];_t>He&&h.splice(Oe,1,He,h[Oe+1],_t),Oe+=2,ze=Math.min(He,_t)}if(!nt)return;if(we.opaque)h.splice(ot,Oe-ot,He,"overlay "+nt),Oe=ot+2;else for(;ot<Oe;ot+=2){var Mt=h[ot+1];h[ot+1]=(Mt?Mt+" ":"")+"overlay "+nt}},P),r.state=z,r.baseTokens=null,r.baseTokenPos=1},$=0;$<e.state.overlays.length;++$)Z($);return{styles:h,classes:P.bgClass||P.textClass?P:null}}function an(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=Ht(e,dt(t)),h=t.text.length>e.options.maxHighlightLength&&ft(e.doc.mode,i.state),P=yt(e,t,i);h&&(i.state=h),t.stateAfter=i.save(!h),t.styles=P.styles,P.classes?t.styleClasses=P.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ht(e,t,r){var i=e.doc,h=e.display;if(!i.mode.startState)return new vt(i,!0,t);var P=Vt(e,t,r),z=P>i.first&&et(i,P-1).stateAfter,Z=z?vt.fromSaved(i,z,P):new vt(i,Lt(i.mode),P);return i.iter(P,t,function($){ui(e,$.text,Z);var se=Z.line;$.stateAfter=se==t-1||se%5==0||se>=h.viewFrom&&se<h.viewTo?Z.save():null,Z.nextLine()}),r&&(i.modeFrontier=Z.line),Z}function ui(e,t,r,i){var h=e.doc.mode,P=new Ct(t,e.options.tabSize,r);for(P.start=P.pos=i||0,t==""&&un(h,r.state);!P.eol();)cn(h,P,r.state),P.start=P.pos}function un(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=xt(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function cn(e,t,r,i){for(var h=0;h<10;h++){i&&(i[0]=xt(e,r).mode);var P=e.token(t,r);if(t.pos>t.start)return P}throw new Error("Mode "+e.name+" failed to advance stream.")}var Jn=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function lr(e,t,r,i){var h=e.doc,P=h.mode,z;t=at(h,t);var Z=et(h,t.line),$=Ht(e,t.line,r),se=new Ct(Z.text,e.options.tabSize,$),we;for(i&&(we=[]);(i||se.pos<t.ch)&&!se.eol();)se.start=se.pos,z=cn(P,se,$.state),i&&we.push(new Jn(se,z,ft(h.mode,$.state)));return i?we:new Jn(se,z,$.state)}function pi(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var i=r[1]?"bgClass":"textClass";t[i]==null?t[i]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[i])||(t[i]+=" "+r[2])}return e}function _n(e,t,r,i,h,P,z){var Z=r.flattenSpans;Z==null&&(Z=e.options.flattenSpans);var $=0,se=null,we=new Ct(t,e.options.tabSize,i),Oe,ze=e.options.addModeClass&&[null];for(t==""&&pi(un(r,i.state),P);!we.eol();){if(we.pos>e.options.maxHighlightLength?(Z=!1,z&&ui(e,t,i,we.pos),we.pos=t.length,Oe=null):Oe=pi(cn(r,we,i.state,ze),P),ze){var He=ze[0].name;He&&(Oe="m-"+(Oe?He+" "+Oe:He))}if(!Z||se!=Oe){for(;$<we.start;)$=Math.min(we.start,$+5e3),h($,se);se=Oe}we.start=we.pos}for(;$<we.pos;){var nt=Math.min(we.pos,$+5e3);h(nt,se),$=nt}}function Vt(e,t,r){for(var i,h,P=e.doc,z=r?-1:t-(e.doc.mode.innerMode?1e3:100),Z=t;Z>z;--Z){if(Z<=P.first)return P.first;var $=et(P,Z-1),se=$.stateAfter;if(se&&(!r||Z+(se instanceof Dt?se.lookAhead:0)<=P.modeFrontier))return Z;var we=J($.text,null,e.options.tabSize);(h==null||i>we)&&(h=Z-1,i=we)}return h}function zt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,i=t-1;i>r;i--){var h=et(e,i).stateAfter;if(h&&(!(h instanceof Dt)||i+h.lookAhead<t)){r=i+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var ln=!1,dn=!1;function Dn(){ln=!0}function ri(){dn=!0}function pn(e,t,r){this.marker=e,this.from=t,this.to=r}function ci(e,t){if(e)for(var r=0;r<e.length;++r){var i=e[r];if(i.marker==t)return i}}function hr(e,t){for(var r,i=0;i<e.length;++i)e[i]!=t&&(r||(r=[])).push(e[i]);return r}function Br(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function xr(e,t,r){var i;if(e)for(var h=0;h<e.length;++h){var P=e[h],z=P.marker,Z=P.from==null||(z.inclusiveLeft?P.from<=t:P.from<t);if(Z||P.from==t&&z.type=="bookmark"&&(!r||!P.marker.insertLeft)){var $=P.to==null||(z.inclusiveRight?P.to>=t:P.to>t);(i||(i=[])).push(new pn(z,P.from,$?null:P.to))}}return i}function la(e,t,r){var i;if(e)for(var h=0;h<e.length;++h){var P=e[h],z=P.marker,Z=P.to==null||(z.inclusiveRight?P.to>=t:P.to>t);if(Z||P.from==t&&z.type=="bookmark"&&(!r||P.marker.insertLeft)){var $=P.from==null||(z.inclusiveLeft?P.from<=t:P.from<t);(i||(i=[])).push(new pn(z,$?null:P.from-t,P.to==null?null:P.to-t))}}return i}function xi(e,t){if(t.full)return null;var r=Zt(e,t.from.line)&&et(e,t.from.line).markedSpans,i=Zt(e,t.to.line)&&et(e,t.to.line).markedSpans;if(!r&&!i)return null;var h=t.from.ch,P=t.to.ch,z=St(t.from,t.to)==0,Z=xr(r,h,z),$=la(i,P,z),se=t.text.length==1,we=M(t.text).length+(se?h:0);if(Z)for(var Oe=0;Oe<Z.length;++Oe){var ze=Z[Oe];if(ze.to==null){var He=ci($,ze.marker);He?se&&(ze.to=He.to==null?null:He.to+we):ze.to=h}}if($)for(var nt=0;nt<$.length;++nt){var ot=$[nt];if(ot.to!=null&&(ot.to+=we),ot.from==null){var _t=ci(Z,ot.marker);_t||(ot.from=we,se&&(Z||(Z=[])).push(ot))}else ot.from+=we,se&&(Z||(Z=[])).push(ot)}Z&&(Z=ur(Z)),$&&$!=Z&&($=ur($));var Mt=[Z];if(!se){var Wt=t.text.length-2,kt;if(Wt>0&&Z)for(var Xt=0;Xt<Z.length;++Xt)Z[Xt].to==null&&(kt||(kt=[])).push(new pn(Z[Xt].marker,null,null));for(var fn=0;fn<Wt;++fn)Mt.push(kt);Mt.push($)}return Mt}function ur(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Tr(e,t,r){var i=null;if(e.iter(t.line,r.line+1,function(He){if(He.markedSpans)for(var nt=0;nt<He.markedSpans.length;++nt){var ot=He.markedSpans[nt].marker;ot.readOnly&&(!i||he(i,ot)==-1)&&(i||(i=[])).push(ot)}}),!i)return null;for(var h=[{from:t,to:r}],P=0;P<i.length;++P)for(var z=i[P],Z=z.find(0),$=0;$<h.length;++$){var se=h[$];if(St(se.to,Z.from)<0||St(se.from,Z.to)>0)continue;var we=[$,1],Oe=St(se.from,Z.from),ze=St(se.to,Z.to);(Oe<0||!z.inclusiveLeft&&!Oe)&&we.push({from:se.from,to:Z.from}),(ze>0||!z.inclusiveRight&&!ze)&&we.push({from:Z.to,to:se.to}),h.splice.apply(h,we),$+=we.length-3}return h}function ua(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function jr(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function er(e){return e.inclusiveLeft?-1:0}function wr(e){return e.inclusiveRight?1:0}function tr(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var i=e.find(),h=t.find(),P=St(i.from,h.from)||er(e)-er(t);if(P)return-P;var z=St(i.to,h.to)||wr(e)-wr(t);return z||t.id-e.id}function Oi(e,t){var r=dn&&e.markedSpans,i;if(r)for(var h=void 0,P=0;P<r.length;++P)h=r[P],h.marker.collapsed&&(t?h.from:h.to)==null&&(!i||tr(i,h.marker)<0)&&(i=h.marker);return i}function nr(e){return Oi(e,!0)}function fr(e){return Oi(e,!1)}function br(e,t){var r=dn&&e.markedSpans,i;if(r)for(var h=0;h<r.length;++h){var P=r[h];P.marker.collapsed&&(P.from==null||P.from<t)&&(P.to==null||P.to>t)&&(!i||tr(i,P.marker)<0)&&(i=P.marker)}return i}function Jr(e,t,r,i,h){var P=et(e,t),z=dn&&P.markedSpans;if(z)for(var Z=0;Z<z.length;++Z){var $=z[Z];if(!$.marker.collapsed)continue;var se=$.marker.find(0),we=St(se.from,r)||er($.marker)-er(h),Oe=St(se.to,i)||wr($.marker)-wr(h);if(we>=0&&Oe<=0||we<=0&&Oe>=0)continue;if(we<=0&&($.marker.inclusiveRight&&h.inclusiveLeft?St(se.to,r)>=0:St(se.to,r)>0)||we>=0&&($.marker.inclusiveRight&&h.inclusiveLeft?St(se.from,i)<=0:St(se.from,i)<0))return!0}}function Fi(e){for(var t;t=nr(e);)e=t.find(-1,!0).line;return e}function ca(e){for(var t;t=fr(e);)e=t.find(1,!0).line;return e}function ir(e){for(var t,r;t=fr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function _r(e,t){var r=et(e,t),i=Fi(r);return r==i?t:dt(i)}function Xi(e,t){if(t>e.lastLine())return t;var r=et(e,t),i;if(!Wi(e,r))return t;for(;i=fr(r);)r=i.find(1,!0).line;return dt(r)+1}function Wi(e,t){var r=dn&&t.markedSpans;if(r)for(var i=void 0,h=0;h<r.length;++h){if(i=r[h],!i.marker.collapsed)continue;if(i.from==null)return!0;if(i.marker.widgetNode)continue;if(i.from==0&&i.marker.inclusiveLeft&&Hr(e,t,i))return!0}}function Hr(e,t,r){if(r.to==null){var i=r.marker.find(1,!0);return Hr(e,i.line,ci(i.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var h=void 0,P=0;P<t.markedSpans.length;++P)if(h=t.markedSpans[P],h.marker.collapsed&&!h.marker.widgetNode&&h.from==r.to&&(h.to==null||h.to!=r.from)&&(h.marker.inclusiveLeft||r.marker.inclusiveRight)&&Hr(e,t,h))return!0}function ai(e){e=Fi(e);for(var t=0,r=e.parent,i=0;i<r.lines.length;++i){var h=r.lines[i];if(h==e)break;t+=h.height}for(var P=r.parent;P;r=P,P=r.parent)for(var z=0;z<P.children.length;++z){var Z=P.children[z];if(Z==r)break;t+=Z.height}return t}function Wn(e){if(e.height==0)return 0;for(var t=e.text.length,r,i=e;r=nr(i);){var h=r.find(0,!0);i=h.from.line,t+=h.from.ch-h.to.ch}for(i=e;r=fr(i);){var P=r.find(0,!0);t-=i.text.length-P.from.ch,i=P.to.line,t+=i.text.length-P.to.ch}return t}function vi(e){var t=e.display,r=e.doc;t.maxLine=et(r,r.first),t.maxLineLength=Wn(t.maxLine),t.maxLineChanged=!0,r.iter(function(i){var h=Wn(i);h>t.maxLineLength&&(t.maxLineLength=h,t.maxLine=i)})}var mi=function(e,t,r){this.text=e,jr(this,t),this.height=r?r(this):1};mi.prototype.lineNo=function(){return dt(this)},fe(mi);function Ki(e,t,r,i){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ua(e),jr(e,r);var h=i?i(e):1;h!=e.height&>(e,h)}function Ut(e){e.parent=null,ua(e)}var sn={},Qt={};function On(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Qt:sn;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function jn(e,t){var r=E("span",null,null,n?"padding-right: .1px":null),i={pre:E("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var h=0;h<=(t.rest?t.rest.length:0);h++){var P=h?t.rest[h-1]:t.line,z=void 0;i.pos=0,i.addToken=Un,$t(e.display.measure)&&(z=Et(P,e.doc.direction))&&(i.addToken=Yi(i.addToken,z)),i.map=[];var Z=t!=e.display.externalMeasured&&dt(P);Sr(P,i,an(e,P,Z)),P.styleClasses&&(P.styleClasses.bgClass&&(i.bgClass=R(P.styleClasses.bgClass,i.bgClass||"")),P.styleClasses.textClass&&(i.textClass=R(P.styleClasses.textClass,i.textClass||""))),i.map.length==0&&i.map.push(0,0,i.content.appendChild(ct(e.display.measure))),h==0?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(n){var $=i.content.lastChild;(/\bcm-tab\b/.test($.className)||$.querySelector&&$.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return ce(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=R(i.pre.className,i.textClass||"")),i}function Xn(e){var t=d("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Un(e,t,r,i,h,P,z){if(!t)return;var Z=e.splitSpaces?yi(t,e.trailingSpace):t,$=e.cm.state.specialChars,se=!1,we;if(!$.test(t))e.col+=t.length,we=document.createTextNode(Z),e.map.push(e.pos,e.pos+t.length,we),K&&W<9&&(se=!0),e.pos+=t.length;else{we=document.createDocumentFragment();for(var Oe=0;;){$.lastIndex=Oe;var ze=$.exec(t),He=ze?ze.index-Oe:t.length-Oe;if(He){var nt=document.createTextNode(Z.slice(Oe,Oe+He));K&&W<9?we.appendChild(d("span",[nt])):we.appendChild(nt),e.map.push(e.pos,e.pos+He,nt),e.col+=He,e.pos+=He}if(!ze)break;Oe+=He+1;var ot=void 0;if(ze[0]==" "){var _t=e.cm.options.tabSize,Mt=_t-e.col%_t;ot=we.appendChild(d("span",Y(Mt),"cm-tab")),ot.setAttribute("role","presentation"),ot.setAttribute("cm-text"," "),e.col+=Mt}else ze[0]=="\r"||ze[0]==`
|
|
`?(ot=we.appendChild(d("span",ze[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ot.setAttribute("cm-text",ze[0]),e.col+=1):(ot=e.cm.options.specialCharPlaceholder(ze[0]),ot.setAttribute("cm-text",ze[0]),K&&W<9?we.appendChild(d("span",[ot])):we.appendChild(ot),e.col+=1);e.map.push(e.pos,e.pos+1,ot),e.pos++}}if(e.trailingSpace=Z.charCodeAt(t.length-1)==32,r||i||h||se||P||z){var Wt=r||"";i&&(Wt+=i),h&&(Wt+=h);var kt=d("span",[we],Wt,P);if(z)for(var Xt in z)z.hasOwnProperty(Xt)&&Xt!="style"&&Xt!="class"&&kt.setAttribute(Xt,z[Xt]);return e.content.appendChild(kt)}e.content.appendChild(we)}function yi(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,i="",h=0;h<e.length;h++){var P=e.charAt(h);P==" "&&r&&(h==e.length-1||e.charCodeAt(h+1)==32)&&(P="\xA0"),i+=P,r=P==" "}return i}function Yi(e,t){return function(r,i,h,P,z,Z,$){h=h?h+" cm-force-border":"cm-force-border";for(var se=r.pos,we=se+i.length;;){for(var Oe=void 0,ze=0;ze<t.length&&!(Oe=t[ze],Oe.to>se&&Oe.from<=se);ze++);if(Oe.to>=we)return e(r,i,h,P,z,Z,$);e(r,i.slice(0,Oe.to-se),h,P,null,Z,$),P=null,i=i.slice(Oe.to-se),se=Oe.to}}}function In(e,t,r,i){var h=!i&&r.widgetNode;h&&e.map.push(e.pos,e.pos+t,h),!i&&e.cm.display.input.needsContentAttribute&&(h||(h=e.content.appendChild(document.createElement("span"))),h.setAttribute("cm-marker",r.id)),h&&(e.cm.display.input.setUneditable(h),e.content.appendChild(h)),e.pos+=t,e.trailingSpace=!1}function Sr(e,t,r){var i=e.markedSpans,h=e.text,P=0;if(!i){for(var z=1;z<r.length;z+=2)t.addToken(t,h.slice(P,P=r[z]),On(r[z+1],t.cm.options));return}for(var Z=h.length,$=0,se=1,we="",Oe,ze,He=0,nt,ot,_t,Mt,Wt;;){if(He==$){nt=ot=_t=ze="",Wt=null,Mt=null,He=Infinity;for(var kt=[],Xt=void 0,fn=0;fn<i.length;++fn){var nn=i[fn],Rn=nn.marker;if(Rn.type=="bookmark"&&nn.from==$&&Rn.widgetNode)kt.push(Rn);else if(nn.from<=$&&(nn.to==null||nn.to>$||Rn.collapsed&&nn.to==$&&nn.from==$)){if(nn.to!=null&&nn.to!=$&&He>nn.to&&(He=nn.to,ot=""),Rn.className&&(nt+=" "+Rn.className),Rn.css&&(ze=(ze?ze+";":"")+Rn.css),Rn.startStyle&&nn.from==$&&(_t+=" "+Rn.startStyle),Rn.endStyle&&nn.to==He&&(Xt||(Xt=[])).push(Rn.endStyle,nn.to),Rn.title&&((Wt||(Wt={})).title=Rn.title),Rn.attributes)for(var ii in Rn.attributes)(Wt||(Wt={}))[ii]=Rn.attributes[ii];Rn.collapsed&&(!Mt||tr(Mt.marker,Rn)<0)&&(Mt=nn)}else nn.from>$&&He>nn.from&&(He=nn.from)}if(Xt)for(var Ni=0;Ni<Xt.length;Ni+=2)Xt[Ni+1]==He&&(ot+=" "+Xt[Ni]);if(!Mt||Mt.from==$)for(var gi=0;gi<kt.length;++gi)In(t,0,kt[gi]);if(Mt&&(Mt.from||0)==$){if(In(t,(Mt.to==null?Z+1:Mt.to)-$,Mt.marker,Mt.from==null),Mt.to==null)return;Mt.to==$&&(Mt=!1)}}if($>=Z)break;for(var dr=Math.min(Z,He);;){if(we){var ar=$+we.length;if(!Mt){var Ci=ar>dr?we.slice(0,dr-$):we;t.addToken(t,Ci,Oe?Oe+nt:nt,_t,$+Ci.length==He?ot:"",ze,Wt)}if(ar>=dr){we=we.slice(dr-$),$=dr;break}$=ar,_t=""}we=h.slice(P,P=r[se++]),Oe=On(r[se++],t.cm.options)}}}function Gn(e,t,r){this.line=t,this.rest=ir(t),this.size=this.rest?dt(M(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Wi(e,t)}function Bi(e,t,r){for(var i=[],h,P=t;P<r;P=h){var z=new Gn(e.doc,et(e.doc,P),P);h=P+z.size,i.push(z)}return i}var Pi=null;function cr(e){Pi?Pi.ops.push(e):e.ownsGroup=Pi={ops:[e],delayedCallbacks:[]}}function Ba(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var i=0;i<e.ops.length;i++){var h=e.ops[i];if(h.cursorActivityHandlers)for(;h.cursorActivityCalled<h.cursorActivityHandlers.length;)h.cursorActivityHandlers[h.cursorActivityCalled++].call(null,h.cm)}}while(r<t.length)}function Ws(e,t){var r=e.ownsGroup;if(!r)return;try{Ba(r)}finally{Pi=null,t(r)}}var Qr=null;function bi(e,t){var r=Kt(e,t);if(!r.length)return;var i=Array.prototype.slice.call(arguments,2),h;Pi?h=Pi.delayedCallbacks:Qr?h=Qr:(h=Qr=[],setTimeout(ms,0));for(var P=function(Z){h.push(function(){return r[Z].apply(null,i)})},z=0;z<r.length;++z)P(z)}function ms(){var e=Qr;Qr=null;for(var t=0;t<e.length;++t)e[t]()}function gs(e,t,r,i){for(var h=0;h<t.changes.length;h++){var P=t.changes[h];P=="text"?vs(e,t):P=="gutter"?Wa(e,t,r,i):P=="class"?Ha(e,t):P=="widget"&&Gs(e,t,i)}t.changes=null}function da(e){return e.node==e.text&&(e.node=d("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),K&&W<8&&(e.node.style.zIndex=2)),e.node}function Ks(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var i=da(t);t.background=i.insertBefore(d("div",null,r),i.firstChild),e.display.input.setUneditable(t.background)}}function ja(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):jn(e,t)}function vs(e,t){var r=t.text.className,i=ja(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,Ha(e,t)):r&&(t.text.className=r)}function Ha(e,t){Ks(e,t),t.line.wrapClass?da(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Wa(e,t,r,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var h=da(t);t.gutterBackground=d("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),h.insertBefore(t.gutterBackground,t.text)}var P=t.line.gutterMarkers;if(e.options.lineNumbers||P){var z=da(t),Z=t.gutter=d("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(Z),z.insertBefore(Z,t.text),t.line.gutterClass&&(Z.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!P||!P["CodeMirror-linenumbers"])&&(t.lineNumber=Z.appendChild(d("div",Yt(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),P)for(var $=0;$<e.display.gutterSpecs.length;++$){var se=e.display.gutterSpecs[$].className,we=P.hasOwnProperty(se)&&P[se];we&&Z.appendChild(d("div",[we],"CodeMirror-gutter-elt","left: "+i.gutterLeft[se]+"px; width: "+i.gutterWidth[se]+"px"))}}}function Gs(e,t,r){t.alignable&&(t.alignable=null);for(var i=D("CodeMirror-linewidget"),h=t.node.firstChild,P=void 0;h;h=P)P=h.nextSibling,i.test(h.className)&&t.node.removeChild(h);Ka(e,t,r)}function ys(e,t,r,i){var h=ja(e,t);return t.text=t.node=h.pre,h.bgClass&&(t.bgClass=h.bgClass),h.textClass&&(t.textClass=h.textClass),Ha(e,t),Wa(e,t,r,i),Ka(e,t,i),t.node}function Ka(e,t,r){if(bs(e,t.line,t,r,!0),t.rest)for(var i=0;i<t.rest.length;i++)bs(e,t.rest[i],t,r,!1)}function bs(e,t,r,i,h){if(!t.widgets)return;for(var P=da(r),z=0,Z=t.widgets;z<Z.length;++z){var $=Z[z],se=d("div",[$.node],"CodeMirror-linewidget"+($.className?" "+$.className:""));$.handleMouseEvents||se.setAttribute("cm-ignore-events","true"),zs($,se,r,i),e.display.input.setUneditable(se),h&&$.above?P.insertBefore(se,r.gutter||r.text):P.appendChild(se),bi($,"redraw")}}function zs(e,t,r,i){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var h=i.wrapperWidth;t.style.left=i.fixedPos+"px",e.coverGutter||(h-=i.gutterTotalWidth,t.style.paddingLeft=i.gutterTotalWidth+"px"),t.style.width=h+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-i.gutterTotalWidth+"px"))}function Zr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!v(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),x(t.display.measure,d("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Cr(e,t){for(var r=Ae(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function Ga(e){return e.lineSpace.offsetTop}function ye(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Le(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=x(e.measure,d("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(i.left)&&!isNaN(i.right)&&(e.cachedPaddingH=i),i}function ke(e){return be-e.display.nativeBarWidth}function Te(e){return e.display.scroller.clientWidth-ke(e)-e.display.barWidth}function re(e){return e.display.scroller.clientHeight-ke(e)-e.display.barHeight}function pe(e,t,r){var i=e.options.lineWrapping,h=i&&Te(e);if(!t.measure.heights||i&&t.measure.width!=h){var P=t.measure.heights=[];if(i){t.measure.width=h;for(var z=t.text.firstChild.getClientRects(),Z=0;Z<z.length-1;Z++){var $=z[Z],se=z[Z+1];Math.abs($.bottom-se.bottom)>2&&P.push(($.bottom+se.top)/2-r.top)}}P.push(r.bottom-r.top)}}function ue(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var i=0;i<e.rest.length;i++)if(e.rest[i]==t)return{map:e.measure.maps[i],cache:e.measure.caches[i]};for(var h=0;h<e.rest.length;h++)if(dt(e.rest[h])>r)return{map:e.measure.maps[h],cache:e.measure.caches[h],before:!0}}function Se(e,t){t=Fi(t);var r=dt(t),i=e.display.externalMeasured=new Gn(e.doc,t,r);i.lineN=r;var h=i.built=jn(e,i);return i.text=h.pre,x(e.display.lineMeasure,h.pre),i}function Ce(e,t,r,i){return We(e,Ie(e,t),r,i)}function Ne(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ni(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Ie(e,t){var r=dt(t),i=Ne(e,r);i&&!i.text?i=null:i&&i.changes&&(gs(e,i,r,di(e)),e.curOp.forceUpdate=!0),i||(i=Se(e,t));var h=ue(i,t,r);return{line:t,view:i,rect:null,map:h.map,cache:h.cache,before:h.before,hasHeights:!1}}function We(e,t,r,i,h){t.before&&(r=-1);var P=r+(i||""),z;return t.cache.hasOwnProperty(P)?z=t.cache[P]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(pe(e,t.view,t.rect),t.hasHeights=!0),z=It(e,t,r,i),z.bogus||(t.cache[P]=z)),{left:z.left,right:z.right,top:h?z.rtop:z.top,bottom:h?z.rbottom:z.bottom}}var qe={left:0,right:0,top:0,bottom:0};function pt(e,t,r){for(var i,h,P,z,Z,$,se=0;se<e.length;se+=3)if(Z=e[se],$=e[se+1],t<Z?(h=0,P=1,z="left"):t<$?(h=t-Z,P=h+1):(se==e.length-3||t==$&&e[se+3]>t)&&(P=$-Z,h=P-1,t>=$&&(z="right")),h!=null){if(i=e[se+2],Z==$&&r==(i.insertLeft?"left":"right")&&(z=r),r=="left"&&h==0)for(;se&&e[se-2]==e[se-3]&&e[se-1].insertLeft;)i=e[(se-=3)+2],z="left";if(r=="right"&&h==$-Z)for(;se<e.length-3&&e[se+3]==e[se+4]&&!e[se+5].insertLeft;)i=e[(se+=3)+2],z="right";break}return{node:i,start:h,end:P,collapse:z,coverStart:Z,coverEnd:$}}function ht(e,t){var r=qe;if(t=="left")for(var i=0;i<e.length&&!((r=e[i]).left!=r.right);i++);else for(var h=e.length-1;h>=0&&!((r=e[h]).left!=r.right);h--);return r}function It(e,t,r,i){var h=pt(t.map,r,i),P=h.node,z=h.start,Z=h.end,$=h.collapse,se;if(P.nodeType==3){for(var we=0;we<4;we++){for(;z&&Me(t.line.text.charAt(h.coverStart+z));)--z;for(;h.coverStart+Z<h.coverEnd&&Me(t.line.text.charAt(h.coverStart+Z));)++Z;if(K&&W<9&&z==0&&Z==h.coverEnd-h.coverStart?se=P.parentNode.getBoundingClientRect():se=ht(f(P,z,Z).getClientRects(),i),se.left||se.right||z==0)break;Z=z,z=z-1,$="right"}K&&W<11&&(se=hn(e.display.measure,se))}else{z>0&&($=i="right");var Oe;e.options.lineWrapping&&(Oe=P.getClientRects()).length>1?se=Oe[i=="right"?Oe.length-1:0]:se=P.getBoundingClientRect()}if(K&&W<9&&!z&&(!se||!se.left&&!se.right)){var ze=P.parentNode.getClientRects()[0];ze?se={left:ze.left,right:ze.left+Ri(e.display),top:ze.top,bottom:ze.bottom}:se=qe}for(var He=se.top-t.rect.top,nt=se.bottom-t.rect.top,ot=(He+nt)/2,_t=t.view.measure.heights,Mt=0;Mt<_t.length-1&&!(ot<_t[Mt]);Mt++);var Wt=Mt?_t[Mt-1]:0,kt=_t[Mt],Xt={left:($=="right"?se.right:se.left)-t.rect.left,right:($=="left"?se.left:se.right)-t.rect.left,top:Wt,bottom:kt};return!se.left&&!se.right&&(Xt.bogus=!0),e.options.singleCursorHeightPerLine||(Xt.rtop=He,Xt.rbottom=nt),Xt}function hn(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!bn(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*i,bottom:t.bottom*i}}function Cn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function En(e){e.display.externalMeasure=null,w(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Cn(e.display.view[t])}function Tn(e){En(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function An(){return y&&l?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Sn(){return y&&l?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function wn(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Zr(e.widgets[r]));return t}function Fn(e,t,r,i,h){if(!h){var P=wn(t);r.top+=P,r.bottom+=P}if(i=="line")return r;i||(i="local");var z=ai(t);if(i=="local"?z+=Ga(e.display):z-=e.display.viewOffset,i=="page"||i=="window"){var Z=e.display.lineSpace.getBoundingClientRect();z+=Z.top+(i=="window"?0:Sn());var $=Z.left+(i=="window"?0:An());r.left+=$,r.right+=$}return r.top+=z,r.bottom+=z,r}function Mn(e,t,r){if(r=="div")return t;var i=t.left,h=t.top;if(r=="page")i-=An(),h-=Sn();else if(r=="local"||!r){var P=e.display.sizer.getBoundingClientRect();i+=P.left,h+=P.top}var z=e.display.lineSpace.getBoundingClientRect();return{left:i-z.left,top:h-z.top}}function si(e,t,r,i,h){return i||(i=et(e.doc,t.line)),Fn(e,i,Ce(e,i,t.ch,h),r)}function kn(e,t,r,i,h,P){i=i||et(e.doc,t.line),h||(h=Ie(e,i));function z(nt,ot){var _t=We(e,h,nt,ot?"right":"left",P);return ot?_t.left=_t.right:_t.right=_t.left,Fn(e,i,_t,r)}var Z=Et(i,e.doc.direction),$=t.ch,se=t.sticky;if($>=i.text.length?($=i.text.length,se="before"):$<=0&&($=0,se="after"),!Z)return z(se=="before"?$-1:$,se=="before");function we(nt,ot,_t){var Mt=Z[ot],Wt=Mt.level==1;return z(_t?nt-1:nt,Wt!=_t)}var Oe=ut(Z,$,se),ze=mt,He=we($,Oe,se=="before");return ze!=null&&(He.other=we($,ze,se!="before")),He}function on(e,t){var r=0;t=at(e.doc,t),e.options.lineWrapping||(r=Ri(e.display)*t.ch);var i=et(e.doc,t.line),h=ai(i)+Ga(e.display);return{left:r,right:r,top:h,bottom:h+i.height}}function tn(e,t,r,i,h){var P=Qe(e,t,r);return P.xRel=h,i&&(P.outside=i),P}function Pn(e,t,r){var i=e.doc;if(r+=e.display.viewOffset,r<0)return tn(i.first,0,null,-1,-1);var h=Nt(i,r),P=i.first+i.size-1;if(h>P)return tn(i.first+i.size-1,et(i,P).text.length,null,1,1);t<0&&(t=0);for(var z=et(i,h);;){var Z=oi(e,z,h,t,r),$=br(z,Z.ch+(Z.xRel>0||Z.outside>0?1:0));if(!$)return Z;var se=$.find(1);if(se.line==h)return se;z=et(i,h=se.line)}}function Bn(e,t,r,i){i-=wn(t);var h=t.text.length,P=$e(function(z){return We(e,r,z-1).bottom<=i},h,0);return h=$e(function(z){return We(e,r,z).top>i},P,h),{begin:P,end:h}}function Jt(e,t,r,i){r||(r=Ie(e,t));var h=Fn(e,t,We(e,r,i),"line").top;return Bn(e,t,r,h)}function Hn(e,t,r,i){return e.bottom<=r?!1:e.top>r?!0:(i?e.left:e.right)>t}function oi(e,t,r,i,h){h-=ai(t);var P=Ie(e,t),z=wn(t),Z=0,$=t.text.length,se=!0,we=Et(t,e.doc.direction);if(we){var Oe=(e.options.lineWrapping?qn:Kn)(e,t,r,P,we,i,h);se=Oe.level!=1,Z=se?Oe.from:Oe.to-1,$=se?Oe.to:Oe.from-1}var ze=null,He=null,nt=$e(function(fn){var nn=We(e,P,fn);return nn.top+=z,nn.bottom+=z,Hn(nn,i,h,!1)?(nn.top<=h&&nn.left<=i&&(ze=fn,He=nn),!0):!1},Z,$),ot,_t,Mt=!1;if(He){var Wt=i-He.left<He.right-i,kt=Wt==se;nt=ze+(kt?0:1),_t=kt?"after":"before",ot=Wt?He.left:He.right}else{!se&&(nt==$||nt==Z)&&nt++,_t=nt==0?"after":nt==t.text.length?"before":We(e,P,nt-(se?1:0)).bottom+z<=h==se?"after":"before";var Xt=kn(e,Qe(r,nt,_t),"line",t,P);ot=Xt.left,Mt=h<Xt.top?-1:h>=Xt.bottom?1:0}return nt=Fe(t.text,nt,1),tn(r,nt,_t,Mt,i-ot)}function Kn(e,t,r,i,h,P,z){var Z=$e(function(Oe){var ze=h[Oe],He=ze.level!=1;return Hn(kn(e,Qe(r,He?ze.to:ze.from,He?"before":"after"),"line",t,i),P,z,!0)},0,h.length-1),$=h[Z];if(Z>0){var se=$.level!=1,we=kn(e,Qe(r,se?$.from:$.to,se?"after":"before"),"line",t,i);Hn(we,P,z,!0)&&we.top>z&&($=h[Z-1])}return $}function qn(e,t,r,i,h,P,z){var Z=Bn(e,t,i,z),$=Z.begin,se=Z.end;/\s/.test(t.text.charAt(se-1))&&se--;for(var we=null,Oe=null,ze=0;ze<h.length;ze++){var He=h[ze];if(He.from>=se||He.to<=$)continue;var nt=He.level!=1,ot=We(e,i,nt?Math.min(se,He.to)-1:Math.max($,He.from)).right,_t=ot<P?P-ot+1e9:ot-P;(!we||Oe>_t)&&(we=He,Oe=_t)}return we||(we=h[h.length-1]),we.from<$&&(we={from:$,to:we.to,level:we.level}),we.to>se&&(we={from:we.from,to:se,level:we.level}),we}var Qn;function _i(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Qn==null){Qn=d("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Qn.appendChild(document.createTextNode("x")),Qn.appendChild(d("br"));Qn.appendChild(document.createTextNode("x"))}x(e.measure,Qn);var r=Qn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),w(e.measure),r||1}function Ri(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=d("span","xxxxxxxxxx"),r=d("pre",[t],"CodeMirror-line-like");x(e.measure,r);var i=t.getBoundingClientRect(),h=(i.right-i.left)/10;return h>2&&(e.cachedCharWidth=h),h||10}function di(e){for(var t=e.display,r={},i={},h=t.gutters.clientLeft,P=t.gutters.firstChild,z=0;P;P=P.nextSibling,++z){var Z=e.display.gutterSpecs[z].className;r[Z]=P.offsetLeft+P.clientLeft+h,i[Z]=P.clientWidth}return{fixedPos:Gi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function Gi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function pr(e){var t=_i(e.display),r=e.options.lineWrapping,i=r&&Math.max(5,e.display.scroller.clientWidth/Ri(e.display)-3);return function(h){if(Wi(e.doc,h))return 0;var P=0;if(h.widgets)for(var z=0;z<h.widgets.length;z++)h.widgets[z].height&&(P+=h.widgets[z].height);return r?P+(Math.ceil(h.text.length/i)||1)*t:P+t}}function Ji(e){var t=e.doc,r=pr(e);t.iter(function(i){var h=r(i);h!=i.height&>(i,h)})}function Li(e,t,r,i){var h=e.display;if(!r&&Ae(t).getAttribute("cm-not-content")=="true")return null;var P,z,Z=h.lineSpace.getBoundingClientRect();try{P=t.clientX-Z.left,z=t.clientY-Z.top}catch(Oe){return null}var $=Pn(e,P,z),se;if(i&&$.xRel>0&&(se=et(e.doc,$.line).text).length==$.ch){var we=J(se,se.length,e.options.tabSize)-se.length;$=Qe($.line,Math.max(0,Math.round((P-Le(e.display).left)/Ri(e.display))-we))}return $}function ni(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,i=0;i<r.length;i++)if(t-=r[i].size,t<0)return i}function $n(e,t,r,i){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),i||(i=0);var h=e.display;if(i&&r<h.viewTo&&(h.updateLineNumbers==null||h.updateLineNumbers>t)&&(h.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=h.viewTo)dn&&_r(e.doc,t)<h.viewTo&&li(e);else if(r<=h.viewFrom)dn&&Xi(e.doc,r+i)>h.viewFrom?li(e):(h.viewFrom+=i,h.viewTo+=i);else if(t<=h.viewFrom&&r>=h.viewTo)li(e);else if(t<=h.viewFrom){var P=mr(e,r,r+i,1);P?(h.view=h.view.slice(P.index),h.viewFrom=P.lineN,h.viewTo+=i):li(e)}else if(r>=h.viewTo){var z=mr(e,t,t,-1);z?(h.view=h.view.slice(0,z.index),h.viewTo=z.lineN):li(e)}else{var Z=mr(e,t,t,-1),$=mr(e,r,r+i,1);Z&&$?(h.view=h.view.slice(0,Z.index).concat(Bi(e,Z.lineN,$.lineN)).concat(h.view.slice($.index)),h.viewTo+=i):li(e)}var se=h.externalMeasured;se&&(r<se.lineN?se.lineN+=i:t<se.lineN+se.size&&(h.externalMeasured=null))}function hi(e,t,r){e.curOp.viewChanged=!0;var i=e.display,h=e.display.externalMeasured;if(h&&t>=h.lineN&&t<h.lineN+h.size&&(i.externalMeasured=null),t<i.viewFrom||t>=i.viewTo)return;var P=i.view[ni(e,t)];if(P.node==null)return;var z=P.changes||(P.changes=[]);he(z,r)==-1&&z.push(r)}function li(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function mr(e,t,r,i){var h=ni(e,t),P,z=e.display.view;if(!dn||r==e.doc.first+e.doc.size)return{index:h,lineN:r};for(var Z=e.display.viewFrom,$=0;$<h;$++)Z+=z[$].size;if(Z!=t){if(i>0){if(h==z.length-1)return null;P=Z+z[h].size-t,h++}else P=Z-t;t+=P,r+=P}for(;_r(e.doc,r)!=r;){if(h==(i<0?0:z.length-1))return null;r+=i*z[h-(i<0?1:0)].size,h+=i}return{index:h,lineN:r}}function Dr(e,t,r){var i=e.display,h=i.view;h.length==0||t>=i.viewTo||r<=i.viewFrom?(i.view=Bi(e,t,r),i.viewFrom=t):(i.viewFrom>t?i.view=Bi(e,t,i.viewFrom).concat(i.view):i.viewFrom<t&&(i.view=i.view.slice(ni(e,t))),i.viewFrom=t,i.viewTo<r?i.view=i.view.concat(Bi(e,i.viewTo,r)):i.viewTo>r&&(i.view=i.view.slice(0,ni(e,r)))),i.viewTo=r}function Ir(e){for(var t=e.display.view,r=0,i=0;i<t.length;i++){var h=t[i];!h.hidden&&(!h.node||h.changes)&&++r}return r}function Zn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Er(e,t){t===void 0&&(t=!0);for(var r=e.doc,i={},h=i.cursors=document.createDocumentFragment(),P=i.selection=document.createDocumentFragment(),z=0;z<r.sel.ranges.length;z++){if(!t&&z==r.sel.primIndex)continue;var Z=r.sel.ranges[z];if(Z.from().line>=e.display.viewTo||Z.to().line<e.display.viewFrom)continue;var $=Z.empty();($||e.options.showCursorWhenSelecting)&&Mr(e,Z.head,h),$||Yn(e,Z,P)}return i}function Mr(e,t,r){var i=kn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),h=r.appendChild(d("div","\xA0","CodeMirror-cursor"));if(h.style.left=i.left+"px",h.style.top=i.top+"px",h.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var P=r.appendChild(d("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));P.style.display="",P.style.left=i.other.left+"px",P.style.top=i.other.top+"px",P.style.height=(i.other.bottom-i.other.top)*.85+"px"}}function ti(e,t){return e.top-t.top||e.left-t.left}function Yn(e,t,r){var i=e.display,h=e.doc,P=document.createDocumentFragment(),z=Le(e.display),Z=z.left,$=Math.max(i.sizerWidth,Te(e)-i.sizer.offsetLeft)-z.right,se=h.direction=="ltr";function we(kt,Xt,fn,nn){Xt<0&&(Xt=0),Xt=Math.round(Xt),nn=Math.round(nn),P.appendChild(d("div",null,"CodeMirror-selected","position: absolute; left: "+kt+`px;
|
|
top: `+Xt+"px; width: "+(fn==null?$-kt:fn)+`px;
|
|
height: `+(nn-Xt)+"px"))}function Oe(kt,Xt,fn){var nn=et(h,kt),Rn=nn.text.length,ii,Ni;function gi(Ci,sr){return si(e,Qe(kt,Ci),"div",nn,sr)}function dr(Ci,sr,Hi){var ki=Jt(e,nn,null,Ci),Ai=sr=="ltr"==(Hi=="after")?"left":"right",Ei=Hi=="after"?ki.begin:ki.end-(/\s/.test(nn.text.charAt(ki.end-1))?2:1);return gi(Ei,Ai)[Ai]}var ar=Et(nn,h.direction);return st(ar,Xt||0,fn==null?Rn:fn,function(Ci,sr,Hi,ki){var Ai=Hi=="ltr",Ei=gi(Ci,Ai?"left":"right"),or=gi(sr-1,Ai?"right":"left"),Ua=Xt==null&&Ci==0,oa=fn==null&&sr==Rn,Vi=ki==0,Fr=!ar||ki==ar.length-1;if(or.top-Ei.top<=3){var Ui=(se?Ua:oa)&&Vi,po=(se?oa:Ua)&&Fr,Yr=Ui?Z:(Ai?Ei:or).left,va=po?$:(Ai?or:Ei).right;we(Yr,Ei.top,va-Yr,Ei.bottom)}else{var ya,$i,Fa,mo;Ai?(ya=se&&Ua&&Vi?Z:Ei.left,$i=se?$:dr(Ci,Hi,"before"),Fa=se?Z:dr(sr,Hi,"after"),mo=se&&oa&&Fr?$:or.right):(ya=se?dr(Ci,Hi,"before"):Z,$i=!se&&Ua&&Vi?$:Ei.right,Fa=!se&&oa&&Fr?Z:or.left,mo=se?dr(sr,Hi,"after"):$),we(ya,Ei.top,$i-ya,Ei.bottom),Ei.bottom<or.top&&we(Z,Ei.bottom,null,or.top),we(Fa,or.top,mo-Fa,or.bottom)}(!ii||ti(Ei,ii)<0)&&(ii=Ei),ti(or,ii)<0&&(ii=or),(!Ni||ti(Ei,Ni)<0)&&(Ni=Ei),ti(or,Ni)<0&&(Ni=or)}),{start:ii,end:Ni}}var ze=t.from(),He=t.to();if(ze.line==He.line)Oe(ze.line,ze.ch,He.ch);else{var nt=et(h,ze.line),ot=et(h,He.line),_t=Fi(nt)==Fi(ot),Mt=Oe(ze.line,ze.ch,_t?nt.text.length+1:null).end,Wt=Oe(He.line,_t?0:null,He.ch).start;_t&&(Mt.top<Wt.top-2?(we(Mt.right,Mt.top,null,Mt.bottom),we(Z,Wt.top,Wt.left,Wt.bottom)):we(Mt.right,Mt.top,Wt.left-Mt.right,Mt.bottom)),Mt.bottom<Wt.top&&we(Z,Mt.bottom,null,Wt.top)}r.appendChild(P)}function Di(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||qr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function _s(e){e.state.focused||(e.display.input.focus(),kr(e))}function za(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,qr(e))},100)}function kr(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ce(e,"focus",e,t),e.state.focused=!0,B(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),n&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Di(e)}function qr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(ce(e,"blur",e,t),e.state.focused=!1,O(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ba(e){for(var t=e.display,r=t.lineDiv.offsetTop,i=0;i<t.view.length;i++){var h=t.view[i],P=e.options.lineWrapping,z=void 0,Z=0;if(h.hidden)continue;if(K&&W<8){var $=h.node.offsetTop+h.node.offsetHeight;z=$-r,r=$}else{var se=h.node.getBoundingClientRect();z=se.bottom-se.top,!P&&h.text.firstChild&&(Z=h.text.firstChild.getBoundingClientRect().right-se.left-1)}var we=h.line.height-z;if((we>.005||we<-.005)&&(gt(h.line,z),Va(h.line),h.rest))for(var Oe=0;Oe<h.rest.length;Oe++)Va(h.rest[Oe]);if(Z>e.display.sizerWidth){var ze=Math.ceil(Z/Ri(e.display));ze>e.display.maxLineLength&&(e.display.maxLineLength=ze,e.display.maxLine=h.line,e.display.maxLineChanged=!0)}}}function Va(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],i=r.node.parentNode;i&&(r.height=i.offsetHeight)}}function _a(e,t,r){var i=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;i=Math.floor(i-Ga(e));var h=r&&r.bottom!=null?r.bottom:i+e.wrapper.clientHeight,P=Nt(t,i),z=Nt(t,h);if(r&&r.ensure){var Z=r.ensure.from.line,$=r.ensure.to.line;Z<P?(P=Z,z=Nt(t,ai(et(t,Z))+e.wrapper.clientHeight)):Math.min($,t.lastLine())>=z&&(P=Nt(t,ai(et(t,$))-e.wrapper.clientHeight),z=$)}return{from:P,to:Math.max(z,P+1)}}function Vs(e,t){if(q(e,"scrollCursorIntoView"))return;var r=e.display,i=r.sizer.getBoundingClientRect(),h=null;if(t.top+i.top<0?h=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(h=!1),h!=null&&!c){var P=d("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-Ga(e.display))+`px;
|
|
height: `+(t.bottom-t.top+ke(e)+r.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(P),P.scrollIntoView(h),e.display.lineSpace.removeChild(P)}}function Xs(e,t,r,i){i==null&&(i=0);var h;!e.options.lineWrapping&&t==r&&(t=t.ch?Qe(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Qe(t.line,t.ch+1,"before"):t);for(var P=0;P<5;P++){var z=!1,Z=kn(e,t),$=!r||r==t?Z:kn(e,r);h={left:Math.min(Z.left,$.left),top:Math.min(Z.top,$.top)-i,right:Math.max(Z.left,$.left),bottom:Math.max(Z.bottom,$.bottom)+i};var se=Xa(e,h),we=e.doc.scrollTop,Oe=e.doc.scrollLeft;if(se.scrollTop!=null&&(ta(e,se.scrollTop),Math.abs(e.doc.scrollTop-we)>1&&(z=!0)),se.scrollLeft!=null&&(gr(e,se.scrollLeft),Math.abs(e.doc.scrollLeft-Oe)>1&&(z=!0)),!z)break}return h}function Es(e,t){var r=Xa(e,t);r.scrollTop!=null&&ta(e,r.scrollTop),r.scrollLeft!=null&&gr(e,r.scrollLeft)}function Xa(e,t){var r=e.display,i=_i(e.display);t.top<0&&(t.top=0);var h=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,P=re(e),z={};t.bottom-t.top>P&&(t.bottom=t.top+P);var Z=e.doc.height+ye(r),$=t.top<i,se=t.bottom>Z-i;if(t.top<h)z.scrollTop=$?0:t.top;else if(t.bottom>h+P){var we=Math.min(t.top,(se?Z:t.bottom)-P);we!=h&&(z.scrollTop=we)}var Oe=e.options.fixedGutter?0:r.gutters.offsetWidth,ze=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-Oe,He=Te(e)-r.gutters.offsetWidth,nt=t.right-t.left>He;return nt&&(t.right=t.left+He),t.left<10?z.scrollLeft=0:t.left<ze?z.scrollLeft=Math.max(0,t.left+Oe-(nt?0:10)):t.right>He+ze-3&&(z.scrollLeft=t.right+(nt?0:10)-He),z}function Ya(e,t){if(t==null)return;Ea(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function $r(e){Ea(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ea(e,t,r){(t!=null||r!=null)&&Ea(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Ys(e,t){Ea(e),e.curOp.scrollToPos=t}function Ea(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=on(e,t.from),i=on(e,t.to);ha(e,r,i,t.margin)}}function ha(e,t,r,i){var h=Xa(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-i,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+i});ea(e,h.scrollLeft,h.scrollTop)}function ta(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;k||ma(e,{top:t}),na(e,t,!0),k&&ma(e),pa(e,100)}function na(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function gr(e,t,r,i){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!i)return;e.doc.scrollLeft=t,Nn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function Wr(e){var t=e.display,r=t.gutters.offsetWidth,i=Math.round(e.doc.height+ye(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:i,scrollHeight:i+ke(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Pr=function(e,t,r){this.cm=r;var i=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),h=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=h.tabIndex=-1,e(i),e(h),Je(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Je(h,"scroll",function(){h.clientWidth&&t(h.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,K&&W<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Pr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var h=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+h)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var P=e.viewWidth-e.barLeft-(r?i:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+P)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(i==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?i:0,bottom:t?i:0}},Pr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Pr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Pr.prototype.zeroWidthHack=function(){var e=s&&!u?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ne,this.disableVert=new ne},Pr.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function i(){var h=e.getBoundingClientRect(),P=r=="vert"?document.elementFromPoint(h.right-1,(h.top+h.bottom)/2):document.elementFromPoint((h.right+h.left)/2,h.bottom-1);P!=e?e.style.pointerEvents="none":t.set(1e3,i)}t.set(1e3,i)},Pr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var fa=function(){};fa.prototype.update=function(){return{bottom:0,right:0}},fa.prototype.setScrollLeft=function(){},fa.prototype.setScrollTop=function(){},fa.prototype.clear=function(){};function Kr(e,t){t||(t=Wr(e));var r=e.display.barWidth,i=e.display.barHeight;xa(e,t);for(var h=0;h<4&&r!=e.display.barWidth||i!=e.display.barHeight;h++)r!=e.display.barWidth&&e.options.lineWrapping&&ba(e),xa(e,Wr(e)),r=e.display.barWidth,i=e.display.barHeight}function xa(e,t){var r=e.display,i=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=i.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=i.bottom)+"px",r.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=i.bottom+"px",r.scrollbarFiller.style.width=i.right+"px"):r.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=i.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var Ja={native:Pr,null:fa};function Ta(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ja[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Je(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?gr(e,t):ta(e,t)},e),e.display.scrollbars.addClass&&B(e.display.wrapper,e.display.scrollbars.addClass)}var Qa=0;function Nr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Qa},cr(e.curOp)}function Gr(e){var t=e.curOp;t&&Ws(t,function(r){for(var i=0;i<r.ops.length;i++)r.ops[i].cm.curOp=null;xs(r)})}function xs(e){for(var t=e.ops,r=0;r<t.length;r++)Js(t[r]);for(var i=0;i<t.length;i++)Qs(t[i]);for(var h=0;h<t.length;h++)Zs(t[h]);for(var P=0;P<t.length;P++)Za(t[P]);for(var z=0;z<t.length;z++)qs(t[z])}function Js(e){var t=e.cm,r=t.display;Ts(t),e.updateMaxLine&&vi(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new vr(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qs(e){e.updatedDisplay=e.mustUpdate&&zr(e.cm,e.update)}function Zs(e){var t=e.cm,r=t.display;e.updatedDisplay&&ba(t),e.barMeasure=Wr(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ce(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+ke(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Te(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Za(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&gr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==T();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Kr(t,e.barMeasure),e.updatedDisplay&&Vn(t,e.barMeasure),e.selectionChanged&&Di(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&_s(e.cm)}function qs(e){var t=e.cm,r=t.display,i=t.doc;if(e.updatedDisplay&&wa(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&na(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&gr(t,e.scrollLeft,!0,!0),e.scrollToPos){var h=Xs(t,at(i,e.scrollToPos.from),at(i,e.scrollToPos.to),e.scrollToPos.margin);Vs(t,h)}var P=e.maybeHiddenMarkers,z=e.maybeUnhiddenMarkers;if(P)for(var Z=0;Z<P.length;++Z)P[Z].lines.length||ce(P[Z],"hide");if(z)for(var $=0;$<z.length;++$)z[$].lines.length&&ce(z[$],"unhide");r.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ce(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qi(e,t){if(e.curOp)return t();Nr(e);try{return t()}finally{Gr(e)}}function Ti(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Nr(e);try{return t.apply(e,arguments)}finally{Gr(e)}}}function ji(e){return function(){if(this.curOp)return e.apply(this,arguments);Nr(this);try{return e.apply(this,arguments)}finally{Gr(this)}}}function wi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Nr(t);try{return e.apply(this,arguments)}finally{Gr(t)}}}function pa(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,U($s,e))}function $s(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,i=Ht(e,t.highlightFrontier),h=[];t.iter(i.line,Math.min(t.first+t.size,e.display.viewTo+500),function(P){if(i.line>=e.display.viewFrom){var z=P.styles,Z=P.text.length>e.options.maxHighlightLength?ft(t.mode,i.state):null,$=yt(e,P,i,!0);Z&&(i.state=Z),P.styles=$.styles;var se=P.styleClasses,we=$.classes;we?P.styleClasses=we:se&&(P.styleClasses=null);for(var Oe=!z||z.length!=P.styles.length||se!=we&&(!se||!we||se.bgClass!=we.bgClass||se.textClass!=we.textClass),ze=0;!Oe&&ze<z.length;++ze)Oe=z[ze]!=P.styles[ze];Oe&&h.push(i.line),P.stateAfter=i.save(),i.nextLine()}else P.text.length<=e.options.maxHighlightLength&&ui(e,P.text,i),P.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>r)return pa(e,e.options.workDelay),!0}),t.highlightFrontier=i.line,t.modeFrontier=Math.max(t.modeFrontier,i.line),h.length&&Qi(e,function(){for(var P=0;P<h.length;P++)hi(e,h[P],"text")})}var vr=function(e,t,r){var i=e.display;this.viewport=t,this.visible=_a(i,e.doc,t),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Te(e),this.force=r,this.dims=di(e),this.events=[]};vr.prototype.signal=function(e,t){oe(e,t)&&this.events.push(arguments)},vr.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ce.apply(null,this.events[e])};function Ts(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=ke(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=ke(e)+"px",t.scrollbarsClipped=!0)}function ws(e){if(e.hasFocus())return null;var t=T();if(!t||!v(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&v(e.display.lineDiv,i.anchorNode)&&(r.anchorNode=i.anchorNode,r.anchorOffset=i.anchorOffset,r.focusNode=i.focusNode,r.focusOffset=i.focusOffset)}return r}function Ss(e){if(!e||!e.activeElt||e.activeElt==T())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&v(document.body,e.anchorNode)&&v(document.body,e.focusNode)){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function zr(e,t){var r=e.display,i=e.doc;if(t.editorIsHidden)return li(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&Ir(e)==0)return!1;Ii(e)&&(li(e),t.dims=di(e));var h=i.first+i.size,P=Math.max(t.visible.from-e.options.viewportMargin,i.first),z=Math.min(h,t.visible.to+e.options.viewportMargin);r.viewFrom<P&&P-r.viewFrom<20&&(P=Math.max(i.first,r.viewFrom)),r.viewTo>z&&r.viewTo-z<20&&(z=Math.min(h,r.viewTo)),dn&&(P=_r(e.doc,P),z=Xi(e.doc,z));var Z=P!=r.viewFrom||z!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Dr(e,P,z),r.viewOffset=ai(et(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var $=Ir(e);if(!Z&&$==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var se=ws(e);return $>4&&(r.lineDiv.style.display="none"),Cs(e,r.updateLineNumbers,t.dims),$>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Ss(se),w(r.cursorDiv),w(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,Z&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,pa(e,400)),r.updateLineNumbers=null,!0}function wa(e,t){for(var r=t.viewport,i=!0;;i=!1){if(!i||!e.options.lineWrapping||t.oldDisplayWidth==Te(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+ye(e.display)-re(e),r.top)}),t.visible=_a(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else i&&(t.visible=_a(e.display,e.doc,r));if(!zr(e,t))break;ba(e);var h=Wr(e);Zn(e),Kr(e,h),Vn(e,h),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ma(e,t){var r=new vr(e,t);if(zr(e,r)){ba(e),wa(e,r);var i=Wr(e);Zn(e),Kr(e,i),Vn(e,i),r.finish()}}function Cs(e,t,r){var i=e.display,h=e.options.lineNumbers,P=i.lineDiv,z=P.firstChild;function Z(nt){var ot=nt.nextSibling;return n&&s&&e.display.currentWheelTarget==nt?nt.style.display="none":nt.parentNode.removeChild(nt),ot}for(var $=i.view,se=i.viewFrom,we=0;we<$.length;we++){var Oe=$[we];if(!Oe.hidden)if(!Oe.node||Oe.node.parentNode!=P){var ze=ys(e,Oe,se,r);P.insertBefore(ze,z)}else{for(;z!=Oe.node;)z=Z(z);var He=h&&t!=null&&t<=se&&Oe.lineNumber;Oe.changes&&(he(Oe.changes,"gutter")>-1&&(He=!1),gs(e,Oe,se,r)),He&&(w(Oe.lineNumber),Oe.lineNumber.appendChild(document.createTextNode(Yt(e.options,se)))),z=Oe.node.nextSibling}se+=Oe.size}for(;z;)z=Z(z)}function Sa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Vn(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+ke(e)+"px"}function Nn(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var i=Gi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,h=t.gutters.offsetWidth,P=i+"px",z=0;z<r.length;z++)if(!r[z].hidden){e.options.fixedGutter&&(r[z].gutter&&(r[z].gutter.style.left=P),r[z].gutterBackground&&(r[z].gutterBackground.style.left=P));var Z=r[z].alignable;if(Z)for(var $=0;$<Z.length;$++)Z[$].style.left=P}e.options.fixedGutter&&(t.gutters.style.left=i+h+"px")}function Ii(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Yt(e.options,t.first+t.size-1),i=e.display;if(r.length!=i.lineNumChars){var h=i.measure.appendChild(d("div",[d("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),P=h.firstChild.offsetWidth,z=h.offsetWidth-P;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(P,i.lineGutter.offsetWidth-z)+1,i.lineNumWidth=i.lineNumInnerWidth+z,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Sa(e.display),!0}return!1}function Zi(e,t){for(var r=[],i=!1,h=0;h<e.length;h++){var P=e[h],z=null;if(typeof P!="string"&&(z=P.style,P=P.className),P=="CodeMirror-linenumbers")if(t)i=!0;else continue;r.push({className:P,style:z})}return t&&!i&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function ia(e){var t=e.gutters,r=e.gutterSpecs;w(t),e.lineGutter=null;for(var i=0;i<r.length;++i){var h=r[i],P=h.className,z=h.style,Z=t.appendChild(d("div",null,"CodeMirror-gutter "+P));z&&(Z.style.cssText=z),P=="CodeMirror-linenumbers"&&(e.lineGutter=Z,Z.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Sa(e)}function Ar(e){ia(e.display),$n(e),Nn(e)}function ga(e,t,r,i){var h=this;this.input=r,h.scrollbarFiller=d("div",null,"CodeMirror-scrollbar-filler"),h.scrollbarFiller.setAttribute("cm-not-content","true"),h.gutterFiller=d("div",null,"CodeMirror-gutter-filler"),h.gutterFiller.setAttribute("cm-not-content","true"),h.lineDiv=E("div",null,"CodeMirror-code"),h.selectionDiv=d("div",null,null,"position: relative; z-index: 1"),h.cursorDiv=d("div",null,"CodeMirror-cursors"),h.measure=d("div",null,"CodeMirror-measure"),h.lineMeasure=d("div",null,"CodeMirror-measure"),h.lineSpace=E("div",[h.measure,h.lineMeasure,h.selectionDiv,h.cursorDiv,h.lineDiv],null,"position: relative; outline: none");var P=E("div",[h.lineSpace],"CodeMirror-lines");h.mover=d("div",[P],null,"position: relative"),h.sizer=d("div",[h.mover],"CodeMirror-sizer"),h.sizerWidth=null,h.heightForcer=d("div",null,null,"position: absolute; height: "+be+"px; width: 1px;"),h.gutters=d("div",null,"CodeMirror-gutters"),h.lineGutter=null,h.scroller=d("div",[h.sizer,h.heightForcer,h.gutters],"CodeMirror-scroll"),h.scroller.setAttribute("tabIndex","-1"),h.wrapper=d("div",[h.scrollbarFiller,h.gutterFiller,h.scroller],"CodeMirror"),K&&W<8&&(h.gutters.style.zIndex=-1,h.scroller.style.paddingRight=0),!n&&!(k&&o)&&(h.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(h.wrapper):e(h.wrapper)),h.viewFrom=h.viewTo=t.first,h.reportedViewFrom=h.reportedViewTo=t.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=Zi(i.gutters,i.lineNumbers),ia(h),r.init(h)}var Ur=0,Mi=null;K?Mi=-.53:k?Mi=15:y?Mi=-.7:g&&(Mi=-1/3);function Ca(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function qa(e){var t=Ca(e);return t.x*=Mi,t.y*=Mi,t}function $a(e,t){var r=Ca(t),i=r.x,h=r.y,P=e.display,z=P.scroller,Z=z.scrollWidth>z.clientWidth,$=z.scrollHeight>z.clientHeight;if(!(i&&Z||h&&$))return;if(h&&s&&n){e:for(var se=t.target,we=P.view;se!=z;se=se.parentNode)for(var Oe=0;Oe<we.length;Oe++)if(we[Oe].node==se){e.display.currentWheelTarget=se;break e}}if(i&&!k&&!m&&Mi!=null){h&&$&&ta(e,Math.max(0,z.scrollTop+h*Mi)),gr(e,Math.max(0,z.scrollLeft+i*Mi)),(!h||h&&$)&&ie(t),P.wheelStartX=null;return}if(h&&Mi!=null){var ze=h*Mi,He=e.doc.scrollTop,nt=He+P.wrapper.clientHeight;ze<0?He=Math.max(0,He+ze-50):nt=Math.min(e.doc.height,nt+ze+50),ma(e,{top:He,bottom:nt})}Ur<20&&(P.wheelStartX==null?(P.wheelStartX=z.scrollLeft,P.wheelStartY=z.scrollTop,P.wheelDX=i,P.wheelDY=h,setTimeout(function(){if(P.wheelStartX==null)return;var ot=z.scrollLeft-P.wheelStartX,_t=z.scrollTop-P.wheelStartY,Mt=_t&&P.wheelDY&&_t/P.wheelDY||ot&&P.wheelDX&&ot/P.wheelDX;if(P.wheelStartX=P.wheelStartY=null,!Mt)return;Mi=(Mi*Ur+Mt)/(Ur+1),++Ur},200)):(P.wheelDX+=i,P.wheelDY+=h))}var qi=function(e,t){this.ranges=e,this.primIndex=t};qi.prototype.primary=function(){return this.ranges[this.primIndex]},qi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],i=e.ranges[t];if(!yn(r.anchor,i.anchor)||!yn(r.head,i.head))return!1}return!0},qi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new zn(lt(this.ranges[t].anchor),lt(this.ranges[t].head));return new qi(e,this.primIndex)},qi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},qi.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var i=this.ranges[r];if(St(t,i.from())>=0&&St(e,i.to())<=0)return r}return-1};var zn=function(e,t){this.anchor=e,this.head=t};zn.prototype.from=function(){return en(this.anchor,this.head)},zn.prototype.to=function(){return jt(this.anchor,this.head)},zn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function yr(e,t,r){var i=e&&e.options.selectionsMayTouch,h=t[r];t.sort(function(ze,He){return St(ze.from(),He.from())}),r=he(t,h);for(var P=1;P<t.length;P++){var z=t[P],Z=t[P-1],$=St(Z.to(),z.from());if(i&&!z.empty()?$>0:$>=0){var se=en(Z.from(),z.from()),we=jt(Z.to(),z.to()),Oe=Z.empty()?z.from()==z.head:Z.from()==Z.head;P<=r&&--r,t.splice(--P,2,new zn(Oe?we:se,Oe?se:we))}}return new qi(t,r)}function Or(e,t){return new qi([new zn(e,t||e)],0)}function Rr(e){return e.text?Qe(e.from.line+e.text.length-1,M(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function es(e,t){if(St(e,t.from)<0)return e;if(St(e,t.to)<=0)return Rr(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=Rr(t).ch-t.to.ch),Qe(r,i)}function Aa(e,t){for(var r=[],i=0;i<e.sel.ranges.length;i++){var h=e.sel.ranges[i];r.push(new zn(es(h.anchor,t),es(h.head,t)))}return yr(e.cm,r,e.sel.primIndex)}function As(e,t,r){return e.line==t.line?Qe(r.line,e.ch-t.ch+r.ch):Qe(r.line+(e.line-t.line),e.ch)}function Os(e,t,r){for(var i=[],h=Qe(e.first,0),P=h,z=0;z<t.length;z++){var Z=t[z],$=As(Z.from,h,P),se=As(Rr(Z),h,P);if(h=Z.to,P=se,r=="around"){var we=e.sel.ranges[z],Oe=St(we.head,we.anchor)<0;i[z]=new zn(Oe?se:$,Oe?$:se)}else i[z]=new zn($,$)}return new qi(i,e.sel.primIndex)}function Vr(e){e.doc.mode=Ln(e.options,e.doc.modeOption),ts(e)}function ts(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,pa(e,100),e.state.modeGen++,e.curOp&&$n(e)}function go(e,t){return t.from.ch==0&&t.to.ch==0&&M(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function eo(e,t,r,i){function h(Wt){return r?r[Wt]:null}function P(Wt,kt,Xt){Ki(Wt,kt,Xt,i),bi(Wt,"change",Wt,t)}function z(Wt,kt){for(var Xt=[],fn=Wt;fn<kt;++fn)Xt.push(new mi(se[fn],h(fn),i));return Xt}var Z=t.from,$=t.to,se=t.text,we=et(e,Z.line),Oe=et(e,$.line),ze=M(se),He=h(se.length-1),nt=$.line-Z.line;if(t.full)e.insert(0,z(0,se.length)),e.remove(se.length,e.size-se.length);else if(go(e,t)){var ot=z(0,se.length-1);P(Oe,Oe.text,He),nt&&e.remove(Z.line,nt),ot.length&&e.insert(Z.line,ot)}else if(we==Oe)if(se.length==1)P(we,we.text.slice(0,Z.ch)+ze+we.text.slice($.ch),He);else{var _t=z(1,se.length-1);_t.push(new mi(ze+we.text.slice($.ch),He,i)),P(we,we.text.slice(0,Z.ch)+se[0],h(0)),e.insert(Z.line+1,_t)}else if(se.length==1)P(we,we.text.slice(0,Z.ch)+se[0]+Oe.text.slice($.ch),h(0)),e.remove(Z.line+1,nt);else{P(we,we.text.slice(0,Z.ch)+se[0],h(0)),P(Oe,ze+Oe.text.slice($.ch),He);var Mt=z(1,se.length-1);nt>1&&e.remove(Z.line+1,nt-1),e.insert(Z.line+1,Mt)}bi(e,"change",e,t)}function ra(e,t,r){function i(h,P,z){if(h.linked)for(var Z=0;Z<h.linked.length;++Z){var $=h.linked[Z];if($.doc==P)continue;var se=z&&$.sharedHist;if(r&&!se)continue;t($.doc,se),i($.doc,h,se)}}i(e,null,!0)}function vo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Ji(e),Vr(e),yo(e),e.options.lineWrapping||vi(e),e.options.mode=t.modeOption,$n(e)}function yo(e){(e.doc.direction=="rtl"?B:O)(e.display.lineDiv,"CodeMirror-rtl")}function fl(e){Qi(e,function(){yo(e),$n(e)})}function Rs(e){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=e||1}function to(e,t){var r={from:lt(t.from),to:Rr(t),text:Tt(e,t.from,t.to)};return Eo(e,r,t.from.line,t.to.line+1),ra(e,function(i){return Eo(i,r,t.from.line,t.to.line+1)},!0),r}function bo(e){for(;e.length;){var t=M(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return bo(e.done),M(e.done);if(e.done.length&&!M(e.done).ranges)return M(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),M(e.done)}function _o(e,t,r,i){var h=e.history;h.undone.length=0;var P=+new Date,z,Z;if((h.lastOp==i||h.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&h.lastModTime>P-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(z=pl(h,h.lastOp==i)))Z=M(z.changes),St(t.from,t.to)==0&&St(t.from,Z.to)==0?Z.to=Rr(t):z.changes.push(to(e,t));else{var $=M(h.done);for((!$||!$.ranges)&&Ls(e.sel,h.done),z={changes:[to(e,t)],generation:h.generation},h.done.push(z);h.done.length>h.undoDepth;)h.done.shift(),h.done[0].ranges||h.done.shift()}h.done.push(r),h.generation=++h.maxGeneration,h.lastModTime=h.lastSelTime=P,h.lastOp=h.lastSelOp=i,h.lastOrigin=h.lastSelOrigin=t.origin,Z||ce(e,"historyAdded")}function ml(e,t,r,i){var h=t.charAt(0);return h=="*"||h=="+"&&r.ranges.length==i.ranges.length&&r.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,i){var h=e.history,P=i&&i.origin;r==h.lastSelOp||P&&h.lastSelOrigin==P&&(h.lastModTime==h.lastSelTime&&h.lastOrigin==P||ml(e,P,M(h.done),t))?h.done[h.done.length-1]=t:Ls(t,h.done),h.lastSelTime=+new Date,h.lastSelOrigin=P,h.lastSelOp=r,i&&i.clearRedo!==!1&&bo(h.undone)}function Ls(e,t){var r=M(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Eo(e,t,r,i){var h=t["spans_"+e.id],P=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,i),function(z){z.markedSpans&&((h||(h=t["spans_"+e.id]={}))[P]=z.markedSpans),++P})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function yl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var i=[],h=0;h<t.text.length;++h)i.push(vl(r[h]));return i}function xo(e,t){var r=yl(e,t),i=xi(e,t);if(!r)return i;if(!i)return r;for(var h=0;h<r.length;++h){var P=r[h],z=i[h];if(P&&z){e:for(var Z=0;Z<z.length;++Z){for(var $=z[Z],se=0;se<P.length;++se)if(P[se].marker==$.marker)continue e;P.push($)}}else z&&(r[h]=z)}return r}function Oa(e,t,r){for(var i=[],h=0;h<e.length;++h){var P=e[h];if(P.ranges){i.push(r?qi.prototype.deepCopy.call(P):P);continue}var z=P.changes,Z=[];i.push({changes:Z});for(var $=0;$<z.length;++$){var se=z[$],we=void 0;if(Z.push({from:se.from,to:se.to,text:se.text}),t)for(var Oe in se)(we=Oe.match(/^spans_(\d+)$/))&&(he(t,Number(we[1]))>-1&&(M(Z)[Oe]=se[Oe],delete se[Oe]))}}return i}function no(e,t,r,i){if(i){var h=e.anchor;if(r){var P=St(t,h)<0;P!=St(r,h)<0?(h=t,t=r):P!=St(t,r)<0&&(t=r)}return new zn(h,t)}else return new zn(r||t,t)}function Ds(e,t,r,i,h){h==null&&(h=e.cm&&(e.cm.display.shift||e.extend)),zi(e,new qi([no(e.sel.primary(),t,r,h)],0),i)}function To(e,t,r){for(var i=[],h=e.cm&&(e.cm.display.shift||e.extend),P=0;P<e.sel.ranges.length;P++)i[P]=no(e.sel.ranges[P],t[P],null,h);var z=yr(e.cm,i,e.sel.primIndex);zi(e,z,r)}function io(e,t,r,i){var h=e.sel.ranges.slice(0);h[t]=r,zi(e,yr(e.cm,h,e.sel.primIndex),i)}function wo(e,t,r,i){zi(e,Or(t,r),i)}function bl(e,t,r){var i={ranges:t.ranges,update:function(h){this.ranges=[];for(var P=0;P<h.length;P++)this.ranges[P]=new zn(at(e,h[P].anchor),at(e,h[P].head))},origin:r&&r.origin};return ce(e,"beforeSelectionChange",e,i),e.cm&&ce(e.cm,"beforeSelectionChange",e.cm,i),i.ranges!=t.ranges?yr(e.cm,i.ranges,i.ranges.length-1):t}function So(e,t,r){var i=e.history.done,h=M(i);h&&h.ranges?(i[i.length-1]=t,Is(e,t,r)):zi(e,t,r)}function zi(e,t,r){Is(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Is(e,t,r){(oe(e,"beforeSelectionChange")||e.cm&&oe(e.cm,"beforeSelectionChange"))&&(t=bl(e,t,r));var i=r&&r.bias||(St(t.primary().head,e.sel.primary().head)<0?-1:1);Co(e,Oo(e,t,i,!0)),!(r&&r.scroll===!1)&&e.cm&&$r(e.cm)}function Co(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ee(e.cm)),bi(e,"cursorActivity",e)}function Ao(e){Co(e,Oo(e,e.sel,null,!1))}function Oo(e,t,r,i){for(var h,P=0;P<t.ranges.length;P++){var z=t.ranges[P],Z=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[P],$=Ms(e,z.anchor,Z&&Z.anchor,r,i),se=Ms(e,z.head,Z&&Z.head,r,i);(h||$!=z.anchor||se!=z.head)&&(h||(h=t.ranges.slice(0,P)),h[P]=new zn($,se))}return h?yr(e.cm,h,t.primIndex):t}function Ra(e,t,r,i,h){var P=et(e,t.line);if(P.markedSpans)for(var z=0;z<P.markedSpans.length;++z){var Z=P.markedSpans[z],$=Z.marker,se="selectLeft"in $?!$.selectLeft:$.inclusiveLeft,we="selectRight"in $?!$.selectRight:$.inclusiveRight;if((Z.from==null||(se?Z.from<=t.ch:Z.from<t.ch))&&(Z.to==null||(we?Z.to>=t.ch:Z.to>t.ch))){if(h&&(ce($,"beforeCursorEnter"),$.explicitlyCleared))if(P.markedSpans){--z;continue}else break;if(!$.atomic)continue;if(r){var Oe=$.find(i<0?1:-1),ze=void 0;if((i<0?we:se)&&(Oe=Ro(e,Oe,-i,Oe&&Oe.line==t.line?P:null)),Oe&&Oe.line==t.line&&(ze=St(Oe,r))&&(i<0?ze<0:ze>0))return Ra(e,Oe,t,i,h)}var He=$.find(i<0?-1:1);return(i<0?se:we)&&(He=Ro(e,He,i,He.line==t.line?P:null)),He?Ra(e,He,t,i,h):null}}return t}function Ms(e,t,r,i,h){var P=i||1,z=Ra(e,t,r,P,h)||!h&&Ra(e,t,r,P,!0)||Ra(e,t,r,-P,h)||!h&&Ra(e,t,r,-P,!0);return z||(e.cantEdit=!0,Qe(e.first,0))}function Ro(e,t,r,i){return r<0&&t.ch==0?t.line>e.first?at(e,Qe(t.line-1)):null:r>0&&t.ch==(i||et(e,t.line)).text.length?t.line<e.first+e.size-1?Qe(t.line+1,0):null:new Qe(t.line,t.ch+r)}function Lo(e){e.setSelection(Qe(e.firstLine(),0),Qe(e.lastLine()),De)}function Do(e,t,r){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return i.canceled=!0}};return r&&(i.update=function(h,P,z,Z){h&&(i.from=at(e,h)),P&&(i.to=at(e,P)),z&&(i.text=z),Z!==void 0&&(i.origin=Z)}),ce(e,"beforeChange",e,i),e.cm&&ce(e.cm,"beforeChange",e.cm,i),i.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function La(e,t,r){if(e.cm){if(!e.cm.curOp)return Ti(e.cm,La)(e,t,r);if(e.cm.state.suppressEdits)return}if((oe(e,"beforeChange")||e.cm&&oe(e.cm,"beforeChange"))&&(t=Do(e,t,!0),!t))return;var i=ln&&!r&&Tr(e,t.from,t.to);if(i)for(var h=i.length-1;h>=0;--h)Io(e,{from:i[h].from,to:i[h].to,text:h?[""]:t.text,origin:t.origin});else Io(e,t)}function Io(e,t){if(t.text.length==1&&t.text[0]==""&&St(t.from,t.to)==0)return;var r=Aa(e,t);_o(e,t,r,e.cm?e.cm.curOp.id:NaN),ns(e,t,r,xi(e,t));var i=[];ra(e,function(h,P){!P&&he(i,h.history)==-1&&(No(h.history,t),i.push(h.history)),ns(h,t,null,xi(h,t))})}function ks(e,t,r){var i=e.cm&&e.cm.state.suppressEdits;if(i&&!r)return;for(var h=e.history,P,z=e.sel,Z=t=="undo"?h.done:h.undone,$=t=="undo"?h.undone:h.done,se=0;se<Z.length&&!(P=Z[se],r?P.ranges&&!P.equals(e.sel):!P.ranges);se++);if(se==Z.length)return;for(h.lastOrigin=h.lastSelOrigin=null;;)if(P=Z.pop(),P.ranges){if(Ls(P,$),r&&!P.equals(e.sel)){zi(e,P,{clearRedo:!1});return}z=P}else if(i){Z.push(P);return}else break;var we=[];Ls(z,$),$.push({changes:we,generation:h.generation}),h.generation=P.generation||++h.maxGeneration;for(var Oe=oe(e,"beforeChange")||e.cm&&oe(e.cm,"beforeChange"),ze=function(ot){var _t=P.changes[ot];if(_t.origin=t,Oe&&!Do(e,_t,!1))return Z.length=0,{};we.push(to(e,_t));var Mt=ot?Aa(e,_t):M(Z);ns(e,_t,Mt,xo(e,_t)),!ot&&e.cm&&e.cm.scrollIntoView({from:_t.from,to:Rr(_t)});var Wt=[];ra(e,function(kt,Xt){!Xt&&he(Wt,kt.history)==-1&&(No(kt.history,_t),Wt.push(kt.history)),ns(kt,_t,null,xo(kt,_t))})},He=P.changes.length-1;He>=0;--He){var nt=ze(He);if(nt)return nt.v}}function Mo(e,t){if(t==0)return;if(e.first+=t,e.sel=new qi(F(e.sel.ranges,function(h){return new zn(Qe(h.anchor.line+t,h.anchor.ch),Qe(h.head.line+t,h.head.ch))}),e.sel.primIndex),e.cm){$n(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,i=r.viewFrom;i<r.viewTo;i++)hi(e.cm,i,"gutter")}}function ns(e,t,r,i){if(e.cm&&!e.cm.curOp)return Ti(e.cm,ns)(e,t,r,i);if(t.to.line<e.first){Mo(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var h=t.text.length-1-(e.first-t.from.line);Mo(e,h),t={from:Qe(e.first,0),to:Qe(t.to.line+h,t.to.ch),text:[M(t.text)],origin:t.origin}}var P=e.lastLine();t.to.line>P&&(t={from:t.from,to:Qe(P,et(e,P).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Tt(e,t.from,t.to),r||(r=Aa(e,t)),e.cm?_l(e.cm,t,i):eo(e,t,i),Is(e,r,De),e.cantEdit&&Ms(e,Qe(e.firstLine(),0))&&(e.cantEdit=!1)}function _l(e,t,r){var i=e.doc,h=e.display,P=t.from,z=t.to,Z=!1,$=P.line;e.options.lineWrapping||($=dt(Fi(et(i,P.line))),i.iter($,z.line+1,function(He){if(He==h.maxLine)return Z=!0,!0})),i.sel.contains(t.from,t.to)>-1&&ee(e),eo(i,t,r,pr(e)),e.options.lineWrapping||(i.iter($,P.line+t.text.length,function(He){var nt=Wn(He);nt>h.maxLineLength&&(h.maxLine=He,h.maxLineLength=nt,h.maxLineChanged=!0,Z=!1)}),Z&&(e.curOp.updateMaxLine=!0)),zt(i,P.line),pa(e,400);var se=t.text.length-(z.line-P.line)-1;t.full?$n(e):P.line==z.line&&t.text.length==1&&!go(e.doc,t)?hi(e,P.line,"text"):$n(e,P.line,z.line+1,se);var we=oe(e,"changes"),Oe=oe(e,"change");if(Oe||we){var ze={from:P,to:z,text:t.text,removed:t.removed,origin:t.origin};Oe&&bi(e,"change",e,ze),we&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ze)}e.display.selForContextMenu=null}function Da(e,t,r,i,h){var P;i||(i=r),St(i,r)<0&&(P=[i,r],r=P[0],i=P[1]),typeof t=="string"&&(t=e.splitLines(t)),La(e,{from:r,to:i,text:t,origin:h})}function ko(e,t,r,i){r<e.line?e.line+=i:t<e.line&&(e.line=t,e.ch=0)}function Po(e,t,r,i){for(var h=0;h<e.length;++h){var P=e[h],z=!0;if(P.ranges){P.copied||(P=e[h]=P.deepCopy(),P.copied=!0);for(var Z=0;Z<P.ranges.length;Z++)ko(P.ranges[Z].anchor,t,r,i),ko(P.ranges[Z].head,t,r,i);continue}for(var $=0;$<P.changes.length;++$){var se=P.changes[$];if(r<se.from.line)se.from=Qe(se.from.line+i,se.from.ch),se.to=Qe(se.to.line+i,se.to.ch);else if(t<=se.to.line){z=!1;break}}z||(e.splice(0,h+1),h=0)}}function No(e,t){var r=t.from.line,i=t.to.line,h=t.text.length-(i-r)-1;Po(e.done,r,i,h),Po(e.undone,r,i,h)}function is(e,t,r,i){var h=t,P=t;return typeof t=="number"?P=et(e,rn(e,t)):h=dt(t),h==null?null:(i(P,h)&&e.cm&&hi(e.cm,h,r),P)}function rs(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}rs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,i=e+t;r<i;++r){var h=this.lines[r];this.height-=h.height,Ut(h),bi(h,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=this},iterN:function(e,t,r){for(var i=e+t;e<i;++e)if(r(this.lines[e]))return!0}};function as(e){this.children=e;for(var t=0,r=0,i=0;i<e.length;++i){var h=e[i];t+=h.chunkSize(),r+=h.height,h.parent=this}this.size=t,this.height=r,this.parent=null}as.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var i=this.children[r],h=i.chunkSize();if(e<h){var P=Math.min(t,h-e),z=i.height;if(i.removeInner(e,P),this.height-=z-i.height,h==P&&(this.children.splice(r--,1),i.parent=null),(t-=P)==0)break;e=0}else e-=h}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof rs))){var Z=[];this.collapse(Z),this.children=[new rs(Z)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var i=0;i<this.children.length;++i){var h=this.children[i],P=h.chunkSize();if(e<=P){if(h.insertInner(e,t,r),h.lines&&h.lines.length>50){for(var z=h.lines.length%25+25,Z=z;Z<h.lines.length;){var $=new rs(h.lines.slice(Z,Z+=25));h.height-=$.height,this.children.splice(++i,0,$),$.parent=this}h.lines=h.lines.slice(0,z),this.maybeSpill()}break}e-=P}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new as(t);if(e.parent){e.size-=r.size,e.height-=r.height;var h=he(e.parent.children,e);e.parent.children.splice(h+1,0,r)}else{var i=new as(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var i=0;i<this.children.length;++i){var h=this.children[i],P=h.chunkSize();if(e<P){var z=Math.min(t,P-e);if(h.iterN(e,z,r))return!0;if((t-=z)==0)break;e=0}else e-=P}}};var ss=function(e,t,r){if(r)for(var i in r)r.hasOwnProperty(i)&&(this[i]=r[i]);this.doc=e,this.node=t};ss.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,i=dt(r);if(i==null||!t)return;for(var h=0;h<t.length;++h)t[h]==this&&t.splice(h--,1);t.length||(r.widgets=null);var P=Zr(this);gt(r,Math.max(0,r.height-P)),e&&(Qi(e,function(){Uo(e,r,-P),hi(e,i,"widget")}),bi(e,"lineWidgetCleared",e,this,i))},ss.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,i=this.line;this.height=null;var h=Zr(this)-t;if(!h)return;Wi(this.doc,i)||gt(i,i.height+h),r&&Qi(r,function(){r.curOp.forceUpdate=!0,Uo(r,i,h),bi(r,"lineWidgetChanged",r,e,dt(i))})},fe(ss);function Uo(e,t,r){ai(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ya(e,r)}function El(e,t,r,i){var h=new ss(e,r,i),P=e.cm;return P&&h.noHScroll&&(P.display.alignWidgets=!0),is(e,t,"widget",function(z){var Z=z.widgets||(z.widgets=[]);if(h.insertAt==null?Z.push(h):Z.splice(Math.min(Z.length-1,Math.max(0,h.insertAt)),0,h),h.line=z,P&&!Wi(e,z)){var $=ai(z)<e.scrollTop;gt(z,z.height+Zr(h)),$&&Ya(P,h.height),P.curOp.forceUpdate=!0}return!0}),P&&bi(P,"lineWidgetAdded",P,h,typeof t=="number"?t:dt(t)),h}var Fo=0,aa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Fo};aa.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&Nr(e),oe(this,"clear")){var r=this.find();r&&bi(this,"clear",r.from,r.to)}for(var i=null,h=null,P=0;P<this.lines.length;++P){var z=this.lines[P],Z=ci(z.markedSpans,this);e&&!this.collapsed?hi(e,dt(z),"text"):e&&(Z.to!=null&&(h=dt(z)),Z.from!=null&&(i=dt(z))),z.markedSpans=hr(z.markedSpans,Z),Z.from==null&&this.collapsed&&!Wi(this.doc,z)&&e&>(z,_i(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var $=0;$<this.lines.length;++$){var se=Fi(this.lines[$]),we=Wn(se);we>e.display.maxLineLength&&(e.display.maxLine=se,e.display.maxLineLength=we,e.display.maxLineChanged=!0)}i!=null&&e&&this.collapsed&&$n(e,i,h+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ao(e.doc)),e&&bi(e,"markerCleared",e,this,i,h),t&&Gr(e),this.parent&&this.parent.clear()},aa.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,i,h=0;h<this.lines.length;++h){var P=this.lines[h],z=ci(P.markedSpans,this);if(z.from!=null&&(r=Qe(t?P:dt(P),z.from),e==-1))return r;if(z.to!=null&&(i=Qe(t?P:dt(P),z.to),e==1))return i}return r&&{from:r,to:i}},aa.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,i=this.doc.cm;if(!t||!i)return;Qi(i,function(){var h=t.line,P=dt(t.line),z=Ne(i,P);if(z&&(Cn(z),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!Wi(r.doc,h)&&r.height!=null){var Z=r.height;r.height=null;var $=Zr(r)-Z;$&>(h,h.height+$)}bi(i,"markerChanged",i,e)})},aa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||he(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},aa.prototype.detachLine=function(e){if(this.lines.splice(he(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},fe(aa);function Ia(e,t,r,i,h){if(i&&i.shared)return xl(e,t,r,i,h);if(e.cm&&!e.cm.curOp)return Ti(e.cm,Ia)(e,t,r,i,h);var P=new aa(e,h),z=St(t,r);if(i&&_(i,P,!1),z>0||z==0&&P.clearWhenEmpty!==!1)return P;if(P.replacedWith&&(P.collapsed=!0,P.widgetNode=E("span",[P.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||P.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(P.widgetNode.insertLeft=!0)),P.collapsed){if(Jr(e,t.line,t,r,P)||t.line!=r.line&&Jr(e,r.line,t,r,P))throw new Error("Inserting collapsed marker partially overlapping an existing one");ri()}P.addToHistory&&_o(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var Z=t.line,$=e.cm,se;if(e.iter(Z,r.line+1,function(Oe){$&&P.collapsed&&!$.options.lineWrapping&&Fi(Oe)==$.display.maxLine&&(se=!0),P.collapsed&&Z!=t.line&>(Oe,0),Br(Oe,new pn(P,Z==t.line?t.ch:null,Z==r.line?r.ch:null)),++Z}),P.collapsed&&e.iter(t.line,r.line+1,function(Oe){Wi(e,Oe)&>(Oe,0)}),P.clearOnEnter&&Je(P,"beforeCursorEnter",function(){return P.clear()}),P.readOnly&&(Dn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),P.collapsed&&(P.id=++Fo,P.atomic=!0),$){if(se&&($.curOp.updateMaxLine=!0),P.collapsed)$n($,t.line,r.line+1);else if(P.className||P.startStyle||P.endStyle||P.css||P.attributes||P.title)for(var we=t.line;we<=r.line;we++)hi($,we,"text");P.atomic&&Ao($.doc),bi($,"markerAdded",$,P)}return P}var os=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};os.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();bi(this,"clear")},os.prototype.find=function(e,t){return this.primary.find(e,t)},fe(os);function xl(e,t,r,i,h){i=_(i),i.shared=!1;var P=[Ia(e,t,r,i,h)],z=P[0],Z=i.widgetNode;return ra(e,function($){Z&&(i.widgetNode=Z.cloneNode(!0)),P.push(Ia($,at($,t),at($,r),i,h));for(var se=0;se<$.linked.length;++se)if($.linked[se].isParent)return;z=M(P)}),new os(P,z)}function Bo(e){return e.findMarks(Qe(e.first,0),e.clipPos(Qe(e.lastLine())),function(t){return t.parent})}function Tl(e,t){for(var r=0;r<t.length;r++){var i=t[r],h=i.find(),P=e.clipPos(h.from),z=e.clipPos(h.to);if(St(P,z)){var Z=Ia(e,P,z,i.primary,i.primary.type);i.markers.push(Z),Z.parent=i}}}function wl(e){for(var t=function(i){var h=e[i],P=[h.primary.doc];ra(h.primary.doc,function($){return P.push($)});for(var z=0;z<h.markers.length;z++){var Z=h.markers[z];he(P,Z.doc)==-1&&(Z.parent=null,h.markers.splice(z--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,rr=function(e,t,r,i,h){if(!(this instanceof rr))return new rr(e,t,r,i,h);r==null&&(r=0),as.call(this,[new rs([new mi("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var P=Qe(r,0);this.sel=Or(P),this.history=new Rs(null),this.id=++Sl,this.modeOption=t,this.lineSep=i,this.direction=h=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),eo(this,{from:P,to:P,text:e}),zi(this,Or(P),De)};rr.prototype=V(as.prototype,{constructor:rr,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,i=0;i<t.length;++i)r+=t[i].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=wt(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:wi(function(e){var t=Qe(this.first,0),r=this.first+this.size-1;La(this,{from:t,to:Qe(r,et(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ea(this.cm,0,0),zi(this,Or(t),De)}),replaceRange:function(e,t,r,i){t=at(this,t),r=r?at(this,r):t,Da(this,e,t,r,i)},getRange:function(e,t,r){var i=Tt(this,at(this,e),at(this,t));return r===!1?i:i.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Zt(this,e))return et(this,e)},getLineNumber:function(e){return dt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=et(this,e)),Fi(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return at(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:wi(function(e,t,r){wo(this,at(this,typeof e=="number"?Qe(e,t||0):e),null,r)}),setSelection:wi(function(e,t,r){wo(this,at(this,e),at(this,t||e),r)}),extendSelection:wi(function(e,t,r){Ds(this,at(this,e),t&&at(this,t),r)}),extendSelections:wi(function(e,t){To(this,rt(this,e),t)}),extendSelectionsBy:wi(function(e,t){var r=F(this.sel.ranges,e);To(this,rt(this,r),t)}),setSelections:wi(function(e,t,r){if(!e.length)return;for(var i=[],h=0;h<e.length;h++)i[h]=new zn(at(this,e[h].anchor),at(this,e[h].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),zi(this,yr(this.cm,i,t),r)}),addSelection:wi(function(e,t,r){var i=this.sel.ranges.slice(0);i.push(new zn(at(this,e),at(this,t||e))),zi(this,yr(this.cm,i,i.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,i=0;i<t.length;i++){var h=Tt(this,t[i].from(),t[i].to());r=r?r.concat(h):h}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,i=0;i<r.length;i++){var h=Tt(this,r[i].from(),r[i].to());e!==!1&&(h=h.join(e||this.lineSeparator())),t[i]=h}return t},replaceSelection:function(e,t,r){for(var i=[],h=0;h<this.sel.ranges.length;h++)i[h]=e;this.replaceSelections(i,t,r||"+input")},replaceSelections:wi(function(e,t,r){for(var i=[],h=this.sel,P=0;P<h.ranges.length;P++){var z=h.ranges[P];i[P]={from:z.from(),to:z.to(),text:this.splitLines(e[P]),origin:r}}for(var Z=t&&t!="end"&&Os(this,i,t),$=i.length-1;$>=0;$--)La(this,i[$]);Z?So(this,Z):this.cm&&$r(this.cm)}),undo:wi(function(){ks(this,"undo")}),redo:wi(function(){ks(this,"redo")}),undoSelection:wi(function(){ks(this,"undo",!0)}),redoSelection:wi(function(){ks(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,i=0;i<e.done.length;i++)e.done[i].ranges||++t;for(var h=0;h<e.undone.length;h++)e.undone[h].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Rs(this.history.maxGeneration),ra(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Oa(this.history.done),undone:Oa(this.history.undone)}},setHistory:function(e){var t=this.history=new Rs(this.history.maxGeneration);t.done=Oa(e.done.slice(0),null,!0),t.undone=Oa(e.undone.slice(0),null,!0)},setGutterMarker:wi(function(e,t,r){return is(this,e,"gutter",function(i){var h=i.gutterMarkers||(i.gutterMarkers={});return h[t]=r,!r&&de(h)&&(i.gutterMarkers=null),!0})}),clearGutter:wi(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&is(t,r,"gutter",function(){return r.gutterMarkers[e]=null,de(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Zt(this,e))return null;if(t=e,e=et(this,e),!e)return null}else if(t=dt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:wi(function(e,t,r){return is(this,e,t=="gutter"?"gutter":"class",function(i){var h=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!i[h])i[h]=r;else{if(D(r).test(i[h]))return!1;i[h]+=" "+r}return!0})}),removeLineClass:wi(function(e,t,r){return is(this,e,t=="gutter"?"gutter":"class",function(i){var h=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",P=i[h];if(P)if(r==null)i[h]=null;else{var z=P.match(D(r));if(!z)return!1;var Z=z.index+z[0].length;i[h]=P.slice(0,z.index)+(!z.index||Z==P.length?"":" ")+P.slice(Z)||null}else return!1;return!0})}),addLineWidget:wi(function(e,t,r){return El(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ia(this,at(this,e),at(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=at(this,e),Ia(this,e,e,r,"bookmark")},findMarksAt:function(e){e=at(this,e);var t=[],r=et(this,e.line).markedSpans;if(r)for(var i=0;i<r.length;++i){var h=r[i];(h.from==null||h.from<=e.ch)&&(h.to==null||h.to>=e.ch)&&t.push(h.marker.parent||h.marker)}return t},findMarks:function(e,t,r){e=at(this,e),t=at(this,t);var i=[],h=e.line;return this.iter(e.line,t.line+1,function(P){var z=P.markedSpans;if(z)for(var Z=0;Z<z.length;Z++){var $=z[Z];!($.to!=null&&h==e.line&&e.ch>=$.to||$.from==null&&h!=e.line||$.from!=null&&h==t.line&&$.from>=t.ch)&&(!r||r($.marker))&&i.push($.marker.parent||$.marker)}++h}),i},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var i=0;i<r.length;++i)r[i].from!=null&&e.push(r[i].marker)}),e},posFromIndex:function(e){var t,r=this.first,i=this.lineSeparator().length;return this.iter(function(h){var P=h.text.length+i;if(P>e)return t=e,!0;e-=P,++r}),at(this,Qe(r,t))},indexFromPos:function(e){e=at(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(i){t+=i.text.length+r}),t},copy:function(e){var t=new rr(wt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var i=new rr(wt(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:e.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(i,Bo(this)),i},unlinkDoc:function(e){if(e instanceof fi&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),wl(Bo(this));break}if(e.history==this.history){var i=[e.id];ra(e,function(h){return i.push(h.id)},!0),e.history=new Rs(null),e.history.done=Oa(this.history.done,i),e.history.undone=Oa(this.history.undone,i)}},iterLinkedDocs:function(e){ra(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):bt(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:wi(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fl(this.cm)})}),rr.prototype.eachLine=rr.prototype.iter;var jo=0;function Cl(e){var t=this;if(Ho(t),q(t,e)||Cr(t.display,e))return;ie(e),K&&(jo=+new Date);var r=Li(t,e,!0),i=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(i&&i.length&&window.FileReader&&window.File)for(var h=i.length,P=Array(h),z=0,Z=function(){++z==h&&Ti(t,function(){r=at(t.doc,r);var He={from:r,to:r,text:t.doc.splitLines(P.filter(function(nt){return nt!=null}).join(t.doc.lineSeparator())),origin:"paste"};La(t.doc,He),So(t.doc,Or(at(t.doc,r),at(t.doc,Rr(He))))})()},$=function(He,nt){if(t.options.allowDropFileTypes&&he(t.options.allowDropFileTypes,He.type)==-1){Z();return}var ot=new FileReader;ot.onerror=function(){return Z()},ot.onload=function(){var _t=ot.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(_t)){Z();return}P[nt]=_t,Z()},ot.readAsText(He)},se=0;se<i.length;se++)$(i[se],se);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var we=e.dataTransfer.getData("Text");if(we){var Oe;if(t.state.draggingText&&!t.state.draggingText.copy&&(Oe=t.listSelections()),Is(t.doc,Or(r,r)),Oe)for(var ze=0;ze<Oe.length;++ze)Da(t.doc,"",Oe[ze].anchor,Oe[ze].head,"drag");t.replaceSelection(we,"around","paste"),t.display.input.focus()}}catch(He){}}}function Al(e,t){if(K&&(!e.state.draggingText||+new Date-jo<100)){ve(t);return}if(q(e,t)||Cr(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!g){var r=d("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",m&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),m&&r.parentNode.removeChild(r)}}function Ol(e,t){var r=Li(e,t);if(!r)return;var i=document.createDocumentFragment();Mr(e,r,i),e.display.dragCursor||(e.display.dragCursor=d("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),x(e.display.dragCursor,i)}function Ho(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Wo(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],i=0;i<t.length;i++){var h=t[i].CodeMirror;h&&r.push(h)}r.length&&r[0].operation(function(){for(var P=0;P<r.length;P++)e(r[P])})}var Ko=!1;function Rl(){if(Ko)return;Ll(),Ko=!0}function Ll(){var e;Je(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Wo(Dl)},100))}),Je(window,"blur",function(){return Wo(qr)})}function Dl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var sa={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"},ls=0;ls<10;ls++)sa[ls+48]=sa[ls+96]=String(ls);for(var Ps=65;Ps<=90;Ps++)sa[Ps]=String.fromCharCode(Ps);for(var us=1;us<=12;us++)sa[us+111]=sa[us+63235]="F"+us;var Xr={};Xr.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"},Xr.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"},Xr.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"},Xr.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"]},Xr.default=s?Xr.macDefault:Xr.pcDefault;function Il(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,i,h,P,z=0;z<t.length-1;z++){var Z=t[z];if(/^(cmd|meta|m)$/i.test(Z))P=!0;else if(/^a(lt)?$/i.test(Z))r=!0;else if(/^(c|ctrl|control)$/i.test(Z))i=!0;else if(/^s(hift)?$/i.test(Z))h=!0;else throw new Error("Unrecognized modifier name: "+Z)}return r&&(e="Alt-"+e),i&&(e="Ctrl-"+e),P&&(e="Cmd-"+e),h&&(e="Shift-"+e),e}function Ml(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(i=="..."){delete e[r];continue}for(var h=F(r.split(" "),Il),P=0;P<h.length;P++){var z=void 0,Z=void 0;P==h.length-1?(Z=h.join(" "),z=i):(Z=h.slice(0,P+1).join(" "),z="...");var $=t[Z];if(!$)t[Z]=z;else if($!=z)throw new Error("Inconsistent bindings for "+Z)}delete e[r]}for(var se in t)e[se]=t[se];return e}function Ma(e,t,r,i){t=Ns(t);var h=t.call?t.call(e,i):t[e];if(h===!1)return"nothing";if(h==="...")return"multi";if(h!=null&&r(h))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ma(e,t.fallthrough,r,i);for(var P=0;P<t.fallthrough.length;P++){var z=Ma(e,t.fallthrough[P],r,i);if(z)return z}}}function Go(e){var t=typeof e=="string"?e:sa[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function zo(e,t,r){var i=e;return t.altKey&&i!="Alt"&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&i!="Ctrl"&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&i!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&i!="Shift"&&(e="Shift-"+e),e}function Vo(e,t){if(m&&e.keyCode==34&&e.char)return!1;var r=sa[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),zo(r,e,t))}function Ns(e){return typeof e=="string"?Xr[e]:e}function ka(e,t){for(var r=e.doc.sel.ranges,i=[],h=0;h<r.length;h++){for(var P=t(r[h]);i.length&&St(P.from,M(i).to)<=0;){var z=i.pop();if(St(z.from,P.from)<0){P.from=z.from;break}}i.push(P)}Qi(e,function(){for(var Z=i.length-1;Z>=0;Z--)Da(e.doc,"",i[Z].from,i[Z].to,"+delete");$r(e)})}function ro(e,t,r){var i=Fe(e.text,t+r,r);return i<0||i>e.text.length?null:i}function ao(e,t,r){var i=ro(e,t.ch,r);return i==null?null:new Qe(t.line,i,r<0?"after":"before")}function so(e,t,r,i,h){if(e){t.doc.direction=="rtl"&&(h=-h);var P=Et(r,t.doc.direction);if(P){var z=h<0?M(P):P[0],Z=h<0==(z.level==1),$=Z?"after":"before",se;if(z.level>0||t.doc.direction=="rtl"){var we=Ie(t,r);se=h<0?r.text.length-1:0;var Oe=We(t,we,se).top;se=$e(function(ze){return We(t,we,ze).top==Oe},h<0==(z.level==1)?z.from:z.to-1,se),$=="before"&&(se=ro(r,se,1))}else se=h<0?z.to:z.from;return new Qe(i,se,$)}}return new Qe(i,h<0?r.text.length:0,h<0?"before":"after")}function kl(e,t,r,i){var h=Et(t,e.doc.direction);if(!h)return ao(t,r,i);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var P=ut(h,r.ch,r.sticky),z=h[P];if(e.doc.direction=="ltr"&&z.level%2==0&&(i>0?z.to>r.ch:z.from<r.ch))return ao(t,r,i);var Z=function(Mt,Wt){return ro(t,Mt instanceof Qe?Mt.ch:Mt,Wt)},$,se=function(Mt){return e.options.lineWrapping?($=$||Ie(e,t),Jt(e,t,$,Mt)):{begin:0,end:t.text.length}},we=se(r.sticky=="before"?Z(r,-1):r.ch);if(e.doc.direction=="rtl"||z.level==1){var Oe=z.level==1==i<0,ze=Z(r,Oe?1:-1);if(ze!=null&&(Oe?ze<=z.to&&ze<=we.end:ze>=z.from&&ze>=we.begin)){var He=Oe?"before":"after";return new Qe(r.line,ze,He)}}var nt=function(Mt,Wt,kt){for(var Xt=function(ii,Ni){return Ni?new Qe(r.line,Z(ii,1),"before"):new Qe(r.line,ii,"after")};Mt>=0&&Mt<h.length;Mt+=Wt){var fn=h[Mt],nn=Wt>0==(fn.level!=1),Rn=nn?kt.begin:Z(kt.end,-1);if(fn.from<=Rn&&Rn<fn.to)return Xt(Rn,nn);if(Rn=nn?fn.from:Z(fn.to,-1),kt.begin<=Rn&&Rn<kt.end)return Xt(Rn,nn)}},ot=nt(P+i,i,we);if(ot)return ot;var _t=i>0?we.end:Z(we.begin,-1);return _t!=null&&!(i>0&&_t==t.text.length)&&(ot=nt(i>0?0:h.length-1,i,se(_t)),ot)?ot:null}var cs={selectAll:Lo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),De)},killLine:function(e){return ka(e,function(t){if(t.empty()){var r=et(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Qe(t.head.line+1,0)}:{from:t.head,to:Qe(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ka(e,function(t){return{from:Qe(t.from().line,0),to:at(e.doc,Qe(t.to().line+1,0))}})},delLineLeft:function(e){return ka(e,function(t){return{from:Qe(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return ka(e,function(t){var r=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:r},"div");return{from:i,to:t.from()}})},delWrappedLineRight:function(e){return ka(e,function(t){var r=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:i}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Qe(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Qe(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Xo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Yo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Pl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Be)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Be)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:r},"div");return i.ch<e.getLine(i.line).search(/\S/)?Yo(e,t.head):i},Be)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),i=e.options.tabSize,h=0;h<r.length;h++){var P=r[h].from(),z=J(e.getLine(P.line),P.ch,i);t.push(Y(i-z%i))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qi(e,function(){for(var t=e.listSelections(),r=[],i=0;i<t.length;i++){if(!t[i].empty())continue;var h=t[i].head,P=et(e.doc,h.line).text;if(P){if(h.ch==P.length&&(h=new Qe(h.line,h.ch-1)),h.ch>0)h=new Qe(h.line,h.ch+1),e.replaceRange(P.charAt(h.ch-1)+P.charAt(h.ch-2),Qe(h.line,h.ch-2),h,"+transpose");else if(h.line>e.doc.first){var z=et(e.doc,h.line-1).text;z&&(h=new Qe(h.line,1),e.replaceRange(P.charAt(0)+e.doc.lineSeparator()+z.charAt(z.length-1),Qe(h.line-1,z.length-1),h,"+transpose"))}}r.push(new zn(h,h))}e.setSelections(r)})},newlineAndIndent:function(e){return Qi(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var i=0;i<t.length;i++)e.indentLine(t[i].from().line,null,!0);$r(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xo(e,t){var r=et(e.doc,t),i=Fi(r);return i!=r&&(t=dt(i)),so(!0,e,i,t,1)}function Pl(e,t){var r=et(e.doc,t),i=ca(r);return i!=r&&(t=dt(i)),so(!0,e,r,t,-1)}function Yo(e,t){var r=Xo(e,t.line),i=et(e.doc,r.line),h=Et(i,e.doc.direction);if(!h||h[0].level==0){var P=Math.max(r.ch,i.text.search(/\S/)),z=t.line==r.line&&t.ch<=P&&t.ch;return Qe(r.line,z?0:P,r.sticky)}return r}function Us(e,t,r){if(typeof t=="string"&&(t=cs[t],!t))return!1;e.display.input.ensurePolled();var i=e.display.shift,h=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),h=t(e)!=Ke}finally{e.display.shift=i,e.state.suppressEdits=!1}return h}function Nl(e,t,r){for(var i=0;i<e.state.keyMaps.length;i++){var h=Ma(t,e.state.keyMaps[i],r,e);if(h)return h}return e.options.extraKeys&&Ma(t,e.options.extraKeys,r,e)||Ma(t,e.options.keyMap,r,e)}var Ul=new ne;function ds(e,t,r,i){var h=e.state.keySeq;if(h){if(Go(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ul.set(50,function(){e.state.keySeq==h&&(e.state.keySeq=null,e.display.input.reset())}),Jo(e,h+" "+t,r,i))return!0}return Jo(e,t,r,i)}function Jo(e,t,r,i){var h=Nl(e,t,i);return h=="multi"&&(e.state.keySeq=t),h=="handled"&&bi(e,"keyHandled",e,t,r),(h=="handled"||h=="multi")&&(ie(r),Di(e)),!!h}function Qo(e,t){var r=Vo(t,!0);return r?t.shiftKey&&!e.state.keySeq?ds(e,"Shift-"+r,t,function(i){return Us(e,i,!0)})||ds(e,r,t,function(i){if(typeof i=="string"?/^go[A-Z]/.test(i):i.motion)return Us(e,i)}):ds(e,r,t,function(i){return Us(e,i)}):!1}function Fl(e,t,r){return ds(e,"'"+r+"'",t,function(i){return Us(e,i,!0)})}var oo=null;function Zo(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=T(),q(t,e))return;K&&W<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var i=Qo(t,e);m&&(oo=i?r:null,!i&&r==88&&!vn&&(s?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),k&&!s&&!i&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Bl(t)}function Bl(e){var t=e.display.lineDiv;B(t,"CodeMirror-crosshair");function r(i){(i.keyCode==18||!i.altKey)&&(O(t,"CodeMirror-crosshair"),Bt(document,"keyup",r),Bt(document,"mouseover",r))}Je(document,"keyup",r),Je(document,"mouseover",r)}function qo(e){e.keyCode==16&&(this.doc.sel.shift=!1),q(this,e)}function $o(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Cr(t.display,e)||q(t,e)||e.ctrlKey&&!e.altKey||s&&e.metaKey)return;var r=e.keyCode,i=e.charCode;if(m&&r==oo){oo=null,ie(e);return}if(m&&(!e.which||e.which<10)&&Qo(t,e))return;var h=String.fromCharCode(i==null?r:i);if(h=="\b")return;if(Fl(t,e,h))return;t.display.input.onKeyPress(e)}var jl=400,lo=function(e,t,r){this.time=e,this.pos=t,this.button=r};lo.prototype.compare=function(e,t,r){return this.time+jl>e&&St(t,this.pos)==0&&r==this.button};var hs,fs;function Hl(e,t){var r=+new Date;return fs&&fs.compare(r,e,t)?(hs=fs=null,"triple"):hs&&hs.compare(r,e,t)?(fs=new lo(r,e,t),hs=null,"double"):(hs=new lo(r,e,t),fs=null,"single")}function el(e){var t=this,r=t.display;if(q(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Cr(r,e)){n||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(uo(t,e))return;var i=Li(t,e),h=Re(e),P=i?Hl(i,h):"single";if(window.focus(),h==1&&t.state.selectingText&&t.state.selectingText(e),i&&Wl(t,h,i,P,e))return;h==1?i?Gl(t,i,P,e):Ae(e)==r.scroller&&ie(e):h==2?(i&&Ds(t.doc,i),setTimeout(function(){return r.input.focus()},20)):h==3&&(L?t.display.input.onContextMenu(e):za(t))}function Wl(e,t,r,i,h){var P="Click";return i=="double"?P="Double"+P:i=="triple"&&(P="Triple"+P),P=(t==1?"Left":t==2?"Middle":"Right")+P,ds(e,zo(P,h),h,function(z){if(typeof z=="string"&&(z=cs[z]),!z)return!1;var Z=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),Z=z(e,r)!=Ke}finally{e.state.suppressEdits=!1}return Z})}function Kl(e,t,r){var i=e.getOption("configureMouse"),h=i?i(e,t,r):{};if(h.unit==null){var P=a?r.shiftKey&&r.metaKey:r.altKey;h.unit=P?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(h.extend==null||e.doc.extend)&&(h.extend=e.doc.extend||r.shiftKey),h.addNew==null&&(h.addNew=s?r.metaKey:r.ctrlKey),h.moveOnDrag==null&&(h.moveOnDrag=!(s?r.altKey:r.ctrlKey)),h}function Gl(e,t,r,i){K?setTimeout(U(_s,e),0):e.curOp.focus=T();var h=Kl(e,r,i),P=e.doc.sel,z;e.options.dragDrop&&Pe&&!e.isReadOnly()&&r=="single"&&(z=P.contains(t))>-1&&(St((z=P.ranges[z]).from(),t)<0||t.xRel>0)&&(St(z.to(),t)>0||t.xRel<0)?zl(e,i,t,h):Vl(e,i,t,h)}function zl(e,t,r,i){var h=e.display,P=!1,z=Ti(e,function(se){n&&(h.scroller.draggable=!1),e.state.draggingText=!1,Bt(h.wrapper.ownerDocument,"mouseup",z),Bt(h.wrapper.ownerDocument,"mousemove",Z),Bt(h.scroller,"dragstart",$),Bt(h.scroller,"drop",z),P||(ie(se),i.addNew||Ds(e.doc,r,null,null,i.extend),n&&!g||K&&W==9?setTimeout(function(){h.wrapper.ownerDocument.body.focus({preventScroll:!0}),h.input.focus()},20):h.input.focus())}),Z=function(se){P=P||Math.abs(t.clientX-se.clientX)+Math.abs(t.clientY-se.clientY)>=10},$=function(){return P=!0};n&&(h.scroller.draggable=!0),e.state.draggingText=z,z.copy=!i.moveOnDrag,h.scroller.dragDrop&&h.scroller.dragDrop(),Je(h.wrapper.ownerDocument,"mouseup",z),Je(h.wrapper.ownerDocument,"mousemove",Z),Je(h.scroller,"dragstart",$),Je(h.scroller,"drop",z),za(e),setTimeout(function(){return h.input.focus()},20)}function tl(e,t,r){if(r=="char")return new zn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new zn(Qe(t.line,0),at(e.doc,Qe(t.line+1,0)));var i=r(e,t);return new zn(i.from,i.to)}function Vl(e,t,r,i){var h=e.display,P=e.doc;ie(t);var z,Z,$=P.sel,se=$.ranges;if(i.addNew&&!i.extend?(Z=P.sel.contains(r),Z>-1?z=se[Z]:z=new zn(r,r)):(z=P.sel.primary(),Z=P.sel.primIndex),i.unit=="rectangle")i.addNew||(z=new zn(r,r)),r=Li(e,t,!0,!0),Z=-1;else{var we=tl(e,r,i.unit);i.extend?z=no(z,we.anchor,we.head,i.extend):z=we}i.addNew?Z==-1?(Z=se.length,zi(P,yr(e,se.concat([z]),Z),{scroll:!1,origin:"*mouse"})):se.length>1&&se[Z].empty()&&i.unit=="char"&&!i.extend?(zi(P,yr(e,se.slice(0,Z).concat(se.slice(Z+1)),0),{scroll:!1,origin:"*mouse"}),$=P.sel):io(P,Z,z,je):(Z=0,zi(P,new qi([z],0),je),$=P.sel);var Oe=r;function ze(kt){if(St(Oe,kt)==0)return;if(Oe=kt,i.unit=="rectangle"){for(var Xt=[],fn=e.options.tabSize,nn=J(et(P,r.line).text,r.ch,fn),Rn=J(et(P,kt.line).text,kt.ch,fn),ii=Math.min(nn,Rn),Ni=Math.max(nn,Rn),gi=Math.min(r.line,kt.line),dr=Math.min(e.lastLine(),Math.max(r.line,kt.line));gi<=dr;gi++){var ar=et(P,gi).text,Ci=Ge(ar,ii,fn);ii==Ni?Xt.push(new zn(Qe(gi,Ci),Qe(gi,Ci))):ar.length>Ci&&Xt.push(new zn(Qe(gi,Ci),Qe(gi,Ge(ar,Ni,fn))))}Xt.length||Xt.push(new zn(r,r)),zi(P,yr(e,$.ranges.slice(0,Z).concat(Xt),Z),{origin:"*mouse",scroll:!1}),e.scrollIntoView(kt)}else{var sr=z,Hi=tl(e,kt,i.unit),ki=sr.anchor,Ai;St(Hi.anchor,ki)>0?(Ai=Hi.head,ki=en(sr.from(),Hi.anchor)):(Ai=Hi.anchor,ki=jt(sr.to(),Hi.head));var Ei=$.ranges.slice(0);Ei[Z]=Xl(e,new zn(at(P,ki),Ai)),zi(P,yr(e,Ei,Z),je)}}var He=h.wrapper.getBoundingClientRect(),nt=0;function ot(kt){var Xt=++nt,fn=Li(e,kt,!0,i.unit=="rectangle");if(!fn)return;if(St(fn,Oe)!=0){e.curOp.focus=T(),ze(fn);var nn=_a(h,P);(fn.line>=nn.to||fn.line<nn.from)&&setTimeout(Ti(e,function(){nt==Xt&&ot(kt)}),150)}else{var Rn=kt.clientY<He.top?-20:kt.clientY>He.bottom?20:0;Rn&&setTimeout(Ti(e,function(){if(nt!=Xt)return;h.scroller.scrollTop+=Rn,ot(kt)}),50)}}function _t(kt){e.state.selectingText=!1,nt=Infinity,kt&&(ie(kt),h.input.focus()),Bt(h.wrapper.ownerDocument,"mousemove",Mt),Bt(h.wrapper.ownerDocument,"mouseup",Wt),P.history.lastSelOrigin=null}var Mt=Ti(e,function(kt){kt.buttons===0||!Re(kt)?_t(kt):ot(kt)}),Wt=Ti(e,_t);e.state.selectingText=Wt,Je(h.wrapper.ownerDocument,"mousemove",Mt),Je(h.wrapper.ownerDocument,"mouseup",Wt)}function Xl(e,t){var r=t.anchor,i=t.head,h=et(e.doc,r.line);if(St(r,i)==0&&r.sticky==i.sticky)return t;var P=Et(h);if(!P)return t;var z=ut(P,r.ch,r.sticky),Z=P[z];if(Z.from!=r.ch&&Z.to!=r.ch)return t;var $=z+(Z.from==r.ch==(Z.level!=1)?0:1);if($==0||$==P.length)return t;var se;if(i.line!=r.line)se=(i.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var we=ut(P,i.ch,i.sticky),Oe=we-z||(i.ch-r.ch)*(Z.level==1?-1:1);we==$-1||we==$?se=Oe<0:se=Oe>0}var ze=P[$+(se?-1:0)],He=se==(ze.level==1),nt=He?ze.from:ze.to,ot=He?"after":"before";return r.ch==nt&&r.sticky==ot?t:new zn(new Qe(r.line,nt,ot),i)}function nl(e,t,r,i){var h,P;if(t.touches)h=t.touches[0].clientX,P=t.touches[0].clientY;else try{h=t.clientX,P=t.clientY}catch(ze){return!1}if(h>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&ie(t);var z=e.display,Z=z.lineDiv.getBoundingClientRect();if(P>Z.bottom||!oe(e,r))return me(t);P-=Z.top-z.viewOffset;for(var $=0;$<e.display.gutterSpecs.length;++$){var se=z.gutters.childNodes[$];if(se&&se.getBoundingClientRect().right>=h){var we=Nt(e.doc,P),Oe=e.display.gutterSpecs[$];return ce(e,r,e,we,Oe.className,t),me(t)}}}function uo(e,t){return nl(e,t,"gutterClick",!0)}function il(e,t){if(Cr(e.display,t)||Yl(e,t))return;if(q(e,t,"contextmenu"))return;L||e.display.input.onContextMenu(t)}function Yl(e,t){return oe(e,"gutterContextMenu")?nl(e,t,"gutterContextMenu",!1):!1}function rl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Tn(e)}var Pa={toString:function(){return"CodeMirror.Init"}},al={},Fs={};function Jl(e){var t=e.optionHandlers;function r(i,h,P,z){e.defaults[i]=h,P&&(t[i]=z?function(Z,$,se){se!=Pa&&P(Z,$,se)}:P)}e.defineOption=r,e.Init=Pa,r("value","",function(i,h){return i.setValue(h)},!0),r("mode",null,function(i,h){i.doc.modeOption=h,Vr(i)},!0),r("indentUnit",2,Vr,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(i){ts(i),Tn(i),$n(i)},!0),r("lineSeparator",null,function(i,h){if(i.doc.lineSep=h,!h)return;var P=[],z=i.doc.first;i.doc.iter(function($){for(var se=0;;){var we=$.text.indexOf(h,se);if(we==-1)break;se=we+h.length,P.push(Qe(z,we))}z++});for(var Z=P.length-1;Z>=0;Z--)Da(i.doc,h,P[Z],Qe(P[Z].line,P[Z].ch+h.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(i,h,P){i.state.specialChars=new RegExp(h.source+(h.test(" ")?"":"| "),"g"),P!=Pa&&i.refresh()}),r("specialCharPlaceholder",Xn,function(i){return i.refresh()},!0),r("electricChars",!0),r("inputStyle",o?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(i,h){return i.getInputField().spellcheck=h},!0),r("autocorrect",!1,function(i,h){return i.getInputField().autocorrect=h},!0),r("autocapitalize",!1,function(i,h){return i.getInputField().autocapitalize=h},!0),r("rtlMoveVisually",!A),r("wholeLineUpdateBefore",!0),r("theme","default",function(i){rl(i),Ar(i)},!0),r("keyMap","default",function(i,h,P){var z=Ns(h),Z=P!=Pa&&Ns(P);Z&&Z.detach&&Z.detach(i,z),z.attach&&z.attach(i,Z||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Zl,!0),r("gutters",[],function(i,h){i.display.gutterSpecs=Zi(h,i.options.lineNumbers),Ar(i)},!0),r("fixedGutter",!0,function(i,h){i.display.gutters.style.left=h?Gi(i.display)+"px":"0",i.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(i){return Kr(i)},!0),r("scrollbarStyle","native",function(i){Ta(i),Kr(i),i.display.scrollbars.setScrollTop(i.doc.scrollTop),i.display.scrollbars.setScrollLeft(i.doc.scrollLeft)},!0),r("lineNumbers",!1,function(i,h){i.display.gutterSpecs=Zi(i.options.gutters,h),Ar(i)},!0),r("firstLineNumber",1,Ar,!0),r("lineNumberFormatter",function(i){return i},Ar,!0),r("showCursorWhenSelecting",!1,Zn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(i,h){h=="nocursor"&&(qr(i),i.display.input.blur()),i.display.input.readOnlyChanged(h)}),r("screenReaderLabel",null,function(i,h){h=h===""?null:h,i.display.input.screenReaderLabelChanged(h)}),r("disableInput",!1,function(i,h){h||i.display.input.reset()},!0),r("dragDrop",!0,Ql),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Zn,!0),r("singleCursorHeightPerLine",!0,Zn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,ts,!0),r("addModeClass",!1,ts,!0),r("pollInterval",100),r("undoDepth",200,function(i,h){return i.doc.history.undoDepth=h}),r("historyEventDelay",1250),r("viewportMargin",10,function(i){return i.refresh()},!0),r("maxHighlightLength",1e4,ts,!0),r("moveInputWithCursor",!0,function(i,h){h||i.display.input.resetPosition()}),r("tabindex",null,function(i,h){return i.display.input.getField().tabIndex=h||""}),r("autofocus",null),r("direction","ltr",function(i,h){return i.doc.setDirection(h)},!0),r("phrases",null)}function Ql(e,t,r){var i=r&&r!=Pa;if(!t!=!i){var h=e.display.dragFunctions,P=t?Je:Bt;P(e.display.scroller,"dragstart",h.start),P(e.display.scroller,"dragenter",h.enter),P(e.display.scroller,"dragover",h.over),P(e.display.scroller,"dragleave",h.leave),P(e.display.scroller,"drop",h.drop)}}function Zl(e){e.options.lineWrapping?(B(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(O(e.display.wrapper,"CodeMirror-wrap"),vi(e)),Ji(e),$n(e),Tn(e),setTimeout(function(){return Kr(e)},100)}function fi(e,t){var r=this;if(!(this instanceof fi))return new fi(e,t);this.options=t=t?_(t):{},_(al,t,!1);var i=t.value;typeof i=="string"?i=new rr(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var h=new fi.inputStyles[t.inputStyle](this),P=this.display=new ga(e,i,h,t);P.wrapper.CodeMirror=this,rl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ta(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 ne,keySeq:null,specialChars:null},t.autofocus&&!o&&P.input.focus(),K&&W<11&&setTimeout(function(){return r.display.input.reset(!0)},20),ql(this),Rl(),Nr(this),this.curOp.forceUpdate=!0,vo(this,i),t.autofocus&&!o||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&kr(r)},20):qr(this);for(var z in Fs)Fs.hasOwnProperty(z)&&Fs[z](this,t[z],Pa);Ii(this),t.finishInit&&t.finishInit(this);for(var Z=0;Z<co.length;++Z)co[Z](this);Gr(this),n&&t.lineWrapping&&getComputedStyle(P.lineDiv).textRendering=="optimizelegibility"&&(P.lineDiv.style.textRendering="auto")}fi.defaults=al,fi.optionHandlers=Fs;function ql(e){var t=e.display;Je(t.scroller,"mousedown",Ti(e,el)),K&&W<11?Je(t.scroller,"dblclick",Ti(e,function($){if(q(e,$))return;var se=Li(e,$);if(!se||uo(e,$)||Cr(e.display,$))return;ie($);var we=e.findWordAt(se);Ds(e.doc,we.anchor,we.head)})):Je(t.scroller,"dblclick",function($){return q(e,$)||ie($)}),Je(t.scroller,"contextmenu",function($){return il(e,$)}),Je(t.input.getField(),"contextmenu",function($){t.scroller.contains($.target)||il(e,$)});var r,i={end:0};function h(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),i=t.activeTouch,i.end=+new Date)}function P($){if($.touches.length!=1)return!1;var se=$.touches[0];return se.radiusX<=1&&se.radiusY<=1}function z($,se){if(se.left==null)return!0;var we=se.left-$.left,Oe=se.top-$.top;return we*we+Oe*Oe>20*20}Je(t.scroller,"touchstart",function($){if(!q(e,$)&&!P($)&&!uo(e,$)){t.input.ensurePolled(),clearTimeout(r);var se=+new Date;t.activeTouch={start:se,moved:!1,prev:se-i.end<=300?i:null},$.touches.length==1&&(t.activeTouch.left=$.touches[0].pageX,t.activeTouch.top=$.touches[0].pageY)}}),Je(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Je(t.scroller,"touchend",function($){var se=t.activeTouch;if(se&&!Cr(t,$)&&se.left!=null&&!se.moved&&new Date-se.start<300){var we=e.coordsChar(t.activeTouch,"page"),Oe;!se.prev||z(se,se.prev)?Oe=new zn(we,we):!se.prev.prev||z(se,se.prev.prev)?Oe=e.findWordAt(we):Oe=new zn(Qe(we.line,0),at(e.doc,Qe(we.line+1,0))),e.setSelection(Oe.anchor,Oe.head),e.focus(),ie($)}h()}),Je(t.scroller,"touchcancel",h),Je(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ta(e,t.scroller.scrollTop),gr(e,t.scroller.scrollLeft,!0),ce(e,"scroll",e))}),Je(t.scroller,"mousewheel",function($){return $a(e,$)}),Je(t.scroller,"DOMMouseScroll",function($){return $a(e,$)}),Je(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function($){q(e,$)||ve($)},over:function($){q(e,$)||(Ol(e,$),ve($))},start:function($){return Al(e,$)},drop:Ti(e,Cl),leave:function($){q(e,$)||Ho(e)}};var Z=t.input.getField();Je(Z,"keyup",function($){return qo.call(e,$)}),Je(Z,"keydown",Ti(e,Zo)),Je(Z,"keypress",Ti(e,$o)),Je(Z,"focus",function($){return kr(e,$)}),Je(Z,"blur",function($){return qr(e,$)})}var co=[];fi.defineInitHook=function(e){return co.push(e)};function ps(e,t,r,i){var h=e.doc,P;r==null&&(r="add"),r=="smart"&&(h.mode.indent?P=Ht(e,t).state:r="prev");var z=e.options.tabSize,Z=et(h,t),$=J(Z.text,null,z);Z.stateAfter&&(Z.stateAfter=null);var se=Z.text.match(/^\s*/)[0],we;if(!i&&!/\S/.test(Z.text))we=0,r="not";else if(r=="smart"&&(we=h.mode.indent(P,Z.text.slice(se.length),Z.text),we==Ke||we>150)){if(!i)return;r="prev"}r=="prev"?t>h.first?we=J(et(h,t-1).text,null,z):we=0:r=="add"?we=$+e.options.indentUnit:r=="subtract"?we=$-e.options.indentUnit:typeof r=="number"&&(we=$+r),we=Math.max(0,we);var Oe="",ze=0;if(e.options.indentWithTabs)for(var He=Math.floor(we/z);He;--He)ze+=z,Oe+=" ";if(ze<we&&(Oe+=Y(we-ze)),Oe!=se)return Da(h,Oe,Qe(t,0),Qe(t,se.length),"+input"),Z.stateAfter=null,!0;for(var nt=0;nt<h.sel.ranges.length;nt++){var ot=h.sel.ranges[nt];if(ot.head.line==t&&ot.head.ch<se.length){var _t=Qe(t,se.length);io(h,nt,new zn(_t,_t));break}}}var Lr=null;function Bs(e){Lr=e}function ho(e,t,r,i,h){var P=e.doc;e.display.shift=!1,i||(i=P.sel);var z=+new Date-200,Z=h=="paste"||e.state.pasteIncoming>z,$=bt(t),se=null;if(Z&&i.ranges.length>1)if(Lr&&Lr.text.join(`
|
|
`)==t){if(i.ranges.length%Lr.text.length==0){se=[];for(var we=0;we<Lr.text.length;we++)se.push(P.splitLines(Lr.text[we]))}}else $.length==i.ranges.length&&e.options.pasteLinesPerSelection&&(se=F($,function(Mt){return[Mt]}));for(var Oe=e.curOp.updateInput,ze=i.ranges.length-1;ze>=0;ze--){var He=i.ranges[ze],nt=He.from(),ot=He.to();He.empty()&&(r&&r>0?nt=Qe(nt.line,nt.ch-r):e.state.overwrite&&!Z?ot=Qe(ot.line,Math.min(et(P,ot.line).text.length,ot.ch+M($).length)):Z&&Lr&&Lr.lineWise&&Lr.text.join(`
|
|
`)==$.join(`
|
|
`)&&(nt=ot=Qe(nt.line,0)));var _t={from:nt,to:ot,text:se?se[ze%se.length]:$,origin:h||(Z?"paste":e.state.cutIncoming>z?"cut":"+input")};La(e.doc,_t),bi(e,"inputRead",e,_t)}t&&!Z&&ol(e,t),$r(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Oe),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Qi(t,function(){return ho(t,r,0,null,"paste")}),!0}function ol(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,i=r.ranges.length-1;i>=0;i--){var h=r.ranges[i];if(h.head.ch>100||i&&r.ranges[i-1].head.line==h.head.line)continue;var P=e.getModeAt(h.head),z=!1;if(P.electricChars){for(var Z=0;Z<P.electricChars.length;Z++)if(t.indexOf(P.electricChars.charAt(Z))>-1){z=ps(e,h.head.line,"smart");break}}else P.electricInput&&(P.electricInput.test(et(e.doc,h.head.line).text.slice(0,h.head.ch))&&(z=ps(e,h.head.line,"smart")));z&&bi(e,"electricInput",e,h.head.line)}}function ll(e){for(var t=[],r=[],i=0;i<e.doc.sel.ranges.length;i++){var h=e.doc.sel.ranges[i].head.line,P={anchor:Qe(h,0),head:Qe(h+1,0)};r.push(P),t.push(e.getRange(P.anchor,P.head))}return{text:t,ranges:r}}function ul(e,t,r,i){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",i?"":"off"),e.setAttribute("spellcheck",!!t)}function cl(){var e=d("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=d("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return n?e.style.width="1000px":e.setAttribute("wrap","off"),p&&(e.style.border="1px solid black"),ul(e),t}function $l(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(i,h){var P=this.options,z=P[i];if(P[i]==h&&i!="mode")return;P[i]=h,t.hasOwnProperty(i)&&Ti(this,t[i])(this,h,z),ce(this,"optionChange",this,i)},getOption:function(i){return this.options[i]},getDoc:function(){return this.doc},addKeyMap:function(i,h){this.state.keyMaps[h?"push":"unshift"](Ns(i))},removeKeyMap:function(i){for(var h=this.state.keyMaps,P=0;P<h.length;++P)if(h[P]==i||h[P].name==i)return h.splice(P,1),!0},addOverlay:ji(function(i,h){var P=i.token?i:e.getMode(this.options,i);if(P.startState)throw new Error("Overlays may not be stateful.");Q(this.state.overlays,{mode:P,modeSpec:i,opaque:h&&h.opaque,priority:h&&h.priority||0},function(z){return z.priority}),this.state.modeGen++,$n(this)}),removeOverlay:ji(function(i){for(var h=this.state.overlays,P=0;P<h.length;++P){var z=h[P].modeSpec;if(z==i||typeof i=="string"&&z.name==i){h.splice(P,1),this.state.modeGen++,$n(this);return}}}),indentLine:ji(function(i,h,P){typeof h!="string"&&typeof h!="number"&&(h==null?h=this.options.smartIndent?"smart":"prev":h=h?"add":"subtract"),Zt(this.doc,i)&&ps(this,i,h,P)}),indentSelection:ji(function(i){for(var h=this.doc.sel.ranges,P=-1,z=0;z<h.length;z++){var Z=h[z];if(Z.empty())Z.head.line>P&&(ps(this,Z.head.line,i,!0),P=Z.head.line,z==this.doc.sel.primIndex&&$r(this));else{var $=Z.from(),se=Z.to(),we=Math.max(P,$.line);P=Math.min(this.lastLine(),se.line-(se.ch?0:1))+1;for(var Oe=we;Oe<P;++Oe)ps(this,Oe,i);var ze=this.doc.sel.ranges;$.ch==0&&h.length==ze.length&&ze[z].from().ch>0&&io(this.doc,z,new zn($,ze[z].to()),De)}}}),getTokenAt:function(i,h){return lr(this,i,h)},getLineTokens:function(i,h){return lr(this,Qe(i),h,!0)},getTokenTypeAt:function(i){i=at(this.doc,i);var h=an(this,et(this.doc,i.line)),P=0,z=(h.length-1)/2,Z=i.ch,$;if(Z==0)$=h[2];else for(;;){var se=P+z>>1;if((se?h[se*2-1]:0)>=Z)z=se;else if(h[se*2+1]<Z)P=se+1;else{$=h[se*2+2];break}}var we=$?$.indexOf("overlay "):-1;return we<0?$:we==0?null:$.slice(0,we-1)},getModeAt:function(i){var h=this.doc.mode;return h.innerMode?e.innerMode(h,this.getTokenAt(i).state).mode:h},getHelper:function(i,h){return this.getHelpers(i,h)[0]},getHelpers:function(i,h){var P=[];if(!r.hasOwnProperty(h))return P;var z=r[h],Z=this.getModeAt(i);if(typeof Z[h]=="string")z[Z[h]]&&P.push(z[Z[h]]);else if(Z[h])for(var $=0;$<Z[h].length;$++){var se=z[Z[h][$]];se&&P.push(se)}else Z.helperType&&z[Z.helperType]?P.push(z[Z.helperType]):z[Z.name]&&P.push(z[Z.name]);for(var we=0;we<z._global.length;we++){var Oe=z._global[we];Oe.pred(Z,this)&&he(P,Oe.val)==-1&&P.push(Oe.val)}return P},getStateAfter:function(i,h){var P=this.doc;return i=rn(P,i==null?P.first+P.size-1:i),Ht(this,i+1,h).state},cursorCoords:function(i,h){var P,z=this.doc.sel.primary();return i==null?P=z.head:typeof i=="object"?P=at(this.doc,i):P=i?z.from():z.to(),kn(this,P,h||"page")},charCoords:function(i,h){return si(this,at(this.doc,i),h||"page")},coordsChar:function(i,h){return i=Mn(this,i,h||"page"),Pn(this,i.left,i.top)},lineAtHeight:function(i,h){return i=Mn(this,{top:i,left:0},h||"page").top,Nt(this.doc,i+this.display.viewOffset)},heightAtLine:function(i,h,P){var z=!1,Z;if(typeof i=="number"){var $=this.doc.first+this.doc.size-1;i<this.doc.first?i=this.doc.first:i>$&&(i=$,z=!0),Z=et(this.doc,i)}else Z=i;return Fn(this,Z,{top:0,left:0},h||"page",P||z).top+(z?this.doc.height-ai(Z):0)},defaultTextHeight:function(){return _i(this.display)},defaultCharWidth:function(){return Ri(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(i,h,P,z,Z){var $=this.display;i=kn(this,at(this.doc,i));var se=i.bottom,we=i.left;if(h.style.position="absolute",h.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(h),$.sizer.appendChild(h),z=="over")se=i.top;else if(z=="above"||z=="near"){var Oe=Math.max($.wrapper.clientHeight,this.doc.height),ze=Math.max($.sizer.clientWidth,$.lineSpace.clientWidth);(z=="above"||i.bottom+h.offsetHeight>Oe)&&i.top>h.offsetHeight?se=i.top-h.offsetHeight:i.bottom+h.offsetHeight<=Oe&&(se=i.bottom),we+h.offsetWidth>ze&&(we=ze-h.offsetWidth)}h.style.top=se+"px",h.style.left=h.style.right="",Z=="right"?(we=$.sizer.clientWidth-h.offsetWidth,h.style.right="0px"):(Z=="left"?we=0:Z=="middle"&&(we=($.sizer.clientWidth-h.offsetWidth)/2),h.style.left=we+"px"),P&&Es(this,{left:we,top:se,right:we+h.offsetWidth,bottom:se+h.offsetHeight})},triggerOnKeyDown:ji(Zo),triggerOnKeyPress:ji($o),triggerOnKeyUp:qo,triggerOnMouseDown:ji(el),execCommand:function(i){if(cs.hasOwnProperty(i))return cs[i].call(null,this)},triggerElectric:ji(function(i){ol(this,i)}),findPosH:function(i,h,P,z){var Z=1;h<0&&(Z=-1,h=-h);for(var $=at(this.doc,i),se=0;se<h&&!($=fo(this.doc,$,Z,P,z),$.hitSide);++se);return $},moveH:ji(function(i,h){var P=this;this.extendSelectionsBy(function(z){return P.display.shift||P.doc.extend||z.empty()?fo(P.doc,z.head,i,h,P.options.rtlMoveVisually):i<0?z.from():z.to()},Be)}),deleteH:ji(function(i,h){var P=this.doc.sel,z=this.doc;P.somethingSelected()?z.replaceSelection("",null,"+delete"):ka(this,function(Z){var $=fo(z,Z.head,i,h,!1);return i<0?{from:$,to:Z.head}:{from:Z.head,to:$}})}),findPosV:function(i,h,P,z){var Z=1,$=z;h<0&&(Z=-1,h=-h);for(var se=at(this.doc,i),we=0;we<h;++we){var Oe=kn(this,se,"div");if($==null?$=Oe.left:Oe.left=$,se=dl(this,Oe,Z,P),se.hitSide)break}return se},moveV:ji(function(i,h){var P=this,z=this.doc,Z=[],$=!this.display.shift&&!z.extend&&z.sel.somethingSelected();if(z.extendSelectionsBy(function(we){if($)return i<0?we.from():we.to();var Oe=kn(P,we.head,"div");we.goalColumn!=null&&(Oe.left=we.goalColumn),Z.push(Oe.left);var ze=dl(P,Oe,i,h);return h=="page"&&we==z.sel.primary()&&Ya(P,si(P,ze,"div").top-Oe.top),ze},Be),Z.length)for(var se=0;se<z.sel.ranges.length;se++)z.sel.ranges[se].goalColumn=Z[se]}),findWordAt:function(i){var h=this.doc,P=et(h,i.line).text,z=i.ch,Z=i.ch;if(P){var $=this.getHelper(i,"wordChars");(i.sticky=="before"||Z==P.length)&&z?--z:++Z;for(var se=P.charAt(z),we=Ye(se,$)?function(Oe){return Ye(Oe,$)}:/\s/.test(se)?function(Oe){return/\s/.test(Oe)}:function(Oe){return!/\s/.test(Oe)&&!Ye(Oe)};z>0&&we(P.charAt(z-1));)--z;for(;Z<P.length&&we(P.charAt(Z));)++Z}return new zn(Qe(i.line,z),Qe(i.line,Z))},toggleOverwrite:function(i){if(i!=null&&i==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?B(this.display.cursorDiv,"CodeMirror-overwrite"):O(this.display.cursorDiv,"CodeMirror-overwrite"),ce(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==T()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ji(function(i,h){ea(this,i,h)}),getScrollInfo:function(){var i=this.display.scroller;return{left:i.scrollLeft,top:i.scrollTop,height:i.scrollHeight-ke(this)-this.display.barHeight,width:i.scrollWidth-ke(this)-this.display.barWidth,clientHeight:re(this),clientWidth:Te(this)}},scrollIntoView:ji(function(i,h){i==null?(i={from:this.doc.sel.primary().head,to:null},h==null&&(h=this.options.cursorScrollMargin)):typeof i=="number"?i={from:Qe(i,0),to:null}:i.from==null&&(i={from:i,to:null}),i.to||(i.to=i.from),i.margin=h||0,i.from.line!=null?Ys(this,i):ha(this,i.from,i.to,i.margin)}),setSize:ji(function(i,h){var P=this,z=function($){return typeof $=="number"||/^\d+$/.test(String($))?$+"px":$};i!=null&&(this.display.wrapper.style.width=z(i)),h!=null&&(this.display.wrapper.style.height=z(h)),this.options.lineWrapping&&En(this);var Z=this.display.viewFrom;this.doc.iter(Z,this.display.viewTo,function($){if($.widgets){for(var se=0;se<$.widgets.length;se++)if($.widgets[se].noHScroll){hi(P,Z,"widget");break}}++Z}),this.curOp.forceUpdate=!0,ce(this,"refresh",this)}),operation:function(i){return Qi(this,i)},startOperation:function(){return Nr(this)},endOperation:function(){return Gr(this)},refresh:ji(function(){var i=this.display.cachedTextHeight;$n(this),this.curOp.forceUpdate=!0,Tn(this),ea(this,this.doc.scrollLeft,this.doc.scrollTop),Sa(this.display),(i==null||Math.abs(i-_i(this.display))>.5||this.options.lineWrapping)&&Ji(this),ce(this,"refresh",this)}),swapDoc:ji(function(i){var h=this.doc;return h.cm=null,this.state.selectingText&&this.state.selectingText(),vo(this,i),Tn(this),this.display.input.reset(),ea(this,i.scrollLeft,i.scrollTop),this.curOp.forceScroll=!0,bi(this,"swapDoc",this,h),h}),phrase:function(i){var h=this.options.phrases;return h&&Object.prototype.hasOwnProperty.call(h,i)?h[i]:i},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}},fe(e),e.registerHelper=function(i,h,P){r.hasOwnProperty(i)||(r[i]=e[i]={_global:[]}),r[i][h]=P},e.registerGlobalHelper=function(i,h,P,z){e.registerHelper(i,h,z),r[i]._global.push({pred:P,val:z})}}function fo(e,t,r,i,h){var P=t,z=r,Z=et(e,t.line),$=h&&e.direction=="rtl"?-r:r;function se(){var Wt=t.line+$;return Wt<e.first||Wt>=e.first+e.size?!1:(t=new Qe(Wt,t.ch,t.sticky),Z=et(e,Wt))}function we(Wt){var kt;if(i=="codepoint"){var Xt=Z.text.charCodeAt(t.ch+(i>0?0:-1));isNaN(Xt)?kt=null:kt=new Qe(t.line,Math.max(0,Math.min(Z.text.length,t.ch+r*(Xt>=55296&&Xt<56320?2:1))),-r)}else h?kt=kl(e.cm,Z,t,r):kt=ao(Z,t,r);if(kt==null)if(!Wt&&se())t=so(h,e.cm,Z,t.line,$);else return!1;else t=kt;return!0}if(i=="char"||i=="codepoint")we();else if(i=="column")we(!0);else if(i=="word"||i=="group")for(var Oe=null,ze=i=="group",He=e.cm&&e.cm.getHelper(t,"wordChars"),nt=!0;!(r<0&&!we(!nt));nt=!1){var ot=Z.text.charAt(t.ch)||`
|
|
`,_t=Ye(ot,He)?"w":ze&&ot==`
|
|
`?"n":!ze||/\s/.test(ot)?null:"p";if(ze&&!nt&&!_t&&(_t="s"),Oe&&Oe!=_t){r<0&&(r=1,we(),t.sticky="after");break}if(_t&&(Oe=_t),r>0&&!we(!nt))break}var Mt=Ms(e,t,P,z,!0);return yn(P,Mt)&&(Mt.hitSide=!0),Mt}function dl(e,t,r,i){var h=e.doc,P=t.left,z;if(i=="page"){var Z=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),$=Math.max(Z-.5*_i(e.display),3);z=(r>0?t.bottom:t.top)+r*$}else i=="line"&&(z=r>0?t.bottom+3:t.top-3);for(var se;!(se=Pn(e,P,z),!se.outside);){if(r<0?z<=0:z>=h.height){se.hitSide=!0;break}z+=r*5}return se}var ei=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ei.prototype.init=function(e){var t=this,r=this,i=r.cm,h=r.div=e.lineDiv;ul(h,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize);function P(Z){for(var $=Z.target;$;$=$.parentNode){if($==h)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test($.className))break}return!1}Je(h,"paste",function(Z){if(!P(Z)||q(i,Z)||sl(Z,i))return;W<=11&&setTimeout(Ti(i,function(){return t.updateFromDOM()}),20)}),Je(h,"compositionstart",function(Z){t.composing={data:Z.data,done:!1}}),Je(h,"compositionupdate",function(Z){t.composing||(t.composing={data:Z.data,done:!1})}),Je(h,"compositionend",function(Z){t.composing&&(Z.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Je(h,"touchstart",function(){return r.forceCompositionEnd()}),Je(h,"input",function(){t.composing||t.readFromDOMSoon()});function z(Z){if(!P(Z)||q(i,Z))return;if(i.somethingSelected())Bs({lineWise:!1,text:i.getSelections()}),Z.type=="cut"&&i.replaceSelection("",null,"cut");else if(i.options.lineWiseCopyCut){var $=ll(i);Bs({lineWise:!0,text:$.text}),Z.type=="cut"&&i.operation(function(){i.setSelections($.ranges,0,De),i.replaceSelection("",null,"cut")})}else return;if(Z.clipboardData){Z.clipboardData.clearData();var se=Lr.text.join(`
|
|
`);if(Z.clipboardData.setData("Text",se),Z.clipboardData.getData("Text")==se){Z.preventDefault();return}}var we=cl(),Oe=we.firstChild;i.display.lineSpace.insertBefore(we,i.display.lineSpace.firstChild),Oe.value=Lr.text.join(`
|
|
`);var ze=document.activeElement;j(Oe),setTimeout(function(){i.display.lineSpace.removeChild(we),ze.focus(),ze==h&&r.showPrimarySelection()},50)}Je(h,"copy",z),Je(h,"cut",z)},ei.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},ei.prototype.prepareSelection=function(){var e=Er(this.cm,!1);return e.focus=document.activeElement==this.div,e},ei.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},ei.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ei.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),h=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||h.line<t.display.viewFrom){e.removeAllRanges();return}var P=js(t,e.anchorNode,e.anchorOffset),z=js(t,e.focusNode,e.focusOffset);if(P&&!P.bad&&z&&!z.bad&&St(en(P,z),i)==0&&St(jt(P,z),h)==0)return;var Z=t.display.view,$=i.line>=t.display.viewFrom&&hl(t,i)||{node:Z[0].measure.map[2],offset:0},se=h.line<t.display.viewTo&&hl(t,h);if(!se){var we=Z[Z.length-1].measure,Oe=we.maps?we.maps[we.maps.length-1]:we.map;se={node:Oe[Oe.length-1],offset:Oe[Oe.length-2]-Oe[Oe.length-3]}}if(!$||!se){e.removeAllRanges();return}var ze=e.rangeCount&&e.getRangeAt(0),He;try{He=f($.node,$.offset,se.offset,se.node)}catch(nt){}He&&(!k&&t.state.focused?(e.collapse($.node,$.offset),He.collapsed||(e.removeAllRanges(),e.addRange(He))):(e.removeAllRanges(),e.addRange(He)),ze&&e.anchorNode==null?e.addRange(ze):k&&this.startGracePeriod()),this.rememberSelection()},ei.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},ei.prototype.showMultipleSelections=function(e){x(this.cm.display.cursorDiv,e.cursors),x(this.cm.display.selectionDiv,e.selection)},ei.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ei.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return v(this.div,t)},ei.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ei.prototype.blur=function(){this.div.blur()},ei.prototype.getField=function(){return this.div},ei.prototype.supportsTouch=function(){return!0},ei.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Qi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},ei.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ei.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(l&&y&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var r=js(t,e.anchorNode,e.anchorOffset),i=js(t,e.focusNode,e.focusOffset);r&&i&&Qi(t,function(){zi(t.doc,Or(r,i),De),(r.bad||i.bad)&&(t.curOp.selectionChanged=!0)})},ei.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),i=r.from(),h=r.to();if(i.ch==0&&i.line>e.firstLine()&&(i=Qe(i.line-1,et(e.doc,i.line-1).length)),h.ch==et(e.doc,h.line).text.length&&h.line<e.lastLine()&&(h=Qe(h.line+1,0)),i.line<t.viewFrom||h.line>t.viewTo-1)return!1;var P,z,Z;i.line==t.viewFrom||(P=ni(e,i.line))==0?(z=dt(t.view[0].line),Z=t.view[0].node):(z=dt(t.view[P].line),Z=t.view[P-1].node.nextSibling);var $=ni(e,h.line),se,we;if($==t.view.length-1?(se=t.viewTo-1,we=t.lineDiv.lastChild):(se=dt(t.view[$+1].line)-1,we=t.view[$+1].node.previousSibling),!Z)return!1;for(var Oe=e.doc.splitLines(tu(e,Z,we,z,se)),ze=Tt(e.doc,Qe(z,0),Qe(se,et(e.doc,se).text.length));Oe.length>1&&ze.length>1;)if(M(Oe)==M(ze))Oe.pop(),ze.pop(),se--;else if(Oe[0]==ze[0])Oe.shift(),ze.shift(),z++;else break;for(var He=0,nt=0,ot=Oe[0],_t=ze[0],Mt=Math.min(ot.length,_t.length);He<Mt&&ot.charCodeAt(He)==_t.charCodeAt(He);)++He;for(var Wt=M(Oe),kt=M(ze),Xt=Math.min(Wt.length-(Oe.length==1?He:0),kt.length-(ze.length==1?He:0));nt<Xt&&Wt.charCodeAt(Wt.length-nt-1)==kt.charCodeAt(kt.length-nt-1);)++nt;if(Oe.length==1&&ze.length==1&&z==i.line)for(;He&&He>i.ch&&Wt.charCodeAt(Wt.length-nt-1)==kt.charCodeAt(kt.length-nt-1);)He--,nt++;Oe[Oe.length-1]=Wt.slice(0,Wt.length-nt).replace(/^\u200b+/,""),Oe[0]=Oe[0].slice(He).replace(/\u200b+$/,"");var fn=Qe(z,He),nn=Qe(se,ze.length?M(ze).length-nt:0);if(Oe.length>1||Oe[0]||St(fn,nn))return Da(e.doc,Oe,fn,nn,"+input"),!0},ei.prototype.ensurePolled=function(){this.forceCompositionEnd()},ei.prototype.reset=function(){this.forceCompositionEnd()},ei.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},ei.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},ei.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Qi(this.cm,function(){return $n(e.cm)})},ei.prototype.setUneditable=function(e){e.contentEditable="false"},ei.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Ti(this.cm,ho)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},ei.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},ei.prototype.onContextMenu=function(){},ei.prototype.resetPosition=function(){},ei.prototype.needsContentAttribute=!0;function hl(e,t){var r=Ne(e,t.line);if(!r||r.hidden)return null;var i=et(e.doc,t.line),h=ue(r,i,t.line),P=Et(i,e.doc.direction),z="left";if(P){var Z=ut(P,t.ch);z=Z%2?"right":"left"}var $=pt(h.map,t.ch,z);return $.offset=$.collapse=="right"?$.end:$.start,$}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Na(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,i,h){var P="",z=!1,Z=e.doc.lineSeparator(),$=!1;function se(He){return function(nt){return nt.id==He}}function we(){z&&(P+=Z,$&&(P+=Z),z=$=!1)}function Oe(He){He&&(we(),P+=He)}function ze(He){if(He.nodeType==1){var nt=He.getAttribute("cm-text");if(nt){Oe(nt);return}var ot=He.getAttribute("cm-marker"),_t;if(ot){var Mt=e.findMarks(Qe(i,0),Qe(h+1,0),se(+ot));Mt.length&&(_t=Mt[0].find(0))&&Oe(Tt(e.doc,_t.from,_t.to).join(Z));return}if(He.getAttribute("contenteditable")=="false")return;var Wt=/^(pre|div|p|li|table|br)$/i.test(He.nodeName);if(!/^br$/i.test(He.nodeName)&&He.textContent.length==0)return;Wt&&we();for(var kt=0;kt<He.childNodes.length;kt++)ze(He.childNodes[kt]);/^(pre|p)$/i.test(He.nodeName)&&($=!0),Wt&&(z=!0)}else He.nodeType==3&&Oe(He.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(ze(t),t==r);)t=t.nextSibling,$=!1;return P}function js(e,t,r){var i;if(t==e.display.lineDiv){if(i=e.display.lineDiv.childNodes[r],!i)return Na(e.clipPos(Qe(e.display.viewTo-1)),!0);t=null,r=0}else for(i=t;;i=i.parentNode){if(!i||i==e.display.lineDiv)return null;if(i.parentNode&&i.parentNode==e.display.lineDiv)break}for(var h=0;h<e.display.view.length;h++){var P=e.display.view[h];if(P.node==i)return nu(P,t,r)}}function nu(e,t,r){var i=e.text.firstChild,h=!1;if(!t||!v(i,t))return Na(Qe(dt(e.line),0),!0);if(t==i&&(h=!0,t=i.childNodes[r],r=0,!t)){var P=e.rest?M(e.rest):e.line;return Na(Qe(dt(P),P.text.length),h)}var z=t.nodeType==3?t:null,Z=t;for(!z&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(z=t.firstChild,r&&(r=z.nodeValue.length));Z.parentNode!=i;)Z=Z.parentNode;var $=e.measure,se=$.maps;function we(_t,Mt,Wt){for(var kt=-1;kt<(se?se.length:0);kt++)for(var Xt=kt<0?$.map:se[kt],fn=0;fn<Xt.length;fn+=3){var nn=Xt[fn+2];if(nn==_t||nn==Mt){var Rn=dt(kt<0?e.line:e.rest[kt]),ii=Xt[fn]+Wt;return(Wt<0||nn!=_t)&&(ii=Xt[fn+(Wt?1:0)]),Qe(Rn,ii)}}}var Oe=we(z,Z,r);if(Oe)return Na(Oe,h);for(var ze=Z.nextSibling,He=z?z.nodeValue.length-r:0;ze;ze=ze.nextSibling){if(Oe=we(ze,ze.firstChild,0),Oe)return Na(Qe(Oe.line,Oe.ch-He),h);He+=ze.textContent.length}for(var nt=Z.previousSibling,ot=r;nt;nt=nt.previousSibling){if(Oe=we(nt,nt.firstChild,-1),Oe)return Na(Qe(Oe.line,Oe.ch+ot),h);ot+=nt.textContent.length}}var Si=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ne,this.hasSelection=!1,this.composing=null};Si.prototype.init=function(e){var t=this,r=this,i=this.cm;this.createField(e);var h=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),p&&(h.style.width="0px"),Je(h,"input",function(){K&&W>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),Je(h,"paste",function(z){if(q(i,z)||sl(z,i))return;i.state.pasteIncoming=+new Date,r.fastPoll()});function P(z){if(q(i,z))return;if(i.somethingSelected())Bs({lineWise:!1,text:i.getSelections()});else if(i.options.lineWiseCopyCut){var Z=ll(i);Bs({lineWise:!0,text:Z.text}),z.type=="cut"?i.setSelections(Z.ranges,null,De):(r.prevInput="",h.value=Z.text.join(`
|
|
`),j(h))}else return;z.type=="cut"&&(i.state.cutIncoming=+new Date)}Je(h,"cut",P),Je(h,"copy",P),Je(e.scroller,"paste",function(z){if(Cr(e,z)||q(i,z))return;if(!h.dispatchEvent){i.state.pasteIncoming=+new Date,r.focus();return}var Z=new Event("paste");Z.clipboardData=z.clipboardData,h.dispatchEvent(Z)}),Je(e.lineSpace,"selectstart",function(z){Cr(e,z)||ie(z)}),Je(h,"compositionstart",function(){var z=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:z,range:i.markText(z,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Je(h,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Si.prototype.createField=function(e){this.wrapper=cl(),this.textarea=this.wrapper.firstChild},Si.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Si.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,i=Er(e);if(e.options.moveInputWithCursor){var h=kn(e,r.sel.primary().head,"div"),P=t.wrapper.getBoundingClientRect(),z=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,h.top+z.top-P.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,h.left+z.left-P.left))}return i},Si.prototype.showSelection=function(e){var t=this.cm,r=t.display;x(r.cursorDiv,e.cursors),x(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Si.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&j(this.textarea),K&&W>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",K&&W>=9&&(this.hasSelection=null))},Si.prototype.getField=function(){return this.textarea},Si.prototype.supportsTouch=function(){return!1},Si.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!o||T()!=this.textarea))try{this.textarea.focus()}catch(e){}},Si.prototype.blur=function(){this.textarea.blur()},Si.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Si.prototype.receivedFocus=function(){this.slowPoll()},Si.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Si.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var i=t.poll();!i&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},Si.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,i=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ze(r)&&!i&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var h=r.value;if(h==i&&!t.somethingSelected())return!1;if(K&&W>=9&&this.hasSelection===h||s&&/[\uf700-\uf7ff]/.test(h))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var P=h.charCodeAt(0);if(P==8203&&!i&&(i="\u200B"),P==8666)return this.reset(),this.cm.execCommand("undo")}for(var z=0,Z=Math.min(i.length,h.length);z<Z&&i.charCodeAt(z)==h.charCodeAt(z);)++z;return Qi(t,function(){ho(t,h.slice(z),i.length-z,null,e.composing?"*compose":null),h.length>1e3||h.indexOf(`
|
|
`)>-1?r.value=e.prevInput="":e.prevInput=h,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Si.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Si.prototype.onKeyPress=function(){K&&W>=9&&(this.hasSelection=null),this.fastPoll()},Si.prototype.onContextMenu=function(e){var t=this,r=t.cm,i=r.display,h=t.textarea;t.contextMenuPending&&t.contextMenuPending();var P=Li(r,e),z=i.scroller.scrollTop;if(!P||m)return;var Z=r.options.resetSelectionOnContextMenu;Z&&r.doc.sel.contains(P)==-1&&Ti(r,zi)(r.doc,Or(P),De);var $=h.style.cssText,se=t.wrapper.style.cssText,we=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",h.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-we.top-5)+"px; left: "+(e.clientX-we.left-5)+`px;
|
|
z-index: 1000; background: `+(K?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Oe;n&&(Oe=window.scrollY),i.input.focus(),n&&window.scrollTo(null,Oe),i.input.reset(),r.somethingSelected()||(h.value=t.prevInput=" "),t.contextMenuPending=He,i.selForContextMenu=r.doc.sel,clearTimeout(i.detectingSelectAll);function ze(){if(h.selectionStart!=null){var ot=r.somethingSelected(),_t="\u200B"+(ot?h.value:"");h.value="\u21DA",h.value=_t,t.prevInput=ot?"":"\u200B",h.selectionStart=1,h.selectionEnd=_t.length,i.selForContextMenu=r.doc.sel}}function He(){if(t.contextMenuPending!=He)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=se,h.style.cssText=$,K&&W<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=z),h.selectionStart!=null){(!K||K&&W<9)&&ze();var ot=0,_t=function(){i.selForContextMenu==r.doc.sel&&h.selectionStart==0&&h.selectionEnd>0&&t.prevInput=="\u200B"?Ti(r,Lo)(r):ot++<10?i.detectingSelectAll=setTimeout(_t,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(_t,200)}}if(K&&W>=9&&ze(),L){ve(e);var nt=function(){Bt(window,"mouseup",nt),setTimeout(He,20)};Je(window,"mouseup",nt)}else setTimeout(He,50)},Si.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Si.prototype.setUneditable=function(){},Si.prototype.needsContentAttribute=!1;function iu(e,t){if(t=t?_(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=T();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function i(){e.value=Z.getValue()}var h;if(e.form&&(Je(e.form,"submit",i),!t.leaveSubmitMethodAlone)){var P=e.form;h=P.submit;try{var z=P.submit=function(){i(),P.submit=h,P.submit(),P.submit=z}}catch($){}}t.finishInit=function($){$.save=i,$.getTextArea=function(){return e},$.toTextArea=function(){$.toTextArea=isNaN,i(),e.parentNode.removeChild($.getWrapperElement()),e.style.display="",e.form&&(Bt(e.form,"submit",i),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=h))}},e.style.display="none";var Z=fi(function($){return e.parentNode.insertBefore($,e.nextSibling)},t);return Z}function ru(e){e.off=Bt,e.on=Je,e.wheelEventPixels=qa,e.Doc=rr,e.splitLines=bt,e.countColumn=J,e.findColumn=Ge,e.isWordChar=Ue,e.Pass=Ke,e.signal=ce,e.Line=mi,e.changeEnd=Rr,e.scrollbarModel=Ja,e.Pos=Qe,e.cmpPos=St,e.modes=mn,e.mimeModes=Gt,e.resolveMode=xn,e.getMode=Ln,e.modeExtensions=Rt,e.extendMode=Ve,e.copyState=ft,e.startState=Lt,e.innerMode=xt,e.commands=cs,e.keyMap=Xr,e.keyName=Vo,e.isModifierKey=Go,e.lookupKey=Ma,e.normalizeKeyMap=Ml,e.StringStream=Ct,e.SharedTextMarker=os,e.TextMarker=aa,e.LineWidget=ss,e.e_preventDefault=ie,e.e_stopPropagation=le,e.e_stop=ve,e.addClass=B,e.contains=v,e.rmClass=O,e.keyNames=sa}Jl(fi),$l(fi);var au="iter insert remove copy getEditor constructor".split(" ");for(var Hs in rr.prototype)rr.prototype.hasOwnProperty(Hs)&&he(au,Hs)<0&&(fi.prototype[Hs]=function(e){return function(){return e.apply(this.doc,arguments)}}(rr.prototype[Hs]));return fe(rr),fi.inputStyles={textarea:Si,contenteditable:ei},fi.defineMode=function(e){!fi.defaults.mode&&e!="null"&&(fi.defaults.mode=e),qt.apply(this,arguments)},fi.defineMIME=gn,fi.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),fi.defineMIME("text/plain","null"),fi.defineExtension=function(e,t){fi.prototype[e]=t},fi.defineDocExtension=function(e,t){rr.prototype[e]=t},fi.fromTextArea=iu,ru(fi),fi.version="5.58.2",fi})},Y1PL:function(tt,Ee,H){"use strict";H.r(Ee),H.d(Ee,"ResizableTextArea",function(){return he});var ae=H("wx14"),X=H("1OyB"),k=H("vuIU"),G=H("Ji7U"),b=H("LK+K"),N=H("q1tI"),K=H("VTBJ"),W=H("rePB"),n=H("Zm9Q"),I=H("Kwbf"),y=H("c+Xe"),m=H("m+aA"),g=H("bdgK"),u=new Map;function c(De){De.forEach(function(je){var Be,Ge=je.target;(Be=u.get(Ge))===null||Be===void 0||Be.forEach(function(_e){return _e(Ge)})})}var p=new g.default(c),l=null,o=null;function s(De,je){u.has(De)||(u.set(De,new Set),p.observe(De)),u.get(De).add(je)}function a(De,je){u.has(De)&&(u.get(De).delete(je),u.get(De).size||(p.unobserve(De),u.delete(De)))}var A=function(De){Object(G.a)(Be,De);var je=Object(b.a)(Be);function Be(){return Object(X.a)(this,Be),je.apply(this,arguments)}return Object(k.a)(Be,[{key:"render",value:function(){return this.props.children}}]),Be}(N.Component),S=N.createContext(null);function C(De){var je=De.children,Be=De.onBatchResize,Ge=N.useRef(0),_e=N.useRef([]),Y=N.useContext(S),M=N.useCallback(function(F,Q,te){Ge.current+=1;var V=Ge.current;_e.current.push({size:F,element:Q,data:te}),Promise.resolve().then(function(){V===Ge.current&&(Be==null||Be(_e.current),_e.current=[])}),Y==null||Y(F,Q,te)},[Be,Y]);return N.createElement(S.Provider,{value:M},je)}function L(De){var je=De.children,Be=De.disabled,Ge=N.useRef(null),_e=N.useRef(null),Y=N.useContext(S),M=N.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),F=N.isValidElement(je)&&Object(y.c)(je),Q=F?je.ref:null,te=N.useMemo(function(){return Object(y.a)(Q,Ge)},[Q,Ge]),V=N.useRef(De);V.current=De;var ge=N.useCallback(function(Ue){var Ye=V.current,de=Ye.onResize,xe=Ye.data,Me=Ue.getBoundingClientRect(),Fe=Me.width,$e=Me.height,st=Ue.offsetWidth,mt=Ue.offsetHeight,ut=Math.floor(Fe),Pt=Math.floor($e);if(M.current.width!==ut||M.current.height!==Pt||M.current.offsetWidth!==st||M.current.offsetHeight!==mt){var Et={width:ut,height:Pt,offsetWidth:st,offsetHeight:mt};M.current=Et;var At=st===Math.round(Fe)?Fe:st,Je=mt===Math.round($e)?$e:mt,Kt=Object(K.a)(Object(K.a)({},Et),{},{offsetWidth:At,offsetHeight:Je});Y==null||Y(Kt,Ue,xe),de&&Promise.resolve().then(function(){de(Kt,Ue)})}},[]);return N.useEffect(function(){var Ue=Object(m.a)(Ge.current)||Object(m.a)(_e.current);return Ue&&!Be&&s(Ue,ge),function(){return a(Ue,ge)}},[Ge.current,Be]),N.createElement(A,{ref:_e},F?N.cloneElement(je,{ref:te}):je)}var D="rc-observer-key";function O(De){var je=De.children,Be=Object(n.a)(je);return Be.map(function(Ge,_e){var Y=(Ge==null?void 0:Ge.key)||"".concat(D,"-").concat(_e);return N.createElement(L,Object(ae.a)({},De,{key:Y}),Ge)})}O.Collection=C;var w=O,x=H("bT9E"),d=H("TSYQ"),E=H.n(d),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
|
|
`,v=["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"],T={},B;function R(De){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Be=De.getAttribute("id")||De.getAttribute("data-reactid")||De.getAttribute("name");if(je&&T[Be])return T[Be];var Ge=window.getComputedStyle(De),_e=Ge.getPropertyValue("box-sizing")||Ge.getPropertyValue("-moz-box-sizing")||Ge.getPropertyValue("-webkit-box-sizing"),Y=parseFloat(Ge.getPropertyValue("padding-bottom"))+parseFloat(Ge.getPropertyValue("padding-top")),M=parseFloat(Ge.getPropertyValue("border-bottom-width"))+parseFloat(Ge.getPropertyValue("border-top-width")),F=v.map(function(te){return"".concat(te,":").concat(Ge.getPropertyValue(te))}).join(";"),Q={sizingStyle:F,paddingSize:Y,borderSize:M,boxSizing:_e};return je&&Be&&(T[Be]=Q),Q}function j(De){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ge=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)),De.getAttribute("wrap")?B.setAttribute("wrap",De.getAttribute("wrap")):B.removeAttribute("wrap");var _e=R(De,je),Y=_e.paddingSize,M=_e.borderSize,F=_e.boxSizing,Q=_e.sizingStyle;B.setAttribute("style","".concat(Q,";").concat(f)),B.value=De.value||De.placeholder||"";var te=Number.MIN_SAFE_INTEGER,V=Number.MAX_SAFE_INTEGER,ge=B.scrollHeight,Ue;if(F==="border-box"?ge+=M:F==="content-box"&&(ge-=Y),Be!==null||Ge!==null){B.value=" ";var Ye=B.scrollHeight-Y;Be!==null&&(te=Ye*Be,F==="border-box"&&(te=te+Y+M),ge=Math.max(te,ge)),Ge!==null&&(V=Ye*Ge,F==="border-box"&&(V=V+Y+M),Ue=ge>V?"":"hidden",ge=Math.min(V,ge))}return{height:ge,minHeight:te,maxHeight:V,overflowY:Ue,resize:"none"}}var U=H("Gytx"),_=H.n(U),J;(function(De){De[De.NONE=0]="NONE",De[De.RESIZING=1]="RESIZING",De[De.RESIZED=2]="RESIZED"})(J||(J={}));var ne=function(De){Object(G.a)(Be,De);var je=Object(b.a)(Be);function Be(Ge){var _e;return Object(X.a)(this,Be),_e=je.call(this,Ge),_e.nextFrameActionId=void 0,_e.resizeFrameId=void 0,_e.textArea=void 0,_e.saveTextArea=function(Y){_e.textArea=Y},_e.handleResize=function(Y){var M=_e.state.resizeStatus,F=_e.props,Q=F.autoSize,te=F.onResize;if(M!==J.NONE)return;typeof te=="function"&&te(Y),Q&&_e.resizeOnNextFrame()},_e.resizeOnNextFrame=function(){cancelAnimationFrame(_e.nextFrameActionId),_e.nextFrameActionId=requestAnimationFrame(_e.resizeTextarea)},_e.resizeTextarea=function(){var Y=_e.props.autoSize;if(!Y||!_e.textArea)return;var M=Y.minRows,F=Y.maxRows,Q=j(_e.textArea,!1,M,F);_e.setState({textareaStyles:Q,resizeStatus:J.RESIZING},function(){cancelAnimationFrame(_e.resizeFrameId),_e.resizeFrameId=requestAnimationFrame(function(){_e.setState({resizeStatus:J.RESIZED},function(){_e.resizeFrameId=requestAnimationFrame(function(){_e.setState({resizeStatus:J.NONE}),_e.fixFirefoxAutoScroll()})})})})},_e.renderTextArea=function(){var Y=_e.props,M=Y.prefixCls,F=M===void 0?"rc-textarea":M,Q=Y.autoSize,te=Y.onResize,V=Y.className,ge=Y.disabled,Ue=_e.state,Ye=Ue.textareaStyles,de=Ue.resizeStatus,xe=Object(x.a)(_e.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Me=E()(F,V,Object(W.a)({},"".concat(F,"-disabled"),ge));"value"in xe&&(xe.value=xe.value||"");var Fe=Object(K.a)(Object(K.a)(Object(K.a)({},_e.props.style),Ye),de===J.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return N.createElement(w,{onResize:_e.handleResize,disabled:!(Q||te)},N.createElement("textarea",Object(ae.a)({},xe,{className:Me,style:Fe,ref:_e.saveTextArea})))},_e.state={textareaStyles:{},resizeStatus:J.NONE},_e}return Object(k.a)(Be,[{key:"componentDidUpdate",value:function(_e){(_e.value!==this.props.value||!_()(_e.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var _e=this.textArea.selectionStart,Y=this.textArea.selectionEnd;this.textArea.setSelectionRange(_e,Y)}}catch(M){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Be}(N.Component),he=ne,be=function(De){Object(G.a)(Be,De);var je=Object(b.a)(Be);function Be(Ge){var _e;Object(X.a)(this,Be),_e=je.call(this,Ge),_e.resizableTextArea=void 0,_e.focus=function(){_e.resizableTextArea.textArea.focus()},_e.saveTextArea=function(M){_e.resizableTextArea=M},_e.handleChange=function(M){var F=_e.props.onChange;_e.setValue(M.target.value,function(){_e.resizableTextArea.resizeTextarea()}),F&&F(M)},_e.handleKeyDown=function(M){var F=_e.props,Q=F.onPressEnter,te=F.onKeyDown;M.keyCode===13&&Q&&Q(M),te&&te(M)};var Y=typeof Ge.value=="undefined"||Ge.value===null?Ge.defaultValue:Ge.value;return _e.state={value:Y},_e}return Object(k.a)(Be,[{key:"setValue",value:function(_e,Y){"value"in this.props||this.setState({value:_e},Y)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return N.createElement(he,Object(ae.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(_e){return"value"in _e?{value:_e.value}:null}}]),Be}(N.Component),Ke=Ee.default=be},ZJlW:function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___XZ1Hd",flex_space_between:"flex_space_between___2oG4i",flex_box_vertical_center:"flex_box_vertical_center___1UWtb",flex_box_center_end:"flex_box_center_end___1o2xT",flex_box_column:"flex_box_column___SlAE0",list:"list___1HvWe",wrap:"wrap___10sri",lockWrap:"lockWrap___2djiu",li:"li___2W_zn",cover:"cover___2FS3L",img:"img___cyxrw",sign:"sign___1cxDK",name:"name___3tYlu",e:"e___1-orw",unit:"unit___ycOgg",tags:"tags___2FRpJ",tag:"tag___1e0XO"}},ZW9T:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return U});var ae=H("k1fw"),X=H("oBTY"),k=H("miYZ"),G=H("tsqr"),b=H("rAM+"),N=H("tJVT"),K=H("PpiC"),W=H("q1tI"),n=H.n(W),I=H("bdgK"),y=H("9og8"),m=H("WmNS"),g=H.n(m),u={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"]},c={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"]},p={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(`
|
|
`)}]},l={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(`
|
|
`)}]},o=H("5VLF"),s=H.n(o),a={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"]}},A=function(J,ne){return ne.map(function(he){return{label:he,kind:J.languages.CompletionItemKind.Keyword,insertText:he}})},S=function(J){return Object.keys(a.tables).map(function(ne){return{label:ne,kind:J.languages.CompletionItemKind.Variable,insertText:ne}})},C=function(J,ne){var he=a.tables[J];return he?he.map(function(be){return{label:be,kind:ne.languages.CompletionItemKind.Field,insertText:be}}):[]};function L(_,J,ne,he,be){var Ke=J.getWordUntilPosition(ne),De={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:Ke.startColumn,endColumn:Ke.endColumn},je=he.map(function(Be){return{label:Be,kind:_.languages.CompletionItemKind.Keyword,insertText:Be,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:De}});return be.map(function(Be){je.push(Object(ae.a)(Object(ae.a)({},Be),{},{range:De}))}),je}var D=function(_){a.languages.map(function(be){return _.languages.registerDocumentFormattingEditProvider(be,{provideDocumentFormattingEdits:function(De,je,Be){return Object(y.a)(g.a.mark(function Ge(){var _e;return g.a.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return _e=s()(De.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}),M.abrupt("return",[{range:De.getFullModelRange(),text:_e}]);case 2:case"end":return M.stop()}},Ge)}))()}}),be});var J=p.quickKey.map(function(be){return{label:be.label,kind:_.languages.CompletionItemKind.Method,insertText:be.content,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ne=l.quickKey.map(function(be){return{label:be.label,kind:_.languages.CompletionItemKind.Method,insertText:be.content,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),he=c.quickKey.map(function(be){return{label:be.label,kind:_.languages.CompletionItemKind.Method,insertText:be.content,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet}});_.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ke,De){var je=Ke.getWordUntilPosition(De),Be={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:je.startColumn,endColumn:je.endColumn},Ge=Ke.getLineContent(De.lineNumber).substring(je.startColumn-2,je.endColumn);return{suggestions:[].concat(Object(X.a)(p.keywords.map(function(_e){return{label:_e,kind:_.languages.CompletionItemKind.Function,documentation:_e,insertText:_e,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})),Object(X.a)(p.quickKey.map(function(_e){return{label:_e.label,kind:_.languages.CompletionItemKind.Function,documentation:_e.content,insertText:Ge.startsWith("#")?_e.content.replace(/#/,""):_e.content,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})))}}}),_.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ke,De){var je=Ke.getWordUntilPosition(De),Be={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:je.startColumn,endColumn:je.endColumn};return{suggestions:Object(X.a)(u.keywords.map(function(Ge){return{label:Ge,kind:_.languages.CompletionItemKind.Function,documentation:Ge,insertText:Ge,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}}))}}}),_.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ke,De){var je=Ke.getWordUntilPosition(De),Be={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:je.startColumn,endColumn:je.endColumn},Ge=Ke.getLineContent(De.lineNumber).substring(je.startColumn-2,je.endColumn);return{suggestions:[].concat(Object(X.a)(c.keywords.map(function(_e){return{label:_e,kind:_.languages.CompletionItemKind.Function,documentation:_e,insertText:_e,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})),Object(X.a)(c.quickKey.map(function(_e){return{label:_e.label,kind:_.languages.CompletionItemKind.Function,documentation:_e.content,insertText:Ge.startsWith("#")?_e.content.replace(/#/,""):_e.content,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})))}}}),_.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ke,De){var je=Ke.getWordUntilPosition(De),Be={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:je.startColumn,endColumn:je.endColumn},Ge=Ke.getLineContent(De.lineNumber).substring(je.startColumn-2,je.endColumn);return{suggestions:[].concat(Object(X.a)(l.keywords.map(function(_e){return{label:_e,kind:_.languages.CompletionItemKind.Function,documentation:_e,insertText:_e,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})),Object(X.a)(l.quickKey.map(function(_e){return{label:_e.label,kind:_.languages.CompletionItemKind.Function,documentation:_e.content,insertText:Ge.startsWith("#")?_e.content.replace(/#/,""):_e.content,insertTextRules:_.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Be}})))}}})},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=H("fjLI"),x=H("LvDl"),d=H("+ua5");function E(_){return/^\d+$/.test(_)?"".concat(_,"px"):_}function f(){}var v=!1,T={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function B(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],J=_;if(Array.isArray(_)){for(var ne=0;ne<_.length;ne++){var he=T[_[ne]];if(he)return he}return J[0]}return T[J]||J}var R=null,j=Ee.b=function(_){var J=_.width,ne=J===void 0?"100%":J,he=_.height,be=he===void 0?"100%":he,Ke=_.value,De=_.language,je=De===void 0?"javascript":De,Be=_.style,Ge=Be===void 0?{}:Be,_e=_.options,Y=_e===void 0?{}:_e,M=_.overrideServices,F=M===void 0?{}:M,Q=_.theme,te=Q===void 0?"vs-dark":Q,V=_.onEditBlur,ge=_.onSave,Ue=_.autoHeight,Ye=Ue===void 0?!1:Ue,de=_.forbidCopy,xe=de===void 0?!1:de,Me=_.onChange,Fe=Me===void 0?f:Me,$e=_.editorDidMount,st=$e===void 0?f:$e,mt=_.onFocus,ut=mt===void 0?f:mt,Pt=_.filename,Et=Pt===void 0?"educoder.txt":Pt,At=_.errorLine,Je=_.errorContent,Kt=Je===void 0?"":Je,Bt=Object(K.a)(_,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),ce=Object(W.useRef)(),q=Object(W.useRef)({}),ee=Object(W.useRef)(),oe=Object(W.useRef)(),fe=Object(W.useRef)(!1),ie=Object(W.useRef)(),le=Object(W.useState)(!1),me=Object(N.a)(le,2),ve=me[0],Ae=me[1];function Re(){var Rt;return ce.current&&(Rt=new I.default(function(Ve){var ft=Object(b.a)(Ve),xt;try{for(ft.s();!(xt=ft.n()).done;){var Lt=xt.value;(Lt.target.offsetHeight>0||Lt.target.offsetWidth>0)&&q.current.instance.layout()}}catch(Ct){ft.e(Ct)}finally{ft.f()}}),Rt.observe(ce.current)),Rt}function Pe(){G.b.warn(decodeURIComponent(O))}var it=function(){var Ve=q.current.instance;if(Ke!=null&&Ve&&ve){var ft=Ve.getModel();ft&&Ke!==ft.getValue()&&(v=!0,ft.setValue(Ke),Ve.layout(),v=!1)}};Object(W.useEffect)(function(){oe.current&&clearTimeout(oe.current),oe.current=setTimeout(function(){it()},500)},[Ke,ve,q.current]),Object(W.useEffect)(function(){if(At&&q.current&&q.current.instance){var Rt=q.current.instance;Rt.changeViewZones(function(ft){var xt=document.createElement("div");xt.style.padding="10px 20px",xt.style.width="calc(100% - 20px)",xt.className="my-error-line-wrp",xt.innerHTML=Kt,ft.addZone({afterLineNumber:At||11,heightInLines:3,domNode:xt})});var Ve={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}};Rt.addOverlayWidget(Ve),Rt.revealPositionInCenter({lineNumber:20,column:1})}},[At,q.current,ve]);function ct(){var Rt=q.current.instance;if(Rt){var Ve=Rt.getSelection(),ft=q.current.pastePos||{},xt=new R.Range(ft.startLineNumber||Ve.endLineNumber,ft.startColumn||Ve.endColumn,ft.endLineNumber||Ve.endLineNumber,ft.endColumn||Ve.endColumn);setTimeout(function(){Rt.executeEdits("",[{range:xt,text:""}])},300)}}function Ot(Rt){(window.navigator.platform.match("Mac")?Rt.metaKey:Rt.ctrlKey)&&Rt.keyCode==83&&(Rt.preventDefault(),ge())}var $t=function(){if(Ye&&q.current.instance){var Ve=q.current.instance.getContentHeight();xn(Ve<be?be:Ve)}else xn(be)};function bt(Rt){var Ve=document.createEvent("MouseEvents");Ve.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Rt.dispatchEvent(Ve)}function Ze(Rt,Ve){var ft=window.URL||window.webkitURL||window,xt=new Blob([Ve]),Lt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Lt.href=ft.createObjectURL(xt),Lt.download=Rt,bt(Lt)}Object(W.useEffect)(function(){$t()},[$t]),Object(W.useEffect)(function(){ce.current&&!ve&&Promise.all([H.e(18),H.e(29)]).then(H.t.bind(null,"M/lh",7)).then(function(Rt){try{R=Rt,q.current.instance=R.editor.create(ce.current,{value:Ke,language:B(je),theme:te,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},F);var Ve=q.current.instance,ft=w.d._menuItems,xt=Object(X.a)(ft).find(function(wt){return wt[0]._debugName=="EditorContext"}),Lt=xt[1],Ct=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],et=function(gt,dt){var Nt=gt._first;do{var Zt,Yt,Qe=dt.includes((Zt=Nt.element)===null||Zt===void 0||((Yt=Zt.command)===null||Yt===void 0)?void 0:Yt.id);Qe&>._remove(Nt)}while(Nt=Nt.next)};if(st(Ve,R),setTimeout(function(){$t(),q.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ze(Et||"educoder.txt",Ve.getValue())}}),Ve.getDomNode().addEventListener("input",function(){ee.current.autoFormat&&Ve.getAction("editor.action.formatDocument").run()})},500),q.current.subscription=Ve.onDidChangeModelContent(function(wt){fe.current?clearTimeout(ie.current):($t(),Fe(Ve.getValue(),wt)),ie.current=setTimeout(function(){fe.current=!1},500)}),window.Monaco||D(R,B(je)),xe&&(et(Lt,Ct),ce.current.classList.add("noCopyPaste"),Ve.onKeyDown(function(wt){var gt=wt.keyCode,dt=wt.ctrlKey,Nt=wt.metaKey;(gt===33||gt===52)&&(Nt||dt)&&(Pe(),wt.preventDefault())})),window.Monaco=R,V&&Ve.onDidBlurEditorWidget(function(){V(Ve.getValue())}),ut&&Ve.onDidFocusEditorText(function(){ut(Ve.getValue())}),xe){Ve.addCommand(R.KeyMod.CtrlCmd|R.KeyCode.KEY_V,function(){return Pe(),null}),Ve.onDidPaste(function(wt){q.current.pastePos=wt});try{window.addEventListener("paste",ct)}catch(wt){}}var Tt=Re();return Ae(!0),function(){var wt=q.current.instance;wt.dispose();var gt=wt.getModel();gt&>.dispose(),q.current.subscription&&q.current.subscription.dispose(),xe&&window.removeEventListener("paste",ct),Tt.unobserve(ce.current)}}catch(wt){}})},[]),Object(W.useEffect)(function(){var Rt=q.current.instance;if(Rt&&ve)return document.addEventListener("keydown",Ot,!1),function(){document.removeEventListener("keydown",Ot)}},[ge,ve]),Object(W.useEffect)(function(){var Rt=q.current.instance;if(Rt&&ve){var Ve=B(je);R.editor.setModelLanguage(Rt.getModel(),Ve),console.log("language:",je,Rt.getModel(),Ve)}},[je,ve]),Object(W.useEffect)(function(){var Rt=q.current.instance;Rt&&ve&&R.editor.setTheme(te)},[te,ve]),Object(W.useEffect)(function(){var Rt=q.current.instance;ee.current=Y,Rt&&ve&&(Rt.updateOptions(Object(ae.a)({},Y)),setTimeout(function(){Rt.getModel().updateOptions(Object(ae.a)({},Y))},200))},[JSON.stringify(Y),ve]),Object(W.useEffect)(function(){var Rt=q.current.instance;Rt&&ve&&Rt.layout()},[ne,be,ve]);var vn=Object(W.useState)(E(ne)),Xe=Object(N.a)(vn,2),bn=Xe[0],mn=Xe[1],Gt=Object(W.useState)(E(be)),qt=Object(N.a)(Gt,2),gn=qt[0],xn=qt[1],Ln=Object(ae.a)(Object(ae.a)({},Ge),{},{width:bn,height:gn});return n.a.createElement("div",{className:"my-monaco-editor",ref:ce,style:Ln})};function U(_){var J=_.width,ne=J===void 0?"100%":J,he=_.height,be=he===void 0?"100%":he,Ke=_.original,De=_.modified,je=_.language,Be=_.options,Ge=Be===void 0?{}:Be,_e=Object(W.useRef)(),Y=Object(W.useState)(null),M=Object(N.a)(Y,2),F=M[0],Q=M[1];function te(Ye){var de;return _e.current&&(de=new I.default(function(xe){var Me=Object(b.a)(xe),Fe;try{for(Me.s();!(Fe=Me.n()).done;){var $e=Fe.value;($e.target.offsetHeight>0||$e.target.offsetWidth>0)&&Ye.layout()}}catch(st){Me.e(st)}finally{Me.f()}}),de.observe(_e.current)),de}Object(W.useEffect)(function(){_e.current&&Promise.all([H.e(18),H.e(29)]).then(H.t.bind(null,"M/lh",7)).then(function(Ye){R=Ye;var de=R.editor.createDiffEditor(_e.current,Object(ae.a)(Object(ae.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},Ge),{},{wordWrap:!0}));Q(de);var xe=te(de);return function(){de.dispose();var Me=de.getModel();Me&&Me.dispose(),xe.unobserve(_e.current)}})},[]),Object(W.useEffect)(function(){F&&F.setModel({original:R.editor.createModel(Ke,je),modified:R.editor.createModel(De,je)})},[Ke,De,je,F]);var V=E(ne),ge=E(be),Ue={width:V,height:ge};return n.a.createElement("div",{className:"my-diff-editor",ref:_e,style:Ue})}},bT9E:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return X});var ae=H("VTBJ");function X(k,G){var b=Object(ae.a)({},k);return Array.isArray(G)&&G.forEach(function(N){delete b[N]}),b}},c5Ni:function(tt,Ee,H){},cFMs:function(tt,Ee){tt.exports="data:image/png;base64,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"},cz0n:function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___G8W6i",flex_space_between:"flex_space_between___1p_ZB",flex_box_vertical_center:"flex_box_vertical_center___2wivF",flex_box_center_end:"flex_box_center_end___y5a20",flex_box_column:"flex_box_column___6oXp3",tabs:"tabs___sKski",active:"active___10xGM"}},dejd:function(tt,Ee,H){},dmUQ:function(tt,Ee,H){"use strict";var ae=H("Ff2n"),X=H("rePB"),k=H("1OyB"),G=H("vuIU"),b=H("Ji7U"),N=H("md7G"),K=H("foSv"),W=H("q1tI"),n=H.n(W),I=H("TSYQ"),y=H.n(I),m=H("4IlW");function g(x,d){var E=Object.keys(x);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(x);d&&(f=f.filter(function(v){return Object.getOwnPropertyDescriptor(x,v).enumerable})),E.push.apply(E,f)}return E}function u(x){for(var d=1;d<arguments.length;d++){var E=arguments[d]!=null?arguments[d]:{};d%2?g(Object(E),!0).forEach(function(f){Object(X.a)(x,f,E[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(E)):g(Object(E)).forEach(function(f){Object.defineProperty(x,f,Object.getOwnPropertyDescriptor(E,f))})}return x}function c(x){var d=p();return function(){var f=Object(K.a)(x),v;if(d){var T=Object(K.a)(this).constructor;v=Reflect.construct(f,arguments,T)}else v=f.apply(this,arguments);return Object(N.a)(this,v)}}function p(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(x){return!1}}function l(){}function o(x){x.preventDefault()}var s=function(d){return d.replace(/[^\w.-]+/g,"")},a=200,A=600,S=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,C=function(d){return d!=null},L=function(d,E){return E===d||typeof E=="number"&&typeof d=="number"&&isNaN(E)&&isNaN(d)},D=function(x){Object(b.a)(E,x);var d=c(E);function E(f){var v;Object(k.a)(this,E),v=d.call(this,f),v.onKeyDown=function(R){var j=v.props,U=j.onKeyDown,_=j.onPressEnter;if(R.keyCode===m.a.UP){var J=v.getRatio(R);v.up(R,J,null),v.stop()}else if(R.keyCode===m.a.DOWN){var ne=v.getRatio(R);v.down(R,ne,null),v.stop()}else R.keyCode===m.a.ENTER&&_&&_(R);if(v.recordCursorPosition(),v.lastKeyCode=R.keyCode,U){for(var he=arguments.length,be=new Array(he>1?he-1:0),Ke=1;Ke<he;Ke++)be[Ke-1]=arguments[Ke];U.apply(void 0,[R].concat(be))}},v.onKeyUp=function(R){var j=v.props.onKeyUp;if(v.stop(),v.recordCursorPosition(),j){for(var U=arguments.length,_=new Array(U>1?U-1:0),J=1;J<U;J++)_[J-1]=arguments[J];j.apply(void 0,[R].concat(_))}},v.onChange=function(R){var j=v.props.onChange;v.state.focused&&(v.inputting=!0),v.rawInput=v.props.parser(v.getValueFromEvent(R)),v.setState({inputValue:v.rawInput}),j(v.toNumber(v.rawInput))},v.onMouseUp=function(){var R=v.props.onMouseUp;v.recordCursorPosition(),R&&R.apply(void 0,arguments)},v.onFocus=function(){var R;v.setState({focused:!0}),(R=v.props).onFocus.apply(R,arguments)},v.onBlur=function(){var R=v.props.onBlur;v.inputting=!1,v.setState({focused:!1});var j=v.getCurrentValidValue(v.state.inputValue),U=v.setValue(j,l);if(R){var _=v.input.value,J=v.getInputDisplayValue({focus:!1,value:U});v.input.value=J&&Number(J),R.apply(void 0,arguments),v.input.value=_}},v.getRatio=function(R){var j=1;return R.metaKey||R.ctrlKey?j=.1:R.shiftKey&&(j=10),j},v.getFullNum=function(R){return isNaN(R)?R:/e/i.test(String(R))?Number(R).toFixed(18).replace(/\.?0+$/,""):R},v.getPrecision=function(R){if(C(v.props.precision))return v.props.precision;var j=String(R);if(j.indexOf("e-")>=0)return parseInt(j.slice(j.indexOf("e-")+2),10);var U=0;return j.indexOf(".")>=0&&(U=j.length-j.indexOf(".")-1),U},v.getInputDisplayValue=function(R){var j=R||v.state,U=j.focused,_=j.inputValue,J=j.value,ne;U?ne=_:ne=v.toPrecisionAsStep(J),ne==null&&(ne="");var he=v.formatWrapper(ne);return C(v.props.decimalSeparator)&&(he=he.toString().replace(".",v.props.decimalSeparator)),he},v.recordCursorPosition=function(){try{v.cursorStart=v.input.selectionStart,v.cursorEnd=v.input.selectionEnd,v.currentValue=v.input.value,v.cursorBefore=v.input.value.substring(0,v.cursorStart),v.cursorAfter=v.input.value.substring(v.cursorEnd)}catch(R){}},v.restoreByAfter=function(R){if(R===void 0)return!1;var j=v.input.value,U=j.lastIndexOf(R);if(U===-1)return!1;var _=v.cursorBefore.length;return v.lastKeyCode===m.a.DELETE&&v.cursorBefore.charAt(_-1)===R[0]?(v.fixCaret(_,_),!0):U+R.length===j.length?(v.fixCaret(U,U),!0):!1},v.partRestoreByAfter=function(R){return R===void 0?!1:Array.prototype.some.call(R,function(j,U){var _=R.substring(U);return v.restoreByAfter(_)})},v.isNotCompleteNumber=function(R){return isNaN(R)||R===""||R===null||R&&R.toString().indexOf(".")===R.toString().length-1},v.stop=function(){v.autoStepTimer&&clearTimeout(v.autoStepTimer)},v.down=function(R,j,U){v.pressingUpOrDown=!0,v.step("down",R,j,U)},v.up=function(R,j,U){v.pressingUpOrDown=!0,v.step("up",R,j,U)},v.saveInput=function(R){v.input=R};var T=f.value;T===void 0&&(T=f.defaultValue),v.state={focused:f.autoFocus};var B=v.getValidValue(v.toNumber(T));return v.state=u(u({},v.state),{},{inputValue:v.toPrecisionAsStep(B),value:B}),v}return Object(G.a)(E,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(v){var T=this.props,B=T.value,R=T.onChange,j=T.max,U=T.min,_=this.state.focused;if(v){if(!L(v.value,B)||!L(v.max,j)||!L(v.min,U)){var J=_?B:this.getValidValue(B),ne;this.pressingUpOrDown?ne=J:this.inputting?ne=this.rawInput:ne=this.toPrecisionAsStep(J),this.setState({value:J,inputValue:ne})}var he="value"in this.props?B:this.state.value;"max"in this.props&&v.max!==j&&typeof he=="number"&&he>j&&R&&R(j),"min"in this.props&&v.min!==U&&typeof he=="number"&&he<U&&R&&R(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var be=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===m.a.BACKSPACE?be=this.cursorStart-1:this.lastKeyCode===m.a.DELETE&&(be=this.cursorStart):be=this.input.value.length,this.fixCaret(be,be)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case m.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case m.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ke){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(v){var T=v;return T===""?T="":this.isNotCompleteNumber(parseFloat(T))?T=this.state.value:T=this.getValidValue(T),this.toNumber(T)}},{key:"getValueFromEvent",value:function(v){var T=v.target.value.trim().replace(/。/g,".");return C(this.props.decimalSeparator)&&(T=T.replace(this.props.decimalSeparator,".")),T}},{key:"getValidValue",value:function(v){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,R=parseFloat(v);return isNaN(R)?v:(R<T&&(R=T),R>B&&(R=B),R)}},{key:"setValue",value:function(v,T){var B=this.props.precision,R=this.isNotCompleteNumber(parseFloat(v))?null:parseFloat(v),j=this.state.value,U=j===void 0?null:j,_=this.state.inputValue,J=_===void 0?null:_,ne=typeof R=="number"?R.toFixed(B):"".concat(R),he=R!==U||ne!=="".concat(J);return"value"in this.props?(J=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:J},T)):this.setState({value:R,inputValue:this.toPrecisionAsStep(v)},T),he&&this.props.onChange(R),R}},{key:"getMaxPrecision",value:function(v){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,B=this.props,R=B.precision,j=B.step;if(C(R))return R;var U=this.getPrecision(T),_=this.getPrecision(j),J=this.getPrecision(v);return v?Math.max(J,U+_):U+_}},{key:"getPrecisionFactor",value:function(v){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,B=this.getMaxPrecision(v,T);return Math.pow(10,B)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(v){return this.props.formatter?this.props.formatter(v):v}},{key:"toPrecisionAsStep",value:function(v){if(this.isNotCompleteNumber(v)||v==="")return v;var T=Math.abs(this.getMaxPrecision(v));return isNaN(T)?v.toString():Number(v).toFixed(T)}},{key:"toNumber",value:function(v){var T=this.props.precision,B=this.state.focused,R=v&&v.length>16&&B;return this.isNotCompleteNumber(v)||R?v:C(T)?Math.round(v*Math.pow(10,T))/Math.pow(10,T):Number(v)}},{key:"upStep",value:function(v,T){var B=this.props.step,R=this.getPrecisionFactor(v,T),j=Math.abs(this.getMaxPrecision(v,T)),U=((R*v+R*B*T)/R).toFixed(j);return this.toNumber(U)}},{key:"downStep",value:function(v,T){var B=this.props.step,R=this.getPrecisionFactor(v,T),j=Math.abs(this.getMaxPrecision(v,T)),U=((R*v-R*B*T)/R).toFixed(j);return this.toNumber(U)}},{key:"step",value:function(v,T){var B=this,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=arguments.length>3?arguments[3]:void 0;this.stop(),T&&(T.persist(),T.preventDefault());var U=this.props;if(U.disabled)return;var _=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(_))return;var J=this["".concat(v,"Step")](_,R),ne=J>U.max||J<U.min;if(J>U.max?J=U.max:J<U.min&&(J=U.min),this.setValue(J,null),this.setState({focused:!0},function(){B.pressingUpOrDown=!1}),ne)return;this.autoStepTimer=setTimeout(function(){B[v](T,R,!0)},j?a:A)}},{key:"fixCaret",value:function(v,T){if(v===void 0||T===void 0||!this.input||!this.input.value)return;try{var B=this.input.selectionStart,R=this.input.selectionEnd;(v!==B||T!==R)&&this.input.setSelectionRange(v,T)}catch(j){}}},{key:"render",value:function(){var v,T=this.props,B=T.prefixCls,R=T.disabled,j=T.readOnly,U=T.useTouch,_=T.autoComplete,J=T.upHandler,ne=T.downHandler,he=T.className,be=T.max,Ke=T.min,De=T.style,je=T.title,Be=T.onMouseEnter,Ge=T.onMouseLeave,_e=T.onMouseOver,Y=T.onMouseOut,M=T.required,F=T.onClick,Q=T.tabIndex,te=T.type,V=T.placeholder,ge=T.id,Ue=T.inputMode,Ye=T.pattern,de=T.step,xe=T.maxLength,Me=T.autoFocus,Fe=T.name,$e=T.onPaste,st=T.onInput,mt=Object(ae.a)(T,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),ut=this.state,Pt=ut.value,Et=ut.focused,At=y()(B,(v={},Object(X.a)(v,he,!!he),Object(X.a)(v,"".concat(B,"-disabled"),R),Object(X.a)(v,"".concat(B,"-focused"),Et),v)),Je={};Object.keys(mt).forEach(function(ve){(ve.substr(0,5)==="data-"||ve.substr(0,5)==="aria-"||ve==="role")&&(Je[ve]=mt[ve])});var Kt=!j&&!R,Bt=this.getInputDisplayValue(null),ce=(Pt||Pt===0)&&(isNaN(Pt)||Number(Pt)>=be),q=(Pt||Pt===0)&&(isNaN(Pt)||Number(Pt)<=Ke),ee=ce||R||j,oe=q||R||j,fe=y()("".concat(B,"-handler"),"".concat(B,"-handler-up"),Object(X.a)({},"".concat(B,"-handler-up-disabled"),ee)),ie=y()("".concat(B,"-handler"),"".concat(B,"-handler-down"),Object(X.a)({},"".concat(B,"-handler-down-disabled"),oe)),le=U?{onTouchStart:ee?l:this.up,onTouchEnd:this.stop}:{onMouseDown:ee?l:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},me=U?{onTouchStart:oe?l:this.down,onTouchEnd:this.stop}:{onMouseDown:oe?l:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return n.a.createElement("div",{className:At,style:De,title:je,onMouseEnter:Be,onMouseLeave:Ge,onMouseOver:_e,onMouseOut:Y,onFocus:function(){return null},onBlur:function(){return null}},n.a.createElement("div",{className:"".concat(B,"-handler-wrap")},n.a.createElement("span",Object.assign({unselectable:"on"},le,{role:"button","aria-label":"Increase Value","aria-disabled":ee,className:fe}),J||n.a.createElement("span",{unselectable:"on",className:"".concat(B,"-handler-up-inner"),onClick:o})),n.a.createElement("span",Object.assign({unselectable:"on"},me,{role:"button","aria-label":"Decrease Value","aria-disabled":oe,className:ie}),ne||n.a.createElement("span",{unselectable:"on",className:"".concat(B,"-handler-down-inner"),onClick:o}))),n.a.createElement("div",{className:"".concat(B,"-input-wrap")},n.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ke,"aria-valuemax":be,"aria-valuenow":Pt,required:M,type:te,placeholder:V,onPaste:$e,onClick:F,onMouseUp:this.onMouseUp,className:"".concat(B,"-input"),tabIndex:Q,autoComplete:_,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Kt?this.onKeyDown:l,onKeyUp:Kt?this.onKeyUp:l,autoFocus:Me,maxLength:xe,readOnly:j,disabled:R,max:be,min:Ke,step:de,name:Fe,title:je,id:ge,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Bt),pattern:Ye,inputMode:Ue,onInput:st},Je))))}}]),E}(n.a.Component);D.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:S,min:-S,step:1,style:{},onChange:l,onKeyDown:l,onPressEnter:l,onFocus:l,onBlur:l,parser:s,required:!1,autoComplete:"off"};var O=D,w=Ee.a=O},"f0W+":function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___2AWuG",flex_space_between:"flex_space_between___4j1zo",flex_box_vertical_center:"flex_box_vertical_center___3dWcm",flex_box_center_end:"flex_box_center_end___qvHJi",flex_box_column:"flex_box_column___3Eier",tabs:"tabs___25WKT",tabsWrap:"tabsWrap___2lPJE",active:"active___gGp9s"}},f9pc:function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___fO1Sq",flex_space_between:"flex_space_between___2MANs",flex_box_vertical_center:"flex_box_vertical_center___2x-su",flex_box_center_end:"flex_box_center_end___6bZNq",flex_box_column:"flex_box_column___CGTHC",quickPager:"quickPager___2XH6F",disabled:"disabled___2gPWV"}},fJjg:function(tt,Ee,H){"use strict";var ae=H("2qtc"),X=H("kLXV"),k=H("7Kak"),G=H("9yH6"),b=H("k1fw"),N=H("miYZ"),K=H("tsqr"),W=H("9og8"),n=H("tJVT"),I=H("PpiC"),y=H("5NDa"),m=H("5rEg"),g=H("WmNS"),u=H.n(g),c=H("q1tI"),p=H.n(c),l=H("9kvl"),o=H("Nska"),s=H.n(o),a=H("1vsH"),A=H("Nf5h"),S=H("Fhpe"),C=H.n(S),L=m.a.Search,D=function(w){var x=w.userDetail,d=w.globalSetting,E=w.loading,f=w.dispatch,v=Object(I.a)(w,["userDetail","globalSetting","loading","dispatch"]),T=Object(c.useState)(""),B=Object(n.a)(T,2),R=B[0],j=B[1],U=Object(c.useState)([]),_=Object(n.a)(U,2),J=_[0],ne=_[1],he=Object(c.useState)(),be=Object(n.a)(he,2),Ke=be[0],De=be[1],je=Object(c.useState)(!1),Be=Object(n.a)(je,2),Ge=Be[0],_e=Be[1];Object(c.useEffect)(function(){Y()},[]);var Y=function(){var F=Object(W.a)(u.a.mark(function Q(){var te;return u.a.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return ge.next=2,f({type:"userDetail/topicGetCourseList",payload:{search:R}});case 2:te=ge.sent,te&&ne((te==null?void 0:te.courses)||[]);case 4:case"end":return ge.stop()}},Q)}));return function(){return F.apply(this,arguments)}}(),M=function(){var F=Object(W.a)(u.a.mark(function Q(){var te,V,ge,Ue,Ye;return u.a.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(Ke){xe.next=4;break}return K.b.info("\u60A8\u9700\u8981\u521B\u5EFA\u8BFE\u5802\uFF0C\u624D\u80FD\u53D1\u9001"),_e(!0),xe.abrupt("return");case 4:return xe.next=6,f({type:"userDetail/topicSendToClass",payload:Object(b.a)({course_id:Ke},(te=x.actionTabs)===null||te===void 0?void 0:te.params)});case 6:V=xe.sent,f({type:"userDetail/setActionTabs",payload:{}}),V&&V.status===0&&(Ye={normal:"common_homework",group:"group_homework",exercise:"exercise",poll:"poll"},Object(a.S)("/classrooms/".concat(Ke,"/").concat(Ye[(ge=x.actionTabs)===null||ge===void 0||((Ue=ge.params)===null||Ue===void 0)?void 0:Ue.object_type])));case 9:case"end":return xe.stop()}},Q)}));return function(){return F.apply(this,arguments)}}();return p.a.createElement(X.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:x.actionTabs.key==="UserDetail-SendToClass",title:"\u53D1\u9001\u81F3\u8BFE\u5802",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:E["userDetail/sendToClass"],width:600,onOk:M,wrapClassName:C.a.CustomCss,onCancel:function(){f({type:"userDetail/setActionTabs",payload:{}})}},p.a.createElement("div",{className:s.a.wrap},p.a.createElement("div",{className:"mb10"},p.a.createElement(A.f,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:R,style:{width:500},onChange:function(Q){j(Q),Y()}})),p.a.createElement("div",{className:s.a.radioWrap},p.a.createElement(G.a.Group,{value:Ke,onChange:function(Q){De(Q.target.value),_e(!1)}},J.map(function(F,Q){return p.a.createElement(G.a,{className:s.a.radio,value:F.course_id,key:F.course_id},F.course_name)}))),p.a.createElement("div",{className:s.a.title},"\u6E29\u99A8\u63D0\u793A\uFF1A\u9009\u62E9\u7684\u9898\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802"),Ge&&p.a.createElement("div",{className:s.a.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u8BFE\u5802")))};Ee.a=Object(l.a)(function(O){var w=O.userDetail,x=O.loading,d=O.globalSetting;return{userDetail:w,globalSetting:d,loading:x.effects}})(D)},fgAr:function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___3W32R",flex_space_between:"flex_space_between___2uUoZ",flex_box_vertical_center:"flex_box_vertical_center___3Oxpz",flex_box_center_end:"flex_box_center_end___2tkyR",flex_box_column:"flex_box_column___2IFiF",btns:"btns___1c8D8",confirm:"confirm___2gIuB",cancel:"cancel___1ssuo"}},fjLI:function(tt,Ee,H){"use strict";H.d(Ee,"f",function(){return g}),H.d(Ee,"b",function(){return u}),H.d(Ee,"a",function(){return c}),H.d(Ee,"d",function(){return p}),H.d(Ee,"e",function(){return l}),H.d(Ee,"c",function(){return o});var ae=H("8HAY"),X=H("Vhoy"),k=H("MI8n"),G=H("JYp7"),b=H("pmY6"),N=H("24hK"),K=H("nnTU"),W=H("T8No"),n=H("Cg/j"),I=H("t9D7"),y=function(s,a,A,S){var C=arguments.length,L=C<3?a:S===null?S=Object.getOwnPropertyDescriptor(a,A):S,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(s,a,A,S);else for(var O=s.length-1;O>=0;O--)(D=s[O])&&(L=(C<3?D(L):C>3?D(a,A,L):D(a,A))||L);return C>3&&L&&Object.defineProperty(a,A,L),L},m=function(s,a){return function(A,S){a(A,S,s)}};function g(s){return s.command!==void 0}class u{constructor(s){this.id=u._idPool++,this._debugName=s}}u._idPool=0,u.CommandPalette=new u("CommandPalette"),u.EditorContext=new u("EditorContext"),u.SimpleEditorContext=new u("SimpleEditorContext"),u.EditorContextCopy=new u("EditorContextCopy"),u.EditorContextPeek=new u("EditorContextPeek"),u.MenubarEditMenu=new u("MenubarEditMenu"),u.MenubarCopy=new u("MenubarCopy"),u.MenubarGoMenu=new u("MenubarGoMenu"),u.MenubarSelectionMenu=new u("MenubarSelectionMenu"),u.InlineCompletionsActions=new u("InlineCompletionsActions");const c=Object(n.c)("menuService"),p=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new k.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:s=>s===u.CommandPalette}}addCommand(s){return this.addCommands(G.a.single(s))}addCommands(s){for(const a of s)this._commands.set(a.id,a);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(b.i)(()=>{let a=!1;for(const A of s)a=this._commands.delete(A.id)||a;a&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((a,A)=>s.set(A,a)),s}appendMenuItem(s,a){return this.appendMenuItems(G.a.single({id:s,item:a}))}appendMenuItems(s){const a=new Set,A=new N.a;for(const{id:S,item:C}of s){let L=this._menuItems.get(S);L||(L=new N.a,this._menuItems.set(S,L)),A.push(L.push(C)),a.add(S)}return this._onDidChangeMenu.fire(a),Object(b.i)(()=>{if(A.size>0){for(let S of A)S();this._onDidChangeMenu.fire(a),A.clear()}})}getMenuItems(s){let a;return this._menuItems.has(s)?a=[...this._menuItems.get(s)]:a=[],s===u.CommandPalette&&this._appendImplicitItems(a),a}_appendImplicitItems(s){const a=new Set;for(const A of s)g(A)&&(a.add(A.command.id),A.alt&&a.add(A.alt.id));this._commands.forEach((A,S)=>{a.has(S)||s.push({command:A})})}};class l extends ae.e{constructor(s,a,A,S){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=a,this._contextKeyService=A,this._options=S}get actions(){const s=[],a=this._menuService.createMenu(this.item.submenu,this._contextKeyService),A=a.getActions(this._options);a.dispose();for(const[,S]of A)S.length>0&&(s.push(...S),s.push(new ae.d));return s.length&&s.pop(),s}}let o=class s{constructor(a,A,S,C,L){var D,O;if(this._commandService=L,this.id=a.id,this.label=(S==null?void 0:S.renderShortTitle)&&a.shortTitle?typeof a.shortTitle=="string"?a.shortTitle:a.shortTitle.value:typeof a.title=="string"?a.title:a.title.value,this.tooltip=(O=typeof a.tooltip=="string"?a.tooltip:(D=a.tooltip)===null||D===void 0?void 0:D.value)!==null&&O!==void 0?O:"",this.enabled=!a.precondition||C.contextMatchesRules(a.precondition),this.checked=void 0,a.toggled){const w=a.toggled.condition?a.toggled:{condition:a.toggled};this.checked=C.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=a,this.alt=A?new s(A,void 0,S,C,L):void 0,this._options=S,I.d.isThemeIcon(a.icon)&&(this.class=X.a.asClassName(a.icon))}dispose(){}run(...a){var A,S;let C=[];return((A=this._options)===null||A===void 0?void 0:A.arg)&&(C=[...C,this._options.arg]),((S=this._options)===null||S===void 0?void 0:S.shouldForwardArgs)&&(C=[...C,...a]),this._commandService.executeCommand(this.id,...C)}};o=y([m(3,W.b),m(4,K.b)],o)},"iL++":function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___2pHUo",flex_space_between:"flex_space_between___3Bfes",flex_box_vertical_center:"flex_box_vertical_center___1thiW",flex_box_center_end:"flex_box_center_end___3Zr7k",flex_box_column:"flex_box_column___3xe1a",list:"list___3rlGv",wrap:"wrap____oZzM",lockWrap:"lockWrap___24eY2",top:"top___3SCOc",sign:"sign____uZ_B",name:"name___2nHyM",img:"img___3Spn7",text:"text___1Pg2L",btns:"btns___Kr_Ti",bottom:"bottom___2_iOx"}},ic2d:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return G});var ae=H("FWmy"),X=H("746U");class k{constructor(){this.data=new Map}add(b,N){ae.a(X.l(b)),ae.a(X.k(N)),ae.a(!this.data.has(b),"There is already an extension with this id"),this.data.set(b,N)}as(b){return this.data.get(b)||null}}const G=new k},k3GJ:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return ys});var ae=H("rePB"),X=H("ODXe"),k=H("Ff2n"),G=H("VTBJ"),b=H("q1tI"),N=H("TSYQ"),K=H.n(N),W=H("Zm9Q"),n=H("6cGi"),I=H("KQm4"),y=H("xEkU"),m=H.n(y),g=H("t23M");function u(ye){var Le=Object(b.useRef)(),ke=Object(b.useRef)(!1);function Te(){for(var re=arguments.length,pe=new Array(re),ue=0;ue<re;ue++)pe[ue]=arguments[ue];ke.current||(m.a.cancel(Le.current),Le.current=m()(function(){ye.apply(void 0,pe)}))}return Object(b.useEffect)(function(){return function(){ke.current=!0,m.a.cancel(Le.current)}},[]),Te}function c(ye){var Le=Object(b.useRef)([]),ke=Object(b.useState)({}),Te=Object(X.a)(ke,2),re=Te[1],pe=Object(b.useRef)(typeof ye=="function"?ye():ye),ue=u(function(){var Ce=pe.current;Le.current.forEach(function(Ne){Ce=Ne(Ce)}),Le.current=[],pe.current=Ce,re({})});function Se(Ce){Le.current.push(Ce),ue()}return[pe.current,Se]}var p=H("4IlW");function l(ye,Le){var ke,Te=ye.prefixCls,re=ye.id,pe=ye.active,ue=ye.rtl,Se=ye.tab,Ce=Se.key,Ne=Se.tab,Ie=Se.disabled,We=Se.closeIcon,qe=ye.tabBarGutter,pt=ye.tabPosition,ht=ye.closable,It=ye.renderWrapper,hn=ye.removeAriaLabel,Cn=ye.editable,En=ye.onClick,Tn=ye.onRemove,An=ye.onFocus,Sn="".concat(Te,"-tab");b.useEffect(function(){return Tn},[]);var wn={};pt==="top"||pt==="bottom"?wn[ue?"marginLeft":"marginRight"]=qe:wn.marginBottom=qe;var Fn=Cn&&ht!==!1&&!Ie;function Mn(on){if(Ie)return;En(on)}function si(on){on.preventDefault(),on.stopPropagation(),Cn.onEdit("remove",{key:Ce,event:on})}var kn=b.createElement("div",{key:Ce,ref:Le,className:K()(Sn,(ke={},Object(ae.a)(ke,"".concat(Sn,"-with-remove"),Fn),Object(ae.a)(ke,"".concat(Sn,"-active"),pe),Object(ae.a)(ke,"".concat(Sn,"-disabled"),Ie),ke)),style:wn,onClick:Mn},b.createElement("div",{role:"tab","aria-selected":pe,id:re&&"".concat(re,"-tab-").concat(Ce),className:"".concat(Sn,"-btn"),"aria-controls":re&&"".concat(re,"-panel-").concat(Ce),"aria-disabled":Ie,tabIndex:Ie?null:0,onClick:function(tn){tn.stopPropagation(),Mn(tn)},onKeyDown:function(tn){[p.a.SPACE,p.a.ENTER].includes(tn.which)&&(tn.preventDefault(),Mn(tn))},onFocus:An},Ne),Fn&&b.createElement("button",{type:"button","aria-label":hn||"remove",tabIndex:0,className:"".concat(Sn,"-remove"),onClick:function(tn){tn.stopPropagation(),si(tn)}},We||Cn.removeIcon||"\xD7"));return It&&(kn=It(kn)),kn}var o=b.forwardRef(l),s={width:0,height:0,left:0,top:0};function a(ye,Le,ke){return Object(b.useMemo)(function(){for(var Te,re=new Map,pe=Le.get((Te=ye[0])===null||Te===void 0?void 0:Te.key)||s,ue=pe.left+pe.width,Se=0;Se<ye.length;Se+=1){var Ce=ye[Se].key,Ne=Le.get(Ce);if(!Ne){var Ie;Ne=Le.get((Ie=ye[Se-1])===null||Ie===void 0?void 0:Ie.key)||s}var We=re.get(Ce)||Object(G.a)({},Ne);We.right=ue-We.left-We.width,re.set(Ce,We)}return re},[ye.map(function(Te){return Te.key}).join("_"),Le,ke])}var A={width:0,height:0,left:0,top:0,right:0};function S(ye,Le,ke,Te,re){var pe=re.tabs,ue=re.tabPosition,Se=re.rtl,Ce,Ne,Ie;["top","bottom"].includes(ue)?(Ce="width",Ne=Se?"right":"left",Ie=Math.abs(Le.left)):(Ce="height",Ne="top",Ie=-Le.top);var We=Le[Ce],qe=ke[Ce],pt=Te[Ce],ht=We;return qe+pt>We&&(ht=We-pt),Object(b.useMemo)(function(){if(!pe.length)return[0,0];for(var It=pe.length,hn=It,Cn=0;Cn<It;Cn+=1){var En=ye.get(pe[Cn].key)||A;if(En[Ne]+En[Ce]>Ie+ht){hn=Cn-1;break}}for(var Tn=0,An=It-1;An>=0;An-=1){var Sn=ye.get(pe[An].key)||A;if(Sn[Ne]<Ie){Tn=An+1;break}}return[Tn,hn]},[ye,Ie,ht,ue,pe.map(function(It){return It.key}).join("_"),Se])}var C=H("wx14"),L=H("1OyB"),D=H("vuIU"),O=H("JX7q"),w=H("Ji7U"),x=H("LK+K"),d=H("I8Z2"),E=H("bT9E"),f=H("2GS6"),v=H("Gytx"),T=H.n(v),B=H("U8pU"),R=/iPhone/i,j=/iPod/i,U=/iPad/i,_=/\bAndroid(?:.+)Mobile\b/i,J=/Android/i,ne=/\bAndroid(?:.+)SD4930UR\b/i,he=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,be=/Windows Phone/i,Ke=/\bWindows(?:.+)ARM\b/i,De=/BlackBerry/i,je=/BB10/i,Be=/Opera Mini/i,Ge=/\b(CriOS|Chrome)(?:.+)Mobile/i,_e=/Mobile(?:.+)Firefox\b/i;function Y(ye,Le){return ye.test(Le)}function M(ye){var Le=ye||(typeof navigator!="undefined"?navigator.userAgent:""),ke=(Le||"").split("[FBAN");if(typeof ke[1]!="undefined"){var Te=ke,re=Object(X.a)(Te,1);Le=re[0]}if(ke=Le.split("Twitter"),typeof ke[1]!="undefined"){var pe=ke,ue=Object(X.a)(pe,1);Le=ue[0]}var Se={apple:{phone:Y(R,Le)&&!Y(be,Le),ipod:Y(j,Le),tablet:!Y(R,Le)&&Y(U,Le)&&!Y(be,Le),device:(Y(R,Le)||Y(j,Le)||Y(U,Le))&&!Y(be,Le)},amazon:{phone:Y(ne,Le),tablet:!Y(ne,Le)&&Y(he,Le),device:Y(ne,Le)||Y(he,Le)},android:{phone:!Y(be,Le)&&Y(ne,Le)||!Y(be,Le)&&Y(_,Le),tablet:!Y(be,Le)&&!Y(ne,Le)&&!Y(_,Le)&&(Y(he,Le)||Y(J,Le)),device:!Y(be,Le)&&(Y(ne,Le)||Y(he,Le)||Y(_,Le)||Y(J,Le))||Y(/\bokhttp\b/i,Le)},windows:{phone:Y(be,Le),tablet:Y(Ke,Le),device:Y(be,Le)||Y(Ke,Le)},other:{blackberry:Y(De,Le),blackberry10:Y(je,Le),opera:Y(Be,Le),firefox:Y(_e,Le),chrome:Y(Ge,Le),device:Y(De,Le)||Y(je,Le)||Y(Be,Le)||Y(_e,Le)||Y(Ge,Le)},any:null,phone:null,tablet:null};return Se.any=Se.apple.device||Se.android.device||Se.windows.device||Se.other.device,Se.phone=Se.apple.phone||Se.android.phone||Se.windows.phone,Se.tablet=Se.apple.tablet||Se.android.tablet||Se.windows.tablet,Se}var F=Object(G.a)(Object(G.a)({},M()),{},{isMobile:M}),Q=F;function te(){}function V(ye,Le,ke){var Te=Le||"";return ye.key||"".concat(Te,"item_").concat(ke)}function ge(ye){return"".concat(ye,"-menu-")}function Ue(ye,Le){var ke=-1;b.Children.forEach(ye,function(Te){ke+=1,Te&&Te.type&&Te.type.isMenuItemGroup?b.Children.forEach(Te.props.children,function(re){ke+=1,Le(re,ke)}):Le(Te,ke)})}function Ye(ye,Le,ke){if(!ye||ke.find)return;b.Children.forEach(ye,function(Te){if(Te){var re=Te.type;if(!re||!(re.isSubMenu||re.isMenuItem||re.isMenuItemGroup))return;Le.indexOf(Te.key)!==-1?ke.find=!0:Te.props.children&&Ye(Te.props.children,Le,ke)}})}var de=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],xe=function(Le){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=Le&&typeof Le.getBoundingClientRect=="function"&&Le.getBoundingClientRect().width;if(Te){if(ke){var re=getComputedStyle(Le),pe=re.marginLeft,ue=re.marginRight;Te+=+pe.replace("px","")+ +ue.replace("px","")}Te=+Te.toFixed(6)}return Te||0},Me=function(Le,ke,Te){Le&&Object(B.a)(Le.style)==="object"&&(Le.style[ke]=Te)},Fe=function(){return Q.any},$e=H("bdgK"),st=H("i8i4"),mt=H.n(st),ut=H("wgJM"),Pt=H("l4aY"),Et=H("m+aA"),At=H("c+Xe"),Je=H("zT1h"),Kt=H("QC+M");function Bt(ye,Le,ke){return ke?ye[0]===Le[0]:ye[0]===Le[0]&&ye[1]===Le[1]}function ce(ye,Le,ke){var Te=ye[Le]||{};return Object(G.a)(Object(G.a)({},Te),ke)}function q(ye,Le,ke,Te){for(var re=ke.points,pe=Object.keys(ye),ue=0;ue<pe.length;ue+=1){var Se=pe[ue];if(Bt(ye[Se].points,re,Te))return"".concat(Le,"-placement-").concat(Se)}return""}var ee=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ye=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ye)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ye==null?void 0:ye.substr(0,4)))},oe=H("MNnm");function fe(ye,Le){var ke={};return ke[ye.toLowerCase()]=Le.toLowerCase(),ke["Webkit".concat(ye)]="webkit".concat(Le),ke["Moz".concat(ye)]="moz".concat(Le),ke["ms".concat(ye)]="MS".concat(Le),ke["O".concat(ye)]="o".concat(Le.toLowerCase()),ke}function ie(ye,Le){var ke={animationend:fe("Animation","AnimationEnd"),transitionend:fe("Transition","TransitionEnd")};return ye&&("AnimationEvent"in Le||delete ke.animationend.animation,"TransitionEvent"in Le||delete ke.transitionend.transition),ke}var le=ie(Object(oe.a)(),typeof window!="undefined"?window:{}),me={};if(Object(oe.a)()){var ve=document.createElement("div");me=ve.style}var Ae={};function Re(ye){if(Ae[ye])return Ae[ye];var Le=le[ye];if(Le)for(var ke=Object.keys(Le),Te=ke.length,re=0;re<Te;re+=1){var pe=ke[re];if(Object.prototype.hasOwnProperty.call(Le,pe)&&pe in me)return Ae[ye]=Le[pe],Ae[ye]}return""}var Pe=Re("animationend"),it=Re("transitionend"),ct=!!(Pe&&it),Ot=Pe||"animationend",$t=it||"transitionend";function bt(ye,Le){if(!ye)return null;if(Object(B.a)(ye)==="object"){var ke=Le.replace(/-\w/g,function(Te){return Te[1].toUpperCase()});return ye[ke]}return"".concat(ye,"-").concat(Le)}var Ze="none",vn="appear",Xe="enter",bn="leave",mn="none",Gt="prepare",qt="start",gn="active",xn="end";function Ln(ye){var Le=Object(b.useRef)(!1),ke=Object(b.useState)(ye),Te=Object(X.a)(ke,2),re=Te[0],pe=Te[1];function ue(Se){Le.current||pe(Se)}return Object(b.useEffect)(function(){return function(){Le.current=!0}},[]),[re,ue]}var Rt=Object(oe.a)()?b.useLayoutEffect:b.useEffect,Ve=Rt,ft=function(){var ye=b.useRef(null);function Le(){ut.a.cancel(ye.current)}function ke(Te){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Le();var pe=Object(ut.a)(function(){re<=1?Te({isCanceled:function(){return pe!==ye.current}}):ke(Te,re-1)});ye.current=pe}return b.useEffect(function(){return function(){Le()}},[]),[ke,Le]},xt=[Gt,qt,gn,xn],Lt=!1,Ct=!0;function et(ye){return ye===gn||ye===xn}var Tt=function(ye,Le){var ke=b.useState(mn),Te=Object(X.a)(ke,2),re=Te[0],pe=Te[1],ue=ft(),Se=Object(X.a)(ue,2),Ce=Se[0],Ne=Se[1];function Ie(){pe(Gt)}return Ve(function(){if(re!==mn&&re!==xn){var We=xt.indexOf(re),qe=xt[We+1],pt=Le(re);pt===Lt?pe(qe):Ce(function(ht){function It(){if(ht.isCanceled())return;pe(qe)}pt===!0?It():Promise.resolve(pt).then(It)})}},[ye,re]),b.useEffect(function(){return function(){Ne()}},[]),[Ie,re]},wt=function(ye){var Le=Object(b.useRef)(),ke=Object(b.useRef)(ye);ke.current=ye;var Te=b.useCallback(function(ue){ke.current(ue)},[]);function re(ue){ue&&(ue.removeEventListener($t,Te),ue.removeEventListener(Ot,Te))}function pe(ue){Le.current&&Le.current!==ue&&re(Le.current),ue&&ue!==Le.current&&(ue.addEventListener($t,Te),ue.addEventListener(Ot,Te),Le.current=ue)}return b.useEffect(function(){return function(){re(Le.current)}},[]),[pe,re]};function gt(ye,Le,ke,Te){var re=Te.motionEnter,pe=re===void 0?!0:re,ue=Te.motionAppear,Se=ue===void 0?!0:ue,Ce=Te.motionLeave,Ne=Ce===void 0?!0:Ce,Ie=Te.motionDeadline,We=Te.motionLeaveImmediately,qe=Te.onAppearPrepare,pt=Te.onEnterPrepare,ht=Te.onLeavePrepare,It=Te.onAppearStart,hn=Te.onEnterStart,Cn=Te.onLeaveStart,En=Te.onAppearActive,Tn=Te.onEnterActive,An=Te.onLeaveActive,Sn=Te.onAppearEnd,wn=Te.onEnterEnd,Fn=Te.onLeaveEnd,Mn=Te.onVisibleChanged,si=Ln(),kn=Object(X.a)(si,2),on=kn[0],tn=kn[1],Pn=Ln(Ze),Bn=Object(X.a)(Pn,2),Jt=Bn[0],Hn=Bn[1],oi=Ln(null),Kn=Object(X.a)(oi,2),qn=Kn[0],Qn=Kn[1],_i=Object(b.useRef)(!1),Ri=Object(b.useRef)(null),di=Object(b.useRef)(!1),Gi=Object(b.useRef)(null);function pr(){var ti=ke();return ti||Gi.current}var Ji=Object(b.useRef)(!1);function Li(ti){var Yn=pr();if(ti&&!ti.deadline&&ti.target!==Yn)return;var Di;Jt===vn&&Ji.current?Di=Sn==null?void 0:Sn(Yn,ti):Jt===Xe&&Ji.current?Di=wn==null?void 0:wn(Yn,ti):Jt===bn&&Ji.current&&(Di=Fn==null?void 0:Fn(Yn,ti)),Di!==!1&&!di.current&&(Hn(Ze),Qn(null))}var ni=wt(Li),$n=Object(X.a)(ni,1),hi=$n[0],li=b.useMemo(function(){var ti,Yn,Di;switch(Jt){case"appear":return ti={},Object(ae.a)(ti,Gt,qe),Object(ae.a)(ti,qt,It),Object(ae.a)(ti,gn,En),ti;case"enter":return Yn={},Object(ae.a)(Yn,Gt,pt),Object(ae.a)(Yn,qt,hn),Object(ae.a)(Yn,gn,Tn),Yn;case"leave":return Di={},Object(ae.a)(Di,Gt,ht),Object(ae.a)(Di,qt,Cn),Object(ae.a)(Di,gn,An),Di;default:return{}}},[Jt]),mr=Tt(Jt,function(ti){if(ti===Gt){var Yn=li[Gt];return Yn?Yn(pr()):Lt}if(Zn in li){var Di;Qn(((Di=li[Zn])===null||Di===void 0?void 0:Di.call(li,pr(),null))||null)}return Zn===gn&&(hi(pr()),Ie>0&&(clearTimeout(Ri.current),Ri.current=setTimeout(function(){Li({deadline:!0})},Ie))),Ct}),Dr=Object(X.a)(mr,2),Ir=Dr[0],Zn=Dr[1],Er=et(Zn);Ji.current=Er,Ve(function(){tn(Le);var ti=_i.current;if(_i.current=!0,!ye)return;var Yn;!ti&&Le&&Se&&(Yn=vn),ti&&Le&&pe&&(Yn=Xe),(ti&&!Le&&Ne||!ti&&We&&!Le&&Ne)&&(Yn=bn),Yn&&(Hn(Yn),Ir())},[Le]),Object(b.useEffect)(function(){(Jt===vn&&!Se||Jt===Xe&&!pe||Jt===bn&&!Ne)&&Hn(Ze)},[Se,pe,Ne]),Object(b.useEffect)(function(){return function(){clearTimeout(Ri.current),di.current=!0}},[]),Object(b.useEffect)(function(){on!==void 0&&Jt===Ze&&(Mn==null||Mn(on))},[on,Jt]);var Mr=qn;return li[Gt]&&Zn===qt&&(Mr=Object(G.a)({transition:"none"},Mr)),[Jt,Zn,Mr,on!=null?on:Le]}var dt=function(ye){Object(w.a)(ke,ye);var Le=Object(x.a)(ke);function ke(){return Object(L.a)(this,ke),Le.apply(this,arguments)}return Object(D.a)(ke,[{key:"render",value:function(){return this.props.children}}]),ke}(b.Component),Nt=dt;function Zt(ye){var Le=ye;Object(B.a)(ye)==="object"&&(Le=ye.transitionSupport);function ke(re){return!!(re.motionName&&Le)}var Te=b.forwardRef(function(re,pe){var ue=re.visible,Se=ue===void 0?!0:ue,Ce=re.removeOnLeave,Ne=Ce===void 0?!0:Ce,Ie=re.forceRender,We=re.children,qe=re.motionName,pt=re.leavedClassName,ht=re.eventProps,It=ke(re),hn=Object(b.useRef)(),Cn=Object(b.useRef)();function En(){try{return Object(Et.a)(hn.current||Cn.current)}catch(Hn){return null}}var Tn=gt(It,Se,En,re),An=Object(X.a)(Tn,4),Sn=An[0],wn=An[1],Fn=An[2],Mn=An[3],si=b.useRef(Mn);Mn&&(si.current=!0);var kn=Object(b.useRef)(pe);kn.current=pe;var on=b.useCallback(function(Hn){hn.current=Hn,Object(At.b)(kn.current,Hn)},[]),tn,Pn=Object(G.a)(Object(G.a)({},ht),{},{visible:Se});if(!We)tn=null;else if(Sn===Ze||!ke(re))Mn?tn=We(Object(G.a)({},Pn),on):!Ne&&si.current?tn=We(Object(G.a)(Object(G.a)({},Pn),{},{className:pt}),on):Ie?tn=We(Object(G.a)(Object(G.a)({},Pn),{},{style:{display:"none"}}),on):tn=null;else{var Bn,Jt;wn===Gt?Jt="prepare":et(wn)?Jt="active":wn===qt&&(Jt="start"),tn=We(Object(G.a)(Object(G.a)({},Pn),{},{className:K()(bt(qe,Sn),(Bn={},Object(ae.a)(Bn,bt(qe,"".concat(Sn,"-").concat(Jt)),Jt),Object(ae.a)(Bn,qe,typeof qe=="string"),Bn)),style:Fn}),on)}return b.createElement(Nt,{ref:Cn},tn)});return Te.displayName="CSSMotion",Te}var Yt=Zt(ct),Qe="add",St="keep",yn="remove",lt="removed";function jt(ye){var Le;return ye&&Object(B.a)(ye)==="object"&&"key"in ye?Le=ye:Le={key:ye},Object(G.a)(Object(G.a)({},Le),{},{key:String(Le.key)})}function en(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ye.map(jt)}function rn(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ke=[],Te=0,re=Le.length,pe=en(ye),ue=en(Le);pe.forEach(function(Ne){for(var Ie=!1,We=Te;We<re;We+=1){var qe=ue[We];if(qe.key===Ne.key){Te<We&&(ke=ke.concat(ue.slice(Te,We).map(function(pt){return Object(G.a)(Object(G.a)({},pt),{},{status:Qe})})),Te=We),ke.push(Object(G.a)(Object(G.a)({},qe),{},{status:St})),Te+=1,Ie=!0;break}}Ie||ke.push(Object(G.a)(Object(G.a)({},Ne),{},{status:yn}))}),Te<re&&(ke=ke.concat(ue.slice(Te).map(function(Ne){return Object(G.a)(Object(G.a)({},Ne),{},{status:Qe})})));var Se={};ke.forEach(function(Ne){var Ie=Ne.key;Se[Ie]=(Se[Ie]||0)+1});var Ce=Object.keys(Se).filter(function(Ne){return Se[Ne]>1});return Ce.forEach(function(Ne){ke=ke.filter(function(Ie){var We=Ie.key,qe=Ie.status;return We!==Ne||qe!==yn}),ke.forEach(function(Ie){Ie.key===Ne&&(Ie.status=St)})}),ke}var at=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Ft(ye){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yt,ke=function(Te){Object(w.a)(pe,Te);var re=Object(x.a)(pe);function pe(){var ue;return Object(L.a)(this,pe),ue=re.apply(this,arguments),ue.state={keyEntities:[]},ue.removeKey=function(Se){ue.setState(function(Ce){var Ne=Ce.keyEntities;return{keyEntities:Ne.map(function(Ie){return Ie.key!==Se?Ie:Object(G.a)(Object(G.a)({},Ie),{},{status:lt})})}})},ue}return Object(D.a)(pe,[{key:"render",value:function(){var Se=this,Ce=this.state.keyEntities,Ne=this.props,Ie=Ne.component,We=Ne.children,qe=Ne.onVisibleChanged,pt=Object(k.a)(Ne,["component","children","onVisibleChanged"]),ht=Ie||b.Fragment,It={};return at.forEach(function(hn){It[hn]=pt[hn],delete pt[hn]}),delete pt.keys,b.createElement(ht,pt,Ce.map(function(hn){var Cn=hn.status,En=Object(k.a)(hn,["status"]),Tn=Cn===Qe||Cn===St;return b.createElement(Le,Object(C.a)({},It,{key:En.key,visible:Tn,eventProps:En,onVisibleChanged:function(Sn){qe==null||qe(Sn,{key:En.key}),Sn||Se.removeKey(En.key)}}),We)}))}}],[{key:"getDerivedStateFromProps",value:function(Se,Ce){var Ne=Se.keys,Ie=Ce.keyEntities,We=en(Ne),qe=rn(Ie,We);return{keyEntities:qe.filter(function(pt){var ht=Ie.find(function(It){var hn=It.key;return pt.key===hn});return!(ht&&ht.status===lt&&pt.status===yn)})}}}]),pe}(b.Component);return ke.defaultProps={component:"div"},ke}var rt=Ft(ct),Dt=Yt;function vt(ye){var Le=ye.prefixCls,ke=ye.motion,Te=ye.animation,re=ye.transitionName;return ke||(Te?{motionName:"".concat(Le,"-").concat(Te)}:re?{motionName:re}:null)}function yt(ye){var Le=ye.prefixCls,ke=ye.visible,Te=ye.zIndex,re=ye.mask,pe=ye.maskMotion,ue=ye.maskAnimation,Se=ye.maskTransitionName;if(!re)return null;var Ce={};return(pe||Se||ue)&&(Ce=Object(G.a)({motionAppear:!0},vt({motion:pe,prefixCls:Le,transitionName:Se,animation:ue}))),b.createElement(Dt,Object(C.a)({},Ce,{visible:ke,removeOnLeave:!0}),function(Ne){var Ie=Ne.className;return b.createElement("div",{style:{zIndex:Te},className:K()("".concat(Le,"-mask"),Ie)})})}var an=H("9mu1"),Ht=H("o0o1"),ui=H.n(Ht),un=H("HaE+"),cn=["measure","align",null,"motion"],Jn=function(ye,Le){var ke=Object(b.useState)(null),Te=Object(X.a)(ke,2),re=Te[0],pe=Te[1],ue=Object(b.useRef)(),Se=Object(b.useRef)(!1);function Ce(We){Se.current||pe(We)}function Ne(){ut.a.cancel(ue.current)}function Ie(We){Ne(),ue.current=Object(ut.a)(function(){Ce(function(qe){switch(re){case"align":return"motion";case"motion":return"stable";default:}return qe}),We==null||We()})}return Object(b.useEffect)(function(){Ce("measure")},[ye]),Object(b.useEffect)(function(){switch(re){case"measure":Le();break;default:}re&&(ue.current=Object(ut.a)(Object(un.a)(ui.a.mark(function We(){var qe,pt;return ui.a.wrap(function(It){for(;;)switch(It.prev=It.next){case 0:qe=cn.indexOf(re),pt=cn[qe+1],pt&&qe!==-1&&Ce(pt);case 3:case"end":return It.stop()}},We)}))))},[re]),Object(b.useEffect)(function(){return function(){Se.current=!0,Ne()}},[]),[re,Ie]},lr=function(ye){var Le=b.useState({width:0,height:0}),ke=Object(X.a)(Le,2),Te=ke[0],re=ke[1];function pe(Se){re({width:Se.offsetWidth,height:Se.offsetHeight})}var ue=b.useMemo(function(){var Se={};if(ye){var Ce=Te.width,Ne=Te.height;ye.indexOf("height")!==-1&&Ne?Se.height=Ne:ye.indexOf("minHeight")!==-1&&Ne&&(Se.minHeight=Ne),ye.indexOf("width")!==-1&&Ce?Se.width=Ce:ye.indexOf("minWidth")!==-1&&Ce&&(Se.minWidth=Ce)}return Se},[ye,Te]);return[ue,pe]},pi=b.forwardRef(function(ye,Le){var ke=ye.visible,Te=ye.prefixCls,re=ye.className,pe=ye.style,ue=ye.children,Se=ye.zIndex,Ce=ye.stretch,Ne=ye.destroyPopupOnHide,Ie=ye.forceRender,We=ye.align,qe=ye.point,pt=ye.getRootDomNode,ht=ye.getClassNameFromAlign,It=ye.onAlign,hn=ye.onMouseEnter,Cn=ye.onMouseLeave,En=ye.onMouseDown,Tn=ye.onTouchStart,An=Object(b.useRef)(),Sn=Object(b.useRef)(),wn=Object(b.useState)(),Fn=Object(X.a)(wn,2),Mn=Fn[0],si=Fn[1],kn=lr(Ce),on=Object(X.a)(kn,2),tn=on[0],Pn=on[1];function Bn(){Ce&&Pn(pt())}var Jt=Jn(ke,Bn),Hn=Object(X.a)(Jt,2),oi=Hn[0],Kn=Hn[1],qn=Object(b.useRef)();function Qn(){return qe||pt}function _i(){var ni;(ni=An.current)===null||ni===void 0||ni.forceAlign()}function Ri(ni,$n){var hi=ht($n);Mn!==hi&&si(hi),oi==="align"&&(Mn!==hi?Promise.resolve().then(function(){_i()}):Kn(function(){var li;(li=qn.current)===null||li===void 0||li.call(qn)}),It==null||It(ni,$n))}var di=Object(G.a)({},vt(ye));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(ni){var $n=di[ni];di[ni]=function(hi,li){return Kn(),$n==null?void 0:$n(hi,li)}});function Gi(){return new Promise(function(ni){qn.current=ni})}b.useEffect(function(){!di.motionName&&oi==="motion"&&Kn()},[di.motionName,oi]),b.useImperativeHandle(Le,function(){return{forceAlign:_i,getElement:function(){return Sn.current}}});var pr=Object(G.a)(Object(G.a)({},tn),{},{zIndex:Se,opacity:oi==="motion"||oi==="stable"||!ke?void 0:0,pointerEvents:oi==="stable"?void 0:"none"},pe),Ji=!0;(We==null?void 0:We.points)&&(oi==="align"||oi==="stable")&&(Ji=!1);var Li=ue;return b.Children.count(ue)>1&&(Li=b.createElement("div",{className:"".concat(Te,"-content")},ue)),b.createElement(Dt,Object(C.a)({visible:ke,ref:Sn,leavedClassName:"".concat(Te,"-hidden")},di,{onAppearPrepare:Gi,onEnterPrepare:Gi,removeOnLeave:Ne,forceRender:Ie}),function(ni,$n){var hi=ni.className,li=ni.style,mr=K()(Te,re,Mn,hi);return b.createElement(an.a,{target:Qn(),key:"popup",ref:An,monitorWindowResize:!0,disabled:Ji,align:We,onAlign:Ri},b.createElement("div",{ref:$n,className:mr,onMouseEnter:hn,onMouseLeave:Cn,onMouseDownCapture:En,onTouchStartCapture:Tn,style:Object(G.a)(Object(G.a)({},li),pr)},Li))})});pi.displayName="PopupInner";var _n=pi,Vt=b.forwardRef(function(ye,Le){var ke=ye.prefixCls,Te=ye.visible,re=ye.zIndex,pe=ye.children,ue=ye.mobile;ue=ue===void 0?{}:ue;var Se=ue.popupClassName,Ce=ue.popupStyle,Ne=ue.popupMotion,Ie=Ne===void 0?{}:Ne,We=ue.popupRender,qe=b.useRef();b.useImperativeHandle(Le,function(){return{forceAlign:function(){},getElement:function(){return qe.current}}});var pt=Object(G.a)({zIndex:re},Ce),ht=pe;return b.Children.count(pe)>1&&(ht=b.createElement("div",{className:"".concat(ke,"-content")},pe)),We&&(ht=We(ht)),b.createElement(Dt,Object(C.a)({visible:Te,ref:qe,removeOnLeave:!0},Ie),function(It,hn){var Cn=It.className,En=It.style,Tn=K()(ke,Se,Cn);return b.createElement("div",{ref:hn,className:Tn,style:Object(G.a)(Object(G.a)({},En),pt)},ht)})});Vt.displayName="MobilePopupInner";var zt=Vt,ln=["visible","mobile"],dn=b.forwardRef(function(ye,Le){var ke=ye.visible,Te=ye.mobile,re=Object(k.a)(ye,ln),pe=Object(b.useState)(ke),ue=Object(X.a)(pe,2),Se=ue[0],Ce=ue[1],Ne=Object(b.useState)(!1),Ie=Object(X.a)(Ne,2),We=Ie[0],qe=Ie[1],pt=Object(G.a)(Object(G.a)({},re),{},{visible:Se});Object(b.useEffect)(function(){Ce(ke),ke&&Te&&qe(ee())},[ke,Te]);var ht=We?b.createElement(zt,Object(C.a)({},pt,{mobile:Te,ref:Le})):b.createElement(_n,Object(C.a)({},pt,{ref:Le}));return b.createElement("div",null,b.createElement(yt,pt),ht)});dn.displayName="Popup";var Dn=dn,ri=b.createContext(null),pn=ri;function ci(){}function hr(){return""}function Br(ye){return ye?ye.ownerDocument:window.document}var xr=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function la(ye){var Le=function(ke){Object(w.a)(re,ke);var Te=Object(x.a)(re);function re(pe){var ue;Object(L.a)(this,re),ue=Te.call(this,pe),ue.popupRef=b.createRef(),ue.triggerRef=b.createRef(),ue.attachId=void 0,ue.clickOutsideHandler=void 0,ue.touchOutsideHandler=void 0,ue.contextMenuOutsideHandler1=void 0,ue.contextMenuOutsideHandler2=void 0,ue.mouseDownTimeout=void 0,ue.focusTime=void 0,ue.preClickTime=void 0,ue.preTouchTime=void 0,ue.delayTimer=void 0,ue.hasPopupMouseDown=void 0,ue.onMouseEnter=function(Ce){var Ne=ue.props.mouseEnterDelay;ue.fireEvents("onMouseEnter",Ce),ue.delaySetPopupVisible(!0,Ne,Ne?null:Ce)},ue.onMouseMove=function(Ce){ue.fireEvents("onMouseMove",Ce),ue.setPoint(Ce)},ue.onMouseLeave=function(Ce){ue.fireEvents("onMouseLeave",Ce),ue.delaySetPopupVisible(!1,ue.props.mouseLeaveDelay)},ue.onPopupMouseEnter=function(){ue.clearDelayTimer()},ue.onPopupMouseLeave=function(Ce){var Ne;if(Ce.relatedTarget&&!Ce.relatedTarget.setTimeout&&Object(Pt.a)((Ne=ue.popupRef.current)===null||Ne===void 0?void 0:Ne.getElement(),Ce.relatedTarget))return;ue.delaySetPopupVisible(!1,ue.props.mouseLeaveDelay)},ue.onFocus=function(Ce){ue.fireEvents("onFocus",Ce),ue.clearDelayTimer(),ue.isFocusToShow()&&(ue.focusTime=Date.now(),ue.delaySetPopupVisible(!0,ue.props.focusDelay))},ue.onMouseDown=function(Ce){ue.fireEvents("onMouseDown",Ce),ue.preClickTime=Date.now()},ue.onTouchStart=function(Ce){ue.fireEvents("onTouchStart",Ce),ue.preTouchTime=Date.now()},ue.onBlur=function(Ce){ue.fireEvents("onBlur",Ce),ue.clearDelayTimer(),ue.isBlurToHide()&&ue.delaySetPopupVisible(!1,ue.props.blurDelay)},ue.onContextMenu=function(Ce){Ce.preventDefault(),ue.fireEvents("onContextMenu",Ce),ue.setPopupVisible(!0,Ce)},ue.onContextMenuClose=function(){ue.isContextMenuToShow()&&ue.close()},ue.onClick=function(Ce){if(ue.fireEvents("onClick",Ce),ue.focusTime){var Ne;if(ue.preClickTime&&ue.preTouchTime?Ne=Math.min(ue.preClickTime,ue.preTouchTime):ue.preClickTime?Ne=ue.preClickTime:ue.preTouchTime&&(Ne=ue.preTouchTime),Math.abs(Ne-ue.focusTime)<20)return;ue.focusTime=0}ue.preClickTime=0,ue.preTouchTime=0,ue.isClickToShow()&&(ue.isClickToHide()||ue.isBlurToHide())&&Ce&&Ce.preventDefault&&Ce.preventDefault();var Ie=!ue.state.popupVisible;(ue.isClickToHide()&&!Ie||Ie&&ue.isClickToShow())&&ue.setPopupVisible(!ue.state.popupVisible,Ce)},ue.onPopupMouseDown=function(){if(ue.hasPopupMouseDown=!0,clearTimeout(ue.mouseDownTimeout),ue.mouseDownTimeout=window.setTimeout(function(){ue.hasPopupMouseDown=!1},0),ue.context){var Ce;(Ce=ue.context).onPopupMouseDown.apply(Ce,arguments)}},ue.onDocumentClick=function(Ce){if(ue.props.mask&&!ue.props.maskClosable)return;var Ne=Ce.target,Ie=ue.getRootDomNode(),We=ue.getPopupDomNode();(!Object(Pt.a)(Ie,Ne)||ue.isContextMenuOnly())&&!Object(Pt.a)(We,Ne)&&!ue.hasPopupMouseDown&&ue.close()},ue.getRootDomNode=function(){var Ce=ue.props.getTriggerDOMNode;if(Ce)return Ce(ue.triggerRef.current);try{var Ne=Object(Et.a)(ue.triggerRef.current);if(Ne)return Ne}catch(Ie){}return mt.a.findDOMNode(Object(O.a)(ue))},ue.getPopupClassNameFromAlign=function(Ce){var Ne=[],Ie=ue.props,We=Ie.popupPlacement,qe=Ie.builtinPlacements,pt=Ie.prefixCls,ht=Ie.alignPoint,It=Ie.getPopupClassNameFromAlign;return We&&qe&&Ne.push(q(qe,pt,Ce,ht)),It&&Ne.push(It(Ce)),Ne.join(" ")},ue.getComponent=function(){var Ce=ue.props,Ne=Ce.prefixCls,Ie=Ce.destroyPopupOnHide,We=Ce.popupClassName,qe=Ce.onPopupAlign,pt=Ce.popupMotion,ht=Ce.popupAnimation,It=Ce.popupTransitionName,hn=Ce.popupStyle,Cn=Ce.mask,En=Ce.maskAnimation,Tn=Ce.maskTransitionName,An=Ce.maskMotion,Sn=Ce.zIndex,wn=Ce.popup,Fn=Ce.stretch,Mn=Ce.alignPoint,si=Ce.mobile,kn=Ce.forceRender,on=ue.state,tn=on.popupVisible,Pn=on.point,Bn=ue.getPopupAlign(),Jt={};return ue.isMouseEnterToShow()&&(Jt.onMouseEnter=ue.onPopupMouseEnter),ue.isMouseLeaveToHide()&&(Jt.onMouseLeave=ue.onPopupMouseLeave),Jt.onMouseDown=ue.onPopupMouseDown,Jt.onTouchStart=ue.onPopupMouseDown,b.createElement(Dn,Object(C.a)({prefixCls:Ne,destroyPopupOnHide:Ie,visible:tn,point:Mn&&Pn,className:We,align:Bn,onAlign:qe,animation:ht,getClassNameFromAlign:ue.getPopupClassNameFromAlign},Jt,{stretch:Fn,getRootDomNode:ue.getRootDomNode,style:hn,mask:Cn,zIndex:Sn,transitionName:It,maskAnimation:En,maskTransitionName:Tn,maskMotion:An,ref:ue.popupRef,motion:pt,mobile:si,forceRender:kn}),typeof wn=="function"?wn():wn)},ue.attachParent=function(Ce){ut.a.cancel(ue.attachId);var Ne=ue.props,Ie=Ne.getPopupContainer,We=Ne.getDocument,qe=ue.getRootDomNode(),pt;Ie?(qe||Ie.length===0)&&(pt=Ie(qe)):pt=We(ue.getRootDomNode()).body,pt?pt.appendChild(Ce):ue.attachId=Object(ut.a)(function(){ue.attachParent(Ce)})},ue.getContainer=function(){var Ce=ue.props.getDocument,Ne=Ce(ue.getRootDomNode()).createElement("div");return Ne.style.position="absolute",Ne.style.top="0",Ne.style.left="0",Ne.style.width="100%",ue.attachParent(Ne),Ne},ue.setPoint=function(Ce){var Ne=ue.props.alignPoint;if(!Ne||!Ce)return;ue.setState({point:{pageX:Ce.pageX,pageY:Ce.pageY}})},ue.handlePortalUpdate=function(){ue.state.prevPopupVisible!==ue.state.popupVisible&&ue.props.afterPopupVisibleChange(ue.state.popupVisible)},ue.triggerContextValue={onPopupMouseDown:ue.onPopupMouseDown};var Se;return"popupVisible"in pe?Se=!!pe.popupVisible:Se=!!pe.defaultPopupVisible,ue.state={prevPopupVisible:Se,popupVisible:Se},xr.forEach(function(Ce){ue["fire".concat(Ce)]=function(Ne){ue.fireEvents(Ce,Ne)}}),ue}return Object(D.a)(re,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ue=this.props,Se=this.state;if(Se.popupVisible){var Ce;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ce=ue.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Je.a)(Ce,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ce=Ce||ue.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Je.a)(Ce,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ce=Ce||ue.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Je.a)(Ce,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Je.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ut.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ue;return((ue=this.popupRef.current)===null||ue===void 0?void 0:ue.getElement())||null}},{key:"getPopupAlign",value:function(){var ue=this.props,Se=ue.popupPlacement,Ce=ue.popupAlign,Ne=ue.builtinPlacements;return Se&&Ne?ce(Ne,Se,Ce):Ce}},{key:"setPopupVisible",value:function(ue,Se){var Ce=this.props.alignPoint,Ne=this.state.popupVisible;this.clearDelayTimer(),Ne!==ue&&("popupVisible"in this.props||this.setState({popupVisible:ue,prevPopupVisible:Ne}),this.props.onPopupVisibleChange(ue)),Ce&&Se&&ue&&this.setPoint(Se)}},{key:"delaySetPopupVisible",value:function(ue,Se,Ce){var Ne=this,Ie=Se*1e3;if(this.clearDelayTimer(),Ie){var We=Ce?{pageX:Ce.pageX,pageY:Ce.pageY}:null;this.delayTimer=window.setTimeout(function(){Ne.setPopupVisible(ue,We),Ne.clearDelayTimer()},Ie)}else this.setPopupVisible(ue,Ce)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(ue){var Se=this.props.children.props,Ce=this.props;return Se[ue]&&Ce[ue]?this["fire".concat(ue)]:Se[ue]||Ce[ue]}},{key:"isClickToShow",value:function(){var ue=this.props,Se=ue.action,Ce=ue.showAction;return Se.indexOf("click")!==-1||Ce.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ue=this.props.action;return ue==="contextMenu"||ue.length===1&&ue[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ue=this.props,Se=ue.action,Ce=ue.showAction;return Se.indexOf("contextMenu")!==-1||Ce.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ue=this.props,Se=ue.action,Ce=ue.hideAction;return Se.indexOf("click")!==-1||Ce.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ue=this.props,Se=ue.action,Ce=ue.showAction;return Se.indexOf("hover")!==-1||Ce.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ue=this.props,Se=ue.action,Ce=ue.hideAction;return Se.indexOf("hover")!==-1||Ce.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ue=this.props,Se=ue.action,Ce=ue.showAction;return Se.indexOf("focus")!==-1||Ce.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ue=this.props,Se=ue.action,Ce=ue.hideAction;return Se.indexOf("focus")!==-1||Ce.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ue;(ue=this.popupRef.current)===null||ue===void 0||ue.forceAlign()}}},{key:"fireEvents",value:function(ue,Se){var Ce=this.props.children.props[ue];Ce&&Ce(Se);var Ne=this.props[ue];Ne&&Ne(Se)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ue=this.state.popupVisible,Se=this.props,Ce=Se.children,Ne=Se.forceRender,Ie=Se.alignPoint,We=Se.className,qe=Se.autoDestroy,pt=b.Children.only(Ce),ht={key:"trigger"};this.isContextMenuToShow()?ht.onContextMenu=this.onContextMenu:ht.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(ht.onClick=this.onClick,ht.onMouseDown=this.onMouseDown,ht.onTouchStart=this.onTouchStart):(ht.onClick=this.createTwoChains("onClick"),ht.onMouseDown=this.createTwoChains("onMouseDown"),ht.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(ht.onMouseEnter=this.onMouseEnter,Ie&&(ht.onMouseMove=this.onMouseMove)):ht.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?ht.onMouseLeave=this.onMouseLeave:ht.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(ht.onFocus=this.onFocus,ht.onBlur=this.onBlur):(ht.onFocus=this.createTwoChains("onFocus"),ht.onBlur=this.createTwoChains("onBlur"));var It=K()(pt&&pt.props&&pt.props.className,We);It&&(ht.className=It);var hn=Object(G.a)({},ht);Object(At.c)(pt)&&(hn.ref=Object(At.a)(this.triggerRef,pt.ref));var Cn=b.cloneElement(pt,hn),En;return(ue||this.popupRef.current||Ne)&&(En=b.createElement(ye,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ue&&qe&&(En=null),b.createElement(pn.Provider,{value:this.triggerContextValue},Cn,En)}}],[{key:"getDerivedStateFromProps",value:function(ue,Se){var Ce=ue.popupVisible,Ne={};return Ce!==void 0&&Se.popupVisible!==Ce&&(Ne.popupVisible=Ce,Ne.prevPopupVisible=Se.popupVisible),Ne}}]),re}(b.Component);return Le.contextType=pn,Le.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:hr,getDocument:Br,onPopupVisibleChange:ci,afterPopupVisibleChange:ci,onPopupAlign:ci,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Le}var xi=la(Kt.a),ur={adjustX:1,adjustY:1},Tr={topLeft:{points:["bl","tl"],overflow:ur,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ur,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ur,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ur,offset:[4,0]}},ua={topLeft:{points:["bl","tl"],overflow:ur,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ur,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ur,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ur,offset:[4,0]}},jr=Tr,er=0,wr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},tr=function(Le,ke,Te){var re=ge(ke),pe=Le.getState();Le.setState({defaultActiveFirst:Object(G.a)(Object(G.a)({},pe.defaultActiveFirst),{},Object(ae.a)({},re,Te))})},Oi=function(ye){Object(w.a)(ke,ye);var Le=Object(x.a)(ke);function ke(Te){var re;Object(L.a)(this,ke),re=Le.call(this,Te),re.onDestroy=function(Ie){re.props.onDestroy(Ie)},re.onKeyDown=function(Ie){var We=Ie.keyCode,qe=re.menuInstance,pt=re.props.store,ht=re.getVisible();if(We===p.a.ENTER)return re.onTitleClick(Ie),tr(pt,re.props.eventKey,!0),!0;if(We===p.a.RIGHT)return ht?qe.onKeyDown(Ie):(re.triggerOpenChange(!0),tr(pt,re.props.eventKey,!0)),!0;if(We===p.a.LEFT){var It;if(ht)It=qe.onKeyDown(Ie);else return;return It||(re.triggerOpenChange(!1),It=!0),It}return ht&&(We===p.a.UP||We===p.a.DOWN)?qe.onKeyDown(Ie):void 0},re.onOpenChange=function(Ie){re.props.onOpenChange(Ie)},re.onPopupVisibleChange=function(Ie){re.triggerOpenChange(Ie,Ie?"mouseenter":"mouseleave")},re.onMouseEnter=function(Ie){var We=re.props,qe=We.eventKey,pt=We.onMouseEnter,ht=We.store;tr(ht,re.props.eventKey,!1),pt({key:qe,domEvent:Ie})},re.onMouseLeave=function(Ie){var We=re.props,qe=We.parentMenu,pt=We.eventKey,ht=We.onMouseLeave;qe.subMenuInstance=Object(O.a)(re),ht({key:pt,domEvent:Ie})},re.onTitleMouseEnter=function(Ie){var We=re.props,qe=We.eventKey,pt=We.onItemHover,ht=We.onTitleMouseEnter;pt({key:qe,hover:!0}),ht({key:qe,domEvent:Ie})},re.onTitleMouseLeave=function(Ie){var We=re.props,qe=We.parentMenu,pt=We.eventKey,ht=We.onItemHover,It=We.onTitleMouseLeave;qe.subMenuInstance=Object(O.a)(re),ht({key:pt,hover:!1}),It({key:pt,domEvent:Ie})},re.onTitleClick=function(Ie){var We=Object(O.a)(re),qe=We.props;if(qe.onTitleClick({key:qe.eventKey,domEvent:Ie}),qe.triggerSubMenuAction==="hover")return;re.triggerOpenChange(!re.getVisible(),"click"),tr(qe.store,re.props.eventKey,!1)},re.onSubMenuClick=function(Ie){typeof re.props.onClick=="function"&&re.props.onClick(re.addKeyPath(Ie))},re.onSelect=function(Ie){re.props.onSelect(Ie)},re.onDeselect=function(Ie){re.props.onDeselect(Ie)},re.getPrefixCls=function(){return"".concat(re.props.rootPrefixCls,"-submenu")},re.getActiveClassName=function(){return"".concat(re.getPrefixCls(),"-active")},re.getDisabledClassName=function(){return"".concat(re.getPrefixCls(),"-disabled")},re.getSelectedClassName=function(){return"".concat(re.getPrefixCls(),"-selected")},re.getOpenClassName=function(){return"".concat(re.props.rootPrefixCls,"-submenu-open")},re.getVisible=function(){return re.state.isOpen},re.getMode=function(){return re.state.mode},re.saveMenuInstance=function(Ie){re.menuInstance=Ie},re.addKeyPath=function(Ie){return Object(G.a)(Object(G.a)({},Ie),{},{keyPath:(Ie.keyPath||[]).concat(re.props.eventKey)})},re.triggerOpenChange=function(Ie,We){var qe=re.props.eventKey,pt=function(){re.onOpenChange({key:qe,item:Object(O.a)(re),trigger:We,open:Ie})};We==="mouseenter"?re.mouseenterTimeout=setTimeout(function(){pt()},0):pt()},re.isChildrenSelected=function(){var Ie={find:!1};return Ye(re.props.children,re.props.selectedKeys,Ie),Ie.find},re.isInlineMode=function(){return re.getMode()==="inline"},re.adjustWidth=function(){if(!re.subMenuTitle||!re.menuInstance)return;var Ie=st.findDOMNode(re.menuInstance);if(Ie.offsetWidth>=re.subMenuTitle.offsetWidth)return;Ie.style.minWidth="".concat(re.subMenuTitle.offsetWidth,"px")},re.saveSubMenuTitle=function(Ie){re.subMenuTitle=Ie},re.getBaseProps=function(){var Ie=Object(O.a)(re),We=Ie.props,qe=re.getMode();return{mode:qe==="horizontal"?"vertical":qe,visible:re.getVisible(),level:We.level+1,inlineIndent:We.inlineIndent,focusable:!1,onClick:re.onSubMenuClick,onSelect:re.onSelect,onDeselect:re.onDeselect,onDestroy:re.onDestroy,selectedKeys:We.selectedKeys,eventKey:"".concat(We.eventKey,"-menu-"),openKeys:We.openKeys,motion:We.motion,onOpenChange:re.onOpenChange,subMenuOpenDelay:We.subMenuOpenDelay,parentMenu:Object(O.a)(re),subMenuCloseDelay:We.subMenuCloseDelay,forceSubMenuRender:We.forceSubMenuRender,triggerSubMenuAction:We.triggerSubMenuAction,builtinPlacements:We.builtinPlacements,defaultActiveFirst:We.store.getState().defaultActiveFirst[ge(We.eventKey)],multiple:We.multiple,prefixCls:We.rootPrefixCls,id:re.internalMenuId,manualRef:re.saveMenuInstance,itemIcon:We.itemIcon,expandIcon:We.expandIcon,direction:We.direction}},re.getMotion=function(Ie,We){var qe=Object(O.a)(re),pt=qe.haveRendered,ht=re.props,It=ht.motion,hn=ht.rootPrefixCls,Cn=Object(G.a)(Object(G.a)({},It),{},{leavedClassName:"".concat(hn,"-hidden"),removeOnLeave:!1,motionAppear:pt||!We||Ie!=="inline"});return Cn};var pe=Te.store,ue=Te.eventKey,Se=pe.getState(),Ce=Se.defaultActiveFirst;re.isRootMenu=!1;var Ne=!1;return Ce&&(Ne=Ce[ue]),tr(pe,ue,Ne),re.state={mode:Te.mode,isOpen:Te.isOpen},re}return Object(D.a)(ke,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var re=this,pe=this.props,ue=pe.mode,Se=pe.parentMenu,Ce=pe.manualRef,Ne=pe.isOpen,Ie=function(){re.setState({mode:ue,isOpen:Ne})},We=Ne!==this.state.isOpen,qe=ue!==this.state.mode;if((qe||We)&&(ut.a.cancel(this.updateStateRaf),qe?this.updateStateRaf=Object(ut.a)(Ie):Ie()),Ce&&Ce(this),ue!=="horizontal"||!(Se==null?void 0:Se.isRootMenu)||!Ne)return;this.minWidthTimeout=setTimeout(function(){return re.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var re=this.props,pe=re.onDestroy,ue=re.eventKey;pe&&pe(ue),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ut.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(re,pe){var ue=this.getBaseProps();return b.createElement(vi,Object(C.a)({},ue,{id:this.internalMenuId,className:re,style:pe}),this.props.children)}},{key:"renderChildren",value:function(){var re=this,pe=this.getBaseProps(),ue=pe.mode,Se=pe.visible,Ce=pe.forceSubMenuRender,Ne=pe.direction,Ie=this.getMotion(ue,Se);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Se||Ce,!this.haveOpened)return b.createElement("div",null);var We=K()("".concat(pe.prefixCls,"-sub"),Object(ae.a)({},"".concat(pe.prefixCls,"-rtl"),Ne==="rtl"));return this.isInlineMode()?b.createElement(Dt,Object(C.a)({visible:pe.visible,forceRender:Ce},Ie),function(qe){var pt=qe.className,ht=qe.style,It=K()(We,pt);return re.renderPopupMenu(It,ht)}):this.renderPopupMenu(We)}},{key:"render",value:function(){var re,pe,ue,Se=Object(G.a)({},this.props),Ce=this.getVisible(),Ne=this.getPrefixCls(),Ie=this.isInlineMode(),We=this.getMode(),qe=K()(Ne,"".concat(Ne,"-").concat(We),(re={},Object(ae.a)(re,Se.className,!!Se.className),Object(ae.a)(re,this.getOpenClassName(),Ce),Object(ae.a)(re,this.getActiveClassName(),Se.active||Ce&&!Ie),Object(ae.a)(re,this.getDisabledClassName(),Se.disabled),Object(ae.a)(re,this.getSelectedClassName(),this.isChildrenSelected()),re));this.internalMenuId||(Se.eventKey?this.internalMenuId="".concat(Se.eventKey,"$Menu"):(er+=1,this.internalMenuId="$__$".concat(er,"$Menu")));var pt={},ht={},It={};Se.disabled||(pt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},ht={onClick:this.onTitleClick},It={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var hn={},Cn=Se.direction,En=Cn==="rtl";Ie&&(En?hn.paddingRight=Se.inlineIndent*Se.level:hn.paddingLeft=Se.inlineIndent*Se.level);var Tn={};this.getVisible()&&(Tn={"aria-owns":this.internalMenuId});var An=null;We!=="horizontal"&&(An=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(An=b.createElement(this.props.expandIcon,Object(G.a)({},this.props))));var Sn=b.createElement("div",Object(C.a)({ref:this.saveSubMenuTitle,style:hn,className:"".concat(Ne,"-title"),role:"button"},It,ht,{"aria-expanded":Ce},Tn,{"aria-haspopup":"true",title:typeof Se.title=="string"?Se.title:void 0}),Se.title,An||b.createElement("i",{className:"".concat(Ne,"-arrow")})),wn=this.renderChildren(),Fn=((pe=Se.parentMenu)===null||pe===void 0?void 0:pe.isRootMenu)?Se.parentMenu.props.getPopupContainer:function(Qn){return Qn.parentNode},Mn=wr[We],si=Se.popupOffset?{offset:Se.popupOffset}:{},kn=K()((ue={},Object(ae.a)(ue,Se.popupClassName,Se.popupClassName&&!Ie),Object(ae.a)(ue,"".concat(Ne,"-rtl"),En),ue)),on=Se.disabled,tn=Se.triggerSubMenuAction,Pn=Se.subMenuOpenDelay,Bn=Se.forceSubMenuRender,Jt=Se.subMenuCloseDelay,Hn=Se.builtinPlacements;de.forEach(function(Qn){return delete Se[Qn]}),delete Se.onClick;var oi=En?Object(G.a)(Object(G.a)({},ua),Hn):Object(G.a)(Object(G.a)({},Tr),Hn);delete Se.direction;var Kn=this.getBaseProps(),qn=Ie?null:this.getMotion(Kn.mode,Kn.visible);return b.createElement("li",Object(C.a)({},Se,pt,{className:qe,role:"menuitem"}),b.createElement(xi,{prefixCls:Ne,popupClassName:K()("".concat(Ne,"-popup"),kn),getPopupContainer:Fn,builtinPlacements:oi,popupPlacement:Mn,popupVisible:Ie?!1:Ce,popupAlign:si,popup:Ie?null:wn,action:on||Ie?[]:[tn],mouseEnterDelay:Pn,mouseLeaveDelay:Jt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Bn,popupMotion:qn},Sn),Ie?wn:null)}}]),ke}(b.Component);Oi.defaultProps={onMouseEnter:te,onMouseLeave:te,onTitleMouseEnter:te,onTitleMouseLeave:te,onTitleClick:te,manualRef:te,mode:"vertical",title:""};var nr=Object(d.b)(function(ye,Le){var ke=ye.openKeys,Te=ye.activeKey,re=ye.selectedKeys,pe=Le.eventKey,ue=Le.subMenuKey;return{isOpen:ke.indexOf(pe)>-1,active:Te[ue]===pe,selectedKeys:re}})(Oi);nr.isSubMenu=!0;var fr=nr,br="menuitem-overflowed",Jr=.5,Fi=function(ye){Object(w.a)(ke,ye);var Le=Object(x.a)(ke);function ke(){var Te;return Object(L.a)(this,ke),Te=Le.apply(this,arguments),Te.resizeObserver=null,Te.mutationObserver=null,Te.originalTotalWidth=0,Te.overflowedItems=[],Te.menuItemSizes=[],Te.cancelFrameId=null,Te.state={lastVisibleIndex:void 0},Te.childRef=b.createRef(),Te.getMenuItemNodes=function(){var re=Te.props.prefixCls,pe=Te.childRef.current;return pe?[].slice.call(pe.children).filter(function(ue){return ue.className.split(" ").indexOf("".concat(re,"-overflowed-submenu"))<0}):[]},Te.getOverflowedSubMenuItem=function(re,pe,ue){var Se=Te.props,Ce=Se.overflowedIndicator,Ne=Se.level,Ie=Se.mode,We=Se.prefixCls,qe=Se.theme;if(Ne!==1||Ie!=="horizontal")return null;var pt=Te.props.children[0],ht=pt.props,It=ht.children,hn=ht.title,Cn=ht.style,En=Object(k.a)(ht,["children","title","style"]),Tn=Object(G.a)({},Cn),An="".concat(re,"-overflowed-indicator"),Sn="".concat(re,"-overflowed-indicator");pe.length===0&&ue!==!0?Tn=Object(G.a)(Object(G.a)({},Tn),{},{display:"none"}):ue&&(Tn=Object(G.a)(Object(G.a)({},Tn),{},{visibility:"hidden",position:"absolute"}),An="".concat(An,"-placeholder"),Sn="".concat(Sn,"-placeholder"));var wn=qe?"".concat(We,"-").concat(qe):"",Fn={};return de.forEach(function(Mn){En[Mn]!==void 0&&(Fn[Mn]=En[Mn])}),b.createElement(fr,Object(C.a)({title:Ce,className:"".concat(We,"-overflowed-submenu"),popupClassName:wn},Fn,{key:An,eventKey:Sn,disabled:!1,style:Tn}),pe)},Te.setChildrenWidthAndResize=function(){if(Te.props.mode!=="horizontal")return;var re=Te.childRef.current;if(!re)return;var pe=re.children;if(!pe||pe.length===0)return;var ue=re.children[pe.length-1];Me(ue,"display","inline-block");var Se=Te.getMenuItemNodes(),Ce=Se.filter(function(Ne){return Ne.className.split(" ").indexOf(br)>=0});Ce.forEach(function(Ne){Me(Ne,"display","inline-block")}),Te.menuItemSizes=Se.map(function(Ne){return xe(Ne,!0)}),Ce.forEach(function(Ne){Me(Ne,"display","none")}),Te.overflowedIndicatorWidth=xe(re.children[re.children.length-1],!0),Te.originalTotalWidth=Te.menuItemSizes.reduce(function(Ne,Ie){return Ne+Ie},0),Te.handleResize(),Me(ue,"display","none")},Te.handleResize=function(){if(Te.props.mode!=="horizontal")return;var re=Te.childRef.current;if(!re)return;var pe=xe(re);Te.overflowedItems=[];var ue=0,Se;Te.originalTotalWidth>pe+Jr&&(Se=-1,Te.menuItemSizes.forEach(function(Ce){ue+=Ce,ue+Te.overflowedIndicatorWidth<=pe&&(Se+=1)})),Te.setState({lastVisibleIndex:Se})},Te}return Object(D.a)(ke,[{key:"componentDidMount",value:function(){var re=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var pe=this.childRef.current;if(!pe)return;this.resizeObserver=new $e.default(function(ue){ue.forEach(function(){var Se=re.cancelFrameId;cancelAnimationFrame(Se),re.cancelFrameId=requestAnimationFrame(re.setChildrenWidthAndResize)})}),[].slice.call(pe.children).concat(pe).forEach(function(ue){re.resizeObserver.observe(ue)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){re.resizeObserver.disconnect(),[].slice.call(pe.children).concat(pe).forEach(function(ue){re.resizeObserver.observe(ue)}),re.setChildrenWidthAndResize()}),this.mutationObserver.observe(pe,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(re){var pe=this,ue=this.state.lastVisibleIndex;return(re||[]).reduce(function(Se,Ce,Ne){var Ie=Ce;if(pe.props.mode==="horizontal"){var We=pe.getOverflowedSubMenuItem(Ce.props.eventKey,[]);ue!==void 0&&pe.props.className.indexOf("".concat(pe.props.prefixCls,"-root"))!==-1&&(Ne>ue&&(Ie=b.cloneElement(Ce,{style:{display:"none"},eventKey:"".concat(Ce.props.eventKey,"-hidden"),className:"".concat(br)})),Ne===ue+1&&(pe.overflowedItems=re.slice(ue+1).map(function(pt){return b.cloneElement(pt,{key:pt.props.eventKey,mode:"vertical-left"})}),We=pe.getOverflowedSubMenuItem(Ce.props.eventKey,pe.overflowedItems)));var qe=[].concat(Object(I.a)(Se),[We,Ie]);return Ne===re.length-1&&qe.push(pe.getOverflowedSubMenuItem(Ce.props.eventKey,[],!0)),qe}return[].concat(Object(I.a)(Se),[Ie])},[])}},{key:"render",value:function(){var re=this.props,pe=re.visible,ue=re.prefixCls,Se=re.overflowedIndicator,Ce=re.mode,Ne=re.level,Ie=re.tag,We=re.children,qe=re.theme,pt=Object(k.a)(re,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),ht=Ie;return b.createElement(ht,Object(C.a)({ref:this.childRef},pt),this.renderChildren(We))}}]),ke}(b.Component);Fi.defaultProps={tag:"div",className:""};var ca=Fi;function ir(ye){return ye.length?ye.every(function(Le){return!!Le.props.disabled}):!0}function _r(ye,Le,ke){var Te=ye.getState();ye.setState({activeKey:Object(G.a)(Object(G.a)({},Te.activeKey),{},Object(ae.a)({},Le,ke))})}function Xi(ye){return ye.eventKey||"0-menu-"}function Wi(ye,Le){var ke=Le,Te=ye.children,re=ye.eventKey;if(ke){var pe;if(Ue(Te,function(ue,Se){ue&&ue.props&&!ue.props.disabled&&ke===V(ue,re,Se)&&(pe=!0)}),pe)return ke}return ke=null,ye.defaultActiveFirst&&Ue(Te,function(ue,Se){!ke&&ue&&!ue.props.disabled&&(ke=V(ue,re,Se))}),ke}function Hr(ye){if(!ye)return;var Le=this.instanceArray.indexOf(ye);Le!==-1?this.instanceArray[Le]=ye:this.instanceArray.push(ye)}var ai=function(ye){Object(w.a)(ke,ye);var Le=Object(x.a)(ke);function ke(Te){var re;return Object(L.a)(this,ke),re=Le.call(this,Te),re.onKeyDown=function(pe,ue){var Se=pe.keyCode,Ce;if(re.getFlatInstanceArray().forEach(function(Ie){Ie&&Ie.props.active&&Ie.onKeyDown&&(Ce=Ie.onKeyDown(pe))}),Ce)return 1;var Ne=null;return(Se===p.a.UP||Se===p.a.DOWN)&&(Ne=re.step(Se===p.a.UP?-1:1)),Ne?(pe.preventDefault(),_r(re.props.store,Xi(re.props),Ne.props.eventKey),typeof ue=="function"&&ue(Ne),1):void 0},re.onItemHover=function(pe){var ue=pe.key,Se=pe.hover;_r(re.props.store,Xi(re.props),Se?ue:null)},re.onDeselect=function(pe){re.props.onDeselect(pe)},re.onSelect=function(pe){re.props.onSelect(pe)},re.onClick=function(pe){re.props.onClick(pe)},re.onOpenChange=function(pe){re.props.onOpenChange(pe)},re.onDestroy=function(pe){re.props.onDestroy(pe)},re.getFlatInstanceArray=function(){return re.instanceArray},re.step=function(pe){var ue=re.getFlatInstanceArray(),Se=re.props.store.getState().activeKey[Xi(re.props)],Ce=ue.length;if(!Ce)return null;pe<0&&(ue=ue.concat().reverse());var Ne=-1;if(ue.every(function(pt,ht){return pt&&pt.props.eventKey===Se?(Ne=ht,!1):!0}),!re.props.defaultActiveFirst&&Ne!==-1&&ir(ue.slice(Ne,Ce-1)))return;var Ie=(Ne+1)%Ce,We=Ie;do{var qe=ue[We];if(!qe||qe.props.disabled)We=(We+1)%Ce;else return qe}while(We!==Ie);return null},re.renderCommonMenuItem=function(pe,ue,Se){var Ce=re.props.store.getState(),Ne=Object(O.a)(re),Ie=Ne.props,We=V(pe,Ie.eventKey,ue),qe=pe.props;if(!qe||typeof pe.type=="string")return pe;var pt=We===Ce.activeKey,ht=Object(G.a)(Object(G.a)({mode:qe.mode||Ie.mode,level:Ie.level,inlineIndent:Ie.inlineIndent,renderMenuItem:re.renderMenuItem,rootPrefixCls:Ie.prefixCls,index:ue,parentMenu:Ie.parentMenu,manualRef:qe.disabled?void 0:Object(f.a)(pe.ref,Hr.bind(Object(O.a)(re))),eventKey:We,active:!qe.disabled&&pt,multiple:Ie.multiple,onClick:function(hn){(qe.onClick||te)(hn),re.onClick(hn)},onItemHover:re.onItemHover,motion:Ie.motion,subMenuOpenDelay:Ie.subMenuOpenDelay,subMenuCloseDelay:Ie.subMenuCloseDelay,forceSubMenuRender:Ie.forceSubMenuRender,onOpenChange:re.onOpenChange,onDeselect:re.onDeselect,onSelect:re.onSelect,builtinPlacements:Ie.builtinPlacements,itemIcon:qe.itemIcon||re.props.itemIcon,expandIcon:qe.expandIcon||re.props.expandIcon},Se),{},{direction:Ie.direction});return(Ie.mode==="inline"||Fe())&&(ht.triggerSubMenuAction="click"),b.cloneElement(pe,Object(G.a)(Object(G.a)({},ht),{},{key:We||ue}))},re.renderMenuItem=function(pe,ue,Se){if(!pe)return null;var Ce=re.props.store.getState(),Ne={openKeys:Ce.openKeys,selectedKeys:Ce.selectedKeys,triggerSubMenuAction:re.props.triggerSubMenuAction,subMenuKey:Se};return re.renderCommonMenuItem(pe,ue,Ne)},Te.store.setState({activeKey:Object(G.a)(Object(G.a)({},Te.store.getState().activeKey),{},Object(ae.a)({},Te.eventKey,Wi(Te,Te.activeKey)))}),re.instanceArray=[],re}return Object(D.a)(ke,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(re){return this.props.visible||re.visible||this.props.className!==re.className||!T()(this.props.style,re.style)}},{key:"componentDidUpdate",value:function(re){var pe=this.props,ue="activeKey"in pe?pe.activeKey:pe.store.getState().activeKey[Xi(pe)],Se=Wi(pe,ue);if(Se!==ue)_r(pe.store,Xi(pe),Se);else if("activeKey"in re){var Ce=Wi(re,re.activeKey);Se!==Ce&&_r(pe.store,Xi(pe),Se)}}},{key:"render",value:function(){var re=this,pe=Object(C.a)({},this.props);this.instanceArray=[];var ue=K()(pe.prefixCls,pe.className,"".concat(pe.prefixCls,"-").concat(pe.mode)),Se={className:ue,role:pe.role||"menu"};pe.id&&(Se.id=pe.id),pe.focusable&&(Se.tabIndex=0,Se.onKeyDown=this.onKeyDown);var Ce=pe.prefixCls,Ne=pe.eventKey,Ie=pe.visible,We=pe.level,qe=pe.mode,pt=pe.overflowedIndicator,ht=pe.theme;return de.forEach(function(It){return delete pe[It]}),delete pe.onClick,b.createElement(ca,Object(C.a)({},pe,{prefixCls:Ce,mode:qe,tag:"ul",level:We,theme:ht,visible:Ie,overflowedIndicator:pt},Se),Object(W.a)(pe.children).map(function(It,hn){return re.renderMenuItem(It,hn,Ne||"0-menu-")}))}}]),ke}(b.Component);ai.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:te};var Wn=Object(d.b)()(ai),vi=Wn,mi=H("Kwbf");function Ki(ye,Le,ke){var Te=ye.prefixCls,re=ye.motion,pe=ye.defaultMotions,ue=pe===void 0?{}:pe,Se=ye.openAnimation,Ce=ye.openTransitionName,Ne=Le.switchingModeFromInline;if(re)return re;if(Object(B.a)(Se)==="object"&&Se)Object(mi.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Se=="string")return{motionName:"".concat(Te,"-open-").concat(Se)};if(Ce)return{motionName:Ce};var Ie=ue[ke];return Ie||(Ne?null:ue.other)}var Ut=function(ye){Object(w.a)(ke,ye);var Le=Object(x.a)(ke);function ke(Te){var re;Object(L.a)(this,ke),re=Le.call(this,Te),re.onSelect=function(Se){var Ce=Object(O.a)(re),Ne=Ce.props;if(Ne.selectable){var Ie=re.store.getState(),We=Ie.selectedKeys,qe=Se.key;Ne.multiple?We=We.concat([qe]):We=[qe],"selectedKeys"in Ne||re.store.setState({selectedKeys:We}),Ne.onSelect(Object(G.a)(Object(G.a)({},Se),{},{selectedKeys:We}))}},re.onClick=function(Se){var Ce=re.getRealMenuMode(),Ne=Object(O.a)(re),Ie=Ne.store,We=Ne.props.onOpenChange;Ce!=="inline"&&!("openKeys"in re.props)&&(Ie.setState({openKeys:[]}),We([])),re.props.onClick(Se)},re.onKeyDown=function(Se,Ce){re.innerMenu.getWrappedInstance().onKeyDown(Se,Ce)},re.onOpenChange=function(Se){var Ce=Object(O.a)(re),Ne=Ce.props,Ie=re.store.getState().openKeys.concat(),We=!1,qe=function(ht){var It=!1;if(ht.open)It=Ie.indexOf(ht.key)===-1,It&&Ie.push(ht.key);else{var hn=Ie.indexOf(ht.key);It=hn!==-1,It&&Ie.splice(hn,1)}We=We||It};Array.isArray(Se)?Se.forEach(qe):qe(Se),We&&("openKeys"in re.props||re.store.setState({openKeys:Ie}),Ne.onOpenChange(Ie))},re.onDeselect=function(Se){var Ce=Object(O.a)(re),Ne=Ce.props;if(Ne.selectable){var Ie=re.store.getState().selectedKeys.concat(),We=Se.key,qe=Ie.indexOf(We);qe!==-1&&Ie.splice(qe,1),"selectedKeys"in Ne||re.store.setState({selectedKeys:Ie}),Ne.onDeselect(Object(G.a)(Object(G.a)({},Se),{},{selectedKeys:Ie}))}},re.onMouseEnter=function(Se){re.restoreModeVerticalFromInline();var Ce=re.props.onMouseEnter;Ce&&Ce(Se)},re.onTransitionEnd=function(Se){var Ce=Se.propertyName==="width"&&Se.target===Se.currentTarget,Ne=Se.target.className,Ie=Object.prototype.toString.call(Ne)==="[object SVGAnimatedString]"?Ne.animVal:Ne,We=Se.propertyName==="font-size"&&Ie.indexOf("anticon")>=0;(Ce||We)&&re.restoreModeVerticalFromInline()},re.setInnerMenu=function(Se){re.innerMenu=Se},re.isRootMenu=!0;var pe=Te.defaultSelectedKeys,ue=Te.defaultOpenKeys;return"selectedKeys"in Te&&(pe=Te.selectedKeys||[]),"openKeys"in Te&&(ue=Te.openKeys||[]),re.store=Object(d.c)({selectedKeys:pe,openKeys:ue,activeKey:{"0-menu-":Wi(Te,Te.activeKey)}}),re.state={switchingModeFromInline:!1,prevProps:Te,inlineOpenKeys:[],store:re.store},re}return Object(D.a)(ke,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(re){var pe=this.props,ue=pe.siderCollapsed,Se=pe.inlineCollapsed,Ce=pe.onOpenChange;(!re.inlineCollapsed&&Se||!re.siderCollapsed&&ue)&&Ce([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var re=this.props.collapsedWidth,pe=this.store,ue=this.prevOpenKeys,Se=this.getInlineCollapsed()&&(re===0||re==="0"||re==="0px");Se?(this.prevOpenKeys=pe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ue&&(this.store.setState({openKeys:ue}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var re=this.props.mode,pe=this.state.switchingModeFromInline,ue=this.getInlineCollapsed();return pe&&ue?"inline":ue?"vertical":re}},{key:"getInlineCollapsed",value:function(){var re=this.props,pe=re.inlineCollapsed,ue=re.siderCollapsed;return ue!==void 0?ue:pe}},{key:"restoreModeVerticalFromInline",value:function(){var re=this.state.switchingModeFromInline;re&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var re=Object(G.a)({},Object(E.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),pe=this.getRealMenuMode();return re.className+=" ".concat(re.prefixCls,"-root"),re.direction==="rtl"&&(re.className+=" ".concat(re.prefixCls,"-rtl")),re=Object(G.a)(Object(G.a)({},re),{},{mode:pe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ki(this.props,this.state,pe)}),delete re.openAnimation,delete re.openTransitionName,b.createElement(d.a,{store:this.store},b.createElement(vi,Object(C.a)({},re,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(re,pe){var ue=pe.prevProps,Se=pe.store,Ce=Se.getState(),Ne={},Ie={prevProps:re};return ue.mode==="inline"&&re.mode!=="inline"&&(Ie.switchingModeFromInline=!0),"openKeys"in re?Ne.openKeys=re.openKeys||[]:((re.inlineCollapsed&&!ue.inlineCollapsed||re.siderCollapsed&&!ue.siderCollapsed)&&(Ie.switchingModeFromInline=!0,Ie.inlineOpenKeys=Ce.openKeys,Ne.openKeys=[]),(!re.inlineCollapsed&&ue.inlineCollapsed||!re.siderCollapsed&&ue.siderCollapsed)&&(Ne.openKeys=pe.inlineOpenKeys,Ie.inlineOpenKeys=[])),Object.keys(Ne).length&&Se.setState(Ne),Ie}}]),ke}(b.Component);Ut.defaultProps={selectable:!0,onClick:te,onSelect:te,onOpenChange:te,onDeselect:te,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:b.createElement("span",null,"\xB7\xB7\xB7")};var sn=Ut,Qt=function(ye){Object(w.a)(ke,ye);var Le=Object(x.a)(ke);function ke(){var Te;return Object(L.a)(this,ke),Te=Le.apply(this,arguments),Te.onKeyDown=function(re){var pe=re.keyCode;return pe===p.a.ENTER?(Te.onClick(re),!0):void 0},Te.onMouseLeave=function(re){var pe=Te.props,ue=pe.eventKey,Se=pe.onItemHover,Ce=pe.onMouseLeave;Se({key:ue,hover:!1}),Ce({key:ue,domEvent:re})},Te.onMouseEnter=function(re){var pe=Te.props,ue=pe.eventKey,Se=pe.onItemHover,Ce=pe.onMouseEnter;Se({key:ue,hover:!0}),Ce({key:ue,domEvent:re})},Te.onClick=function(re){var pe=Te.props,ue=pe.eventKey,Se=pe.multiple,Ce=pe.onClick,Ne=pe.onSelect,Ie=pe.onDeselect,We=pe.isSelected,qe={key:ue,keyPath:[ue],item:Object(O.a)(Te),domEvent:re};Ce(qe),Se?We?Ie(qe):Ne(qe):We||Ne(qe)},Te.saveNode=function(re){Te.node=re},Te}return Object(D.a)(ke,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var re=this.props;re.onDestroy&&re.onDestroy(re.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var re,pe=Object(G.a)({},this.props),ue=K()(this.getPrefixCls(),pe.className,(re={},Object(ae.a)(re,this.getActiveClassName(),!pe.disabled&&pe.active),Object(ae.a)(re,this.getSelectedClassName(),pe.isSelected),Object(ae.a)(re,this.getDisabledClassName(),pe.disabled),re)),Se=Object(G.a)(Object(G.a)({},pe.attribute),{},{title:typeof pe.title=="string"?pe.title:void 0,className:ue,role:pe.role||"menuitem","aria-disabled":pe.disabled});pe.role==="option"?Se=Object(G.a)(Object(G.a)({},Se),{},{role:"option","aria-selected":pe.isSelected}):(pe.role===null||pe.role==="none")&&(Se.role="none");var Ce={onClick:pe.disabled?null:this.onClick,onMouseLeave:pe.disabled?null:this.onMouseLeave,onMouseEnter:pe.disabled?null:this.onMouseEnter},Ne=Object(G.a)({},pe.style);pe.mode==="inline"&&(pe.direction==="rtl"?Ne.paddingRight=pe.inlineIndent*pe.level:Ne.paddingLeft=pe.inlineIndent*pe.level),de.forEach(function(We){return delete pe[We]}),delete pe.direction;var Ie=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ie=b.createElement(this.props.itemIcon,this.props)),b.createElement("li",Object(C.a)({},Object(E.a)(pe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Se,Ce,{style:Ne,ref:this.saveNode}),pe.children,Ie)}}]),ke}(b.Component);Qt.isMenuItem=!0,Qt.defaultProps={onSelect:te,onMouseEnter:te,onMouseLeave:te,manualRef:te};var On=Object(d.b)(function(ye,Le){var ke=ye.activeKey,Te=ye.selectedKeys,re=Le.eventKey,pe=Le.subMenuKey;return{active:ke[pe]===re,isSelected:Array.isArray(Te)?Te.indexOf(re)!==-1:Te===re}})(Qt),jn=On,Xn=function(ye){Object(w.a)(ke,ye);var Le=Object(x.a)(ke);function ke(){var Te;return Object(L.a)(this,ke),Te=Le.apply(this,arguments),Te.renderInnerMenuItem=function(re){var pe=Te.props,ue=pe.renderMenuItem,Se=pe.index;return ue(re,Se,Te.props.subMenuKey)},Te}return Object(D.a)(ke,[{key:"render",value:function(){var re=Object(C.a)({},this.props),pe=re.className,ue=pe===void 0?"":pe,Se=re.rootPrefixCls,Ce="".concat(Se,"-item-group-title"),Ne="".concat(Se,"-item-group-list"),Ie=re.title,We=re.children;return de.forEach(function(qe){return delete re[qe]}),delete re.direction,b.createElement("li",Object(C.a)({},re,{onClick:function(pt){return pt.stopPropagation()},className:"".concat(ue," ").concat(Se,"-item-group")}),b.createElement("div",{className:Ce,title:typeof Ie=="string"?Ie:void 0},Ie),b.createElement("ul",{className:Ne},b.Children.map(We,this.renderInnerMenuItem)))}}]),ke}(b.Component);Xn.isMenuItemGroup=!0,Xn.defaultProps={disabled:!0};var Un=Xn,yi=function(Le){var ke=Le.className,Te=Le.rootPrefixCls,re=Le.style;return b.createElement("li",{className:"".concat(ke," ").concat(Te,"-item-divider"),style:re})};yi.defaultProps={disabled:!0,className:"",style:{}};var Yi=yi,In=sn,Sr=H("eDIo");function Gn(ye,Le){var ke=ye.prefixCls,Te=ye.editable,re=ye.locale,pe=ye.style;return!Te||Te.showAdd===!1?null:b.createElement("button",{ref:Le,type:"button",className:"".concat(ke,"-nav-add"),style:pe,"aria-label":(re==null?void 0:re.addAriaLabel)||"Add tab",onClick:function(Se){Te.onEdit("add",{event:Se})}},Te.addIcon||"+")}var Bi=b.forwardRef(Gn);function Pi(ye,Le){var ke=ye.prefixCls,Te=ye.id,re=ye.tabs,pe=ye.locale,ue=ye.mobile,Se=ye.moreIcon,Ce=Se===void 0?"More":Se,Ne=ye.moreTransitionName,Ie=ye.style,We=ye.className,qe=ye.editable,pt=ye.tabBarGutter,ht=ye.rtl,It=ye.onTabClick,hn=Object(b.useState)(!1),Cn=Object(X.a)(hn,2),En=Cn[0],Tn=Cn[1],An=Object(b.useState)(null),Sn=Object(X.a)(An,2),wn=Sn[0],Fn=Sn[1],Mn="".concat(Te,"-more-popup"),si="".concat(ke,"-dropdown"),kn=wn!==null?"".concat(Mn,"-").concat(wn):null,on=pe==null?void 0:pe.dropdownAriaLabel,tn=b.createElement(In,{onClick:function(qn){var Qn=qn.key,_i=qn.domEvent;It(Qn,_i),Tn(!1)},id:Mn,tabIndex:-1,role:"listbox","aria-activedescendant":kn,selectedKeys:[wn],"aria-label":on!==void 0?on:"expanded dropdown"},re.map(function(Kn){return b.createElement(jn,{key:Kn.key,id:"".concat(Mn,"-").concat(Kn.key),role:"option","aria-controls":Te&&"".concat(Te,"-panel-").concat(Kn.key),disabled:Kn.disabled},Kn.tab)}));function Pn(Kn){for(var qn=re.filter(function(Gi){return!Gi.disabled}),Qn=qn.findIndex(function(Gi){return Gi.key===wn})||0,_i=qn.length,Ri=0;Ri<_i;Ri+=1){Qn=(Qn+Kn+_i)%_i;var di=qn[Qn];if(!di.disabled){Fn(di.key);return}}}function Bn(Kn){var qn=Kn.which;if(!En){[p.a.DOWN,p.a.SPACE,p.a.ENTER].includes(qn)&&(Tn(!0),Kn.preventDefault());return}switch(qn){case p.a.UP:Pn(-1),Kn.preventDefault();break;case p.a.DOWN:Pn(1),Kn.preventDefault();break;case p.a.ESC:Tn(!1);break;case p.a.SPACE:case p.a.ENTER:wn!==null&&It(wn,Kn);break}}Object(b.useEffect)(function(){var Kn=document.getElementById(kn);Kn&&Kn.scrollIntoView&&Kn.scrollIntoView(!1)},[wn]),Object(b.useEffect)(function(){En||Fn(null)},[En]);var Jt=Object(ae.a)({},ht?"marginLeft":"marginRight",pt);re.length||(Jt.visibility="hidden",Jt.order=1);var Hn=K()(Object(ae.a)({},"".concat(si,"-rtl"),ht)),oi=ue?null:b.createElement(Sr.a,{prefixCls:si,overlay:tn,trigger:["hover"],visible:En,transitionName:Ne,onVisibleChange:Tn,overlayClassName:Hn,mouseEnterDelay:.1,mouseLeaveDelay:.1},b.createElement("button",{type:"button",className:"".concat(ke,"-nav-more"),style:Jt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Mn,id:"".concat(Te,"-more"),"aria-expanded":En,onKeyDown:Bn},Ce));return b.createElement("div",{className:K()("".concat(ke,"-nav-operations"),We),style:Ie,ref:Le},oi,b.createElement(Bi,{prefixCls:ke,locale:pe,editable:qe}))}var cr=b.forwardRef(Pi),Ba=Object(b.createContext)(null),Ws=.1,Qr=.01,bi=20,ms=Math.pow(.995,bi);function gs(){var ye=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ye)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ye.substr(0,4)))}function da(ye,Le){var ke=Object(b.useState)(),Te=Object(X.a)(ke,2),re=Te[0],pe=Te[1],ue=Object(b.useState)(0),Se=Object(X.a)(ue,2),Ce=Se[0],Ne=Se[1],Ie=Object(b.useState)(0),We=Object(X.a)(Ie,2),qe=We[0],pt=We[1],ht=Object(b.useState)(),It=Object(X.a)(ht,2),hn=It[0],Cn=It[1],En=Object(b.useRef)();function Tn(on){var tn=on.touches[0],Pn=tn.screenX,Bn=tn.screenY;pe({x:Pn,y:Bn}),window.clearInterval(En.current)}function An(on){if(!re)return;on.preventDefault();var tn=on.touches[0],Pn=tn.screenX,Bn=tn.screenY;pe({x:Pn,y:Bn});var Jt=Pn-re.x,Hn=Bn-re.y;Le(Jt,Hn);var oi=Date.now();Ne(oi),pt(oi-Ce),Cn({x:Jt,y:Hn})}function Sn(){if(!re)return;if(pe(null),Cn(null),hn){var on=hn.x/qe,tn=hn.y/qe,Pn=Math.abs(on),Bn=Math.abs(tn);if(Math.max(Pn,Bn)<Ws)return;var Jt=on,Hn=tn;En.current=window.setInterval(function(){if(Math.abs(Jt)<Qr&&Math.abs(Hn)<Qr){window.clearInterval(En.current);return}Jt*=ms,Hn*=ms,Le(Jt*bi,Hn*bi)},bi)}}var wn=Object(b.useRef)(0),Fn=Object(b.useRef)(!1),Mn=Object(b.useRef)();function si(on){var tn=on.deltaX,Pn=on.deltaY,Bn=0,Jt=Math.abs(tn),Hn=Math.abs(Pn);Jt===Hn?Bn=Mn.current==="x"?tn:Pn:Jt>Hn?(Bn=tn,Mn.current="x"):(Bn=Pn,Mn.current="y");var oi=Date.now();oi-wn.current>100&&(Fn.current=!1),(Le(-Bn,-Bn)||Fn.current)&&(on.preventDefault(),Fn.current=!0),wn.current=oi}var kn=Object(b.useRef)(null);kn.current={onTouchStart:Tn,onTouchMove:An,onTouchEnd:Sn,onWheel:si},b.useEffect(function(){function on(Jt){kn.current.onTouchStart(Jt)}function tn(Jt){kn.current.onTouchMove(Jt)}function Pn(Jt){kn.current.onTouchEnd(Jt)}function Bn(Jt){kn.current.onWheel(Jt)}return document.addEventListener("touchmove",tn,{passive:!1}),document.addEventListener("touchend",Pn,{passive:!1}),ye.current.addEventListener("touchstart",on,{passive:!1}),ye.current.addEventListener("wheel",Bn),function(){document.removeEventListener("touchmove",tn),document.removeEventListener("touchend",Pn)}},[])}function Ks(){var ye=Object(b.useRef)(new Map);function Le(Te){return ye.current.has(Te)||ye.current.set(Te,b.createRef()),ye.current.get(Te)}function ke(Te){ye.current.delete(Te)}return[Le,ke]}function ja(ye,Le){var ke=b.useRef(ye),Te=b.useState({}),re=Object(X.a)(Te,2),pe=re[1];function ue(Se){var Ce=typeof Se=="function"?Se(ke.current):Se;Ce!==ke.current&&Le(Ce,ke.current),ke.current=Ce,pe({})}return[ke.current,ue]}var vs=function(Le){var ke=Le.position,Te=Le.prefixCls,re=Le.extra;if(!re)return null;var pe,ue=re;return ke==="right"&&(pe=ue.right||!ue.left&&ue||null),ke==="left"&&(pe=ue.left||null),pe?b.createElement("div",{className:"".concat(Te,"-extra-content")},pe):null};function Ha(ye,Le){var ke,Te=b.useContext(Ba),re=Te.prefixCls,pe=Te.tabs,ue=ye.className,Se=ye.style,Ce=ye.id,Ne=ye.animated,Ie=ye.activeKey,We=ye.rtl,qe=ye.extra,pt=ye.editable,ht=ye.locale,It=ye.tabPosition,hn=ye.tabBarGutter,Cn=ye.children,En=ye.onTabClick,Tn=ye.onTabScroll,An=Object(b.useRef)(),Sn=Object(b.useRef)(),wn=Object(b.useRef)(),Fn=Object(b.useRef)(),Mn=Ks(),si=Object(X.a)(Mn,2),kn=si[0],on=si[1],tn=It==="top"||It==="bottom",Pn=ja(0,function(Vn,Nn){tn&&Tn&&Tn({direction:Vn>Nn?"left":"right"})}),Bn=Object(X.a)(Pn,2),Jt=Bn[0],Hn=Bn[1],oi=ja(0,function(Vn,Nn){!tn&&Tn&&Tn({direction:Vn>Nn?"top":"bottom"})}),Kn=Object(X.a)(oi,2),qn=Kn[0],Qn=Kn[1],_i=Object(b.useState)(0),Ri=Object(X.a)(_i,2),di=Ri[0],Gi=Ri[1],pr=Object(b.useState)(0),Ji=Object(X.a)(pr,2),Li=Ji[0],ni=Ji[1],$n=Object(b.useState)(0),hi=Object(X.a)($n,2),li=hi[0],mr=hi[1],Dr=Object(b.useState)(0),Ir=Object(X.a)(Dr,2),Zn=Ir[0],Er=Ir[1],Mr=Object(b.useState)(null),ti=Object(X.a)(Mr,2),Yn=ti[0],Di=ti[1],_s=Object(b.useState)(null),za=Object(X.a)(_s,2),kr=za[0],qr=za[1],ba=Object(b.useState)(0),Va=Object(X.a)(ba,2),_a=Va[0],Vs=Va[1],Xs=Object(b.useState)(0),Es=Object(X.a)(Xs,2),Xa=Es[0],Ya=Es[1],$r=c(new Map),ea=Object(X.a)($r,2),Ys=ea[0],Ea=ea[1],ha=a(pe,Ys,di),ta="".concat(re,"-nav-operations-hidden"),na=0,gr=0;tn?We?(na=0,gr=Math.max(0,di-Yn)):(na=Math.min(0,Yn-di),gr=0):(na=Math.min(0,kr-Li),gr=0);function Wr(Vn){return Vn<na?[na,!1]:Vn>gr?[gr,!1]:[Vn,!0]}var Pr=Object(b.useRef)(),fa=Object(b.useState)(),Kr=Object(X.a)(fa,2),xa=Kr[0],Ja=Kr[1];function Ta(){Ja(Date.now())}function Qa(){window.clearTimeout(Pr.current)}da(An,function(Vn,Nn){var Ii=!1;function Zi(ia,Ar){ia(function(ga){var Ur=Wr(ga+Ar),Mi=Object(X.a)(Ur,2),Ca=Mi[0],qa=Mi[1];return Ii=qa,Ca})}if(tn){if(Yn>=di)return Ii;Zi(Hn,Vn)}else{if(kr>=Li)return Ii;Zi(Qn,Nn)}return Qa(),Ta(),Ii}),Object(b.useEffect)(function(){return Qa(),xa&&(Pr.current=window.setTimeout(function(){Ja(0)},100)),Qa},[xa]);function Nr(){var Vn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ie,Nn=ha.get(Vn);if(!Nn)return;if(tn){var Ii=Jt;We?Nn.right<Jt?Ii=Nn.right:Nn.right+Nn.width>Jt+Yn&&(Ii=Nn.right+Nn.width-Yn):Nn.left<-Jt?Ii=-Nn.left:Nn.left+Nn.width>-Jt+Yn&&(Ii=-(Nn.left+Nn.width-Yn)),Qn(0),Hn(Wr(Ii)[0])}else{var Zi=qn;Nn.top<-qn?Zi=-Nn.top:Nn.top+Nn.height>-qn+kr&&(Zi=-(Nn.top+Nn.height-kr)),Hn(0),Qn(Wr(Zi)[0])}}var Gr=S(ha,{width:Yn,height:kr,left:Jt,top:qn},{width:li,height:Zn},{width:_a,height:Xa},Object(G.a)(Object(G.a)({},ye),{},{tabs:pe})),xs=Object(X.a)(Gr,2),Js=xs[0],Qs=xs[1],Zs=pe.map(function(Vn){var Nn=Vn.key;return b.createElement(o,{id:Ce,prefixCls:re,key:Nn,rtl:We,tab:Vn,closable:Vn.closable,editable:pt,active:Nn===Ie,tabPosition:It,tabBarGutter:hn,renderWrapper:Cn,removeAriaLabel:ht==null?void 0:ht.removeAriaLabel,ref:kn(Nn),onClick:function(Zi){En(Nn,Zi)},onRemove:function(){on(Nn)},onFocus:function(){Nr(Nn),Ta(),We||(An.current.scrollLeft=0),An.current.scrollTop=0}})}),Za=u(function(){var Vn,Nn,Ii,Zi,ia,Ar,ga,Ur,Mi,Ca=((Vn=An.current)===null||Vn===void 0?void 0:Vn.offsetWidth)||0,qa=((Nn=An.current)===null||Nn===void 0?void 0:Nn.offsetHeight)||0,$a=((Ii=Fn.current)===null||Ii===void 0?void 0:Ii.offsetWidth)||0,qi=((Zi=Fn.current)===null||Zi===void 0?void 0:Zi.offsetHeight)||0,zn=((ia=wn.current)===null||ia===void 0?void 0:ia.offsetWidth)||0,yr=((Ar=wn.current)===null||Ar===void 0?void 0:Ar.offsetHeight)||0;Di(Ca),qr(qa),Vs($a),Ya(qi);var Or=(((ga=Sn.current)===null||ga===void 0?void 0:ga.offsetWidth)||0)-$a,Rr=(((Ur=Sn.current)===null||Ur===void 0?void 0:Ur.offsetHeight)||0)-qi;Gi(Or),ni(Rr);var es=(Mi=wn.current)===null||Mi===void 0?void 0:Mi.className.includes(ta);mr(Or-(es?0:zn)),Er(Rr-(es?0:yr)),Ea(function(){var Aa=new Map;return pe.forEach(function(As){var Os=As.key,Vr=kn(Os).current;Vr&&Aa.set(Os,{width:Vr.offsetWidth,height:Vr.offsetHeight,left:Vr.offsetLeft,top:Vr.offsetTop})}),Aa})}),qs=pe.slice(0,Js),Qi=pe.slice(Qs+1),Ti=[].concat(Object(I.a)(qs),Object(I.a)(Qi)),ji=Object(b.useState)(),wi=Object(X.a)(ji,2),pa=wi[0],$s=wi[1],vr=ha.get(Ie),Ts=Object(b.useRef)();function ws(){m.a.cancel(Ts.current)}Object(b.useEffect)(function(){var Vn={};return vr&&(tn?(We?Vn.right=vr.right:Vn.left=vr.left,Vn.width=vr.width):(Vn.top=vr.top,Vn.height=vr.height)),ws(),Ts.current=m()(function(){$s(Vn)}),ws},[vr,tn,We]),Object(b.useEffect)(function(){Nr()},[Ie,vr,ha,tn]),Object(b.useEffect)(function(){Za()},[We,hn,Ie,pe.map(function(Vn){return Vn.key}).join("_")]);var Ss=!!Ti.length,zr="".concat(re,"-nav-wrap"),wa,ma,Cs,Sa;return tn?We?(ma=Jt>0,wa=Jt+Yn<di):(wa=Jt<0,ma=-Jt+Yn<di):(Cs=qn<0,Sa=-qn+kr<Li),b.createElement("div",{ref:Le,role:"tablist",className:K()("".concat(re,"-nav"),ue),style:Se,onKeyDown:function(){Ta()}},b.createElement(vs,{position:"left",extra:qe,prefixCls:re}),b.createElement(g.a,{onResize:Za},b.createElement("div",{className:K()(zr,(ke={},Object(ae.a)(ke,"".concat(zr,"-ping-left"),wa),Object(ae.a)(ke,"".concat(zr,"-ping-right"),ma),Object(ae.a)(ke,"".concat(zr,"-ping-top"),Cs),Object(ae.a)(ke,"".concat(zr,"-ping-bottom"),Sa),ke)),ref:An},b.createElement(g.a,{onResize:Za},b.createElement("div",{ref:Sn,className:"".concat(re,"-nav-list"),style:{transform:"translate(".concat(Jt,"px, ").concat(qn,"px)"),transition:xa?"none":void 0}},Zs,b.createElement(Bi,{ref:Fn,prefixCls:re,locale:ht,editable:pt,style:{visibility:Ss?"hidden":null}}),b.createElement("div",{className:K()("".concat(re,"-ink-bar"),Object(ae.a)({},"".concat(re,"-ink-bar-animated"),Ne.inkBar)),style:pa}))))),b.createElement(cr,Object.assign({},ye,{ref:wn,prefixCls:re,tabs:Ti,className:!Ss&&ta})),b.createElement(vs,{position:"right",extra:qe,prefixCls:re}))}var Wa=b.forwardRef(Ha);function Gs(ye){var Le=ye.id,ke=ye.activeKey,Te=ye.animated,re=ye.tabPosition,pe=ye.rtl,ue=ye.destroyInactiveTabPane,Se=b.useContext(Ba),Ce=Se.prefixCls,Ne=Se.tabs,Ie=Te.tabPane,We=Ne.findIndex(function(qe){return qe.key===ke});return b.createElement("div",{className:K()("".concat(Ce,"-content-holder"))},b.createElement("div",{className:K()("".concat(Ce,"-content"),"".concat(Ce,"-content-").concat(re),Object(ae.a)({},"".concat(Ce,"-content-animated"),Ie)),style:We&&Ie?Object(ae.a)({},pe?"marginRight":"marginLeft","-".concat(We,"00%")):null},Ne.map(function(qe){return b.cloneElement(qe.node,{key:qe.key,prefixCls:Ce,tabKey:qe.key,id:Le,animated:Ie,active:qe.key===ke,destroyInactiveTabPane:ue})})))}function ys(ye){var Le=ye.prefixCls,ke=ye.forceRender,Te=ye.className,re=ye.style,pe=ye.id,ue=ye.active,Se=ye.animated,Ce=ye.destroyInactiveTabPane,Ne=ye.tabKey,Ie=ye.children,We=b.useState(ke),qe=Object(X.a)(We,2),pt=qe[0],ht=qe[1];b.useEffect(function(){ue?ht(!0):Ce&&ht(!1)},[ue,Ce]);var It={};return ue||(Se?(It.visibility="hidden",It.height=0,It.overflowY="hidden"):It.display="none"),b.createElement("div",{id:pe&&"".concat(pe,"-panel-").concat(Ne),role:"tabpanel",tabIndex:ue?0:-1,"aria-labelledby":pe&&"".concat(pe,"-tab-").concat(Ne),"aria-hidden":!ue,style:Object(G.a)(Object(G.a)({},It),re),className:K()("".concat(Le,"-tabpane"),ue&&"".concat(Le,"-tabpane-active"),Te)},(ue||pt||ke)&&Ie)}var Ka=0;function bs(ye){return Object(W.a)(ye).map(function(Le){if(b.isValidElement(Le)){var ke=Le.key!==void 0?String(Le.key):void 0;return Object(G.a)(Object(G.a)({key:ke},Le.props),{},{node:Le})}return null}).filter(function(Le){return Le})}function zs(ye,Le){var ke,Te=ye.id,re=ye.prefixCls,pe=re===void 0?"rc-tabs":re,ue=ye.className,Se=ye.children,Ce=ye.direction,Ne=ye.activeKey,Ie=ye.defaultActiveKey,We=ye.editable,qe=ye.animated,pt=ye.tabPosition,ht=pt===void 0?"top":pt,It=ye.tabBarGutter,hn=ye.tabBarStyle,Cn=ye.tabBarExtraContent,En=ye.locale,Tn=ye.moreIcon,An=ye.moreTransitionName,Sn=ye.destroyInactiveTabPane,wn=ye.renderTabBar,Fn=ye.onChange,Mn=ye.onTabClick,si=ye.onTabScroll,kn=Object(k.a)(ye,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),on=bs(Se),tn=Ce==="rtl",Pn;qe===!1?Pn={inkBar:!1,tabPane:!1}:Pn=Object(G.a)({inkBar:!0,tabPane:!1},qe!==!0?qe:null);var Bn=Object(b.useState)(!1),Jt=Object(X.a)(Bn,2),Hn=Jt[0],oi=Jt[1];Object(b.useEffect)(function(){oi(gs())},[]);var Kn=Object(n.a)(function(){var Zn;return(Zn=on[0])===null||Zn===void 0?void 0:Zn.key},{value:Ne,defaultValue:Ie}),qn=Object(X.a)(Kn,2),Qn=qn[0],_i=qn[1],Ri=Object(b.useState)(function(){return on.findIndex(function(Zn){return Zn.key===Qn})}),di=Object(X.a)(Ri,2),Gi=di[0],pr=di[1];Object(b.useEffect)(function(){var Zn=on.findIndex(function(Mr){return Mr.key===Qn});if(Zn===-1){var Er;Zn=Math.max(0,Math.min(Gi,on.length-1)),_i((Er=on[Zn])===null||Er===void 0?void 0:Er.key)}pr(Zn)},[on.map(function(Zn){return Zn.key}).join("_"),Qn,Gi]);var Ji=Object(n.a)(null,{value:Te}),Li=Object(X.a)(Ji,2),ni=Li[0],$n=Li[1],hi=ht;Hn&&!["left","right"].includes(ht)&&(hi="top"),Object(b.useEffect)(function(){Te||($n("rc-tabs-".concat(Ka)),Ka+=1)},[]);function li(Zn,Er){Mn==null||Mn(Zn,Er),_i(Zn),Fn==null||Fn(Zn)}var mr={id:ni,activeKey:Qn,animated:Pn,tabPosition:hi,rtl:tn,mobile:Hn},Dr,Ir=Object(G.a)(Object(G.a)({},mr),{},{editable:We,locale:En,moreIcon:Tn,moreTransitionName:An,tabBarGutter:It,onTabClick:li,onTabScroll:si,extra:Cn,style:hn,panes:Se});return wn?Dr=wn(Ir,Wa):Dr=b.createElement(Wa,Object.assign({},Ir)),b.createElement(Ba.Provider,{value:{tabs:on,prefixCls:pe}},b.createElement("div",Object.assign({ref:Le,id:Te,className:K()(pe,"".concat(pe,"-").concat(hi),(ke={},Object(ae.a)(ke,"".concat(pe,"-mobile"),Hn),Object(ae.a)(ke,"".concat(pe,"-editable"),We),Object(ae.a)(ke,"".concat(pe,"-rtl"),tn),ke),ue)},kn),Dr,b.createElement(Gs,Object.assign({destroyInactiveTabPane:Sn},mr,{animated:Pn}))))}var Zr=b.forwardRef(zs);Zr.TabPane=ys;var Cr=Zr,Ga=Ee.b=Cr},kSUc:function(tt,Ee,H){},kqOp:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return I});var ae=H("0Owb"),X=H("fWQN"),k=H("mtLc"),G=H("yKVA"),b=H("879j"),N=H("q1tI"),K=H.n(N),W=H("Ot1p"),n="\u2581",I=function(y){Object(G.a)(g,y);var m=Object(b.a)(g);function g(){var u;Object(X.a)(this,g);for(var c=arguments.length,p=new Array(c),l=0;l<c;l++)p[l]=arguments[l];return u=m.call.apply(m,[this].concat(p)),u.getChCountBeforeCursor=function(o,s){for(var a=s.line,A=0,S=0;S<a;S++)A+=o.getLine(S).split(n).length-1;var C=o.getLine(a).substring(0,s.ch);return A+=C.split(n).length-1,A},u.onCMBeforeChange=function(o,s){var a=o.getRange(s.from,s.to),A=0;if(s.text.forEach(function(D){A+=D.split(n).length-1}),a&&a.indexOf(n)!=-1){var S=a.split(n).length-1,C=u.getChCountBeforeCursor(o,s.from);console.log("\u5220\u9664".concat(S,"\u4E2A\uFF0C \u4E4B\u524D\u6709").concat(C,"\u4E2A\uFF0C\u65B0\u589E").concat(A,"\u4E2A")),u.props.deleteEmptyDisabled?s.cancel():u.props.onPlaceholderChange&&u.props.onPlaceholderChange(C,S,A)}else if(A){var L=u.getChCountBeforeCursor(o,s.from);console.log("\u65B0\u589E".concat(A,"\u4E2A\uFF0C\u4E4B\u524D\u6709").concat(L,"\u4E2A")),u.props.onPlaceholderChange&&u.props.onPlaceholderChange(L,0,A)}},u}return Object(k.a)(g,[{key:"render",value:function(){return K.a.createElement(W.a,Object(ae.a)({},this.props,{onCMBeforeChange:this.onCMBeforeChange}))}}]),g}(N.Component)},lZu9:function(tt,Ee,H){(function(ae){ae(H("VrN/"),H("1eCo"),H("8EBN"))})(function(ae){"use strict";ae.defineMode("markdown",function(X,k){var G=ae.getMode(X,"text/html"),b=G.name=="null";function N(U){if(ae.findModeByName){var _=ae.findModeByName(U);_&&(U=_.mime||_.mimes[0])}var J=ae.getMode(X,U);return J.name=="null"?null:J}k.highlightFormatting===void 0&&(k.highlightFormatting=!1),k.maxBlockquoteDepth===void 0&&(k.maxBlockquoteDepth=0),k.taskLists===void 0&&(k.taskLists=!1),k.strikethrough===void 0&&(k.strikethrough=!1),k.emoji===void 0&&(k.emoji=!1),k.fencedCodeBlockHighlighting===void 0&&(k.fencedCodeBlockHighlighting=!0),k.fencedCodeBlockDefaultMode===void 0&&(k.fencedCodeBlockDefaultMode="text/plain"),k.xml===void 0&&(k.xml=!0),k.tokenTypeOverrides===void 0&&(k.tokenTypeOverrides={});var K={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 W in K)K.hasOwnProperty(W)&&k.tokenTypeOverrides[W]&&(K[W]=k.tokenTypeOverrides[W]);var n=/^([*\-_])(?:\s*\1){2,}\s*$/,I=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,m=k.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,g=/^ {0,3}(?:\={1,}|-{2,})\s*$/,u=/^[^#!\[\]*_\\<>` "'(~:]+/,c=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,l=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,o=" ";function s(U,_,J){return _.f=_.inline=J,J(U,_)}function a(U,_,J){return _.f=_.block=J,J(U,_)}function A(U){return!U||!/\S/.test(U.string)}function S(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==L){var _=b;if(!_){var J=ae.innerMode(G,U.htmlState);_=J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText}_&&(U.f=x,U.block=C,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function C(U,_){var J=U.column()===_.indentation,ne=A(_.prevLine.stream),he=_.indentedCode,be=_.prevLine.hr,Ke=_.list!==!1,De=(_.listStack[_.listStack.length-1]||0)+3;_.indentedCode=!1;var je=_.indentation;if(_.indentationDiff===null&&(_.indentationDiff=_.indentation,Ke)){for(_.list=null;je<_.listStack[_.listStack.length-1];)_.listStack.pop(),_.listStack.length?_.indentation=_.listStack[_.listStack.length-1]:_.list=!1;_.list!==!1&&(_.indentationDiff=je-_.listStack[_.listStack.length-1])}var Be=!ne&&!be&&!_.prevLine.header&&(!Ke||!he)&&!_.prevLine.fencedCodeEnd,Ge=(_.list===!1||be||ne)&&_.indentation<=De&&U.match(n),_e=null;if(_.indentationDiff>=4&&(he||_.prevLine.fencedCodeEnd||_.prevLine.header||ne))return U.skipToEnd(),_.indentedCode=!0,K.code;if(U.eatSpace())return null;if(J&&_.indentation<=De&&(_e=U.match(m))&&_e[1].length<=6)return _.quote=0,_.header=_e[1].length,_.thisLine.header=!0,k.highlightFormatting&&(_.formatting="header"),_.f=_.inline,O(_);if(_.indentation<=De&&U.eat(">"))return _.quote=J?1:_.quote+1,k.highlightFormatting&&(_.formatting="quote"),U.eatSpace(),O(_);if(!Ge&&!_.setext&&J&&_.indentation<=De&&(_e=U.match(I))){var Y=_e[1]?"ol":"ul";return _.indentation=je+U.current().length,_.list=!0,_.quote=0,_.listStack.push(_.indentation),_.em=!1,_.strong=!1,_.code=!1,_.strikethrough=!1,k.taskLists&&U.match(y,!1)&&(_.taskList=!0),_.f=_.inline,k.highlightFormatting&&(_.formatting=["list","list-"+Y]),O(_)}else{if(J&&_.indentation<=De&&(_e=U.match(c,!0)))return _.quote=0,_.fencedEndRE=new RegExp(_e[1]+"+ *$"),_.localMode=k.fencedCodeBlockHighlighting&&N(_e[2]||k.fencedCodeBlockDefaultMode),_.localMode&&(_.localState=ae.startState(_.localMode)),_.f=_.block=D,k.highlightFormatting&&(_.formatting="code-block"),_.code=-1,O(_);if(_.setext||(!Be||!Ke)&&!_.quote&&_.list===!1&&!_.code&&!Ge&&!p.test(U.string)&&(_e=U.lookAhead(1))&&(_e=_e.match(g)))return _.setext?(_.header=_.setext,_.setext=0,U.skipToEnd(),k.highlightFormatting&&(_.formatting="header")):(_.header=_e[0].charAt(0)=="="?1:2,_.setext=_.header),_.thisLine.header=!0,_.f=_.inline,O(_);if(Ge)return U.skipToEnd(),_.hr=!0,_.thisLine.hr=!0,K.hr;if(U.peek()==="[")return s(U,_,T)}return s(U,_,_.inline)}function L(U,_){var J=G.token(U,_.htmlState);if(!b){var ne=ae.innerMode(G,_.htmlState);(ne.mode.name=="xml"&&ne.state.tagStart===null&&!ne.state.context&&ne.state.tokenize.isInText||_.md_inside&&U.current().indexOf(">")>-1)&&(_.f=x,_.block=C,_.htmlState=null)}return J}function D(U,_){var J=_.listStack[_.listStack.length-1]||0,ne=_.indentation<J,he=J+3;if(_.fencedEndRE&&_.indentation<=he&&(ne||U.match(_.fencedEndRE))){k.highlightFormatting&&(_.formatting="code-block");var be;return ne||(be=O(_)),_.localMode=_.localState=null,_.block=C,_.f=x,_.fencedEndRE=null,_.code=0,_.thisLine.fencedCodeEnd=!0,ne?a(U,_,_.block):be}else return _.localMode?_.localMode.token(U,_.localState):(U.skipToEnd(),K.code)}function O(U){var _=[];if(U.formatting){_.push(K.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var J=0;J<U.formatting.length;J++)_.push(K.formatting+"-"+U.formatting[J]),U.formatting[J]==="header"&&_.push(K.formatting+"-"+U.formatting[J]+"-"+U.header),U.formatting[J]==="quote"&&(!k.maxBlockquoteDepth||k.maxBlockquoteDepth>=U.quote?_.push(K.formatting+"-"+U.formatting[J]+"-"+U.quote):_.push("error"))}if(U.taskOpen)return _.push("meta"),_.length?_.join(" "):null;if(U.taskClosed)return _.push("property"),_.length?_.join(" "):null;if(U.linkHref?_.push(K.linkHref,"url"):(U.strong&&_.push(K.strong),U.em&&_.push(K.em),U.strikethrough&&_.push(K.strikethrough),U.emoji&&_.push(K.emoji),U.linkText&&_.push(K.linkText),U.code&&_.push(K.code),U.image&&_.push(K.image),U.imageAltText&&_.push(K.imageAltText,"link"),U.imageMarker&&_.push(K.imageMarker)),U.header&&_.push(K.header,K.header+"-"+U.header),U.quote&&(_.push(K.quote),!k.maxBlockquoteDepth||k.maxBlockquoteDepth>=U.quote?_.push(K.quote+"-"+U.quote):_.push(K.quote+"-"+k.maxBlockquoteDepth)),U.list!==!1){var ne=(U.listStack.length-1)%3;ne?ne===1?_.push(K.list2):_.push(K.list3):_.push(K.list1)}return U.trailingSpaceNewLine?_.push("trailing-space-new-line"):U.trailingSpace&&_.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),_.length?_.join(" "):null}function w(U,_){return U.match(u,!0)?O(_):void 0}function x(U,_){var J=_.text(U,_);if(typeof J!="undefined")return J;if(_.list)return _.list=null,O(_);if(_.taskList){var ne=U.match(y,!0)[1]===" ";return ne?_.taskOpen=!0:_.taskClosed=!0,k.highlightFormatting&&(_.formatting="task"),_.taskList=!1,O(_)}if(_.taskOpen=!1,_.taskClosed=!1,_.header&&U.match(/^#+$/,!0))return k.highlightFormatting&&(_.formatting="header"),O(_);var he=U.next();if(_.linkTitle){_.linkTitle=!1;var be=he;he==="("&&(be=")"),be=(be+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ke="^\\s*(?:[^"+be+"\\\\]+|\\\\\\\\|\\\\.)"+be;if(U.match(new RegExp(Ke),!0))return K.linkHref}if(he==="`"){var De=_.formatting;k.highlightFormatting&&(_.formatting="code"),U.eatWhile("`");var je=U.current().length;if(_.code==0&&(!_.quote||je==1))return _.code=je,O(_);if(je==_.code){var Be=O(_);return _.code=0,Be}else return _.formatting=De,O(_)}else if(_.code)return O(_);if(he==="\\"&&(U.next(),k.highlightFormatting)){var Ge=O(_),_e=K.formatting+"-escape";return Ge?Ge+" "+_e:_e}if(he==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return _.imageMarker=!0,_.image=!0,k.highlightFormatting&&(_.formatting="image"),O(_);if(he==="["&&_.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return _.imageMarker=!1,_.imageAltText=!0,k.highlightFormatting&&(_.formatting="image"),O(_);if(he==="]"&&_.imageAltText){k.highlightFormatting&&(_.formatting="image");var Ge=O(_);return _.imageAltText=!1,_.image=!1,_.inline=_.f=E,Ge}if(he==="["&&!_.image)return _.linkText&&U.match(/^.*?\]/)||(_.linkText=!0,k.highlightFormatting&&(_.formatting="link")),O(_);if(he==="]"&&_.linkText){k.highlightFormatting&&(_.formatting="link");var Ge=O(_);return _.linkText=!1,_.inline=_.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?E:x,Ge}if(he==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){_.f=_.inline=d,k.highlightFormatting&&(_.formatting="link");var Ge=O(_);return Ge?Ge+=" ":Ge="",Ge+K.linkInline}if(he==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){_.f=_.inline=d,k.highlightFormatting&&(_.formatting="link");var Ge=O(_);return Ge?Ge+=" ":Ge="",Ge+K.linkEmail}if(k.xml&&he==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Y=U.string.indexOf(">",U.pos);if(Y!=-1){var M=U.string.substring(U.start,Y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(M)&&(_.md_inside=!0)}return U.backUp(1),_.htmlState=ae.startState(G),a(U,_,L)}if(k.xml&&he==="<"&&U.match(/^\/\w*?>/))return _.md_inside=!1,"tag";if(he==="*"||he==="_"){for(var F=1,Q=U.pos==1?" ":U.string.charAt(U.pos-2);F<3&&U.eat(he);)F++;var te=U.peek()||" ",V=!/\s/.test(te)&&(!l.test(te)||/\s/.test(Q)||l.test(Q)),ge=!/\s/.test(Q)&&(!l.test(Q)||/\s/.test(te)||l.test(te)),Ue=null,Ye=null;if(F%2&&(!_.em&&V&&(he==="*"||!ge||l.test(Q))?Ue=!0:_.em==he&&ge&&(he==="*"||!V||l.test(te))&&(Ue=!1)),F>1&&(!_.strong&&V&&(he==="*"||!ge||l.test(Q))?Ye=!0:_.strong==he&&ge&&(he==="*"||!V||l.test(te))&&(Ye=!1)),Ye!=null||Ue!=null){k.highlightFormatting&&(_.formatting=Ue==null?"strong":Ye==null?"em":"strong em"),Ue===!0&&(_.em=he),Ye===!0&&(_.strong=he);var Be=O(_);return Ue===!1&&(_.em=!1),Ye===!1&&(_.strong=!1),Be}}else if(he===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return O(_);U.backUp(1)}if(k.strikethrough){if(he==="~"&&U.eatWhile(he)){if(_.strikethrough){k.highlightFormatting&&(_.formatting="strikethrough");var Be=O(_);return _.strikethrough=!1,Be}else if(U.match(/^[^\s]/,!1))return _.strikethrough=!0,k.highlightFormatting&&(_.formatting="strikethrough"),O(_)}else if(he===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return O(_);U.backUp(2)}}if(k.emoji&&he===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){_.emoji=!0,k.highlightFormatting&&(_.formatting="emoji");var de=O(_);return _.emoji=!1,de}return he===" "&&(U.match(/^ +$/,!1)?_.trailingSpace++:_.trailingSpace&&(_.trailingSpaceNewLine=!0)),O(_)}function d(U,_){var J=U.next();if(J===">"){_.f=_.inline=x,k.highlightFormatting&&(_.formatting="link");var ne=O(_);return ne?ne+=" ":ne="",ne+K.linkInline}return U.match(/^[^>]+/,!0),K.linkInline}function E(U,_){if(U.eatSpace())return null;var J=U.next();return J==="("||J==="["?(_.f=_.inline=v(J==="("?")":"]"),k.highlightFormatting&&(_.formatting="link-string"),_.linkHref=!0,O(_)):"error"}var f={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function v(U){return function(_,J){var ne=_.next();if(ne===U){J.f=J.inline=x,k.highlightFormatting&&(J.formatting="link-string");var he=O(J);return J.linkHref=!1,he}return _.match(f[U]),J.linkHref=!0,O(J)}}function T(U,_){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(_.f=B,U.next(),k.highlightFormatting&&(_.formatting="link"),_.linkText=!0,O(_)):s(U,_,x)}function B(U,_){if(U.match(/^\]:/,!0)){_.f=_.inline=R,k.highlightFormatting&&(_.formatting="link");var J=O(_);return _.linkText=!1,J}return U.match(/^([^\]\\]|\\.)+/,!0),K.linkText}function R(U,_){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?_.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),_.f=_.inline=x,K.linkHref+" url")}var j={startState:function(){return{f:C,prevLine:{stream:null},thisLine:{stream:null},block:C,htmlState:null,indentation:0,inline:x,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(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&ae.copyState(G,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?ae.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,_){if(_.formatting=!1,U!=_.thisLine.stream){if(_.header=0,_.hr=!1,U.match(/^\s*$/,!0))return S(_),null;if(_.prevLine=_.thisLine,_.thisLine={stream:U},_.taskList=!1,_.trailingSpace=0,_.trailingSpaceNewLine=!1,!_.localState&&(_.f=_.block,_.f!=L)){var J=U.match(/^\s*/,!0)[0].replace(/\t/g,o).length;if(_.indentation=J,_.indentationDiff=null,J>0)return null}}return _.f(U,_)},innerMode:function(U){return U.block==L?{state:U.htmlState,mode:G}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:j}},indent:function(U,_,J){return U.block==L&&G.indent?G.indent(U.htmlState,_,J):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,_,J):ae.Pass},blankLine:S,getType:O,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return j},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},nEHx:function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return ae});var ae;(function(X){X.DARK="dark",X.LIGHT="light",X.HIGH_CONTRAST="hc"})(ae||(ae={}))},nnTU:function(tt,Ee,H){"use strict";H.d(Ee,"b",function(){return K}),H.d(Ee,"a",function(){return W});var ae=H("MI8n"),X=H("JYp7"),k=H("pmY6"),G=H("24hK"),b=H("746U"),N=H("Cg/j");const K=Object(N.c)("commandService"),W=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new ae.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(n,I){if(!n)throw new Error("invalid command");if(typeof n=="string"){if(!I)throw new Error("invalid command");return this.registerCommand({id:n,handler:I})}if(n.description){const c=[];for(let l of n.description.args)c.push(l.constraint);const p=n.handler;n.handler=function(l,...o){return Object(b.o)(o,c),p(l,...o)}}const{id:y}=n;let m=this._commands.get(y);m||(m=new G.a,this._commands.set(y,m));let g=m.unshift(n),u=Object(k.i)(()=>{g();const c=this._commands.get(y);(c==null?void 0:c.isEmpty())&&this._commands.delete(y)});return this._onDidRegisterCommand.fire(y),u}registerCommandAlias(n,I){return W.registerCommand(n,(y,...m)=>y.get(K).executeCommand(I,...m))}getCommand(n){const I=this._commands.get(n);return!I||I.isEmpty()?void 0:X.a.first(I)}getCommands(){const n=new Map;for(const I of this._commands.keys()){const y=this.getCommand(I);y&&n.set(I,y)}return n}};W.registerCommand("noop",()=>{})},osHv:function(tt,Ee,H){(function(ae){ae(H("VrN/"))})(function(ae){"use strict";var X=ae.Pos;function k(l,o){return l.line-o.line||l.ch-o.ch}var G="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",b=G+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",N=new RegExp("<(/?)(["+G+"]["+b+"]*)","g");function K(l,o,s,a){this.line=o,this.ch=s,this.cm=l,this.text=l.getLine(o),this.min=a?Math.max(a.from,l.firstLine()):l.firstLine(),this.max=a?Math.min(a.to-1,l.lastLine()):l.lastLine()}function W(l,o){var s=l.cm.getTokenTypeAt(X(l.line,o));return s&&/\btag\b/.test(s)}function n(l){return l.line>=l.max?void 0:(l.ch=0,l.text=l.cm.getLine(++l.line),!0)}function I(l){return l.line<=l.min?void 0:(l.text=l.cm.getLine(--l.line),l.ch=l.text.length,!0)}function y(l){for(;;){var o=l.text.indexOf(">",l.ch);if(o==-1){if(n(l))continue;return}if(!W(l,o+1)){l.ch=o+1;continue}var s=l.text.lastIndexOf("/",o),a=s>-1&&!/\S/.test(l.text.slice(s+1,o));return l.ch=o+1,a?"selfClose":"regular"}}function m(l){for(;;){var o=l.ch?l.text.lastIndexOf("<",l.ch-1):-1;if(o==-1){if(I(l))continue;return}if(!W(l,o+1)){l.ch=o;continue}N.lastIndex=o,l.ch=o;var s=N.exec(l.text);if(s&&s.index==o)return s}}function g(l){for(;;){N.lastIndex=l.ch;var o=N.exec(l.text);if(!o){if(n(l))continue;return}if(!W(l,o.index+1)){l.ch=o.index+1;continue}return l.ch=o.index+o[0].length,o}}function u(l){for(;;){var o=l.ch?l.text.lastIndexOf(">",l.ch-1):-1;if(o==-1){if(I(l))continue;return}if(!W(l,o+1)){l.ch=o;continue}var s=l.text.lastIndexOf("/",o),a=s>-1&&!/\S/.test(l.text.slice(s+1,o));return l.ch=o+1,a?"selfClose":"regular"}}function c(l,o){for(var s=[];;){var a=g(l),A,S=l.line,C=l.ch-(a?a[0].length:0);if(!a||!(A=y(l)))return;if(A=="selfClose")continue;if(a[1]){for(var L=s.length-1;L>=0;--L)if(s[L]==a[2]){s.length=L;break}if(L<0&&(!o||o==a[2]))return{tag:a[2],from:X(S,C),to:X(l.line,l.ch)}}else s.push(a[2])}}function p(l,o){for(var s=[];;){var a=u(l);if(!a)return;if(a=="selfClose"){m(l);continue}var A=l.line,S=l.ch,C=m(l);if(!C)return;if(C[1])s.push(C[2]);else{for(var L=s.length-1;L>=0;--L)if(s[L]==C[2]){s.length=L;break}if(L<0&&(!o||o==C[2]))return{tag:C[2],from:X(l.line,l.ch),to:X(A,S)}}}}ae.registerHelper("fold","xml",function(l,o){for(var s=new K(l,o.line,0);;){var a=g(s);if(!a||s.line!=o.line)return;var A=y(s);if(!A)return;if(!a[1]&&A!="selfClose"){var S=X(s.line,s.ch),C=c(s,a[2]);return C&&k(C.from,S)>0?{from:S,to:C.from}:null}}}),ae.findMatchingTag=function(l,o,s){var a=new K(l,o.line,o.ch,s);if(a.text.indexOf(">")==-1&&a.text.indexOf("<")==-1)return;var A=y(a),S=A&&X(a.line,a.ch),C=A&&m(a);if(!A||!C||k(a,o)>0)return;var L={from:X(a.line,a.ch),to:S,tag:C[2]};return A=="selfClose"?{open:L,close:null,at:"open"}:C[1]?{open:p(a,C[2]),close:L,at:"close"}:(a=new K(l,S.line,S.ch,s),{open:L,close:c(a,C[2]),at:"open"})},ae.findEnclosingTag=function(l,o,s,a){for(var A=new K(l,o.line,o.ch,s);;){var S=p(A,a);if(!S)break;var C=new K(l,o.line,o.ch,s),L=c(C,S.tag);if(L)return{open:S,close:L}}},ae.scanForClosingTag=function(l,o,s,a){var A=new K(l,o.line,o.ch,a?{from:0,to:a}:null);return c(A,s)}})},p5ED:function(tt,Ee,H){"use strict";var ae=H("+L6B"),X=H("2/Rp"),k=H("5Dmo"),G=H("3S7+"),b=H("k1fw"),N=H("9og8"),K=H("tJVT"),W=H("WmNS"),n=H.n(W),I=H("q1tI"),y=H.n(I),m=H("vHTk"),g=H.n(m),u=H("yEEn"),c=H("ZW9T"),p=H("1vsH"),l=H("V0Rq"),o=H("m3rI");Ee.a=function(s){var a,A,S,C,L,D,O,w=s.editOffice,x=w===void 0?"view":w,d=s.data,E=s.theme,f=s.type,v=s.filename,T=s.monacoEditor,B=s.className,R=s.style,j=s.close,U=s.onClose,_=s.hasMask,J=s.disabledDownload,ne=Object(I.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),he=Object(K.a)(ne,2),be=he[0],Ke=he[1],De=Object(I.useState)(""),je=Object(K.a)(De,2),Be=je[0],Ge=je[1],_e=Object(I.useState)(),Y=Object(K.a)(_e,2),M=Y[0],F=Y[1],Q=window.ENV==="build"?"/react/build":"",te=o.a.PROXY_SERVER||location.origin,V,ge=1024*1024,Ue=10*ge,Ye=Object(I.useRef)();(a=d)!==null&&a!==void 0&&a.startsWith("/api")&&f!=="txt"&&(d=(o.a.API_SERVER||location.origin)+d),f==="office"&&(V=Object(p.T)(d).filesize,V>Ue&&(f="other")),v&&T&&(T.filename=v),Object(I.useEffect)(function(){var Fe,$e,st=(Fe=document.cookie)===null||Fe===void 0||(($e=Fe.replace(/\s/g,""))===null||$e===void 0)?void 0:$e.split(";");st==null||st.map(function(mt){var ut=mt.split("=");ut[0]==="_educoder_session"&&Ge(ut[1])})},[]),Object(I.useEffect)(function(){f==="office"&&de()},[f,d]);var de=function(){var Fe=Object(N.a)(n.a.mark(function $e(){var st,mt,ut;return n.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return console.log("data:",d),st=d,d.startsWith("http")||(st=location.origin+st),mt=new URL(st).pathname.split("/").pop(),Et.next=6,Object(l.V)({attachment_id:mt});case 6:ut=Et.sent,F(ut);case 8:case"end":return Et.stop()}},$e)}));return function(){return Fe.apply(this,arguments)}}(),xe=function(){if(d.startsWith("http")||d.startsWith("blob:")){Me();return}Object(p.z)(v||"educoder",d,v)},Me=function(){Object(p.x)(v||"educoder",decodeURIComponent(d))};return y.a.createElement("div",{style:Object(b.a)({},R||{}),className:"".concat(_&&g.a.bgBlack," ").concat(f?g.a.wrp:"hide")},j&&y.a.createElement("div",{className:g.a.close,ref:Ye},!J&&y.a.createElement(G.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Ye.current}},y.a.createElement("span",{onClick:Me},y.a.createElement("i",{className:"icon-quxiaozhiding"}))),y.a.createElement(G.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Ye.current}},y.a.createElement("span",{className:"",onClick:U},y.a.createElement("i",{className:"icon-guanbi1"})))),y.a.createElement("div",{className:"".concat(g.a[B]," ").concat(B," ").concat(g.a.monaco," ").concat(f==="txt"?"show":"hide")},f==="txt"&&y.a.createElement(c.b,T)),f==="audio"&&y.a.createElement("audio",{src:"".concat(((A=d)===null||A===void 0?void 0:A.indexOf("http://"))>-1||((S=d)===null||S===void 0?void 0:S.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(d),autoPlay:!0}),f==="video"&&y.a.createElement(y.a.Fragment,null,((C=d)===null||C===void 0?void 0:C.indexOf("http"))>-1?y.a.createElement("video",{controls:!0,src:"".concat(d),autoPlay:!0}):y.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(d),autoPlay:!0})),f==="office"&&M&&y.a.createElement("iframe",{src:"".concat(Q,"/office.html?key=").concat(M.key,"&url=").concat(te+M.url,"&callbackUrl=").concat(te+M.callbackUrl,"&fileType=").concat(M.fileType,"&title=").concat(M.title,"&model=").concat(x,"&officeServer=").concat(o.a.OFFICE_SERVER,"&disabledDownload=").concat(!!J)}),f==="html"&&y.a.createElement("iframe",{src:d+"&disposition=inline"}),f==="pdf"&&y.a.createElement("iframe",{src:"".concat(Q,"/js/pdfview/index.html?url=").concat(d,"&disabledDownload=").concat(!!J)}),f==="image"&&y.a.createElement("img",{src:"".concat(((L=d)===null||L===void 0?void 0:L.indexOf("http://"))>-1||((D=d)===null||D===void 0?void 0:D.indexOf("https://"))>-1||(O=d)!==null&&O!==void 0&&O.startsWith("/api")?"":"data:image/png;base64,").concat(d)}),f==="other"&&y.a.createElement("div",null,y.a.createElement(X.a,{type:"primary",size:"large",onClick:xe},y.a.createElement(u.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),f==="download"&&y.a.createElement(X.a,{type:"primary",size:"large",onClick:xe},y.a.createElement(u.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(tt,Ee,H){},pmY6:function(tt,Ee,H){"use strict";H.d(Ee,"h",function(){return I}),H.d(Ee,"g",function(){return m}),H.d(Ee,"f",function(){return g}),H.d(Ee,"e",function(){return u}),H.d(Ee,"i",function(){return c}),H.d(Ee,"b",function(){return p}),H.d(Ee,"a",function(){return l}),H.d(Ee,"d",function(){return o}),H.d(Ee,"c",function(){return s});var ae=H("C/vA"),X=H("JYp7");const k=!1;let G=null;function b(a){G=a}if(k){const a="__is_disposable_tracked__";b(new class{trackDisposable(A){const S=new Error("Potentially leaked disposable").stack;setTimeout(()=>{A[a]||console.log(S)},3e3)}setParent(A,S){if(A&&A!==l.None)try{A[a]=!0}catch(C){}}markAsDisposed(A){if(A&&A!==l.None)try{A[a]=!0}catch(S){}}markAsSingleton(A){}})}function N(a){return G==null||G.trackDisposable(a),a}function K(a){G==null||G.markAsDisposed(a)}function W(a,A){G==null||G.setParent(a,A)}function n(a,A){if(!G)return;for(const S of a)G.setParent(S,A)}function I(a){return G==null||G.markAsSingleton(a),a}class y extends Error{constructor(a){super(`Encountered errors while disposing of store. Errors: [${a.join(", ")}]`);this.errors=a}}function m(a){return typeof a.dispose=="function"&&a.dispose.length===0}function g(a){if(X.a.is(a)){let A=[];for(const S of a)if(S)try{S.dispose()}catch(C){A.push(C)}if(A.length===1)throw A[0];if(A.length>1)throw new y(A);return Array.isArray(a)?[]:a}else if(a)return a.dispose(),a}function u(...a){const A=c(()=>g(a));return n(a,A),A}function c(a){const A=N({dispose:Object(ae.a)(()=>{K(A),a()})});return A}class p{constructor(){this._toDispose=new Set,this._isDisposed=!1,N(this)}dispose(){if(this._isDisposed)return;K(this),this._isDisposed=!0,this.clear()}clear(){try{g(this._toDispose.values())}finally{this._toDispose.clear()}}add(a){if(!a)return a;if(a===this)throw new Error("Cannot register a disposable on itself!");return W(a,this),this._isDisposed?p.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(a),a}}p.DISABLE_DISPOSED_WARNING=!1;class l{constructor(){this._store=new p,N(this),W(this._store,this)}dispose(){K(this),this._store.dispose()}_register(a){if(a===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(a)}}l.None=Object.freeze({dispose(){}});class o{constructor(){this._isDisposed=!1,N(this)}get value(){return this._isDisposed?void 0:this._value}set value(a){var A;if(this._isDisposed||a===this._value)return;(A=this._value)===null||A===void 0||A.dispose(),a&&W(a,this),this._value=a}clear(){this.value=void 0}dispose(){var a;this._isDisposed=!0,K(this),(a=this._value)===null||a===void 0||a.dispose(),this._value=void 0}clearAndLeak(){const a=this._value;return this._value=void 0,a&&W(a,null),a}}class s{constructor(a){this.object=a}dispose(){}}},psGv:function(tt,Ee,H){var ae,X;(function(){var k;(function(){"use strict";var K=[,,function(y){function m(c){this.__parent=c,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=[]}m.prototype.clone_empty=function(){var c=new m(this.__parent);return c.set_indent(this.__indent_count,this.__alignment_count),c},m.prototype.item=function(c){return c<0?this.__items[this.__items.length+c]:this.__items[c]},m.prototype.has_match=function(c){for(var p=this.__items.length-1;p>=0;p--)if(this.__items[p].match(c))return!0;return!1},m.prototype.set_indent=function(c,p){this.is_empty()&&(this.__indent_count=c||0,this.__alignment_count=p||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},m.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)},m.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},m.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var c=this.__parent.current_line;return c.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),c.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),c.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,c.__items[0]===" "&&(c.__items.splice(0,1),c.__character_count-=1),!0}return!1},m.prototype.is_empty=function(){return this.__items.length===0},m.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},m.prototype.push=function(c){this.__items.push(c);var p=c.lastIndexOf(`
|
|
`);p!==-1?this.__character_count=c.length-p:this.__character_count+=c.length},m.prototype.pop=function(){var c=null;return this.is_empty()||(c=this.__items.pop(),this.__character_count-=c.length),c},m.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},m.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},m.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},m.prototype.toString=function(){var c="";return this.is_empty()?this.__parent.indent_empty_lines&&(c=this.__parent.get_indent_string(this.__indent_count)):(c=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),c+=this.__items.join("")),c};function g(c,p){this.__cache=[""],this.__indent_size=c.indent_size,this.__indent_string=c.indent_char,c.indent_with_tabs||(this.__indent_string=new Array(c.indent_size+1).join(c.indent_char)),p=p||"",c.indent_level>0&&(p=new Array(c.indent_level+1).join(this.__indent_string)),this.__base_string=p,this.__base_string_length=p.length}g.prototype.get_indent_size=function(c,p){var l=this.__base_string_length;return p=p||0,c<0&&(l=0),l+=c*this.__indent_size,l+=p,l},g.prototype.get_indent_string=function(c,p){var l=this.__base_string;return p=p||0,c<0&&(c=0,l=""),p+=c*this.__indent_size,this.__ensure_cache(p),l+=this.__cache[p],l},g.prototype.__ensure_cache=function(c){for(;c>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var c=this.__cache.length,p=0,l="";this.__indent_size&&c>=this.__indent_size&&(p=Math.floor(c/this.__indent_size),c-=p*this.__indent_size,l=new Array(p+1).join(this.__indent_string)),c&&(l+=new Array(c+1).join(" ")),this.__cache.push(l)};function u(c,p){this.__indent_cache=new g(c,p),this.raw=!1,this._end_with_newline=c.end_with_newline,this.indent_size=c.indent_size,this.wrap_line_length=c.wrap_line_length,this.indent_empty_lines=c.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new m(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}u.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},u.prototype.get_line_number=function(){return this.__lines.length},u.prototype.get_indent_string=function(c,p){return this.__indent_cache.get_indent_string(c,p)},u.prototype.get_indent_size=function(c,p){return this.__indent_cache.get_indent_size(c,p)},u.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},u.prototype.add_new_line=function(c){return this.is_empty()||!c&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},u.prototype.get_code=function(c){this.trim(!0);var p=this.current_line.pop();p&&(p[p.length-1]===`
|
|
`&&(p=p.replace(/\n+$/g,"")),this.current_line.push(p)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(`
|
|
`);return c!==`
|
|
`&&(l=l.replace(/[\n]/g,c)),l},u.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},u.prototype.set_indent=function(c,p){return c=c||0,p=p||0,this.next_line.set_indent(c,p),this.__lines.length>1?(this.current_line.set_indent(c,p),!0):(this.current_line.set_indent(),!1)},u.prototype.add_raw_token=function(c){for(var p=0;p<c.newlines;p++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(c.whitespace_before),this.current_line.push(c.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},u.prototype.add_token=function(c){this.__add_space_before_token(),this.current_line.push(c),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},u.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(" "))},u.prototype.remove_indent=function(c){for(var p=this.__lines.length;c<p;)this.__lines[c]._remove_indent(),c++;this.current_line._remove_wrap_indent()},u.prototype.trim=function(c){for(c=c===void 0?!1:c,this.current_line.trim();c&&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},u.prototype.just_added_newline=function(){return this.current_line.is_empty()},u.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},u.prototype.ensure_empty_line_above=function(c,p){for(var l=this.__lines.length-2;l>=0;){var o=this.__lines[l];if(o.is_empty())break;if(o.item(0).indexOf(c)!==0&&o.item(-1)!==p){this.__lines.splice(l+1,0,new m(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},y.exports.Output=u},function(y){function m(g,u,c,p){this.type=g,this.text=u,this.comments_before=null,this.newlines=c||0,this.whitespace_before=p||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}y.exports.Token=m},,,function(y){function m(c,p){this.raw_options=g(c,p),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"])}m.prototype._get_array=function(c,p){var l=this.raw_options[c],o=p||[];return typeof l=="object"?l!==null&&typeof l.concat=="function"&&(o=l.concat()):typeof l=="string"&&(o=l.split(/[^a-zA-Z0-9_\/\-]+/)),o},m.prototype._get_boolean=function(c,p){var l=this.raw_options[c],o=l===void 0?!!p:!!l;return o},m.prototype._get_characters=function(c,p){var l=this.raw_options[c],o=p||"";return typeof l=="string"&&(o=l.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),o},m.prototype._get_number=function(c,p){var l=this.raw_options[c];p=parseInt(p,10),isNaN(p)&&(p=0);var o=parseInt(l,10);return isNaN(o)&&(o=p),o},m.prototype._get_selection=function(c,p,l){var o=this._get_selection_list(c,p,l);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+c+`' can only be one of the following values:
|
|
`+p+`
|
|
You passed in: '`+this.raw_options[c]+"'");return o[0]},m.prototype._get_selection_list=function(c,p,l){if(!p||p.length===0)throw new Error("Selection list cannot be empty.");if(l=l||[p[0]],!this._is_valid_selection(l,p))throw new Error("Invalid Default Value!");var o=this._get_array(c,l);if(!this._is_valid_selection(o,p))throw new Error("Invalid Option Value: The option '"+c+`' can contain only the following values:
|
|
`+p+`
|
|
You passed in: '`+this.raw_options[c]+"'");return o},m.prototype._is_valid_selection=function(c,p){return c.length&&p.length&&!c.some(function(l){return p.indexOf(l)===-1})};function g(c,p){var l={};c=u(c);var o;for(o in c)o!==p&&(l[o]=c[o]);if(p&&c[p])for(o in c[p])l[o]=c[p][o];return l}function u(c){var p={},l;for(l in c){var o=l.replace(/-/g,"_");p[o]=c[l]}return p}y.exports.Options=m,y.exports.normalizeOpts=u,y.exports.mergeOpts=g},,function(y){var m=RegExp.prototype.hasOwnProperty("sticky");function g(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position<this.__input_length},g.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__input.charAt(this.__position),this.__position+=1),u},g.prototype.peek=function(u){var c=null;return u=u||0,u+=this.__position,u>=0&&u<this.__input_length&&(c=this.__input.charAt(u)),c},g.prototype.__match=function(u,c){u.lastIndex=c;var p=u.exec(this.__input);return p&&!(m&&u.sticky)&&(p.index!==c&&(p=null)),p},g.prototype.test=function(u,c){return c=c||0,c+=this.__position,c>=0&&c<this.__input_length?!!this.__match(u,c):!1},g.prototype.testChar=function(u,c){var p=this.peek(c);return u.lastIndex=0,p!==null&&u.test(p)},g.prototype.match=function(u){var c=this.__match(u,this.__position);return c?this.__position+=c[0].length:c=null,c},g.prototype.read=function(u,c,p){var l="",o;return u&&(o=this.match(u),o&&(l+=o[0])),c&&(o||!u)&&(l+=this.readUntil(c,p)),l},g.prototype.readUntil=function(u,c){var p="",l=this.__position;u.lastIndex=this.__position;var o=u.exec(this.__input);return o?(l=o.index,c&&(l+=o[0].length)):l=this.__input_length,p=this.__input.substring(this.__position,l),this.__position=l,p},g.prototype.readUntilAfter=function(u){return this.readUntil(u,!0)},g.prototype.get_regexp=function(u,c){var p=null,l="g";return c&&m&&(l="y"),typeof u=="string"&&u!==""?p=new RegExp(u,l):u&&(p=new RegExp(u.source,l)),p},g.prototype.get_literal_regexp=function(u){return RegExp(u.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},g.prototype.peekUntilAfter=function(u){var c=this.__position,p=this.readUntilAfter(u);return this.__position=c,p},g.prototype.lookBack=function(u){var c=this.__position-1;return c>=u.length&&this.__input.substring(c-u.length,c).toLowerCase()===u},y.exports.InputScanner=g},function(y,m,g){var u=g(8).InputScanner,c=g(3).Token,p=g(10).TokenStream,l=g(11).WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(a,A){this._input=new u(a),this._options=A||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new l(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new p,this._reset();for(var a,A=new c(o.START,""),S=null,C=[],L=new p;A.type!==o.EOF;){for(a=this._get_next_token(A,S);this._is_comment(a);)L.add(a),a=this._get_next_token(A,S);L.isEmpty()||(a.comments_before=L,L=new p),a.parent=S,this._is_opening(a)?(C.push(S),S=a):S&&this._is_closing(a,S)&&(a.opened=S,S.closed=a,S=C.pop(),a.parent=S),a.previous=A,A.next=a,this.__tokens.add(a),A=a}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(a,A){this._readWhitespace();var S=this._input.read(/.+/g);return S?this._create_token(o.RAW,S):this._create_token(o.EOF,"")},s.prototype._is_comment=function(a){return!1},s.prototype._is_opening=function(a){return!1},s.prototype._is_closing=function(a,A){return!1},s.prototype._create_token=function(a,A){var S=new c(a,A,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return S},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},y.exports.Tokenizer=s,y.exports.TOKEN=o},function(y){function m(g){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=g}m.prototype.restart=function(){this.__position=0},m.prototype.isEmpty=function(){return this.__tokens_length===0},m.prototype.hasNext=function(){return this.__position<this.__tokens_length},m.prototype.next=function(){var g=null;return this.hasNext()&&(g=this.__tokens[this.__position],this.__position+=1),g},m.prototype.peek=function(g){var u=null;return g=g||0,g+=this.__position,g>=0&&g<this.__tokens_length&&(u=this.__tokens[g]),u},m.prototype.add=function(g){this.__parent_token&&(g.parent=this.__parent_token),this.__tokens.push(g),this.__tokens_length+=1},y.exports.TokenStream=m},function(y,m,g){var u=g(12).Pattern;function c(p,l){u.call(this,p,l),l?this._line_regexp=this._input.get_regexp(l._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}c.prototype=new u,c.prototype.__set_whitespace_patterns=function(p,l){p+="\\t ",l+="\\n\\r",this._match_pattern=this._input.get_regexp("["+p+l+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+l+"]")},c.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var p=this._input.read(this._match_pattern);if(p===" ")this.whitespace_before_token=" ";else if(p){var l=this.__split(this._newline_regexp,p);this.newline_count=l.length-1,this.whitespace_before_token=l[this.newline_count]}return p},c.prototype.matching=function(p,l){var o=this._create();return o.__set_whitespace_patterns(p,l),o._update(),o},c.prototype._create=function(){return new c(this._input,this)},c.prototype.__split=function(p,l){p.lastIndex=0;for(var o=0,s=[],a=p.exec(l);a;)s.push(l.substring(o,a.index)),o=a.index+a[0].length,a=p.exec(l);return o<l.length?s.push(l.substring(o,l.length)):s.push(""),s},y.exports.WhitespacePattern=c},function(y){function m(g,u){this._input=g,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,u&&(this._starting_pattern=this._input.get_regexp(u._starting_pattern,!0),this._match_pattern=this._input.get_regexp(u._match_pattern,!0),this._until_pattern=this._input.get_regexp(u._until_pattern),this._until_after=u._until_after)}m.prototype.read=function(){var g=this._input.read(this._starting_pattern);return(!this._starting_pattern||g)&&(g+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),g},m.prototype.read_match=function(){return this._input.match(this._match_pattern)},m.prototype.until_after=function(g){var u=this._create();return u._until_after=!0,u._until_pattern=this._input.get_regexp(g),u._update(),u},m.prototype.until=function(g){var u=this._create();return u._until_after=!1,u._until_pattern=this._input.get_regexp(g),u._update(),u},m.prototype.starting_with=function(g){var u=this._create();return u._starting_pattern=this._input.get_regexp(g,!0),u._update(),u},m.prototype.matching=function(g){var u=this._create();return u._match_pattern=this._input.get_regexp(g,!0),u._update(),u},m.prototype._create=function(){return new m(this._input,this)},m.prototype._update=function(){},y.exports.Pattern=m},function(y){function m(g,u){g=typeof g=="string"?g:g.source,u=typeof u=="string"?u:u.source,this.__directives_block_pattern=new RegExp(g+/ beautify( \w+[:]\w+)+ /.source+u,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(g+/\sbeautify\signore:end\s/.source+u,"g")}m.prototype.get_directives=function(g){if(!g.match(this.__directives_block_pattern))return null;var u={};this.__directive_pattern.lastIndex=0;for(var c=this.__directive_pattern.exec(g);c;)u[c[1]]=c[2],c=this.__directive_pattern.exec(g);return u},m.prototype.readIgnored=function(g){return g.readUntilAfter(this.__directives_end_ignore_pattern)},y.exports.Directives=m},function(y,m,g){var u=g(12).Pattern,c={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function p(l,o){u.call(this,l,o),this.__template_pattern=null,this._disabled=Object.assign({},c),this._excluded=Object.assign({},c),o&&(this.__template_pattern=this._input.get_regexp(o.__template_pattern),this._excluded=Object.assign(this._excluded,o._excluded),this._disabled=Object.assign(this._disabled,o._disabled));var s=new u(l);this.__patterns={handlebars_comment:s.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:s.starting_with(/{{{/).until_after(/}}}/),handlebars:s.starting_with(/{{/).until_after(/}}/),php:s.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}p.prototype=new u,p.prototype._create=function(){return new p(this._input,this)},p.prototype._update=function(){this.__set_templated_pattern()},p.prototype.disable=function(l){var o=this._create();return o._disabled[l]=!0,o._update(),o},p.prototype.read_options=function(l){var o=this._create();for(var s in c)o._disabled[s]=l.templating.indexOf(s)===-1;return o._update(),o},p.prototype.exclude=function(l){var o=this._create();return o._excluded[l]=!0,o._update(),o},p.prototype.read=function(){var l="";this._match_pattern?l=this._input.read(this._starting_pattern):l=this._input.read(this._starting_pattern,this.__template_pattern);for(var o=this._read_template();o;)this._match_pattern?o+=this._input.read(this._match_pattern):o+=this._input.readUntil(this.__template_pattern),l+=o,o=this._read_template();return this._until_after&&(l+=this._input.readUntilAfter(this._until_pattern)),l},p.prototype.__set_templated_pattern=function(){var l=[];this._disabled.php||l.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||l.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||l.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(l.push(this.__patterns.django._starting_pattern.source),l.push(this.__patterns.django_value._starting_pattern.source),l.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||l.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&l.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+l.join("|")+")")},p.prototype._read_template=function(){var l="",o=this._input.peek();if(o==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(l=l||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(l=l||this.__patterns.erb.read())}else o==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(l=l||this.__patterns.handlebars_comment.read(),l=l||this.__patterns.handlebars_unescaped.read(),l=l||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(l=l||this.__patterns.django_value.read()),this._excluded.django||(l=l||this.__patterns.django_comment.read(),l=l||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(l=l||this.__patterns.smarty_comment.read(),l=l||this.__patterns.smarty_literal.read(),l=l||this.__patterns.smarty.read()));return l},y.exports.TemplatablePattern=p},,,,function(y,m,g){var u=g(19).Beautifier,c=g(20).Options;function p(l,o,s,a){var A=new u(l,o,s,a);return A.beautify()}y.exports=p,y.exports.defaultOptions=function(){return new c}},function(y,m,g){var u=g(20).Options,c=g(2).Output,p=g(21).Tokenizer,l=g(21).TOKEN,o=/\r\n|[\r\n]/,s=/\r\n|[\r\n]/g,a=function(E,f){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=E.max_preserve_newlines,this.preserve_newlines=E.preserve_newlines,this._output=new c(E,f)};a.prototype.current_line_has_match=function(E){return this._output.current_line.has_match(E)},a.prototype.set_space_before_token=function(E,f){this._output.space_before_token=E,this._output.non_breaking_space=f},a.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},a.prototype.add_raw_token=function(E){this._output.add_raw_token(E)},a.prototype.print_preserved_newlines=function(E){var f=0;E.type!==l.TEXT&&E.previous.type!==l.TEXT&&(f=E.newlines?1:0),this.preserve_newlines&&(f=E.newlines<this.max_preserve_newlines+1?E.newlines:this.max_preserve_newlines+1);for(var v=0;v<f;v++)this.print_newline(v>0);return f!==0},a.prototype.traverse_whitespace=function(E){return E.whitespace_before||E.newlines?(this.print_preserved_newlines(E)||(this._output.space_before_token=!0),!0):!1},a.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},a.prototype.print_newline=function(E){this._output.add_new_line(E)},a.prototype.print_token=function(E){E.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(E.text))},a.prototype.indent=function(){this.indent_level++},a.prototype.get_full_indent=function(E){return E=this.indent_level+(E||0),E<1?"":this._output.get_indent_string(E)};var A=function(E){for(var f=null,v=E.next;v.type!==l.EOF&&E.closed!==v;){if(v.type===l.ATTRIBUTE&&v.text==="type"){v.next&&v.next.type===l.EQUALS&&v.next.next&&v.next.next.type===l.VALUE&&(f=v.next.next.text);break}v=v.next}return f},S=function(E,f){var v=null,T=null;return f.closed?(E==="script"?v="text/javascript":E==="style"&&(v="text/css"),v=A(f)||v,v.search("text/css")>-1?T="css":v.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?T="javascript":v.search(/(text|application|dojo)\/(x-)?(html)/)>-1?T="html":v.search(/test\/null/)>-1&&(T="null"),T):null};function C(E,f){return f.indexOf(E)!==-1}function L(E,f,v){this.parent=E||null,this.tag=f?f.tag_name:"",this.indent_level=v||0,this.parser_token=f||null}function D(E){this._printer=E,this._current_frame=null}D.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},D.prototype.record_tag=function(E){var f=new L(this._current_frame,E,this._printer.indent_level);this._current_frame=f},D.prototype._try_pop_frame=function(E){var f=null;return E&&(f=E.parser_token,this._printer.indent_level=E.indent_level,this._current_frame=E.parent),f},D.prototype._get_frame=function(E,f){for(var v=this._current_frame;v&&!(E.indexOf(v.tag)!==-1);){if(f&&f.indexOf(v.tag)!==-1){v=null;break}v=v.parent}return v},D.prototype.try_pop=function(E,f){var v=this._get_frame([E],f);return this._try_pop_frame(v)},D.prototype.indent_to_tag=function(E){var f=this._get_frame(E);f&&(this._printer.indent_level=f.indent_level)};function O(E,f,v,T){this._source_text=E||"",f=f||{},this._js_beautify=v,this._css_beautify=T,this._tag_stack=null;var B=new u(f,"html");this._options=B,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 E=this._source_text,f=this._options.eol;this._options.eol==="auto"&&(f=`
|
|
`,E&&o.test(E)&&(f=E.match(o)[0])),E=E.replace(s,`
|
|
`);var v=E.match(/^[\t ]*/)[0],T={text:"",type:""},B=new w,R=new a(this._options,v),j=new p(E,this._options).tokenize();this._tag_stack=new D(R);for(var U=null,_=j.next();_.type!==l.EOF;)_.type===l.TAG_OPEN||_.type===l.COMMENT?(U=this._handle_tag_open(R,_,B,T),B=U):_.type===l.ATTRIBUTE||_.type===l.EQUALS||_.type===l.VALUE||_.type===l.TEXT&&!B.tag_complete?U=this._handle_inside_tag(R,_,B,j):_.type===l.TAG_CLOSE?U=this._handle_tag_close(R,_,B):_.type===l.TEXT?U=this._handle_text(R,_,B):R.add_raw_token(_),T=U,_=j.next();var J=R._output.get_code(f);return J},O.prototype._handle_tag_close=function(E,f,v){var T={text:f.text,type:f.type};return E.alignment_size=0,v.tag_complete=!0,E.set_space_before_token(f.newlines||f.whitespace_before!=="",!0),v.is_unformatted?E.add_raw_token(f):(v.tag_start_char==="<"&&(E.set_space_before_token(f.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&v.has_wrapped_attrs&&E.print_newline(!1)),E.print_token(f)),v.indent_content&&!(v.is_unformatted||v.is_content_unformatted)&&(E.indent(),v.indent_content=!1),!v.is_inline_element&&!(v.is_unformatted||v.is_content_unformatted)&&E.set_wrap_point(),T},O.prototype._handle_inside_tag=function(E,f,v,T){var B=v.has_wrapped_attrs,R={text:f.text,type:f.type};if(E.set_space_before_token(f.newlines||f.whitespace_before!=="",!0),v.is_unformatted)E.add_raw_token(f);else if(v.tag_start_char==="{"&&f.type===l.TEXT)E.print_preserved_newlines(f)?(f.newlines=0,E.add_raw_token(f)):E.print_token(f);else{if(f.type===l.ATTRIBUTE?(E.set_space_before_token(!0),v.attr_count+=1):(f.type===l.EQUALS||f.type===l.VALUE&&f.previous.type===l.EQUALS)&&E.set_space_before_token(!1),f.type===l.ATTRIBUTE&&v.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(E.traverse_whitespace(f),B=B||f.newlines!==0),this._is_wrap_attributes_force)){var j=v.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&v.attr_count===1){var U=!0,_=0,J;do{if(J=T.peek(_),J.type===l.ATTRIBUTE){U=!1;break}_+=1}while(_<4&&J.type!==l.EOF&&J.type!==l.TAG_CLOSE);j=!U}j&&(E.print_newline(!1),B=!0)}E.print_token(f),B=B||E.previous_token_wrapped(),v.has_wrapped_attrs=B}return R},O.prototype._handle_text=function(E,f,v){var T={text:f.text,type:"TK_CONTENT"};return v.custom_beautifier_name?this._print_custom_beatifier_text(E,f,v):v.is_unformatted||v.is_content_unformatted?E.add_raw_token(f):(E.traverse_whitespace(f),E.print_token(f)),T},O.prototype._print_custom_beatifier_text=function(E,f,v){var T=this;if(f.text!==""){var B=f.text,R,j=1,U="",_="";v.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?R=this._js_beautify:v.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?R=this._css_beautify:v.custom_beautifier_name==="html"&&(R=function(De,je){var Be=new O(De,je,T._js_beautify,T._css_beautify);return Be.beautify()}),this._options.indent_scripts==="keep"?j=0:this._options.indent_scripts==="separate"&&(j=-E.indent_level);var J=E.get_full_indent(j);if(B=B.replace(/\n[ \t]*$/,""),v.custom_beautifier_name!=="html"&&B[0]==="<"&&B.match(/^(<!--|<!\[CDATA\[)/)){var ne=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(B);if(!ne){E.add_raw_token(f);return}U=J+ne[1]+`
|
|
`,B=ne[4],ne[5]&&(_=J+ne[5]),B=B.replace(/\n[ \t]*$/,""),(ne[2]||ne[3].indexOf(`
|
|
`)!==-1)&&(ne=ne[3].match(/[ \t]+$/),ne&&(f.whitespace_before=ne[0]))}if(B)if(R){var he=function(){this.eol=`
|
|
`};he.prototype=this._options.raw_options;var be=new he;B=R(J+B,be)}else{var Ke=f.whitespace_before;Ke&&(B=B.replace(new RegExp(`
|
|
(`+Ke+")?","g"),`
|
|
`)),B=J+B.replace(/\n/g,`
|
|
`+J)}U&&(B?B=U+B+`
|
|
`+_:B=U+_),E.print_newline(!1),B&&(f.text=B,f.whitespace_before="",f.newlines=0,E.add_raw_token(f),E.print_newline(!0))}},O.prototype._handle_tag_open=function(E,f,v,T){var B=this._get_tag_open_token(f);return(v.is_unformatted||v.is_content_unformatted)&&!v.is_empty_element&&f.type===l.TAG_OPEN&&f.text.indexOf("</")===0?(E.add_raw_token(f),B.start_tag_token=this._tag_stack.try_pop(B.tag_name)):(E.traverse_whitespace(f),this._set_tag_position(E,f,B,v,T),B.is_inline_element||E.set_wrap_point(),E.print_token(f)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(B.alignment_size=f.text.length+1),!B.tag_complete&&!B.is_unformatted&&(E.alignment_size=B.alignment_size),B};var w=function(E,f){if(this.parent=E||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="",!f)this.tag_complete=!0;else{var v;this.tag_start_char=f.text[0],this.text=f.text,this.tag_start_char==="<"?(v=f.text.match(/^<([^\s>]*)/),this.tag_check=v?v[1]:""):(v=f.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=v?v[1]:"",(f.text.startsWith("{{#>")||f.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&f.next!==null?this.tag_check=f.next.text.split(" ")[0]:this.tag_check=f.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),f.type===l.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||f.closed&&f.closed.text==="/>";var T=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(T=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(T)))}};O.prototype._get_tag_open_token=function(E){var f=new w(this._tag_stack.get_parser_token(),E);return f.alignment_size=this._options.wrap_attributes_indent_size,f.is_end_tag=f.is_end_tag||C(f.tag_check,this._options.void_elements),f.is_empty_element=f.tag_complete||f.is_start_tag&&f.is_end_tag,f.is_unformatted=!f.tag_complete&&C(f.tag_check,this._options.unformatted),f.is_content_unformatted=!f.is_empty_element&&C(f.tag_check,this._options.content_unformatted),f.is_inline_element=C(f.tag_name,this._options.inline)||f.tag_name.includes("-")||f.tag_start_char==="{",f},O.prototype._set_tag_position=function(E,f,v,T,B){if(v.is_empty_element||(v.is_end_tag?v.start_tag_token=this._tag_stack.try_pop(v.tag_name):(this._do_optional_end_element(v)&&(v.is_inline_element||E.print_newline(!1)),this._tag_stack.record_tag(v),(v.tag_name==="script"||v.tag_name==="style")&&!(v.is_unformatted||v.is_content_unformatted)&&(v.custom_beautifier_name=S(v.tag_check,f)))),C(v.tag_check,this._options.extra_liners)&&(E.print_newline(!1),E._output.just_added_blankline()||E.print_newline(!0)),v.is_empty_element){if(v.tag_start_char==="{"&&v.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),v.indent_content=!0;var R=E.current_line_has_match(/{{#if/);R||E.print_newline(!1)}v.tag_name==="!--"&&B.type===l.TAG_CLOSE&&T.is_end_tag&&v.text.indexOf(`
|
|
`)===-1||(v.is_inline_element||v.is_unformatted||E.print_newline(!1),this._calcluate_parent_multiline(E,v))}else if(v.is_end_tag){var j=!1;j=v.start_tag_token&&v.start_tag_token.multiline_content,j=j||!v.is_inline_element&&!(T.is_inline_element||T.is_unformatted)&&!(B.type===l.TAG_CLOSE&&v.start_tag_token===T)&&B.type!=="TK_CONTENT",(v.is_content_unformatted||v.is_unformatted)&&(j=!1),j&&E.print_newline(!1)}else v.indent_content=!v.custom_beautifier_name,v.tag_start_char==="<"&&(v.tag_name==="html"?v.indent_content=this._options.indent_inner_html:v.tag_name==="head"?v.indent_content=this._options.indent_head_inner_html:v.tag_name==="body"&&(v.indent_content=this._options.indent_body_inner_html)),!(v.is_inline_element||v.is_unformatted)&&(B.type!=="TK_CONTENT"||v.is_content_unformatted)&&E.print_newline(!1),this._calcluate_parent_multiline(E,v)},O.prototype._calcluate_parent_multiline=function(E,f){f.parent&&E._output.just_added_newline()&&!((f.is_inline_element||f.is_unformatted)&&f.parent.is_inline_element)&&(f.parent.multiline_content=!0)};var x=["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"],d=["a","audio","del","ins","map","noscript","video"];O.prototype._do_optional_end_element=function(E){var f=null;if(E.is_empty_element||!E.is_start_tag||!E.parent)return;if(E.tag_name==="body")f=f||this._tag_stack.try_pop("head");else if(E.tag_name==="li")f=f||this._tag_stack.try_pop("li",["ol","ul"]);else if(E.tag_name==="dd"||E.tag_name==="dt")f=f||this._tag_stack.try_pop("dt",["dl"]),f=f||this._tag_stack.try_pop("dd",["dl"]);else if(E.parent.tag_name==="p"&&x.indexOf(E.tag_name)!==-1){var v=E.parent.parent;(!v||d.indexOf(v.tag_name)===-1)&&(f=f||this._tag_stack.try_pop("p"))}else E.tag_name==="rp"||E.tag_name==="rt"?(f=f||this._tag_stack.try_pop("rt",["ruby","rtc"]),f=f||this._tag_stack.try_pop("rp",["ruby","rtc"])):E.tag_name==="optgroup"?f=f||this._tag_stack.try_pop("optgroup",["select"]):E.tag_name==="option"?f=f||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):E.tag_name==="colgroup"?f=f||this._tag_stack.try_pop("caption",["table"]):E.tag_name==="thead"?(f=f||this._tag_stack.try_pop("caption",["table"]),f=f||this._tag_stack.try_pop("colgroup",["table"])):E.tag_name==="tbody"||E.tag_name==="tfoot"?(f=f||this._tag_stack.try_pop("caption",["table"]),f=f||this._tag_stack.try_pop("colgroup",["table"]),f=f||this._tag_stack.try_pop("thead",["table"]),f=f||this._tag_stack.try_pop("tbody",["table"])):E.tag_name==="tr"?(f=f||this._tag_stack.try_pop("caption",["table"]),f=f||this._tag_stack.try_pop("colgroup",["table"]),f=f||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(E.tag_name==="th"||E.tag_name==="td")&&(f=f||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),f=f||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return E.parent=this._tag_stack.get_parser_token(),f},y.exports.Beautifier=O},function(y,m,g){var u=g(6).Options;function c(p){u.call(this,p,"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"])}c.prototype=new u,y.exports.Options=c},function(y,m,g){var u=g(9).Tokenizer,c=g(9).TOKEN,p=g(13).Directives,l=g(14).TemplatablePattern,o=g(12).Pattern,s={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:c.START,RAW:c.RAW,EOF:c.EOF},a=new p(/<\!--/,/-->/),A=function(S,C){u.call(this,S,C),this._current_tag_name="";var L=new l(this._input).read_options(this._options),D=new o(this._input);if(this.__patterns={word:L.until(/[\n\r\t <]/),single_quote:L.until_after(/'/),double_quote:L.until_after(/"/),attribute:L.until(/[\n\r\t =>]|\/>/),element_name:L.until(/[\n\r\t >\/]/),handlebars_comment:D.starting_with(/{{!--/).until_after(/--}}/),handlebars:D.starting_with(/{{/).until_after(/}}/),handlebars_open:D.until(/[\n\r\t }]/),handlebars_raw_close:D.until(/}}/),comment:D.starting_with(/<!--/).until_after(/-->/),cdata:D.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:D.starting_with(/<!\[/).until_after(/]>/),processing:D.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=D.matching(O).until_after(O)}};A.prototype=new u,A.prototype._is_comment=function(S){return!1},A.prototype._is_opening=function(S){return S.type===s.TAG_OPEN},A.prototype._is_closing=function(S,C){return S.type===s.TAG_CLOSE&&C&&((S.text===">"||S.text==="/>")&&C.text[0]==="<"||S.text==="}}"&&C.text[0]==="{"&&C.text[1]==="{")},A.prototype._reset=function(){this._current_tag_name=""},A.prototype._get_next_token=function(S,C){var L=null;this._readWhitespace();var D=this._input.peek();return D===null?this._create_token(s.EOF,""):(L=L||this._read_open_handlebars(D,C),L=L||this._read_attribute(D,S,C),L=L||this._read_close(D,C),L=L||this._read_raw_content(D,S,C),L=L||this._read_content_word(D),L=L||this._read_comment_or_cdata(D),L=L||this._read_processing(D),L=L||this._read_open(D,C),L=L||this._create_token(s.UNKNOWN,this._input.next()),L)},A.prototype._read_comment_or_cdata=function(S){var C=null,L=null,D=null;if(S==="<"){var O=this._input.peek(1);O==="!"&&(L=this.__patterns.comment.read(),L?(D=a.get_directives(L),D&&D.ignore==="start"&&(L+=a.readIgnored(this._input))):L=this.__patterns.cdata.read()),L&&(C=this._create_token(s.COMMENT,L),C.directives=D)}return C},A.prototype._read_processing=function(S){var C=null,L=null,D=null;if(S==="<"){var O=this._input.peek(1);(O==="!"||O==="?")&&(L=this.__patterns.conditional_comment.read(),L=L||this.__patterns.processing.read()),L&&(C=this._create_token(s.COMMENT,L),C.directives=D)}return C},A.prototype._read_open=function(S,C){var L=null,D=null;return C||S==="<"&&(L=this._input.next(),this._input.peek()==="/"&&(L+=this._input.next()),L+=this.__patterns.element_name.read(),D=this._create_token(s.TAG_OPEN,L)),D},A.prototype._read_open_handlebars=function(S,C){var L=null,D=null;return C||this._options.indent_handlebars&&S==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(L=this.__patterns.handlebars_comment.read(),L=L||this.__patterns.handlebars.read(),D=this._create_token(s.COMMENT,L)):(L=this.__patterns.handlebars_open.read(),D=this._create_token(s.TAG_OPEN,L))),D},A.prototype._read_close=function(S,C){var L=null,D=null;return C&&(C.text[0]==="<"&&(S===">"||S==="/"&&this._input.peek(1)===">")?(L=this._input.next(),S==="/"&&(L+=this._input.next()),D=this._create_token(s.TAG_CLOSE,L)):C.text[0]==="{"&&S==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),D=this._create_token(s.TAG_CLOSE,"}}"))),D},A.prototype._read_attribute=function(S,C,L){var D=null,O="";if(L&&L.text[0]==="<")if(S==="=")D=this._create_token(s.EQUALS,this._input.next());else if(S==='"'||S==="'"){var w=this._input.next();S==='"'?w+=this.__patterns.double_quote.read():w+=this.__patterns.single_quote.read(),D=this._create_token(s.VALUE,w)}else O=this.__patterns.attribute.read(),O&&(C.type===s.EQUALS?D=this._create_token(s.VALUE,O):D=this._create_token(s.ATTRIBUTE,O));return D},A.prototype._is_content_unformatted=function(S){return this._options.void_elements.indexOf(S)===-1&&(this._options.content_unformatted.indexOf(S)!==-1||this._options.unformatted.indexOf(S)!==-1)},A.prototype._read_raw_content=function(S,C,L){var D="";if(L&&L.text[0]==="{")D=this.__patterns.handlebars_raw_close.read();else if(C.type===s.TAG_CLOSE&&C.opened.text[0]==="<"&&C.text[0]!=="/"){var O=C.opened.text.substr(1).toLowerCase();if(O==="script"||O==="style"){var w=this._read_comment_or_cdata(S);if(w)return w.type=s.TEXT,w;D=this._input.readUntil(new RegExp("</"+O+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(O)&&(D=this._input.readUntil(new RegExp("</"+O+"[\\n\\r\\t ]*?>","ig")))}return D?this._create_token(s.TEXT,D):null},A.prototype._read_content_word=function(S){var C="";if(this._options.unformatted_content_delimiter&&(S===this._options.unformatted_content_delimiter[0]&&(C=this.__patterns.unformatted_content_delimiter.read())),C||(C=this.__patterns.word.read()),C)return this._create_token(s.TEXT,C)},y.exports.Tokenizer=A,y.exports.TOKEN=s}],W={};function n(y){var m=W[y];if(m!==void 0)return m.exports;var g=W[y]={exports:{}};return K[y](g,g.exports,n),g.exports}var I=n(18);k=I})();var G=k;if(!0)!(ae=[H,H("6UM0"),H("TXwP")],X=function(K){var W=H("6UM0"),n=H("TXwP");return{html_beautify:function(I,y){return G(I,y,W.js_beautify,n.css_beautify)}}}.apply(Ee,ae),X!==void 0&&(tt.exports=X));else var b,N})()},"rAM+":function(tt,Ee,H){"use strict";H.d(Ee,"a",function(){return X});var ae=H("Qw5x");function X(k,G){var b;if(typeof Symbol=="undefined"||k[Symbol.iterator]==null){if(Array.isArray(k)||(b=Object(ae.a)(k))||G&&k&&typeof k.length=="number"){b&&(k=b);var N=0,K=function(){};return{s:K,n:function(){return N>=k.length?{done:!0}:{done:!1,value:k[N++]}},e:function(m){throw m},f:K}}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 W=!0,n=!1,I;return{s:function(){b=k[Symbol.iterator]()},n:function(){var m=b.next();return W=m.done,m},e:function(m){n=!0,I=m},f:function(){try{!W&&b.return!=null&&b.return()}finally{if(n)throw I}}}}},rUJ1:function(tt,Ee){const H=/[&<>"']/,ae=/[&<>"']/g,X=/[<>"']|&(?!#?\w+;)/,k=/[<>"']|&(?!#?\w+;)/g,G={"&":"&","<":"<",">":">",'"':""","'":"'"},b=D=>G[D];function N(D,O){if(O){if(H.test(D))return D.replace(ae,b)}else if(X.test(D))return D.replace(k,b);return D}const K=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function W(D){return D.replace(K,(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 n=/(^|[^\[])\^/g;function I(D,O){D=D.source||D,O=O||"";const w={replace:(x,d)=>(d=d.source||d,d=d.replace(n,"$1"),D=D.replace(x,d),w),getRegex:()=>new RegExp(D,O)};return w}const y=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(D,O,w){if(D){let x;try{x=decodeURIComponent(W(w)).replace(y,"").toLowerCase()}catch(d){return null}if(x.indexOf("javascript:")===0||x.indexOf("vbscript:")===0||x.indexOf("data:")===0)return null}O&&!m.test(w)&&(w=o(O,w));try{w=encodeURI(w).replace(/%25/g,"%")}catch(x){return null}return w}const u={},c=/^[^:]+:\/*[^/]*$/,p=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function o(D,O){u[" "+D]||(c.test(D)?u[" "+D]=D+"/":u[" "+D]=S(D,"/",!0)),D=u[" "+D];const w=D.indexOf(":")===-1;return O.substring(0,2)==="//"?w?O:D.replace(p,"$1")+O:O.charAt(0)==="/"?w?O:D.replace(l,"$1")+O:D+O}const s={exec:function(){}};function a(D){let O=1,w,x;for(;O<arguments.length;O++){w=arguments[O];for(x in w)Object.prototype.hasOwnProperty.call(w,x)&&(D[x]=w[x])}return D}function A(D,O){const w=D.replace(/\|/g,(E,f,v)=>{let T=!1,B=f;for(;--B>=0&&v[B]==="\\";)T=!T;return T?"|":" |"}),x=w.split(/ \|/);let d=0;if(x.length>O)x.splice(O);else for(;x.length<O;)x.push("");for(;d<x.length;d++)x[d]=x[d].trim().replace(/\\\|/g,"|");return x}function S(D,O,w){const x=D.length;if(x===0)return"";let d=0;for(;d<x;){const E=D.charAt(x-d-1);if(E===O&&!w)d++;else if(E!==O&&w)d++;else break}return D.substr(0,x-d)}function C(D,O){if(D.indexOf(O[1])===-1)return-1;const w=D.length;let x=0,d=0;for(;d<w;d++)if(D[d]==="\\")d++;else if(D[d]===O[0])x++;else if(D[d]===O[1]&&(x--,x<0))return d;return-1}function L(D){D&&D.sanitize&&!D.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")}tt.exports={escape:N,unescape:W,edit:I,cleanUrl:g,resolveUrl:o,noopTest:s,merge:a,splitCells:A,rtrim:S,findClosingBracket:C,checkSanitizeDeprecation:L}},siWv:function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___3IH6S",flex_space_between:"flex_space_between___3AU-S",flex_box_vertical_center:"flex_box_vertical_center___1ykIO",flex_box_center_end:"flex_box_center_end___1aIQB",flex_box_column:"flex_box_column___2A_ra",btn:"btn___23gjd","mediacy-round":"mediacy-round___3vc8E","mediacy-default":"mediacy-default___2zIGi",default:"default___20Yio"}},t23M:function(tt,Ee,H){"use strict";var ae=H("VTBJ"),X=H("1OyB"),k=H("vuIU"),G=H("Ji7U"),b=H("LK+K"),N=H("q1tI"),K=H.n(N),W=H("m+aA"),n=H("Zm9Q"),I=H("Kwbf"),y=H("c+Xe"),m=H("bdgK"),g="rc-observer-key",u=function(c){Object(G.a)(l,c);var p=Object(b.a)(l);function l(){var o;return Object(X.a)(this,l),o=p.apply(this,arguments),o.resizeObserver=null,o.childNode=null,o.currentElement=null,o.state={width:0,height:0,offsetHeight:0,offsetWidth:0},o.onResize=function(s){var a=o.props.onResize,A=s[0].target,S=A.getBoundingClientRect(),C=S.width,L=S.height,D=A.offsetWidth,O=A.offsetHeight,w=Math.floor(C),x=Math.floor(L);if(o.state.width!==w||o.state.height!==x||o.state.offsetWidth!==D||o.state.offsetHeight!==O){var d={width:w,height:x,offsetWidth:D,offsetHeight:O};o.setState(d),a&&Promise.resolve().then(function(){a(Object(ae.a)(Object(ae.a)({},d),{},{offsetWidth:D,offsetHeight:O}))})}},o.setChildNode=function(s){o.childNode=s},o}return Object(k.a)(l,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var s=this.props.disabled;if(s){this.destroyObserver();return}var a=Object(W.a)(this.childNode||this),A=a!==this.currentElement;A&&(this.destroyObserver(),this.currentElement=a),!this.resizeObserver&&a&&(this.resizeObserver=new m.default(this.onResize),this.resizeObserver.observe(a))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var s=this.props.children,a=Object(n.a)(s);if(a.length>1)Object(I.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(a.length===0)return Object(I.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var A=a[0];if(N.isValidElement(A)&&Object(y.c)(A)){var S=A.ref;a[0]=N.cloneElement(A,{ref:Object(y.a)(S,this.setChildNode)})}return a.length===1?a[0]:a.map(function(C,L){return!N.isValidElement(C)||"key"in C&&C.key!==null?C:N.cloneElement(C,{key:"".concat(g,"-").concat(L)})})}}]),l}(N.Component);u.displayName="ResizeObserver",Ee.a=u},t9D7:function(tt,Ee,H){"use strict";H.d(Ee,"b",function(){return K}),H.d(Ee,"g",function(){return n}),H.d(Ee,"d",function(){return I}),H.d(Ee,"e",function(){return y}),H.d(Ee,"a",function(){return m}),H.d(Ee,"f",function(){return c}),H.d(Ee,"c",function(){return p});var ae=H("Vhoy"),X=H("MI8n"),k=H("pmY6"),G=H("Cg/j"),b=H("ic2d"),N=H("nEHx");const K=Object(G.c)("themeService");var W;(function(l){function o(s){return s&&typeof s=="object"&&typeof s.id=="string"}l.isThemeColor=o})(W||(W={}));function n(l){return{id:l}}var I;(function(l){function o(L){return L&&typeof L=="object"&&typeof L.id=="string"&&(typeof L.color=="undefined"||W.isThemeColor(L.color))}l.isThemeIcon=o;const s=new RegExp(`^\\$\\((${ae.a.iconNameExpression}(?:${ae.a.iconModifierExpression})?)\\)$`);function a(L){const D=s.exec(L);if(!D)return;let[,O]=D;return{id:O}}l.fromString=a;function A(L,D){let O=L.id;const w=O.lastIndexOf("~");return w!==-1&&(O=O.substring(0,w)),D&&(O=`${O}~${D}`),{id:O}}l.modify=A;function S(L,D){var O,w;return L.id===D.id&&((O=L.color)===null||O===void 0?void 0:O.id)===((w=D.color)===null||w===void 0?void 0:w.id)}l.isEqual=S;function C(L,D){return{id:L.id,color:D?n(D):void 0}}l.asThemeIcon=C,l.asClassNameArray=ae.a.asClassNameArray,l.asClassName=ae.a.asClassName,l.asCSSSelector=ae.a.asCSSSelector})(I||(I={}));function y(l){switch(l){case N.a.DARK:return"vs-dark";case N.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const m={ThemingContribution:"base.contributions.theming"};class g{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new X.b}onColorThemeChange(l){return this.themingParticipants.push(l),this.onThemingParticipantAddedEmitter.fire(l),Object(k.i)(()=>{const o=this.themingParticipants.indexOf(l);this.themingParticipants.splice(o,1)})}getThemingParticipants(){return this.themingParticipants}}let u=new g;b.a.add(m.ThemingContribution,u);function c(l){return u.onColorThemeChange(l)}class p extends k.a{constructor(l){super();this.themeService=l,this.theme=l.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(o=>this.onThemeChange(o)))}onThemeChange(l){this.theme=l,this.updateStyles()}updateStyles(){}}},ulZh:function(tt,Ee,H){typeof window!="undefined"&&function(X,k){tt.exports=k()}(this,function(){return function(ae){var X={};function k(G){if(X[G])return X[G].exports;var b=X[G]={i:G,l:!1,exports:{}};return ae[G].call(b.exports,b,b.exports,k),b.l=!0,b.exports}return k.m=ae,k.c=X,k.d=function(G,b,N){k.o(G,b)||Object.defineProperty(G,b,{enumerable:!0,get:N})},k.r=function(G){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(G,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(G,"__esModule",{value:!0})},k.t=function(G,b){if(b&1&&(G=k(G)),b&8)return G;if(b&4&&typeof G=="object"&&G&&G.__esModule)return G;var N=Object.create(null);if(k.r(N),Object.defineProperty(N,"default",{enumerable:!0,value:G}),b&2&&typeof G!="string")for(var K in G)k.d(N,K,function(W){return G[W]}.bind(null,K));return N},k.n=function(G){var b=G&&G.__esModule?function(){return G.default}:function(){return G};return k.d(b,"a",b),b},k.o=function(G,b){return Object.prototype.hasOwnProperty.call(G,b)},k.p="/dist/",k(k.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ae,X,k){"use strict";var G=Object.prototype.hasOwnProperty,b="~";function N(){}Object.create&&(N.prototype=Object.create(null),new N().__proto__||(b=!1));function K(y,m,g){this.fn=y,this.context=m,this.once=g||!1}function W(y,m,g,u,c){if(typeof g!="function")throw new TypeError("The listener must be a function");var p=new K(g,u||y,c),l=b?b+m:m;return y._events[l]?y._events[l].fn?y._events[l]=[y._events[l],p]:y._events[l].push(p):(y._events[l]=p,y._eventsCount++),y}function n(y,m){--y._eventsCount===0?y._events=new N:delete y._events[m]}function I(){this._events=new N,this._eventsCount=0}I.prototype.eventNames=function(){var m=[],g,u;if(this._eventsCount===0)return m;for(u in g=this._events)G.call(g,u)&&m.push(b?u.slice(1):u);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(g)):m},I.prototype.listeners=function(m){var g=b?b+m:m,u=this._events[g];if(!u)return[];if(u.fn)return[u.fn];for(var c=0,p=u.length,l=new Array(p);c<p;c++)l[c]=u[c].fn;return l},I.prototype.listenerCount=function(m){var g=b?b+m:m,u=this._events[g];return u?u.fn?1:u.length:0},I.prototype.emit=function(m,g,u,c,p,l){var o=b?b+m:m;if(!this._events[o])return!1;var s=this._events[o],a=arguments.length,A,S;if(s.fn){s.once&&this.removeListener(m,s.fn,void 0,!0);switch(a){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,g),!0;case 3:return s.fn.call(s.context,g,u),!0;case 4:return s.fn.call(s.context,g,u,c),!0;case 5:return s.fn.call(s.context,g,u,c,p),!0;case 6:return s.fn.call(s.context,g,u,c,p,l),!0}for(S=1,A=new Array(a-1);S<a;S++)A[S-1]=arguments[S];s.fn.apply(s.context,A)}else{var C=s.length,L;for(S=0;S<C;S++){s[S].once&&this.removeListener(m,s[S].fn,void 0,!0);switch(a){case 1:s[S].fn.call(s[S].context);break;case 2:s[S].fn.call(s[S].context,g);break;case 3:s[S].fn.call(s[S].context,g,u);break;case 4:s[S].fn.call(s[S].context,g,u,c);break;default:if(!A)for(L=1,A=new Array(a-1);L<a;L++)A[L-1]=arguments[L];s[S].fn.apply(s[S].context,A)}}}return!0},I.prototype.on=function(m,g,u){return W(this,m,g,u,!1)},I.prototype.once=function(m,g,u){return W(this,m,g,u,!0)},I.prototype.removeListener=function(m,g,u,c){var p=b?b+m:m;if(!this._events[p])return this;if(!g)return n(this,p),this;var l=this._events[p];if(l.fn)l.fn===g&&(!c||l.once)&&(!u||l.context===u)&&n(this,p);else{for(var o=0,s=[],a=l.length;o<a;o++)(l[o].fn!==g||c&&!l[o].once||u&&l[o].context!==u)&&s.push(l[o]);s.length?this._events[p]=s.length===1?s[0]:s:n(this,p)}return this},I.prototype.removeAllListeners=function(m){var g;return m?(g=b?b+m:m,this._events[g]&&n(this,g)):(this._events=new N,this._eventsCount=0),this},I.prototype.off=I.prototype.removeListener,I.prototype.addListener=I.prototype.on,I.prefixed=b,I.EventEmitter=I,ae.exports=I},"./node_modules/url-toolkit/src/url-toolkit.js":function(ae,X,k){(function(G){var b=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,N=/^([^\/?#]*)([^]*)$/,K=/(?:\/|^)\.(?=\/)/g,W=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,n={buildAbsoluteURL:function(I,y,m){if(m=m||{},I=I.trim(),y=y.trim(),!y){if(!m.alwaysNormalize)return I;var g=n.parseURL(I);if(!g)throw new Error("Error trying to parse base URL.");return g.path=n.normalizePath(g.path),n.buildURLFromParts(g)}var u=n.parseURL(y);if(!u)throw new Error("Error trying to parse relative URL.");if(u.scheme)return m.alwaysNormalize?(u.path=n.normalizePath(u.path),n.buildURLFromParts(u)):y;var c=n.parseURL(I);if(!c)throw new Error("Error trying to parse base URL.");if(!c.netLoc&&c.path&&c.path[0]!=="/"){var p=N.exec(c.path);c.netLoc=p[1],c.path=p[2]}c.netLoc&&!c.path&&(c.path="/");var l={scheme:c.scheme,netLoc:u.netLoc,path:null,params:u.params,query:u.query,fragment:u.fragment};if(!u.netLoc&&(l.netLoc=c.netLoc,u.path[0]!=="/"))if(!u.path)l.path=c.path,u.params||(l.params=c.params,u.query||(l.query=c.query));else{var o=c.path,s=o.substring(0,o.lastIndexOf("/")+1)+u.path;l.path=n.normalizePath(s)}return l.path===null&&(l.path=m.alwaysNormalize?n.normalizePath(u.path):u.path),n.buildURLFromParts(l)},parseURL:function(I){var y=b.exec(I);return y?{scheme:y[1]||"",netLoc:y[2]||"",path:y[3]||"",params:y[4]||"",query:y[5]||"",fragment:y[6]||""}:null},normalizePath:function(I){for(I=I.split("").reverse().join("").replace(K,"");I.length!==(I=I.replace(W,"")).length;);return I.split("").reverse().join("")},buildURLFromParts:function(I){return I.scheme+I.netLoc+I.path+I.params+I.query+I.fragment}};ae.exports=n})(this)},"./node_modules/webworkify-webpack/index.js":function(ae,X,k){function G(m){var g={};function u(p){if(g[p])return g[p].exports;var l=g[p]={i:p,l:!1,exports:{}};return m[p].call(l.exports,l,l.exports,u),l.l=!0,l.exports}u.m=m,u.c=g,u.i=function(p){return p},u.d=function(p,l,o){u.o(p,l)||Object.defineProperty(p,l,{configurable:!1,enumerable:!0,get:o})},u.r=function(p){Object.defineProperty(p,"__esModule",{value:!0})},u.n=function(p){var l=p&&p.__esModule?function(){return p.default}:function(){return p};return u.d(l,"a",l),l},u.o=function(p,l){return Object.prototype.hasOwnProperty.call(p,l)},u.p="/",u.oe=function(p){throw console.error(p),p};var c=u(u.s=ENTRY_MODULE);return c.default||c}var b="[\\.|\\-|\\+|\\w|/|@]+",N="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+b+").*?\\)";function K(m){return(m+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function W(m){return!isNaN(1*m)}function n(m,g,u){var c={};c[u]=[];var p=g.toString(),l=p.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return c;for(var o=l[1],s=new RegExp("(\\\\n|\\W)"+K(o)+N,"g"),a;a=s.exec(p);){if(a[3]==="dll-reference")continue;c[u].push(a[3])}for(s=new RegExp("\\("+K(o)+'\\("(dll-reference\\s('+b+'))"\\)\\)'+N,"g");a=s.exec(p);)m[a[2]]||(c[u].push(a[1]),m[a[2]]=k(a[1]).m),c[a[2]]=c[a[2]]||[],c[a[2]].push(a[4]);for(var A=Object.keys(c),S=0;S<A.length;S++)for(var C=0;C<c[A[S]].length;C++)W(c[A[S]][C])&&(c[A[S]][C]=1*c[A[S]][C]);return c}function I(m){var g=Object.keys(m);return g.reduce(function(u,c){return u||m[c].length>0},!1)}function y(m,g){for(var u={main:[g]},c={main:[]},p={main:{}};I(u);)for(var l=Object.keys(u),o=0;o<l.length;o++){var s=l[o],a=u[s],A=a.pop();if(p[s]=p[s]||{},p[s][A]||!m[s][A])continue;p[s][A]=!0,c[s]=c[s]||[],c[s].push(A);for(var S=n(m,m[s][A],s),C=Object.keys(S),L=0;L<C.length;L++)u[C[L]]=u[C[L]]||[],u[C[L]]=u[C[L]].concat(S[C[L]])}return c}ae.exports=function(m,g){g=g||{};var u={main:k.m},c=g.all?{main:Object.keys(u.main)}:y(u,m),p="";Object.keys(c).filter(function(A){return A!=="main"}).forEach(function(A){for(var S=0;c[A][S];)S++;c[A].push(S),u[A][S]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",p=p+"var "+A+" = ("+G.toString().replace("ENTRY_MODULE",JSON.stringify(S))+")({"+c[A].map(function(C){return""+JSON.stringify(C)+": "+u[A][C].toString()}).join(",")+`});
|
|
`}),p=p+"new (("+G.toString().replace("ENTRY_MODULE",JSON.stringify(m))+")({"+c.main.map(function(A){return""+JSON.stringify(A)+": "+u.main[A].toString()}).join(",")+"}))(self);";var l=new window.Blob([p],{type:"text/javascript"});if(g.bare)return l;var o=window.URL||window.webkitURL||window.mozURL||window.msURL,s=o.createObjectURL(l),a=new window.Worker(s);return a.objectURL=s,a}},"./src/config.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"hlsDefaultConfig",function(){return L}),k.d(X,"mergeConfig",function(){return O}),k.d(X,"enableStreamingMode",function(){return w});var G=k("./src/controller/abr-controller.ts"),b=k("./src/controller/audio-stream-controller.ts"),N=k("./src/controller/audio-track-controller.ts"),K=k("./src/controller/subtitle-stream-controller.ts"),W=k("./src/controller/subtitle-track-controller.ts"),n=k("./src/controller/buffer-controller.ts"),I=k("./src/controller/timeline-controller.ts"),y=k("./src/controller/cap-level-controller.ts"),m=k("./src/controller/fps-controller.ts"),g=k("./src/controller/eme-controller.ts"),u=k("./src/controller/cmcd-controller.ts"),c=k("./src/utils/xhr-loader.ts"),p=k("./src/utils/fetch-loader.ts"),l=k("./src/utils/cues.ts"),o=k("./src/utils/mediakeys-helper.ts"),s=k("./src/utils/logger.ts");function a(){return a=Object.assign||function(x){for(var d=1;d<arguments.length;d++){var E=arguments[d];for(var f in E)Object.prototype.hasOwnProperty.call(E,f)&&(x[f]=E[f])}return x},a.apply(this,arguments)}function A(x,d){var E=Object.keys(x);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(x);d&&(f=f.filter(function(v){return Object.getOwnPropertyDescriptor(x,v).enumerable})),E.push.apply(E,f)}return E}function S(x){for(var d=1;d<arguments.length;d++){var E=arguments[d]!=null?arguments[d]:{};d%2?A(Object(E),!0).forEach(function(f){C(x,f,E[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(E)):A(Object(E)).forEach(function(f){Object.defineProperty(x,f,Object.getOwnPropertyDescriptor(E,f))})}return x}function C(x,d,E){return d in x?Object.defineProperty(x,d,{value:E,enumerable:!0,configurable:!0,writable:!0}):x[d]=E,x}var L=S(S({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!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:c.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:G.default,bufferController:n.default,capLevelController:y.default,fpsController:m.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:o.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},D()),{},{subtitleStreamController:K.SubtitleStreamController,subtitleTrackController:W.default,timelineController:I.TimelineController,audioStreamController:b.default,audioTrackController:N.default,emeController:g.default,cmcdController:u.default});function D(){return{cueHandler:l.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function O(x,d){if((d.liveSyncDurationCount||d.liveMaxLatencyDurationCount)&&(d.liveSyncDuration||d.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(d.liveMaxLatencyDurationCount!==void 0&&(d.liveSyncDurationCount===void 0||d.liveMaxLatencyDurationCount<=d.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(d.liveMaxLatencyDuration!==void 0&&(d.liveSyncDuration===void 0||d.liveMaxLatencyDuration<=d.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return a({},x,d)}function w(x){var d=x.loader;if(d!==p.default&&d!==c.default)s.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),x.progressive=!1;else{var E=Object(p.fetchSupported)();E&&(x.loader=p.default,x.progressive=!0,x.enableSoftwareAES=!0,s.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/polyfills/number.ts"),b=k("./src/utils/ewma-bandwidth-estimator.ts"),N=k("./src/events.ts"),K=k("./src/utils/buffer-helper.ts"),W=k("./src/errors.ts"),n=k("./src/types/loader.ts"),I=k("./src/utils/logger.ts");function y(u,c){for(var p=0;p<c.length;p++){var l=c[p];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(u,l.key,l)}}function m(u,c,p){return c&&y(u.prototype,c),p&&y(u,p),u}var g=function(){function u(p){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=p;var l=p.config;this.bwEstimator=new b.default(l.abrEwmaSlowVoD,l.abrEwmaFastVoD,l.abrEwmaDefaultEstimate),this.registerListeners()}var c=u.prototype;return c.registerListeners=function(){var l=this.hls;l.on(N.Events.FRAG_LOADING,this.onFragLoading,this),l.on(N.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(N.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.on(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(N.Events.ERROR,this.onError,this)},c.unregisterListeners=function(){var l=this.hls;l.off(N.Events.FRAG_LOADING,this.onFragLoading,this),l.off(N.Events.FRAG_LOADED,this.onFragLoaded,this),l.off(N.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.off(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(N.Events.ERROR,this.onError,this)},c.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},c.onFragLoading=function(l,o){var s=o.frag;if(s.type===n.PlaylistLevelType.MAIN&&!this.timer){var a;this.fragCurrent=s,this.partCurrent=(a=o.part)!=null?a:null,this.timer=self.setInterval(this.onCheck,100)}},c.onLevelLoaded=function(l,o){var s=this.hls.config;o.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)},c._abandonRulesCheck=function(){var l=this.fragCurrent,o=this.partCurrent,s=this.hls,a=s.autoLevelEnabled,A=s.config,S=s.media;if(!l||!S)return;var C=o?o.stats:l.stats,L=o?o.duration:l.duration;if(C.aborted){I.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!a||S.paused||!S.playbackRate||!S.readyState)return;var D=performance.now()-C.loading.start,O=Math.abs(S.playbackRate);if(D<=500*L/O)return;var w=s.levels,x=s.minAutoLevel,d=w[l.level],E=C.total||Math.max(C.loaded,Math.round(L*d.maxBitrate/8)),f=Math.max(1,C.bwEstimate?C.bwEstimate/8:C.loaded*1e3/D),v=(E-C.loaded)/f,T=S.currentTime,B=(K.BufferHelper.bufferInfo(S,T,A.maxBufferHole).end-T)/O;if(B>=2*L/O||v<=B)return;var R=Number.POSITIVE_INFINITY,j;for(j=l.level-1;j>x;j--){var U=w[j].maxBitrate;if(R=L*U/(8*.8*f),R<B)break}if(R>=v)return;var _=this.bwEstimator.getEstimate();I.logger.warn("Fragment "+l.sn+(o?" part "+o.index:"")+" of level "+l.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+j+`
|
|
Current BW estimate: `+(Object(G.isFiniteNumber)(_)?(_/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+v.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+R.toFixed(3)+` s
|
|
Time to underbuffer: `+B.toFixed(3)+" s"),s.nextLoadLevel=j,this.bwEstimator.sample(D,C.loaded),this.clearTimer(),l.loader&&(this.fragCurrent=this.partCurrent=null,l.loader.abort()),s.trigger(N.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:l,part:o,stats:C})},c.onFragLoaded=function(l,o){var s=o.frag,a=o.part;if(s.type===n.PlaylistLevelType.MAIN&&Object(G.isFiniteNumber)(s.sn)){var A=a?a.stats:s.stats,S=a?a.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var C=this.hls.levels[s.level],L=(C.loaded?C.loaded.bytes:0)+A.loaded,D=(C.loaded?C.loaded.duration:0)+S;C.loaded={bytes:L,duration:D},C.realBitrate=Math.round(8*L/D)}if(s.bitrateTest){var O={stats:A,frag:s,part:a,id:s.type};this.onFragBuffered(N.Events.FRAG_BUFFERED,O),s.bitrateTest=!1}}},c.onFragBuffered=function(l,o){var s=o.frag,a=o.part,A=a?a.stats:s.stats;if(A.aborted)return;if(s.type!==n.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var S=A.parsing.end-A.loading.start;this.bwEstimator.sample(S,A.loaded),A.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=S/1e3:this.bitrateTestDelay=0},c.onError=function(l,o){switch(o.details){case W.ErrorDetails.FRAG_LOAD_ERROR:case W.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},c.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},c.getNextABRAutoLevel=function(){var l=this.fragCurrent,o=this.partCurrent,s=this.hls,a=s.maxAutoLevel,A=s.config,S=s.minAutoLevel,C=s.media,L=o?o.duration:l?l.duration:0,D=C?C.currentTime:0,O=C&&C.playbackRate!==0?Math.abs(C.playbackRate):1,w=this.bwEstimator?this.bwEstimator.getEstimate():A.abrEwmaDefaultEstimate,x=(K.BufferHelper.bufferInfo(C,D,A.maxBufferHole).end-D)/O,d=this.findBestLevel(w,S,a,x,A.abrBandWidthFactor,A.abrBandWidthUpFactor);if(d>=0)return d;I.logger.trace((x?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var E=L?Math.min(L,A.maxStarvationDelay):A.maxStarvationDelay,f=A.abrBandWidthFactor,v=A.abrBandWidthUpFactor;if(!x){var T=this.bitrateTestDelay;if(T){var B=L?Math.min(L,A.maxLoadingDelay):A.maxLoadingDelay;E=B-T,I.logger.trace("bitrate test took "+Math.round(1e3*T)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*E)+" ms"),f=v=1}}return d=this.findBestLevel(w,S,a,x+E,f,v),Math.max(d,0)},c.findBestLevel=function(l,o,s,a,A,S){for(var C,L=this.fragCurrent,D=this.partCurrent,O=this.lastLoadedFragLevel,w=this.hls.levels,x=w[O],d=!!(x!=null&&(C=x.details)!==null&&C!==void 0&&C.live),E=x==null?void 0:x.codecSet,f=D?D.duration:L?L.duration:0,v=s;v>=o;v--){var T=w[v];if(!T||E&&T.codecSet!==E)continue;var B=T.details,R=(D?B==null?void 0:B.partTarget:B==null?void 0:B.averagetargetduration)||f,j=void 0;v<=O?j=A*l:j=S*l;var U=w[v].maxBitrate,_=U*R/j;if(I.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+v+"/"+Math.round(j)+"/"+U+"/"+R+"/"+a+"/"+_),j>U&&(!_||d&&!this.bitrateTestDelay||_<a))return v}return-1},m(u,[{key:"nextAutoLevel",get:function(){var l=this._nextAutoLevel,o=this.bwEstimator;if(l!==-1&&(!o||!o.canEstimate()))return l;var s=this.getNextABRAutoLevel();return l!==-1&&(s=Math.min(l,s)),s},set:function(l){this._nextAutoLevel=l}}]),u}();X.default=g},"./src/controller/audio-stream-controller.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/polyfills/number.ts"),b=k("./src/controller/base-stream-controller.ts"),N=k("./src/events.ts"),K=k("./src/utils/buffer-helper.ts"),W=k("./src/controller/fragment-tracker.ts"),n=k("./src/types/level.ts"),I=k("./src/types/loader.ts"),y=k("./src/loader/fragment.ts"),m=k("./src/demux/chunk-cache.ts"),g=k("./src/demux/transmuxer-interface.ts"),u=k("./src/types/transmuxer.ts"),c=k("./src/controller/fragment-finders.ts"),p=k("./src/utils/discontinuities.ts"),l=k("./src/errors.ts"),o=k("./src/utils/logger.ts");function s(){return s=Object.assign||function(L){for(var D=1;D<arguments.length;D++){var O=arguments[D];for(var w in O)Object.prototype.hasOwnProperty.call(O,w)&&(L[w]=O[w])}return L},s.apply(this,arguments)}function a(L,D){L.prototype=Object.create(D.prototype),L.prototype.constructor=L,A(L,D)}function A(L,D){return A=Object.setPrototypeOf||function(w,x){return w.__proto__=x,w},A(L,D)}var S=100,C=function(L){a(D,L);function D(w,x){var d;return d=L.call(this,w,x,"[audio-stream-controller]")||this,d.videoBuffer=null,d.videoTrackCC=-1,d.waitingVideoCC=-1,d.audioSwitch=!1,d.trackId=-1,d.waitingData=null,d.mainDetails=null,d.bufferFlushed=!1,d._registerListeners(),d}var O=D.prototype;return O.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},O._registerListeners=function(){var x=this.hls;x.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(N.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),x.on(N.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(N.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),x.on(N.Events.ERROR,this.onError,this),x.on(N.Events.BUFFER_RESET,this.onBufferReset,this),x.on(N.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(N.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(N.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),x.on(N.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var x=this.hls;x.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(N.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),x.off(N.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(N.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),x.off(N.Events.ERROR,this.onError,this),x.off(N.Events.BUFFER_RESET,this.onBufferReset,this),x.off(N.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(N.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(N.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),x.off(N.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onInitPtsFound=function(x,d){var E=d.frag,f=d.id,v=d.initPTS;if(f==="main"){var T=E.cc;this.initPTS[E.cc]=v,this.log("InitPTS for cc: "+T+" found from main: "+v),this.videoTrackCC=T,this.state===b.State.WAITING_INIT_PTS&&this.tick()}},O.startLoad=function(x){if(!this.levels){this.startPosition=x,this.state=b.State.STOPPED;return}var d=this.lastCurrentTime;this.stopLoad(),this.setInterval(S),this.fragLoadError=0,d>0&&x===-1?(this.log("Override startPosition with lastCurrentTime @"+d.toFixed(3)),this.state=b.State.IDLE):(this.loadedmetadata=!1,this.state=b.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()},O.doTick=function(){switch(this.state){case b.State.IDLE:this.doTickIdle();break;case b.State.WAITING_TRACK:{var x,d=this.levels,E=this.trackId,f=d==null||((x=d[E])===null||x===void 0)?void 0:x.details;if(f){if(this.waitForCdnTuneIn(f))break;this.state=b.State.WAITING_INIT_PTS}break}case b.State.FRAG_LOADING_WAITING_RETRY:{var v,T=performance.now(),B=this.retryDate;(!B||T>=B||(v=this.media)!==null&&v!==void 0&&v.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=b.State.IDLE);break}case b.State.WAITING_INIT_PTS:{var R=this.waitingData;if(R){var j=R.frag,U=R.part,_=R.cache,J=R.complete;if(this.initPTS[j.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=b.State.FRAG_LOADING;var ne=_.flush(),he={frag:j,part:U,payload:ne,networkDetails:null};this._handleFragmentLoadProgress(he),J&&L.prototype._handleFragmentLoadComplete.call(this,he)}else if(this.videoTrackCC!==this.waitingVideoCC)o.logger.log("Waiting fragment cc ("+j.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var be=this.getLoadPosition(),Ke=K.BufferHelper.bufferInfo(this.mediaBuffer,be,this.config.maxBufferHole),De=Object(c.fragmentWithinToleranceTest)(Ke.end,this.config.maxFragLookUpTolerance,j);De<0&&(o.logger.log("Waiting fragment cc ("+j.cc+") @ "+j.start+" cancelled because another fragment at "+Ke.end+" is needed"),this.clearWaitingFragment())}}else this.state=b.State.IDLE}}this.onTickEnd()},O.clearWaitingFragment=function(){var x=this.waitingData;x&&(this.fragmentTracker.removeFragment(x.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=b.State.IDLE)},O.onTickEnd=function(){var x=this.media;if(!x||!x.readyState)return;var d=this.mediaBuffer?this.mediaBuffer:x,E=d.buffered;!this.loadedmetadata&&E.length&&(this.loadedmetadata=!0),this.lastCurrentTime=x.currentTime},O.doTickIdle=function(){var x,d,E=this.hls,f=this.levels,v=this.media,T=this.trackId,B=E.config;if(!f||!f[T])return;if(!v&&(this.startFragRequested||!B.startFragPrefetch))return;var R=f[T],j=R.details;if(!j||j.live&&this.levelLastLoaded!==T||this.waitForCdnTuneIn(j)){this.state=b.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,y.ElementaryStreamTypes.AUDIO,I.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,I.PlaylistLevelType.AUDIO);if(U===null)return;var _=U.len,J=this.getMaxBufferLength(),ne=this.audioSwitch;if(_>=J&&!ne)return;if(!ne&&this._streamEnded(U,j)){E.trigger(N.Events.BUFFER_EOS,{type:"audio"}),this.state=b.State.ENDED;return}var he=j.fragments,be=he[0].start,Ke=U.end;if(ne){var De=this.getLoadPosition();Ke=De,j.PTSKnown&&De<be&&((U.end>be||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),v.currentTime=be+.05))}var je=this.getNextFragment(Ke,j);if(!je){this.bufferFlushed=!0;return}((x=je.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((d=je.decryptdata)!==null&&d!==void 0&&d.key)?this.loadKey(je,j):this.loadFragment(je,j,Ke)},O.getMaxBufferLength=function(){var x=L.prototype.getMaxBufferLength.call(this),d=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,I.PlaylistLevelType.MAIN);return d===null?x:Math.max(x,d.len)},O.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},O.onAudioTracksUpdated=function(x,d){var E=d.audioTracks;this.resetTransmuxer(),this.levels=E.map(function(f){return new n.Level(f)})},O.onAudioTrackSwitching=function(x,d){var E=!!d.url;this.trackId=d.id;var f=this.fragCurrent;f!=null&&f.loader&&f.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),E?this.setInterval(S):this.resetTransmuxer(),E?(this.audioSwitch=!0,this.state=b.State.IDLE):this.state=b.State.STOPPED,this.tick()},O.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},O.onLevelLoaded=function(x,d){this.mainDetails=d.details},O.onAudioTrackLoaded=function(x,d){var E,f=this.levels,v=d.details,T=d.id;if(!f){this.warn("Audio tracks were reset while loading level "+T);return}this.log("Track "+T+" loaded ["+v.startSN+","+v.endSN+"],duration:"+v.totalduration);var B=f[T],R=0;if(v.live||(E=B.details)!==null&&E!==void 0&&E.live){var j=this.mainDetails;if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed||!j)return;!B.details&&v.hasProgramDateTime&&j.hasProgramDateTime?(Object(p.alignMediaPlaylistByPDT)(v,j),R=v.fragments[0].start):R=this.alignPlaylists(v,B.details)}B.details=v,this.levelLastLoaded=T,!this.startFragRequested&&(this.mainDetails||!v.live)&&this.setStartPosition(B.details,R),this.state===b.State.WAITING_TRACK&&!this.waitForCdnTuneIn(v)&&(this.state=b.State.IDLE),this.tick()},O._handleFragmentLoadProgress=function(x){var d,E=x.frag,f=x.part,v=x.payload,T=this.config,B=this.trackId,R=this.levels;if(!R){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+E.sn+" of level "+E.level+" will not be buffered");return}var j=R[B];console.assert(j,"Audio track is defined on fragment load progress");var U=j.details;console.assert(U,"Audio track details are defined on fragment load progress");var _=T.defaultAudioCodec||j.audioCodec||"mp4a.40.2",J=this.transmuxer;J||(J=this.transmuxer=new g.default(this.hls,I.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ne=this.initPTS[E.cc],he=(d=E.initSegment)===null||d===void 0?void 0:d.data;if(ne!==void 0){var be=!1,Ke=f?f.index:-1,De=Ke!==-1,je=new u.ChunkMetadata(E.level,E.sn,E.stats.chunkCount,v.byteLength,Ke,De);J.push(v,he,_,"",E,f,U.totalduration,be,je,ne)}else{o.logger.log("Unknown video PTS for cc "+E.cc+", waiting for video PTS before demuxing audio frag "+E.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+B);var Be=this.waitingData=this.waitingData||{frag:E,part:f,cache:new m.default,complete:!1},Ge=Be.cache;Ge.push(new Uint8Array(v)),this.waitingVideoCC=this.videoTrackCC,this.state=b.State.WAITING_INIT_PTS}},O._handleFragmentLoadComplete=function(x){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,x)},O.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},O.onBufferCreated=function(x,d){var E=d.tracks.audio;E&&(this.mediaBuffer=E.buffer),d.tracks.video&&(this.videoBuffer=d.tracks.video.buffer)},O.onFragBuffered=function(x,d){var E=d.frag,f=d.part;if(E.type!==I.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(E)){this.warn("Fragment "+E.sn+(f?" p: "+f.index:"")+" of level "+E.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}E.sn!=="initSegment"&&(this.fragPrevious=E,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(N.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(E,f)},O.onError=function(x,d){switch(d.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.onFragmentOrKeyLoadError(I.PlaylistLevelType.AUDIO,d);break;case l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case l.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==b.State.ERROR&&this.state!==b.State.STOPPED&&(this.state=d.fatal?b.State.ERROR:b.State.IDLE,this.warn(d.details+" while loading frag, switching to "+this.state+" state"));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(d.parent==="audio"&&(this.state===b.State.PARSING||this.state===b.State.PARSED)){var E=!0,f=this.getFwdBufferInfo(this.mediaBuffer,I.PlaylistLevelType.AUDIO);f&&f.len>.5&&(E=!this.reduceMaxBufferLength(f.len)),E&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},O.onBufferFlushed=function(x,d){var E=d.type;E===y.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},O._handleTransmuxComplete=function(x){var d,E="audio",f=this.hls,v=x.remuxResult,T=x.chunkMeta,B=this.getCurrentContext(T);if(!B){this.warn("The loading context changed while buffering fragment "+T.sn+" of level "+T.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(T.level);return}var R=B.frag,j=B.part,U=v.audio,_=v.text,J=v.id3,ne=v.initSegment;if(this.fragContextChanged(R))return;if(this.state=b.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ne!=null&&ne.tracks&&(this._bufferInitSegment(ne.tracks,R,T),f.trigger(N.Events.FRAG_PARSING_INIT_SEGMENT,{frag:R,id:E,tracks:ne.tracks})),U){var he=U.startPTS,be=U.endPTS,Ke=U.startDTS,De=U.endDTS;j&&(j.elementaryStreams[y.ElementaryStreamTypes.AUDIO]={startPTS:he,endPTS:be,startDTS:Ke,endDTS:De}),R.setElementaryStreamInfo(y.ElementaryStreamTypes.AUDIO,he,be,Ke,De),this.bufferFragmentData(U,R,j,T)}if(J!=null&&(d=J.samples)!==null&&d!==void 0&&d.length){var je=s({frag:R,id:E},J);f.trigger(N.Events.FRAG_PARSING_METADATA,je)}if(_){var Be=s({frag:R,id:E},_);f.trigger(N.Events.FRAG_PARSING_USERDATA,Be)}},O._bufferInitSegment=function(x,d,E){if(this.state!==b.State.PARSING)return;x.video&&delete x.video;var f=x.audio;if(!f)return;f.levelCodec=f.codec,f.id="audio",this.log("Init audio buffer, container:"+f.container+", codecs[parsed]=["+f.codec+"]"),this.hls.trigger(N.Events.BUFFER_CODECS,x);var v=f.initSegment;if(v!=null&&v.byteLength){var T={type:"audio",frag:d,part:null,chunkMeta:E,parent:d.type,data:v};this.hls.trigger(N.Events.BUFFER_APPENDING,T)}this.tick()},O.loadFragment=function(x,d,E){var f=this.fragmentTracker.getState(x);this.fragCurrent=x,(this.audioSwitch||f===W.FragmentState.NOT_LOADED||f===W.FragmentState.PARTIAL)&&(x.sn==="initSegment"?this._loadInitSegment(x):d.live&&!Object(G.isFiniteNumber)(this.initPTS[x.cc])?(this.log("Waiting for video PTS in continuity counter "+x.cc+" of live stream before loading audio fragment "+x.sn+" of level "+this.trackId),this.state=b.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,x,d,E)))},O.completeAudioSwitch=function(){var x=this.hls,d=this.media,E=this.trackId;d&&(this.log("Switching audio track : flushing all audio"),L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,x.trigger(N.Events.AUDIO_TRACK_SWITCHED,{id:E})},D}(b.default);X.default=C},"./src/controller/audio-track-controller.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/events.ts"),b=k("./src/errors.ts"),N=k("./src/controller/base-playlist-controller.ts"),K=k("./src/types/loader.ts");function W(g,u){for(var c=0;c<u.length;c++){var p=u[c];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}function n(g,u,c){return u&&W(g.prototype,u),c&&W(g,c),g}function I(g,u){g.prototype=Object.create(u.prototype),g.prototype.constructor=g,y(g,u)}function y(g,u){return y=Object.setPrototypeOf||function(p,l){return p.__proto__=l,p},y(g,u)}var m=function(g){I(u,g);function u(p){var l;return l=g.call(this,p,"[audio-track-controller]")||this,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.trackName="",l.selectDefaultTrack=!0,l.registerListeners(),l}var c=u.prototype;return c.registerListeners=function(){var l=this.hls;l.on(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(G.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(G.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(G.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(G.Events.ERROR,this.onError,this)},c.unregisterListeners=function(){var l=this.hls;l.off(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(G.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(G.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(G.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(G.Events.ERROR,this.onError,this)},c.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,g.prototype.destroy.call(this)},c.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},c.onManifestParsed=function(l,o){this.tracks=o.audioTracks||[]},c.onAudioTrackLoaded=function(l,o){var s=o.id,a=o.details,A=this.tracksInGroup[s];if(!A){this.warn("Invalid audio track id "+s);return}var S=A.details;A.details=o.details,this.log("audioTrack "+s+" loaded ["+a.startSN+"-"+a.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,o,S))},c.onLevelLoading=function(l,o){this.switchLevel(o.level)},c.onLevelSwitching=function(l,o){this.switchLevel(o.level)},c.switchLevel=function(l){var o=this.hls.levels[l];if(!(o!=null&&o.audioGroupIds))return;var s=o.audioGroupIds[o.urlId];if(this.groupId!==s){this.groupId=s;var a=this.tracks.filter(function(S){return!s||S.groupId===s});this.selectDefaultTrack&&!a.some(function(S){return S.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=a;var A={audioTracks:a};this.log("Updating audio tracks, "+a.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(G.Events.AUDIO_TRACKS_UPDATED,A),this.selectInitialTrack()}},c.onError=function(l,o){if(g.prototype.onError.call(this,l,o),o.fatal||!o.context)return;o.context.type===K.PlaylistContextType.AUDIO_TRACK&&o.context.id===this.trackId&&o.context.groupId===this.groupId&&this.retryLoadingOrFail(o)},c.setAudioTrack=function(l){var o=this.tracksInGroup;if(l<0||l>=o.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=o[this.trackId];this.log("Now switching to audio-track index "+l);var a=o[l],A=a.id,S=a.groupId,C=S===void 0?"":S,L=a.name,D=a.type,O=a.url;if(this.trackId=l,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(G.Events.AUDIO_TRACK_SWITCHING,{id:A,groupId:C,name:L,type:D,url:O}),a.details&&!a.details.live)return;var w=this.switchParams(a.url,s==null?void 0:s.details);this.loadPlaylist(w)},c.selectInitialTrack=function(){var l=this.tracksInGroup;console.assert(l.length,"Initial audio track should be selected when tracks are known");var o=this.trackName,s=this.findTrackId(o)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},c.findTrackId=function(l){for(var o=this.tracksInGroup,s=0;s<o.length;s++){var a=o[s];if((!this.selectDefaultTrack||a.default)&&(!l||l===a.name))return a.id}return-1},c.loadPlaylist=function(l){var o=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(o)){var s=o.id,a=o.groupId,A=o.url;if(l)try{A=l.addDirectives(A)}catch(S){this.warn("Could not construct new URL with HLS Delivery Directives: "+S)}this.log("loading audio-track playlist for id: "+s),this.clearTimer(),this.hls.trigger(G.Events.AUDIO_TRACK_LOADING,{url:A,id:s,groupId:a,deliveryDirectives:l||null})}},n(u,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1,this.setAudioTrack(l)}}]),u}(N.default);X.default=m},"./src/controller/base-playlist-controller.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return n});var G=k("./src/polyfills/number.ts"),b=k("./src/types/level.ts"),N=k("./src/controller/level-helper.ts"),K=k("./src/utils/logger.ts"),W=k("./src/errors.ts"),n=function(){function I(m,g){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=K.logger.log.bind(K.logger,g+":"),this.warn=K.logger.warn.bind(K.logger,g+":"),this.hls=m}var y=I.prototype;return y.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},y.onError=function(g,u){u.fatal&&u.type===W.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},y.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},y.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},y.stopLoad=function(){this.canLoad=!1,this.clearTimer()},y.switchParams=function(g,u){var c=u==null?void 0:u.renditionReports;if(c)for(var p=0;p<c.length;p++){var l=c[p],o=""+l.URI;if(o===g.substr(-o.length)){var s=parseInt(l["LAST-MSN"]),a=parseInt(l["LAST-PART"]);if(u&&this.hls.config.lowLatencyMode){var A=Math.min(u.age-u.partTarget,u.targetduration);a!==void 0&&A>u.partTarget&&(a+=1)}if(Object(G.isFiniteNumber)(s))return new b.HlsUrlParameters(s,Object(G.isFiniteNumber)(a)?a:void 0,b.HlsSkip.No)}}},y.loadPlaylist=function(g){},y.shouldLoadTrack=function(g){return this.canLoad&&g&&!!g.url&&(!g.details||g.details.live)},y.playlistLoaded=function(g,u,c){var p=this,l=u.details,o=u.stats,s=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(l.advancedDateTime=Date.now()-s,l.live||c!=null&&c.live){if(l.reloaded(c),c&&this.log("live playlist "+g+" "+(l.advanced?"REFRESHED "+l.lastPartSn+"-"+l.lastPartIndex:"MISSED")),c&&l.fragments.length>0&&Object(N.mergeDetails)(c,l),!this.canLoad||!l.live)return;var a,A=void 0,S=void 0;if(l.canBlockReload&&l.endSN&&l.advanced){var C=this.hls.config.lowLatencyMode,L=l.lastPartSn,D=l.endSN,O=l.lastPartIndex,w=O!==-1,x=L===D,d=C?0:O;w?(A=x?D+1:L,S=x?d:O+1):A=D+1;var E=l.age,f=E+l.ageHeader,v=Math.min(f-l.partTarget,l.targetduration*1.5);if(v>0){if(c&&v>c.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+c.tuneInGoal+" to: "+v+" with playlist age: "+l.age),v=0;else{var T=Math.floor(v/l.targetduration);if(A+=T,S!==void 0){var B=Math.round(v%l.targetduration/l.partTarget);S+=B}this.log("CDN Tune-in age: "+l.ageHeader+"s last advanced "+E.toFixed(2)+"s goal: "+v+" skip sn "+T+" to part "+S)}l.tuneInGoal=v}if(a=this.getDeliveryDirectives(l,u.deliveryDirectives,A,S),C||!x){this.loadPlaylist(a);return}}else a=this.getDeliveryDirectives(l,u.deliveryDirectives,A,S);var R=Object(N.computeReloadInterval)(l,o);A!==void 0&&l.canBlockReload&&(R-=l.partTarget||1),this.log("reload live playlist "+g+" in "+Math.round(R)+" ms"),this.timer=self.setTimeout(function(){return p.loadPlaylist(a)},R)}else this.clearTimer()},y.getDeliveryDirectives=function(g,u,c,p){var l=Object(b.getSkipValue)(g,c);return u!=null&&u.skip&&g.deltaUpdateFailed&&(c=u.msn,p=u.part,l=b.HlsSkip.No),new b.HlsUrlParameters(c,p,l)},y.retryLoadingOrFail=function(g){var u=this,c=this.hls.config,p=this.retryCount<c.levelLoadingMaxRetry;if(p){var l;if(this.retryCount++,g.details.indexOf("LoadTimeOut")>-1&&(l=g.context)!==null&&l!==void 0&&l.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+g.details+'"'),this.loadPlaylist();else{var o=Math.min(Math.pow(2,this.retryCount)*c.levelLoadingRetryDelay,c.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return u.loadPlaylist()},o),this.warn("retry playlist loading #"+this.retryCount+" in "+o+' ms after "'+g.details+'"')}}else this.warn('cannot recover from error "'+g.details+'"'),this.clearTimer(),g.fatal=!0;return p},I}()},"./src/controller/base-stream-controller.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"State",function(){return D}),k.d(X,"default",function(){return O});var G=k("./src/polyfills/number.ts"),b=k("./src/task-loop.ts"),N=k("./src/controller/fragment-tracker.ts"),K=k("./src/utils/buffer-helper.ts"),W=k("./src/utils/logger.ts"),n=k("./src/events.ts"),I=k("./src/errors.ts"),y=k("./src/types/transmuxer.ts"),m=k("./src/utils/mp4-tools.ts"),g=k("./src/utils/discontinuities.ts"),u=k("./src/controller/fragment-finders.ts"),c=k("./src/controller/level-helper.ts"),p=k("./src/loader/fragment-loader.ts"),l=k("./src/crypt/decrypter.ts"),o=k("./src/utils/time-ranges.ts"),s=k("./src/types/loader.ts");function a(w,x){for(var d=0;d<x.length;d++){var E=x[d];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}function A(w,x,d){return x&&a(w.prototype,x),d&&a(w,d),w}function S(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function C(w,x){w.prototype=Object.create(x.prototype),w.prototype.constructor=w,L(w,x)}function L(w,x){return L=Object.setPrototypeOf||function(E,f){return E.__proto__=f,E},L(w,x)}var D={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},O=function(w){C(x,w);function x(E,f,v){var T;return T=w.call(this)||this,T.hls=void 0,T.fragPrevious=null,T.fragCurrent=null,T.fragmentTracker=void 0,T.transmuxer=null,T._state=D.STOPPED,T.media=void 0,T.mediaBuffer=void 0,T.config=void 0,T.bitrateTest=!1,T.lastCurrentTime=0,T.nextLoadPosition=0,T.startPosition=0,T.loadedmetadata=!1,T.fragLoadError=0,T.retryDate=0,T.levels=null,T.fragmentLoader=void 0,T.levelLastLoaded=null,T.startFragRequested=!1,T.decrypter=void 0,T.initPTS=[],T.onvseeking=null,T.onvended=null,T.logPrefix="",T.log=void 0,T.warn=void 0,T.logPrefix=v,T.log=W.logger.log.bind(W.logger,v+":"),T.warn=W.logger.warn.bind(W.logger,v+":"),T.hls=E,T.fragmentLoader=new p.default(E.config),T.fragmentTracker=f,T.config=E.config,T.decrypter=new l.default(E,E.config),E.on(n.Events.KEY_LOADED,T.onKeyLoaded,S(T)),T}var d=x.prototype;return d.doTick=function(){this.onTickEnd()},d.onTickEnd=function(){},d.startLoad=function(f){},d.stopLoad=function(){this.fragmentLoader.abort();var f=this.fragCurrent;f&&this.fragmentTracker.removeFragment(f),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=D.STOPPED},d._streamEnded=function(f,v){var T=this.fragCurrent,B=this.fragmentTracker;if(!v.live&&T&&T.sn===v.endSN&&!f.nextStart){var R=B.getState(T);return R===N.FragmentState.PARTIAL||R===N.FragmentState.OK}return!1},d.onMediaAttached=function(f,v){var T=this.media=this.mediaBuffer=v.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),T.addEventListener("seeking",this.onvseeking),T.addEventListener("ended",this.onvended);var B=this.config;this.levels&&B.autoStartLoad&&this.state===D.STOPPED&&this.startLoad(B.startPosition)},d.onMediaDetaching=function(){var f=this.media;f!=null&&f.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),f&&(f.removeEventListener("seeking",this.onvseeking),f.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},d.onMediaSeeking=function(){var f=this.config,v=this.fragCurrent,T=this.media,B=this.mediaBuffer,R=this.state,j=T?T.currentTime:0,U=K.BufferHelper.bufferInfo(B||T,j,f.maxBufferHole);if(this.log("media seeking to "+(Object(G.isFiniteNumber)(j)?j.toFixed(3):j)+", state: "+R),R===D.ENDED)this.resetLoadingState();else if(v&&!U.len){var _=f.maxFragLookUpTolerance,J=v.start-_,ne=v.start+v.duration+_,he=j>ne;(j<J||he)&&(he&&v.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),v.loader.abort()),this.resetLoadingState())}T&&(this.lastCurrentTime=j),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=j),this.tickImmediate()},d.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},d.onKeyLoaded=function(f,v){if(this.state!==D.KEY_LOADING||v.frag!==this.fragCurrent||!this.levels)return;this.state=D.IDLE;var T=this.levels[v.frag.level].details;T&&this.loadFragment(v.frag,T,v.frag.start)},d.onHandlerDestroying=function(){this.stopLoad(),w.prototype.onHandlerDestroying.call(this)},d.onHandlerDestroyed=function(){this.state=D.STOPPED,this.hls.off(n.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,w.prototype.onHandlerDestroyed.call(this)},d.loadKey=function(f,v){this.log("Loading key for "+f.sn+" of ["+v.startSN+"-"+v.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+f.level),this.state=D.KEY_LOADING,this.fragCurrent=f,this.hls.trigger(n.Events.KEY_LOADING,{frag:f})},d.loadFragment=function(f,v,T){this._loadFragForPlayback(f,v,T)},d._loadFragForPlayback=function(f,v,T){var B=this,R=function(U){if(B.fragContextChanged(f)){B.warn("Fragment "+f.sn+(U.part?" p: "+U.part.index:"")+" of level "+f.level+" was dropped during download."),B.fragmentTracker.removeFragment(f);return}f.stats.chunkCount++,B._handleFragmentLoadProgress(U)};this._doFragLoad(f,v,T,R).then(function(j){if(!j)return;B.fragLoadError=0;var U=B.state;if(B.fragContextChanged(f)){(U===D.FRAG_LOADING||U===D.BACKTRACKING||!B.fragCurrent&&U===D.PARSING)&&(B.fragmentTracker.removeFragment(f),B.state=D.IDLE);return}if("payload"in j&&(B.log("Loaded fragment "+f.sn+" of level "+f.level),B.hls.trigger(n.Events.FRAG_LOADED,j),B.state===D.BACKTRACKING)){B.fragmentTracker.backtrack(f,j),B.resetFragmentLoading(f);return}B._handleFragmentLoadComplete(j)}).catch(function(j){B.warn(j),B.resetFragmentLoading(f)})},d.flushMainBuffer=function(f,v,T){if(T===void 0&&(T=null),!(f-v))return;var B={startOffset:f,endOffset:v,type:T};this.fragLoadError=0,this.hls.trigger(n.Events.BUFFER_FLUSHING,B)},d._loadInitSegment=function(f){var v=this;this._doFragLoad(f).then(function(T){if(!T||v.fragContextChanged(f)||!v.levels)throw new Error("init load aborted");return T}).then(function(T){var B=v.hls,R=T.payload,j=f.decryptdata;if(R&&R.byteLength>0&&j&&j.key&&j.iv&&j.method==="AES-128"){var U=self.performance.now();return v.decrypter.webCryptoDecrypt(new Uint8Array(R),j.key.buffer,j.iv.buffer).then(function(_){var J=self.performance.now();return B.trigger(n.Events.FRAG_DECRYPTED,{frag:f,payload:_,stats:{tstart:U,tdecrypt:J}}),T.payload=_,T})}return T}).then(function(T){var B=v.fragCurrent,R=v.hls,j=v.levels;if(!j)throw new Error("init load aborted, missing levels");var U=j[f.level].details;console.assert(U,"Level details are defined when init segment is loaded");var _=f.stats;v.state=D.IDLE,v.fragLoadError=0,f.data=new Uint8Array(T.payload),_.parsing.start=_.buffering.start=self.performance.now(),_.parsing.end=_.buffering.end=self.performance.now(),T.frag===B&&R.trigger(n.Events.FRAG_BUFFERED,{stats:_,frag:B,part:null,id:f.type}),v.tick()}).catch(function(T){v.warn(T),v.resetFragmentLoading(f)})},d.fragContextChanged=function(f){var v=this.fragCurrent;return!f||!v||f.level!==v.level||f.sn!==v.sn||f.urlId!==v.urlId},d.fragBufferedComplete=function(f,v){var T=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+f.type+" sn: "+f.sn+(v?" part: "+v.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+f.level+" "+o.default.toString(K.BufferHelper.getBuffered(T))),this.state=D.IDLE,this.tick()},d._handleFragmentLoadComplete=function(f){var v=this.transmuxer;if(!v)return;var T=f.frag,B=f.part,R=f.partsLoaded,j=!R||R.length===0||R.some(function(_){return!_}),U=new y.ChunkMetadata(T.level,T.sn,T.stats.chunkCount+1,0,B?B.index:-1,!j);v.flush(U)},d._handleFragmentLoadProgress=function(f){},d._doFragLoad=function(f,v,T,B){var R=this;if(T===void 0&&(T=null),!this.levels)throw new Error("frag load aborted, missing levels");if(T=Math.max(f.start,T||0),this.config.lowLatencyMode&&v){var j=v.partList;if(j&&B){T>f.end&&v.fragmentHint&&(f=v.fragmentHint);var U=this.getNextPart(j,f,T);if(U>-1){var _=j[U];return this.log("Loading part sn: "+f.sn+" p: "+_.index+" cc: "+f.cc+" of playlist ["+v.startSN+"-"+v.endSN+"] parts [0-"+U+"-"+(j.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+f.level+", target: "+parseFloat(T.toFixed(3))),this.nextLoadPosition=_.start+_.duration,this.state=D.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:f,part:j[U],targetBufferTime:T}),this.doFragPartsLoad(f,j,U,B).catch(function(J){return R.handleFragLoadError(J)})}else if(!f.url||this.loadedEndOfParts(j,T))return Promise.resolve(null)}}return this.log("Loading fragment "+f.sn+" cc: "+f.cc+" "+(v?"of ["+v.startSN+"-"+v.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+f.level+", target: "+parseFloat(T.toFixed(3))),Object(G.isFiniteNumber)(f.sn)&&!this.bitrateTest&&(this.nextLoadPosition=f.start+f.duration),this.state=D.FRAG_LOADING,this.hls.trigger(n.Events.FRAG_LOADING,{frag:f,targetBufferTime:T}),this.fragmentLoader.load(f,B).catch(function(J){return R.handleFragLoadError(J)})},d.doFragPartsLoad=function(f,v,T,B){var R=this;return new Promise(function(j,U){var _=[],J=function ne(he){var be=v[he];R.fragmentLoader.loadPart(f,be,B).then(function(Ke){_[be.index]=Ke;var De=Ke.part;R.hls.trigger(n.Events.FRAG_LOADED,Ke);var je=v[he+1];if(je&&je.fragment===f)ne(he+1);else return j({frag:f,part:De,partsLoaded:_})}).catch(U)};J(T)})},d.handleFragLoadError=function(f){var v=f.data;return v&&v.details===I.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(v.frag,v.part):this.hls.trigger(n.Events.ERROR,v),null},d._handleTransmuxerFlush=function(f){var v=this.getCurrentContext(f);if(!v||this.state!==D.PARSING){this.fragCurrent||(this.state=D.IDLE);return}var T=v.frag,B=v.part,R=v.level,j=self.performance.now();T.stats.parsing.end=j,B&&(B.stats.parsing.end=j),this.updateLevelTiming(T,B,R,f.partial)},d.getCurrentContext=function(f){var v=this.levels,T=f.level,B=f.sn,R=f.part;if(!v||!v[T])return this.warn("Levels object was unset while buffering fragment "+B+" of level "+T+". The current chunk will not be buffered."),null;var j=v[T],U=R>-1?Object(c.getPartWith)(j,B,R):null,_=U?U.fragment:Object(c.getFragmentWithSN)(j,B,this.fragCurrent);return _?{frag:_,part:U,level:j}:null},d.bufferFragmentData=function(f,v,T,B){if(!f||this.state!==D.PARSING)return;var R=f.data1,j=f.data2,U=R;if(R&&j&&(U=Object(m.appendUint8Array)(R,j)),!U||!U.length)return;var _={type:f.type,frag:v,part:T,chunkMeta:B,parent:v.type,data:U};this.hls.trigger(n.Events.BUFFER_APPENDING,_),f.dropped&&f.independent&&!T&&this.flushBufferGap(v)},d.flushBufferGap=function(f){var v=this.media;if(!v)return;if(!K.BufferHelper.isBuffered(v,v.currentTime)){this.flushMainBuffer(0,f.start);return}var T=v.currentTime,B=K.BufferHelper.bufferInfo(v,T,0),R=f.duration,j=Math.min(this.config.maxFragLookUpTolerance*2,R*.25),U=Math.max(Math.min(f.start-j,B.end-j),T+j);f.start-U>j&&this.flushMainBuffer(U,f.start)},d.getFwdBufferInfo=function(f,v){var T=this.config,B=this.getLoadPosition();if(!Object(G.isFiniteNumber)(B))return null;var R=K.BufferHelper.bufferInfo(f,B,T.maxBufferHole);if(R.len===0&&R.nextStart!==void 0){var j=this.fragmentTracker.getBufferedFrag(B,v);if(j&&R.nextStart<j.end)return K.BufferHelper.bufferInfo(f,B,Math.max(R.nextStart,T.maxBufferHole))}return R},d.getMaxBufferLength=function(f){var v=this.config,T;return f?T=Math.max(8*v.maxBufferSize/f,v.maxBufferLength):T=v.maxBufferLength,Math.min(T,v.maxMaxBufferLength)},d.reduceMaxBufferLength=function(f){var v=this.config,T=f||v.maxBufferLength;return v.maxMaxBufferLength>=T?(v.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+v.maxMaxBufferLength+"s"),!0):!1},d.getNextFragment=function(f,v){var T,B,R=v.fragments,j=R.length;if(!j)return null;var U=this.config,_=R[0].start,J;if(v.live){var ne=U.initialLiveManifestSize;if(j<ne)return this.warn("Not enough fragments to start playback (have: "+j+", need: "+ne+")"),null;!v.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(J=this.getInitialLiveFragment(v,R),this.startPosition=J?this.hls.liveSyncPosition||J.start:f)}else f<=_&&(J=R[0]);if(!J){var he=U.lowLatencyMode?v.partEnd:v.fragmentEnd;J=this.getFragmentAtPosition(f,he,v)}return(T=J)!==null&&T!==void 0&&T.initSegment&&!((B=J)!==null&&B!==void 0&&B.initSegment.data)&&!this.bitrateTest&&(J=J.initSegment),J},d.getNextPart=function(f,v,T){for(var B=-1,R=!1,j=!0,U=0,_=f.length;U<_;U++){var J=f[U];if(j=j&&!J.independent,B>-1&&T<J.start)break;var ne=J.loaded;!ne&&(R||J.independent||j)&&J.fragment===v&&(B=U),R=ne}return B},d.loadedEndOfParts=function(f,v){var T=f[f.length-1];return T&&v>T.start&&T.loaded},d.getInitialLiveFragment=function(f,v){var T=this.fragPrevious,B=null;if(T){if(f.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+T.programDateTime),B=Object(u.findFragmentByPDT)(v,T.endProgramDateTime,this.config.maxFragLookUpTolerance)),!B){var R=T.sn+1;if(R>=f.startSN&&R<=f.endSN){var j=v[R-f.startSN];T.cc===j.cc&&(B=j,this.log("Live playlist, switching playlist, load frag with next SN: "+B.sn))}B||(B=Object(u.findFragWithCC)(v,T.cc),B&&this.log("Live playlist, switching playlist, load frag with same CC: "+B.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(B=this.getFragmentAtPosition(U,this.bitrateTest?f.fragmentEnd:f.edge,f))}return B},d.getFragmentAtPosition=function(f,v,T){var B=this.config,R=this.fragPrevious,j=T.fragments,U=T.endSN,_=T.fragmentHint,J=B.maxFragLookUpTolerance,ne=!!(B.lowLatencyMode&&T.partList&&_);ne&&_&&!this.bitrateTest&&(j=j.concat(_),U=_.sn);var he;if(f<v){var be=f>v-J?0:J;he=Object(u.findFragmentByPTS)(R,j,f,be)}else he=j[j.length-1];if(he){var Ke=he.sn-T.startSN,De=R&&he.level===R.level,je=j[Ke+1],Be=this.fragmentTracker.getState(he);if(Be===N.FragmentState.BACKTRACKED){he=null;for(var Ge=Ke;j[Ge]&&this.fragmentTracker.getState(j[Ge])===N.FragmentState.BACKTRACKED;)R?he=j[Ge--]:he=j[--Ge];he||(he=je)}else R&&he.sn===R.sn&&!ne&&(De&&(he.sn<U&&this.fragmentTracker.getState(je)!==N.FragmentState.OK?(this.log("SN "+he.sn+" just loaded, load next one: "+je.sn),he=je):he=null))}return he},d.synchronizeToLiveEdge=function(f){var v=this.config,T=this.media;if(!T)return;var B=this.hls.liveSyncPosition,R=T.currentTime,j=f.fragments[0].start,U=f.edge,_=R>=j-v.maxFragLookUpTolerance&&R<=U;if(B!==null&&T.duration>B&&(R<B||!_)){var J=v.liveMaxLatencyDuration!==void 0?v.liveMaxLatencyDuration:v.liveMaxLatencyDurationCount*f.targetduration;(!_&&T.readyState<4||R<U-J)&&(this.loadedmetadata||(this.nextLoadPosition=B),T.readyState&&(this.warn("Playback: "+R.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+B.toFixed(3)),T.currentTime=B))}},d.alignPlaylists=function(f,v){var T=this.levels,B=this.levelLastLoaded,R=this.fragPrevious,j=B!==null?T[B]:null,U=f.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var _=f.fragments[0].start,J=!v,ne=f.alignedSliding&&Object(G.isFiniteNumber)(_);if(J||!ne&&!_){Object(g.alignStream)(R,j,f);var he=f.fragments[0].start;return this.log("Live playlist sliding: "+he.toFixed(2)+" start-sn: "+(v?v.startSN:"na")+"->"+f.startSN+" prev-sn: "+(R?R.sn:"na")+" fragments: "+U),he}return _},d.waitForCdnTuneIn=function(f){var v=3;return f.live&&f.canBlockReload&&f.tuneInGoal>Math.max(f.partHoldBack,f.partTarget*v)},d.setStartPosition=function(f,v){var T=this.startPosition;if(T<v&&(T=-1),T===-1||this.lastCurrentTime===-1){var B=f.startTimeOffset;Object(G.isFiniteNumber)(B)?(T=v+B,B<0&&(T+=f.totalduration),T=Math.min(Math.max(v,T),v+f.totalduration),this.log("Start time offset "+B+" found in playlist, adjust startPosition to "+T),this.startPosition=T):f.live?T=this.hls.liveSyncPosition||v:this.startPosition=T=0,this.lastCurrentTime=T}this.nextLoadPosition=T},d.getLoadPosition=function(){var f=this.media,v=0;return this.loadedmetadata&&f?v=f.currentTime:this.nextLoadPosition&&(v=this.nextLoadPosition),v},d.handleFragLoadAborted=function(f,v){this.transmuxer&&f.sn!=="initSegment"&&f.stats.aborted&&(this.warn("Fragment "+f.sn+(v?" part"+v.index:"")+" of level "+f.level+" was aborted"),this.resetFragmentLoading(f))},d.resetFragmentLoading=function(f){(!this.fragCurrent||!this.fragContextChanged(f))&&(this.state=D.IDLE)},d.onFragmentOrKeyLoadError=function(f,v){if(v.fatal)return;var T=v.frag;if(!T||T.type!==f)return;var B=this.fragCurrent;console.assert(B&&T.sn===B.sn&&T.level===B.level&&T.urlId===B.urlId,"Frag load error must match current frag to retry");var R=this.config;if(this.fragLoadError+1<=R.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(T.level))return;var j=Math.min(Math.pow(2,this.fragLoadError)*R.fragLoadingRetryDelay,R.fragLoadingMaxRetryTimeout);this.warn("Fragment "+T.sn+" of "+f+" "+T.level+" failed to load, retrying in "+j+"ms"),this.retryDate=self.performance.now()+j,this.fragLoadError++,this.state=D.FRAG_LOADING_WAITING_RETRY}else v.levelRetry?(f===s.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=D.IDLE):(W.logger.error(v.details+" reaches max retry, redispatch as fatal ..."),v.fatal=!0,this.hls.stopLoad(),this.state=D.ERROR)},d.afterBufferFlushed=function(f,v,T){if(!f)return;var B=K.BufferHelper.getBuffered(f);this.fragmentTracker.detectEvictedFragments(v,B,T),this.state===D.ENDED&&this.resetLoadingState()},d.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=D.IDLE},d.resetLiveStartWhenNotLoaded=function(f){if(!this.loadedmetadata){this.startFragRequested=!1;var v=this.levels?this.levels[f].details:null;if(v!=null&&v.live)return this.startPosition=-1,this.setStartPosition(v,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},d.updateLevelTiming=function(f,v,T,B){var R=this,j=T.details;console.assert(!!j,"level.details must be defined");var U=Object.keys(f.elementaryStreams).reduce(function(_,J){var ne=f.elementaryStreams[J];if(ne){var he=ne.endPTS-ne.startPTS;if(he<=0)return R.warn("Could not parse fragment "+f.sn+" "+J+" duration reliably ("+he+") resetting transmuxer to fallback to playlist timing"),R.resetTransmuxer(),_||!1;var be=B?0:Object(c.updateFragPTSDTS)(j,f,ne.startPTS,ne.endPTS,ne.startDTS,ne.endDTS);return R.hls.trigger(n.Events.LEVEL_PTS_UPDATED,{details:j,level:T,drift:be,type:J,frag:f,start:ne.startPTS,end:ne.endPTS}),!0}return _},!1);U?(this.state=D.PARSED,this.hls.trigger(n.Events.FRAG_PARSED,{frag:f,part:v})):this.resetLoadingState()},d.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},A(x,[{key:"state",get:function(){return this._state},set:function(f){var v=this._state;v!==f&&(this._state=f,this.log(v+"->"+f))}}]),x}(b.default)},"./src/controller/buffer-controller.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return u});var G=k("./src/polyfills/number.ts"),b=k("./src/events.ts"),N=k("./src/utils/logger.ts"),K=k("./src/errors.ts"),W=k("./src/utils/buffer-helper.ts"),n=k("./src/utils/mediasource-helper.ts"),I=k("./src/loader/fragment.ts"),y=k("./src/controller/buffer-operation-queue.ts"),m=Object(n.getMediaSource)(),g=/([ha]vc.)(?:\.[^.,]+)+/,u=function(){function c(l){var o=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var s=o.hls,a=o.media,A=o.mediaSource;N.logger.log("[buffer-controller]: Media source opened"),a&&(o.updateMediaElementDuration(),s.trigger(b.Events.MEDIA_ATTACHED,{media:a})),A&&A.removeEventListener("sourceopen",o._onMediaSourceOpen),o.checkPendingTracks()},this._onMediaSourceClose=function(){N.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){N.logger.log("[buffer-controller]: Media source ended")},this.hls=l,this._initSourceBuffer(),this.registerListeners()}var p=c.prototype;return p.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},p.destroy=function(){this.unregisterListeners(),this.details=null},p.registerListeners=function(){var o=this.hls;o.on(b.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(b.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(b.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(b.Events.BUFFER_RESET,this.onBufferReset,this),o.on(b.Events.BUFFER_APPENDING,this.onBufferAppending,this),o.on(b.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.on(b.Events.BUFFER_EOS,this.onBufferEos,this),o.on(b.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),o.on(b.Events.LEVEL_UPDATED,this.onLevelUpdated,this),o.on(b.Events.FRAG_PARSED,this.onFragParsed,this),o.on(b.Events.FRAG_CHANGED,this.onFragChanged,this)},p.unregisterListeners=function(){var o=this.hls;o.off(b.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.off(b.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(b.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(b.Events.BUFFER_RESET,this.onBufferReset,this),o.off(b.Events.BUFFER_APPENDING,this.onBufferAppending,this),o.off(b.Events.BUFFER_CODECS,this.onBufferCodecs,this),o.off(b.Events.BUFFER_EOS,this.onBufferEos,this),o.off(b.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),o.off(b.Events.LEVEL_UPDATED,this.onLevelUpdated,this),o.off(b.Events.FRAG_PARSED,this.onFragParsed,this),o.off(b.Events.FRAG_CHANGED,this.onFragChanged,this)},p._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new y.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},p.onManifestParsed=function(o,s){var a=2;(s.audio&&!s.video||!s.altAudio)&&(a=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=a,this.details=null,N.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},p.onMediaAttaching=function(o,s){var a=this.media=s.media;if(a&&m){var A=this.mediaSource=new m;A.addEventListener("sourceopen",this._onMediaSourceOpen),A.addEventListener("sourceended",this._onMediaSourceEnded),A.addEventListener("sourceclose",this._onMediaSourceClose),a.src=self.URL.createObjectURL(A),this._objectUrl=a.src}},p.onMediaDetaching=function(){var o=this.media,s=this.mediaSource,a=this._objectUrl;if(s){if(N.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(A){N.logger.warn("[buffer-controller]: onMediaDetaching: "+A.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),o&&(a&&self.URL.revokeObjectURL(a),o.src===a?(o.removeAttribute("src"),o.load()):N.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(b.Events.MEDIA_DETACHED,void 0)},p.onBufferReset=function(){var o=this;this.getSourceBufferTypes().forEach(function(s){var a=o.sourceBuffer[s];try{a&&(o.removeBufferListeners(s),o.mediaSource&&o.mediaSource.removeSourceBuffer(a),o.sourceBuffer[s]=void 0)}catch(A){N.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",A)}}),this._initSourceBuffer()},p.onBufferCodecs=function(o,s){var a=this,A=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(S){if(A){var C=a.tracks[S];if(C&&typeof C.buffer.changeType=="function"){var L=s[S],D=L.codec,O=L.levelCodec,w=L.container,x=(C.levelCodec||C.codec).replace(g,"$1"),d=(O||D).replace(g,"$1");if(x!==d){var E=w+";codecs="+(O||D);a.appendChangeType(S,E)}}}else a.pendingTracks[S]=s[S]}),A)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},p.appendChangeType=function(o,s){var a=this,A=this.operationQueue,S={execute:function(){var L=a.sourceBuffer[o];L&&(N.logger.log("[buffer-controller]: changing "+o+" sourceBuffer type to "+s),L.changeType(s)),A.shiftAndExecuteNext(o)},onStart:function(){},onComplete:function(){},onError:function(L){N.logger.warn("[buffer-controller]: Failed to change "+o+" SourceBuffer type",L)}};A.append(S,o)},p.onBufferAppending=function(o,s){var a=this,A=this.hls,S=this.operationQueue,C=this.tracks,L=s.data,D=s.type,O=s.frag,w=s.part,x=s.chunkMeta,d=x.buffering[D],E=self.performance.now();d.start=E;var f=O.stats.buffering,v=w?w.stats.buffering:null;f.start===0&&(f.start=E),v&&v.start===0&&(v.start=E);var T=C.audio,B=D==="audio"&&x.id===1&&(T==null?void 0:T.container)==="audio/mpeg",R={execute:function(){if(d.executeStart=self.performance.now(),B){var U=a.sourceBuffer[D];if(U){var _=O.start-U.timestampOffset;Math.abs(_)>=.1&&(N.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+O.start+" (delta: "+_+") sn: "+O.sn+")"),U.timestampOffset=O.start)}}a.appendExecutor(L,D)},onStart:function(){},onComplete:function(){var U=self.performance.now();d.executeEnd=d.end=U,f.first===0&&(f.first=U),v&&v.first===0&&(v.first=U);var _=a.sourceBuffer,J={};for(var ne in _)J[ne]=W.BufferHelper.getBuffered(_[ne]);a.appendError=0,a.hls.trigger(b.Events.BUFFER_APPENDED,{type:D,frag:O,part:w,chunkMeta:x,parent:O.type,timeRanges:J})},onError:function(U){N.logger.error("[buffer-controller]: Error encountered while trying to append to the "+D+" SourceBuffer",U);var _={type:K.ErrorTypes.MEDIA_ERROR,parent:O.type,details:K.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?_.details=K.ErrorDetails.BUFFER_FULL_ERROR:(a.appendError++,_.details=K.ErrorDetails.BUFFER_APPEND_ERROR,a.appendError>A.config.appendErrorMaxRetry&&(N.logger.error("[buffer-controller]: Failed "+A.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),_.fatal=!0)),A.trigger(b.Events.ERROR,_)}};S.append(R,D)},p.onBufferFlushing=function(o,s){var a=this,A=this.operationQueue,S=function(L){return{execute:a.removeExecutor.bind(a,L,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){a.hls.trigger(b.Events.BUFFER_FLUSHED,{type:L})},onError:function(O){N.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",O)}}};s.type?A.append(S(s.type),s.type):this.getSourceBufferTypes().forEach(function(C){A.append(S(C),C)})},p.onFragParsed=function(o,s){var a=this,A=s.frag,S=s.part,C=[],L=S?S.elementaryStreams:A.elementaryStreams;L[I.ElementaryStreamTypes.AUDIOVIDEO]?C.push("audiovideo"):(L[I.ElementaryStreamTypes.AUDIO]&&C.push("audio"),L[I.ElementaryStreamTypes.VIDEO]&&C.push("video"));var D=function(){var w=self.performance.now();A.stats.buffering.end=w,S&&(S.stats.buffering.end=w);var x=S?S.stats:A.stats;a.hls.trigger(b.Events.FRAG_BUFFERED,{frag:A,part:S,stats:x,id:A.type})};C.length===0&&N.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+A.type+" level: "+A.level+" sn: "+A.sn),this.blockBuffers(D,C)},p.onFragChanged=function(o,s){this.flushBackBuffer()},p.onBufferEos=function(o,s){var a=this,A=this.getSourceBufferTypes().reduce(function(S,C){var L=a.sourceBuffer[C];return(!s.type||s.type===C)&&(L&&!L.ended&&(L.ended=!0,N.logger.log("[buffer-controller]: "+C+" sourceBuffer now EOS"))),S&&!!(!L||L.ended)},!0);A&&this.blockBuffers(function(){var S=a.mediaSource;if(!S||S.readyState!=="open")return;S.endOfStream()})},p.onLevelUpdated=function(o,s){var a=s.details;if(!a.fragments.length)return;this.details=a,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},p.flushBackBuffer=function(){var o=this.hls,s=this.details,a=this.media,A=this.sourceBuffer;if(!a||s===null)return;var S=this.getSourceBufferTypes();if(!S.length)return;var C=s.live&&o.config.liveBackBufferLength!==null?o.config.liveBackBufferLength:o.config.backBufferLength;if(!Object(G.isFiniteNumber)(C)||C<0)return;var L=a.currentTime,D=s.levelTargetDuration,O=Math.max(C,D),w=Math.floor(L/D)*D-O;S.forEach(function(x){var d=A[x];if(d){var E=W.BufferHelper.getBuffered(d);E.length>0&&w>E.start(0)&&(o.trigger(b.Events.BACK_BUFFER_REACHED,{bufferEnd:w}),s.live&&o.trigger(b.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:w}),o.trigger(b.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:w,type:x}))}})},p.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var o=this.details,s=this.hls,a=this.media,A=this.mediaSource,S=o.fragments[0].start+o.totalduration,C=a.duration,L=Object(G.isFiniteNumber)(A.duration)?A.duration:0;o.live&&s.config.liveDurationInfinity?(N.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),A.duration=Infinity,this.updateSeekableRange(o)):(S>L&&S>C||!Object(G.isFiniteNumber)(C))&&(N.logger.log("[buffer-controller]: Updating Media Source duration to "+S.toFixed(3)),A.duration=S)},p.updateSeekableRange=function(o){var s=this.mediaSource,a=o.fragments,A=a.length;if(A&&o.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var S=Math.max(0,a[0].start),C=Math.max(S,S+o.totalduration);s.setLiveSeekableRange(S,C)}},p.checkPendingTracks=function(){var o=this.bufferCodecEventsExpected,s=this.operationQueue,a=this.pendingTracks,A=Object.keys(a).length;if(A&&!o||A===2){this.createSourceBuffers(a),this.pendingTracks={};var S=this.getSourceBufferTypes();if(S.length===0){this.hls.trigger(b.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}S.forEach(function(C){s.executeNext(C)})}},p.createSourceBuffers=function(o){var s=this.sourceBuffer,a=this.mediaSource;if(!a)throw Error("createSourceBuffers called when mediaSource was null");var A=0;for(var S in o)if(!s[S]){var C=o[S];if(!C)throw Error("source buffer exists for track "+S+", however track does not");var L=C.levelCodec||C.codec,D=C.container+";codecs="+L;N.logger.log("[buffer-controller]: creating sourceBuffer("+D+")");try{var O=s[S]=a.addSourceBuffer(D),w=S;this.addBufferListener(w,"updatestart",this._onSBUpdateStart),this.addBufferListener(w,"updateend",this._onSBUpdateEnd),this.addBufferListener(w,"error",this._onSBUpdateError),this.tracks[S]={buffer:O,codec:L,container:C.container,levelCodec:C.levelCodec,id:C.id},A++}catch(x){N.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+x.message),this.hls.trigger(b.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:x,mimeType:D})}}A&&this.hls.trigger(b.Events.BUFFER_CREATED,{tracks:this.tracks})},p._onSBUpdateStart=function(o){var s=this.operationQueue,a=s.current(o);a.onStart()},p._onSBUpdateEnd=function(o){var s=this.operationQueue,a=s.current(o);a.onComplete(),s.shiftAndExecuteNext(o)},p._onSBUpdateError=function(o,s){N.logger.error("[buffer-controller]: "+o+" SourceBuffer error",s),this.hls.trigger(b.Events.ERROR,{type:K.ErrorTypes.MEDIA_ERROR,details:K.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var a=this.operationQueue.current(o);a&&a.onError(s)},p.removeExecutor=function(o,s,a){var A=this.media,S=this.mediaSource,C=this.operationQueue,L=this.sourceBuffer,D=L[o];if(!A||!S||!D){N.logger.warn("[buffer-controller]: Attempting to remove from the "+o+" SourceBuffer, but it does not exist"),C.shiftAndExecuteNext(o);return}var O=Object(G.isFiniteNumber)(A.duration)?A.duration:Infinity,w=Object(G.isFiniteNumber)(S.duration)?S.duration:Infinity,x=Math.max(0,s),d=Math.min(a,O,w);d>x?(N.logger.log("[buffer-controller]: Removing ["+x+","+d+"] from the "+o+" SourceBuffer"),console.assert(!D.updating,o+" sourceBuffer must not be updating"),D.remove(x,d)):C.shiftAndExecuteNext(o)},p.appendExecutor=function(o,s){var a=this.operationQueue,A=this.sourceBuffer,S=A[s];if(!S){N.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),a.shiftAndExecuteNext(s);return}S.ended=!1,console.assert(!S.updating,s+" sourceBuffer must not be updating"),S.appendBuffer(o)},p.blockBuffers=function(o,s){var a=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){N.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(o);return}var A=this.operationQueue,S=s.map(function(C){return A.appendBlocker(C)});Promise.all(S).then(function(){o(),s.forEach(function(C){var L=a.sourceBuffer[C];(!L||!L.updating)&&A.shiftAndExecuteNext(C)})})},p.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},p.addBufferListener=function(o,s,a){var A=this.sourceBuffer[o];if(!A)return;var S=a.bind(this,o);this.listeners[o].push({event:s,listener:S}),A.addEventListener(s,S)},p.removeBufferListeners=function(o){var s=this.sourceBuffer[o];if(!s)return;this.listeners[o].forEach(function(a){s.removeEventListener(a.event,a.listener)})},c}()},"./src/controller/buffer-operation-queue.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return b});var G=k("./src/utils/logger.ts"),b=function(){function N(W){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=W}var K=N.prototype;return K.append=function(n,I){var y=this.queues[I];y.push(n),y.length===1&&this.buffers[I]&&this.executeNext(I)},K.insertAbort=function(n,I){var y=this.queues[I];y.unshift(n),this.executeNext(I)},K.appendBlocker=function(n){var I,y=new Promise(function(g){I=g}),m={execute:I,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(m,n),y},K.executeNext=function(n){var I=this.buffers,y=this.queues,m=I[n],g=y[n];if(g.length){var u=g[0];try{u.execute()}catch(c){G.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),u.onError(c),(!m||!m.updating)&&(g.shift(),this.executeNext(n))}}},K.shiftAndExecuteNext=function(n){this.queues[n].shift(),this.executeNext(n)},K.current=function(n){return this.queues[n][0]},N}()},"./src/controller/cap-level-controller.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/events.ts");function b(W,n){for(var I=0;I<n.length;I++){var y=n[I];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(W,y.key,y)}}function N(W,n,I){return n&&b(W.prototype,n),I&&b(W,I),W}var K=function(){function W(I){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=I,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var n=W.prototype;return n.setStreamController=function(y){this.streamController=y},n.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},n.registerListeners=function(){var y=this.hls;y.on(G.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),y.on(G.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),y.on(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.on(G.Events.BUFFER_CODECS,this.onBufferCodecs,this),y.on(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},n.unregisterListener=function(){var y=this.hls;y.off(G.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),y.off(G.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),y.off(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),y.off(G.Events.BUFFER_CODECS,this.onBufferCodecs,this),y.off(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},n.onFpsDropLevelCapping=function(y,m){W.isLevelAllowed(m.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(m.droppedLevel)},n.onMediaAttaching=function(y,m){this.media=m.media instanceof HTMLVideoElement?m.media:null},n.onManifestParsed=function(y,m){var g=this.hls;this.restrictedLevels=[],this.firstLevel=m.firstLevel,g.config.capLevelToPlayerSize&&m.video&&this.startCapping()},n.onBufferCodecs=function(y,m){var g=this.hls;g.config.capLevelToPlayerSize&&m.video&&this.startCapping()},n.onMediaDetaching=function(){this.stopCapping()},n.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var y=this.hls.levels;if(y.length){var m=this.hls;m.autoLevelCapping=this.getMaxLevel(y.length-1),m.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=m.autoLevelCapping}}},n.getMaxLevel=function(y){var m=this,g=this.hls.levels;if(!g.length)return-1;var u=g.filter(function(c,p){return W.isLevelAllowed(p,m.restrictedLevels)&&p<=y});return this.clientRect=null,W.getMaxLevelByMediaSize(u,this.mediaWidth,this.mediaHeight)},n.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()},n.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},n.getDimensions=function(){if(this.clientRect)return this.clientRect;var y=this.media,m={width:0,height:0};if(y){var g=y.getBoundingClientRect();m.width=g.width,m.height=g.height,!m.width&&!m.height&&(m.width=g.right-g.left||y.width||0,m.height=g.bottom-g.top||y.height||0)}return this.clientRect=m,m},W.isLevelAllowed=function(y,m){return m===void 0&&(m=[]),m.indexOf(y)===-1},W.getMaxLevelByMediaSize=function(y,m,g){if(!y||!y.length)return-1;for(var u=function(s,a){return a?s.width!==a.width||s.height!==a.height:!0},c=y.length-1,p=0;p<y.length;p+=1){var l=y[p];if((l.width>=m||l.height>=g)&&u(l,y[p+1])){c=p;break}}return c},N(W,[{key:"mediaWidth",get:function(){return this.getDimensions().width*W.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*W.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var y=1;try{y=self.devicePixelRatio}catch(m){}return y}}]),W}();X.default=K},"./src/controller/cmcd-controller.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return u});var G=k("./src/events.ts"),b=k("./src/types/cmcd.ts"),N=k("./src/utils/buffer-helper.ts"),K=k("./src/utils/logger.ts");function W(c,p){for(var l=0;l<p.length;l++){var o=p[l];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(c,o.key,o)}}function n(c,p,l){return p&&W(c.prototype,p),l&&W(c,l),c}function I(c,p){var l=typeof Symbol!="undefined"&&c[Symbol.iterator]||c["@@iterator"];if(l)return(l=l.call(c)).next.bind(l);if(Array.isArray(c)||(l=y(c))||p&&c&&typeof c.length=="number"){l&&(c=l);var o=0;return function(){return o>=c.length?{done:!0}:{done:!1,value:c[o++]}}}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 y(c,p){if(!c)return;if(typeof c=="string")return m(c,p);var l=Object.prototype.toString.call(c).slice(8,-1);if(l==="Object"&&c.constructor&&(l=c.constructor.name),l==="Map"||l==="Set")return Array.from(c);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return m(c,p)}function m(c,p){(p==null||p>c.length)&&(p=c.length);for(var l=0,o=new Array(p);l<p;l++)o[l]=c[l];return o}function g(){return g=Object.assign||function(c){for(var p=1;p<arguments.length;p++){var l=arguments[p];for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(c[o]=l[o])}return c},g.apply(this,arguments)}var u=function(){function c(l){var o=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(){o.initialized&&(o.starved=!0),o.buffering=!0},this.onPlaying=function(){o.initialized||(o.initialized=!0),o.buffering=!1},this.applyPlaylistData=function(A){try{o.apply(A,{ot:b.CMCDObjectType.MANIFEST,su:!o.initialized})}catch(S){K.logger.warn("Could not generate manifest CMCD data.",S)}},this.applyFragmentData=function(A){try{var S=A.frag,C=o.hls.levels[S.level],L=o.getObjectType(S),D={d:S.duration*1e3,ot:L};(L===b.CMCDObjectType.VIDEO||L===b.CMCDObjectType.AUDIO||L==b.CMCDObjectType.MUXED)&&(D.br=C.bitrate/1e3,D.tb=o.getTopBandwidth(L),D.bl=o.getBufferLength(L)),o.apply(A,D)}catch(O){K.logger.warn("Could not generate segment CMCD data.",O)}},this.hls=l;var s=this.config=l.config,a=s.cmcd;a!=null&&(s.pLoader=this.createPlaylistLoader(),s.fLoader=this.createFragmentLoader(),this.sid=a.sessionId||c.uuid(),this.cid=a.contentId,this.useHeaders=a.useHeaders===!0,this.registerListeners())}var p=c.prototype;return p.registerListeners=function(){var o=this.hls;o.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.on(G.Events.MEDIA_DETACHED,this.onMediaDetached,this),o.on(G.Events.BUFFER_CREATED,this.onBufferCreated,this)},p.unregisterListeners=function(){var o=this.hls;o.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.off(G.Events.MEDIA_DETACHED,this.onMediaDetached,this),o.off(G.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},p.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},p.onMediaAttached=function(o,s){this.media=s.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},p.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},p.onBufferCreated=function(o,s){var a,A;this.audioBuffer=(a=s.tracks.audio)===null||a===void 0?void 0:a.buffer,this.videoBuffer=(A=s.tracks.video)===null||A===void 0?void 0:A.buffer},p.createData=function(){var o;return{v:b.CMCDVersion,sf:b.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(o=this.media)===null||o===void 0?void 0:o.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},p.apply=function(o,s){s===void 0&&(s={}),g(s,this.createData());var a=s.ot===b.CMCDObjectType.INIT||s.ot===b.CMCDObjectType.VIDEO||s.ot===b.CMCDObjectType.MUXED;if(this.starved&&a&&(s.bs=!0,s.su=!0,this.starved=!1),s.su==null&&(s.su=this.buffering),this.useHeaders){var A=c.toHeaders(s);if(!Object.keys(A).length)return;o.headers||(o.headers={}),g(o.headers,A)}else{var S=c.toQuery(s);if(!S)return;o.url=c.appendQueryToUri(o.url,S)}},p.getObjectType=function(o){var s=o.type;return s==="subtitle"?b.CMCDObjectType.TIMED_TEXT:o.sn==="initSegment"?b.CMCDObjectType.INIT:s==="audio"?b.CMCDObjectType.AUDIO:s==="main"?this.hls.audioTracks.length?b.CMCDObjectType.VIDEO:b.CMCDObjectType.MUXED:void 0},p.getTopBandwidth=function(o){for(var s=0,a=o===b.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,A=I(a),S;!(S=A()).done;){var C=S.value;C.bitrate>s&&(s=C.bitrate)}return s>0?s:NaN},p.getBufferLength=function(o){var s=this.hls.media,a=o===b.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!a||!s)return NaN;var A=N.BufferHelper.bufferInfo(a,s.currentTime,this.config.maxBufferHole);return A.len*1e3},p.createPlaylistLoader=function(){var o=this.config.pLoader,s=this.applyPlaylistData,a=o||this.config.loader;return function(){function A(C){this.loader=void 0,this.loader=new a(C)}var S=A.prototype;return S.destroy=function(){this.loader.destroy()},S.abort=function(){this.loader.abort()},S.load=function(L,D,O){s(L),this.loader.load(L,D,O)},n(A,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),A}()},p.createFragmentLoader=function(){var o=this.config.fLoader,s=this.applyFragmentData,a=o||this.config.loader;return function(){function A(C){this.loader=void 0,this.loader=new a(C)}var S=A.prototype;return S.destroy=function(){this.loader.destroy()},S.abort=function(){this.loader.abort()},S.load=function(L,D,O){s(L),this.loader.load(L,D,O)},n(A,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),A}()},c.uuid=function(){var o=URL.createObjectURL(new Blob),s=o.toString();return URL.revokeObjectURL(o),s.substr(s.lastIndexOf("/")+1)},c.serialize=function(o){for(var s=[],a=function(B){return!Number.isNaN(B)&&B!=null&&B!==""&&B!==!1},A=function(B){return Math.round(B)},S=function(B){return A(B/100)*100},C=function(B){return encodeURIComponent(B)},L={br:A,d:A,bl:S,dl:S,mtp:S,nor:C,rtp:S,tb:A},D=Object.keys(o||{}).sort(),O=I(D),w;!(w=O()).done;){var x=w.value,d=o[x];if(!a(d))continue;if(x==="v"&&d===1)continue;if(x=="pr"&&d===1)continue;var E=L[x];E&&(d=E(d));var f=typeof d,v=void 0;x==="ot"||x==="sf"||x==="st"?v=x+"="+d:f==="boolean"?v=x:f==="number"?v=x+"="+d:v=x+"="+JSON.stringify(d),s.push(v)}return s.join(",")},c.toHeaders=function(o){for(var s=Object.keys(o),a={},A=["Object","Request","Session","Status"],S=[{},{},{},{}],C={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},L=0,D=s;L<D.length;L++){var O=D[L],w=C[O]!=null?C[O]:1;S[w][O]=o[O]}for(var x=0;x<S.length;x++){var d=c.serialize(S[x]);d&&(a["CMCD-"+A[x]]=d)}return a},c.toQuery=function(o){return"CMCD="+encodeURIComponent(c.serialize(o))},c.appendQueryToUri=function(o,s){if(!s)return o;var a=o.includes("?")?"&":"?";return""+o+a+s},c}()},"./src/controller/eme-controller.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/events.ts"),b=k("./src/errors.ts"),N=k("./src/utils/logger.ts"),K=k("./src/utils/mediakeys-helper.ts");function W(u,c){for(var p=0;p<c.length;p++){var l=c[p];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(u,l.key,l)}}function n(u,c,p){return c&&W(u.prototype,c),p&&W(u,p),u}var I=3,y=function(c,p,l){var o={audioCapabilities:[],videoCapabilities:[]};return c.forEach(function(s){o.audioCapabilities.push({contentType:'audio/mp4; codecs="'+s+'"',robustness:l.audioRobustness||""})}),p.forEach(function(s){o.videoCapabilities.push({contentType:'video/mp4; codecs="'+s+'"',robustness:l.videoRobustness||""})}),[o]},m=function(c,p,l,o){switch(c){case K.KeySystems.WIDEVINE:return y(p,l,o);default:throw new Error("Unknown key-system: "+c)}},g=function(){function u(p){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=p,this._config=p.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var c=u.prototype;return c.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},c._registerListeners=function(){this.hls.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(G.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(G.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c._unregisterListeners=function(){this.hls.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(G.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(G.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c.getLicenseServerUrl=function(l){switch(l){case K.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+l+'"')},c._attemptKeySystemAccess=function(l,o,s){var a=this,A=m(l,o,s,this._drmSystemOptions);N.logger.log("Requesting encrypted media key-system access");var S=this.requestMediaKeySystemAccess(l,A);this.mediaKeysPromise=S.then(function(C){return a._onMediaKeySystemAccessObtained(l,C)}),S.catch(function(C){N.logger.error('Failed to obtain key-system "'+l+'" access:',C)})},c._onMediaKeySystemAccessObtained=function(l,o){var s=this;N.logger.log('Access for key-system "'+l+'" obtained');var a={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:o,mediaKeySystemDomain:l};this._mediaKeysList.push(a);var A=Promise.resolve().then(function(){return o.createMediaKeys()}).then(function(S){return a.mediaKeys=S,N.logger.log('Media-keys created for key-system "'+l+'"'),s._onMediaKeysCreated(),S});return A.catch(function(S){N.logger.error("Failed to create media-keys:",S)}),A},c._onMediaKeysCreated=function(){var l=this;this._mediaKeysList.forEach(function(o){o.mediaKeysSession||(o.mediaKeysSession=o.mediaKeys.createSession(),l._onNewMediaKeySession(o.mediaKeysSession))})},c._onNewMediaKeySession=function(l){var o=this;N.logger.log("New key-system session "+l.sessionId),l.addEventListener("message",function(s){o._onKeySessionMessage(l,s.message)},!1)},c._onKeySessionMessage=function(l,o){N.logger.log("Got EME message event, creating license request"),this._requestLicense(o,function(s){N.logger.log("Received license data (length: "+(s&&s.byteLength)+"), updating key-session"),l.update(s)})},c.onMediaEncrypted=function(l){var o=this;if(N.logger.log('Media is encrypted using "'+l.initDataType+'" init data type'),!this.mediaKeysPromise){N.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var s=function(A){if(!o._media)return;o._attemptSetMediaKeys(A),o._generateRequestWithPreferredKeySession(l.initDataType,l.initData)};this.mediaKeysPromise.then(s).catch(s)},c._attemptSetMediaKeys=function(l){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var o=this._mediaKeysList[0];if(!o||!o.mediaKeys){N.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}N.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(o.mediaKeys),this._hasSetMediaKeys=!0}},c._generateRequestWithPreferredKeySession=function(l,o){var s=this,a=this._mediaKeysList[0];if(!a){N.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(a.mediaKeysSessionInitialized){N.logger.warn("Key-Session already initialized but requested again");return}var A=a.mediaKeysSession;if(!A){N.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!o){N.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}N.logger.log('Generating key-session request for "'+l+'" init data type'),a.mediaKeysSessionInitialized=!0,A.generateRequest(l,o).then(function(){N.logger.debug("Key-session generation succeeded")}).catch(function(S){N.logger.error("Error generating key-session request:",S),s.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},c._createLicenseXhr=function(l,o,s){var a=new XMLHttpRequest;a.responseType="arraybuffer",a.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,a,l,o,s);var A=this._licenseXhrSetup;if(A)try{A.call(this.hls,a,l),A=void 0}catch(S){N.logger.error(S)}try{a.readyState||a.open("POST",l,!0),A&&A.call(this.hls,a,l)}catch(S){throw new Error("issue setting up KeySystem license XHR "+S)}return a},c._onLicenseRequestReadyStageChange=function(l,o,s,a){switch(l.readyState){case 4:if(l.status===200){this._requestLicenseFailureCount=0,N.logger.log("License request succeeded");var A=l.response,S=this._licenseResponseCallback;if(S)try{A=S.call(this.hls,l,o)}catch(L){N.logger.error(L)}a(A)}else{if(N.logger.error("License Request XHR failed ("+o+"). Status: "+l.status+" ("+l.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>I){this.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var C=I-this._requestLicenseFailureCount+1;N.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(s,a)}break}},c._generateLicenseRequestChallenge=function(l,o){switch(l.mediaKeySystemDomain){case K.KeySystems.WIDEVINE:return o}throw new Error("unsupported key-system: "+l.mediaKeySystemDomain)},c._requestLicense=function(l,o){N.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){N.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var a=this.getLicenseServerUrl(s.mediaKeySystemDomain),A=this._createLicenseXhr(a,l,o);N.logger.log("Sending license request to URL: "+a);var S=this._generateLicenseRequestChallenge(s,l);A.send(S)}catch(C){N.logger.error("Failure requesting DRM license: "+C),this.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.KEY_SYSTEM_ERROR,details:b.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(l,o){if(!this._emeEnabled)return;var s=o.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},c.onMediaDetached=function(){var l=this._media,o=this._mediaKeysList;if(!l)return;l.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(o.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return l.setMediaKeys(null)}).catch(function(){})},c.onManifestParsed=function(l,o){if(!this._emeEnabled)return;var s=o.levels.map(function(A){return A.audioCodec}).filter(function(A){return!!A}),a=o.levels.map(function(A){return A.videoCodec}).filter(function(A){return!!A});this._attemptKeySystemAccess(K.KeySystems.WIDEVINE,s,a)},n(u,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),u}();X.default=g},"./src/controller/fps-controller.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/events.ts"),b=k("./src/utils/logger.ts"),N=function(){function K(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 W=K.prototype;return W.setStreamController=function(I){this.streamController=I},W.registerListeners=function(){this.hls.on(G.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},W.unregisterListeners=function(){this.hls.off(G.Events.MEDIA_ATTACHING,this.onMediaAttaching)},W.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},W.onMediaAttaching=function(I,y){var m=this.hls.config;if(m.capLevelOnFPSDrop){var g=y.media instanceof self.HTMLVideoElement?y.media:null;this.media=g,g&&typeof g.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),m.fpsDroppedMonitoringPeriod)}},W.checkFPS=function(I,y,m){var g=performance.now();if(y){if(this.lastTime){var u=g-this.lastTime,c=m-this.lastDroppedFrames,p=y-this.lastDecodedFrames,l=1e3*c/u,o=this.hls;if(o.trigger(G.Events.FPS_DROP,{currentDropped:c,currentDecoded:p,totalDroppedFrames:m}),l>0&&c>o.config.fpsDroppedMonitoringThreshold*p){var s=o.currentLevel;b.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(o.autoLevelCapping===-1||o.autoLevelCapping>=s)&&(s=s-1,o.trigger(G.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:o.currentLevel}),o.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=g,this.lastDroppedFrames=m,this.lastDecodedFrames=y}},W.checkFPSInterval=function(){var I=this.media;if(I)if(this.isVideoPlaybackQualityAvailable){var y=I.getVideoPlaybackQuality();this.checkFPS(I,y.totalVideoFrames,y.droppedVideoFrames)}else this.checkFPS(I,I.webkitDecodedFrameCount,I.webkitDroppedFrameCount)},K}();X.default=N},"./src/controller/fragment-finders.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"findFragmentByPDT",function(){return N}),k.d(X,"findFragmentByPTS",function(){return K}),k.d(X,"fragmentWithinToleranceTest",function(){return W}),k.d(X,"pdtWithinToleranceTest",function(){return n}),k.d(X,"findFragWithCC",function(){return I});var G=k("./src/polyfills/number.ts"),b=k("./src/utils/binary-search.ts");function N(y,m,g){if(m===null||!Array.isArray(y)||!y.length||!Object(G.isFiniteNumber)(m))return null;var u=y[0].programDateTime;if(m<(u||0))return null;var c=y[y.length-1].endProgramDateTime;if(m>=(c||0))return null;g=g||0;for(var p=0;p<y.length;++p){var l=y[p];if(n(m,g,l))return l}return null}function K(y,m,g,u){g===void 0&&(g=0),u===void 0&&(u=0);var c=null;if(y?c=m[y.sn-m[0].sn+1]||null:g===0&&m[0].start===0&&(c=m[0]),c&&W(g,u,c)===0)return c;var p=b.default.search(m,W.bind(null,g,u));return p||c}function W(y,m,g){y===void 0&&(y=0),m===void 0&&(m=0);var u=Math.min(m,g.duration+(g.deltaPTS?g.deltaPTS:0));return g.start+g.duration-u<=y?1:g.start-u>y&&g.start?-1:0}function n(y,m,g){var u=Math.min(m,g.duration+(g.deltaPTS?g.deltaPTS:0))*1e3,c=g.endProgramDateTime||0;return c-u>y}function I(y,m){return b.default.search(y,function(g){return g.cc<m?1:g.cc>m?-1:0})}},"./src/controller/fragment-tracker.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"FragmentState",function(){return N}),k.d(X,"FragmentTracker",function(){return K});var G=k("./src/events.ts"),b=k("./src/types/loader.ts"),N;(function(I){I.NOT_LOADED="NOT_LOADED",I.BACKTRACKED="BACKTRACKED",I.APPENDING="APPENDING",I.PARTIAL="PARTIAL",I.OK="OK"})(N||(N={}));var K=function(){function I(m){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=m,this._registerListeners()}var y=I.prototype;return y._registerListeners=function(){var g=this.hls;g.on(G.Events.BUFFER_APPENDED,this.onBufferAppended,this),g.on(G.Events.FRAG_BUFFERED,this.onFragBuffered,this),g.on(G.Events.FRAG_LOADED,this.onFragLoaded,this)},y._unregisterListeners=function(){var g=this.hls;g.off(G.Events.BUFFER_APPENDED,this.onBufferAppended,this),g.off(G.Events.FRAG_BUFFERED,this.onFragBuffered,this),g.off(G.Events.FRAG_LOADED,this.onFragLoaded,this)},y.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},y.getAppendedFrag=function(g,u){if(u===b.PlaylistLevelType.MAIN){var c=this.activeFragment,p=this.activeParts;if(!c)return null;if(p)for(var l=p.length;l--;){var o=p[l],s=o?o.end:c.appendedPTS;if(o.start<=g&&s!==void 0&&g<=s)return l>9&&(this.activeParts=p.slice(l-9)),o}else if(c.start<=g&&c.appendedPTS!==void 0&&g<=c.appendedPTS)return c}return this.getBufferedFrag(g,u)},y.getBufferedFrag=function(g,u){for(var c=this.fragments,p=Object.keys(c),l=p.length;l--;){var o=c[p[l]];if((o==null?void 0:o.body.type)===u&&o.buffered){var s=o.body;if(s.start<=g&&g<=s.end)return s}}return null},y.detectEvictedFragments=function(g,u,c){var p=this;Object.keys(this.fragments).forEach(function(l){var o=p.fragments[l];if(!o)return;if(!o.buffered){o.body.type===c&&p.removeFragment(o.body);return}var s=o.range[g];if(!s)return;s.time.some(function(a){var A=!p.isTimeBuffered(a.startPTS,a.endPTS,u);return A&&p.removeFragment(o.body),A})})},y.detectPartialFragments=function(g){var u=this,c=this.timeRanges,p=g.frag,l=g.part;if(!c||p.sn==="initSegment")return;var o=n(p),s=this.fragments[o];if(!s)return;Object.keys(c).forEach(function(a){var A=p.elementaryStreams[a];if(!A)return;var S=c[a],C=l!==null||A.partial===!0;s.range[a]=u.getBufferedTimes(p,l,C,S)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},y.fragBuffered=function(g){var u=n(g),c=this.fragments[u];c&&(c.backtrack=c.loaded=null,c.buffered=!0)},y.getBufferedTimes=function(g,u,c,p){for(var l={time:[],partial:c},o=u?u.start:g.start,s=u?u.end:g.end,a=g.minEndPTS||s,A=g.maxStartPTS||o,S=0;S<p.length;S++){var C=p.start(S)-this.bufferPadding,L=p.end(S)+this.bufferPadding;if(A>=C&&a<=L){l.time.push({startPTS:Math.max(o,p.start(S)),endPTS:Math.min(s,p.end(S))});break}else if(o<L&&s>C)l.partial=!0,l.time.push({startPTS:Math.max(o,p.start(S)),endPTS:Math.min(s,p.end(S))});else if(s<=C)break}return l},y.getPartialFragment=function(g){var u=null,c,p,l,o=0,s=this.bufferPadding,a=this.fragments;return Object.keys(a).forEach(function(A){var S=a[A];if(!S)return;W(S)&&(p=S.body.start-s,l=S.body.end+s,g>=p&&g<=l&&(c=Math.min(g-p,l-g),o<=c&&(u=S.body,o=c)))}),u},y.getState=function(g){var u=n(g),c=this.fragments[u];return c?c.buffered?W(c)?N.PARTIAL:N.OK:c.backtrack?N.BACKTRACKED:N.APPENDING:N.NOT_LOADED},y.backtrack=function(g,u){var c=n(g),p=this.fragments[c];if(!p||p.backtrack)return null;var l=p.backtrack=u||p.loaded;return p.loaded=null,l},y.getBacktrackData=function(g){var u=n(g),c=this.fragments[u];if(c){var p,l=c.backtrack;if(l!=null&&(p=l.payload)!==null&&p!==void 0&&p.byteLength)return l;this.removeFragment(g)}return null},y.isTimeBuffered=function(g,u,c){for(var p,l,o=0;o<c.length;o++){if(p=c.start(o)-this.bufferPadding,l=c.end(o)+this.bufferPadding,g>=p&&u<=l)return!0;if(u<=p)return!1}return!1},y.onFragLoaded=function(g,u){var c=u.frag,p=u.part;if(c.sn==="initSegment"||c.bitrateTest||p)return;var l=n(c);this.fragments[l]={body:c,loaded:u,backtrack:null,buffered:!1,range:Object.create(null)}},y.onBufferAppended=function(g,u){var c=this,p=u.frag,l=u.part,o=u.timeRanges;if(p.type===b.PlaylistLevelType.MAIN)if(this.activeFragment=p,l){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(l)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach(function(a){var A=o[a];if(c.detectEvictedFragments(a,A),!l)for(var S=0;S<A.length;S++)p.appendedPTS=Math.max(A.end(S),p.appendedPTS||0)})},y.onFragBuffered=function(g,u){this.detectPartialFragments(u)},y.hasFragment=function(g){var u=n(g);return!!this.fragments[u]},y.removeFragmentsInRange=function(g,u,c){var p=this;Object.keys(this.fragments).forEach(function(l){var o=p.fragments[l];if(!o)return;if(o.buffered){var s=o.body;s.type===c&&s.start<u&&s.end>g&&p.removeFragment(s)}})},y.removeFragment=function(g){var u=n(g);g.stats.loaded=0,g.clearElementaryStreamInfo(),delete this.fragments[u]},y.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},I}();function W(I){var y,m;return I.buffered&&(((y=I.range.video)===null||y===void 0?void 0:y.partial)||((m=I.range.audio)===null||m===void 0?void 0:m.partial))}function n(I){return I.type+"_"+I.level+"_"+I.urlId+"_"+I.sn}},"./src/controller/gap-controller.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"STALL_MINIMUM_DURATION_MS",function(){return W}),k.d(X,"MAX_START_GAP_JUMP",function(){return n}),k.d(X,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return I}),k.d(X,"SKIP_BUFFER_RANGE_START",function(){return y}),k.d(X,"default",function(){return m});var G=k("./src/utils/buffer-helper.ts"),b=k("./src/errors.ts"),N=k("./src/events.ts"),K=k("./src/utils/logger.ts"),W=250,n=2,I=.1,y=.05,m=function(){function g(c,p,l,o){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=c,this.media=p,this.fragmentTracker=l,this.hls=o}var u=g.prototype;return u.destroy=function(){this.hls=this.fragmentTracker=this.media=null},u.poll=function(p){var l=this.config,o=this.media,s=this.stalled,a=o.currentTime,A=o.seeking,S=this.seeking&&!A,C=!this.seeking&&A;if(this.seeking=A,a!==p){if(this.moved=!0,s!==null){if(this.stallReported){var L=self.performance.now()-s;K.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(L)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((C||S)&&(this.stalled=null),o.paused||o.ended||o.playbackRate===0||!G.BufferHelper.getBuffered(o).length)return;var D=G.BufferHelper.bufferInfo(o,a,0),O=D.len>0,w=D.nextStart||0;if(!O&&!w)return;if(A){var x=D.len>n,d=!w||w-a>n&&!this.fragmentTracker.getPartialFragment(a);if(x||d)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var E,f=Math.max(w,D.start||0)-a,v=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,T=v==null||((E=v.details)===null||E===void 0)?void 0:E.live,B=T?v.details.targetduration*2:n;if(f>0&&f<=B){this._trySkipBufferHole(null);return}}var R=self.performance.now();if(s===null){this.stalled=R;return}var j=R-s;!A&&j>=W&&this._reportStall(D.len);var U=G.BufferHelper.bufferInfo(o,a,l.maxBufferHole);this._tryFixBufferStall(U,j)},u._tryFixBufferStall=function(p,l){var o=this.config,s=this.fragmentTracker,a=this.media,A=a.currentTime,S=s.getPartialFragment(A);if(S){var C=this._trySkipBufferHole(S);if(C)return}p.len>o.maxBufferHole&&l>o.highBufferWatchdogPeriod*1e3&&(K.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},u._reportStall=function(p){var l=this.hls,o=this.media,s=this.stallReported;s||(this.stallReported=!0,K.logger.warn("Playback stalling at @"+o.currentTime+" due to low buffer (buffer="+p+")"),l.trigger(N.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:p}))},u._trySkipBufferHole=function(p){for(var l=this.config,o=this.hls,s=this.media,a=s.currentTime,A=0,S=G.BufferHelper.getBuffered(s),C=0;C<S.length;C++){var L=S.start(C);if(a+l.maxBufferHole>=A&&a<L){var D=Math.max(L+y,s.currentTime+I);return K.logger.warn("skipping hole, adjusting currentTime from "+a+" to "+D),this.moved=!0,this.stalled=null,s.currentTime=D,p&&o.trigger(N.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+a+" to "+D,frag:p}),D}A=S.end(C)}return 0},u._tryNudgeBuffer=function(){var p=this.config,l=this.hls,o=this.media,s=o.currentTime,a=(this.nudgeRetry||0)+1;if(this.nudgeRetry=a,a<p.nudgeMaxRetry){var A=s+a*p.nudgeOffset;K.logger.warn("Nudging 'currentTime' from "+s+" to "+A),o.currentTime=A,l.trigger(N.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else K.logger.error("Playhead still not moving while enough data buffered @"+s+" after "+p.nudgeMaxRetry+" nudges"),l.trigger(N.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},g}()},"./src/controller/id3-track-controller.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/events.ts"),b=k("./src/utils/texttrack-utils.ts"),N=k("./src/demux/id3.ts"),K=.25,W=function(){function n(y){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=y,this._registerListeners()}var I=n.prototype;return I.destroy=function(){this._unregisterListeners()},I._registerListeners=function(){var m=this.hls;m.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.on(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.on(G.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),m.on(G.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},I._unregisterListeners=function(){var m=this.hls;m.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.off(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.off(G.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),m.off(G.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},I.onMediaAttached=function(m,g){this.media=g.media},I.onMediaDetaching=function(){if(!this.id3Track)return;Object(b.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},I.getID3Track=function(m){if(!this.media)return;for(var g=0;g<m.length;g++){var u=m[g];if(u.kind==="metadata"&&u.label==="id3")return Object(b.sendAddTrackEvent)(u,this.media),u}return this.media.addTextTrack("metadata","id3")},I.onFragParsingMetadata=function(m,g){if(!this.media)return;var u=g.frag,c=g.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var p=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,l=0;l<c.length;l++){var o=N.getID3Frames(c[l].data);if(o){var s=c[l].pts,a=l<c.length-1?c[l+1].pts:u.end,A=a-s;A<=0&&(a=s+K);for(var S=0;S<o.length;S++){var C=o[S];if(!N.isTimeStampFrame(C)){var L=new p(s,a,"");L.value=C,this.id3Track.addCue(L)}}}}},I.onBufferFlushing=function(m,g){var u=g.startOffset,c=g.endOffset,p=g.type;if(!p||p==="audio"){var l=this.id3Track;l&&Object(b.removeCuesInRange)(l,u,c)}},n}();X.default=W},"./src/controller/latency-controller.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return n});var G=k("./src/errors.ts"),b=k("./src/events.ts"),N=k("./src/utils/logger.ts");function K(I,y){for(var m=0;m<y.length;m++){var g=y[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(I,g.key,g)}}function W(I,y,m){return y&&K(I.prototype,y),m&&K(I,m),I}var n=function(){function I(m){var g=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 g.timeupdate()},this.hls=m,this.config=m.config,this.registerListeners()}var y=I.prototype;return y.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},y.registerListeners=function(){this.hls.on(b.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(b.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(b.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(b.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(b.Events.ERROR,this.onError,this)},y.unregisterListeners=function(){this.hls.off(b.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(b.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(b.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(b.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(b.Events.ERROR,this.onError)},y.onMediaAttached=function(g,u){this.media=u.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},y.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},y.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},y.onLevelUpdated=function(g,u){var c=u.details;this.levelDetails=c,c.advanced&&this.timeupdate(),!c.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},y.onError=function(g,u){if(u.details!==G.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,N.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},y.timeupdate=function(){var g=this.media,u=this.levelDetails;if(!g||!u)return;this.currentTime=g.currentTime;var c=this.computeLatency();if(c===null)return;this._latency=c;var p=this.config,l=p.lowLatencyMode,o=p.maxLiveSyncPlaybackRate;if(!l||o===1)return;var s=this.targetLatency;if(s===null)return;var a=c-s,A=Math.min(this.maxLatency,s+u.targetduration),S=a<A;if(u.live&&S&&a>.05&&this.forwardBufferLength>1){var C=Math.min(2,Math.max(1,o)),L=Math.round(2/(1+Math.exp(-.75*a-this.edgeStalled))*20)/20;g.playbackRate=Math.min(C,Math.max(1,L))}else g.playbackRate!==1&&g.playbackRate!==0&&(g.playbackRate=1)},y.estimateLiveEdge=function(){var g=this.levelDetails;return g===null?null:g.edge+g.age},y.computeLatency=function(){var g=this.estimateLiveEdge();return g===null?null:g-this.currentTime},W(I,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var g=this.config,u=this.levelDetails;return g.liveMaxLatencyDuration!==void 0?g.liveMaxLatencyDuration:u?g.liveMaxLatencyDurationCount*u.targetduration:0}},{key:"targetLatency",get:function(){var g=this.levelDetails;if(g===null)return null;var u=g.holdBack,c=g.partHoldBack,p=g.targetduration,l=this.config,o=l.liveSyncDuration,s=l.liveSyncDurationCount,a=l.lowLatencyMode,A=this.hls.userConfig,S=a&&c||u;(A.liveSyncDuration||A.liveSyncDurationCount||S===0)&&(S=o!==void 0?o:s*p);var C=p,L=1;return S+Math.min(this.stallCount*L,C)}},{key:"liveSyncPosition",get:function(){var g=this.estimateLiveEdge(),u=this.targetLatency,c=this.levelDetails;if(g===null||u===null||c===null)return null;var p=c.edge,l=g-u-this.edgeStalled,o=p-c.totalduration,s=p-(this.config.lowLatencyMode&&c.partTarget||c.targetduration);return Math.min(Math.max(o,l),s)}},{key:"drift",get:function(){var g=this.levelDetails;return g===null?1:g.drift}},{key:"edgeStalled",get:function(){var g=this.levelDetails;if(g===null)return 0;var u=(this.config.lowLatencyMode&&g.partTarget||g.targetduration)*3;return Math.max(g.age-u,0)}},{key:"forwardBufferLength",get:function(){var g=this.media,u=this.levelDetails;if(!g||!u)return 0;var c=g.buffered.length;return c?g.buffered.end(c-1):u.edge-this.currentTime}}]),I}()},"./src/controller/level-controller.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return l});var G=k("./src/types/level.ts"),b=k("./src/events.ts"),N=k("./src/errors.ts"),K=k("./src/utils/codecs.ts"),W=k("./src/controller/level-helper.ts"),n=k("./src/controller/base-playlist-controller.ts"),I=k("./src/types/loader.ts");function y(){return y=Object.assign||function(o){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var A in a)Object.prototype.hasOwnProperty.call(a,A)&&(o[A]=a[A])}return o},y.apply(this,arguments)}function m(o,s){for(var a=0;a<s.length;a++){var A=s[a];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(o,A.key,A)}}function g(o,s,a){return s&&m(o.prototype,s),a&&m(o,a),o}function u(o,s){o.prototype=Object.create(s.prototype),o.prototype.constructor=o,c(o,s)}function c(o,s){return c=Object.setPrototypeOf||function(A,S){return A.__proto__=S,A},c(o,s)}var p=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),l=function(o){u(s,o);function s(A){var S;return S=o.call(this,A,"[level-controller]")||this,S._levels=[],S._firstLevel=-1,S._startLevel=void 0,S.currentLevelIndex=-1,S.manualLevelIndex=-1,S.onParsedComplete=void 0,S._registerListeners(),S}var a=s.prototype;return a._registerListeners=function(){var S=this.hls;S.on(b.Events.MANIFEST_LOADED,this.onManifestLoaded,this),S.on(b.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.on(b.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.on(b.Events.FRAG_LOADED,this.onFragLoaded,this),S.on(b.Events.ERROR,this.onError,this)},a._unregisterListeners=function(){var S=this.hls;S.off(b.Events.MANIFEST_LOADED,this.onManifestLoaded,this),S.off(b.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.off(b.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.off(b.Events.FRAG_LOADED,this.onFragLoaded,this),S.off(b.Events.ERROR,this.onError,this)},a.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,o.prototype.destroy.call(this)},a.startLoad=function(){var S=this._levels;S.forEach(function(C){C.loadError=0}),o.prototype.startLoad.call(this)},a.onManifestLoaded=function(S,C){var L=[],D=[],O=[],w,x={},d,E=!1,f=!1,v=!1;if(C.levels.forEach(function(j){var U=j.attrs;E=E||!!(j.width&&j.height),f=f||!!j.videoCodec,v=v||!!j.audioCodec,p&&j.audioCodec&&j.audioCodec.indexOf("mp4a.40.34")!==-1&&(j.audioCodec=void 0);var _=j.bitrate+"-"+j.attrs.RESOLUTION+"-"+j.attrs.CODECS;d=x[_],d?d.url.push(j.url):(d=new G.Level(j),x[_]=d,L.push(d)),U&&(U.AUDIO&&Object(W.addGroupId)(d,"audio",U.AUDIO),U.SUBTITLES&&Object(W.addGroupId)(d,"text",U.SUBTITLES))}),(E||f)&&v&&(L=L.filter(function(j){var U=j.videoCodec,_=j.width,J=j.height;return!!U||!!(_&&J)})),L=L.filter(function(j){var U=j.audioCodec,_=j.videoCodec;return(!U||Object(K.isCodecSupportedInMp4)(U,"audio"))&&(!_||Object(K.isCodecSupportedInMp4)(_,"video"))}),C.audioTracks&&(D=C.audioTracks.filter(function(j){return!j.audioCodec||Object(K.isCodecSupportedInMp4)(j.audioCodec,"audio")}),Object(W.assignTrackIdsByGroup)(D)),C.subtitles&&(O=C.subtitles,Object(W.assignTrackIdsByGroup)(O)),L.length>0){w=L[0].bitrate,L.sort(function(j,U){return j.bitrate-U.bitrate}),this._levels=L;for(var T=0;T<L.length;T++)if(L[T].bitrate===w){this._firstLevel=T,this.log("manifest loaded, "+L.length+" level(s) found, first bitrate: "+w);break}var B=v&&!f,R={levels:L,audioTracks:D,subtitleTracks:O,firstLevel:this._firstLevel,stats:C.stats,audio:v,video:f,altAudio:!B&&D.some(function(j){return!!j.url})};this.hls.trigger(b.Events.MANIFEST_PARSED,R),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(b.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:C.url,reason:"no level with compatible codecs found in manifest"})},a.onError=function(S,C){if(o.prototype.onError.call(this,S,C),C.fatal)return;var L=C.context,D=this._levels[this.currentLevelIndex];if(L&&(L.type===I.PlaylistContextType.AUDIO_TRACK&&D.audioGroupIds&&L.groupId===D.audioGroupIds[D.urlId]||L.type===I.PlaylistContextType.SUBTITLE_TRACK&&D.textGroupIds&&L.groupId===D.textGroupIds[D.urlId])){this.redundantFailover(this.currentLevelIndex);return}var O=!1,w=!0,x;switch(C.details){case N.ErrorDetails.FRAG_LOAD_ERROR:case N.ErrorDetails.FRAG_LOAD_TIMEOUT:case N.ErrorDetails.KEY_LOAD_ERROR:case N.ErrorDetails.KEY_LOAD_TIMEOUT:if(C.frag){var d=this._levels[C.frag.level];d?(d.fragmentError++,d.fragmentError>this.hls.config.fragLoadingMaxRetry&&(x=C.frag.level)):x=C.frag.level}break;case N.ErrorDetails.LEVEL_LOAD_ERROR:case N.ErrorDetails.LEVEL_LOAD_TIMEOUT:L&&(L.deliveryDirectives&&(w=!1),x=L.level),O=!0;break;case N.ErrorDetails.REMUX_ALLOC_ERROR:x=C.level,O=!0;break}x!==void 0&&this.recoverLevel(C,x,O,w)},a.recoverLevel=function(S,C,L,D){var O=S.details,w=this._levels[C];if(w.loadError++,L){var x=this.retryLoadingOrFail(S);if(x)S.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(D){var d=w.url.length;if(d>1&&w.loadError<d)S.levelRetry=!0,this.redundantFailover(C);else if(this.manualLevelIndex===-1){var E=C===0?this._levels.length-1:C-1;this.currentLevelIndex!==E&&this._levels[E].loadError===0&&(this.warn(O+": switch to "+E),S.levelRetry=!0,this.hls.nextAutoLevel=E)}}},a.redundantFailover=function(S){var C=this._levels[S],L=C.url.length;if(L>1){var D=(C.urlId+1)%L;this.warn("Switching to redundant URL-id "+D),this._levels.forEach(function(O){O.urlId=D}),this.level=S}},a.onFragLoaded=function(S,C){var L=C.frag;if(L!==void 0&&L.type===I.PlaylistLevelType.MAIN){var D=this._levels[L.level];D!==void 0&&(D.fragmentError=0,D.loadError=0)}},a.onLevelLoaded=function(S,C){var L,D=C.level,O=C.details,w=this._levels[D];if(!w){var x;this.warn("Invalid level index "+D),(x=C.deliveryDirectives)!==null&&x!==void 0&&x.skip&&(O.deltaUpdateFailed=!0);return}D===this.currentLevelIndex?(w.fragmentError===0&&(w.loadError=0,this.retryCount=0),this.playlistLoaded(D,C,w.details)):(L=C.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(O.deltaUpdateFailed=!0)},a.onAudioTrackSwitched=function(S,C){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var D=-1,O=this.hls.audioTracks[C.id].groupId,w=0;w<L.audioGroupIds.length;w++)if(L.audioGroupIds[w]===O){D=w;break}D!==L.urlId&&(L.urlId=D,this.startLoad())}},a.loadPlaylist=function(S){var C=this.currentLevelIndex,L=this._levels[C];if(this.canLoad&&L&&L.url.length>0){var D=L.urlId,O=L.url[D];if(S)try{O=S.addDirectives(O)}catch(w){this.warn("Could not construct new URL with HLS Delivery Directives: "+w)}this.log("Attempt loading level index "+C+(S?" at sn "+S.msn+" part "+S.part:"")+" with URL-id "+D+" "+O),this.clearTimer(),this.hls.trigger(b.Events.LEVEL_LOADING,{url:O,level:C,id:D,deliveryDirectives:S||null})}},a.removeLevel=function(S,C){var L=function(w,x){return x!==C},D=this._levels.filter(function(O,w){return w!==S?!0:O.url.length>1&&C!==void 0?(O.url=O.url.filter(L),O.audioGroupIds&&(O.audioGroupIds=O.audioGroupIds.filter(L)),O.textGroupIds&&(O.textGroupIds=O.textGroupIds.filter(L)),O.urlId=0,!0):!1}).map(function(O,w){var x=O.details;return x!=null&&x.fragments&&x.fragments.forEach(function(d){d.level=w}),O});this._levels=D,this.hls.trigger(b.Events.LEVELS_UPDATED,{levels:D})},g(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(S){var C,L=this._levels;if(L.length===0)return;if(this.currentLevelIndex===S&&(C=L[S])!==null&&C!==void 0&&C.details)return;if(S<0||S>=L.length){var D=S<0;if(this.hls.trigger(b.Events.ERROR,{type:N.ErrorTypes.OTHER_ERROR,details:N.ErrorDetails.LEVEL_SWITCH_ERROR,level:S,fatal:D,reason:"invalid level idx"}),D)return;S=Math.min(S,L.length-1)}this.clearTimer();var O=this.currentLevelIndex,w=L[O],x=L[S];this.log("switching to level "+S+" from "+O),this.currentLevelIndex=S;var d=y({},x,{level:S,maxBitrate:x.maxBitrate,uri:x.uri,urlId:x.urlId});delete d._urlId,this.hls.trigger(b.Events.LEVEL_SWITCHING,d);var E=x.details;if(!E||E.live){var f=this.switchParams(x.uri,w==null?void 0:w.details);this.loadPlaylist(f)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(S){this.manualLevelIndex=S,this._startLevel===void 0&&(this._startLevel=S),S!==-1&&(this.level=S)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(S){this._firstLevel=S}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var S=this.hls.config.startLevel;return S!==void 0?S:this._firstLevel}else return this._startLevel},set:function(S){this._startLevel=S}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(S){this.level=S,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=S)}}]),s}(n.default)},"./src/controller/level-helper.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"addGroupId",function(){return N}),k.d(X,"assignTrackIdsByGroup",function(){return K}),k.d(X,"updatePTS",function(){return W}),k.d(X,"updateFragPTSDTS",function(){return I}),k.d(X,"mergeDetails",function(){return y}),k.d(X,"mapPartIntersection",function(){return m}),k.d(X,"mapFragmentIntersection",function(){return g}),k.d(X,"adjustSliding",function(){return u}),k.d(X,"addSliding",function(){return c}),k.d(X,"computeReloadInterval",function(){return p}),k.d(X,"getFragmentWithSN",function(){return l}),k.d(X,"getPartWith",function(){return o});var G=k("./src/polyfills/number.ts"),b=k("./src/utils/logger.ts");function N(s,a,A){switch(a){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(A);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(A);break}}function K(s){var a={};s.forEach(function(A){var S=A.groupId||"";A.id=a[S]=a[S]||0,a[S]++})}function W(s,a,A){var S=s[a],C=s[A];n(S,C)}function n(s,a){var A=a.startPTS;if(Object(G.isFiniteNumber)(A)){var S=0,C;a.sn>s.sn?(S=A-s.start,C=s):(S=s.start-A,C=a),C.duration!==S&&(C.duration=S)}else if(a.sn>s.sn){var L=s.cc===a.cc;L&&s.minEndPTS?a.start=s.start+(s.minEndPTS-s.start):a.start=s.start+s.duration}else a.start=Math.max(s.start-a.duration,0)}function I(s,a,A,S,C,L){var D=S-A;D<=0&&(b.logger.warn("Fragment should have a positive duration",a),S=A+a.duration,L=C+a.duration);var O=A,w=S,x=a.startPTS,d=a.endPTS;if(Object(G.isFiniteNumber)(x)){var E=Math.abs(x-A);Object(G.isFiniteNumber)(a.deltaPTS)?a.deltaPTS=Math.max(E,a.deltaPTS):a.deltaPTS=E,O=Math.max(A,x),A=Math.min(A,x),C=Math.min(C,a.startDTS),w=Math.min(S,d),S=Math.max(S,d),L=Math.max(L,a.endDTS)}a.duration=S-A;var f=A-a.start;a.appendedPTS=S,a.start=a.startPTS=A,a.maxStartPTS=O,a.startDTS=C,a.endPTS=S,a.minEndPTS=w,a.endDTS=L;var v=a.sn;if(!s||v<s.startSN||v>s.endSN)return 0;var T,B=v-s.startSN,R=s.fragments;for(R[B]=a,T=B;T>0;T--)n(R[T],R[T-1]);for(T=B;T<R.length-1;T++)n(R[T],R[T+1]);return s.fragmentHint&&n(R[R.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,f}function y(s,a){for(var A=null,S=s.fragments,C=S.length-1;C>=0;C--){var L=S[C].initSegment;if(L){A=L;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var D=0,O;if(g(s,a,function(T,B){T.relurl&&(D=T.cc-B.cc),Object(G.isFiniteNumber)(T.startPTS)&&Object(G.isFiniteNumber)(T.endPTS)&&(B.start=B.startPTS=T.startPTS,B.startDTS=T.startDTS,B.appendedPTS=T.appendedPTS,B.maxStartPTS=T.maxStartPTS,B.endPTS=T.endPTS,B.endDTS=T.endDTS,B.minEndPTS=T.minEndPTS,B.duration=T.endPTS-T.startPTS,B.duration&&(O=B),a.PTSKnown=a.alignedSliding=!0),B.elementaryStreams=T.elementaryStreams,B.loader=T.loader,B.stats=T.stats,B.urlId=T.urlId,T.initSegment&&(B.initSegment=T.initSegment,A=T.initSegment)}),A){var w=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;w.forEach(function(T){var B;(!T.initSegment||T.initSegment.relurl===((B=A)===null||B===void 0?void 0:B.relurl))&&(T.initSegment=A)})}if(a.skippedSegments&&(a.deltaUpdateFailed=a.fragments.some(function(T){return!T}),a.deltaUpdateFailed)){b.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var x=a.skippedSegments;x--;)a.fragments.shift();a.startSN=a.fragments[0].sn,a.startCC=a.fragments[0].cc}var d=a.fragments;if(D){b.logger.warn("discontinuity sliding from playlist, take drift into account");for(var E=0;E<d.length;E++)d[E].cc+=D}a.skippedSegments&&(a.startCC=a.fragments[0].cc),m(s.partList,a.partList,function(T,B){B.elementaryStreams=T.elementaryStreams,B.stats=T.stats}),O?I(a,O,O.startPTS,O.endPTS,O.startDTS,O.endDTS):u(s,a),d.length&&(a.totalduration=a.edge-d[0].start),a.driftStartTime=s.driftStartTime,a.driftStart=s.driftStart;var f=a.advancedDateTime;if(a.advanced&&f){var v=a.edge;a.driftStart||(a.driftStartTime=f,a.driftStart=v),a.driftEndTime=f,a.driftEnd=v}else a.driftEndTime=s.driftEndTime,a.driftEnd=s.driftEnd,a.advancedDateTime=s.advancedDateTime}function m(s,a,A){if(s&&a)for(var S=0,C=0,L=s.length;C<=L;C++){var D=s[C],O=a[C+S];D&&O&&D.index===O.index&&D.fragment.sn===O.fragment.sn?A(D,O):S--}}function g(s,a,A){for(var S=a.skippedSegments,C=Math.max(s.startSN,a.startSN)-a.startSN,L=(s.fragmentHint?1:0)+(S?a.endSN:Math.min(s.endSN,a.endSN))-a.startSN,D=a.startSN-s.startSN,O=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments,w=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,x=C;x<=L;x++){var d=w[D+x],E=O[x];S&&!E&&x<S&&(E=a.fragments[x]=d),d&&E&&A(d,E)}}function u(s,a){var A=a.startSN+a.skippedSegments-s.startSN,S=s.fragments;if(A<0||A>=S.length)return;c(a,S[A].start)}function c(s,a){if(a){for(var A=s.fragments,S=s.skippedSegments;S<A.length;S++)A[S].start+=a;s.fragmentHint&&(s.fragmentHint.start+=a)}}function p(s,a){var A=1e3*s.levelTargetDuration,S=A/2,C=s.age,L=C>0&&C<A*3,D=a.loading.end-a.loading.start,O,w=s.availabilityDelay;if(s.updated===!1)if(L){var x=333*s.misses;O=Math.max(Math.min(S,D*2),x),s.availabilityDelay=(s.availabilityDelay||0)+O}else O=S;else L?(w=Math.min(w||A/2,C),s.availabilityDelay=w,O=w+A-C):O=A-D;return Math.round(O)}function l(s,a,A){if(!s||!s.details)return null;var S=s.details,C=S.fragments[a-S.startSN];return C||(C=S.fragmentHint,C&&C.sn===a?C:a<S.startSN&&A&&A.sn===a?A:null)}function o(s,a,A){if(!s||!s.details)return null;var S=s.details.partList;if(S)for(var C=S.length;C--;){var L=S[C];if(L.index===A&&L.fragment.sn===a)return L}return null}},"./src/controller/stream-controller.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return S});var G=k("./src/polyfills/number.ts"),b=k("./src/controller/base-stream-controller.ts"),N=k("./src/is-supported.ts"),K=k("./src/events.ts"),W=k("./src/utils/buffer-helper.ts"),n=k("./src/controller/fragment-tracker.ts"),I=k("./src/types/loader.ts"),y=k("./src/loader/fragment.ts"),m=k("./src/demux/transmuxer-interface.ts"),g=k("./src/types/transmuxer.ts"),u=k("./src/controller/gap-controller.ts"),c=k("./src/errors.ts"),p=k("./src/utils/logger.ts");function l(C,L){for(var D=0;D<L.length;D++){var O=L[D];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(C,O.key,O)}}function o(C,L,D){return L&&l(C.prototype,L),D&&l(C,D),C}function s(C,L){C.prototype=Object.create(L.prototype),C.prototype.constructor=C,a(C,L)}function a(C,L){return a=Object.setPrototypeOf||function(O,w){return O.__proto__=w,O},a(C,L)}var A=100,S=function(C){s(L,C);function L(O,w){var x;return x=C.call(this,O,w,"[stream-controller]")||this,x.audioCodecSwap=!1,x.gapController=null,x.level=-1,x._forceStartLoad=!1,x.altAudio=!1,x.audioOnly=!1,x.fragPlaying=null,x.onvplaying=null,x.onvseeked=null,x.fragLastKbps=0,x.stalled=!1,x.couldBacktrack=!1,x.audioCodecSwitch=!1,x.videoBuffer=null,x._registerListeners(),x}var D=L.prototype;return D._registerListeners=function(){var w=this.hls;w.on(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.on(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.on(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.on(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),w.on(K.Events.LEVEL_LOADING,this.onLevelLoading,this),w.on(K.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(K.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),w.on(K.Events.ERROR,this.onError,this),w.on(K.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),w.on(K.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),w.on(K.Events.BUFFER_CREATED,this.onBufferCreated,this),w.on(K.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),w.on(K.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),w.on(K.Events.FRAG_BUFFERED,this.onFragBuffered,this)},D._unregisterListeners=function(){var w=this.hls;w.off(K.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.off(K.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.off(K.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.off(K.Events.MANIFEST_PARSED,this.onManifestParsed,this),w.off(K.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(K.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),w.off(K.Events.ERROR,this.onError,this),w.off(K.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),w.off(K.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),w.off(K.Events.BUFFER_CREATED,this.onBufferCreated,this),w.off(K.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),w.off(K.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),w.off(K.Events.FRAG_BUFFERED,this.onFragBuffered,this)},D.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},D.startLoad=function(w){if(this.levels){var x=this.lastCurrentTime,d=this.hls;if(this.stopLoad(),this.setInterval(A),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var E=d.startLevel;E===-1&&(d.config.testBandwidth?(E=0,this.bitrateTest=!0):E=d.nextAutoLevel),this.level=d.nextLoadLevel=E,this.loadedmetadata=!1}x>0&&w===-1&&(this.log("Override startPosition with lastCurrentTime @"+x.toFixed(3)),w=x),this.state=b.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=w,this.tick()}else this._forceStartLoad=!0,this.state=b.State.STOPPED},D.stopLoad=function(){this._forceStartLoad=!1,C.prototype.stopLoad.call(this)},D.doTick=function(){switch(this.state){case b.State.IDLE:this.doTickIdle();break;case b.State.WAITING_LEVEL:{var w,x=this.levels,d=this.level,E=x==null||((w=x[d])===null||w===void 0)?void 0:w.details;if(E&&(!E.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(E))break;this.state=b.State.IDLE;break}break}case b.State.FRAG_LOADING_WAITING_RETRY:{var f,v=self.performance.now(),T=this.retryDate;(!T||v>=T||(f=this.media)!==null&&f!==void 0&&f.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=b.State.IDLE)}break;default:break}this.onTickEnd()},D.onTickEnd=function(){C.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},D.doTickIdle=function(){var w,x,d=this.hls,E=this.levelLastLoaded,f=this.levels,v=this.media,T=d.config,B=d.nextLoadLevel;if(E===null||!v&&(this.startFragRequested||!T.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!f||!f[B])return;var R=f[B];this.level=d.nextLoadLevel=B;var j=R.details;if(!j||this.state===b.State.WAITING_LEVEL||j.live&&this.levelLastLoaded!==B){this.state=b.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:v,I.PlaylistLevelType.MAIN);if(U===null)return;var _=U.len,J=this.getMaxBufferLength(R.maxBitrate);if(_>=J)return;if(this._streamEnded(U,j)){var ne={};this.altAudio&&(ne.type="video"),this.hls.trigger(K.Events.BUFFER_EOS,ne),this.state=b.State.ENDED;return}var he=U.end,be=this.getNextFragment(he,j);if(this.couldBacktrack&&!this.fragPrevious&&be&&be.sn!=="initSegment"){var Ke=be.sn-j.startSN;Ke>1&&(be=j.fragments[Ke-1],this.fragmentTracker.removeFragment(be))}if(be&&this.fragmentTracker.getState(be)===n.FragmentState.OK&&this.nextLoadPosition>he){var De=this.audioOnly&&!this.altAudio?y.ElementaryStreamTypes.AUDIO:y.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(v,De,I.PlaylistLevelType.MAIN),be=this.getNextFragment(this.nextLoadPosition,j)}if(!be)return;be.initSegment&&!be.initSegment.data&&!this.bitrateTest&&(be=be.initSegment),((w=be.decryptdata)===null||w===void 0?void 0:w.keyFormat)==="identity"&&!((x=be.decryptdata)!==null&&x!==void 0&&x.key)?this.loadKey(be,j):this.loadFragment(be,j,he)},D.loadFragment=function(w,x,d){var E,f=this.fragmentTracker.getState(w);if(this.fragCurrent=w,f===n.FragmentState.BACKTRACKED){var v=this.fragmentTracker.getBacktrackData(w);if(v){this._handleFragmentLoadProgress(v),this._handleFragmentLoadComplete(v);return}else f=n.FragmentState.NOT_LOADED}f===n.FragmentState.NOT_LOADED||f===n.FragmentState.PARTIAL?w.sn==="initSegment"?this._loadInitSegment(w):this.bitrateTest?(w.bitrateTest=!0,this.log("Fragment "+w.sn+" of level "+w.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(w)):(this.startFragRequested=!0,C.prototype.loadFragment.call(this,w,x,d)):f===n.FragmentState.APPENDING?this.reduceMaxBufferLength(w.duration)&&this.fragmentTracker.removeFragment(w):((E=this.media)===null||E===void 0?void 0:E.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},D.getAppendedFrag=function(w){var x=this.fragmentTracker.getAppendedFrag(w,I.PlaylistLevelType.MAIN);return x&&"fragment"in x?x.fragment:x},D.getBufferedFrag=function(w){return this.fragmentTracker.getBufferedFrag(w,I.PlaylistLevelType.MAIN)},D.followingBufferedFrag=function(w){return w?this.getBufferedFrag(w.end+.5):null},D.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},D.nextLevelSwitch=function(){var w=this.levels,x=this.media;if(x!=null&&x.readyState){var d,E=this.getAppendedFrag(x.currentTime);if(E&&E.start>1&&this.flushMainBuffer(0,E.start-1),!x.paused&&w){var f=this.hls.nextLoadLevel,v=w[f],T=this.fragLastKbps;T&&this.fragCurrent?d=this.fragCurrent.duration*v.maxBitrate/(1e3*T)+1:d=0}else d=0;var B=this.getBufferedFrag(x.currentTime+d);if(B){var R=this.followingBufferedFrag(B);if(R){this.abortCurrentFrag();var j=R.maxStartPTS?R.maxStartPTS:R.start,U=R.duration,_=Math.max(B.end,j+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(_,Number.POSITIVE_INFINITY)}}}},D.abortCurrentFrag=function(){var w=this.fragCurrent;this.fragCurrent=null,w!=null&&w.loader&&w.loader.abort(),this.state===b.State.KEY_LOADING&&(this.state=b.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},D.flushMainBuffer=function(w,x){C.prototype.flushMainBuffer.call(this,w,x,this.altAudio?"video":null)},D.onMediaAttached=function(w,x){C.prototype.onMediaAttached.call(this,w,x);var d=x.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),d.addEventListener("playing",this.onvplaying),d.addEventListener("seeked",this.onvseeked),this.gapController=new u.default(this.config,d,this.fragmentTracker,this.hls)},D.onMediaDetaching=function(){var w=this.media;w&&(w.removeEventListener("playing",this.onvplaying),w.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),C.prototype.onMediaDetaching.call(this)},D.onMediaPlaying=function(){this.tick()},D.onMediaSeeked=function(){var w=this.media,x=w?w.currentTime:null;Object(G.isFiniteNumber)(x)&&this.log("Media seeked to "+x.toFixed(3)),this.tick()},D.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(K.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},D.onManifestParsed=function(w,x){var d=!1,E=!1,f;x.levels.forEach(function(v){f=v.audioCodec,f&&(f.indexOf("mp4a.40.2")!==-1&&(d=!0),f.indexOf("mp4a.40.5")!==-1&&(E=!0))}),this.audioCodecSwitch=d&&E&&!Object(N.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=x.levels,this.startFragRequested=!1},D.onLevelLoading=function(w,x){var d=this.levels;if(!d||this.state!==b.State.IDLE)return;var E=d[x.level];(!E.details||E.details.live&&this.levelLastLoaded!==x.level||this.waitForCdnTuneIn(E.details))&&(this.state=b.State.WAITING_LEVEL)},D.onLevelLoaded=function(w,x){var d,E=this.levels,f=x.level,v=x.details,T=v.totalduration;if(!E){this.warn("Levels were reset while loading level "+f);return}this.log("Level "+f+" loaded ["+v.startSN+","+v.endSN+"], cc ["+v.startCC+", "+v.endCC+"] duration:"+T);var B=this.fragCurrent;B&&(this.state===b.State.FRAG_LOADING||this.state===b.State.FRAG_LOADING_WAITING_RETRY)&&(B.level!==x.level&&B.loader&&(this.state=b.State.IDLE,B.loader.abort()));var R=E[f],j=0;if(v.live||(d=R.details)!==null&&d!==void 0&&d.live){if(v.fragments[0]||(v.deltaUpdateFailed=!0),v.deltaUpdateFailed)return;j=this.alignPlaylists(v,R.details)}if(R.details=v,this.levelLastLoaded=f,this.hls.trigger(K.Events.LEVEL_UPDATED,{details:v,level:f}),this.state===b.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(v))return;this.state=b.State.IDLE}this.startFragRequested?v.live&&this.synchronizeToLiveEdge(v):this.setStartPosition(v,j),this.tick()},D._handleFragmentLoadProgress=function(w){var x,d=w.frag,E=w.part,f=w.payload,v=this.levels;if(!v){this.warn("Levels were reset while fragment load was in progress. Fragment "+d.sn+" of level "+d.level+" will not be buffered");return}var T=v[d.level],B=T.details;if(!B){this.warn("Dropping fragment "+d.sn+" of level "+d.level+" after level details were reset");return}var R=T.videoCodec,j=B.PTSKnown||!B.live,U=(x=d.initSegment)===null||x===void 0?void 0:x.data,_=this._getAudioCodec(T),J=this.transmuxer=this.transmuxer||new m.default(this.hls,I.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ne=E?E.index:-1,he=ne!==-1,be=new g.ChunkMetadata(d.level,d.sn,d.stats.chunkCount,f.byteLength,ne,he),Ke=this.initPTS[d.cc];J.push(f,U,_,R,d,E,B.totalduration,j,be,Ke)},D.onAudioTrackSwitching=function(w,x){var d=this.altAudio,E=!!x.url,f=x.id;if(!E){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var v=this.fragCurrent;v!=null&&v.loader&&(this.log("Switching to main audio track, cancel main fragment load"),v.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var T=this.hls;d&&T.trigger(K.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),T.trigger(K.Events.AUDIO_TRACK_SWITCHED,{id:f})}},D.onAudioTrackSwitched=function(w,x){var d=x.id,E=!!this.hls.audioTracks[d].url;if(E){var f=this.videoBuffer;f&&this.mediaBuffer!==f&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=f)}this.altAudio=E,this.tick()},D.onBufferCreated=function(w,x){var d=x.tracks,E,f,v=!1;for(var T in d){var B=d[T];if(B.id==="main"){if(f=T,E=B,T==="video"){var R=d[T];R&&(this.videoBuffer=R.buffer)}}else v=!0}v&&E?(this.log("Alternate track found, use "+f+".buffered to schedule main fragment loading"),this.mediaBuffer=E.buffer):this.mediaBuffer=this.media},D.onFragBuffered=function(w,x){var d=x.frag,E=x.part;if(d&&d.type!==I.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(d)){this.warn("Fragment "+d.sn+(E?" p: "+E.index:"")+" of level "+d.level+" finished buffering, but was aborted. state: "+this.state),this.state===b.State.PARSED&&(this.state=b.State.IDLE);return}var f=E?E.stats:d.stats;this.fragLastKbps=Math.round(8*f.total/(f.buffering.end-f.loading.first)),d.sn!=="initSegment"&&(this.fragPrevious=d),this.fragBufferedComplete(d,E)},D.onError=function(w,x){switch(x.details){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.ErrorDetails.FRAG_LOAD_TIMEOUT:case c.ErrorDetails.KEY_LOAD_ERROR:case c.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(I.PlaylistLevelType.MAIN,x);break;case c.ErrorDetails.LEVEL_LOAD_ERROR:case c.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==b.State.ERROR&&(x.fatal?(this.warn(""+x.details),this.state=b.State.ERROR):!x.levelRetry&&this.state===b.State.WAITING_LEVEL&&(this.state=b.State.IDLE));break;case c.ErrorDetails.BUFFER_FULL_ERROR:if(x.parent==="main"&&(this.state===b.State.PARSING||this.state===b.State.PARSED)){var d=!0,E=this.getFwdBufferInfo(this.media,I.PlaylistLevelType.MAIN);E&&E.len>.5&&(d=!this.reduceMaxBufferLength(E.len)),d&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},D.checkBuffer=function(){var w=this.media,x=this.gapController;if(!w||!x||!w.readyState)return;var d=W.BufferHelper.getBuffered(w);!this.loadedmetadata&&d.length?(this.loadedmetadata=!0,this.seekToStartPos()):x.poll(this.lastCurrentTime),this.lastCurrentTime=w.currentTime},D.onFragLoadEmergencyAborted=function(){this.state=b.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},D.onBufferFlushed=function(w,x){var d=x.type;if(d!==y.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var E=(d===y.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(E,d,I.PlaylistLevelType.MAIN)}},D.onLevelsUpdated=function(w,x){this.levels=x.levels},D.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},D.seekToStartPos=function(){var w=this.media,x=w.currentTime,d=this.startPosition;if(d>=0&&x<d){if(w.seeking){p.logger.log("could not seek to "+d+", already seeking at "+x);return}var E=W.BufferHelper.getBuffered(w),f=E.length?E.start(0):0,v=f-d;v>0&&(v<this.config.maxBufferHole||v<this.config.maxFragLookUpTolerance)&&(p.logger.log("adjusting start position by "+v+" to match buffer start"),d+=v,this.startPosition=d),this.log("seek to target start position "+d+" from current time "+x),w.currentTime=d}},D._getAudioCodec=function(w){var x=this.config.defaultAudioCodec||w.audioCodec;return this.audioCodecSwap&&x&&(this.log("Swapping audio codec"),x.indexOf("mp4a.40.5")!==-1?x="mp4a.40.2":x="mp4a.40.5"),x},D._loadBitrateTestFrag=function(w){var x=this;this._doFragLoad(w).then(function(d){var E=x.hls;if(!d||E.nextLoadLevel||x.fragContextChanged(w))return;x.fragLoadError=0,x.state=b.State.IDLE,x.startFragRequested=!1,x.bitrateTest=!1;var f=w.stats;f.parsing.start=f.parsing.end=f.buffering.start=f.buffering.end=self.performance.now(),E.trigger(K.Events.FRAG_LOADED,d)})},D._handleTransmuxComplete=function(w){var x,d="main",E=this.hls,f=w.remuxResult,v=w.chunkMeta,T=this.getCurrentContext(v);if(!T){this.warn("The loading context changed while buffering fragment "+v.sn+" of level "+v.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(v.level);return}var B=T.frag,R=T.part,j=T.level,U=f.video,_=f.text,J=f.id3,ne=f.initSegment,he=this.altAudio?void 0:f.audio;if(this.fragContextChanged(B))return;if(this.state=b.State.PARSING,ne){ne.tracks&&(this._bufferInitSegment(j,ne.tracks,B,v),E.trigger(K.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:d,tracks:ne.tracks}));var be=ne.initPTS,Ke=ne.timescale;Object(G.isFiniteNumber)(be)&&(this.initPTS[B.cc]=be,E.trigger(K.Events.INIT_PTS_FOUND,{frag:B,id:d,initPTS:be,timescale:Ke}))}if(U&&f.independent!==!1){if(j.details){var De=U.startPTS,je=U.endPTS,Be=U.startDTS,Ge=U.endDTS;if(R)R.elementaryStreams[U.type]={startPTS:De,endPTS:je,startDTS:Be,endDTS:Ge};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var _e=this.getLoadPosition()+this.config.maxBufferHole;if(_e<De){this.backtrack(B);return}B.setElementaryStreamInfo(U.type,B.start,je,B.start,Ge,!0)}B.setElementaryStreamInfo(U.type,De,je,Be,Ge),this.bufferFragmentData(U,B,R,v)}}else if(f.independent===!1){this.backtrack(B);return}if(he){var Y=he.startPTS,M=he.endPTS,F=he.startDTS,Q=he.endDTS;R&&(R.elementaryStreams[y.ElementaryStreamTypes.AUDIO]={startPTS:Y,endPTS:M,startDTS:F,endDTS:Q}),B.setElementaryStreamInfo(y.ElementaryStreamTypes.AUDIO,Y,M,F,Q),this.bufferFragmentData(he,B,R,v)}if(J!=null&&(x=J.samples)!==null&&x!==void 0&&x.length){var te={frag:B,id:d,samples:J.samples};E.trigger(K.Events.FRAG_PARSING_METADATA,te)}if(_){var V={frag:B,id:d,samples:_.samples};E.trigger(K.Events.FRAG_PARSING_USERDATA,V)}},D._bufferInitSegment=function(w,x,d,E){var f=this;if(this.state!==b.State.PARSING)return;this.audioOnly=!!x.audio&&!x.video,this.altAudio&&!this.audioOnly&&delete x.audio;var v=x.audio,T=x.video,B=x.audiovideo;if(v){var R=w.audioCodec,j=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(R&&(R.indexOf("mp4a.40.5")!==-1?R="mp4a.40.2":R="mp4a.40.5"),v.metadata.channelCount!==1&&j.indexOf("firefox")===-1&&(R="mp4a.40.5")),j.indexOf("android")!==-1&&v.container!=="audio/mpeg"&&(R="mp4a.40.2",this.log("Android: force audio codec to "+R)),w.audioCodec&&w.audioCodec!==R&&this.log('Swapping manifest audio codec "'+w.audioCodec+'" for "'+R+'"'),v.levelCodec=R,v.id="main",this.log("Init audio buffer, container:"+v.container+", codecs[selected/level/parsed]=["+(R||"")+"/"+(w.audioCodec||"")+"/"+v.codec+"]")}T&&(T.levelCodec=w.videoCodec,T.id="main",this.log("Init video buffer, container:"+T.container+", codecs[level/parsed]=["+(w.videoCodec||"")+"/"+T.codec+"]")),B&&this.log("Init audiovideo buffer, container:"+B.container+", codecs[level/parsed]=["+(w.attrs.CODECS||"")+"/"+B.codec+"]"),this.hls.trigger(K.Events.BUFFER_CODECS,x),Object.keys(x).forEach(function(U){var _=x[U],J=_.initSegment;J!=null&&J.byteLength&&f.hls.trigger(K.Events.BUFFER_APPENDING,{type:U,data:J,frag:d,part:null,chunkMeta:E,parent:d.type})}),this.tick()},D.backtrack=function(w){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(w);var x=this.fragmentTracker.backtrack(w);this.fragPrevious=null,this.nextLoadPosition=w.start,x?this.resetFragmentLoading(w):this.state=b.State.BACKTRACKING},D.checkFragmentChanged=function(){var w=this.media,x=null;if(w&&w.readyState>1&&w.seeking===!1){var d=w.currentTime;if(W.BufferHelper.isBuffered(w,d)?x=this.getAppendedFrag(d):W.BufferHelper.isBuffered(w,d+.1)&&(x=this.getAppendedFrag(d+.1)),x){var E=this.fragPlaying,f=x.level;(!E||x.sn!==E.sn||E.level!==f||x.urlId!==E.urlId)&&(this.hls.trigger(K.Events.FRAG_CHANGED,{frag:x}),(!E||E.level!==f)&&this.hls.trigger(K.Events.LEVEL_SWITCHED,{level:f}),this.fragPlaying=x)}}},o(L,[{key:"nextLevel",get:function(){var w=this.nextBufferedFrag;return w?w.level:-1}},{key:"currentLevel",get:function(){var w=this.media;if(w){var x=this.getAppendedFrag(w.currentTime);if(x)return x.level}return-1}},{key:"nextBufferedFrag",get:function(){var w=this.media;if(w){var x=this.getAppendedFrag(w.currentTime);return this.followingBufferedFrag(x)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),L}(b.default)},"./src/controller/subtitle-stream-controller.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"SubtitleStreamController",function(){return s});var G=k("./src/events.ts"),b=k("./src/utils/logger.ts"),N=k("./src/utils/buffer-helper.ts"),K=k("./src/controller/fragment-finders.ts"),W=k("./src/utils/discontinuities.ts"),n=k("./src/controller/level-helper.ts"),I=k("./src/controller/fragment-tracker.ts"),y=k("./src/controller/base-stream-controller.ts"),m=k("./src/types/loader.ts"),g=k("./src/types/level.ts");function u(a,A){for(var S=0;S<A.length;S++){var C=A[S];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(a,C.key,C)}}function c(a,A,S){return A&&u(a.prototype,A),S&&u(a,S),a}function p(a,A){a.prototype=Object.create(A.prototype),a.prototype.constructor=a,l(a,A)}function l(a,A){return l=Object.setPrototypeOf||function(C,L){return C.__proto__=L,C},l(a,A)}var o=500,s=function(a){p(A,a);function A(C,L){var D;return D=a.call(this,C,L,"[subtitle-stream-controller]")||this,D.levels=[],D.currentTrackId=-1,D.tracksBuffered=[],D.mainDetails=null,D._registerListeners(),D}var S=A.prototype;return S.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},S._registerListeners=function(){var L=this.hls;L.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.on(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.on(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.on(G.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.on(G.Events.ERROR,this.onError,this),L.on(G.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.on(G.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.on(G.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.on(G.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.on(G.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S._unregisterListeners=function(){var L=this.hls;L.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.off(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.off(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.off(G.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.off(G.Events.ERROR,this.onError,this),L.off(G.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.off(G.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.off(G.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.off(G.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.off(G.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S.startLoad=function(){this.stopLoad(),this.state=y.State.IDLE,this.setInterval(o),this.tick()},S.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},S.onLevelLoaded=function(L,D){this.mainDetails=D.details},S.onSubtitleFragProcessed=function(L,D){var O=D.frag,w=D.success;if(this.fragPrevious=O,this.state=y.State.IDLE,!w)return;var x=this.tracksBuffered[this.currentTrackId];if(!x)return;for(var d,E=O.start,f=0;f<x.length;f++)if(E>=x[f].start&&E<=x[f].end){d=x[f];break}var v=O.start+O.duration;d?d.end=v:(d={start:E,end:v},x.push(d)),this.fragmentTracker.fragBuffered(O)},S.onBufferFlushing=function(L,D){var O=D.startOffset,w=D.endOffset;if(O===0&&w!==Number.POSITIVE_INFINITY){var x=this.currentTrackId,d=this.levels;if(!d.length||!d[x]||!d[x].details)return;var E=d[x].details,f=E.targetduration,v=w-f;if(v<=0)return;D.endOffsetSubtitles=Math.max(0,v),this.tracksBuffered.forEach(function(T){for(var B=0;B<T.length;){if(T[B].end<=v){T.shift();continue}else if(T[B].start<v)T[B].start=v;else break;B++}}),this.fragmentTracker.removeFragmentsInRange(O,v,m.PlaylistLevelType.SUBTITLE)}},S.onError=function(L,D){var O,w=D.frag;if(!w||w.type!==m.PlaylistLevelType.SUBTITLE)return;(O=this.fragCurrent)!==null&&O!==void 0&&O.loader&&this.fragCurrent.loader.abort(),this.state=y.State.IDLE},S.onSubtitleTracksUpdated=function(L,D){var O=this,w=D.subtitleTracks;this.tracksBuffered=[],this.levels=w.map(function(x){return new g.Level(x)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(x){O.tracksBuffered[x.id]=[]}),this.mediaBuffer=null},S.onSubtitleTrackSwitch=function(L,D){if(this.currentTrackId=D.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var O=this.levels[this.currentTrackId];O!=null&&O.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,O&&this.setInterval(o)},S.onSubtitleTrackLoaded=function(L,D){var O,w=D.details,x=D.id,d=this.currentTrackId,E=this.levels;if(!E.length)return;var f=E[d];if(x>=E.length||x!==d||!f)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,w.live||(O=f.details)!==null&&O!==void 0&&O.live){var v=this.mainDetails;if(w.deltaUpdateFailed||!v)return;var T=v.fragments[0];if(!f.details)w.hasProgramDateTime&&v.hasProgramDateTime?Object(W.alignMediaPlaylistByPDT)(w,v):T&&Object(n.addSliding)(w,T.start);else{var B=this.alignPlaylists(w,f.details);B===0&&T&&Object(n.addSliding)(w,T.start)}}if(f.details=w,this.levelLastLoaded=x,this.tick(),w.live&&!this.fragCurrent&&this.media&&this.state===y.State.IDLE){var R=Object(K.findFragmentByPTS)(null,w.fragments,this.media.currentTime,0);R||(this.warn("Subtitle playlist not aligned with playback"),f.details=void 0)}},S._handleFragmentLoadComplete=function(L){var D=L.frag,O=L.payload,w=D.decryptdata,x=this.hls;if(this.fragContextChanged(D))return;if(O&&O.byteLength>0&&w&&w.key&&w.iv&&w.method==="AES-128"){var d=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(O),w.key.buffer,w.iv.buffer).then(function(E){var f=performance.now();x.trigger(G.Events.FRAG_DECRYPTED,{frag:D,payload:E,stats:{tstart:d,tdecrypt:f}})})}},S.doTick=function(){if(!this.media){this.state=y.State.IDLE;return}if(this.state===y.State.IDLE){var L,D=this.currentTrackId,O=this.levels;if(!O.length||!O[D]||!O[D].details)return;var w=O[D].details,x=w.targetduration,d=this.config,E=this.media,f=N.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,E.currentTime-x,d.maxBufferHole),v=f.end,T=f.len,B=this.getMaxBufferLength()+x;if(T>B)return;console.assert(w,"Subtitle track details are defined on idle subtitle stream controller tick");var R=w.fragments,j=R.length,U=w.edge,_,J=this.fragPrevious;if(v<U){var ne=d.maxFragLookUpTolerance;J&&w.hasProgramDateTime&&(_=Object(K.findFragmentByPDT)(R,J.endProgramDateTime,ne)),_||(_=Object(K.findFragmentByPTS)(J,R,v,ne),!_&&J&&J.start<R[0].start&&(_=R[0]))}else _=R[j-1];(L=_)!==null&&L!==void 0&&L.encrypted?(b.logger.log("Loading key for "+_.sn),this.state=y.State.KEY_LOADING,this.hls.trigger(G.Events.KEY_LOADING,{frag:_})):_&&this.fragmentTracker.getState(_)===I.FragmentState.NOT_LOADED&&this.loadFragment(_,w,v)}},S.loadFragment=function(L,D,O){this.fragCurrent=L,a.prototype.loadFragment.call(this,L,D,O)},c(A,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),A}(y.default)},"./src/controller/subtitle-track-controller.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/events.ts"),b=k("./src/utils/texttrack-utils.ts"),N=k("./src/controller/base-playlist-controller.ts"),K=k("./src/types/loader.ts");function W(u,c){for(var p=0;p<c.length;p++){var l=c[p];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(u,l.key,l)}}function n(u,c,p){return c&&W(u.prototype,c),p&&W(u,p),u}function I(u,c){u.prototype=Object.create(c.prototype),u.prototype.constructor=u,y(u,c)}function y(u,c){return y=Object.setPrototypeOf||function(l,o){return l.__proto__=o,l},y(u,c)}var m=function(u){I(c,u);function c(l){var o;return o=u.call(this,l,"[subtitle-track-controller]")||this,o.media=null,o.tracks=[],o.groupId=null,o.tracksInGroup=[],o.trackId=-1,o.selectDefaultTrack=!0,o.queuedDefaultTrack=-1,o.trackChangeListener=function(){return o.onTextTracksChanged()},o.asyncPollTrackChange=function(){return o.pollTrackChange(0)},o.useTextTrackPolling=!1,o.subtitlePollingInterval=-1,o.subtitleDisplay=!0,o.registerListeners(),o}var p=c.prototype;return p.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,u.prototype.destroy.call(this)},p.registerListeners=function(){var o=this.hls;o.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.on(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(G.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(G.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.on(G.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),o.on(G.Events.ERROR,this.onError,this)},p.unregisterListeners=function(){var o=this.hls;o.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.off(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(G.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(G.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.off(G.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),o.off(G.Events.ERROR,this.onError,this)},p.onMediaAttached=function(o,s){if(this.media=s.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)},p.pollTrackChange=function(o){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,o)},p.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 o=g(this.media.textTracks);o.forEach(function(s){Object(b.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},p.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},p.onManifestParsed=function(o,s){this.tracks=s.subtitleTracks},p.onSubtitleTrackLoaded=function(o,s){var a=s.id,A=s.details,S=this.trackId,C=this.tracksInGroup[S];if(!C){this.warn("Invalid subtitle track id "+a);return}var L=C.details;C.details=s.details,this.log("subtitle track "+a+" loaded ["+A.startSN+"-"+A.endSN+"]"),a===this.trackId&&(this.retryCount=0,this.playlistLoaded(a,s,L))},p.onLevelLoading=function(o,s){this.switchLevel(s.level)},p.onLevelSwitching=function(o,s){this.switchLevel(s.level)},p.switchLevel=function(o){var s=this.hls.levels[o];if(!(s!=null&&s.textGroupIds))return;var a=s.textGroupIds[s.urlId];if(this.groupId!==a){var A=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,S=this.tracks.filter(function(D){return!a||D.groupId===a});this.tracksInGroup=S;var C=this.findTrackId(A==null?void 0:A.name)||this.findTrackId();this.groupId=a;var L={subtitleTracks:S};this.log("Updating subtitle tracks, "+S.length+' track(s) found in "'+a+'" group-id'),this.hls.trigger(G.Events.SUBTITLE_TRACKS_UPDATED,L),C!==-1&&this.setSubtitleTrack(C,A)}},p.findTrackId=function(o){for(var s=this.tracksInGroup,a=0;a<s.length;a++){var A=s[a];if((!this.selectDefaultTrack||A.default)&&(!o||o===A.name))return A.id}return-1},p.onError=function(o,s){if(u.prototype.onError.call(this,o,s),s.fatal||!s.context)return;s.context.type===K.PlaylistContextType.SUBTITLE_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},p.loadPlaylist=function(o){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var a=s.id,A=s.groupId,S=s.url;if(o)try{S=o.addDirectives(S)}catch(C){this.warn("Could not construct new URL with HLS Delivery Directives: "+C)}this.log("Loading subtitle playlist for id "+a),this.hls.trigger(G.Events.SUBTITLE_TRACK_LOADING,{url:S,id:a,groupId:A,deliveryDirectives:o||null})}},p.toggleTrackModes=function(o){var s=this,a=this.media,A=this.subtitleDisplay,S=this.trackId;if(!a)return;var C=g(a.textTracks),L=C.filter(function(w){return w.groupId===s.groupId});if(o===-1)[].slice.call(C).forEach(function(w){w.mode="disabled"});else{var D=L[S];D&&(D.mode="disabled")}var O=L[o];O&&(O.mode=A?"showing":"hidden")},p.setSubtitleTrack=function(o,s){var a,A=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=o;return}if(this.trackId!==o&&this.toggleTrackModes(o),this.trackId===o&&(o===-1||(a=A[o])!==null&&a!==void 0&&a.details)||o<-1||o>=A.length)return;this.clearTimer();var S=A[o];if(this.log("Switching to subtitle track "+o),this.trackId=o,S){var C=S.id,L=S.groupId,D=L===void 0?"":L,O=S.name,w=S.type,x=S.url;this.hls.trigger(G.Events.SUBTITLE_TRACK_SWITCH,{id:C,groupId:D,name:O,type:w,url:x});var d=this.switchParams(S.url,s==null?void 0:s.details);this.loadPlaylist(d)}else this.hls.trigger(G.Events.SUBTITLE_TRACK_SWITCH,{id:o})},p.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var o=-1,s=g(this.media.textTracks),a=0;a<s.length;a++)if(s[a].mode==="hidden")o=a;else if(s[a].mode==="showing"){o=a;break}this.subtitleTrack!==o&&(this.subtitleTrack=o)},n(c,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(o){this.selectDefaultTrack=!1;var s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(o,s)}}]),c}(N.default);function g(u){for(var c=[],p=0;p<u.length;p++){var l=u[p];l.kind==="subtitles"&&l.label&&c.push(u[p])}return c}X.default=m},"./src/controller/timeline-controller.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"TimelineController",function(){return g});var G=k("./src/polyfills/number.ts"),b=k("./src/events.ts"),N=k("./src/utils/cea-608-parser.ts"),K=k("./src/utils/output-filter.ts"),W=k("./src/utils/webvtt-parser.ts"),n=k("./src/utils/texttrack-utils.ts"),I=k("./src/utils/imsc1-ttml-parser.ts"),y=k("./src/types/loader.ts"),m=k("./src/utils/logger.ts"),g=function(){function l(s){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=p(),this.captionsProperties=void 0,this.hls=s,this.config=s.config,this.Cues=s.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 a=new K.default(this,"textTrack1"),A=new K.default(this,"textTrack2"),S=new K.default(this,"textTrack3"),C=new K.default(this,"textTrack4");this.cea608Parser1=new N.default(1,a,A),this.cea608Parser2=new N.default(3,S,C)}s.on(b.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(b.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(b.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(b.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(b.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.on(b.Events.FRAG_LOADING,this.onFragLoading,this),s.on(b.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(b.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.on(b.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.on(b.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(b.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.on(b.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var o=l.prototype;return o.destroy=function(){var a=this.hls;a.off(b.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(b.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(b.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(b.Events.MANIFEST_LOADED,this.onManifestLoaded,this),a.off(b.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),a.off(b.Events.FRAG_LOADING,this.onFragLoading,this),a.off(b.Events.FRAG_LOADED,this.onFragLoaded,this),a.off(b.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),a.off(b.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),a.off(b.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.off(b.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),a.off(b.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},o.addCues=function(a,A,S,C,L){for(var D=!1,O=L.length;O--;){var w=L[O],x=c(w[0],w[1],A,S);if(x>=0&&(w[0]=Math.min(w[0],A),w[1]=Math.max(w[1],S),D=!0,x/(S-A)>.5))return}if(D||L.push([A,S]),this.config.renderTextTracksNatively){var d=this.captionsTracks[a];this.Cues.newCue(d,A,S,C)}else{var E=this.Cues.newCue(null,A,S,C);this.hls.trigger(b.Events.CUES_PARSED,{type:"captions",cues:E,track:a})}},o.onInitPtsFound=function(a,A){var S=this,C=A.frag,L=A.id,D=A.initPTS,O=A.timescale,w=this.unparsedVttFrags;L==="main"&&(this.initPTS[C.cc]=D,this.timescale[C.cc]=O),w.length&&(this.unparsedVttFrags=[],w.forEach(function(x){S.onFragLoaded(b.Events.FRAG_LOADED,x)}))},o.getExistingTrack=function(a){var A=this.media;if(A)for(var S=0;S<A.textTracks.length;S++){var C=A.textTracks[S];if(C[a])return C}return null},o.createCaptionsTrack=function(a){this.config.renderTextTracksNatively?this.createNativeTrack(a):this.createNonNativeTrack(a)},o.createNativeTrack=function(a){if(this.captionsTracks[a])return;var A=this.captionsProperties,S=this.captionsTracks,C=this.media,L=A[a],D=L.label,O=L.languageCode,w=this.getExistingTrack(a);if(w)S[a]=w,Object(n.clearCurrentCues)(S[a]),Object(n.sendAddTrackEvent)(S[a],C);else{var x=this.createTextTrack("captions",D,O);x&&(x[a]=!0,S[a]=x)}},o.createNonNativeTrack=function(a){if(this.nonNativeCaptionsTracks[a])return;var A=this.captionsProperties[a];if(!A)return;var S=A.label,C={_id:a,label:S,kind:"captions",default:A.media?!!A.media.default:!1,closedCaptions:A.media};this.nonNativeCaptionsTracks[a]=C,this.hls.trigger(b.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[C]})},o.createTextTrack=function(a,A,S){var C=this.media;return C?C.addTextTrack(a,A,S):void 0},o.onMediaAttaching=function(a,A){this.media=A.media,this._cleanTracks()},o.onMediaDetaching=function(){var a=this.captionsTracks;Object.keys(a).forEach(function(A){Object(n.clearCurrentCues)(a[A]),delete a[A]}),this.nonNativeCaptionsTracks={}},o.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=p(),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())},o._cleanTracks=function(){var a=this.media;if(!a)return;var A=a.textTracks;if(A)for(var S=0;S<A.length;S++)Object(n.clearCurrentCues)(A[S])},o.onSubtitleTracksUpdated=function(a,A){var S=this;this.textTracks=[];var C=A.subtitleTracks||[],L=C.some(function(x){return x.textCodec===I.IMSC1_CODEC});if(this.config.enableWebVTT||L&&this.config.enableIMSC1){var D=this.tracks&&C&&this.tracks.length===C.length;if(this.tracks=C||[],this.config.renderTextTracksNatively){var O=this.media?this.media.textTracks:[];this.tracks.forEach(function(x,d){var E;if(d<O.length){for(var f=null,v=0;v<O.length;v++)if(u(O[v],x)){f=O[v];break}f&&(E=f)}E?Object(n.clearCurrentCues)(E):(E=S.createTextTrack("subtitles",x.name,x.lang),E&&(E.mode="disabled")),E&&(E.groupId=x.groupId,S.textTracks.push(E))})}else if(!D&&this.tracks&&this.tracks.length){var w=this.tracks.map(function(x){return{label:x.name,kind:x.type.toLowerCase(),default:x.default,subtitleTrack:x}});this.hls.trigger(b.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:w})}}},o.onManifestLoaded=function(a,A){var S=this;this.config.enableCEA708Captions&&A.captions&&A.captions.forEach(function(C){var L=/(?:CC|SERVICE)([1-4])/.exec(C.instreamId);if(!L)return;var D="textTrack"+L[1],O=S.captionsProperties[D];if(!O)return;O.label=C.name,C.lang&&(O.languageCode=C.lang),O.media=C})},o.onFragLoading=function(a,A){var S=this.cea608Parser1,C=this.cea608Parser2,L=this.lastSn,D=this.lastPartIndex;if(!this.enabled||!(S&&C))return;if(A.frag.type===y.PlaylistLevelType.MAIN){var O,w,x=A.frag.sn,d=(O=A==null||((w=A.part)===null||w===void 0)?void 0:w.index)!=null?O:-1;x===L+1||x===L&&d===D+1||(S.reset(),C.reset()),this.lastSn=x,this.lastPartIndex=d}},o.onFragLoaded=function(a,A){var S=A.frag,C=A.payload,L=this.initPTS,D=this.unparsedVttFrags;if(S.type===y.PlaylistLevelType.SUBTITLE)if(C.byteLength){if(!Object(G.isFiniteNumber)(L[S.cc])){D.push(A),L.length&&this.hls.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:S,error:new Error("Missing initial subtitle PTS")});return}var O=S.decryptdata;if(O==null||O.key==null||O.method!=="AES-128"){var w=this.tracks[S.level],x=this.vttCCs;x[S.cc]||(x[S.cc]={start:S.start,prevCC:this.prevCC,new:!0},this.prevCC=S.cc),w&&w.textCodec===I.IMSC1_CODEC?this._parseIMSC1(S,C):this._parseVTTs(S,C,x)}}else this.hls.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:S,error:new Error("Empty subtitle payload")})},o._parseIMSC1=function(a,A){var S=this,C=this.hls;Object(I.parseIMSC1)(A,this.initPTS[a.cc],this.timescale[a.cc],function(L){S._appendCues(L,a.level),C.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:a})},function(L){m.logger.log("Failed to parse IMSC1: "+L),C.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:a,error:L})})},o._parseVTTs=function(a,A,S){var C=this,L=this.hls;Object(W.parseWebVTT)(A,this.initPTS[a.cc],this.timescale[a.cc],S,a.cc,a.start,function(D){C._appendCues(D,a.level),L.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:a})},function(D){C._fallbackToIMSC1(a,A),m.logger.log("Failed to parse VTT cue: "+D),L.trigger(b.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:a,error:D})})},o._fallbackToIMSC1=function(a,A){var S=this,C=this.tracks[a.level];C.textCodec||Object(I.parseIMSC1)(A,this.initPTS[a.cc],this.timescale[a.cc],function(){C.textCodec=I.IMSC1_CODEC,S._parseIMSC1(a,A)},function(){C.textCodec="wvtt"})},o._appendCues=function(a,A){var S=this.hls;if(this.config.renderTextTracksNatively){var C=this.textTracks[A];if(C.mode==="disabled")return;a.forEach(function(O){return Object(n.addCueToTrack)(C,O)})}else{var L=this.tracks[A],D=L.default?"default":"subtitles"+A;S.trigger(b.Events.CUES_PARSED,{type:"subtitles",cues:a,track:D})}},o.onFragDecrypted=function(a,A){var S=A.frag;if(S.type===y.PlaylistLevelType.SUBTITLE){if(!Object(G.isFiniteNumber)(this.initPTS[S.cc])){this.unparsedVttFrags.push(A);return}this.onFragLoaded(b.Events.FRAG_LOADED,A)}},o.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},o.onFragParsingUserdata=function(a,A){var S=this.cea608Parser1,C=this.cea608Parser2;if(!this.enabled||!(S&&C))return;for(var L=0;L<A.samples.length;L++){var D=A.samples[L].bytes;if(D){var O=this.extractCea608Data(D);S.addData(A.samples[L].pts,O[0]),C.addData(A.samples[L].pts,O[1])}}},o.onBufferFlushing=function(a,A){var S=A.startOffset,C=A.endOffset,L=A.endOffsetSubtitles,D=A.type,O=this.media;if(!O||O.currentTime<C)return;if(!D||D==="video"){var w=this.captionsTracks;Object.keys(w).forEach(function(d){return Object(n.removeCuesInRange)(w[d],S,C)})}if(this.config.renderTextTracksNatively&&(S===0&&L!==void 0)){var x=this.textTracks;Object.keys(x).forEach(function(d){return Object(n.removeCuesInRange)(x[d],S,L)})}},o.extractCea608Data=function(a){for(var A=a[0]&31,S=2,C=[[],[]],L=0;L<A;L++){var D=a[S++],O=127&a[S++],w=127&a[S++],x=(4&D)!==0,d=3&D;if(O===0&&w===0)continue;x&&((d===0||d===1)&&(C[d].push(O),C[d].push(w)))}return C},l}();function u(l,o){return l&&l.label===o.name&&!(l.textTrack1||l.textTrack2)}function c(l,o,s,a){return Math.min(o,a)-Math.max(l,s)}function p(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return G});var G=function(){function b(K,W){this.subtle=void 0,this.aesIV=void 0,this.subtle=K,this.aesIV=W}var N=b.prototype;return N.decrypt=function(W,n){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},n,W)},b}()},"./src/crypt/aes-decryptor.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"removePadding",function(){return b}),k.d(X,"default",function(){return N});var G=k("./src/utils/typed-array.ts");function b(K){var W=K.byteLength,n=W&&new DataView(K.buffer).getUint8(W-1);return n?Object(G.sliceUint8)(K,0,W-n):K}var N=function(){function K(){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 W=K.prototype;return W.uint8ArrayToUint32Array_=function(I){for(var y=new DataView(I),m=new Uint32Array(4),g=0;g<4;g++)m[g]=y.getUint32(g*4);return m},W.initTable=function(){var I=this.sBox,y=this.invSBox,m=this.subMix,g=m[0],u=m[1],c=m[2],p=m[3],l=this.invSubMix,o=l[0],s=l[1],a=l[2],A=l[3],S=new Uint32Array(256),C=0,L=0,D=0;for(D=0;D<256;D++)D<128?S[D]=D<<1:S[D]=D<<1^283;for(D=0;D<256;D++){var O=L^L<<1^L<<2^L<<3^L<<4;O=O>>>8^O&255^99,I[C]=O,y[O]=C;var w=S[C],x=S[w],d=S[x],E=S[O]*257^O*16843008;g[C]=E<<24|E>>>8,u[C]=E<<16|E>>>16,c[C]=E<<8|E>>>24,p[C]=E,E=d*16843009^x*65537^w*257^C*16843008,o[O]=E<<24|E>>>8,s[O]=E<<16|E>>>16,a[O]=E<<8|E>>>24,A[O]=E,C?(C=w^S[S[S[d^w]]],L^=S[S[L]]):C=L=1}},W.expandKey=function(I){for(var y=this.uint8ArrayToUint32Array_(I),m=!0,g=0;g<y.length&&m;)m=y[g]===this.key[g],g++;if(m)return;this.key=y;var u=this.keySize=y.length;if(u!==4&&u!==6&&u!==8)throw new Error("Invalid aes key size="+u);var c=this.ksRows=(u+6+1)*4,p,l,o=this.keySchedule=new Uint32Array(c),s=this.invKeySchedule=new Uint32Array(c),a=this.sBox,A=this.rcon,S=this.invSubMix,C=S[0],L=S[1],D=S[2],O=S[3],w,x;for(p=0;p<c;p++){if(p<u){w=o[p]=y[p];continue}x=w,p%u===0?(x=x<<8|x>>>24,x=a[x>>>24]<<24|a[x>>>16&255]<<16|a[x>>>8&255]<<8|a[x&255],x^=A[p/u|0]<<24):u>6&&p%u===4&&(x=a[x>>>24]<<24|a[x>>>16&255]<<16|a[x>>>8&255]<<8|a[x&255]),o[p]=w=(o[p-u]^x)>>>0}for(l=0;l<c;l++)p=c-l,l&3?x=o[p]:x=o[p-4],l<4||p<=4?s[l]=x:s[l]=C[a[x>>>24]]^L[a[x>>>16&255]]^D[a[x>>>8&255]]^O[a[x&255]],s[l]=s[l]>>>0},W.networkToHostOrderSwap=function(I){return I<<24|(I&65280)<<8|(I&16711680)>>8|I>>>24},W.decrypt=function(I,y,m){for(var g=this.keySize+6,u=this.invKeySchedule,c=this.invSBox,p=this.invSubMix,l=p[0],o=p[1],s=p[2],a=p[3],A=this.uint8ArrayToUint32Array_(m),S=A[0],C=A[1],L=A[2],D=A[3],O=new Int32Array(I),w=new Int32Array(O.length),x,d,E,f,v,T,B,R,j,U,_,J,ne,he,be=this.networkToHostOrderSwap;y<O.length;){for(j=be(O[y]),U=be(O[y+1]),_=be(O[y+2]),J=be(O[y+3]),v=j^u[0],T=J^u[1],B=_^u[2],R=U^u[3],ne=4,he=1;he<g;he++)x=l[v>>>24]^o[T>>16&255]^s[B>>8&255]^a[R&255]^u[ne],d=l[T>>>24]^o[B>>16&255]^s[R>>8&255]^a[v&255]^u[ne+1],E=l[B>>>24]^o[R>>16&255]^s[v>>8&255]^a[T&255]^u[ne+2],f=l[R>>>24]^o[v>>16&255]^s[T>>8&255]^a[B&255]^u[ne+3],v=x,T=d,B=E,R=f,ne=ne+4;x=c[v>>>24]<<24^c[T>>16&255]<<16^c[B>>8&255]<<8^c[R&255]^u[ne],d=c[T>>>24]<<24^c[B>>16&255]<<16^c[R>>8&255]<<8^c[v&255]^u[ne+1],E=c[B>>>24]<<24^c[R>>16&255]<<16^c[v>>8&255]<<8^c[T&255]^u[ne+2],f=c[R>>>24]<<24^c[v>>16&255]<<16^c[T>>8&255]<<8^c[B&255]^u[ne+3],w[y]=be(x^S),w[y+1]=be(f^C),w[y+2]=be(E^L),w[y+3]=be(d^D),S=j,C=U,L=_,D=J,y=y+4}return w.buffer},K}()},"./src/crypt/decrypter.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return y});var G=k("./src/crypt/aes-crypto.ts"),b=k("./src/crypt/fast-aes-key.ts"),N=k("./src/crypt/aes-decryptor.ts"),K=k("./src/utils/logger.ts"),W=k("./src/utils/mp4-tools.ts"),n=k("./src/utils/typed-array.ts"),I=16,y=function(){function m(u,c,p){var l=p===void 0?{}:p,o=l.removePKCS7Padding,s=o===void 0?!0:o;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=u,this.config=c,this.removePKCS7Padding=s,s)try{var a=self.crypto;a&&(this.subtle=a.subtle||a.webkitSubtle)}catch(A){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var g=m.prototype;return g.destroy=function(){this.observer=null},g.isSync=function(){return this.config.enableSoftwareAES},g.flush=function(){var c=this.currentResult;if(!c){this.reset();return}var p=new Uint8Array(c);return this.reset(),this.removePKCS7Padding?Object(N.removePadding)(p):p},g.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},g.decrypt=function(c,p,l,o){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(c),p,l);var s=this.flush();s&&o(s.buffer)}else this.webCryptoDecrypt(new Uint8Array(c),p,l).then(o)},g.softwareDecrypt=function(c,p,l){var o=this.currentIV,s=this.currentResult,a=this.remainderData;this.logOnce("JS AES decrypt"),a&&(c=Object(W.appendUint8Array)(a,c),this.remainderData=null);var A=this.getValidChunk(c);if(!A.length)return null;o&&(l=o);var S=this.softwareDecrypter;S||(S=this.softwareDecrypter=new N.default),S.expandKey(p);var C=s;return this.currentResult=S.decrypt(A.buffer,0,l),this.currentIV=Object(n.sliceUint8)(A,-16).buffer,C||null},g.webCryptoDecrypt=function(c,p,l){var o=this,s=this.subtle;return(this.key!==p||!this.fastAesKey)&&(this.key=p,this.fastAesKey=new b.default(s,p)),this.fastAesKey.expandKey().then(function(a){if(!s)return Promise.reject(new Error("web crypto not initialized"));var A=new G.default(s,l);return A.decrypt(c.buffer,a)}).catch(function(a){return o.onWebCryptoError(a,c,p,l)})},g.onWebCryptoError=function(c,p,l,o){return K.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",c),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(p,l,o)},g.getValidChunk=function(c){var p=c,l=c.length-c.length%I;return l!==c.length&&(p=Object(n.sliceUint8)(c,0,l),this.remainderData=Object(n.sliceUint8)(c,l)),p},g.logOnce=function(c){if(!this.logEnabled)return;K.logger.log("[decrypter.ts]: "+c),this.logEnabled=!1},m}()},"./src/crypt/fast-aes-key.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return G});var G=function(){function b(K,W){this.subtle=void 0,this.key=void 0,this.subtle=K,this.key=W}var N=b.prototype;return N.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},b}()},"./src/demux/aacdemuxer.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/demux/base-audio-demuxer.ts"),b=k("./src/demux/adts.ts"),N=k("./src/utils/logger.ts"),K=k("./src/demux/id3.ts");function W(y,m){y.prototype=Object.create(m.prototype),y.prototype.constructor=y,n(y,m)}function n(y,m){return n=Object.setPrototypeOf||function(u,c){return u.__proto__=c,u},n(y,m)}var I=function(y){W(m,y);function m(u,c){var p;return p=y.call(this)||this,p.observer=void 0,p.config=void 0,p.observer=u,p.config=c,p}var g=m.prototype;return g.resetInitSegment=function(c,p,l){y.prototype.resetInitSegment.call(this,c,p,l),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:c,duration:l,inputTimeScale:9e4,dropped:0}},m.probe=function(c){if(!c)return!1;for(var p=K.getID3Data(c,0)||[],l=p.length,o=c.length;l<o;l++)if(b.probe(c,l))return N.logger.log("ADTS sync word found !"),!0;return!1},g.canParse=function(c,p){return b.canParse(c,p)},g.appendFrame=function(c,p,l){b.initTrackConfig(c,this.observer,p,l,c.manifestCodec);var o=b.appendFrame(c,p,l,this.initPTS,this.frameIndex);if(o&&o.missing===0)return o},m}(G.default);I.minProbeByteLength=9,X.default=I},"./src/demux/adts.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"getAudioConfig",function(){return K}),k.d(X,"isHeaderPattern",function(){return W}),k.d(X,"getHeaderLength",function(){return n}),k.d(X,"getFullFrameLength",function(){return I}),k.d(X,"canGetFrameLength",function(){return y}),k.d(X,"isHeader",function(){return m}),k.d(X,"canParse",function(){return g}),k.d(X,"probe",function(){return u}),k.d(X,"initTrackConfig",function(){return c}),k.d(X,"getFrameDuration",function(){return p}),k.d(X,"parseFrameHeader",function(){return l}),k.d(X,"appendFrame",function(){return o});var G=k("./src/utils/logger.ts"),b=k("./src/errors.ts"),N=k("./src/events.ts");function K(s,a,A,S){var C,L,D,O,w=navigator.userAgent.toLowerCase(),x=S,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];C=((a[A+2]&192)>>>6)+1;var E=(a[A+2]&60)>>>2;if(E>d.length-1){s.trigger(N.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+E});return}return D=(a[A+2]&1)<<2,D|=(a[A+3]&192)>>>6,G.logger.log("manifest codec:"+S+", ADTS type:"+C+", samplingIndex:"+E),/firefox/i.test(w)?E>=6?(C=5,O=new Array(4),L=E-3):(C=2,O=new Array(2),L=E):w.indexOf("android")!==-1?(C=2,O=new Array(2),L=E):(C=5,O=new Array(4),S&&(S.indexOf("mp4a.40.29")!==-1||S.indexOf("mp4a.40.5")!==-1)||!S&&E>=6?L=E-3:((S&&S.indexOf("mp4a.40.2")!==-1&&(E>=6&&D===1||/vivaldi/i.test(w))||!S&&D===1)&&(C=2,O=new Array(2)),L=E)),O[0]=C<<3,O[0]|=(E&14)>>1,O[1]|=(E&1)<<7,O[1]|=D<<3,C===5&&(O[1]|=(L&14)>>1,O[2]=(L&1)<<7,O[2]|=2<<2,O[3]=0),{config:O,samplerate:d[E],channelCount:D,codec:"mp4a.40."+C,manifestCodec:x}}function W(s,a){return s[a]===255&&(s[a+1]&246)===240}function n(s,a){return s[a+1]&1?7:9}function I(s,a){return(s[a+3]&3)<<11|s[a+4]<<3|(s[a+5]&224)>>>5}function y(s,a){return a+5<s.length}function m(s,a){return a+1<s.length&&W(s,a)}function g(s,a){return y(s,a)&&W(s,a)&&I(s,a)<=s.length-a}function u(s,a){if(m(s,a)){var A=n(s,a);if(a+A>=s.length)return!1;var S=I(s,a);if(S<=A)return!1;var C=a+S;return C===s.length||m(s,C)}return!1}function c(s,a,A,S,C){if(!s.samplerate){var L=K(a,A,S,C);if(!L)return;s.config=L.config,s.samplerate=L.samplerate,s.channelCount=L.channelCount,s.codec=L.codec,s.manifestCodec=L.manifestCodec,G.logger.log("parsed codec:"+s.codec+", rate:"+L.samplerate+", channels:"+L.channelCount)}}function p(s){return 1024*9e4/s}function l(s,a,A,S,C){var L=n(s,a),D=I(s,a);if(D-=L,D>0){var O=A+S*C;return{headerLength:L,frameLength:D,stamp:O}}}function o(s,a,A,S,C){var L=p(s.samplerate),D=l(a,A,S,C,L);if(D){var O=D.frameLength,w=D.headerLength,x=D.stamp,d=w+O,E=Math.max(0,A+d-a.length),f;E?(f=new Uint8Array(d-w),f.set(a.subarray(A+w,a.length),0)):f=a.subarray(A+w,A+d);var v={unit:f,pts:x};return E||s.samples.push(v),{sample:v,length:d,missing:E}}}},"./src/demux/base-audio-demuxer.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"initPTSFn",function(){return I});var G=k("./src/polyfills/number.ts"),b=k("./src/demux/id3.ts"),N=k("./src/demux/dummy-demuxed-track.ts"),K=k("./src/utils/mp4-tools.ts"),W=k("./src/utils/typed-array.ts"),n=function(){function y(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var m=y.prototype;return m.resetInitSegment=function(u,c,p){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},m.resetTimeStamp=function(){},m.resetContiguity=function(){},m.canParse=function(u,c){return!1},m.appendFrame=function(u,c,p){},m.demux=function(u,c){this.cachedData&&(u=Object(K.appendUint8Array)(this.cachedData,u),this.cachedData=null);var p=b.getID3Data(u,0),l=p?p.length:0,o,s,a=this._audioTrack,A=this._id3Track,S=p?b.getTimeStamp(p):void 0,C=u.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=I(S,c)),p&&p.length>0&&A.samples.push({pts:this.initPTS,dts:this.initPTS,data:p}),s=this.initPTS;l<C;){if(this.canParse(u,l)){var L=this.appendFrame(a,u,l);L?(this.frameIndex++,s=L.sample.pts,l+=L.length,o=l):l=C}else b.canParse(u,l)?(p=b.getID3Data(u,l),A.samples.push({pts:s,dts:s,data:p}),l+=p.length,o=l):l++;if(l===C&&o!==C){var D=Object(W.sliceUint8)(u,o);this.cachedData?this.cachedData=Object(K.appendUint8Array)(this.cachedData,D):this.cachedData=D}}return{audioTrack:a,avcTrack:Object(N.dummyTrack)(),id3Track:A,textTrack:Object(N.dummyTrack)()}},m.demuxSampleAes=function(u,c,p){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},m.flush=function(u){var c=this.cachedData;return c&&(this.cachedData=null,this.demux(c,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(N.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(N.dummyTrack)()}},m.destroy=function(){},y}(),I=function(m,g){return Object(G.isFiniteNumber)(m)?m*90:g*9e4};X.default=n},"./src/demux/chunk-cache.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return G});var G=function(){function N(){this.chunks=[],this.dataLength=0}var K=N.prototype;return K.push=function(n){this.chunks.push(n),this.dataLength+=n.length},K.flush=function(){var n=this.chunks,I=this.dataLength,y;if(n.length)n.length===1?y=n[0]:y=b(n,I);else return new Uint8Array(0);return this.reset(),y},K.reset=function(){this.chunks.length=0,this.dataLength=0},N}();function b(N,K){for(var W=new Uint8Array(K),n=0,I=0;I<N.length;I++){var y=N[I];W.set(y,n),n+=y.length}return W}},"./src/demux/dummy-demuxed-track.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"dummyTrack",function(){return G});function G(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/utils/logger.ts"),b=function(){function N(W){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=W,this.bytesAvailable=W.byteLength,this.word=0,this.bitsAvailable=0}var K=N.prototype;return K.loadWord=function(){var n=this.data,I=this.bytesAvailable,y=n.byteLength-I,m=new Uint8Array(4),g=Math.min(4,I);if(g===0)throw new Error("no bytes available");m.set(n.subarray(y,y+g)),this.word=new DataView(m.buffer).getUint32(0),this.bitsAvailable=g*8,this.bytesAvailable-=g},K.skipBits=function(n){var I;this.bitsAvailable>n?(this.word<<=n,this.bitsAvailable-=n):(n-=this.bitsAvailable,I=n>>3,n-=I>>3,this.bytesAvailable-=I,this.loadWord(),this.word<<=n,this.bitsAvailable-=n)},K.readBits=function(n){var I=Math.min(this.bitsAvailable,n),y=this.word>>>32-I;return n>32&&G.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=I,this.bitsAvailable>0?this.word<<=I:this.bytesAvailable>0&&this.loadWord(),I=n-I,I>0&&this.bitsAvailable?y<<I|this.readBits(I):y},K.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()},K.skipUEG=function(){this.skipBits(1+this.skipLZ())},K.skipEG=function(){this.skipBits(1+this.skipLZ())},K.readUEG=function(){var n=this.skipLZ();return this.readBits(n+1)-1},K.readEG=function(){var n=this.readUEG();return 1&n?1+n>>>1:-1*(n>>>1)},K.readBoolean=function(){return this.readBits(1)===1},K.readUByte=function(){return this.readBits(8)},K.readUShort=function(){return this.readBits(16)},K.readUInt=function(){return this.readBits(32)},K.skipScalingList=function(n){for(var I=8,y=8,m,g=0;g<n;g++)y!==0&&(m=this.readEG(),y=(I+m+256)%256),I=y===0?I:y},K.readSPS=function(){var n=0,I=0,y=0,m=0,g,u,c,p=this.readUByte.bind(this),l=this.readBits.bind(this),o=this.readUEG.bind(this),s=this.readBoolean.bind(this),a=this.skipBits.bind(this),A=this.skipEG.bind(this),S=this.skipUEG.bind(this),C=this.skipScalingList.bind(this);p();var L=p();if(l(5),a(3),p(),S(),L===100||L===110||L===122||L===244||L===44||L===83||L===86||L===118||L===128){var D=o();if(D===3&&a(1),S(),S(),a(1),s())for(u=D!==3?8:12,c=0;c<u;c++)s()&&(c<6?C(16):C(64))}S();var O=o();if(O===0)o();else if(O===1)for(a(1),A(),A(),g=o(),c=0;c<g;c++)A();S(),a(1);var w=o(),x=o(),d=l(1);d===0&&a(1),a(1),s()&&(n=o(),I=o(),y=o(),m=o());var E=[1,1];if(s()&&s()){var f=p();switch(f){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:{E=[p()<<8|p(),p()<<8|p()];break}}}return{width:Math.ceil((w+1)*16-n*2-I*2),height:(2-d)*(x+1)*16-(d?2:4)*(y+m),pixelRatio:E}},K.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},N}();X.default=b},"./src/demux/id3.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"isHeader",function(){return G}),k.d(X,"isFooter",function(){return b}),k.d(X,"getID3Data",function(){return N}),k.d(X,"canParse",function(){return W}),k.d(X,"getTimeStamp",function(){return n}),k.d(X,"isTimeStampFrame",function(){return I}),k.d(X,"getID3Frames",function(){return m}),k.d(X,"decodeFrame",function(){return g}),k.d(X,"utf8ArrayToStr",function(){return o}),k.d(X,"testables",function(){return s});var G=function(C,L){return L+10<=C.length&&(C[L]===73&&C[L+1]===68&&C[L+2]===51&&(C[L+3]<255&&C[L+4]<255&&(C[L+6]<128&&C[L+7]<128&&C[L+8]<128&&C[L+9]<128)))},b=function(C,L){return L+10<=C.length&&(C[L]===51&&C[L+1]===68&&C[L+2]===73&&(C[L+3]<255&&C[L+4]<255&&(C[L+6]<128&&C[L+7]<128&&C[L+8]<128&&C[L+9]<128)))},N=function(C,L){for(var D=L,O=0;G(C,L);){O+=10;var w=K(C,L+6);O+=w,b(C,L+10)&&(O+=10),L+=O}return O>0?C.subarray(D,D+O):void 0},K=function(C,L){var D=0;return D=(C[L]&127)<<21,D|=(C[L+1]&127)<<14,D|=(C[L+2]&127)<<7,D|=C[L+3]&127,D},W=function(C,L){return G(C,L)&&K(C,L+6)+10<=C.length-L},n=function(C){for(var L=m(C),D=0;D<L.length;D++){var O=L[D];if(I(O))return l(O)}return},I=function(C){return C&&C.key==="PRIV"&&C.info==="com.apple.streaming.transportStreamTimestamp"},y=function(C){var L=String.fromCharCode(C[0],C[1],C[2],C[3]),D=K(C,4),O=10;return{type:L,size:D,data:C.subarray(O,O+D)}},m=function(C){for(var L=0,D=[];G(C,L);){var O=K(C,L+6);L+=10;for(var w=L+O;L+8<w;){var x=y(C.subarray(L)),d=g(x);d&&D.push(d),L+=x.size+10}b(C,L)&&(L+=10)}return D},g=function(C){return C.type==="PRIV"?u(C):C.type[0]==="W"?p(C):c(C)},u=function(C){if(C.size<2)return;var L=o(C.data,!0),D=new Uint8Array(C.data.subarray(L.length+1));return{key:C.type,info:L,data:D.buffer}},c=function(C){if(C.size<2)return;if(C.type==="TXXX"){var L=1,D=o(C.data.subarray(L),!0);L+=D.length+1;var O=o(C.data.subarray(L));return{key:C.type,info:D,data:O}}var w=o(C.data.subarray(1));return{key:C.type,data:w}},p=function(C){if(C.type==="WXXX"){if(C.size<2)return;var L=1,D=o(C.data.subarray(L),!0);L+=D.length+1;var O=o(C.data.subarray(L));return{key:C.type,info:D,data:O}}var w=o(C.data);return{key:C.type,data:w}},l=function(C){if(C.data.byteLength===8){var L=new Uint8Array(C.data),D=L[3]&1,O=(L[4]<<23)+(L[5]<<15)+(L[6]<<7)+L[7];return O/=45,D&&(O+=4772185884e-2),Math.round(O)}return},o=function(C,L){L===void 0&&(L=!1);var D=A();if(D){var O=D.decode(C);if(L){var w=O.indexOf("\0");return w!==-1?O.substring(0,w):O}return O.replace(/\0/g,"")}for(var x=C.length,d,E,f,v="",T=0;T<x;){if(d=C[T++],d===0&&L)return v;if(d===0||d===3)continue;switch(d>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:v+=String.fromCharCode(d);break;case 12:case 13:E=C[T++],v+=String.fromCharCode((d&31)<<6|E&63);break;case 14:E=C[T++],f=C[T++],v+=String.fromCharCode((d&15)<<12|(E&63)<<6|(f&63)<<0);break;default:}}return v},s={decodeTextFrame:c},a;function A(){return!a&&typeof self.TextDecoder!="undefined"&&(a=new self.TextDecoder("utf-8")),a}},"./src/demux/mp3demuxer.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/demux/base-audio-demuxer.ts"),b=k("./src/demux/id3.ts"),N=k("./src/utils/logger.ts"),K=k("./src/demux/mpegaudio.ts");function W(y,m){y.prototype=Object.create(m.prototype),y.prototype.constructor=y,n(y,m)}function n(y,m){return n=Object.setPrototypeOf||function(u,c){return u.__proto__=c,u},n(y,m)}var I=function(y){W(m,y);function m(){return y.apply(this,arguments)||this}var g=m.prototype;return g.resetInitSegment=function(c,p,l){y.prototype.resetInitSegment.call(this,c,p,l),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:c,duration:l,inputTimeScale:9e4,dropped:0}},m.probe=function(c){if(!c)return!1;for(var p=b.getID3Data(c,0)||[],l=p.length,o=c.length;l<o;l++)if(K.probe(c,l))return N.logger.log("MPEG Audio sync word found !"),!0;return!1},g.canParse=function(c,p){return K.canParse(c,p)},g.appendFrame=function(c,p,l){return this.initPTS===null?void 0:K.appendFrame(c,p,l,this.initPTS,this.frameIndex)},m}(G.default);I.minProbeByteLength=4,X.default=I},"./src/demux/mp4demuxer.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/utils/mp4-tools.ts"),b=k("./src/demux/dummy-demuxed-track.ts"),N=function(){function K(n,I){this.remainderData=null,this.config=void 0,this.config=I}var W=K.prototype;return W.resetTimeStamp=function(){},W.resetInitSegment=function(){},W.resetContiguity=function(){},K.probe=function(I){return Object(G.findBox)({data:I,start:0,end:Math.min(I.length,16384)},["moof"]).length>0},W.demux=function(I){var y=I,m=Object(b.dummyTrack)();if(this.config.progressive){this.remainderData&&(y=Object(G.appendUint8Array)(this.remainderData,I));var g=Object(G.segmentValidRange)(y);this.remainderData=g.remainder,m.samples=g.valid||new Uint8Array}else m.samples=y;return{audioTrack:Object(b.dummyTrack)(),avcTrack:m,id3Track:Object(b.dummyTrack)(),textTrack:Object(b.dummyTrack)()}},W.flush=function(){var I=Object(b.dummyTrack)();return I.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(b.dummyTrack)(),avcTrack:I,id3Track:Object(b.dummyTrack)(),textTrack:Object(b.dummyTrack)()}},W.demuxSampleAes=function(I,y,m){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},W.destroy=function(){},K}();N.minProbeByteLength=1024,X.default=N},"./src/demux/mpegaudio.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"appendFrame",function(){return n}),k.d(X,"parseHeader",function(){return I}),k.d(X,"isHeaderPattern",function(){return y}),k.d(X,"isHeader",function(){return m}),k.d(X,"canParse",function(){return g}),k.d(X,"probe",function(){return u});var G=null,b=[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],N=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],K=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],W=[0,1,1,4];function n(c,p,l,o,s){if(l+24>p.length)return;var a=I(p,l);if(a&&l+a.frameLength<=p.length){var A=a.samplesPerFrame*9e4/a.sampleRate,S=o+s*A,C={unit:p.subarray(l,l+a.frameLength),pts:S,dts:S};return c.config=[],c.channelCount=a.channelCount,c.samplerate=a.sampleRate,c.samples.push(C),{sample:C,length:a.frameLength,missing:0}}}function I(c,p){var l=c[p+1]>>3&3,o=c[p+1]>>1&3,s=c[p+2]>>4&15,a=c[p+2]>>2&3;if(l!==1&&s!==0&&s!==15&&a!==3){var A=c[p+2]>>1&1,S=c[p+3]>>6,C=l===3?3-o:o===3?3:4,L=b[C*14+s-1]*1e3,D=l===3?0:l===2?1:2,O=N[D*3+a],w=S===3?1:2,x=K[l][o],d=W[o],E=x*8*d,f=Math.floor(x*L/O+A)*d;if(G===null){var v=navigator.userAgent||"",T=v.match(/Chrome\/(\d+)/i);G=T?parseInt(T[1]):0}var B=!!G&&G<=87;return B&&o===2&&L>=224e3&&S===0&&(c[p+3]=c[p+3]|128),{sampleRate:O,channelCount:w,frameLength:f,samplesPerFrame:E}}}function y(c,p){return c[p]===255&&(c[p+1]&224)===224&&(c[p+1]&6)!==0}function m(c,p){return p+1<c.length&&y(c,p)}function g(c,p){var l=4;return y(c,p)&&l<=c.length-p}function u(c,p){if(p+1<c.length&&y(c,p)){var l=4,o=I(c,p),s=l;o!=null&&o.frameLength&&(s=o.frameLength);var a=p+s;return a===c.length||m(c,a)}return!1}},"./src/demux/sample-aes.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/crypt/decrypter.ts"),b=k("./src/demux/tsdemuxer.ts"),N=function(){function K(n,I,y){this.keyData=void 0,this.decrypter=void 0,this.keyData=y,this.decrypter=new G.default(n,I,{removePKCS7Padding:!1})}var W=K.prototype;return W.decryptBuffer=function(I,y){this.decrypter.decrypt(I,this.keyData.key.buffer,this.keyData.iv.buffer,y)},W.decryptAacSample=function(I,y,m,g){var u=I[y].unit,c=u.subarray(16,u.length-u.length%16),p=c.buffer.slice(c.byteOffset,c.byteOffset+c.length),l=this;this.decryptBuffer(p,function(o){var s=new Uint8Array(o);u.set(s,16),g||l.decryptAacSamples(I,y+1,m)})},W.decryptAacSamples=function(I,y,m){for(;;y++){if(y>=I.length){m();return}if(I[y].unit.length<32)continue;var g=this.decrypter.isSync();if(this.decryptAacSample(I,y,m,g),!g)return}},W.getAvcEncryptedData=function(I){for(var y=Math.floor((I.length-48)/160)*16+16,m=new Int8Array(y),g=0,u=32;u<=I.length-16;u+=160,g+=16)m.set(I.subarray(u,u+16),g);return m},W.getAvcDecryptedUnit=function(I,y){for(var m=new Uint8Array(y),g=0,u=32;u<=I.length-16;u+=160,g+=16)I.set(m.subarray(g,g+16),u);return I},W.decryptAvcSample=function(I,y,m,g,u,c){var p=Object(b.discardEPB)(u.data),l=this.getAvcEncryptedData(p),o=this;this.decryptBuffer(l.buffer,function(s){u.data=o.getAvcDecryptedUnit(p,s),c||o.decryptAvcSamples(I,y,m+1,g)})},W.decryptAvcSamples=function(I,y,m,g){if(I instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;y++,m=0){if(y>=I.length){g();return}for(var u=I[y].units;!(m>=u.length);m++){var c=u[m];if(c.data.length<=48||c.type!==1&&c.type!==5)continue;var p=this.decrypter.isSync();if(this.decryptAvcSample(I,y,m,g,c,p),!p)return}}},K}();X.default=N},"./src/demux/transmuxer-interface.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return u});var G=k("./node_modules/webworkify-webpack/index.js"),b=k.n(G),N=k("./src/events.ts"),K=k("./src/demux/transmuxer.ts"),W=k("./src/utils/logger.ts"),n=k("./src/errors.ts"),I=k("./src/utils/mediasource-helper.ts"),y=k("./node_modules/eventemitter3/index.js"),m=k.n(y),g=Object(I.getMediaSource)()||{isTypeSupported:function(){return!1}},u=function(){function c(l,o,s,a){var A=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=l,this.id=o,this.onTransmuxComplete=s,this.onFlush=a;var S=l.config,C=function(x,d){d=d||{},d.frag=A.frag,d.id=A.id,l.trigger(x,d)};this.observer=new y.EventEmitter,this.observer.on(N.Events.FRAG_DECRYPTED,C),this.observer.on(N.Events.ERROR,C);var L={mp4:g.isTypeSupported("video/mp4"),mpeg:g.isTypeSupported("audio/mpeg"),mp3:g.isTypeSupported('audio/mp4; codecs="mp3"')},D=navigator.vendor;if(S.enableWorker&&typeof Worker!="undefined"){W.logger.log("demuxing in webworker");var O;try{O=this.worker=G("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),O.addEventListener("message",this.onwmsg),O.onerror=function(w){l.trigger(N.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(w.message+" ("+w.filename+":"+w.lineno+")")})},O.postMessage({cmd:"init",typeSupported:L,vendor:D,id:o,config:JSON.stringify(S)})}catch(w){W.logger.warn("Error in worker:",w),W.logger.error("Error while initializing DemuxerWorker, fallback to inline"),O&&self.URL.revokeObjectURL(O.objectURL),this.transmuxer=new K.default(this.observer,L,S,D,o),this.worker=null}}else this.transmuxer=new K.default(this.observer,L,S,D,o)}var p=c.prototype;return p.destroy=function(){var o=this.worker;if(o)o.removeEventListener("message",this.onwmsg),o.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var a=this.observer;a&&a.removeAllListeners(),this.observer=null},p.push=function(o,s,a,A,S,C,L,D,O,w){var x=this;O.transmuxing.start=self.performance.now();var d=this.transmuxer,E=this.worker,f=C?C.start:S.start,v=S.decryptdata,T=this.frag,B=!(T&&S.cc===T.cc),R=!(T&&O.level===T.level),j=T?O.sn-T.sn:-1,U=this.part?O.part-this.part.index:1,_=!R&&(j===1||j===0&&U===1),J=self.performance.now();(R||j||S.stats.parsing.start===0)&&(S.stats.parsing.start=J),C&&(U||!_)&&(C.stats.parsing.start=J);var ne=new K.TransmuxState(B,_,D,R,f);if(!_||B){W.logger.log("[transmuxer-interface, "+S.type+"]: Starting new transmux session for sn: "+O.sn+" p: "+O.part+" level: "+O.level+" id: "+O.id+`
|
|
discontinuity: `+B+`
|
|
trackSwitch: `+R+`
|
|
contiguous: `+_+`
|
|
accurateTimeOffset: `+D+`
|
|
timeOffset: `+f);var he=new K.TransmuxConfig(a,A,s,L,w);this.configureTransmuxer(he)}if(this.frag=S,this.part=C,E)E.postMessage({cmd:"demux",data:o,decryptdata:v,chunkMeta:O,state:ne},o instanceof ArrayBuffer?[o]:[]);else if(d){var be=d.push(o,v,O,ne);Object(K.isPromise)(be)?be.then(function(Ke){x.handleTransmuxComplete(Ke)}):this.handleTransmuxComplete(be)}},p.flush=function(o){var s=this;o.transmuxing.start=self.performance.now();var a=this.transmuxer,A=this.worker;if(A)A.postMessage({cmd:"flush",chunkMeta:o});else if(a){var S=a.flush(o);Object(K.isPromise)(S)?S.then(function(C){s.handleFlushResult(C,o)}):this.handleFlushResult(S,o)}},p.handleFlushResult=function(o,s){var a=this;o.forEach(function(A){a.handleTransmuxComplete(A)}),this.onFlush(s)},p.onWorkerMessage=function(o){var s=o.data,a=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,a.trigger(s.event,s.data);break}}},p.configureTransmuxer=function(o){var s=this.worker,a=this.transmuxer;s?s.postMessage({cmd:"configure",config:o}):a&&a.configure(o)},p.handleTransmuxComplete=function(o){o.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(o)},c}()},"./src/demux/transmuxer-worker.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return n});var G=k("./src/demux/transmuxer.ts"),b=k("./src/events.ts"),N=k("./src/utils/logger.ts"),K=k("./node_modules/eventemitter3/index.js"),W=k.n(K);function n(u){var c=new K.EventEmitter,p=function(o,s){u.postMessage({event:o,data:s})};c.on(b.Events.FRAG_DECRYPTED,p),c.on(b.Events.ERROR,p),u.addEventListener("message",function(l){var o=l.data;switch(o.cmd){case"init":{var s=JSON.parse(o.config);u.transmuxer=new G.default(c,o.typeSupported,s,o.vendor,o.id),Object(N.enableLogs)(s.debug),p("init",null);break}case"configure":{u.transmuxer.configure(o.config);break}case"demux":{var a=u.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(G.isPromise)(a)?a.then(function(C){I(u,C)}):I(u,a);break}case"flush":{var A=o.chunkMeta,S=u.transmuxer.flush(A);Object(G.isPromise)(S)?S.then(function(C){m(u,C,A)}):m(u,S,A);break}default:break}})}function I(u,c){if(g(c.remuxResult))return;var p=[],l=c.remuxResult,o=l.audio,s=l.video;o&&y(p,o),s&&y(p,s),u.postMessage({event:"transmuxComplete",data:c},p)}function y(u,c){c.data1&&u.push(c.data1.buffer),c.data2&&u.push(c.data2.buffer)}function m(u,c,p){c.forEach(function(l){I(u,l)}),u.postMessage({event:"flush",data:p})}function g(u){return!u.audio&&!u.video&&!u.text&&!u.id3&&!u.initSegment}},"./src/demux/transmuxer.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return s}),k.d(X,"isPromise",function(){return S}),k.d(X,"TransmuxConfig",function(){return C}),k.d(X,"TransmuxState",function(){return L});var G=k("./src/events.ts"),b=k("./src/errors.ts"),N=k("./src/crypt/decrypter.ts"),K=k("./src/demux/aacdemuxer.ts"),W=k("./src/demux/mp4demuxer.ts"),n=k("./src/demux/tsdemuxer.ts"),I=k("./src/demux/mp3demuxer.ts"),y=k("./src/remux/mp4-remuxer.ts"),m=k("./src/remux/passthrough-remuxer.ts"),g=k("./src/demux/chunk-cache.ts"),u=k("./src/utils/mp4-tools.ts"),c=k("./src/utils/logger.ts"),p;try{p=self.performance.now.bind(self.performance)}catch(D){c.logger.debug("Unable to use Performance API on this environment"),p=self.Date.now}var l=[{demux:n.default,remux:y.default},{demux:W.default,remux:m.default},{demux:K.default,remux:y.default},{demux:I.default,remux:y.default}],o=1024;l.forEach(function(D){var O=D.demux;o=Math.max(o,O.minProbeByteLength)});var s=function(){function D(w,x,d,E,f){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new g.default,this.observer=w,this.typeSupported=x,this.config=d,this.vendor=E,this.id=f}var O=D.prototype;return O.configure=function(x){this.transmuxConfig=x,this.decrypter&&this.decrypter.reset()},O.push=function(x,d,E,f){var v=this,T=E.transmuxing;T.executeStart=p();var B=new Uint8Array(x),R=this.cache,j=this.config,U=this.currentTransmuxState,_=this.transmuxConfig;f&&(this.currentTransmuxState=f);var J=a(B,d);if(J&&J.method==="AES-128"){var ne=this.getDecrypter();if(j.enableSoftwareAES){var he=ne.softwareDecrypt(B,J.key.buffer,J.iv.buffer);if(!he)return T.executeEnd=p(),A(E);B=new Uint8Array(he)}else return this.decryptionPromise=ne.webCryptoDecrypt(B,J.key.buffer,J.iv.buffer).then(function(Ue){var Ye=v.push(Ue,null,E);return v.decryptionPromise=null,Ye}),this.decryptionPromise}var be=f||U,Ke=be.contiguous,De=be.discontinuity,je=be.trackSwitch,Be=be.accurateTimeOffset,Ge=be.timeOffset,_e=_.audioCodec,Y=_.videoCodec,M=_.defaultInitPts,F=_.duration,Q=_.initSegmentData;if((De||je)&&this.resetInitSegment(Q,_e,Y,F),De&&this.resetInitialTimestamp(M),Ke||this.resetContiguity(),this.needsProbing(B,De,je)){if(R.dataLength){var te=R.flush();B=Object(u.appendUint8Array)(te,B)}this.configureTransmuxer(B,_)}var V=this.transmux(B,J,Ge,Be,E),ge=this.currentTransmuxState;return ge.contiguous=!0,ge.discontinuity=!1,ge.trackSwitch=!1,T.executeEnd=p(),V},O.flush=function(x){var d=this,E=x.transmuxing;E.executeStart=p();var f=this.decrypter,v=this.cache,T=this.currentTransmuxState,B=this.decryptionPromise;if(B)return B.then(function(){return d.flush(x)});var R=[],j=T.timeOffset;if(f){var U=f.flush();U&&R.push(this.push(U,null,x))}var _=v.dataLength;v.reset();var J=this.demuxer,ne=this.remuxer;if(!J||!ne)return _>=o&&this.observer.emit(G.Events.ERROR,G.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),E.executeEnd=p(),[A(x)];var he=J.flush(j);return S(he)?he.then(function(be){return d.flushRemux(R,be,x),R}):(this.flushRemux(R,he,x),R)},O.flushRemux=function(x,d,E){var f=d.audioTrack,v=d.avcTrack,T=d.id3Track,B=d.textTrack,R=this.currentTransmuxState,j=R.accurateTimeOffset,U=R.timeOffset;c.logger.log("[transmuxer.ts]: Flushed fragment "+E.sn+(E.part>-1?" p: "+E.part:"")+" of level "+E.level);var _=this.remuxer.remux(f,v,T,B,U,j,!0,this.id);x.push({remuxResult:_,chunkMeta:E}),E.transmuxing.executeEnd=p()},O.resetInitialTimestamp=function(x){var d=this.demuxer,E=this.remuxer;if(!d||!E)return;d.resetTimeStamp(x),E.resetTimeStamp(x)},O.resetContiguity=function(){var x=this.demuxer,d=this.remuxer;if(!x||!d)return;x.resetContiguity(),d.resetNextTimestamp()},O.resetInitSegment=function(x,d,E,f){var v=this.demuxer,T=this.remuxer;if(!v||!T)return;v.resetInitSegment(d,E,f),T.resetInitSegment(x,d,E)},O.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},O.transmux=function(x,d,E,f,v){var T;return d&&d.method==="SAMPLE-AES"?T=this.transmuxSampleAes(x,d,E,f,v):T=this.transmuxUnencrypted(x,E,f,v),T},O.transmuxUnencrypted=function(x,d,E,f){var v=this.demuxer.demux(x,d,!1,!this.config.progressive),T=v.audioTrack,B=v.avcTrack,R=v.id3Track,j=v.textTrack,U=this.remuxer.remux(T,B,R,j,d,E,!1,this.id);return{remuxResult:U,chunkMeta:f}},O.transmuxSampleAes=function(x,d,E,f,v){var T=this;return this.demuxer.demuxSampleAes(x,d,E).then(function(B){var R=T.remuxer.remux(B.audioTrack,B.avcTrack,B.id3Track,B.textTrack,E,f,!1,T.id);return{remuxResult:R,chunkMeta:v}})},O.configureTransmuxer=function(x,d){for(var E=this.config,f=this.observer,v=this.typeSupported,T=this.vendor,B=d.audioCodec,R=d.defaultInitPts,j=d.duration,U=d.initSegmentData,_=d.videoCodec,J,ne=0,he=l.length;ne<he;ne++)if(l[ne].demux.probe(x)){J=l[ne];break}J||(c.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),J={demux:W.default,remux:m.default});var be=this.demuxer,Ke=this.remuxer,De=J.remux,je=J.demux;(!Ke||!(Ke instanceof De))&&(this.remuxer=new De(f,E,v,T)),(!be||!(be instanceof je))&&(this.demuxer=new je(f,E,v),this.probe=je.probe),this.resetInitSegment(U,B,_,j),this.resetInitialTimestamp(R)},O.needsProbing=function(x,d,E){return!this.demuxer||!this.remuxer||d||E},O.getDecrypter=function(){var x=this.decrypter;return x||(x=this.decrypter=new N.default(this.observer,this.config)),x},D}();function a(D,O){var w=null;return D.byteLength>0&&O!=null&&O.key!=null&&O.iv!==null&&O.method!=null&&(w=O),w}var A=function(O){return{remuxResult:{},chunkMeta:O}};function S(D){return"then"in D&&D.then instanceof Function}var C=function(O,w,x,d,E){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=O,this.videoCodec=w,this.initSegmentData=x,this.duration=d,this.defaultInitPts=E},L=function(O,w,x,d,E){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=O,this.contiguous=w,this.accurateTimeOffset=x,this.trackSwitch=d,this.timeOffset=E}},"./src/demux/tsdemuxer.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"discardEPB",function(){return A});var G=k("./src/demux/adts.ts"),b=k("./src/demux/mpegaudio.ts"),N=k("./src/demux/exp-golomb.ts"),K=k("./src/demux/id3.ts"),W=k("./src/demux/sample-aes.ts"),n=k("./src/events.ts"),I=k("./src/utils/mp4-tools.ts"),y=k("./src/utils/logger.ts"),m=k("./src/errors.ts"),g={video:1,audio:2,id3:3,text:4},u=function(){function S(L,D,O){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=L,this.config=D,this.typeSupported=O}S.probe=function(D){var O=S.syncOffset(D);return O<0?!1:(O&&y.logger.warn("MPEG2-TS detected but first sync word found @ offset "+O+", junk ahead ?"),!0)},S.syncOffset=function(D){for(var O=Math.min(1e3,D.length-3*188),w=0;w<O;){if(D[w]===71&&D[w+188]===71&&D[w+2*188]===71)return w;w++}return-1},S.createTrack=function(D,O){return{container:D==="video"||D==="audio"?"video/mp2t":void 0,type:D,id:g[D],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:D==="audio"?O:void 0}};var C=S.prototype;return C.resetInitSegment=function(D,O,w){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=S.createTrack("video",w),this._audioTrack=S.createTrack("audio",w),this._id3Track=S.createTrack("id3",w),this._txtTrack=S.createTrack("text",w),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=D,this.videoCodec=O,this._duration=w},C.resetTimeStamp=function(){},C.resetContiguity=function(){var D=this._audioTrack,O=this._avcTrack,w=this._id3Track;D&&(D.pesData=null),O&&(O.pesData=null),w&&(w.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},C.demux=function(D,O,w,x){w===void 0&&(w=!1),x===void 0&&(x=!1),w||(this.sampleAes=null);var d,E=this._avcTrack,f=this._audioTrack,v=this._id3Track,T=E.pid,B=E.pesData,R=f.pid,j=v.pid,U=f.pesData,_=v.pesData,J=!1,ne=this.pmtParsed,he=this._pmtId,be=D.length;if(this.remainderData&&(D=Object(I.appendUint8Array)(this.remainderData,D),be=D.length,this.remainderData=null),be<188&&!x)return this.remainderData=D,{audioTrack:f,avcTrack:E,id3Track:v,textTrack:this._txtTrack};var Ke=Math.max(0,S.syncOffset(D));be-=(be+Ke)%188,be<D.byteLength&&!x&&(this.remainderData=new Uint8Array(D.buffer,be,D.buffer.byteLength-be));for(var De=Ke;De<be;De+=188)if(D[De]===71){var je=!!(D[De+1]&64),Be=((D[De+1]&31)<<8)+D[De+2],Ge=(D[De+3]&48)>>4,_e=void 0;if(Ge>1){if(_e=De+5+D[De+4],_e===De+188)continue}else _e=De+4;switch(Be){case T:je&&(B&&(d=o(B))&&this.parseAVCPES(d,!1),B={data:[],size:0}),B&&(B.data.push(D.subarray(_e,De+188)),B.size+=De+188-_e);break;case R:je&&(U&&(d=o(U))&&(f.isAAC?this.parseAACPES(d):this.parseMPEGPES(d)),U={data:[],size:0}),U&&(U.data.push(D.subarray(_e,De+188)),U.size+=De+188-_e);break;case j:je&&(_&&(d=o(_))&&this.parseID3PES(d),_={data:[],size:0}),_&&(_.data.push(D.subarray(_e,De+188)),_.size+=De+188-_e);break;case 0:je&&(_e+=D[_e]+1),he=this._pmtId=p(D,_e);break;case he:{je&&(_e+=D[_e]+1);var Y=l(D,_e,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,w);T=Y.avc,T>0&&(E.pid=T),R=Y.audio,R>0&&(f.pid=R,f.isAAC=Y.isAAC),j=Y.id3,j>0&&(v.pid=j),J&&!ne&&(y.logger.log("reparse from beginning"),J=!1,De=Ke-188),ne=this.pmtParsed=!0;break}case 17:case 8191:break;default:J=!0;break}}else this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});E.pesData=B,f.pesData=U,v.pesData=_;var M={audioTrack:f,avcTrack:E,id3Track:v,textTrack:this._txtTrack};return x&&this.extractRemainingSamples(M),M},C.flush=function(){var D=this.remainderData;this.remainderData=null;var O;return D?O=this.demux(D,-1,!1,!0):O={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(O),this.sampleAes?this.decrypt(O,this.sampleAes):O},C.extractRemainingSamples=function(D){var O=D.audioTrack,w=D.avcTrack,x=D.id3Track,d=w.pesData,E=O.pesData,f=x.pesData,v;d&&(v=o(d))?(this.parseAVCPES(v,!0),w.pesData=null):w.pesData=d,E&&(v=o(E))?(O.isAAC?this.parseAACPES(v):this.parseMPEGPES(v),O.pesData=null):(E!=null&&E.size&&y.logger.log("last AAC PES packet truncated,might overlap between fragments"),O.pesData=E),f&&(v=o(f))?(this.parseID3PES(v),x.pesData=null):x.pesData=f},C.demuxSampleAes=function(D,O,w){var x=this.demux(D,w,!0,!this.config.progressive),d=this.sampleAes=new W.default(this.observer,this.config,O);return this.decrypt(x,d)},C.decrypt=function(D,O){return new Promise(function(w){var x=D.audioTrack,d=D.avcTrack;x.samples&&x.isAAC?O.decryptAacSamples(x.samples,0,function(){d.samples?O.decryptAvcSamples(d.samples,0,0,function(){w(D)}):w(D)}):d.samples&&O.decryptAvcSamples(d.samples,0,0,function(){w(D)})})},C.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},C.parseAVCPES=function(D,O){var w=this,x=this._avcTrack,d=this.parseAVCNALu(D.data),E=!1,f=this.avcSample,v,T=!1;D.data=null,f&&d.length&&!x.audFound&&(s(f,x),f=this.avcSample=c(!1,D.pts,D.dts,"")),d.forEach(function(B){switch(B.type){case 1:{v=!0,f||(f=w.avcSample=c(!0,D.pts,D.dts,"")),E&&(f.debug+="NDR "),f.frame=!0;var R=B.data;if(T&&R.length>4){var j=new N.default(R).readSliceType();(j===2||j===4||j===7||j===9)&&(f.key=!0)}break}case 5:v=!0,f||(f=w.avcSample=c(!0,D.pts,D.dts,"")),E&&(f.debug+="IDR "),f.key=!0,f.frame=!0;break;case 6:{v=!0,E&&f&&(f.debug+="SEI ");var U=new N.default(A(B.data));U.readUByte();for(var _=0,J=0,ne=!1,he=0;!ne&&U.bytesAvailable>1;){_=0;do he=U.readUByte(),_+=he;while(he===255);J=0;do he=U.readUByte(),J+=he;while(he===255);if(_===4&&U.bytesAvailable!==0){ne=!0;var be=U.readUByte();if(be===181){var Ke=U.readUShort();if(Ke===49){var De=U.readUInt();if(De===1195456820){var je=U.readUByte();if(je===3){for(var Be=U.readUByte(),Ge=U.readUByte(),_e=31&Be,Y=[Be,Ge],M=0;M<_e;M++)Y.push(U.readUByte()),Y.push(U.readUByte()),Y.push(U.readUByte());a(w._txtTrack.samples,{type:3,pts:D.pts,bytes:Y})}}}}}else if(_===5&&U.bytesAvailable!==0){if(ne=!0,J>16){for(var F=[],Q=0;Q<16;Q++)F.push(U.readUByte().toString(16)),(Q===3||Q===5||Q===7||Q===9)&&F.push("-");for(var te=J-16,V=new Uint8Array(te),ge=0;ge<te;ge++)V[ge]=U.readUByte();a(w._txtTrack.samples,{pts:D.pts,payloadType:_,uuid:F.join(""),userData:Object(K.utf8ArrayToStr)(V),userDataBytes:V})}}else if(J<U.bytesAvailable)for(var Ue=0;Ue<J;Ue++)U.readUByte()}break}case 7:if(v=!0,T=!0,E&&f&&(f.debug+="SPS "),!x.sps){var Ye=new N.default(B.data),de=Ye.readSPS();x.width=de.width,x.height=de.height,x.pixelRatio=de.pixelRatio,x.sps=[B.data],x.duration=w._duration;for(var xe=B.data.subarray(1,4),Me="avc1.",Fe=0;Fe<3;Fe++){var $e=xe[Fe].toString(16);$e.length<2&&($e="0"+$e),Me+=$e}x.codec=Me}break;case 8:v=!0,E&&f&&(f.debug+="PPS "),x.pps||(x.pps=[B.data]);break;case 9:v=!1,x.audFound=!0,f&&s(f,x),f=w.avcSample=c(!1,D.pts,D.dts,E?"AUD ":"");break;case 12:v=!1;break;default:v=!1,f&&(f.debug+="unknown NAL "+B.type+" ");break}if(f&&v){var st=f.units;st.push(B)}}),O&&f&&(s(f,x),this.avcSample=null)},C.getLastNalUnit=function(){var D,O=this.avcSample,w;if(!O||O.units.length===0){var x=this._avcTrack.samples;O=x[x.length-1]}if((D=O)!==null&&D!==void 0&&D.units){var d=O.units;w=d[d.length-1]}return w},C.parseAVCNALu=function(D){var O=D.byteLength,w=this._avcTrack,x=w.naluState||0,d=x,E=[],f=0,v,T,B,R=-1,j=0;for(x===-1&&(R=0,j=D[0]&31,x=0,f=1);f<O;){if(v=D[f++],!x){x=v?0:1;continue}if(x===1){x=v?0:2;continue}if(!v)x=3;else if(v===1){if(R>=0){var U={data:D.subarray(R,f-x-1),type:j};E.push(U)}else{var _=this.getLastNalUnit();if(_&&(d&&f<=4-d&&(_.state&&(_.data=_.data.subarray(0,_.data.byteLength-d))),T=f-x-1,T>0)){var J=new Uint8Array(_.data.byteLength+T);J.set(_.data,0),J.set(D.subarray(0,T),_.data.byteLength),_.data=J,_.state=0}}f<O?(B=D[f]&31,R=f,j=B,x=0):x=-1}else x=0}if(R>=0&&x>=0){var ne={data:D.subarray(R,O),type:j,state:x};E.push(ne)}if(E.length===0){var he=this.getLastNalUnit();if(he){var be=new Uint8Array(he.data.byteLength+D.byteLength);be.set(he.data,0),be.set(D,he.data.byteLength),he.data=be}}return w.naluState=x,E},C.parseAACPES=function(D){var O=0,w=this._audioTrack,x=this.aacOverFlow,d=D.data;if(x){this.aacOverFlow=null;var E=x.sample.unit.byteLength,f=Math.min(x.missing,E),v=E-f;x.sample.unit.set(d.subarray(0,f),v),w.samples.push(x.sample),O=x.missing}var T,B;for(T=O,B=d.length;T<B-1&&!G.isHeader(d,T);T++);if(T!==O){var R,j;if(T<B-1?(R="AAC PES did not start with ADTS header,offset:"+T,j=!1):(R="no ADTS header found in AAC PES",j=!0),y.logger.warn("parsing error:"+R),this.observer.emit(n.Events.ERROR,n.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:j,reason:R}),j)return}G.initTrackConfig(w,this.observer,d,T,this.audioCodec);var U;if(D.pts!==void 0)U=D.pts;else if(x){var _=G.getFrameDuration(w.samplerate);U=x.sample.pts+_}else{y.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var J=0;T<B;)if(G.isHeader(d,T)){if(T+5<B){var ne=G.appendFrame(w,d,T,U,J);if(ne)if(ne.missing)this.aacOverFlow=ne;else{T+=ne.length,J++;continue}}break}else T++},C.parseMPEGPES=function(D){var O=D.data,w=O.length,x=0,d=0,E=D.pts;if(E===void 0){y.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;d<w;)if(b.isHeader(O,d)){var f=b.appendFrame(this._audioTrack,O,d,E,x);if(f)d+=f.length,x++;else break}else d++},C.parseID3PES=function(D){if(D.pts===void 0){y.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(D)},S}();u.minProbeByteLength=188;function c(S,C,L,D){return{key:S,frame:!1,pts:C,dts:L,units:[],debug:D,length:0}}function p(S,C){return(S[C+10]&31)<<8|S[C+11]}function l(S,C,L,D){var O={audio:-1,avc:-1,id3:-1,isAAC:!0},w=(S[C+1]&15)<<8|S[C+2],x=C+3+w-4,d=(S[C+10]&15)<<8|S[C+11];for(C+=12+d;C<x;){var E=(S[C+1]&31)<<8|S[C+2];switch(S[C]){case 207:if(!D){y.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:O.audio===-1&&(O.audio=E);break;case 21:O.id3===-1&&(O.id3=E);break;case 219:if(!D){y.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:O.avc===-1&&(O.avc=E);break;case 3:case 4:L?O.audio===-1&&(O.audio=E,O.isAAC=!1):y.logger.log("MPEG audio found, not supported in this browser");break;case 36:y.logger.warn("Unsupported HEVC stream type found");break;default:break}C+=((S[C+3]&15)<<8|S[C+4])+5}return O}function o(S){var C=0,L,D,O,w,x,d=S.data;if(!S||S.size===0)return null;for(;d[0].length<19&&d.length>1;){var E=new Uint8Array(d[0].length+d[1].length);E.set(d[0]),E.set(d[1],d[0].length),d[0]=E,d.splice(1,1)}L=d[0];var f=(L[0]<<16)+(L[1]<<8)+L[2];if(f===1){if(D=(L[4]<<8)+L[5],D&&D>S.size-6)return null;var v=L[7];v&192&&(w=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,v&64?(x=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,w-x>60*9e4&&(y.logger.warn(Math.round((w-x)/9e4)+"s delta between PTS and DTS, align them"),w=x)):x=w),O=L[8];var T=O+9;if(S.size<=T)return null;S.size-=T;for(var B=new Uint8Array(S.size),R=0,j=d.length;R<j;R++){L=d[R];var U=L.byteLength;if(T)if(T>U){T-=U;continue}else L=L.subarray(T),U-=T,T=0;B.set(L,C),C+=U}return D&&(D-=O+3),{data:B,pts:w,dts:x,len:D}}return null}function s(S,C){if(S.units.length&&S.frame){if(S.pts===void 0){var L=C.samples,D=L.length;if(D){var O=L[D-1];S.pts=O.pts,S.dts=O.dts}else{C.dropped++;return}}C.samples.push(S)}S.debug.length&&y.logger.log(S.pts+"/"+S.dts+":"+S.debug)}function a(S,C){var L=S.length;if(L>0){if(C.pts>=S[L-1].pts)S.push(C);else for(var D=L-1;D>=0;D--)if(C.pts<S[D].pts){S.splice(D,0,C);break}}else S.push(C)}function A(S){for(var C=S.byteLength,L=[],D=1;D<C-2;)S[D]===0&&S[D+1]===0&&S[D+2]===3?(L.push(D+2),D+=2):D++;if(L.length===0)return S;var O=C-L.length,w=new Uint8Array(O),x=0;for(D=0;D<O;x++,D++)x===L[0]&&(x++,L.shift()),w[D]=S[x];return w}X.default=u},"./src/errors.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"ErrorTypes",function(){return G}),k.d(X,"ErrorDetails",function(){return b});var G;(function(N){N.NETWORK_ERROR="networkError",N.MEDIA_ERROR="mediaError",N.KEY_SYSTEM_ERROR="keySystemError",N.MUX_ERROR="muxError",N.OTHER_ERROR="otherError"})(G||(G={}));var b;(function(N){N.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",N.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",N.KEY_SYSTEM_NO_SESSION="keySystemNoSession",N.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",N.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",N.MANIFEST_LOAD_ERROR="manifestLoadError",N.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",N.MANIFEST_PARSING_ERROR="manifestParsingError",N.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",N.LEVEL_EMPTY_ERROR="levelEmptyError",N.LEVEL_LOAD_ERROR="levelLoadError",N.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",N.LEVEL_SWITCH_ERROR="levelSwitchError",N.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",N.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",N.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",N.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",N.FRAG_LOAD_ERROR="fragLoadError",N.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",N.FRAG_DECRYPT_ERROR="fragDecryptError",N.FRAG_PARSING_ERROR="fragParsingError",N.REMUX_ALLOC_ERROR="remuxAllocError",N.KEY_LOAD_ERROR="keyLoadError",N.KEY_LOAD_TIMEOUT="keyLoadTimeOut",N.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",N.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",N.BUFFER_APPEND_ERROR="bufferAppendError",N.BUFFER_APPENDING_ERROR="bufferAppendingError",N.BUFFER_STALLED_ERROR="bufferStalledError",N.BUFFER_FULL_ERROR="bufferFullError",N.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",N.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",N.INTERNAL_EXCEPTION="internalException",N.INTERNAL_ABORTED="aborted",N.UNKNOWN="unknown"})(b||(b={}))},"./src/events.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"Events",function(){return G});var G;(function(b){b.MEDIA_ATTACHING="hlsMediaAttaching",b.MEDIA_ATTACHED="hlsMediaAttached",b.MEDIA_DETACHING="hlsMediaDetaching",b.MEDIA_DETACHED="hlsMediaDetached",b.BUFFER_RESET="hlsBufferReset",b.BUFFER_CODECS="hlsBufferCodecs",b.BUFFER_CREATED="hlsBufferCreated",b.BUFFER_APPENDING="hlsBufferAppending",b.BUFFER_APPENDED="hlsBufferAppended",b.BUFFER_EOS="hlsBufferEos",b.BUFFER_FLUSHING="hlsBufferFlushing",b.BUFFER_FLUSHED="hlsBufferFlushed",b.MANIFEST_LOADING="hlsManifestLoading",b.MANIFEST_LOADED="hlsManifestLoaded",b.MANIFEST_PARSED="hlsManifestParsed",b.LEVEL_SWITCHING="hlsLevelSwitching",b.LEVEL_SWITCHED="hlsLevelSwitched",b.LEVEL_LOADING="hlsLevelLoading",b.LEVEL_LOADED="hlsLevelLoaded",b.LEVEL_UPDATED="hlsLevelUpdated",b.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",b.LEVELS_UPDATED="hlsLevelsUpdated",b.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",b.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",b.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",b.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",b.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",b.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",b.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",b.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",b.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",b.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",b.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",b.CUES_PARSED="hlsCuesParsed",b.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",b.INIT_PTS_FOUND="hlsInitPtsFound",b.FRAG_LOADING="hlsFragLoading",b.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",b.FRAG_LOADED="hlsFragLoaded",b.FRAG_DECRYPTED="hlsFragDecrypted",b.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",b.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",b.FRAG_PARSING_METADATA="hlsFragParsingMetadata",b.FRAG_PARSED="hlsFragParsed",b.FRAG_BUFFERED="hlsFragBuffered",b.FRAG_CHANGED="hlsFragChanged",b.FPS_DROP="hlsFpsDrop",b.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",b.ERROR="hlsError",b.DESTROYING="hlsDestroying",b.KEY_LOADING="hlsKeyLoading",b.KEY_LOADED="hlsKeyLoaded",b.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",b.BACK_BUFFER_REACHED="hlsBackBufferReached"})(G||(G={}))},"./src/hls.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return S});var G=k("./node_modules/url-toolkit/src/url-toolkit.js"),b=k.n(G),N=k("./src/loader/playlist-loader.ts"),K=k("./src/loader/key-loader.ts"),W=k("./src/controller/id3-track-controller.ts"),n=k("./src/controller/latency-controller.ts"),I=k("./src/controller/level-controller.ts"),y=k("./src/controller/fragment-tracker.ts"),m=k("./src/controller/stream-controller.ts"),g=k("./src/is-supported.ts"),u=k("./src/utils/logger.ts"),c=k("./src/config.ts"),p=k("./node_modules/eventemitter3/index.js"),l=k.n(p),o=k("./src/events.ts"),s=k("./src/errors.ts");function a(C,L){for(var D=0;D<L.length;D++){var O=L[D];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(C,O.key,O)}}function A(C,L,D){return L&&a(C.prototype,L),D&&a(C,D),C}var S=function(){C.isSupported=function(){return Object(g.isSupported)()};function C(D){D===void 0&&(D={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new p.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var O=this.config=Object(c.mergeConfig)(C.DefaultConfig,D);this.userConfig=D,Object(u.enableLogs)(O.debug),this._autoLevelCapping=-1,O.progressive&&Object(c.enableStreamingMode)(O);var w=O.abrController,x=O.bufferController,d=O.capLevelController,E=O.fpsController,f=this.abrController=new w(this),v=this.bufferController=new x(this),T=this.capLevelController=new d(this),B=new E(this),R=new N.default(this),j=new K.default(this),U=new W.default(this),_=this.levelController=new I.default(this),J=new y.FragmentTracker(this),ne=this.streamController=new m.default(this,J);T.setStreamController(ne),B.setStreamController(ne);var he=[_,ne];this.networkControllers=he;var be=[R,j,f,v,T,B,U,J];this.audioTrackController=this.createController(O.audioTrackController,null,he),this.createController(O.audioStreamController,J,he),this.subtitleTrackController=this.createController(O.subtitleTrackController,null,he),this.createController(O.subtitleStreamController,J,he),this.createController(O.timelineController,null,be),this.emeController=this.createController(O.emeController,null,be),this.cmcdController=this.createController(O.cmcdController,null,be),this.latencyController=this.createController(n.default,null,be),this.coreComponents=be}var L=C.prototype;return L.createController=function(O,w,x){if(O){var d=w?new O(this,w):new O(this);return x&&x.push(d),d}return null},L.on=function(O,w,x){x===void 0&&(x=this),this._emitter.on(O,w,x)},L.once=function(O,w,x){x===void 0&&(x=this),this._emitter.once(O,w,x)},L.removeAllListeners=function(O){this._emitter.removeAllListeners(O)},L.off=function(O,w,x,d){x===void 0&&(x=this),this._emitter.off(O,w,x,d)},L.listeners=function(O){return this._emitter.listeners(O)},L.emit=function(O,w,x){return this._emitter.emit(O,w,x)},L.trigger=function(O,w){if(this.config.debug)return this.emit(O,O,w);try{return this.emit(O,O,w)}catch(x){u.logger.error("An internal error happened while handling event "+O+'. Error message: "'+x.message+'". Here is a stacktrace:',x),this.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:O,error:x})}return!1},L.listenerCount=function(O){return this._emitter.listenerCount(O)},L.destroy=function(){u.logger.log("destroy"),this.trigger(o.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(O){return O.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(O){return O.destroy()}),this.coreComponents.length=0},L.attachMedia=function(O){u.logger.log("attachMedia"),this._media=O,this.trigger(o.Events.MEDIA_ATTACHING,{media:O})},L.detachMedia=function(){u.logger.log("detachMedia"),this.trigger(o.Events.MEDIA_DETACHING,void 0),this._media=null},L.loadSource=function(O){this.stopLoad();var w=this.media,x=this.url,d=this.url=G.buildAbsoluteURL(self.location.href,O,{alwaysNormalize:!0});u.logger.log("loadSource:"+d),w&&x&&x!==d&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(w)),this.trigger(o.Events.MANIFEST_LOADING,{url:O})},L.startLoad=function(O){O===void 0&&(O=-1),u.logger.log("startLoad("+O+")"),this.networkControllers.forEach(function(w){w.startLoad(O)})},L.stopLoad=function(){u.logger.log("stopLoad"),this.networkControllers.forEach(function(O){O.stopLoad()})},L.swapAudioCodec=function(){u.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},L.recoverMediaError=function(){u.logger.log("recoverMediaError");var O=this._media;this.detachMedia(),O&&this.attachMedia(O)},L.removeLevel=function(O,w){w===void 0&&(w=0),this.levelController.removeLevel(O,w)},A(C,[{key:"levels",get:function(){var O=this.levelController.levels;return O||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(O){u.logger.log("set currentLevel:"+O),this.loadLevel=O,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(O){u.logger.log("set nextLevel:"+O),this.levelController.manualLevel=O,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(O){u.logger.log("set loadLevel:"+O),this.levelController.manualLevel=O}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(O){this.levelController.nextLoadLevel=O}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(O){u.logger.log("set firstLevel:"+O),this.levelController.firstLevel=O}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(O){u.logger.log("set startLevel:"+O),O!==-1&&(O=Math.max(O,this.minAutoLevel)),this.levelController.startLevel=O}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(O){var w=!!O;w!==this.config.capLevelToPlayerSize&&(w?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=w)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(O){this._autoLevelCapping!==O&&(u.logger.log("set autoLevelCapping:"+O),this._autoLevelCapping=O)}},{key:"bandwidthEstimate",get:function(){var O=this.abrController.bwEstimator;return O?O.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var O=this.levels,w=this.config.minAutoBitrate;if(!O)return 0;for(var x=O.length,d=0;d<x;d++)if(O[d].maxBitrate>w)return d;return 0}},{key:"maxAutoLevel",get:function(){var O=this.levels,w=this.autoLevelCapping,x;return w===-1&&O&&O.length?x=O.length-1:x=w,x}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(O){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,O)}},{key:"audioTracks",get:function(){var O=this.audioTrackController;return O?O.audioTracks:[]}},{key:"audioTrack",get:function(){var O=this.audioTrackController;return O?O.audioTrack:-1},set:function(O){var w=this.audioTrackController;w&&(w.audioTrack=O)}},{key:"subtitleTracks",get:function(){var O=this.subtitleTrackController;return O?O.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var O=this.subtitleTrackController;return O?O.subtitleTrack:-1},set:function(O){var w=this.subtitleTrackController;w&&(w.subtitleTrack=O)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var O=this.subtitleTrackController;return O?O.subtitleDisplay:!1},set:function(O){var w=this.subtitleTrackController;w&&(w.subtitleDisplay=O)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(O){this.config.lowLatencyMode=O}},{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.1.2"}},{key:"Events",get:function(){return o.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return C.defaultConfig?C.defaultConfig:c.hlsDefaultConfig},set:function(O){C.defaultConfig=O}}]),C}();S.defaultConfig=void 0},"./src/is-supported.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"isSupported",function(){return N}),k.d(X,"changeTypeSupported",function(){return K});var G=k("./src/utils/mediasource-helper.ts");function b(){return self.SourceBuffer||self.WebKitSourceBuffer}function N(){var W=Object(G.getMediaSource)();if(!W)return!1;var n=b(),I=W&&typeof W.isTypeSupported=="function"&&W.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),y=!n||n.prototype&&typeof n.prototype.appendBuffer=="function"&&typeof n.prototype.remove=="function";return!!I&&!!y}function K(){var W,n=b();return typeof(n==null||((W=n.prototype)===null||W===void 0)?void 0:W.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return u}),k.d(X,"LoadError",function(){return p});var G=k("./src/polyfills/number.ts"),b=k("./src/errors.ts");function N(l,o){l.prototype=Object.create(o.prototype),l.prototype.constructor=l,y(l,o)}function K(l){var o=typeof Map=="function"?new Map:void 0;return K=function(a){if(a===null||!I(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof o!="undefined"){if(o.has(a))return o.get(a);o.set(a,A)}function A(){return W(a,arguments,m(this).constructor)}return A.prototype=Object.create(a.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),y(A,a)},K(l)}function W(l,o,s){return n()?W=Reflect.construct:W=function(A,S,C){var L=[null];L.push.apply(L,S);var D=Function.bind.apply(A,L),O=new D;return C&&y(O,C.prototype),O},W.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(l){return!1}}function I(l){return Function.toString.call(l).indexOf("[native code]")!==-1}function y(l,o){return y=Object.setPrototypeOf||function(a,A){return a.__proto__=A,a},y(l,o)}function m(l){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},m(l)}var g=Math.pow(2,17),u=function(){function l(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var o=l.prototype;return o.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},o.abort=function(){this.loader&&this.loader.abort()},o.load=function(a,A){var S=this,C=a.url;if(!C)return Promise.reject(new p({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,networkDetails:null},"Fragment does not have a "+(C?"part list":"url")));this.abort();var L=this.config,D=L.fLoader,O=L.loader;return new Promise(function(w,x){S.loader&&S.loader.destroy();var d=S.loader=a.loader=D?new D(L):new O(L),E=c(a),f={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:g};a.stats=d.stats,d.load(E,f,{onSuccess:function(T,B,R,j){S.resetLoader(a,d),w({frag:a,part:null,payload:T.data,networkDetails:j})},onError:function(T,B,R){S.resetLoader(a,d),x(new p({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,response:T,networkDetails:R}))},onAbort:function(T,B,R){S.resetLoader(a,d),x(new p({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,networkDetails:R}))},onTimeout:function(T,B,R){S.resetLoader(a,d),x(new p({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,networkDetails:R}))},onProgress:function(T,B,R,j){A&&A({frag:a,part:null,payload:R,networkDetails:j})}})})},o.loadPart=function(a,A,S){var C=this;this.abort();var L=this.config,D=L.fLoader,O=L.loader;return new Promise(function(w,x){C.loader&&C.loader.destroy();var d=C.loader=a.loader=D?new D(L):new O(L),E=c(a,A),f={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:g};A.stats=d.stats,d.load(E,f,{onSuccess:function(T,B,R,j){C.resetLoader(a,d),C.updateStatsFromPart(a,A);var U={frag:a,part:A,payload:T.data,networkDetails:j};S(U),w(U)},onError:function(T,B,R){C.resetLoader(a,d),x(new p({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:a,part:A,response:T,networkDetails:R}))},onAbort:function(T,B,R){a.stats.aborted=A.stats.aborted,C.resetLoader(a,d),x(new p({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:a,part:A,networkDetails:R}))},onTimeout:function(T,B,R){C.resetLoader(a,d),x(new p({type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:a,part:A,networkDetails:R}))}})})},o.updateStatsFromPart=function(a,A){var S=a.stats,C=A.stats,L=C.total;if(S.loaded+=C.loaded,L){var D=Math.round(a.duration/A.duration),O=Math.min(Math.round(S.loaded/L),D),w=D-O,x=w*Math.round(S.loaded/O);S.total=S.loaded+x}else S.total=Math.max(S.loaded,S.total);var d=S.loading,E=C.loading;d.start?d.first+=E.first-E.start:(d.start=E.start,d.first=E.first),d.end=E.end},o.resetLoader=function(a,A){a.loader=null,this.loader===A&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),A.destroy()},l}();function c(l,o){o===void 0&&(o=null);var s=o||l,a={frag:l,part:o,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},A=s.byteRangeStartOffset,S=s.byteRangeEndOffset;return Object(G.isFiniteNumber)(A)&&Object(G.isFiniteNumber)(S)&&(a.rangeStart=A,a.rangeEnd=S),a}var p=function(l){N(o,l);function o(s){for(var a,A=arguments.length,S=new Array(A>1?A-1:0),C=1;C<A;C++)S[C-1]=arguments[C];return a=l.call.apply(l,[this].concat(S))||this,a.data=void 0,a.data=s,a}return o}(K(Error))},"./src/loader/fragment.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"ElementaryStreamTypes",function(){return u}),k.d(X,"BaseSegment",function(){return c}),k.d(X,"Fragment",function(){return p}),k.d(X,"Part",function(){return l});var G=k("./src/polyfills/number.ts"),b=k("./node_modules/url-toolkit/src/url-toolkit.js"),N=k.n(b),K=k("./src/utils/logger.ts"),W=k("./src/loader/level-key.ts"),n=k("./src/loader/load-stats.ts");function I(o,s){o.prototype=Object.create(s.prototype),o.prototype.constructor=o,y(o,s)}function y(o,s){return y=Object.setPrototypeOf||function(A,S){return A.__proto__=S,A},y(o,s)}function m(o,s){for(var a=0;a<s.length;a++){var A=s[a];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(o,A.key,A)}}function g(o,s,a){return s&&m(o.prototype,s),a&&m(o,a),o}var u;(function(o){o.AUDIO="audio",o.VIDEO="video",o.AUDIOVIDEO="audiovideo"})(u||(u={}));var c=function(){function o(a){var A;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(A={},A[u.AUDIO]=null,A[u.VIDEO]=null,A[u.AUDIOVIDEO]=null,A),this.baseurl=a}var s=o.prototype;return s.setByteRange=function(A,S){var C=A.split("@",2),L=[];C.length===1?L[0]=S?S.byteRangeEndOffset:0:L[0]=parseInt(C[1]),L[1]=parseInt(C[0])+L[0],this._byteRange=L},g(o,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(b.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(A){this._url=A}}]),o}(),p=function(o){I(s,o);function s(A,S){var C;return C=o.call(this,S)||this,C._decryptdata=null,C.rawProgramDateTime=null,C.programDateTime=null,C.tagList=[],C.duration=0,C.sn=0,C.levelkey=void 0,C.type=void 0,C.loader=null,C.level=-1,C.cc=0,C.startPTS=void 0,C.endPTS=void 0,C.appendedPTS=void 0,C.startDTS=void 0,C.endDTS=void 0,C.start=0,C.deltaPTS=void 0,C.maxStartPTS=void 0,C.minEndPTS=void 0,C.stats=new n.LoadStats,C.urlId=0,C.data=void 0,C.bitrateTest=!1,C.title=null,C.initSegment=null,C.type=A,C}var a=s.prototype;return a.createInitializationVector=function(S){for(var C=new Uint8Array(16),L=12;L<16;L++)C[L]=S>>8*(15-L)&255;return C},a.setDecryptDataFromLevelKey=function(S,C){var L=S;return(S==null?void 0:S.method)==="AES-128"&&S.uri&&!S.iv&&(L=W.LevelKey.fromURI(S.uri),L.method=S.method,L.iv=this.createInitializationVector(C),L.keyFormat="identity"),L},a.setElementaryStreamInfo=function(S,C,L,D,O,w){w===void 0&&(w=!1);var x=this.elementaryStreams,d=x[S];if(!d){x[S]={startPTS:C,endPTS:L,startDTS:D,endDTS:O,partial:w};return}d.startPTS=Math.min(d.startPTS,C),d.endPTS=Math.max(d.endPTS,L),d.startDTS=Math.min(d.startDTS,D),d.endDTS=Math.max(d.endDTS,O)},a.clearElementaryStreamInfo=function(){var S=this.elementaryStreams;S[u.AUDIO]=null,S[u.VIDEO]=null,S[u.AUDIOVIDEO]=null},g(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var S=this.sn;typeof S!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&K.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),S=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,S)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(G.isFiniteNumber)(this.programDateTime))return null;var S=Object(G.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+S*1e3}},{key:"encrypted",get:function(){var S;return!!((S=this.decryptdata)!==null&&S!==void 0&&S.keyFormat&&this.decryptdata.uri)}}]),s}(c),l=function(o){I(s,o);function s(a,A,S,C,L){var D;D=o.call(this,S)||this,D.fragOffset=0,D.duration=0,D.gap=!1,D.independent=!1,D.relurl=void 0,D.fragment=void 0,D.index=void 0,D.stats=new n.LoadStats,D.duration=a.decimalFloatingPoint("DURATION"),D.gap=a.bool("GAP"),D.independent=a.bool("INDEPENDENT"),D.relurl=a.enumeratedString("URI"),D.fragment=A,D.index=C;var O=a.enumeratedString("BYTERANGE");return O&&D.setByteRange(O,L),L&&(D.fragOffset=L.fragOffset+L.duration),D}return g(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var A=this.elementaryStreams;return!!(A.audio||A.video||A.audiovideo)}}]),s}(c)},"./src/loader/key-loader.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return K});var G=k("./src/events.ts"),b=k("./src/errors.ts"),N=k("./src/utils/logger.ts"),K=function(){function W(I){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=I,this._registerListeners()}var n=W.prototype;return n._registerListeners=function(){this.hls.on(G.Events.KEY_LOADING,this.onKeyLoading,this)},n._unregisterListeners=function(){this.hls.off(G.Events.KEY_LOADING,this.onKeyLoading)},n.destroy=function(){this._unregisterListeners();for(var y in this.loaders){var m=this.loaders[y];m&&m.destroy()}this.loaders={}},n.onKeyLoading=function(y,m){var g=m.frag,u=g.type,c=this.loaders[u];if(!g.decryptdata){N.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var p=g.decryptdata.uri;if(p!==this.decrypturl||this.decryptkey===null){var l=this.hls.config;if(c&&(N.logger.warn("abort previous key loader for type:"+u),c.abort()),!p){N.logger.warn("key uri is falsy");return}var o=l.loader,s=g.loader=this.loaders[u]=new o(l);this.decrypturl=p,this.decryptkey=null;var a={url:p,frag:g,responseType:"arraybuffer"},A={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},S={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(a,A,S)}else this.decryptkey&&(g.decryptdata.key=this.decryptkey,this.hls.trigger(G.Events.KEY_LOADED,{frag:g}))},n.loadsuccess=function(y,m,g){var u=g.frag;if(!u.decryptdata){N.logger.error("after key load, decryptdata unset");return}this.decryptkey=u.decryptdata.key=new Uint8Array(y.data),u.loader=null,delete this.loaders[u.type],this.hls.trigger(G.Events.KEY_LOADED,{frag:u})},n.loaderror=function(y,m){var g=m.frag,u=g.loader;u&&u.abort(),delete this.loaders[g.type],this.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:g,response:y})},n.loadtimeout=function(y,m){var g=m.frag,u=g.loader;u&&u.abort(),delete this.loaders[g.type],this.hls.trigger(G.Events.ERROR,{type:b.ErrorTypes.NETWORK_ERROR,details:b.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:g})},W}()},"./src/loader/level-details.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"LevelDetails",function(){return W});var G=k("./src/polyfills/number.ts");function b(n,I){for(var y=0;y<I.length;y++){var m=I[y];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}function N(n,I,y){return I&&b(n.prototype,I),y&&b(n,y),n}var K=10,W=function(){function n(y){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=y}var I=n.prototype;return I.reloaded=function(m){if(!m){this.advanced=!0,this.updated=!0;return}var g=this.lastPartSn-m.lastPartSn,u=this.lastPartIndex-m.lastPartIndex;this.updated=this.endSN!==m.endSN||!!u||!!g,this.advanced=this.endSN>m.endSN||g>0||g===0&&u>0,this.updated||this.advanced?this.misses=Math.floor(m.misses*.6):this.misses=m.misses+1,this.availabilityDelay=m.availabilityDelay},N(n,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(G.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||K}},{key:"drift",get:function(){var m=this.driftEndTime-this.driftStartTime;if(m>0){var g=this.driftEnd-this.driftStart;return g*1e3/m}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var m;return(m=this.fragments)!==null&&m!==void 0&&m.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 m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),n}()},"./src/loader/level-key.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"LevelKey",function(){return W});var G=k("./node_modules/url-toolkit/src/url-toolkit.js"),b=k.n(G);function N(n,I){for(var y=0;y<I.length;y++){var m=I[y];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(n,m.key,m)}}function K(n,I,y){return I&&N(n.prototype,I),y&&N(n,y),n}var W=function(){n.fromURL=function(y,m){return new n(y,m)},n.fromURI=function(y){return new n(y)};function n(I,y){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,y?this._uri=Object(G.buildAbsoluteURL)(I,y,{alwaysNormalize:!0}):this._uri=I}return K(n,[{key:"uri",get:function(){return this._uri}}]),n}()},"./src/loader/load-stats.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"LoadStats",function(){return G});var G=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":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return s});var G=k("./src/polyfills/number.ts"),b=k("./node_modules/url-toolkit/src/url-toolkit.js"),N=k.n(b),K=k("./src/loader/fragment.ts"),W=k("./src/loader/level-details.ts"),n=k("./src/loader/level-key.ts"),I=k("./src/utils/attr-list.ts"),y=k("./src/utils/logger.ts"),m=k("./src/utils/codecs.ts"),g=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,u=/#EXT-X-MEDIA:(.*)/g,c=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),p=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),l=/\.(mp4|m4s|m4v|m4a)$/i;function o(L){var D,O;return l.test((D=(O=b.parseURL(L))===null||O===void 0?void 0:O.path)!=null?D:"")}var s=function(){function L(){}return L.findGroup=function(O,w){for(var x=0;x<O.length;x++){var d=O[x];if(d.id===w)return d}},L.convertAVC1ToAVCOTI=function(O){var w=O.split(".");if(w.length>2){var x=w.shift()+".";return x+=parseInt(w.shift()).toString(16),x+=("000"+parseInt(w.shift()).toString(16)).substr(-4),x}return O},L.resolve=function(O,w){return b.buildAbsoluteURL(w,O,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(O,w){var x=[],d={},E=!1;g.lastIndex=0;for(var f;(f=g.exec(O))!=null;)if(f[1]){var v=new I.AttrList(f[1]),T={attrs:v,bitrate:v.decimalInteger("AVERAGE-BANDWIDTH")||v.decimalInteger("BANDWIDTH"),name:v.NAME,url:L.resolve(f[2],w)},B=v.decimalResolution("RESOLUTION");B&&(T.width=B.width,T.height=B.height),a((v.CODECS||"").split(/[ ,]+/).filter(function(j){return j}),T),T.videoCodec&&T.videoCodec.indexOf("avc1")!==-1&&(T.videoCodec=L.convertAVC1ToAVCOTI(T.videoCodec)),x.push(T)}else if(f[3]){var R=new I.AttrList(f[3]);R["DATA-ID"]&&(E=!0,d[R["DATA-ID"]]=R)}return{levels:x,sessionData:E?d:null}},L.parseMasterPlaylistMedia=function(O,w,x,d){d===void 0&&(d=[]);var E,f=[],v=0;for(u.lastIndex=0;(E=u.exec(O))!==null;){var T=new I.AttrList(E[1]);if(T.TYPE===x){var B={attrs:T,bitrate:0,id:v++,groupId:T["GROUP-ID"],instreamId:T["INSTREAM-ID"],name:T.NAME||T.LANGUAGE||"",type:x,default:T.bool("DEFAULT"),autoselect:T.bool("AUTOSELECT"),forced:T.bool("FORCED"),lang:T.LANGUAGE,url:T.URI?L.resolve(T.URI,w):""};if(d.length){var R=L.findGroup(d,B.groupId)||d[0];A(B,R,"audioCodec"),A(B,R,"textCodec")}f.push(B)}}return f},L.parseLevelPlaylist=function(O,w,x,d,E){var f=new W.LevelDetails(w),v=f.fragments,T=null,B=0,R=0,j=0,U=0,_=null,J=new K.Fragment(d,w),ne,he,be,Ke=-1,De=!1;for(c.lastIndex=0,f.m3u8=O;(ne=c.exec(O))!==null;){De&&(De=!1,J=new K.Fragment(d,w),J.start=j,J.sn=B,J.cc=U,J.level=x,T&&(J.initSegment=T,J.rawProgramDateTime=T.rawProgramDateTime));var je=ne[1];if(je){J.duration=parseFloat(je);var Be=(" "+ne[2]).slice(1);J.title=Be||null,J.tagList.push(Be?["INF",je,Be]:["INF",je])}else if(ne[3])Object(G.isFiniteNumber)(J.duration)&&(J.start=j,be&&(J.levelkey=be),J.sn=B,J.level=x,J.cc=U,J.urlId=E,v.push(J),J.relurl=(" "+ne[3]).slice(1),C(J,_),_=J,j+=J.duration,B++,R=0,De=!0);else if(ne[4]){var Ge=(" "+ne[4]).slice(1);_?J.setByteRange(Ge,_):J.setByteRange(Ge)}else if(ne[5])J.rawProgramDateTime=(" "+ne[5]).slice(1),J.tagList.push(["PROGRAM-DATE-TIME",J.rawProgramDateTime]),Ke===-1&&(Ke=v.length);else{if(ne=ne[0].match(p),!ne){y.logger.warn("No matches on slow regex match for level playlist!");continue}for(he=1;he<ne.length&&!(typeof ne[he]!="undefined");he++);var _e=(" "+ne[he]).slice(1),Y=(" "+ne[he+1]).slice(1),M=ne[he+2]?(" "+ne[he+2]).slice(1):"";switch(_e){case"PLAYLIST-TYPE":f.type=Y.toUpperCase();break;case"MEDIA-SEQUENCE":B=f.startSN=parseInt(Y);break;case"SKIP":{var F=new I.AttrList(Y),Q=F.decimalInteger("SKIPPED-SEGMENTS");if(Object(G.isFiniteNumber)(Q)){f.skippedSegments=Q;for(var te=Q;te--;)v.unshift(null);B+=Q}var V=F.enumeratedString("RECENTLY-REMOVED-DATERANGES");V&&(f.recentlyRemovedDateranges=V.split(" "));break}case"TARGETDURATION":f.targetduration=parseFloat(Y);break;case"VERSION":f.version=parseInt(Y);break;case"EXTM3U":break;case"ENDLIST":f.live=!1;break;case"#":(Y||M)&&J.tagList.push(M?[Y,M]:[Y]);break;case"DIS":U++;case"GAP":J.tagList.push([_e]);break;case"BITRATE":J.tagList.push([_e,Y]);break;case"DISCONTINUITY-SEQ":U=parseInt(Y);break;case"KEY":{var ge,Ue=new I.AttrList(Y),Ye=Ue.enumeratedString("METHOD"),de=Ue.URI,xe=Ue.hexadecimalInteger("IV"),Me=Ue.enumeratedString("KEYFORMATVERSIONS"),Fe=Ue.enumeratedString("KEYID"),$e=(ge=Ue.enumeratedString("KEYFORMAT"))!=null?ge:"identity",st=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(st.indexOf($e)>-1){y.logger.warn("Keyformat "+$e+" is not supported from the manifest");continue}else if($e!=="identity")continue;Ye&&(be=n.LevelKey.fromURL(w,de),de&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ye)>=0&&(be.method=Ye,be.keyFormat=$e,Fe&&(be.keyID=Fe),Me&&(be.keyFormatVersions=Me),be.iv=xe));break}case"START":{var mt=new I.AttrList(Y),ut=mt.decimalFloatingPoint("TIME-OFFSET");Object(G.isFiniteNumber)(ut)&&(f.startTimeOffset=ut);break}case"MAP":{var Pt=new I.AttrList(Y);J.relurl=Pt.URI,Pt.BYTERANGE&&J.setByteRange(Pt.BYTERANGE),J.level=x,J.sn="initSegment",be&&(J.levelkey=be),J.initSegment=null,T=J,De=!0;break}case"SERVER-CONTROL":{var Et=new I.AttrList(Y);f.canBlockReload=Et.bool("CAN-BLOCK-RELOAD"),f.canSkipUntil=Et.optionalFloat("CAN-SKIP-UNTIL",0),f.canSkipDateRanges=f.canSkipUntil>0&&Et.bool("CAN-SKIP-DATERANGES"),f.partHoldBack=Et.optionalFloat("PART-HOLD-BACK",0),f.holdBack=Et.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var At=new I.AttrList(Y);f.partTarget=At.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Je=f.partList;Je||(Je=f.partList=[]);var Kt=R>0?Je[Je.length-1]:void 0,Bt=R++,ce=new K.Part(new I.AttrList(Y),J,w,Bt,Kt);Je.push(ce),J.duration+=ce.duration;break}case"PRELOAD-HINT":{var q=new I.AttrList(Y);f.preloadHint=q;break}case"RENDITION-REPORT":{var ee=new I.AttrList(Y);f.renditionReports=f.renditionReports||[],f.renditionReports.push(ee);break}default:y.logger.warn("line parsed but not handled: "+ne);break}}}_&&!_.relurl?(v.pop(),j-=_.duration,f.partList&&(f.fragmentHint=_)):f.partList&&(C(J,_),J.cc=U,f.fragmentHint=J);var oe=v.length,fe=v[0],ie=v[oe-1];if(j+=f.skippedSegments*f.targetduration,j>0&&oe&&ie){f.averagetargetduration=j/oe;var le=ie.sn;f.endSN=le!=="initSegment"?le:0,fe&&(f.startCC=fe.cc,fe.initSegment||f.fragments.every(function(me){return me.relurl&&o(me.relurl)})&&(y.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),J=new K.Fragment(d,w),J.relurl=ie.relurl,J.level=x,J.sn="initSegment",fe.initSegment=J,f.needSidxRanges=!0))}else f.endSN=0,f.startCC=0;return f.fragmentHint&&(j+=f.fragmentHint.duration),f.totalduration=j,f.endCC=U,Ke>0&&S(v,Ke),f},L}();function a(L,D){["video","audio","text"].forEach(function(O){var w=L.filter(function(d){return Object(m.isCodecType)(d,O)});if(w.length){var x=w.filter(function(d){return d.lastIndexOf("avc1",0)===0||d.lastIndexOf("mp4a",0)===0});D[O+"Codec"]=x.length>0?x[0]:w[0],L=L.filter(function(d){return w.indexOf(d)===-1})}}),D.unknownCodecs=L}function A(L,D,O){var w=D[O];w&&(L[O]=w)}function S(L,D){for(var O=L[D],w=D;w--;){var x=L[w];if(!x)return;x.programDateTime=O.programDateTime-x.duration*1e3,O=x}}function C(L,D){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):D!=null&&D.programDateTime&&(L.programDateTime=D.endProgramDateTime),Object(G.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/polyfills/number.ts"),b=k("./src/events.ts"),N=k("./src/errors.ts"),K=k("./src/utils/logger.ts"),W=k("./src/utils/mp4-tools.ts"),n=k("./src/loader/m3u8-parser.ts"),I=k("./src/types/loader.ts"),y=k("./src/utils/attr-list.ts");function m(c){var p=c.type;switch(p){case I.PlaylistContextType.AUDIO_TRACK:return I.PlaylistLevelType.AUDIO;case I.PlaylistContextType.SUBTITLE_TRACK:return I.PlaylistLevelType.SUBTITLE;default:return I.PlaylistLevelType.MAIN}}function g(c,p){var l=c.url;return(l===void 0||l.indexOf("data:")===0)&&(l=p.url),l}var u=function(){function c(l){this.hls=void 0,this.loaders=Object.create(null),this.hls=l,this.registerListeners()}var p=c.prototype;return p.registerListeners=function(){var o=this.hls;o.on(b.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(b.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(b.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.on(b.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},p.unregisterListeners=function(){var o=this.hls;o.off(b.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(b.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(b.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),o.off(b.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},p.createInternalLoader=function(o){var s=this.hls.config,a=s.pLoader,A=s.loader,S=a||A,C=new S(s);return o.loader=C,this.loaders[o.type]=C,C},p.getInternalLoader=function(o){return this.loaders[o.type]},p.resetInternalLoader=function(o){this.loaders[o]&&delete this.loaders[o]},p.destroyInternalLoaders=function(){for(var o in this.loaders){var s=this.loaders[o];s&&s.destroy(),this.resetInternalLoader(o)}},p.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},p.onManifestLoading=function(o,s){var a=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:I.PlaylistContextType.MANIFEST,url:a,deliveryDirectives:null})},p.onLevelLoading=function(o,s){var a=s.id,A=s.level,S=s.url,C=s.deliveryDirectives;this.load({id:a,groupId:null,level:A,responseType:"text",type:I.PlaylistContextType.LEVEL,url:S,deliveryDirectives:C})},p.onAudioTrackLoading=function(o,s){var a=s.id,A=s.groupId,S=s.url,C=s.deliveryDirectives;this.load({id:a,groupId:A,level:null,responseType:"text",type:I.PlaylistContextType.AUDIO_TRACK,url:S,deliveryDirectives:C})},p.onSubtitleTrackLoading=function(o,s){var a=s.id,A=s.groupId,S=s.url,C=s.deliveryDirectives;this.load({id:a,groupId:A,level:null,responseType:"text",type:I.PlaylistContextType.SUBTITLE_TRACK,url:S,deliveryDirectives:C})},p.load=function(o){var s,a=this.hls.config,A=this.getInternalLoader(o);if(A){var S=A.context;if(S&&S.url===o.url){K.logger.trace("[playlist-loader]: playlist request ongoing");return}K.logger.log("[playlist-loader]: aborting previous loader for type: "+o.type),A.abort()}var C,L,D,O;switch(o.type){case I.PlaylistContextType.MANIFEST:C=a.manifestLoadingMaxRetry,L=a.manifestLoadingTimeOut,D=a.manifestLoadingRetryDelay,O=a.manifestLoadingMaxRetryTimeout;break;case I.PlaylistContextType.LEVEL:case I.PlaylistContextType.AUDIO_TRACK:case I.PlaylistContextType.SUBTITLE_TRACK:C=0,L=a.levelLoadingTimeOut;break;default:C=a.levelLoadingMaxRetry,L=a.levelLoadingTimeOut,D=a.levelLoadingRetryDelay,O=a.levelLoadingMaxRetryTimeout;break}if(A=this.createInternalLoader(o),(s=o.deliveryDirectives)!==null&&s!==void 0&&s.part){var w;if(o.type===I.PlaylistContextType.LEVEL&&o.level!==null?w=this.hls.levels[o.level].details:o.type===I.PlaylistContextType.AUDIO_TRACK&&o.id!==null?w=this.hls.audioTracks[o.id].details:o.type===I.PlaylistContextType.SUBTITLE_TRACK&&o.id!==null&&(w=this.hls.subtitleTracks[o.id].details),w){var x=w.partTarget,d=w.targetduration;x&&d&&(L=Math.min(Math.max(x*3,d*.8)*1e3,L))}}var E={timeout:L,maxRetry:C,retryDelay:D,maxRetryDelay:O,highWaterMark:0},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};A.load(o,E,f)},p.loadsuccess=function(o,s,a,A){if(A===void 0&&(A=null),a.isSidxRequest){this.handleSidxRequest(o,a),this.handlePlaylistLoaded(o,s,a,A);return}this.resetInternalLoader(a.type);var S=o.data;if(S.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(o,a,"no EXTM3U delimiter",A);return}s.parsing.start=performance.now(),S.indexOf("#EXTINF:")>0||S.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(o,s,a,A):this.handleMasterPlaylist(o,s,a,A)},p.loaderror=function(o,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!1,o)},p.loadtimeout=function(o,s,a){a===void 0&&(a=null),this.handleNetworkError(s,a,!0)},p.handleMasterPlaylist=function(o,s,a,A){var S=this.hls,C=o.data,L=g(o,a),D=n.default.parseMasterPlaylist(C,L),O=D.levels,w=D.sessionData;if(!O.length){this.handleManifestParsingError(o,a,"no level found in manifest",A);return}var x=O.map(function(B){return{id:B.attrs.AUDIO,audioCodec:B.audioCodec}}),d=O.map(function(B){return{id:B.attrs.SUBTITLES,textCodec:B.textCodec}}),E=n.default.parseMasterPlaylistMedia(C,L,"AUDIO",x),f=n.default.parseMasterPlaylistMedia(C,L,"SUBTITLES",d),v=n.default.parseMasterPlaylistMedia(C,L,"CLOSED-CAPTIONS");if(E.length){var T=E.some(function(B){return!B.url});!T&&O[0].audioCodec&&!O[0].attrs.AUDIO&&(K.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),E.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new y.AttrList({}),bitrate:0,url:""}))}S.trigger(b.Events.MANIFEST_LOADED,{levels:O,audioTracks:E,subtitles:f,captions:v,url:L,stats:s,networkDetails:A,sessionData:w})},p.handleTrackOrLevelPlaylist=function(o,s,a,A){var S=this.hls,C=a.id,L=a.level,D=a.type,O=g(o,a),w=Object(G.isFiniteNumber)(C)?C:0,x=Object(G.isFiniteNumber)(L)?L:w,d=m(a),E=n.default.parseLevelPlaylist(o.data,O,x,d,w);if(!E.fragments.length){S.trigger(b.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:O,reason:"no fragments found in level",level:typeof a.level=="number"?a.level:void 0});return}if(D===I.PlaylistContextType.MANIFEST){var f={attrs:new y.AttrList({}),bitrate:0,details:E,name:"",url:O};S.trigger(b.Events.MANIFEST_LOADED,{levels:[f],audioTracks:[],url:O,stats:s,networkDetails:A,sessionData:null})}if(s.parsing.end=performance.now(),E.needSidxRanges){var v,T=(v=E.fragments[0].initSegment)===null||v===void 0?void 0:v.url;this.load({url:T,isSidxRequest:!0,type:D,level:L,levelDetails:E,id:C,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}a.levelDetails=E,this.handlePlaylistLoaded(o,s,a,A)},p.handleSidxRequest=function(o,s){var a=Object(W.parseSegmentIndex)(new Uint8Array(o.data));if(!a)return;var A=a.references,S=s.levelDetails;A.forEach(function(C,L){var D=C.info,O=S.fragments[L];O.byteRange.length===0&&O.setByteRange(String(1+D.end-D.start)+"@"+String(D.start)),O.initSegment&&O.initSegment.setByteRange(String(a.moovEndOffset)+"@0")})},p.handleManifestParsingError=function(o,s,a,A){this.hls.trigger(b.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===I.PlaylistContextType.MANIFEST,url:o.url,reason:a,response:o,context:s,networkDetails:A})},p.handleNetworkError=function(o,s,a,A){a===void 0&&(a=!1),K.logger.warn("[playlist-loader]: A network "+(a?"timeout":"error")+" occurred while loading "+o.type+" level: "+o.level+" id: "+o.id+' group-id: "'+o.groupId+'"');var S=N.ErrorDetails.UNKNOWN,C=!1,L=this.getInternalLoader(o);switch(o.type){case I.PlaylistContextType.MANIFEST:S=a?N.ErrorDetails.MANIFEST_LOAD_TIMEOUT:N.ErrorDetails.MANIFEST_LOAD_ERROR,C=!0;break;case I.PlaylistContextType.LEVEL:S=a?N.ErrorDetails.LEVEL_LOAD_TIMEOUT:N.ErrorDetails.LEVEL_LOAD_ERROR,C=!1;break;case I.PlaylistContextType.AUDIO_TRACK:S=a?N.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:N.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,C=!1;break;case I.PlaylistContextType.SUBTITLE_TRACK:S=a?N.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:N.ErrorDetails.SUBTITLE_LOAD_ERROR,C=!1;break}L&&this.resetInternalLoader(o.type);var D={type:N.ErrorTypes.NETWORK_ERROR,details:S,fatal:C,url:o.url,loader:L,context:o,networkDetails:s};A&&(D.response=A),this.hls.trigger(b.Events.ERROR,D)},p.handlePlaylistLoaded=function(o,s,a,A){var S=a.type,C=a.level,L=a.id,D=a.groupId,O=a.loader,w=a.levelDetails,x=a.deliveryDirectives;if(!(w!=null&&w.targetduration)){this.handleManifestParsingError(o,a,"invalid target duration",A);return}if(!O)return;w.live&&(O.getCacheAge&&(w.ageHeader=O.getCacheAge()||0),(!O.getCacheAge||isNaN(w.ageHeader))&&(w.ageHeader=0));switch(S){case I.PlaylistContextType.MANIFEST:case I.PlaylistContextType.LEVEL:this.hls.trigger(b.Events.LEVEL_LOADED,{details:w,level:C||0,id:L||0,stats:s,networkDetails:A,deliveryDirectives:x});break;case I.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(b.Events.AUDIO_TRACK_LOADED,{details:w,id:L||0,groupId:D||"",stats:s,networkDetails:A,deliveryDirectives:x});break;case I.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(b.Events.SUBTITLE_TRACK_LOADED,{details:w,id:L||0,groupId:D||"",stats:s,networkDetails:A,deliveryDirectives:x});break}},c}();X.default=u},"./src/polyfills/number.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"isFiniteNumber",function(){return G}),k.d(X,"MAX_SAFE_INTEGER",function(){return b});var G=Number.isFinite||function(N){return typeof N=="number"&&isFinite(N)},b=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ae,X,k){"use strict";k.r(X);var G=function(){function b(){}return b.getSilentFrame=function(K,W){switch(K){case"mp4a.40.2":if(W===1)return new Uint8Array([0,200,0,128,35,128]);if(W===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(W===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(W===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(W===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(W===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(W===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(W===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(W===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},b}();X.default=G},"./src/remux/mp4-generator.ts":function(ae,X,k){"use strict";k.r(X);var G=Math.pow(2,32)-1,b=function(){function N(){}return N.init=function(){N.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 W;for(W in N.types)N.types.hasOwnProperty(W)&&(N.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.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]),I=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]);N.HDLR_TYPES={video:n,audio:I};var y=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),m=new Uint8Array([0,0,0,0,0,0,0,0]);N.STTS=N.STSC=N.STCO=m,N.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),N.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),N.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),N.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var g=new Uint8Array([105,115,111,109]),u=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);N.FTYP=N.box(N.types.ftyp,g,c,g,u),N.DINF=N.box(N.types.dinf,N.box(N.types.dref,y))},N.box=function(W){for(var n=8,I=arguments.length,y=new Array(I>1?I-1:0),m=1;m<I;m++)y[m-1]=arguments[m];for(var g=y.length,u=g;g--;)n+=y[g].byteLength;var c=new Uint8Array(n);for(c[0]=n>>24&255,c[1]=n>>16&255,c[2]=n>>8&255,c[3]=n&255,c.set(W,4),g=0,n=8;g<u;g++)c.set(y[g],n),n+=y[g].byteLength;return c},N.hdlr=function(W){return N.box(N.types.hdlr,N.HDLR_TYPES[W])},N.mdat=function(W){return N.box(N.types.mdat,W)},N.mdhd=function(W,n){n*=W;var I=Math.floor(n/(G+1)),y=Math.floor(n%(G+1));return N.box(N.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,W>>24&255,W>>16&255,W>>8&255,W&255,I>>24,I>>16&255,I>>8&255,I&255,y>>24,y>>16&255,y>>8&255,y&255,85,196,0,0]))},N.mdia=function(W){return N.box(N.types.mdia,N.mdhd(W.timescale,W.duration),N.hdlr(W.type),N.minf(W))},N.mfhd=function(W){return N.box(N.types.mfhd,new Uint8Array([0,0,0,0,W>>24,W>>16&255,W>>8&255,W&255]))},N.minf=function(W){return W.type==="audio"?N.box(N.types.minf,N.box(N.types.smhd,N.SMHD),N.DINF,N.stbl(W)):N.box(N.types.minf,N.box(N.types.vmhd,N.VMHD),N.DINF,N.stbl(W))},N.moof=function(W,n,I){return N.box(N.types.moof,N.mfhd(W),N.traf(I,n))},N.moov=function(W){for(var n=W.length,I=[];n--;)I[n]=N.trak(W[n]);return N.box.apply(null,[N.types.moov,N.mvhd(W[0].timescale,W[0].duration)].concat(I).concat(N.mvex(W)))},N.mvex=function(W){for(var n=W.length,I=[];n--;)I[n]=N.trex(W[n]);return N.box.apply(null,[N.types.mvex].concat(I))},N.mvhd=function(W,n){n*=W;var I=Math.floor(n/(G+1)),y=Math.floor(n%(G+1)),m=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,W>>24&255,W>>16&255,W>>8&255,W&255,I>>24,I>>16&255,I>>8&255,I&255,y>>24,y>>16&255,y>>8&255,y&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 N.box(N.types.mvhd,m)},N.sdtp=function(W){var n=W.samples||[],I=new Uint8Array(4+n.length),y,m;for(y=0;y<n.length;y++)m=n[y].flags,I[y+4]=m.dependsOn<<4|m.isDependedOn<<2|m.hasRedundancy;return N.box(N.types.sdtp,I)},N.stbl=function(W){return N.box(N.types.stbl,N.stsd(W),N.box(N.types.stts,N.STTS),N.box(N.types.stsc,N.STSC),N.box(N.types.stsz,N.STSZ),N.box(N.types.stco,N.STCO))},N.avc1=function(W){var n=[],I=[],y,m,g;for(y=0;y<W.sps.length;y++)m=W.sps[y],g=m.byteLength,n.push(g>>>8&255),n.push(g&255),n=n.concat(Array.prototype.slice.call(m));for(y=0;y<W.pps.length;y++)m=W.pps[y],g=m.byteLength,I.push(g>>>8&255),I.push(g&255),I=I.concat(Array.prototype.slice.call(m));var u=N.box(N.types.avcC,new Uint8Array([1,n[3],n[4],n[5],252|3,224|W.sps.length].concat(n).concat([W.pps.length]).concat(I))),c=W.width,p=W.height,l=W.pixelRatio[0],o=W.pixelRatio[1];return N.box(N.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,c>>8&255,c&255,p>>8&255,p&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]),u,N.box(N.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),N.box(N.types.pasp,new Uint8Array([l>>24,l>>16&255,l>>8&255,l&255,o>>24,o>>16&255,o>>8&255,o&255])))},N.esds=function(W){var n=W.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(W.config).concat([6,1,2]))},N.mp4a=function(W){var n=W.samplerate;return N.box(N.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,W.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]),N.box(N.types.esds,N.esds(W)))},N.mp3=function(W){var n=W.samplerate;return N.box(N.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,W.channelCount,0,16,0,0,0,0,n>>8&255,n&255,0,0]))},N.stsd=function(W){return W.type==="audio"?!W.isAAC&&W.codec==="mp3"?N.box(N.types.stsd,N.STSD,N.mp3(W)):N.box(N.types.stsd,N.STSD,N.mp4a(W)):N.box(N.types.stsd,N.STSD,N.avc1(W))},N.tkhd=function(W){var n=W.id,I=W.duration*W.timescale,y=W.width,m=W.height,g=Math.floor(I/(G+1)),u=Math.floor(I%(G+1));return N.box(N.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,g>>24,g>>16&255,g>>8&255,g&255,u>>24,u>>16&255,u>>8&255,u&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,y>>8&255,y&255,0,0,m>>8&255,m&255,0,0]))},N.traf=function(W,n){var I=N.sdtp(W),y=W.id,m=Math.floor(n/(G+1)),g=Math.floor(n%(G+1));return N.box(N.types.traf,N.box(N.types.tfhd,new Uint8Array([0,0,0,0,y>>24,y>>16&255,y>>8&255,y&255])),N.box(N.types.tfdt,new Uint8Array([1,0,0,0,m>>24,m>>16&255,m>>8&255,m&255,g>>24,g>>16&255,g>>8&255,g&255])),N.trun(W,I.length+16+20+8+16+8+8),I)},N.trak=function(W){return W.duration=W.duration||4294967295,N.box(N.types.trak,N.tkhd(W),N.mdia(W))},N.trex=function(W){var n=W.id;return N.box(N.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]))},N.trun=function(W,n){var I=W.samples||[],y=I.length,m=12+16*y,g=new Uint8Array(m),u,c,p,l,o,s;for(n+=8+m,g.set([0,0,15,1,y>>>24&255,y>>>16&255,y>>>8&255,y&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255],0),u=0;u<y;u++)c=I[u],p=c.duration,l=c.size,o=c.flags,s=c.cts,g.set([p>>>24&255,p>>>16&255,p>>>8&255,p&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,o.degradPrio&240<<8,o.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*u);return N.box(N.types.trun,g)},N.initSegment=function(W){N.types||N.init();var n=N.moov(W),I=new Uint8Array(N.FTYP.byteLength+n.byteLength);return I.set(N.FTYP),I.set(n,N.FTYP.byteLength),I},N}();b.types=void 0,b.HDLR_TYPES=void 0,b.STTS=void 0,b.STSC=void 0,b.STCO=void 0,b.STSZ=void 0,b.VMHD=void 0,b.SMHD=void 0,b.STSD=void 0,b.FTYP=void 0,b.DINF=void 0,X.default=b},"./src/remux/mp4-remuxer.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return s}),k.d(X,"normalizePts",function(){return a});var G=k("./src/polyfills/number.ts"),b=k("./src/remux/aac-helper.ts"),N=k("./src/remux/mp4-generator.ts"),K=k("./src/events.ts"),W=k("./src/errors.ts"),n=k("./src/utils/logger.ts"),I=k("./src/types/loader.ts"),y=k("./src/utils/timescale-conversion.ts");function m(){return m=Object.assign||function(L){for(var D=1;D<arguments.length;D++){var O=arguments[D];for(var w in O)Object.prototype.hasOwnProperty.call(O,w)&&(L[w]=O[w])}return L},m.apply(this,arguments)}var g=10*1e3,u=1024,c=1152,p=null,l=null,o=!1,s=function(){function L(O,w,x,d){if(d===void 0&&(d=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=O,this.config=w,this.typeSupported=x,this.ISGenerated=!1,p===null){var E=navigator.userAgent||"",f=E.match(/Chrome\/(\d+)/i);p=f?parseInt(f[1]):0}if(l===null){var v=navigator.userAgent.match(/Safari\/(\d+)/i);l=v?parseInt(v[1]):0}o=!!p&&p<75||!!l&&l<600}var D=L.prototype;return D.destroy=function(){},D.resetTimeStamp=function(w){n.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=w},D.resetNextTimestamp=function(){n.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},D.resetInitSegment=function(){n.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},D.getVideoStartPts=function(w){var x=!1,d=w.reduce(function(E,f){var v=f.pts-E;return v<-4294967296?(x=!0,a(E,f.pts)):v>0?E:f.pts},w[0].pts);return x&&n.logger.debug("PTS rollover detected"),d},D.remux=function(w,x,d,E,f,v,T,B){var R,j,U,_,J,ne,he=f,be=f,Ke=w.pid>-1,De=x.pid>-1,je=x.samples.length,Be=w.samples.length>0,Ge=je>1,_e=(!Ke||Be)&&(!De||Ge)||this.ISGenerated||T;if(_e){this.ISGenerated||(U=this.generateIS(w,x,f));var Y=this.isVideoContiguous,M=-1;if(Ge&&(M=A(x.samples),!Y&&this.config.forceKeyFrameOnDiscontinuity))if(ne=!0,M>0){n.logger.warn("[mp4-remuxer]: Dropped "+M+" out of "+je+" video samples due to a missing keyframe");var F=this.getVideoStartPts(x.samples);x.samples=x.samples.slice(M),x.dropped+=M,be+=(x.samples[0].pts-F)/(x.timescale||9e4)}else M===-1&&(n.logger.warn("[mp4-remuxer]: No keyframe found out of "+je+" video samples"),ne=!1);if(this.ISGenerated){if(Be&&Ge){var Q=this.getVideoStartPts(x.samples),te=a(w.samples[0].pts,Q)-Q,V=te/x.inputTimeScale;he+=Math.max(0,V),be+=Math.max(0,-V)}if(Be){if(w.samplerate||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(w,x,f)),j=this.remuxAudio(w,he,this.isAudioContiguous,v,De||Ge||B===I.PlaylistLevelType.AUDIO?be:void 0),Ge){var ge=j?j.endPTS-j.startPTS:0;x.inputTimeScale||(n.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(w,x,f)),R=this.remuxVideo(x,be,Y,ge)}}else Ge&&(R=this.remuxVideo(x,be,Y,0));R&&(R.firstKeyFrame=M,R.independent=M!==-1)}}return this.ISGenerated&&(d.samples.length&&(J=this.remuxID3(d,f)),E.samples.length&&(_=this.remuxText(E,f))),{audio:j,video:R,initSegment:U,independent:ne,text:_,id3:J}},D.generateIS=function(w,x,d){var E=w.samples,f=x.samples,v=this.typeSupported,T={},B=!Object(G.isFiniteNumber)(this._initPTS),R="audio/mp4",j,U,_;if(B&&(j=U=Infinity),w.config&&E.length&&(w.timescale=w.samplerate,w.isAAC||(v.mpeg?(R="audio/mpeg",w.codec=""):v.mp3&&(w.codec="mp3")),T.audio={id:"audio",container:R,codec:w.codec,initSegment:!w.isAAC&&v.mpeg?new Uint8Array(0):N.default.initSegment([w]),metadata:{channelCount:w.channelCount}},B&&(_=w.inputTimeScale,j=U=E[0].pts-Math.round(_*d))),x.sps&&x.pps&&f.length&&(x.timescale=x.inputTimeScale,T.video={id:"main",container:"video/mp4",codec:x.codec,initSegment:N.default.initSegment([x]),metadata:{width:x.width,height:x.height}},B)){_=x.inputTimeScale;var J=this.getVideoStartPts(f),ne=Math.round(_*d);U=Math.min(U,a(f[0].dts,J)-ne),j=Math.min(j,J-ne)}if(Object.keys(T).length)return this.ISGenerated=!0,B&&(this._initPTS=j,this._initDTS=U),{tracks:T,initPTS:j,timescale:_}},D.remuxVideo=function(w,x,d,E){var f=w.inputTimeScale,v=w.samples,T=[],B=v.length,R=this._initPTS,j=this.nextAvcDts,U=8,_,J,ne,he=Number.POSITIVE_INFINITY,be=Number.NEGATIVE_INFINITY,Ke=0,De=!1;if(!d||j===null){var je=x*f,Be=v[0].pts-a(v[0].dts,v[0].pts);j=je-Be}for(var Ge=0;Ge<B;Ge++){var _e=v[Ge];if(_e.pts=a(_e.pts-R,j),_e.dts=a(_e.dts-R,j),_e.dts>_e.pts){var Y=9e4*.2;Ke=Math.max(Math.min(Ke,_e.pts-_e.dts),-1*Y)}_e.dts<v[Ge>0?Ge-1:Ge].dts&&(De=!0)}De&&v.sort(function($t,bt){var Ze=$t.dts-bt.dts,vn=$t.pts-bt.pts;return Ze||vn}),J=v[0].dts,ne=v[v.length-1].dts;var M=Math.round((ne-J)/(B-1));if(Ke<0){if(Ke<M*-2){n.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(y.toMsFromMpegTsClock)(-M,!0)+" ms");for(var F=Ke,Q=0;Q<B;Q++)v[Q].dts=F=Math.max(F,v[Q].pts-M),v[Q].pts=Math.max(F,v[Q].pts)}else{n.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(y.toMsFromMpegTsClock)(Ke,!0)+" ms to overcome this issue");for(var te=0;te<B;te++)v[te].dts=v[te].dts+Ke}J=v[0].dts}if(d){var V=J-j,ge=V>M,Ue=V<-1;if(ge||Ue){ge?n.logger.warn("AVC: "+Object(y.toMsFromMpegTsClock)(V,!0)+" ms ("+V+"dts) hole between fragments detected, filling it"):n.logger.warn("AVC: "+Object(y.toMsFromMpegTsClock)(-V,!0)+" ms ("+V+"dts) overlapping between fragments detected"),J=j;var Ye=v[0].pts-V;v[0].dts=J,v[0].pts=Ye,n.logger.log("Video: First PTS/DTS adjusted: "+Object(y.toMsFromMpegTsClock)(Ye,!0)+"/"+Object(y.toMsFromMpegTsClock)(J,!0)+", delta: "+Object(y.toMsFromMpegTsClock)(V,!0)+" ms")}}o&&(J=Math.max(0,J));for(var de=0,xe=0,Me=0;Me<B;Me++){for(var Fe=v[Me],$e=Fe.units,st=$e.length,mt=0,ut=0;ut<st;ut++)mt+=$e[ut].data.length;xe+=mt,de+=st,Fe.length=mt,Fe.dts=Math.max(Fe.dts,J),Fe.pts=Math.max(Fe.pts,Fe.dts,0),he=Math.min(Fe.pts,he),be=Math.max(Fe.pts,be)}ne=v[B-1].dts;var Pt=xe+4*de+8,Et;try{Et=new Uint8Array(Pt)}catch($t){this.observer.emit(K.Events.ERROR,K.Events.ERROR,{type:W.ErrorTypes.MUX_ERROR,details:W.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Pt,reason:"fail allocating video mdat "+Pt});return}var At=new DataView(Et.buffer);At.setUint32(0,Pt),Et.set(N.default.types.mdat,4);for(var Je=0;Je<B;Je++){for(var Kt=v[Je],Bt=Kt.units,ce=0,q=0,ee=Bt.length;q<ee;q++){var oe=Bt[q],fe=oe.data,ie=oe.data.byteLength;At.setUint32(U,ie),U+=4,Et.set(fe,U),U+=ie,ce+=4+ie}if(Je<B-1)_=v[Je+1].dts-Kt.dts;else{var le=this.config,me=Kt.dts-v[Je>0?Je-1:Je].dts;if(le.stretchShortVideoTrack&&this.nextAudioPts!==null){var ve=Math.floor(le.maxBufferHole*f),Ae=(E?he+E*f:this.nextAudioPts)-Kt.pts;Ae>ve?(_=Ae-me,_<0&&(_=me),n.logger.log("[mp4-remuxer]: It is approximately "+Ae/90+" ms to the next segment; using duration "+_/90+" ms for the last video frame.")):_=me}else _=me}var Re=Math.round(Kt.pts-Kt.dts);T.push(new S(Kt.key,_,ce,Re))}if(T.length&&p&&p<70){var Pe=T[0].flags;Pe.dependsOn=2,Pe.isNonSync=0}console.assert(_!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=j=ne+_,this.isVideoContiguous=!0;var it=N.default.moof(w.sequenceNumber++,J,m({},w,{samples:T})),ct="video",Ot={data1:it,data2:Et,startPTS:he/f,endPTS:(be+_)/f,startDTS:J/f,endDTS:j/f,type:ct,hasAudio:!1,hasVideo:!0,nb:T.length,dropped:w.dropped};return w.samples=[],w.dropped=0,console.assert(Et.length,"MDAT length must not be zero"),Ot},D.remuxAudio=function(w,x,d,E,f){var v=w.inputTimeScale,T=w.samplerate?w.samplerate:v,B=v/T,R=w.isAAC?u:c,j=R*B,U=this._initPTS,_=!w.isAAC&&this.typeSupported.mpeg,J=[],ne=w.samples,he=_?0:8,be=this.nextAudioPts||-1,Ke=x*v;if(this.isAudioContiguous=d=d||ne.length&&be>0&&(E&&Math.abs(Ke-be)<9e3||Math.abs(a(ne[0].pts-U,Ke)-be)<20*j),ne.forEach(function(fe){fe.pts=a(fe.pts-U,Ke)}),!d||be<0){if(ne=ne.filter(function(fe){return fe.pts>=0}),!ne.length)return;f===0?be=0:E?be=Math.max(0,Ke):be=ne[0].pts}if(w.isAAC)for(var De=f!==void 0,je=this.config.maxAudioFramesDrift,Be=0,Ge=be;Be<ne.length;Be++){var _e=ne[Be],Y=_e.pts,M=Y-Ge,F=Math.abs(1e3*M/v);if(M<=-je*j&&De)Be===0&&(n.logger.warn("Audio frame @ "+(Y/v).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*M/v)+" ms."),this.nextAudioPts=be=Ge=Y);else if(M>=je*j&&F<g&&De){var Q=Math.round(M/j);Ge=Y-Q*j,Ge<0&&(Q--,Ge+=j),Be===0&&(this.nextAudioPts=be=Ge),n.logger.warn("[mp4-remuxer]: Injecting "+Q+" audio frame @ "+(Ge/v).toFixed(3)+"s due to "+Math.round(1e3*M/v)+" ms gap.");for(var te=0;te<Q;te++){var V=Math.max(Ge,0),ge=b.default.getSilentFrame(w.manifestCodec||w.codec,w.channelCount);ge||(n.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ge=_e.unit.subarray()),ne.splice(Be,0,{unit:ge,pts:V}),Ge+=j,Be++}}_e.pts=Ge,Ge+=j}for(var Ue=null,Ye=null,de,xe=0,Me=ne.length;Me--;)xe+=ne[Me].unit.byteLength;for(var Fe=0,$e=ne.length;Fe<$e;Fe++){var st=ne[Fe],mt=st.unit,ut=st.pts;if(Ye!==null){var Pt=J[Fe-1];Pt.duration=Math.round((ut-Ye)/B)}else if(d&&w.isAAC&&(ut=be),Ue=ut,xe>0){xe+=he;try{de=new Uint8Array(xe)}catch(fe){this.observer.emit(K.Events.ERROR,K.Events.ERROR,{type:W.ErrorTypes.MUX_ERROR,details:W.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:xe,reason:"fail allocating audio mdat "+xe});return}if(!_){var Et=new DataView(de.buffer);Et.setUint32(0,xe),de.set(N.default.types.mdat,4)}}else return;de.set(mt,he);var At=mt.byteLength;he+=At,J.push(new S(!0,R,At,0)),Ye=ut}var Je=J.length;if(!Je)return;var Kt=J[J.length-1];this.nextAudioPts=be=Ye+B*Kt.duration;var Bt=_?new Uint8Array(0):N.default.moof(w.sequenceNumber++,Ue/B,m({},w,{samples:J}));w.samples=[];var ce=Ue/v,q=be/v,ee="audio",oe={data1:Bt,data2:de,startPTS:ce,endPTS:q,startDTS:ce,endDTS:q,type:ee,hasAudio:!0,hasVideo:!1,nb:Je};return this.isAudioContiguous=!0,console.assert(de.length,"MDAT length must not be zero"),oe},D.remuxEmptyAudio=function(w,x,d,E){var f=w.inputTimeScale,v=w.samplerate?w.samplerate:f,T=f/v,B=this.nextAudioPts,R=(B!==null?B:E.startDTS*f)+this._initDTS,j=E.endDTS*f+this._initDTS,U=T*u,_=Math.ceil((j-R)/U),J=b.default.getSilentFrame(w.manifestCodec||w.codec,w.channelCount);if(n.logger.warn("[mp4-remuxer]: remux empty Audio"),!J){n.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ne=[],he=0;he<_;he++){var be=R+he*U;ne.push({unit:J,pts:be,dts:be})}return w.samples=ne,this.remuxAudio(w,x,d,!1)},D.remuxID3=function(w,x){var d=w.samples.length;if(!d)return;for(var E=w.inputTimeScale,f=this._initPTS,v=this._initDTS,T=0;T<d;T++){var B=w.samples[T];B.pts=a(B.pts-f,x*E)/E,B.dts=a(B.dts-v,x*E)/E}var R=w.samples;return w.samples=[],{samples:R}},D.remuxText=function(w,x){var d=w.samples.length;if(!d)return;for(var E=w.inputTimeScale,f=this._initPTS,v=0;v<d;v++){var T=w.samples[v];T.pts=a(T.pts-f,x*E)/E}w.samples.sort(function(R,j){return R.pts-j.pts});var B=w.samples;return w.samples=[],{samples:B}},L}();function a(L,D){var O;if(D===null)return L;for(D<L?O=-8589934592:O=8589934592;Math.abs(L-D)>4294967296;)L+=O;return L}function A(L){for(var D=0;D<L.length;D++)if(L[D].key)return D;return-1}var S=function(D,O,w,x){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=O,this.size=w,this.cts=x,this.flags=new C(D)},C=function(D){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=D?2:1,this.isNonSync=D?0:1}},"./src/remux/passthrough-remuxer.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/polyfills/number.ts"),b=k("./src/utils/mp4-tools.ts"),N=k("./src/loader/fragment.ts"),K=k("./src/utils/logger.ts"),W=function(){function y(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var m=y.prototype;return m.destroy=function(){},m.resetTimeStamp=function(u){this.initPTS=u,this.lastEndDTS=null},m.resetNextTimestamp=function(){this.lastEndDTS=null},m.resetInitSegment=function(u,c,p){this.audioCodec=c,this.videoCodec=p,this.generateInitSegment(u),this.emitInitSegment=!0},m.generateInitSegment=function(u){var c=this.audioCodec,p=this.videoCodec;if(!u||!u.byteLength){this.initTracks=void 0,this.initData=void 0;return}var l=this.initData=Object(b.parseInitSegment)(u);c||(c=I(l.audio,N.ElementaryStreamTypes.AUDIO)),p||(p=I(l.video,N.ElementaryStreamTypes.VIDEO));var o={};l.audio&&l.video?o.audiovideo={container:"video/mp4",codec:c+","+p,initSegment:u,id:"main"}:l.audio?o.audio={container:"audio/mp4",codec:c,initSegment:u,id:"audio"}:l.video?o.video={container:"video/mp4",codec:p,initSegment:u,id:"main"}:K.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=o},m.remux=function(u,c,p,l,o){var s=this.initPTS,a=this.lastEndDTS,A={audio:void 0,video:void 0,text:l,id3:p,initSegment:void 0};Object(G.isFiniteNumber)(a)||(a=this.lastEndDTS=o||0);var S=c.samples;if(!S||!S.length)return A;var C={initPTS:void 0,timescale:1},L=this.initData;if((!L||!L.length)&&(this.generateInitSegment(S),L=this.initData),!L||!L.length)return K.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),A;this.emitInitSegment&&(C.tracks=this.initTracks,this.emitInitSegment=!1),Object(G.isFiniteNumber)(s)||(this.initPTS=C.initPTS=s=n(L,S,a));var D=Object(b.getDuration)(S,L),O=a,w=D+O;Object(b.offsetStartDTS)(L,S,s),D>0?this.lastEndDTS=w:(K.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var x=!!L.audio,d=!!L.video,E="";x&&(E+="audio"),d&&(E+="video");var f={data1:S,startPTS:O,startDTS:O,endPTS:w,endDTS:w,type:E,hasAudio:x,hasVideo:d,nb:1,dropped:0};return A.audio=f.type==="audio"?f:void 0,A.video=f.type!=="audio"?f:void 0,A.text=l,A.id3=p,A.initSegment=C,A},y}(),n=function(m,g,u){return Object(b.getStartDTS)(m,g)-u};function I(y,m){var g=y==null?void 0:y.codec;return g&&g.length>4?g:g==="hvc1"?"hvc1.1.c.L120.90":g==="av01"?"av01.0.04M.08":g==="avc1"||m===N.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}X.default=W},"./src/task-loop.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return G});var G=function(){function b(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var N=b.prototype;return N.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},N.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},N.onHandlerDestroyed=function(){},N.hasInterval=function(){return!!this._tickInterval},N.hasNextTick=function(){return!!this._tickTimer},N.setInterval=function(W){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,W),!0)},N.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},N.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},N.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},N.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},N.doTick=function(){},b}()},"./src/types/cmcd.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"CMCDVersion",function(){return G}),k.d(X,"CMCDObjectType",function(){return b}),k.d(X,"CMCDStreamingFormat",function(){return N}),k.d(X,"CMCDStreamType",function(){return K});var G=1,b;(function(W){W.MANIFEST="m",W.AUDIO="a",W.VIDEO="v",W.MUXED="av",W.INIT="i",W.CAPTION="c",W.TIMED_TEXT="tt",W.KEY="k",W.OTHER="o"})(b||(b={}));var N;(function(W){W.DASH="d",W.HLS="h",W.SMOOTH="s",W.OTHER="o"})(N||(N={}));var K;(function(W){W.VOD="v",W.LIVE="l"})(K||(K={}))},"./src/types/level.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"HlsSkip",function(){return N}),k.d(X,"getSkipValue",function(){return K}),k.d(X,"HlsUrlParameters",function(){return W}),k.d(X,"Level",function(){return n});function G(I,y){for(var m=0;m<y.length;m++){var g=y[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(I,g.key,g)}}function b(I,y,m){return y&&G(I.prototype,y),m&&G(I,m),I}var N;(function(I){I.No="",I.Yes="YES",I.v2="v2"})(N||(N={}));function K(I,y){var m=I.canSkipUntil,g=I.canSkipDateRanges,u=I.endSN,c=y!==void 0?y-u:0;return m&&c<m?g?N.v2:N.Yes:N.No}var W=function(){function I(m,g,u){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=m,this.part=g,this.skip=u}var y=I.prototype;return y.addDirectives=function(g){var u=new self.URL(g);return this.msn!==void 0&&u.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&u.searchParams.set("_HLS_part",this.part.toString()),this.skip&&u.searchParams.set("_HLS_skip",this.skip),u.toString()},I}(),n=function(){function I(y){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=[y.url],this.attrs=y.attrs,this.bitrate=y.bitrate,y.details&&(this.details=y.details),this.id=y.id||0,this.name=y.name,this.width=y.width||0,this.height=y.height||0,this.audioCodec=y.audioCodec,this.videoCodec=y.videoCodec,this.unknownCodecs=y.unknownCodecs,this.codecSet=[y.videoCodec,y.audioCodec].filter(function(m){return m}).join(",").replace(/\.[^.,]+/g,"")}return b(I,[{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(m){var g=m%this.url.length;this._urlId!==g&&(this.details=void 0,this._urlId=g)}}]),I}()},"./src/types/loader.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"PlaylistContextType",function(){return G}),k.d(X,"PlaylistLevelType",function(){return b});var G;(function(N){N.MANIFEST="manifest",N.LEVEL="level",N.AUDIO_TRACK="audioTrack",N.SUBTITLE_TRACK="subtitleTrack"})(G||(G={}));var b;(function(N){N.MAIN="main",N.AUDIO="audio",N.SUBTITLE="subtitle"})(b||(b={}))},"./src/types/transmuxer.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"ChunkMetadata",function(){return G});var G=function(K,W,n,I,y,m){I===void 0&&(I=0),y===void 0&&(y=-1),m===void 0&&(m=!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=b(),this.buffering={audio:b(),video:b(),audiovideo:b()},this.level=K,this.sn=W,this.id=n,this.size=I,this.part=y,this.partial=m};function b(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"AttrList",function(){return N});var G=/^(\d+)x(\d+)$/,b=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,N=function(){function K(n){typeof n=="string"&&(n=K.parseAttrList(n));for(var I in n)n.hasOwnProperty(I)&&(this[I]=n[I])}var W=K.prototype;return W.decimalInteger=function(I){var y=parseInt(this[I],10);return y>Number.MAX_SAFE_INTEGER?Infinity:y},W.hexadecimalInteger=function(I){if(this[I]){var y=(this[I]||"0x").slice(2);y=(y.length&1?"0":"")+y;for(var m=new Uint8Array(y.length/2),g=0;g<y.length/2;g++)m[g]=parseInt(y.slice(g*2,g*2+2),16);return m}else return null},W.hexadecimalIntegerAsNumber=function(I){var y=parseInt(this[I],16);return y>Number.MAX_SAFE_INTEGER?Infinity:y},W.decimalFloatingPoint=function(I){return parseFloat(this[I])},W.optionalFloat=function(I,y){var m=this[I];return m?parseFloat(m):y},W.enumeratedString=function(I){return this[I]},W.bool=function(I){return this[I]==="YES"},W.decimalResolution=function(I){var y=G.exec(this[I]);return y===null?void 0:{width:parseInt(y[1],10),height:parseInt(y[2],10)}},K.parseAttrList=function(I){var y,m={},g='"';for(b.lastIndex=0;(y=b.exec(I))!==null;){var u=y[2];u.indexOf(g)===0&&u.lastIndexOf(g)===u.length-1&&(u=u.slice(1,-1)),m[y[1]]=u}return m},K}()},"./src/utils/binary-search.ts":function(ae,X,k){"use strict";k.r(X);var G={search:function(N,K){for(var W=0,n=N.length-1,I=null,y=null;W<=n;){I=(W+n)/2|0,y=N[I];var m=K(y);if(m>0)W=I+1;else if(m<0)n=I-1;else return y}return null}};X.default=G},"./src/utils/buffer-helper.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"BufferHelper",function(){return N});var G=k("./src/utils/logger.ts"),b={length:0,start:function(){return 0},end:function(){return 0}},N=function(){function K(){}return K.isBuffered=function(n,I){try{if(n){for(var y=K.getBuffered(n),m=0;m<y.length;m++)if(I>=y.start(m)&&I<=y.end(m))return!0}}catch(g){}return!1},K.bufferInfo=function(n,I,y){try{if(n){var m=K.getBuffered(n),g=[],u;for(u=0;u<m.length;u++)g.push({start:m.start(u),end:m.end(u)});return this.bufferedInfo(g,I,y)}}catch(c){}return{len:0,start:I,end:I,nextStart:void 0}},K.bufferedInfo=function(n,I,y){I=Math.max(0,I),n.sort(function(C,L){var D=C.start-L.start;return D||L.end-C.end});var m=[];if(y)for(var g=0;g<n.length;g++){var u=m.length;if(u){var c=m[u-1].end;n[g].start-c<y?n[g].end>c&&(m[u-1].end=n[g].end):m.push(n[g])}else m.push(n[g])}else m=n;for(var p=0,l,o=I,s=I,a=0;a<m.length;a++){var A=m[a].start,S=m[a].end;if(I+y>=A&&I<S)o=A,s=S,p=s-I;else if(I+y<A){l=A;break}}return{len:p,start:o||0,end:s||0,nextStart:l}},K.getBuffered=function(n){try{return n.buffered}catch(I){return G.logger.log("failed to get media.buffered",I),b}},K}()},"./src/utils/cea-608-parser.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"Row",function(){return s}),k.d(X,"CaptionScreen",function(){return a});var G=k("./src/utils/logger.ts"),b={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},N=function(w){var x=w;return b.hasOwnProperty(w)&&(x=b[w]),String.fromCharCode(x)},K=15,W=100,n={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},I={17:2,18:4,21:6,22:8,23:10,19:13,20:15},y={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},m={25:2,26:4,29:6,30:8,31:10,27:13,28:15},g=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],u;(function(O){O[O.ERROR=0]="ERROR",O[O.TEXT=1]="TEXT",O[O.WARNING=2]="WARNING",O[O.INFO=2]="INFO",O[O.DEBUG=3]="DEBUG",O[O.DATA=3]="DATA"})(u||(u={}));var c=function(){function O(){this.time=null,this.verboseLevel=u.ERROR}var w=O.prototype;return w.log=function(d,E){this.verboseLevel>=d&&G.logger.log(this.time+" ["+d+"] "+E)},O}(),p=function(w){for(var x=[],d=0;d<w.length;d++)x.push(w[d].toString(16));return x},l=function(){function O(x,d,E,f,v){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=x||"white",this.underline=d||!1,this.italics=E||!1,this.background=f||"black",this.flash=v||!1}var w=O.prototype;return w.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},w.setStyles=function(d){for(var E=["foreground","underline","italics","background","flash"],f=0;f<E.length;f++){var v=E[f];d.hasOwnProperty(v)&&(this[v]=d[v])}},w.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},w.equals=function(d){return this.foreground===d.foreground&&this.underline===d.underline&&this.italics===d.italics&&this.background===d.background&&this.flash===d.flash},w.copy=function(d){this.foreground=d.foreground,this.underline=d.underline,this.italics=d.italics,this.background=d.background,this.flash=d.flash},w.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},O}(),o=function(){function O(x,d,E,f,v,T){this.uchar=void 0,this.penState=void 0,this.uchar=x||" ",this.penState=new l(d,E,f,v,T)}var w=O.prototype;return w.reset=function(){this.uchar=" ",this.penState.reset()},w.setChar=function(d,E){this.uchar=d,this.penState.copy(E)},w.setPenState=function(d){this.penState.copy(d)},w.equals=function(d){return this.uchar===d.uchar&&this.penState.equals(d.penState)},w.copy=function(d){this.uchar=d.uchar,this.penState.copy(d.penState)},w.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},O}(),s=function(){function O(x){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var d=0;d<W;d++)this.chars.push(new o);this.logger=x,this.pos=0,this.currPenState=new l}var w=O.prototype;return w.equals=function(d){for(var E=!0,f=0;f<W;f++)if(!this.chars[f].equals(d.chars[f])){E=!1;break}return E},w.copy=function(d){for(var E=0;E<W;E++)this.chars[E].copy(d.chars[E])},w.isEmpty=function(){for(var d=!0,E=0;E<W;E++)if(!this.chars[E].isEmpty()){d=!1;break}return d},w.setCursor=function(d){this.pos!==d&&(this.pos=d),this.pos<0?(this.logger.log(u.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>W&&(this.logger.log(u.DEBUG,"Too large cursor position "+this.pos),this.pos=W)},w.moveCursor=function(d){var E=this.pos+d;if(d>1)for(var f=this.pos+1;f<E+1;f++)this.chars[f].setPenState(this.currPenState);this.setCursor(E)},w.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},w.insertChar=function(d){d>=144&&this.backSpace();var E=N(d);if(this.pos>=W){this.logger.log(u.ERROR,"Cannot insert "+d.toString(16)+" ("+E+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(E,this.currPenState),this.moveCursor(1)},w.clearFromPos=function(d){var E;for(E=d;E<W;E++)this.chars[E].reset()},w.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},w.clearToEndOfRow=function(){this.clearFromPos(this.pos)},w.getTextString=function(){for(var d=[],E=!0,f=0;f<W;f++){var v=this.chars[f].uchar;v!==" "&&(E=!1),d.push(v)}return E?"":d.join("")},w.setPenStyles=function(d){this.currPenState.setStyles(d);var E=this.chars[this.pos];E.setPenState(this.currPenState)},O}(),a=function(){function O(x){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var d=0;d<K;d++)this.rows.push(new s(x));this.logger=x,this.currRow=K-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var w=O.prototype;return w.reset=function(){for(var d=0;d<K;d++)this.rows[d].clear();this.currRow=K-1},w.equals=function(d){for(var E=!0,f=0;f<K;f++)if(!this.rows[f].equals(d.rows[f])){E=!1;break}return E},w.copy=function(d){for(var E=0;E<K;E++)this.rows[E].copy(d.rows[E])},w.isEmpty=function(){for(var d=!0,E=0;E<K;E++)if(!this.rows[E].isEmpty()){d=!1;break}return d},w.backSpace=function(){var d=this.rows[this.currRow];d.backSpace()},w.clearToEndOfRow=function(){var d=this.rows[this.currRow];d.clearToEndOfRow()},w.insertChar=function(d){var E=this.rows[this.currRow];E.insertChar(d)},w.setPen=function(d){var E=this.rows[this.currRow];E.setPenStyles(d)},w.moveCursor=function(d){var E=this.rows[this.currRow];E.moveCursor(d)},w.setCursor=function(d){this.logger.log(u.INFO,"setCursor: "+d);var E=this.rows[this.currRow];E.setCursor(d)},w.setPAC=function(d){this.logger.log(u.INFO,"pacData = "+JSON.stringify(d));var E=d.row-1;if(this.nrRollUpRows&&E<this.nrRollUpRows-1&&(E=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==E){for(var f=0;f<K;f++)this.rows[f].clear();var v=this.currRow+1-this.nrRollUpRows,T=this.lastOutputScreen;if(T){var B=T.rows[v].cueStartTime,R=this.logger.time;if(B&&R!==null&&B<R)for(var j=0;j<this.nrRollUpRows;j++)this.rows[E-this.nrRollUpRows+j+1].copy(T.rows[v+j])}}this.currRow=E;var U=this.rows[this.currRow];if(d.indent!==null){var _=d.indent,J=Math.max(_-1,0);U.setCursor(d.indent),d.color=U.chars[J].penState.foreground}var ne={foreground:d.color,underline:d.underline,italics:d.italics,background:"black",flash:!1};this.setPen(ne)},w.setBkgData=function(d){this.logger.log(u.INFO,"bkgData = "+JSON.stringify(d)),this.backSpace(),this.setPen(d),this.insertChar(32)},w.setRollUpRows=function(d){this.nrRollUpRows=d},w.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(u.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(u.TEXT,this.getDisplayText());var d=this.currRow+1-this.nrRollUpRows,E=this.rows.splice(d,1)[0];E.clear(),this.rows.splice(this.currRow,0,E),this.logger.log(u.INFO,"Rolling up")},w.getDisplayText=function(d){d=d||!1;for(var E=[],f="",v=-1,T=0;T<K;T++){var B=this.rows[T].getTextString();B&&(v=T+1,d?E.push("Row "+v+": '"+B+"'"):E.push(B.trim()))}return E.length>0&&(d?f="["+E.join(" | ")+"]":f=E.join(`
|
|
`)),f},w.getTextAndFormat=function(){return this.rows},O}(),A=function(){function O(x,d,E){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=x,this.outputFilter=d,this.mode=null,this.verbose=0,this.displayedMemory=new a(E),this.nonDisplayedMemory=new a(E),this.lastOutputScreen=new a(E),this.currRollUpRow=this.displayedMemory.rows[K-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=E}var w=O.prototype;return w.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[K-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},w.getHandler=function(){return this.outputFilter},w.setHandler=function(d){this.outputFilter=d},w.setPAC=function(d){this.writeScreen.setPAC(d)},w.setBkgData=function(d){this.writeScreen.setBkgData(d)},w.setMode=function(d){if(d===this.mode)return;this.mode=d,this.logger.log(u.INFO,"MODE="+d),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=d},w.insertChars=function(d){for(var E=0;E<d.length;E++)this.writeScreen.insertChar(d[E]);var f=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(u.INFO,f+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(u.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},w.ccRCL=function(){this.logger.log(u.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},w.ccBS=function(){if(this.logger.log(u.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},w.ccAOF=function(){},w.ccAON=function(){},w.ccDER=function(){this.logger.log(u.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},w.ccRU=function(d){this.logger.log(u.INFO,"RU("+d+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(d)},w.ccFON=function(){this.logger.log(u.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},w.ccRDC=function(){this.logger.log(u.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},w.ccTR=function(){this.logger.log(u.INFO,"TR"),this.setMode("MODE_TEXT")},w.ccRTD=function(){this.logger.log(u.INFO,"RTD"),this.setMode("MODE_TEXT")},w.ccEDM=function(){this.logger.log(u.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},w.ccCR=function(){this.logger.log(u.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},w.ccENM=function(){this.logger.log(u.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},w.ccEOC=function(){if(this.logger.log(u.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var d=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=d,this.writeScreen=this.nonDisplayedMemory,this.logger.log(u.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},w.ccTO=function(d){this.logger.log(u.INFO,"TO("+d+") - Tab Offset"),this.writeScreen.moveCursor(d)},w.ccMIDROW=function(d){var E={flash:!1};if(E.underline=d%2===1,E.italics=d>=46,E.italics)E.foreground="white";else{var f=Math.floor(d/2)-16,v=["white","green","blue","cyan","red","yellow","magenta"];E.foreground=v[f]}this.logger.log(u.INFO,"MIDROW: "+JSON.stringify(E)),this.writeScreen.setPen(E)},w.outputDataUpdate=function(d){d===void 0&&(d=!1);var E=this.logger.time;if(E===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=E:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,E,this.lastOutputScreen),d&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:E),this.lastOutputScreen.copy(this.displayedMemory))},w.cueSplitAtTime=function(d){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,d,this.displayedMemory),this.cueStartTime=d))},O}(),S=function(){function O(x,d,E){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var f=new c;this.channels=[null,new A(x,d,f),new A(x+1,E,f)],this.cmdHistory=D(),this.logger=f}var w=O.prototype;return w.getHandler=function(d){return this.channels[d].getHandler()},w.setHandler=function(d,E){this.channels[d].setHandler(E)},w.addData=function(d,E){var f,v,T,B=!1;this.logger.time=d;for(var R=0;R<E.length;R+=2){if(v=E[R]&127,T=E[R+1]&127,v===0&&T===0)continue;if(this.logger.log(u.DATA,"["+p([E[R],E[R+1]])+"] -> ("+p([v,T])+")"),f=this.parseCmd(v,T),f||(f=this.parseMidrow(v,T)),f||(f=this.parsePAC(v,T)),f||(f=this.parseBackgroundAttributes(v,T)),!f&&(B=this.parseChars(v,T),B)){var j=this.currentChannel;if(j&&j>0){var U=this.channels[j];U.insertChars(B)}else this.logger.log(u.WARNING,"No channel found yet. TEXT-MODE?")}!f&&!B&&this.logger.log(u.WARNING,"Couldn't parse cleaned data "+p([v,T])+" orig: "+p([E[R],E[R+1]]))}},w.parseCmd=function(d,E){var f=this.cmdHistory,v=(d===20||d===28||d===21||d===29)&&E>=32&&E<=47,T=(d===23||d===31)&&E>=33&&E<=35;if(!(v||T))return!1;if(L(d,E,f))return C(null,null,f),this.logger.log(u.DEBUG,"Repeated command ("+p([d,E])+") is dropped"),!0;var B=d===20||d===21||d===23?1:2,R=this.channels[B];return d===20||d===21||d===28||d===29?E===32?R.ccRCL():E===33?R.ccBS():E===34?R.ccAOF():E===35?R.ccAON():E===36?R.ccDER():E===37?R.ccRU(2):E===38?R.ccRU(3):E===39?R.ccRU(4):E===40?R.ccFON():E===41?R.ccRDC():E===42?R.ccTR():E===43?R.ccRTD():E===44?R.ccEDM():E===45?R.ccCR():E===46?R.ccENM():E===47&&R.ccEOC():R.ccTO(E-32),C(d,E,f),this.currentChannel=B,!0},w.parseMidrow=function(d,E){var f=0;if((d===17||d===25)&&E>=32&&E<=47){if(d===17?f=1:f=2,f!==this.currentChannel)return this.logger.log(u.ERROR,"Mismatch channel in midrow parsing"),!1;var v=this.channels[f];return v?(v.ccMIDROW(E),this.logger.log(u.DEBUG,"MIDROW ("+p([d,E])+")"),!0):!1}return!1},w.parsePAC=function(d,E){var f,v=this.cmdHistory,T=(d>=17&&d<=23||d>=25&&d<=31)&&E>=64&&E<=127,B=(d===16||d===24)&&E>=64&&E<=95;if(!(T||B))return!1;if(L(d,E,v))return C(null,null,v),!0;var R=d<=23?1:2;E>=64&&E<=95?f=R===1?n[d]:y[d]:f=R===1?I[d]:m[d];var j=this.channels[R];return j?(j.setPAC(this.interpretPAC(f,E)),C(d,E,v),this.currentChannel=R,!0):!1},w.interpretPAC=function(d,E){var f,v={color:null,italics:!1,indent:null,underline:!1,row:d};return E>95?f=E-96:f=E-64,v.underline=(f&1)===1,f<=13?v.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(f/2)]:f<=15?(v.italics=!0,v.color="white"):v.indent=Math.floor((f-16)/2)*4,v},w.parseChars=function(d,E){var f,v=null,T=null;if(d>=25?(f=2,T=d-8):(f=1,T=d),T>=17&&T<=19){var B;T===17?B=E+80:T===18?B=E+112:B=E+144,this.logger.log(u.INFO,"Special char '"+N(B)+"' in channel "+f),v=[B]}else d>=32&&d<=127&&(v=E===0?[d]:[d,E]);if(v){var R=p(v);this.logger.log(u.DEBUG,"Char codes = "+R.join(",")),C(d,E,this.cmdHistory)}return v},w.parseBackgroundAttributes=function(d,E){var f=(d===16||d===24)&&E>=32&&E<=47,v=(d===23||d===31)&&E>=45&&E<=47;if(!(f||v))return!1;var T,B={};d===16||d===24?(T=Math.floor((E-32)/2),B.background=g[T],E%2===1&&(B.background=B.background+"_semi")):E===45?B.background="transparent":(B.foreground="black",E===47&&(B.underline=!0));var R=d<=23?1:2,j=this.channels[R];return j.setBkgData(B),C(d,E,this.cmdHistory),!0},w.reset=function(){for(var d=0;d<Object.keys(this.channels).length;d++){var E=this.channels[d];E&&E.reset()}this.cmdHistory=D()},w.cueSplitAtTime=function(d){for(var E=0;E<this.channels.length;E++){var f=this.channels[E];f&&f.cueSplitAtTime(d)}},O}();function C(O,w,x){x.a=O,x.b=w}function L(O,w,x){return x.a===O&&x.b===w}function D(){return{a:null,b:null}}X.default=S},"./src/utils/codecs.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"isCodecType",function(){return b}),k.d(X,"isCodecSupportedInMp4",function(){return N});var G={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function b(K,W){var n=G[W];return!!n&&n[K.slice(0,4)]===!0}function N(K,W){return MediaSource.isTypeSupported((W||"video")+'/mp4;codecs="'+K+'"')}},"./src/utils/cues.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/utils/vttparser.ts"),b=k("./src/utils/webvtt-parser.ts"),N=k("./src/utils/texttrack-utils.ts"),K=/\s/,W={newCue:function(I,y,m,g){for(var u=[],c,p,l,o,s,a=self.VTTCue||self.TextTrackCue,A=0;A<g.rows.length;A++)if(c=g.rows[A],l=!0,o=0,s="",!c.isEmpty()){for(var S=0;S<c.chars.length;S++)K.test(c.chars[S].uchar)&&l?o++:(s+=c.chars[S].uchar,l=!1);c.cueStartTime=y,y===m&&(m+=1e-4),o>=16?o--:o++;var C=Object(G.fixLineBreaks)(s.trim()),L=Object(b.generateCueId)(y,m,C);(!I||!I.cues||!I.cues.getCueById(L))&&(p=new a(y,m,C),p.id=L,p.line=A+1,p.align="left",p.position=10+Math.min(80,Math.floor(o*8/32)*10),u.push(p))}return I&&u.length&&(u.sort(function(D,O){return D.line==="auto"||O.line==="auto"?0:D.line>8&&O.line>8?O.line-D.line:D.line-O.line}),u.forEach(function(D){return Object(N.addCueToTrack)(I,D)})),u}};X.default=W},"./src/utils/discontinuities.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"findFirstFragWithCC",function(){return K}),k.d(X,"shouldAlignOnDiscontinuities",function(){return W}),k.d(X,"findDiscontinuousReferenceFrag",function(){return n}),k.d(X,"adjustSlidingStart",function(){return y}),k.d(X,"alignStream",function(){return m}),k.d(X,"alignPDT",function(){return u}),k.d(X,"alignFragmentByPDTDelta",function(){return c}),k.d(X,"alignMediaPlaylistByPDT",function(){return p});var G=k("./src/polyfills/number.ts"),b=k("./src/utils/logger.ts"),N=k("./src/controller/level-helper.ts");function K(l,o){for(var s=null,a=0,A=l.length;a<A;a++){var S=l[a];if(S&&S.cc===o){s=S;break}}return s}function W(l,o,s){return!!(o.details&&(s.endCC>s.startCC||l&&l.cc<s.startCC))}function n(l,o){var s=l.fragments,a=o.fragments;if(!a.length||!s.length){b.logger.log("No fragments to align");return}var A=K(s,a[0].cc);if(!A||A&&!A.startPTS){b.logger.log("No frag in previous level to align on");return}return A}function I(l,o){if(l){var s=l.start+o;l.start=l.startPTS=s,l.endPTS=s+l.duration}}function y(l,o){for(var s=o.fragments,a=0,A=s.length;a<A;a++)I(s[a],l);o.fragmentHint&&I(o.fragmentHint,l),o.alignedSliding=!0}function m(l,o,s){if(!o)return;g(l,s,o),!s.alignedSliding&&o.details&&u(s,o.details),!s.alignedSliding&&o.details&&!s.skippedSegments&&Object(N.adjustSliding)(o.details,s)}function g(l,o,s){if(W(l,s,o)){var a=n(s.details,o);a&&Object(G.isFiniteNumber)(a.start)&&(b.logger.log("Adjusting PTS using last level due to CC increase within current level "+o.url),y(a.start,o))}}function u(l,o){if(!o.fragments.length||!l.hasProgramDateTime||!o.hasProgramDateTime)return;var s=o.fragments[0].programDateTime,a=l.fragments[0].programDateTime,A=(a-s)/1e3+o.fragments[0].start;A&&Object(G.isFiniteNumber)(A)&&(b.logger.log("Adjusting PTS using programDateTime delta "+(a-s)+"ms, sliding:"+A.toFixed(3)+" "+l.url+" "),y(A,l))}function c(l,o){var s=l.programDateTime;if(!s)return;var a=(s-o)/1e3;l.start=l.startPTS=a,l.endPTS=a+l.duration}function p(l,o){if(!o.fragments.length||!l.hasProgramDateTime||!o.hasProgramDateTime)return;var s=o.fragments[0].programDateTime,a=o.fragments[0].start,A=s-a*1e3;l.fragments.forEach(function(S){c(S,A)}),l.fragmentHint&&c(l.fragmentHint,A),l.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/utils/ewma.ts"),b=function(){function N(W,n,I){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=I,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new G.default(W),this.fast_=new G.default(n)}var K=N.prototype;return K.update=function(n,I){var y=this.slow_,m=this.fast_;this.slow_.halfLife!==n&&(this.slow_=new G.default(n,y.getEstimate(),y.getTotalWeight())),this.fast_.halfLife!==I&&(this.fast_=new G.default(I,m.getEstimate(),m.getTotalWeight()))},K.sample=function(n,I){n=Math.max(n,this.minDelayMs_);var y=8*I,m=n/1e3,g=y/m;this.fast_.sample(m,g),this.slow_.sample(m,g)},K.canEstimate=function(){var n=this.fast_;return n&&n.getTotalWeight()>=this.minWeight_},K.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},K.destroy=function(){},N}();X.default=b},"./src/utils/ewma.ts":function(ae,X,k){"use strict";k.r(X);var G=function(){function b(K,W,n){W===void 0&&(W=0),n===void 0&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=K,this.alpha_=K?Math.exp(Math.log(.5)/K):0,this.estimate_=W,this.totalWeight_=n}var N=b.prototype;return N.sample=function(W,n){var I=Math.pow(this.alpha_,W);this.estimate_=n*(1-I)+I*this.estimate_,this.totalWeight_+=W},N.getTotalWeight=function(){return this.totalWeight_},N.getEstimate=function(){if(this.alpha_){var W=1-Math.pow(this.alpha_,this.totalWeight_);if(W)return this.estimate_/W}return this.estimate_},b}();X.default=G},"./src/utils/fetch-loader.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"fetchSupported",function(){return c});var G=k("./src/polyfills/number.ts"),b=k("./src/loader/load-stats.ts"),N=k("./src/demux/chunk-cache.ts");function K(a,A){a.prototype=Object.create(A.prototype),a.prototype.constructor=a,m(a,A)}function W(a){var A=typeof Map=="function"?new Map:void 0;return W=function(C){if(C===null||!y(C))return C;if(typeof C!="function")throw new TypeError("Super expression must either be null or a function");if(typeof A!="undefined"){if(A.has(C))return A.get(C);A.set(C,L)}function L(){return n(C,arguments,g(this).constructor)}return L.prototype=Object.create(C.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),m(L,C)},W(a)}function n(a,A,S){return I()?n=Reflect.construct:n=function(L,D,O){var w=[null];w.push.apply(w,D);var x=Function.bind.apply(L,w),d=new x;return O&&m(d,O.prototype),d},n.apply(null,arguments)}function I(){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(a){return!1}}function y(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function m(a,A){return m=Object.setPrototypeOf||function(C,L){return C.__proto__=L,C},m(a,A)}function g(a){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)},g(a)}function u(){return u=Object.assign||function(a){for(var A=1;A<arguments.length;A++){var S=arguments[A];for(var C in S)Object.prototype.hasOwnProperty.call(S,C)&&(a[C]=S[C])}return a},u.apply(this,arguments)}function c(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}var p=function(){function a(S){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=S.fetchSetup||o,this.controller=new self.AbortController,this.stats=new b.LoadStats}var A=a.prototype;return A.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},A.abortInternal=function(){var C=this.response;(!C||!C.ok)&&(this.stats.aborted=!0,this.controller.abort())},A.abort=function(){var C;this.abortInternal(),(C=this.callbacks)!==null&&C!==void 0&&C.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},A.load=function(C,L,D){var O=this,w=this.stats;if(w.loading.start)throw new Error("Loader can only be used once.");w.loading.start=self.performance.now();var x=l(C,this.controller.signal),d=D.onProgress,E=C.responseType==="arraybuffer",f=E?"byteLength":"length";this.context=C,this.config=L,this.callbacks=D,this.request=this.fetchSetup(C,x),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){O.abortInternal(),D.onTimeout(w,C,O.response)},L.timeout),self.fetch(this.request).then(function(v){if(O.response=O.loader=v,!v.ok){var T=v.status,B=v.statusText;throw new s(B||"fetch, bad network response",T,v)}return w.loading.first=Math.max(self.performance.now(),w.loading.start),w.total=parseInt(v.headers.get("Content-Length")||"0"),d&&Object(G.isFiniteNumber)(L.highWaterMark)?O.loadProgressively(v,w,C,L.highWaterMark,d):E?v.arrayBuffer():v.text()}).then(function(v){var T=O.response;self.clearTimeout(O.requestTimeout),w.loading.end=Math.max(self.performance.now(),w.loading.first),w.loaded=w.total=v[f];var B={url:T.url,data:v};d&&!Object(G.isFiniteNumber)(L.highWaterMark)&&d(w,C,v,T),D.onSuccess(B,w,C,T)}).catch(function(v){if(self.clearTimeout(O.requestTimeout),w.aborted)return;var T=v.code||0;D.onError({code:T,text:v.message},C,v.details)})},A.getCacheAge=function(){var C=null;if(this.response){var L=this.response.headers.get("age");C=L?parseFloat(L):null}return C},A.loadProgressively=function(C,L,D,O,w){O===void 0&&(O=0);var x=new N.default,d=C.body.getReader(),E=function f(){return d.read().then(function(v){if(v.done)return x.dataLength&&w(L,D,x.flush(),C),Promise.resolve(new ArrayBuffer(0));var T=v.value,B=T.length;return L.loaded+=B,B<O||x.dataLength?(x.push(T),x.dataLength>=O&&w(L,D,x.flush(),C)):w(L,D,T,C),f()}).catch(function(){return Promise.reject()})};return E()},a}();function l(a,A){var S={method:"GET",mode:"cors",credentials:"same-origin",signal:A,headers:new self.Headers(u({},a.headers))};return a.rangeEnd&&S.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),S}function o(a,A){return new self.Request(a.url,A)}var s=function(a){K(A,a);function A(S,C,L){var D;return D=a.call(this,S)||this,D.code=void 0,D.details=void 0,D.code=C,D.details=L,D}return A}(W(Error));X.default=p},"./src/utils/imsc1-ttml-parser.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"IMSC1_CODEC",function(){return y}),k.d(X,"parseIMSC1",function(){return c});var G=k("./src/utils/mp4-tools.ts"),b=k("./src/utils/vttparser.ts"),N=k("./src/utils/vttcue.ts"),K=k("./src/demux/id3.ts"),W=k("./src/utils/timescale-conversion.ts"),n=k("./src/utils/webvtt-parser.ts");function I(){return I=Object.assign||function(O){for(var w=1;w<arguments.length;w++){var x=arguments[w];for(var d in x)Object.prototype.hasOwnProperty.call(x,d)&&(O[d]=x[d])}return O},I.apply(this,arguments)}var y="stpp.ttml.im1t",m=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,g=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,u={left:"start",center:"center",right:"end",start:"start",end:"end"};function c(O,w,x,d,E){var f=Object(G.findBox)(new Uint8Array(O),["mdat"]);if(f.length===0){E(new Error("Could not parse IMSC1 mdat"));return}var v=f[0],T=Object(K.utf8ArrayToStr)(new Uint8Array(O,v.start,v.end-v.start)),B=Object(W.toTimescaleFromScale)(w,1,x);try{d(p(T,B))}catch(R){E(R)}}function p(O,w){var x=new DOMParser,d=x.parseFromString(O,"text/xml"),E=d.getElementsByTagName("tt")[0];if(!E)throw new Error("Invalid ttml");var f={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},v=Object.keys(f).reduce(function(U,_){return U[_]=E.getAttribute("ttp:"+_)||f[_],U},{}),T=E.getAttribute("xml:space")!=="preserve",B=o(l(E,"styling","style")),R=o(l(E,"layout","region")),j=l(E,"body","[begin]");return[].map.call(j,function(U){var _=s(U,T);if(!_||!U.hasAttribute("begin"))return null;var J=C(U.getAttribute("begin"),v),ne=C(U.getAttribute("dur"),v),he=C(U.getAttribute("end"),v);if(J===null)throw S(U);if(he===null){if(ne===null)throw S(U);he=J+ne}var be=new N.default(J-w,he-w,_);be.id=Object(n.generateCueId)(be.startTime,be.endTime,be.text);var Ke=R[U.getAttribute("region")],De=B[U.getAttribute("style")];be.position=10,be.size=80;var je=a(Ke,De),Be=je.textAlign;if(Be){var Ge=u[Be];Ge&&(be.lineAlign=Ge),be.align=Be}return I(be,je),be}).filter(function(U){return U!==null})}function l(O,w,x){var d=O.getElementsByTagName(w)[0];return d?[].slice.call(d.querySelectorAll(x)):[]}function o(O){return O.reduce(function(w,x){var d=x.getAttribute("xml:id");return d&&(w[d]=x),w},{})}function s(O,w){return[].slice.call(O.childNodes).reduce(function(x,d,E){var f;return d.nodeName==="br"&&E?x+`
|
|
`:(f=d.childNodes)!==null&&f!==void 0&&f.length?s(d,w):w?x+d.textContent.trim().replace(/\s+/g," "):x+d.textContent},"")}function a(O,w){var x="http://www.w3.org/ns/ttml#styling",d=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return d.reduce(function(E,f){var v=A(w,x,f)||A(O,x,f);return v&&(E[f]=v),E},{})}function A(O,w,x){return O.hasAttributeNS(w,x)?O.getAttributeNS(w,x):null}function S(O){return new Error("Could not parse ttml timestamp "+O)}function C(O,w){if(!O)return null;var x=Object(b.parseTimeStamp)(O);return x===null&&(m.test(O)?x=L(O,w):g.test(O)&&(x=D(O,w))),x}function L(O,w){var x=m.exec(O),d=(x[4]|0)+(x[5]|0)/w.subFrameRate;return(x[1]|0)*3600+(x[2]|0)*60+(x[3]|0)+d/w.frameRate}function D(O,w){var x=g.exec(O),d=Number(x[1]),E=x[2];switch(E){case"h":return d*3600;case"m":return d*60;case"ms":return d*1e3;case"f":return d/w.frameRate;case"t":return d/w.tickRate}return d}},"./src/utils/logger.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"enableLogs",function(){return n}),k.d(X,"logger",function(){return I});var G=function(){},b={trace:G,debug:G,log:G,warn:G,info:G,error:G},N=b;function K(y){var m=self.console[y];return m?m.bind(self.console,"["+y+"] >"):G}function W(y){for(var m=arguments.length,g=new Array(m>1?m-1:0),u=1;u<m;u++)g[u-1]=arguments[u];g.forEach(function(c){N[c]=y[c]?y[c].bind(y):K(c)})}function n(y){if(self.console&&y===!0||typeof y=="object"){W(y,"debug","log","info","warn","error");try{N.log()}catch(m){N=b}}else N=b}var I=N},"./src/utils/mediakeys-helper.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"KeySystems",function(){return G}),k.d(X,"requestMediaKeySystemAccess",function(){return b});var G;(function(N){N.WIDEVINE="com.widevine.alpha",N.PLAYREADY="com.microsoft.playready"})(G||(G={}));var b=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"getMediaSource",function(){return G});function G(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"bin2str",function(){return W}),k.d(X,"readUint16",function(){return n}),k.d(X,"readUint32",function(){return I}),k.d(X,"writeUint32",function(){return y}),k.d(X,"findBox",function(){return m}),k.d(X,"parseSegmentIndex",function(){return g}),k.d(X,"parseInitSegment",function(){return u}),k.d(X,"getStartDTS",function(){return c}),k.d(X,"getDuration",function(){return p}),k.d(X,"computeRawDurationFromSamples",function(){return l}),k.d(X,"offsetStartDTS",function(){return o}),k.d(X,"segmentValidRange",function(){return s}),k.d(X,"appendUint8Array",function(){return a});var G=k("./src/utils/typed-array.ts"),b=k("./src/loader/fragment.ts"),N=Math.pow(2,32)-1,K=[].push;function W(A){return String.fromCharCode.apply(null,A)}function n(A,S){"data"in A&&(S+=A.start,A=A.data);var C=A[S]<<8|A[S+1];return C<0?65536+C:C}function I(A,S){"data"in A&&(S+=A.start,A=A.data);var C=A[S]<<24|A[S+1]<<16|A[S+2]<<8|A[S+3];return C<0?4294967296+C:C}function y(A,S,C){"data"in A&&(S+=A.start,A=A.data),A[S]=C>>24,A[S+1]=C>>16&255,A[S+2]=C>>8&255,A[S+3]=C&255}function m(A,S){var C=[];if(!S.length)return C;var L,D,O;"data"in A?(L=A.data,D=A.start,O=A.end):(L=A,D=0,O=L.byteLength);for(var w=D;w<O;){var x=I(L,w),d=W(L.subarray(w+4,w+8)),E=x>1?w+x:O;if(d===S[0])if(S.length===1)C.push({data:L,start:w+8,end:E});else{var f=m({data:L,start:w+8,end:E},S.slice(1));f.length&&K.apply(C,f)}w=E}return C}function g(A){var S=m(A,["moov"]),C=S[0],L=C?C.end:null,D=m(A,["sidx"]);if(!D||!D[0])return null;var O=[],w=D[0],x=w.data[0],d=x===0?8:16,E=I(w,d);d+=4;var f=0,v=0;x===0?d+=8:d+=16,d+=2;var T=w.end+v,B=n(w,d);d+=2;for(var R=0;R<B;R++){var j=d,U=I(w,j);j+=4;var _=U&2147483647,J=(U&2147483648)>>>31;if(J===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ne=I(w,j);j+=4,O.push({referenceSize:_,subsegmentDuration:ne,info:{duration:ne/E,start:T,end:T+_-1}}),T+=_,j+=4,d=j}return{earliestPresentationTime:f,timescale:E,version:x,referencesCount:B,references:O,moovEndOffset:L}}function u(A){for(var S=[],C=m(A,["moov","trak"]),L=0;L<C.length;L++){var D=C[L],O=m(D,["tkhd"])[0];if(O){var w=O.data[O.start],x=w===0?12:20,d=I(O,x),E=m(D,["mdia","mdhd"])[0];if(E){w=E.data[E.start],x=w===0?12:20;var f=I(E,x),v=m(D,["mdia","hdlr"])[0];if(v){var T=W(v.data.subarray(v.start+8,v.start+12)),B={soun:b.ElementaryStreamTypes.AUDIO,vide:b.ElementaryStreamTypes.VIDEO}[T];if(B){var R=m(D,["mdia","minf","stbl","stsd"])[0],j=void 0;R&&(j=W(R.data.subarray(R.start+12,R.start+16))),S[d]={timescale:f,type:B},S[B]={timescale:f,id:d,codec:j}}}}}}var U=m(A,["moov","mvex","trex"]);return U.forEach(function(_){var J=I(_,4),ne=S[J];ne&&(ne.default={duration:I(_,12),flags:I(_,20)})}),S}function c(A,S){return m(S,["moof","traf"]).reduce(function(C,L){var D=m(L,["tfdt"])[0],O=D.data[D.start],w=m(L,["tfhd"]).reduce(function(x,d){var E=I(d,4),f=A[E];if(f){var v=I(D,4);O===1&&(v*=Math.pow(2,32),v+=I(D,8));var T=f.timescale||9e4,B=v/T;if(isFinite(B)&&(x===null||B<x))return B}return x},null);return w!==null&&isFinite(w)&&(C===null||w<C)?w:C},null)||0}function p(A,S){for(var C=0,L=0,D=0,O=m(A,["moof","traf"]),w=0;w<O.length;w++){var x=O[w],d=m(x,["tfhd"])[0],E=I(d,4),f=S[E];if(!f)continue;var v=f.default,T=I(d,0)|(v==null?void 0:v.flags),B=v==null?void 0:v.duration;T&8&&(T&2?B=I(d,12):B=I(d,8));for(var R=f.timescale||9e4,j=m(x,["trun"]),U=0;U<j.length;U++){if(B){var _=I(j[U],4);C=B*_}else C=l(j[U]);f.type===b.ElementaryStreamTypes.VIDEO?L+=C/R:f.type===b.ElementaryStreamTypes.AUDIO&&(D+=C/R)}}if(L===0&&D===0){var J=g(A);if(J!=null&&J.references)return J.references.reduce(function(ne,he){return ne+he.info.duration||0},0)}return L||D}function l(A){var S=I(A,0),C=8;S&1&&(C+=4),S&4&&(C+=4);for(var L=0,D=I(A,4),O=0;O<D;O++){if(S&256){var w=I(A,C);L+=w,C+=4}S&512&&(C+=4),S&1024&&(C+=4),S&2048&&(C+=4)}return L}function o(A,S,C){m(S,["moof","traf"]).forEach(function(L){m(L,["tfhd"]).forEach(function(D){var O=I(D,4),w=A[O];if(!w)return;var x=w.timescale||9e4;m(L,["tfdt"]).forEach(function(d){var E=d.data[d.start],f=I(d,4);if(E===0)y(d,4,f-C*x);else{f*=Math.pow(2,32),f+=I(d,8),f-=C*x,f=Math.max(f,0);var v=Math.floor(f/(N+1)),T=Math.floor(f%(N+1));y(d,4,v),y(d,8,T)}})})})}function s(A){var S={valid:null,remainder:null},C=m(A,["moof"]);if(C){if(C.length<2)return S.remainder=A,S}else return S;var L=C[C.length-1];return S.valid=Object(G.sliceUint8)(A,0,L.start-8),S.remainder=Object(G.sliceUint8)(A,L.start-8),S}function a(A,S){var C=new Uint8Array(A.length+S.length);return C.set(A),C.set(S,A.length),C}},"./src/utils/output-filter.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"default",function(){return G});var G=function(){function b(K,W){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=K,this.trackName=W}var N=b.prototype;return N.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},N.newCue=function(W,n,I){(this.startTime===null||this.startTime>W)&&(this.startTime=W),this.endTime=n,this.screen=I,this.timelineController.createCaptionsTrack(this.trackName)},N.reset=function(){this.cueRanges=[]},b}()},"./src/utils/texttrack-utils.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"sendAddTrackEvent",function(){return b}),k.d(X,"addCueToTrack",function(){return N}),k.d(X,"clearCurrentCues",function(){return K}),k.d(X,"removeCuesInRange",function(){return W}),k.d(X,"getCuesInRange",function(){return I});var G=k("./src/utils/logger.ts");function b(y,m){var g;try{g=new Event("addtrack")}catch(u){g=document.createEvent("Event"),g.initEvent("addtrack",!1,!1)}g.track=y,m.dispatchEvent(g)}function N(y,m){var g=y.mode;if(g==="disabled"&&(y.mode="hidden"),y.cues&&!y.cues.getCueById(m.id))try{if(y.addCue(m),!y.cues.getCueById(m.id))throw new Error("addCue is failed for: "+m)}catch(c){G.logger.debug("[texttrack-utils]: "+c);var u=new self.TextTrackCue(m.startTime,m.endTime,m.text);u.id=m.id,y.addCue(u)}g==="disabled"&&(y.mode=g)}function K(y){var m=y.mode;if(m==="disabled"&&(y.mode="hidden"),y.cues)for(var g=y.cues.length;g--;)y.removeCue(y.cues[g]);m==="disabled"&&(y.mode=m)}function W(y,m,g){var u=y.mode;if(u==="disabled"&&(y.mode="hidden"),y.cues&&y.cues.length>0)for(var c=I(y.cues,m,g),p=0;p<c.length;p++)y.removeCue(c[p]);u==="disabled"&&(y.mode=u)}function n(y,m){if(m<y[0].startTime)return 0;var g=y.length-1;if(m>y[g].endTime)return-1;for(var u=0,c=g;u<=c;){var p=Math.floor((c+u)/2);if(m<y[p].startTime)c=p-1;else if(m>y[p].startTime&&u<g)u=p+1;else return p}return y[u].startTime-m<m-y[c].startTime?u:c}function I(y,m,g){var u=[],c=n(y,m);if(c>-1)for(var p=c,l=y.length;p<l;p++){var o=y[p];if(o.startTime>=m&&o.endTime<=g)u.push(o);else if(o.startTime>g)return u}return u}},"./src/utils/time-ranges.ts":function(ae,X,k){"use strict";k.r(X);var G={toString:function(N){for(var K="",W=N.length,n=0;n<W;n++)K+="["+N.start(n).toFixed(3)+","+N.end(n).toFixed(3)+"]";return K}};X.default=G},"./src/utils/timescale-conversion.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"toTimescaleFromBase",function(){return b}),k.d(X,"toTimescaleFromScale",function(){return N}),k.d(X,"toMsFromMpegTsClock",function(){return K}),k.d(X,"toMpegTsClockFromTimescale",function(){return W});var G=9e4;function b(n,I,y,m){y===void 0&&(y=1),m===void 0&&(m=!1);var g=n*I*y;return m?Math.round(g):g}function N(n,I,y,m){return y===void 0&&(y=1),m===void 0&&(m=!1),b(n,I,1/y,m)}function K(n,I){return I===void 0&&(I=!1),b(n,1e3,1/G,I)}function W(n,I){return I===void 0&&(I=1),b(n,G,1/I)}},"./src/utils/typed-array.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"sliceUint8",function(){return G});function G(b,N,K){return Uint8Array.prototype.slice?b.slice(N,K):new Uint8Array(Array.prototype.slice.call(b,N,K))}},"./src/utils/vttcue.ts":function(ae,X,k){"use strict";k.r(X),X.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var G=["","lr","rl"],b=["start","middle","end","left","right"];function N(y,m){if(typeof m!="string")return!1;if(!Array.isArray(y))return!1;var g=m.toLowerCase();return~y.indexOf(g)?g:!1}function K(y){return N(G,y)}function W(y){return N(b,y)}function n(y){for(var m=arguments.length,g=new Array(m>1?m-1:0),u=1;u<m;u++)g[u-1]=arguments[u];for(var c=1;c<arguments.length;c++){var p=arguments[c];for(var l in p)y[l]=p[l]}return y}function I(y,m,g){var u=this,c={enumerable:!0};u.hasBeenReset=!1;var p="",l=!1,o=y,s=m,a=g,A=null,S="",C=!0,L="auto",D="start",O=50,w="middle",x=50,d="middle";Object.defineProperty(u,"id",n({},c,{get:function(){return p},set:function(f){p=""+f}})),Object.defineProperty(u,"pauseOnExit",n({},c,{get:function(){return l},set:function(f){l=!!f}})),Object.defineProperty(u,"startTime",n({},c,{get:function(){return o},set:function(f){if(typeof f!="number")throw new TypeError("Start time must be set to a number.");o=f,this.hasBeenReset=!0}})),Object.defineProperty(u,"endTime",n({},c,{get:function(){return s},set:function(f){if(typeof f!="number")throw new TypeError("End time must be set to a number.");s=f,this.hasBeenReset=!0}})),Object.defineProperty(u,"text",n({},c,{get:function(){return a},set:function(f){a=""+f,this.hasBeenReset=!0}})),Object.defineProperty(u,"region",n({},c,{get:function(){return A},set:function(f){A=f,this.hasBeenReset=!0}})),Object.defineProperty(u,"vertical",n({},c,{get:function(){return S},set:function(f){var v=K(f);if(v===!1)throw new SyntaxError("An invalid or illegal string was specified.");S=v,this.hasBeenReset=!0}})),Object.defineProperty(u,"snapToLines",n({},c,{get:function(){return C},set:function(f){C=!!f,this.hasBeenReset=!0}})),Object.defineProperty(u,"line",n({},c,{get:function(){return L},set:function(f){if(typeof f!="number"&&f!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");L=f,this.hasBeenReset=!0}})),Object.defineProperty(u,"lineAlign",n({},c,{get:function(){return D},set:function(f){var v=W(f);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");D=v,this.hasBeenReset=!0}})),Object.defineProperty(u,"position",n({},c,{get:function(){return O},set:function(f){if(f<0||f>100)throw new Error("Position must be between 0 and 100.");O=f,this.hasBeenReset=!0}})),Object.defineProperty(u,"positionAlign",n({},c,{get:function(){return w},set:function(f){var v=W(f);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");w=v,this.hasBeenReset=!0}})),Object.defineProperty(u,"size",n({},c,{get:function(){return x},set:function(f){if(f<0||f>100)throw new Error("Size must be between 0 and 100.");x=f,this.hasBeenReset=!0}})),Object.defineProperty(u,"align",n({},c,{get:function(){return d},set:function(f){var v=W(f);if(!v)throw new SyntaxError("An invalid or illegal string was specified.");d=v,this.hasBeenReset=!0}})),u.displayState=void 0}return I.prototype.getCueAsHTML=function(){var y=self.WebVTT;return y.convertCueToDOMTree(self,this.text)},I}()},"./src/utils/vttparser.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"parseTimeStamp",function(){return N}),k.d(X,"fixLineBreaks",function(){return m}),k.d(X,"VTTParser",function(){return g});var G=k("./src/utils/vttcue.ts"),b=function(){function u(){}var c=u.prototype;return c.decode=function(l,o){if(!l)return"";if(typeof l!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(l))},u}();function N(u){function c(l,o,s,a){return(l|0)*3600+(o|0)*60+(s|0)+parseFloat(a||0)}var p=u.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return p?parseFloat(p[2])>59?c(p[2],p[3],0,p[4]):c(p[1],p[2],p[3],p[4]):null}var K=function(){function u(){this.values=Object.create(null)}var c=u.prototype;return c.set=function(l,o){!this.get(l)&&o!==""&&(this.values[l]=o)},c.get=function(l,o,s){return s?this.has(l)?this.values[l]:o[s]:this.has(l)?this.values[l]:o},c.has=function(l){return l in this.values},c.alt=function(l,o,s){for(var a=0;a<s.length;++a)if(o===s[a]){this.set(l,o);break}},c.integer=function(l,o){/^-?\d+$/.test(o)&&this.set(l,parseInt(o,10))},c.percent=function(l,o){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(o)){var s=parseFloat(o);if(s>=0&&s<=100)return this.set(l,s),!0}return!1},u}();function W(u,c,p,l){var o=l?u.split(l):[u];for(var s in o){if(typeof o[s]!="string")continue;var a=o[s].split(p);if(a.length!==2)continue;var A=a[0],S=a[1];c(A,S)}}var n=new G.default(0,0,""),I=n.align==="middle"?"middle":"center";function y(u,c,p){var l=u;function o(){var A=N(u);if(A===null)throw new Error("Malformed timestamp: "+l);return u=u.replace(/^[^\sa-zA-Z-]+/,""),A}function s(A,S){var C=new K;W(A,function(O,w){var x;switch(O){case"region":for(var d=p.length-1;d>=0;d--)if(p[d].id===w){C.set(O,p[d].region);break}break;case"vertical":C.alt(O,w,["rl","lr"]);break;case"line":x=w.split(","),C.integer(O,x[0]),C.percent(O,x[0])&&C.set("snapToLines",!1),C.alt(O,x[0],["auto"]),x.length===2&&C.alt("lineAlign",x[1],["start",I,"end"]);break;case"position":x=w.split(","),C.percent(O,x[0]),x.length===2&&C.alt("positionAlign",x[1],["start",I,"end","line-left","line-right","auto"]);break;case"size":C.percent(O,w);break;case"align":C.alt(O,w,["start",I,"end","left","right"]);break}},/:/,/\s/),S.region=C.get("region",null),S.vertical=C.get("vertical","");var L=C.get("line","auto");L==="auto"&&n.line===-1&&(L=-1),S.line=L,S.lineAlign=C.get("lineAlign","start"),S.snapToLines=C.get("snapToLines",!0),S.size=C.get("size",100),S.align=C.get("align",I);var D=C.get("position","auto");D==="auto"&&n.position===50&&(D=S.align==="start"||S.align==="left"?0:S.align==="end"||S.align==="right"?100:50),S.position=D}function a(){u=u.replace(/^\s+/,"")}if(a(),c.startTime=o(),a(),u.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+l);u=u.substr(3),a(),c.endTime=o(),a(),s(u,c)}function m(u){return u.replace(/<br(?: \/)?>/gi,`
|
|
`)}var g=function(){function u(){this.state="INITIAL",this.buffer="",this.decoder=new b,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var c=u.prototype;return c.parse=function(l){var o=this;l&&(o.buffer+=o.decoder.decode(l,{stream:!0}));function s(){var D=o.buffer,O=0;for(D=m(D);O<D.length&&D[O]!=="\r"&&D[O]!==`
|
|
`;)++O;var w=D.substr(0,O);return D[O]==="\r"&&++O,D[O]===`
|
|
`&&++O,o.buffer=D.substr(O),w}function a(D){W(D,function(O,w){},/:/)}try{var A="";if(o.state==="INITIAL"){if(!/\r\n|\n/.test(o.buffer))return this;A=s();var S=A.match(/^()?WEBVTT([ \t].*)?$/);if(!S||!S[0])throw new Error("Malformed WebVTT signature.");o.state="HEADER"}for(var C=!1;o.buffer;){if(!/\r\n|\n/.test(o.buffer))return this;C?C=!1:A=s();switch(o.state){case"HEADER":/:/.test(A)?a(A):A||(o.state="ID");continue;case"NOTE":A||(o.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(A)){o.state="NOTE";break}if(!A)continue;if(o.cue=new G.default(0,0,""),o.state="CUE",A.indexOf("-->")===-1){o.cue.id=A;continue}case"CUE":if(!o.cue){o.state="BADCUE";continue}try{y(A,o.cue,o.regionList)}catch(D){o.cue=null,o.state="BADCUE";continue}o.state="CUETEXT";continue;case"CUETEXT":{var L=A.indexOf("-->")!==-1;if(!A||L&&(C=!0)){o.oncue&&o.cue&&o.oncue(o.cue),o.cue=null,o.state="ID";continue}if(o.cue===null)continue;o.cue.text&&(o.cue.text+=`
|
|
`),o.cue.text+=A}continue;case"BADCUE":A||(o.state="ID")}}}catch(D){o.state==="CUETEXT"&&o.cue&&o.oncue&&o.oncue(o.cue),o.cue=null,o.state=o.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},c.flush=function(){var l=this;try{if((l.cue||l.state==="HEADER")&&(l.buffer+=`
|
|
|
|
`,l.parse()),l.state==="INITIAL"||l.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(o){l.onparsingerror&&l.onparsingerror(o)}return l.onflush&&l.onflush(),this},u}()},"./src/utils/webvtt-parser.ts":function(ae,X,k){"use strict";k.r(X),k.d(X,"generateCueId",function(){return g}),k.d(X,"parseWebVTT",function(){return c});var G=k("./src/polyfills/number.ts"),b=k("./src/utils/vttparser.ts"),N=k("./src/demux/id3.ts"),K=k("./src/utils/timescale-conversion.ts"),W=k("./src/remux/mp4-remuxer.ts"),n=/\r\n|\n\r|\n|\r/g,I=function(l,o,s){return s===void 0&&(s=0),l.substr(s,o.length)===o},y=function(l){var o=parseInt(l.substr(-3)),s=parseInt(l.substr(-6,2)),a=parseInt(l.substr(-9,2)),A=l.length>9?parseInt(l.substr(0,l.indexOf(":"))):0;if(!Object(G.isFiniteNumber)(o)||!Object(G.isFiniteNumber)(s)||!Object(G.isFiniteNumber)(a)||!Object(G.isFiniteNumber)(A))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+l);return o+=1e3*s,o+=60*1e3*a,o+=60*60*1e3*A,o},m=function(l){for(var o=5381,s=l.length;s;)o=o*33^l.charCodeAt(--s);return(o>>>0).toString()};function g(p,l,o){return m(p.toString())+m(l.toString())+m(o)}var u=function(l,o,s){var a=l[o],A=l[a.prevCC];if(!A||!A.new&&a.new){l.ccOffset=l.presentationOffset=a.start,a.new=!1;return}for(;(S=A)!==null&&S!==void 0&&S.new;){var S;l.ccOffset+=a.start-A.start,a.new=!1,a=A,A=l[a.prevCC]}l.presentationOffset=s};function c(p,l,o,s,a,A,S,C){var L=new b.VTTParser,D=Object(N.utf8ArrayToStr)(new Uint8Array(p)).trim().replace(n,`
|
|
`).split(`
|
|
`),O=[],w=Object(K.toMpegTsClockFromTimescale)(l,o),x="00:00.000",d=0,E=0,f,v=!0,T=!1;L.oncue=function(B){var R=s[a],j=s.ccOffset,U=(d-w)/9e4;if(R!=null&&R.new&&(E!==void 0?j=s.ccOffset=R.start:u(s,a,U)),U&&(j=U-s.presentationOffset),T){var _=B.endTime-B.startTime,J=Object(W.normalizePts)((B.startTime+j-E)*9e4,A*9e4)/9e4;B.startTime=J,B.endTime=J+_}var ne=B.text.trim();B.text=decodeURIComponent(encodeURIComponent(ne)),B.id||(B.id=g(B.startTime,B.endTime,ne)),B.endTime>0&&O.push(B)},L.onparsingerror=function(B){f=B},L.onflush=function(){if(f){C(f);return}S(O)},D.forEach(function(B){if(v)if(I(B,"X-TIMESTAMP-MAP=")){v=!1,T=!0,B.substr(16).split(",").forEach(function(R){I(R,"LOCAL:")?x=R.substr(6):I(R,"MPEGTS:")&&(d=parseInt(R.substr(7)))});try{E=y(x)/1e3}catch(R){T=!1,f=R}return}else B===""&&(v=!1);L.parse(B+`
|
|
`)}),L.flush()}},"./src/utils/xhr-loader.ts":function(ae,X,k){"use strict";k.r(X);var G=k("./src/utils/logger.ts"),b=k("./src/loader/load-stats.ts"),N=/^age:\s*[\d.]+\s*$/m,K=function(){function W(I){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=I?I.xhrSetup:null,this.stats=new b.LoadStats,this.retryDelay=0}var n=W.prototype;return n.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},n.abortInternal=function(){var y=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),y&&(y.onreadystatechange=null,y.onprogress=null,y.readyState!==4&&(this.stats.aborted=!0,y.abort()))},n.abort=function(){var y;this.abortInternal(),(y=this.callbacks)!==null&&y!==void 0&&y.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},n.load=function(y,m,g){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=y,this.config=m,this.callbacks=g,this.retryDelay=m.retryDelay,this.loadInternal()},n.loadInternal=function(){var y=this.config,m=this.context;if(!y)return;var g=this.loader=new self.XMLHttpRequest,u=this.stats;u.loading.first=0,u.loaded=0;var c=this.xhrSetup;try{if(c)try{c(g,m.url)}catch(o){g.open("GET",m.url,!0),c(g,m.url)}g.readyState||g.open("GET",m.url,!0);var p=this.context.headers;if(p)for(var l in p)g.setRequestHeader(l,p[l])}catch(o){this.callbacks.onError({code:g.status,text:o.message},m,g);return}m.rangeEnd&&g.setRequestHeader("Range","bytes="+m.rangeStart+"-"+(m.rangeEnd-1)),g.onreadystatechange=this.readystatechange.bind(this),g.onprogress=this.loadprogress.bind(this),g.responseType=m.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),y.timeout),g.send()},n.readystatechange=function(){var y=this.context,m=this.loader,g=this.stats;if(!y||!m)return;var u=m.readyState,c=this.config;if(g.aborted)return;if(u>=2)if(self.clearTimeout(this.requestTimeout),g.loading.first===0&&(g.loading.first=Math.max(self.performance.now(),g.loading.start)),u===4){m.onreadystatechange=null,m.onprogress=null;var p=m.status;if(p>=200&&p<300){g.loading.end=Math.max(self.performance.now(),g.loading.first);var l,o;if(y.responseType==="arraybuffer"?(l=m.response,o=l.byteLength):(l=m.responseText,o=l.length),g.loaded=g.total=o,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(g,y,l,m),!this.callbacks)return;var a={url:m.responseURL,data:l};this.callbacks.onSuccess(a,g,y,m)}else g.retry>=c.maxRetry||p>=400&&p<499?(G.logger.error(p+" while loading "+y.url),this.callbacks.onError({code:p,text:m.statusText},y,m)):(G.logger.warn(p+" while loading "+y.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,c.maxRetryDelay),g.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),c.timeout)},n.loadtimeout=function(){G.logger.warn("timeout while loading "+this.context.url);var y=this.callbacks;y&&(this.abortInternal(),y.onTimeout(this.stats,this.context,this.loader))},n.loadprogress=function(y){var m=this.stats;m.loaded=y.loaded,y.lengthComputable&&(m.total=y.total)},n.getCacheAge=function(){var y=null;if(this.loader&&N.test(this.loader.getAllResponseHeaders())){var m=this.loader.getResponseHeader("age");y=m?parseFloat(m):null}return y},W}();X.default=K}}).default})},vHTk:function(tt,Ee,H){tt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},xiVL:function(tt,Ee){tt.exports="data:image/png;base64,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"},xvzu:function(tt,Ee,H){tt.exports={flex_box_center:"flex_box_center___11Yx1",flex_space_between:"flex_space_between___3B8wg",flex_box_vertical_center:"flex_box_vertical_center___1cm8r",flex_box_center_end:"flex_box_center_end___2h7Wz",flex_box_column:"flex_box_column___1vJbd",wrap:"wrap___30mNN",modal:"modal___39YWi",titleWrap:"titleWrap___25lJO",required:"required___2_KP9",title:"title___dFjtB",colorGray:"colorGray___3RoHj",choiceWrap:"choiceWrap___14CFD",answer:"answer___10oFr",activeAnswer:"activeAnswer___S76uT",deleteIcon:"deleteIcon___kKaJg",addIcon:"addIcon___3w3u_",editorWrap:"editorWrap___3DrnO",htmlWrap:"htmlWrap___1tGnP",radio:"radio___24YhJ",color333:"color333___1O71o",color999:"color999___xHfER",questionType:"questionType___22Z7J",questionChoices:"questionChoices____Unas"}},z4EP:function(tt,Ee){tt.exports="data:image/png;base64,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"}}]);
|