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.
481 lines
1.7 MiB
481 lines
1.7 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[109,3,5,7,8,9,18],{"+NIl":function(Ve,Ae,N){(function(Z){Z(N("VrN/"))})(function(Z){"use strict";Z.defineMode("stex",function(H,O){"use strict";function Q(s,o){s.cmdState.push(o)}function M(s){return s.cmdState.length>0?s.cmdState[s.cmdState.length-1]:null}function _(s){var o=s.cmdState.pop();o&&o.closeBracket()}function R(s){for(var o=s.cmdState,f=o.length-1;f>=0;f--){var u=o[f];if(u.name=="DEFAULT")continue;return u}return{styleIdentifier:function(){return null}}}function b(s,o,f){return function(){this.name=s,this.bracketNo=0,this.style=o,this.styles=f,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var t={};t.importmodule=b("importmodule","tag",["string","builtin"]),t.documentclass=b("documentclass","tag",["","atom"]),t.usepackage=b("usepackage","tag",["atom"]),t.begin=b("begin","tag",["atom"]),t.end=b("end","tag",["atom"]),t.label=b("label","tag",["atom"]),t.ref=b("ref","tag",["atom"]),t.eqref=b("eqref","tag",["atom"]),t.cite=b("cite","tag",["atom"]),t.bibitem=b("bibitem","tag",["atom"]),t.Bibitem=b("Bibitem","tag",["atom"]),t.RBibitem=b("RBibitem","tag",["atom"]),t.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function E(s,o){s.f=o}function a(s,o){var f;if(s.match(/^\\[a-zA-Z@]+/)){var u=s.current().slice(1);return f=t.hasOwnProperty(u)?t[u]:t.DEFAULT,f=new f,Q(o,f),E(o,h),f.style}if(s.match(/^\\[$&%#{}_]/))return"tag";if(s.match(/^\\[,;!\/\\]/))return"tag";if(s.match("\\["))return E(o,function(i,l){return A(i,l,"\\]")}),"keyword";if(s.match("\\("))return E(o,function(i,l){return A(i,l,"\\)")}),"keyword";if(s.match("$$"))return E(o,function(i,l){return A(i,l,"$$")}),"keyword";if(s.match("$"))return E(o,function(i,l){return A(i,l,"$")}),"keyword";var c=s.next();if(c=="%")return s.skipToEnd(),"comment";if(c=="}"||c=="]"){if(f=M(o),f)f.closeBracket(c),E(o,h);else return"error";return"bracket"}else return c=="{"||c=="["?(f=t.DEFAULT,f=new f,Q(o,f),"bracket"):/\d/.test(c)?(s.eatWhile(/[\w.%]/),"atom"):(s.eatWhile(/[\w\-_]/),f=R(o),f.name=="begin"&&(f.argument=s.current()),f.styleIdentifier())}function A(s,o,f){if(s.eatSpace())return null;if(f&&s.match(f))return E(o,a),"keyword";if(s.match(/^\\[a-zA-Z@]+/))return"tag";if(s.match(/^[a-zA-Z]+/))return"variable-2";if(s.match(/^\\[$&%#{}_]/))return"tag";if(s.match(/^\\[,;!\/]/))return"tag";if(s.match(/^[\^_&]/))return"tag";if(s.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(s.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var u=s.next();return u=="{"||u=="}"||u=="["||u=="]"||u=="("||u==")"?"bracket":u=="%"?(s.skipToEnd(),"comment"):"error"}function h(s,o){var f=s.peek(),u;return f=="{"||f=="["?(u=M(o),u.openBracket(f),s.eat(f),E(o,a),"bracket"):/[ \t\r]/.test(f)?(s.eat(f),null):(E(o,a),_(o),a(s,o))}return{startState:function(){var s=O.inMathMode?function(o,f){return A(o,f)}:a;return{cmdState:[],f:s}},copyState:function(s){return{cmdState:s.cmdState.slice(),f:s.f}},token:function(s,o){return o.f(s,o)},blankLine:function(s){s.f=a,s.cmdState.length=0},lineComment:"%"}}),Z.defineMIME("text/x-stex","stex"),Z.defineMIME("text/x-latex","stex")})},"+ua5":function(Ve,Ae,N){},"/cxE":function(Ve,Ae,N){"use strict";N.d(Ae,"f",function(){return O}),N.d(Ae,"g",function(){return Q}),N.d(Ae,"h",function(){return M}),N.d(Ae,"e",function(){return R}),N.d(Ae,"b",function(){return b}),N.d(Ae,"c",function(){return t}),N.d(Ae,"d",function(){return E}),N.d(Ae,"a",function(){return a});class Z{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(A){setTimeout(()=>{throw A.stack?new Error(A.message+`
|
|
|
|
`+A.stack):A},0)}}emit(A){this.listeners.forEach(h=>{h(A)})}onUnexpectedError(A){this.unexpectedErrorHandler(A),this.emit(A)}onUnexpectedExternalError(A){this.unexpectedErrorHandler(A)}}const H=new Z;function O(A){R(A)||H.onUnexpectedError(A);return}function Q(A){R(A)||H.onUnexpectedExternalError(A);return}function M(A){if(A instanceof Error){let{name:h,message:s}=A;const o=A.stacktrace||A.stack;return{$isError:!0,name:h,message:s,stack:o}}return A}const _="Canceled";function R(A){return A instanceof Error&&A.name===_&&A.message===_}function b(){const A=new Error(_);return A.name=A.message,A}function t(A){return A?new Error(`Illegal argument: ${A}`):new Error("Illegal argument")}function E(A){return A?new Error(`Illegal state: ${A}`):new Error("Illegal state")}class a extends Error{constructor(A){super("NotSupported");A&&(this.message=A)}}},"06Qe":function(Ve,Ae,N){var Z=N("ItGF"),H="urn:schemas-microsoft-com:vml",O=typeof window=="undefined"?null:window,Q=!1,M=O&&O.document;function _(t){return R(t)}var R;if(M&&!Z.canvasSupported)try{!M.namespaces.zrvml&&M.namespaces.add("zrvml",H),R=function(t){return M.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){R=function(E){return M.createElement("<"+E+' xmlns="'+H+'" class="zrvml">')}}function b(){if(Q||!M)return;Q=!0;var t=M.styleSheets;t.length<31?M.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}Ae.doc=M,Ae.createNode=_,Ae.initVML=b},"0s+r":function(Ve,Ae,N){var Z=N("bYtY"),H=N("QBsz"),O=N("y23F"),Q=N("H6uX"),M=N("YH21"),_=N("C0SR"),R="silent";function b(f,u,c){return{type:f,event:c,target:u.target,topTarget:u.topTarget,cancelBubble:!1,offsetX:c.zrX,offsetY:c.zrY,gestureEvent:c.gestureEvent,pinchX:c.pinchX,pinchY:c.pinchY,pinchScale:c.pinchScale,wheelDelta:c.zrDelta,zrByTouch:c.zrByTouch,which:c.which,stop:t}}function t(){M.stop(this.event)}function E(){}E.prototype.dispose=function(){};var a=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],A=function(f,u,c,i){Q.call(this),this.storage=f,this.painter=u,this.painterRoot=i,c=c||new E,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,O.call(this),this.setHandlerProxy(c)};A.prototype={constructor:A,setHandlerProxy:function(f){this.proxy&&this.proxy.dispose(),f&&(Z.each(a,function(u){f.on&&f.on(u,this[u],this)},this),f.handler=this),this.proxy=f},mousemove:function(f){var u=f.zrX,c=f.zrY,i=s(this,u,c),l=this._hovered,v=l.target;v&&!v.__zr&&(l=this.findHover(l.x,l.y),v=l.target);var B=this._hovered=i?{x:u,y:c}:this.findHover(u,c),C=B.target,L=this.proxy;L.setCursor&&L.setCursor(C?C.cursor:"default"),v&&C!==v&&this.dispatchToElement(l,"mouseout",f),this.dispatchToElement(B,"mousemove",f),C&&C!==v&&this.dispatchToElement(B,"mouseover",f)},mouseout:function(f){var u=f.zrEventControl,c=f.zrIsToLocalDOM;u!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",f),u!=="no_globalout"&&(!c&&this.trigger("globalout",{type:"globalout",event:f}))},resize:function(f){this._hovered={}},dispatch:function(f,u){var c=this[f];c&&c.call(this,u)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(f){var u=this.proxy;u.setCursor&&u.setCursor(f)},dispatchToElement:function(f,u,c){f=f||{};var i=f.target;if(i&&i.silent)return;for(var l="on"+u,v=b(u,f,c);i&&!(i[l]&&(v.cancelBubble=i[l].call(i,v)),i.trigger(u,v),i=i.parent,v.cancelBubble););v.cancelBubble||(this.trigger(u,v),this.painter&&this.painter.eachOtherLayer(function(B){typeof B[l]=="function"&&B[l].call(B,v),B.trigger&&B.trigger(u,v)}))},findHover:function(f,u,c){for(var i=this.storage.getDisplayList(),l={x:f,y:u},v=i.length-1;v>=0;v--){var B;if(i[v]!==c&&!i[v].ignore&&(B=h(i[v],f,u))&&(!l.topTarget&&(l.topTarget=i[v]),B!==R)){l.target=i[v];break}}return l},processGesture:function(f,u){this._gestureMgr||(this._gestureMgr=new _);var c=this._gestureMgr;u==="start"&&c.clear();var i=c.recognize(f,this.findHover(f.zrX,f.zrY,null).target,this.proxy.dom);if(u==="end"&&c.clear(),i){var l=i.type;f.gestureEvent=l,this.dispatchToElement({target:i.target},l,i.event)}}},Z.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(f){A.prototype[f]=function(u){var c=u.zrX,i=u.zrY,l=s(this,c,i),v,B;if((f!=="mouseup"||!l)&&(v=this.findHover(c,i),B=v.target),f==="mousedown")this._downEl=B,this._downPoint=[u.zrX,u.zrY],this._upEl=B;else if(f==="mouseup")this._upEl=B;else if(f==="click"){if(this._downEl!==this._upEl||!this._downPoint||H.dist(this._downPoint,[u.zrX,u.zrY])>4)return;this._downPoint=null}this.dispatchToElement(v,f,u)}});function h(f,u,c){if(f[f.rectHover?"rectContain":"contain"](u,c)){for(var i=f,l;i;){if(i.clipPath&&!i.clipPath.contain(u,c))return!1;i.silent&&(l=!0),i=i.parent}return l?R:!0}return!1}function s(f,u,c){var i=f.painter;return u<0||u>i.getWidth()||c<0||c>i.getHeight()}Z.mixin(A,Q),Z.mixin(A,O);var o=A;Ve.exports=o},"19Vz":function(Ve,Ae,N){(function(Z){Z(N("VrN/"))})(function(Z){Z.defineOption("placeholder","",function(b,t,E){var a=E&&E!=Z.Init;if(t&&!a)b.on("blur",M),b.on("change",_),b.on("swapDoc",_),Z.on(b.getInputField(),"compositionupdate",b.state.placeholderCompose=function(){Q(b)}),_(b);else if(!t&&a){b.off("blur",M),b.off("change",_),b.off("swapDoc",_),Z.off(b.getInputField(),"compositionupdate",b.state.placeholderCompose),H(b);var A=b.getWrapperElement();A.className=A.className.replace(" CodeMirror-empty","")}t&&!b.hasFocus()&&M(b)});function H(b){b.state.placeholder&&(b.state.placeholder.parentNode.removeChild(b.state.placeholder),b.state.placeholder=null)}function O(b){H(b);var t=b.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=b.getOption("direction"),t.className="CodeMirror-placeholder CodeMirror-line-like";var E=b.getOption("placeholder");typeof E=="string"&&(E=document.createTextNode(E)),t.appendChild(E),b.display.lineSpace.insertBefore(t,b.display.lineSpace.firstChild)}function Q(b){setTimeout(function(){var t=!1,E=b.getInputField();E.nodeName=="TEXTAREA"?t=!E.value:b.lineCount()==1&&(t=!/[^\u200b]/.test(E.querySelector(".CodeMirror-line").textContent)),t?O(b):H(b)},20)}function M(b){R(b)&&O(b)}function _(b){var t=b.getWrapperElement(),E=R(b);t.className=t.className.replace(" CodeMirror-empty","")+(E?" CodeMirror-empty":""),E?O(b):H(b)}function R(b){return b.lineCount()===1&&b.getLine(0)===""}})},"1Jh7":function(Ve,Ae,N){var Z=N("y+Vt"),H=N("T6xi"),O=Z.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(Q,M){H.buildPath(Q,M,!1)}});Ve.exports=O},"1MYJ":function(Ve,Ae,N){var Z=N("y+Vt"),H=Z.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var O=this.__dirtyPath,Q=this.shape.paths,M=0;M<Q.length;M++)O=O||Q[M].__dirtyPath;this.__dirtyPath=O,this.__dirty=this.__dirty||O},beforeBrush:function(){this._updatePathDirty();for(var O=this.shape.paths||[],Q=this.getGlobalScale(),M=0;M<O.length;M++)O[M].path||O[M].createPathProxy(),O[M].path.setScale(Q[0],Q[1],O[M].segmentIgnoreThreshold)},buildPath:function(O,Q){for(var M=Q.paths||[],_=0;_<M.length;_++)M[_].buildPath(O,M[_].shape,!0)},afterBrush:function(){for(var O=this.shape.paths||[],Q=0;Q<O.length;Q++)O[Q].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Z.prototype.getBoundingRect.call(this)}});Ve.exports=H},"1RvN":function(Ve,Ae){var N=function(){this.head=null,this.tail=null,this._len=0},Z=N.prototype;Z.insert=function(_){var R=new H(_);return this.insertEntry(R),R},Z.insertEntry=function(_){this.head?(this.tail.next=_,_.prev=this.tail,_.next=null,this.tail=_):this.head=this.tail=_,this._len++},Z.remove=function(_){var R=_.prev,b=_.next;R?R.next=b:this.head=b,b?b.prev=R:this.tail=R,_.next=_.prev=null,this._len--},Z.len=function(){return this._len},Z.clear=function(){this.head=this.tail=null,this._len=0};var H=function(_){this.value=_,this.next,this.prev},O=function(_){this._list=new N,this._map={},this._maxSize=_||10,this._lastRemovedEntry=null},Q=O.prototype;Q.put=function(_,R){var b=this._list,t=this._map,E=null;if(t[_]==null){var a=b.len(),A=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var h=b.head;b.remove(h),delete t[h.key],E=h.value,this._lastRemovedEntry=h}A?A.value=R:A=new H(R),A.key=_,b.insertEntry(A),t[_]=A}return E},Q.get=function(_){var R=this._map[_],b=this._list;if(R!=null)return R!==b.tail&&(b.remove(R),b.insertEntry(R)),R.value},Q.clear=function(){this._list.clear(),this._map={}};var M=O;Ve.exports=M},"1bdT":function(Ve,Ae,N){var Z=N("3gBT"),H=N("H6uX"),O=N("DN4a"),Q=N("vWvF"),M=N("bYtY"),_=function(b){O.call(this,b),H.call(this,b),Q.call(this,b),this.id=b.id||Z()};_.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(b,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":b=0;break}var E=this.transform;E||(E=this.transform=[1,0,0,1,0,0]),E[4]+=b,E[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(b,t){},attrKV:function(b,t){if(b==="position"||b==="scale"||b==="origin"){if(t){var E=this[b];E||(E=this[b]=[]),E[0]=t[0],E[1]=t[1]}}else this[b]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(b,t){if(typeof b=="string")this.attrKV(b,t);else if(M.isObject(b))for(var E in b)b.hasOwnProperty(E)&&this.attrKV(E,b[E]);return this.dirty(!1),this},setClipPath:function(b){var t=this.__zr;t&&b.addSelfToZr(t),this.clipPath&&this.clipPath!==b&&this.removeClipPath(),this.clipPath=b,b.__zr=t,b.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var b=this.clipPath;b&&(b.__zr&&b.removeSelfFromZr(b.__zr),b.__zr=null,b.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(b){this.__zr=b;var t=this.animators;if(t)for(var E=0;E<t.length;E++)b.animation.addAnimator(t[E]);this.clipPath&&this.clipPath.addSelfToZr(b)},removeSelfFromZr:function(b){this.__zr=null;var t=this.animators;if(t)for(var E=0;E<t.length;E++)b.animation.removeAnimator(t[E]);this.clipPath&&this.clipPath.removeSelfFromZr(b)}},M.mixin(_,Q),M.mixin(_,O),M.mixin(_,H);var R=_;Ve.exports=R},"1eCo":function(Ve,Ae,N){(function(Z){Z(N("VrN/"))})(function(Z){"use strict";var H={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},O={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Z.defineMode("xml",function(Q,M){var _=Q.indentUnit,R={},b=M.htmlMode?H:O;for(var t in b)R[t]=b[t];for(var t in M)R[t]=M[t];var E,a;function A(m,T){function y(P){return T.tokenize=P,P(m,T)}var g=m.next();if(g=="<")return m.eat("!")?m.eat("[")?m.match("CDATA[")?y(o("atom","]]>")):null:m.match("--")?y(o("comment","-->")):m.match("DOCTYPE",!0,!0)?(m.eatWhile(/[\w\._\-]/),y(f(1))):null:m.eat("?")?(m.eatWhile(/[\w\._\-]/),T.tokenize=o("meta","?>"),"meta"):(E=m.eat("/")?"closeTag":"openTag",T.tokenize=h,"tag bracket");if(g=="&"){var U;return m.eat("#")?m.eat("x")?U=m.eatWhile(/[a-fA-F\d]/)&&m.eat(";"):U=m.eatWhile(/[\d]/)&&m.eat(";"):U=m.eatWhile(/[\w\.\-:]/)&&m.eat(";"),U?"atom":"error"}else return m.eatWhile(/[^&<]/),null}A.isInText=!0;function h(m,T){var y=m.next();if(y==">"||y=="/"&&m.eat(">"))return T.tokenize=A,E=y==">"?"endTag":"selfcloseTag","tag bracket";if(y=="=")return E="equals",null;if(y=="<"){T.tokenize=A,T.state=l,T.tagName=T.tagStart=null;var g=T.tokenize(m,T);return g?g+" tag error":"tag error"}else return/[\'\"]/.test(y)?(T.tokenize=s(y),T.stringStartCol=m.column(),T.tokenize(m,T)):(m.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function s(m){var T=function(y,g){for(;!y.eol();)if(y.next()==m){g.tokenize=h;break}return"string"};return T.isInAttribute=!0,T}function o(m,T){return function(y,g){for(;!y.eol();){if(y.match(T)){g.tokenize=A;break}y.next()}return m}}function f(m){return function(T,y){for(var g;(g=T.next())!=null;){if(g=="<")return y.tokenize=f(m+1),y.tokenize(T,y);if(g==">")if(m==1){y.tokenize=A;break}else return y.tokenize=f(m-1),y.tokenize(T,y)}return"meta"}}function u(m,T,y){this.prev=m.context,this.tagName=T,this.indent=m.indented,this.startOfLine=y,(R.doNotIndent.hasOwnProperty(T)||m.context&&m.context.noIndent)&&(this.noIndent=!0)}function c(m){m.context&&(m.context=m.context.prev)}function i(m,T){for(var y;;){if(!m.context)return;if(y=m.context.tagName,!R.contextGrabbers.hasOwnProperty(y)||!R.contextGrabbers[y].hasOwnProperty(T))return;c(m)}}function l(m,T,y){return m=="openTag"?(y.tagStart=T.column(),v):m=="closeTag"?B:l}function v(m,T,y){return m=="word"?(y.tagName=T.current(),a="tag",w):R.allowMissingTagName&&m=="endTag"?(a="tag bracket",w(m,T,y)):(a="error",v)}function B(m,T,y){if(m=="word"){var g=T.current();return y.context&&y.context.tagName!=g&&R.implicitlyClosed.hasOwnProperty(y.context.tagName)&&c(y),y.context&&y.context.tagName==g||R.matchClosing===!1?(a="tag",C):(a="tag error",L)}else return R.allowMissingTagName&&m=="endTag"?(a="tag bracket",C(m,T,y)):(a="error",L)}function C(m,T,y){return m!="endTag"?(a="error",C):(c(y),l)}function L(m,T,y){return a="error",C(m,T,y)}function w(m,T,y){if(m=="word")return a="attribute",p;if(m=="endTag"||m=="selfcloseTag"){var g=y.tagName,U=y.tagStart;return y.tagName=y.tagStart=null,m=="selfcloseTag"||R.autoSelfClosers.hasOwnProperty(g)?i(y,g):(i(y,g),y.context=new u(y,g,U==y.indented)),l}return a="error",w}function p(m,T,y){return m=="equals"?n:(R.allowMissing||(a="error"),w(m,T,y))}function n(m,T,y){return m=="string"?d:m=="word"&&R.allowUnquoted?(a="string",w):(a="error",w(m,T,y))}function d(m,T,y){return m=="string"?d:w(m,T,y)}return{startState:function(m){var T={tokenize:A,state:l,indented:m||0,tagName:null,tagStart:null,context:null};return m!=null&&(T.baseIndent=m),T},token:function(m,T){if(!T.tagName&&m.sol()&&(T.indented=m.indentation()),m.eatSpace())return null;E=null;var y=T.tokenize(m,T);return(y||E)&&y!="comment"&&(a=null,T.state=T.state(E||y,m,T),a&&(y=a=="error"?y+" error":a)),y},indent:function(m,T,y){var g=m.context;if(m.tokenize.isInAttribute)return m.tagStart==m.indented?m.stringStartCol+1:m.indented+_;if(g&&g.noIndent)return Z.Pass;if(m.tokenize!=h&&m.tokenize!=A)return y?y.match(/^(\s*)/)[0].length:0;if(m.tagName)return R.multilineTagIndentPastTag!==!1?m.tagStart+m.tagName.length+2:m.tagStart+_*(R.multilineTagIndentFactor||1);if(R.alignCDATA&&/<!\[CDATA\[/.test(T))return 0;var U=T&&/^<(\/)?([\w_:\.-]*)/.exec(T);if(U&&U[1])for(;g;)if(g.tagName==U[2]){g=g.prev;break}else if(R.implicitlyClosed.hasOwnProperty(g.tagName))g=g.prev;else break;else if(U)for(;g;){var P=R.contextGrabbers[g.tagName];if(P&&P.hasOwnProperty(U[2]))g=g.prev;else break}for(;g&&g.prev&&!g.startOfLine;)g=g.prev;return g?g.indent+_:m.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:R.htmlMode?"html":"xml",helperType:R.htmlMode?"html":"xml",skipAttribute:function(m){m.state==n&&(m.state=w)},xmlCurrentTag:function(m){return m.tagName?{name:m.tagName,close:m.type=="closeTag"}:null},xmlCurrentContext:function(m){for(var T=[],y=m.context;y;y=y.prev)y.tagName&&T.push(y.tagName);return T.reverse()}}}),Z.defineMIME("text/xml","xml"),Z.defineMIME("application/xml","xml"),Z.mimeModes.hasOwnProperty("text/html")||Z.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1eJ8":function(Ve,Ae,N){Ve.exports={md:"md___1fRow"}},"1j5w":function(Ve,Ae,N){"use strict";N.d(Ae,"d",function(){return Ye}),N.d(Ae,"b",function(){return Pe}),N.d(Ae,"c",function(){return tt}),N.d(Ae,"a",function(){return Bt});var Z=N("VTBJ"),H=N("1OyB"),O=N("vuIU"),Q=N("JX7q"),M=N("Ji7U"),_=N("LK+K"),R=N("q1tI"),b=N("I8Z2"),t=N("BGR+"),E=N("wx14"),a=N("rePB"),A=N("4IlW"),h=N("2GS6"),s=N("Gytx"),o=N.n(s),f=N("TSYQ"),u=N.n(f),c=N("U8pU"),i=N("ODXe"),l=/iPhone/i,v=/iPod/i,B=/iPad/i,C=/\bAndroid(?:.+)Mobile\b/i,L=/Android/i,w=/\bAndroid(?:.+)SD4930UR\b/i,p=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,n=/Windows Phone/i,d=/\bWindows(?:.+)ARM\b/i,m=/BlackBerry/i,T=/BB10/i,y=/Opera Mini/i,g=/\b(CriOS|Chrome)(?:.+)Mobile/i,U=/Mobile(?:.+)Firefox\b/i;function P(Ct,nt){return Ct.test(nt)}function I(Ct){var nt=Ct||(typeof navigator!="undefined"?navigator.userAgent:""),qe=nt.split("[FBAN");if(typeof qe[1]!="undefined"){var $e=qe,Re=Object(i.a)($e,1);nt=Re[0]}if(qe=nt.split("Twitter"),typeof qe[1]!="undefined"){var Ne=qe,ct=Object(i.a)(Ne,1);nt=ct[0]}var rt={apple:{phone:P(l,nt)&&!P(n,nt),ipod:P(v,nt),tablet:!P(l,nt)&&P(B,nt)&&!P(n,nt),device:(P(l,nt)||P(v,nt)||P(B,nt))&&!P(n,nt)},amazon:{phone:P(w,nt),tablet:!P(w,nt)&&P(p,nt),device:P(w,nt)||P(p,nt)},android:{phone:!P(n,nt)&&P(w,nt)||!P(n,nt)&&P(C,nt),tablet:!P(n,nt)&&!P(w,nt)&&!P(C,nt)&&(P(p,nt)||P(L,nt)),device:!P(n,nt)&&(P(w,nt)||P(p,nt)||P(C,nt)||P(L,nt))||P(/\bokhttp\b/i,nt)},windows:{phone:P(n,nt),tablet:P(d,nt),device:P(n,nt)||P(d,nt)},other:{blackberry:P(m,nt),blackberry10:P(T,nt),opera:P(y,nt),firefox:P(U,nt),chrome:P(g,nt),device:P(m,nt)||P(T,nt)||P(y,nt)||P(U,nt)||P(g,nt)},any:null,phone:null,tablet:null};return rt.any=rt.apple.device||rt.android.device||rt.windows.device||rt.other.device,rt.phone=rt.apple.phone||rt.android.phone||rt.windows.phone,rt.tablet=rt.apple.tablet||rt.android.tablet||rt.windows.tablet,rt}var G=Object(Z.a)(Object(Z.a)({},I()),{},{isMobile:I}),K=G;function D(){}function J(Ct,nt,qe){var $e=nt||"";return Ct.key||"".concat($e,"item_").concat(qe)}function X(Ct){return"".concat(Ct,"-menu-")}function ne(Ct,nt){var qe=-1;R.Children.forEach(Ct,function($e){qe+=1,$e&&$e.type&&$e.type.isMenuItemGroup?R.Children.forEach($e.props.children,function(Re){qe+=1,nt(Re,qe)}):nt($e,qe)})}function ue(Ct,nt,qe){if(!Ct||qe.find)return;R.Children.forEach(Ct,function($e){if($e){var Re=$e.type;if(!Re||!(Re.isSubMenu||Re.isMenuItem||Re.isMenuItemGroup))return;nt.indexOf($e.key)!==-1?qe.find=!0:$e.props.children&&ue($e.props.children,nt,qe)}})}var Oe=["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"],_e=function(nt){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$e=nt&&typeof nt.getBoundingClientRect=="function"&&nt.getBoundingClientRect().width;if($e){if(qe){var Re=getComputedStyle(nt),Ne=Re.marginLeft,ct=Re.marginRight;$e+=+Ne.replace("px","")+ +ct.replace("px","")}$e=+$e.toFixed(6)}return $e||0},De=function(nt,qe,$e){nt&&Object(c.a)(nt.style)==="object"&&(nt.style[qe]=$e)},Ue=function(){return K.any},Ke=N("KQm4"),Le=N("Ff2n"),ae=N("i8i4"),V=N("bdgK"),$=N("uciX"),q=N("8XRh"),se={adjustX:1,adjustY:1},te={topLeft:{points:["bl","tl"],overflow:se,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:se,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:se,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:se,offset:[4,0]}},oe={topLeft:{points:["bl","tl"],overflow:se,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:se,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:se,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:se,offset:[4,0]}},re=te,ie=0,ee={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},de=function(nt,qe,$e){var Re=X(qe),Ne=nt.getState();nt.setState({defaultActiveFirst:Object(Z.a)(Object(Z.a)({},Ne.defaultActiveFirst),{},Object(a.a)({},Re,$e))})},Ce=function(Ct){Object(M.a)(qe,Ct);var nt=Object(_.a)(qe);function qe($e){var Re;Object(H.a)(this,qe),Re=nt.call(this,$e),Re.onDestroy=function(at){Re.props.onDestroy(at)},Re.onKeyDown=function(at){var vt=at.keyCode,St=Re.menuInstance,wt=Re.props,Dt=wt.isOpen,Ar=wt.store;if(vt===A.a.ENTER)return Re.onTitleClick(at),de(Ar,Re.props.eventKey,!0),!0;if(vt===A.a.RIGHT)return Dt?St.onKeyDown(at):(Re.triggerOpenChange(!0),de(Ar,Re.props.eventKey,!0)),!0;if(vt===A.a.LEFT){var xr;if(Dt)xr=St.onKeyDown(at);else return;return xr||(Re.triggerOpenChange(!1),xr=!0),xr}return Dt&&(vt===A.a.UP||vt===A.a.DOWN)?St.onKeyDown(at):void 0},Re.onOpenChange=function(at){Re.props.onOpenChange(at)},Re.onPopupVisibleChange=function(at){Re.triggerOpenChange(at,at?"mouseenter":"mouseleave")},Re.onMouseEnter=function(at){var vt=Re.props,St=vt.eventKey,wt=vt.onMouseEnter,Dt=vt.store;de(Dt,Re.props.eventKey,!1),wt({key:St,domEvent:at})},Re.onMouseLeave=function(at){var vt=Re.props,St=vt.parentMenu,wt=vt.eventKey,Dt=vt.onMouseLeave;St.subMenuInstance=Object(Q.a)(Re),Dt({key:wt,domEvent:at})},Re.onTitleMouseEnter=function(at){var vt=Re.props,St=vt.eventKey,wt=vt.onItemHover,Dt=vt.onTitleMouseEnter;wt({key:St,hover:!0}),Dt({key:St,domEvent:at})},Re.onTitleMouseLeave=function(at){var vt=Re.props,St=vt.parentMenu,wt=vt.eventKey,Dt=vt.onItemHover,Ar=vt.onTitleMouseLeave;St.subMenuInstance=Object(Q.a)(Re),Dt({key:wt,hover:!1}),Ar({key:wt,domEvent:at})},Re.onTitleClick=function(at){var vt=Object(Q.a)(Re),St=vt.props;if(St.onTitleClick({key:St.eventKey,domEvent:at}),St.triggerSubMenuAction==="hover")return;Re.triggerOpenChange(!St.isOpen,"click"),de(St.store,Re.props.eventKey,!1)},Re.onSubMenuClick=function(at){typeof Re.props.onClick=="function"&&Re.props.onClick(Re.addKeyPath(at))},Re.onSelect=function(at){Re.props.onSelect(at)},Re.onDeselect=function(at){Re.props.onDeselect(at)},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.saveMenuInstance=function(at){Re.menuInstance=at},Re.addKeyPath=function(at){return Object(Z.a)(Object(Z.a)({},at),{},{keyPath:(at.keyPath||[]).concat(Re.props.eventKey)})},Re.triggerOpenChange=function(at,vt){var St=Re.props.eventKey,wt=function(){Re.onOpenChange({key:St,item:Object(Q.a)(Re),trigger:vt,open:at})};vt==="mouseenter"?Re.mouseenterTimeout=setTimeout(function(){wt()},0):wt()},Re.isChildrenSelected=function(){var at={find:!1};return ue(Re.props.children,Re.props.selectedKeys,at),at.find},Re.isOpen=function(){return Re.props.openKeys.indexOf(Re.props.eventKey)!==-1},Re.adjustWidth=function(){if(!Re.subMenuTitle||!Re.menuInstance)return;var at=ae.findDOMNode(Re.menuInstance);if(at.offsetWidth>=Re.subMenuTitle.offsetWidth)return;at.style.minWidth="".concat(Re.subMenuTitle.offsetWidth,"px")},Re.saveSubMenuTitle=function(at){Re.subMenuTitle=at},Re.getBaseProps=function(){var at=Object(Q.a)(Re),vt=at.props;return{mode:vt.mode==="horizontal"?"vertical":vt.mode,visible:Re.props.isOpen,level:vt.level+1,inlineIndent:vt.inlineIndent,focusable:!1,onClick:Re.onSubMenuClick,onSelect:Re.onSelect,onDeselect:Re.onDeselect,onDestroy:Re.onDestroy,selectedKeys:vt.selectedKeys,eventKey:"".concat(vt.eventKey,"-menu-"),openKeys:vt.openKeys,motion:vt.motion,onOpenChange:Re.onOpenChange,subMenuOpenDelay:vt.subMenuOpenDelay,parentMenu:Object(Q.a)(Re),subMenuCloseDelay:vt.subMenuCloseDelay,forceSubMenuRender:vt.forceSubMenuRender,triggerSubMenuAction:vt.triggerSubMenuAction,builtinPlacements:vt.builtinPlacements,defaultActiveFirst:vt.store.getState().defaultActiveFirst[X(vt.eventKey)],multiple:vt.multiple,prefixCls:vt.rootPrefixCls,id:Re.internalMenuId,manualRef:Re.saveMenuInstance,itemIcon:vt.itemIcon,expandIcon:vt.expandIcon,direction:vt.direction}},Re.getMotion=function(at,vt){var St=Object(Q.a)(Re),wt=St.haveRendered,Dt=Re.props,Ar=Dt.motion,xr=Dt.rootPrefixCls,_r=Object(Z.a)(Object(Z.a)({},Ar),{},{leavedClassName:"".concat(xr,"-hidden"),removeOnLeave:!1,motionAppear:wt||!vt||at!=="inline"});return _r};var Ne=$e.store,ct=$e.eventKey,rt=Ne.getState(),gt=rt.defaultActiveFirst;Re.isRootMenu=!1;var pt=!1;return gt&&(pt=gt[ct]),de(Ne,ct,pt),Re}return Object(O.a)(qe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Re=this,Ne=this.props,ct=Ne.mode,rt=Ne.parentMenu,gt=Ne.manualRef;if(gt&>(this),ct!=="horizontal"||!rt.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Re.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Re=this.props,Ne=Re.onDestroy,ct=Re.eventKey;Ne&&Ne(ct),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Re){var Ne=this,ct=this.getBaseProps(),rt=this.getMotion(ct.mode,ct.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ct.visible||ct.forceSubMenuRender,!this.haveOpened)return R.createElement("div",null);var gt=ct.direction;return R.createElement(q.default,Object.assign({visible:ct.visible},rt),function(pt){var at=pt.className,vt=pt.style,St=u()("".concat(ct.prefixCls,"-sub"),at,Object(a.a)({},"".concat(ct.prefixCls,"-rtl"),gt==="rtl"));return R.createElement(fe,Object.assign({},ct,{id:Ne.internalMenuId,className:St,style:vt}),Re)})}},{key:"render",value:function(){var Re,Ne=Object(Z.a)({},this.props),ct=Ne.isOpen,rt=this.getPrefixCls(),gt=Ne.mode==="inline",pt=u()(rt,"".concat(rt,"-").concat(Ne.mode),(Re={},Object(a.a)(Re,Ne.className,!!Ne.className),Object(a.a)(Re,this.getOpenClassName(),ct),Object(a.a)(Re,this.getActiveClassName(),Ne.active||ct&&!gt),Object(a.a)(Re,this.getDisabledClassName(),Ne.disabled),Object(a.a)(Re,this.getSelectedClassName(),this.isChildrenSelected()),Re));this.internalMenuId||(Ne.eventKey?this.internalMenuId="".concat(Ne.eventKey,"$Menu"):(ie+=1,this.internalMenuId="$__$".concat(ie,"$Menu")));var at={},vt={},St={};Ne.disabled||(at={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},vt={onClick:this.onTitleClick},St={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var wt={},Dt=Ne.direction;gt&&(Dt==="rtl"?wt.paddingRight=Ne.inlineIndent*Ne.level:wt.paddingLeft=Ne.inlineIndent*Ne.level);var Ar={};this.props.isOpen&&(Ar={"aria-owns":this.internalMenuId});var xr=null;Ne.mode!=="horizontal"&&(xr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(xr=R.createElement(this.props.expandIcon,Object(Z.a)({},this.props))));var _r=R.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:wt,className:"".concat(rt,"-title"),role:"button"},St,vt,{"aria-expanded":ct},Ar,{"aria-haspopup":"true",title:typeof Ne.title=="string"?Ne.title:void 0}),Ne.title,xr||R.createElement("i",{className:"".concat(rt,"-arrow")})),Ft=this.renderChildren(Ne.children),er=Ne.parentMenu.isRootMenu?Ne.parentMenu.props.getPopupContainer:function(Je){return Je.parentNode},ir=ee[Ne.mode],Kt=Ne.popupOffset?{offset:Ne.popupOffset}:{},$t=Ne.mode==="inline"?"":Ne.popupClassName;$t+=Dt==="rtl"?" ".concat(rt,"-rtl"):"";var Xt=Ne.disabled,Xr=Ne.triggerSubMenuAction,Br=Ne.subMenuOpenDelay,be=Ne.forceSubMenuRender,Be=Ne.subMenuCloseDelay,ke=Ne.builtinPlacements;Oe.forEach(function(Je){return delete Ne[Je]}),delete Ne.onClick;var Ze=Dt==="rtl"?Object.assign({},oe,ke):Object.assign({},te,ke);return delete Ne.direction,R.createElement("li",Object.assign({},Ne,at,{className:pt,role:"menuitem"}),gt&&_r,gt&&Ft,!gt&&R.createElement($.a,{prefixCls:rt,popupClassName:u()("".concat(rt,"-popup"),$t),getPopupContainer:er,builtinPlacements:Ze,popupPlacement:ir,popupVisible:ct,popupAlign:Kt,popup:Ft,action:Xt?[]:[Xr],mouseEnterDelay:Br,mouseLeaveDelay:Be,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:be},_r))}}]),qe}(R.Component);Ce.defaultProps={onMouseEnter:D,onMouseLeave:D,onTitleMouseEnter:D,onTitleMouseLeave:D,onTitleClick:D,manualRef:D,mode:"vertical",title:""};var Me=Object(b.b)(function(Ct,nt){var qe=Ct.openKeys,$e=Ct.activeKey,Re=Ct.selectedKeys,Ne=nt.eventKey,ct=nt.subMenuKey;return{isOpen:qe.indexOf(Ne)>-1,active:$e[ct]===Ne,selectedKeys:Re}})(Ce);Me.isSubMenu=!0;var Ye=Me,et="menuitem-overflowed",st=.5,ut=function(Ct){Object(M.a)(qe,Ct);var nt=Object(_.a)(qe);function qe(){var $e;return Object(H.a)(this,qe),$e=nt.apply(this,arguments),$e.resizeObserver=null,$e.mutationObserver=null,$e.originalTotalWidth=0,$e.overflowedItems=[],$e.menuItemSizes=[],$e.cancelFrameId=null,$e.state={lastVisibleIndex:void 0},$e.getMenuItemNodes=function(){var Re=$e.props.prefixCls,Ne=ae.findDOMNode(Object(Q.a)($e));return Ne?[].slice.call(Ne.children).filter(function(ct){return ct.className.split(" ").indexOf("".concat(Re,"-overflowed-submenu"))<0}):[]},$e.getOverflowedSubMenuItem=function(Re,Ne,ct){var rt=$e.props,gt=rt.overflowedIndicator,pt=rt.level,at=rt.mode,vt=rt.prefixCls,St=rt.theme;if(pt!==1||at!=="horizontal")return null;var wt=$e.props.children[0],Dt=wt.props,Ar=Dt.children,xr=Dt.title,_r=Dt.style,Ft=Object(Le.a)(Dt,["children","title","style"]),er=Object(Z.a)({},_r),ir="".concat(Re,"-overflowed-indicator"),Kt="".concat(Re,"-overflowed-indicator");Ne.length===0&&ct!==!0?er=Object(Z.a)(Object(Z.a)({},er),{},{display:"none"}):ct&&(er=Object(Z.a)(Object(Z.a)({},er),{},{visibility:"hidden",position:"absolute"}),ir="".concat(ir,"-placeholder"),Kt="".concat(Kt,"-placeholder"));var $t=St?"".concat(vt,"-").concat(St):"",Xt={};return Oe.forEach(function(Xr){Ft[Xr]!==void 0&&(Xt[Xr]=Ft[Xr])}),R.createElement(Ye,Object.assign({title:gt,className:"".concat(vt,"-overflowed-submenu"),popupClassName:$t},Xt,{key:ir,eventKey:Kt,disabled:!1,style:er}),Ne)},$e.setChildrenWidthAndResize=function(){if($e.props.mode!=="horizontal")return;var Re=ae.findDOMNode(Object(Q.a)($e));if(!Re)return;var Ne=Re.children;if(!Ne||Ne.length===0)return;var ct=Re.children[Ne.length-1];De(ct,"display","inline-block");var rt=$e.getMenuItemNodes(),gt=rt.filter(function(pt){return pt.className.split(" ").indexOf(et)>=0});gt.forEach(function(pt){De(pt,"display","inline-block")}),$e.menuItemSizes=rt.map(function(pt){return _e(pt,!0)}),gt.forEach(function(pt){De(pt,"display","none")}),$e.overflowedIndicatorWidth=_e(Re.children[Re.children.length-1],!0),$e.originalTotalWidth=$e.menuItemSizes.reduce(function(pt,at){return pt+at},0),$e.handleResize(),De(ct,"display","none")},$e.handleResize=function(){if($e.props.mode!=="horizontal")return;var Re=ae.findDOMNode(Object(Q.a)($e));if(!Re)return;var Ne=_e(Re);$e.overflowedItems=[];var ct=0,rt;$e.originalTotalWidth>Ne+st&&(rt=-1,$e.menuItemSizes.forEach(function(gt){ct+=gt,ct+$e.overflowedIndicatorWidth<=Ne&&(rt+=1)})),$e.setState({lastVisibleIndex:rt})},$e}return Object(O.a)(qe,[{key:"componentDidMount",value:function(){var Re=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ne=ae.findDOMNode(this);if(!Ne)return;this.resizeObserver=new V.default(function(ct){ct.forEach(function(){var rt=Re.cancelFrameId;cancelAnimationFrame(rt),Re.cancelFrameId=requestAnimationFrame(Re.setChildrenWidthAndResize)})}),[].slice.call(Ne.children).concat(Ne).forEach(function(ct){Re.resizeObserver.observe(ct)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Re.resizeObserver.disconnect(),[].slice.call(Ne.children).concat(Ne).forEach(function(ct){Re.resizeObserver.observe(ct)}),Re.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ne,{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 Ne=this,ct=this.state.lastVisibleIndex;return(Re||[]).reduce(function(rt,gt,pt){var at=gt;if(Ne.props.mode==="horizontal"){var vt=Ne.getOverflowedSubMenuItem(gt.props.eventKey,[]);ct!==void 0&&Ne.props.className.indexOf("".concat(Ne.props.prefixCls,"-root"))!==-1&&(pt>ct&&(at=R.cloneElement(gt,{style:{display:"none"},eventKey:"".concat(gt.props.eventKey,"-hidden"),className:"".concat(et)})),pt===ct+1&&(Ne.overflowedItems=Re.slice(ct+1).map(function(wt){return R.cloneElement(wt,{key:wt.props.eventKey,mode:"vertical-left"})}),vt=Ne.getOverflowedSubMenuItem(gt.props.eventKey,Ne.overflowedItems)));var St=[].concat(Object(Ke.a)(rt),[vt,at]);return pt===Re.length-1&&St.push(Ne.getOverflowedSubMenuItem(gt.props.eventKey,[],!0)),St}return[].concat(Object(Ke.a)(rt),[at])},[])}},{key:"render",value:function(){var Re=this.props,Ne=Re.visible,ct=Re.prefixCls,rt=Re.overflowedIndicator,gt=Re.mode,pt=Re.level,at=Re.tag,vt=Re.children,St=Re.theme,wt=Object(Le.a)(Re,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Dt=at;return R.createElement(Dt,Object.assign({},wt),this.renderChildren(vt))}}]),qe}(R.Component);ut.defaultProps={tag:"div",className:""};var yt=ut;function xt(Ct){return Ct.length?Ct.every(function(nt){return!!nt.props.disabled}):!0}function je(Ct,nt,qe){var $e=Ct.getState();Ct.setState({activeKey:Object(Z.a)(Object(Z.a)({},$e.activeKey),{},Object(a.a)({},nt,qe))})}function He(Ct){return Ct.eventKey||"0-menu-"}function ot(Ct,nt){var qe=nt,$e=Ct.children,Re=Ct.eventKey;if(qe){var Ne;if(ne($e,function(ct,rt){ct&&ct.props&&!ct.props.disabled&&qe===J(ct,Re,rt)&&(Ne=!0)}),Ne)return qe}return qe=null,Ct.defaultActiveFirst&&ne($e,function(ct,rt){!qe&&ct&&!ct.props.disabled&&(qe=J(ct,Re,rt))}),qe}function ht(Ct){if(Ct){var nt=this.instanceArray.indexOf(Ct);nt!==-1?this.instanceArray[nt]=Ct:this.instanceArray.push(Ct)}}var we=function(Ct){Object(M.a)(qe,Ct);var nt=Object(_.a)(qe);function qe($e){var Re;return Object(H.a)(this,qe),Re=nt.call(this,$e),Re.onKeyDown=function(Ne,ct){var rt=Ne.keyCode,gt;if(Re.getFlatInstanceArray().forEach(function(at){at&&at.props.active&&at.onKeyDown&&(gt=at.onKeyDown(Ne))}),gt)return 1;var pt=null;return(rt===A.a.UP||rt===A.a.DOWN)&&(pt=Re.step(rt===A.a.UP?-1:1)),pt?(Ne.preventDefault(),je(Re.props.store,He(Re.props),pt.props.eventKey),typeof ct=="function"&&ct(pt),1):void 0},Re.onItemHover=function(Ne){var ct=Ne.key,rt=Ne.hover;je(Re.props.store,He(Re.props),rt?ct:null)},Re.onDeselect=function(Ne){Re.props.onDeselect(Ne)},Re.onSelect=function(Ne){Re.props.onSelect(Ne)},Re.onClick=function(Ne){Re.props.onClick(Ne)},Re.onOpenChange=function(Ne){Re.props.onOpenChange(Ne)},Re.onDestroy=function(Ne){Re.props.onDestroy(Ne)},Re.getFlatInstanceArray=function(){return Re.instanceArray},Re.step=function(Ne){var ct=Re.getFlatInstanceArray(),rt=Re.props.store.getState().activeKey[He(Re.props)],gt=ct.length;if(!gt)return null;Ne<0&&(ct=ct.concat().reverse());var pt=-1;if(ct.every(function(wt,Dt){return wt&&wt.props.eventKey===rt?(pt=Dt,!1):!0}),!Re.props.defaultActiveFirst&&pt!==-1&&xt(ct.slice(pt,gt-1)))return;var at=(pt+1)%gt,vt=at;do{var St=ct[vt];if(!St||St.props.disabled)vt=(vt+1)%gt;else return St}while(vt!==at);return null},Re.renderCommonMenuItem=function(Ne,ct,rt){var gt=Re.props.store.getState(),pt=Object(Q.a)(Re),at=pt.props,vt=J(Ne,at.eventKey,ct),St=Ne.props;if(!St||typeof Ne.type=="string")return Ne;var wt=vt===gt.activeKey,Dt=Object(Z.a)(Object(Z.a)({mode:St.mode||at.mode,level:at.level,inlineIndent:at.inlineIndent,renderMenuItem:Re.renderMenuItem,rootPrefixCls:at.prefixCls,index:ct,parentMenu:at.parentMenu,manualRef:St.disabled?void 0:Object(h.a)(Ne.ref,ht.bind(Object(Q.a)(Re))),eventKey:vt,active:!St.disabled&&wt,multiple:at.multiple,onClick:function(xr){(St.onClick||D)(xr),Re.onClick(xr)},onItemHover:Re.onItemHover,motion:at.motion,subMenuOpenDelay:at.subMenuOpenDelay,subMenuCloseDelay:at.subMenuCloseDelay,forceSubMenuRender:at.forceSubMenuRender,onOpenChange:Re.onOpenChange,onDeselect:Re.onDeselect,onSelect:Re.onSelect,builtinPlacements:at.builtinPlacements,itemIcon:St.itemIcon||Re.props.itemIcon,expandIcon:St.expandIcon||Re.props.expandIcon},rt),{},{direction:at.direction});return(at.mode==="inline"||Ue())&&(Dt.triggerSubMenuAction="click"),R.cloneElement(Ne,Dt)},Re.renderMenuItem=function(Ne,ct,rt){if(!Ne)return null;var gt=Re.props.store.getState(),pt={openKeys:gt.openKeys,selectedKeys:gt.selectedKeys,triggerSubMenuAction:Re.props.triggerSubMenuAction,subMenuKey:rt};return Re.renderCommonMenuItem(Ne,ct,pt)},$e.store.setState({activeKey:Object(Z.a)(Object(Z.a)({},$e.store.getState().activeKey),{},Object(a.a)({},$e.eventKey,ot($e,$e.activeKey)))}),Re.instanceArray=[],Re}return Object(O.a)(qe,[{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||!o()(this.props.style,Re.style)}},{key:"componentDidUpdate",value:function(Re){var Ne=this.props,ct="activeKey"in Ne?Ne.activeKey:Ne.store.getState().activeKey[He(Ne)],rt=ot(Ne,ct);if(rt!==ct)je(Ne.store,He(Ne),rt);else if("activeKey"in Re){var gt=ot(Re,Re.activeKey);rt!==gt&&je(Ne.store,He(Ne),rt)}}},{key:"render",value:function(){var Re=this,Ne=Object(E.a)({},this.props);this.instanceArray=[];var ct=u()(Ne.prefixCls,Ne.className,"".concat(Ne.prefixCls,"-").concat(Ne.mode)),rt={className:ct,role:Ne.role||"menu"};Ne.id&&(rt.id=Ne.id),Ne.focusable&&(rt.tabIndex=0,rt.onKeyDown=this.onKeyDown);var gt=Ne.prefixCls,pt=Ne.eventKey,at=Ne.visible,vt=Ne.level,St=Ne.mode,wt=Ne.overflowedIndicator,Dt=Ne.theme;return Oe.forEach(function(Ar){return delete Ne[Ar]}),delete Ne.onClick,R.createElement(yt,Object.assign({},Ne,{prefixCls:gt,mode:St,tag:"ul",level:vt,theme:Dt,visible:at,overflowedIndicator:wt},rt),R.Children.map(Ne.children,function(Ar,xr){return Re.renderMenuItem(Ar,xr,pt||"0-menu-")}))}}]),qe}(R.Component);we.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:D};var he=Object(b.b)()(we),fe=he,ge=N("Kwbf");function Te(Ct,nt,qe){var $e=Ct.prefixCls,Re=Ct.motion,Ne=Ct.defaultMotions,ct=Ne===void 0?{}:Ne,rt=Ct.openAnimation,gt=Ct.openTransitionName,pt=nt.switchingModeFromInline;if(Re)return Re;if(Object(c.a)(rt)==="object"&&rt)Object(ge.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof rt=="string")return{motionName:"".concat($e,"-open-").concat(rt)};if(gt)return{motionName:gt};var at=ct[qe];return at||(pt?null:ct.other)}var me=function(Ct){Object(M.a)(qe,Ct);var nt=Object(_.a)(qe);function qe($e){var Re;Object(H.a)(this,qe),Re=nt.call(this,$e),Re.inlineOpenKeys=[],Re.onSelect=function(rt){var gt=Object(Q.a)(Re),pt=gt.props;if(pt.selectable){var at=Re.store.getState(),vt=at.selectedKeys,St=rt.key;pt.multiple?vt=vt.concat([St]):vt=[St],"selectedKeys"in pt||Re.store.setState({selectedKeys:vt}),pt.onSelect(Object(Z.a)(Object(Z.a)({},rt),{},{selectedKeys:vt}))}},Re.onClick=function(rt){var gt=Re.getRealMenuMode(),pt=Object(Q.a)(Re),at=pt.store,vt=pt.props.onOpenChange;gt!=="inline"&&!("openKeys"in Re.props)&&(at.setState({openKeys:[]}),vt([])),Re.props.onClick(rt)},Re.onKeyDown=function(rt,gt){Re.innerMenu.getWrappedInstance().onKeyDown(rt,gt)},Re.onOpenChange=function(rt){var gt=Object(Q.a)(Re),pt=gt.props,at=Re.store.getState().openKeys.concat(),vt=!1,St=function(Dt){var Ar=!1;if(Dt.open)Ar=at.indexOf(Dt.key)===-1,Ar&&at.push(Dt.key);else{var xr=at.indexOf(Dt.key);Ar=xr!==-1,Ar&&at.splice(xr,1)}vt=vt||Ar};Array.isArray(rt)?rt.forEach(St):St(rt),vt&&("openKeys"in Re.props||Re.store.setState({openKeys:at}),pt.onOpenChange(at))},Re.onDeselect=function(rt){var gt=Object(Q.a)(Re),pt=gt.props;if(pt.selectable){var at=Re.store.getState().selectedKeys.concat(),vt=rt.key,St=at.indexOf(vt);St!==-1&&at.splice(St,1),"selectedKeys"in pt||Re.store.setState({selectedKeys:at}),pt.onDeselect(Object(Z.a)(Object(Z.a)({},rt),{},{selectedKeys:at}))}},Re.onMouseEnter=function(rt){Re.restoreModeVerticalFromInline();var gt=Re.props.onMouseEnter;gt&>(rt)},Re.onTransitionEnd=function(rt){var gt=rt.propertyName==="width"&&rt.target===rt.currentTarget,pt=rt.target.className,at=Object.prototype.toString.call(pt)==="[object SVGAnimatedString]"?pt.animVal:pt,vt=rt.propertyName==="font-size"&&at.indexOf("anticon")>=0;(gt||vt)&&Re.restoreModeVerticalFromInline()},Re.setInnerMenu=function(rt){Re.innerMenu=rt},Re.isRootMenu=!0;var Ne=$e.defaultSelectedKeys,ct=$e.defaultOpenKeys;return"selectedKeys"in $e&&(Ne=$e.selectedKeys||[]),"openKeys"in $e&&(ct=$e.openKeys||[]),Re.store=Object(b.c)({selectedKeys:Ne,openKeys:ct,activeKey:{"0-menu-":ot($e,$e.activeKey)}}),Re.state={switchingModeFromInline:!1},Re}return Object(O.a)(qe,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Re){this.updateOpentKeysWhenSwitchMode(Re),this.updateMiniStore();var Ne=this.props,ct=Ne.siderCollapsed,rt=Ne.inlineCollapsed,gt=Ne.onOpenChange;(!Re.inlineCollapsed&&rt||!Re.siderCollapsed&&ct)&>([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Re){var Ne=this.props,ct=this.store,rt=this.inlineOpenKeys,gt=ct.getState(),pt={};Re.mode==="inline"&&Ne.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Ne||((Ne.inlineCollapsed&&!Re.inlineCollapsed||Ne.siderCollapsed&&!Re.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=gt.openKeys.concat(),pt.openKeys=[]),(!Ne.inlineCollapsed&&Re.inlineCollapsed||!Ne.siderCollapsed&&Re.siderCollapsed)&&(pt.openKeys=rt,this.inlineOpenKeys=[])),Object.keys(pt).length&&ct.setState(pt)}},{key:"updateMenuDisplay",value:function(){var Re=this.props.collapsedWidth,Ne=this.store,ct=this.prevOpenKeys,rt=this.getInlineCollapsed()&&(Re===0||Re==="0"||Re==="0px");rt?(this.prevOpenKeys=Ne.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ct&&(this.store.setState({openKeys:ct}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Re=this.props.mode,Ne=this.state.switchingModeFromInline,ct=this.getInlineCollapsed();return Ne&&ct?"inline":ct?"vertical":Re}},{key:"getInlineCollapsed",value:function(){var Re=this.props,Ne=Re.inlineCollapsed,ct=Re.siderCollapsed;return ct!==void 0?ct:Ne}},{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(Z.a)({},Object(t.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ne=this.getRealMenuMode();return Re.className+=" ".concat(Re.prefixCls,"-root"),Re.direction==="rtl"&&(Re.className+=" ".concat(Re.prefixCls,"-rtl")),Re=Object(Z.a)(Object(Z.a)({},Re),{},{mode:Ne,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Te(this.props,this.state,Ne)}),delete Re.openAnimation,delete Re.openTransitionName,R.createElement(b.a,{store:this.store},R.createElement(fe,Object.assign({},Re,{ref:this.setInnerMenu}),this.props.children))}}]),qe}(R.Component);me.defaultProps={selectable:!0,onClick:D,onSelect:D,onOpenChange:D,onDeselect:D,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:R.createElement("span",null,"\xB7\xB7\xB7")};var Ee=me,xe=function(Ct){Object(M.a)(qe,Ct);var nt=Object(_.a)(qe);function qe(){var $e;return Object(H.a)(this,qe),$e=nt.apply(this,arguments),$e.onKeyDown=function(Re){var Ne=Re.keyCode;return Ne===A.a.ENTER?($e.onClick(Re),!0):void 0},$e.onMouseLeave=function(Re){var Ne=$e.props,ct=Ne.eventKey,rt=Ne.onItemHover,gt=Ne.onMouseLeave;rt({key:ct,hover:!1}),gt({key:ct,domEvent:Re})},$e.onMouseEnter=function(Re){var Ne=$e.props,ct=Ne.eventKey,rt=Ne.onItemHover,gt=Ne.onMouseEnter;rt({key:ct,hover:!0}),gt({key:ct,domEvent:Re})},$e.onClick=function(Re){var Ne=$e.props,ct=Ne.eventKey,rt=Ne.multiple,gt=Ne.onClick,pt=Ne.onSelect,at=Ne.onDeselect,vt=Ne.isSelected,St={key:ct,keyPath:[ct],item:Object(Q.a)($e),domEvent:Re};gt(St),rt?vt?at(St):pt(St):vt||pt(St)},$e.saveNode=function(Re){$e.node=Re},$e}return Object(O.a)(qe,[{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,Ne=Object(Z.a)({},this.props),ct=u()(this.getPrefixCls(),Ne.className,(Re={},Object(a.a)(Re,this.getActiveClassName(),!Ne.disabled&&Ne.active),Object(a.a)(Re,this.getSelectedClassName(),Ne.isSelected),Object(a.a)(Re,this.getDisabledClassName(),Ne.disabled),Re)),rt=Object(Z.a)(Object(Z.a)({},Ne.attribute),{},{title:typeof Ne.title=="string"?Ne.title:void 0,className:ct,role:Ne.role||"menuitem","aria-disabled":Ne.disabled});Ne.role==="option"?rt=Object(Z.a)(Object(Z.a)({},rt),{},{role:"option","aria-selected":Ne.isSelected}):(Ne.role===null||Ne.role==="none")&&(rt.role="none");var gt={onClick:Ne.disabled?null:this.onClick,onMouseLeave:Ne.disabled?null:this.onMouseLeave,onMouseEnter:Ne.disabled?null:this.onMouseEnter},pt=Object(Z.a)({},Ne.style);Ne.mode==="inline"&&(Ne.direction==="rtl"?pt.paddingRight=Ne.inlineIndent*Ne.level:pt.paddingLeft=Ne.inlineIndent*Ne.level),Oe.forEach(function(vt){return delete Ne[vt]}),delete Ne.direction;var at=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(at=R.createElement(this.props.itemIcon,this.props)),R.createElement("li",Object.assign({},Object(t.default)(Ne,["onClick","onMouseEnter","onMouseLeave","onSelect"]),rt,gt,{style:pt,ref:this.saveNode}),Ne.children,at)}}]),qe}(R.Component);xe.isMenuItem=!0,xe.defaultProps={onSelect:D,onMouseEnter:D,onMouseLeave:D,manualRef:D};var Ie=Object(b.b)(function(Ct,nt){var qe=Ct.activeKey,$e=Ct.selectedKeys,Re=nt.eventKey,Ne=nt.subMenuKey;return{active:qe[Ne]===Re,isSelected:$e.indexOf(Re)!==-1}})(xe),Pe=Ie,Qe=function(Ct){Object(M.a)(qe,Ct);var nt=Object(_.a)(qe);function qe(){var $e;return Object(H.a)(this,qe),$e=nt.apply(this,arguments),$e.renderInnerMenuItem=function(Re){var Ne=$e.props,ct=Ne.renderMenuItem,rt=Ne.index;return ct(Re,rt,$e.props.subMenuKey)},$e}return Object(O.a)(qe,[{key:"render",value:function(){var Re=Object(E.a)({},this.props),Ne=Re.className,ct=Ne===void 0?"":Ne,rt=Re.rootPrefixCls,gt="".concat(rt,"-item-group-title"),pt="".concat(rt,"-item-group-list"),at=Re.title,vt=Re.children;return Oe.forEach(function(St){return delete Re[St]}),delete Re.onClick,delete Re.direction,R.createElement("li",Object.assign({},Re,{className:"".concat(ct," ").concat(rt,"-item-group")}),R.createElement("div",{className:gt,title:typeof at=="string"?at:void 0},at),R.createElement("ul",{className:pt},R.Children.map(vt,this.renderInnerMenuItem)))}}]),qe}(R.Component);Qe.isMenuItemGroup=!0,Qe.defaultProps={disabled:!0};var tt=Qe,mt=function(nt){var qe=nt.className,$e=nt.rootPrefixCls,Re=nt.style;return R.createElement("li",{className:"".concat(qe," ").concat($e,"-item-divider"),style:Re})};mt.defaultProps={disabled:!0,className:"",style:{}};var Bt=mt,Et=Ae.e=Ee},"24YM":function(Ve,Ae,N){"use strict";Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.SensorTabIndex=Ae.SensorClassName=Ae.SizeSensorId=void 0;var Z="size-sensor-id";Ae.SizeSensorId=Z;var H="size-sensor-object";Ae.SensorClassName=H;var O="-1";Ae.SensorTabIndex=O},"24hK":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return H});class Z{constructor(O){this.element=O,this.next=Z.Undefined,this.prev=Z.Undefined}}Z.Undefined=new Z(void 0);class H{constructor(){this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Z.Undefined}clear(){let O=this._first;for(;O!==Z.Undefined;){const Q=O.next;O.prev=Z.Undefined,O.next=Z.Undefined,O=Q}this._first=Z.Undefined,this._last=Z.Undefined,this._size=0}unshift(O){return this._insert(O,!1)}push(O){return this._insert(O,!0)}_insert(O,Q){const M=new Z(O);if(this._first===Z.Undefined)this._first=M,this._last=M;else if(Q){const R=this._last;this._last=M,M.prev=R,R.next=M}else{const R=this._first;this._first=M,M.next=R,R.prev=M}this._size+=1;let _=!1;return()=>{_||(_=!0,this._remove(M))}}shift(){if(this._first===Z.Undefined)return;{const O=this._first.element;return this._remove(this._first),O}}pop(){if(this._last===Z.Undefined)return;{const O=this._last.element;return this._remove(this._last),O}}_remove(O){if(O.prev!==Z.Undefined&&O.next!==Z.Undefined){const Q=O.prev;Q.next=O.next,O.next.prev=Q}else O.prev===Z.Undefined&&O.next===Z.Undefined?(this._first=Z.Undefined,this._last=Z.Undefined):O.next===Z.Undefined?(this._last=this._last.prev,this._last.next=Z.Undefined):O.prev===Z.Undefined&&(this._first=this._first.next,this._first.prev=Z.Undefined);this._size-=1}*[Symbol.iterator](){let O=this._first;for(;O!==Z.Undefined;)yield O.element,O=O.next}}},"2DNl":function(Ve,Ae,N){var Z=N("IMiH"),H=N("loD1"),O=N("59Ip"),Q=N("aKvl"),M=N("n1HI"),_=N("hX1E"),R=_.normalizeRadian,b=N("Sj9i"),t=N("hyiK"),E=Z.CMD,a=Math.PI*2,A=1e-4;function h(C,L){return Math.abs(C-L)<A}var s=[-1,-1,-1],o=[-1,-1];function f(){var C=o[0];o[0]=o[1],o[1]=C}function u(C,L,w,p,n,d,m,T,y,g){if(g>L&&g>p&&g>d&&g>T||g<L&&g<p&&g<d&&g<T)return 0;var U=b.cubicRootAt(L,p,d,T,g,s);if(U===0)return 0;for(var P=0,I=-1,G,K,D=0;D<U;D++){var J=s[D],X=J===0||J===1?.5:1,ne=b.cubicAt(C,w,n,m,J);if(ne<y)continue;I<0&&(I=b.cubicExtrema(L,p,d,T,o),o[1]<o[0]&&I>1&&f(),G=b.cubicAt(L,p,d,T,o[0]),I>1&&(K=b.cubicAt(L,p,d,T,o[1]))),I===2?J<o[0]?P+=G<L?X:-X:J<o[1]?P+=K<G?X:-X:P+=T<K?X:-X:J<o[0]?P+=G<L?X:-X:P+=T<G?X:-X}return P}function c(C,L,w,p,n,d,m,T){if(T>L&&T>p&&T>d||T<L&&T<p&&T<d)return 0;var y=b.quadraticRootAt(L,p,d,T,s);if(y===0)return 0;var g=b.quadraticExtremum(L,p,d);if(g>=0&&g<=1){for(var U=0,P=b.quadraticAt(L,p,d,g),I=0;I<y;I++){var G=s[I]===0||s[I]===1?.5:1,K=b.quadraticAt(C,w,n,s[I]);if(K<m)continue;s[I]<g?U+=P<L?G:-G:U+=d<P?G:-G}return U}else{var G=s[0]===0||s[0]===1?.5:1,K=b.quadraticAt(C,w,n,s[0]);return K<m?0:d<L?G:-G}}function i(C,L,w,p,n,d,m,T){if(T-=L,T>w||T<-w)return 0;var y=Math.sqrt(w*w-T*T);s[0]=-y,s[1]=y;var g=Math.abs(p-n);if(g<1e-4)return 0;if(g%a<1e-4){p=0,n=a;var U=d?1:-1;return m>=s[0]+C&&m<=s[1]+C?U:0}if(d){var y=p;p=R(n),n=R(y)}else p=R(p),n=R(n);p>n&&(n+=a);for(var P=0,I=0;I<2;I++){var G=s[I];if(G+C>m){var K=Math.atan2(T,G),U=d?1:-1;K<0&&(K=a+K),(K>=p&&K<=n||K+a>=p&&K+a<=n)&&(K>Math.PI/2&&K<Math.PI*1.5&&(U=-U),P+=U)}}return P}function l(C,L,w,p,n){for(var d=0,m=0,T=0,y=0,g=0,U=0;U<C.length;){var P=C[U++];P===E.M&&U>1&&(w||(d+=t(m,T,y,g,p,n))),U===1&&(m=C[U],T=C[U+1],y=m,g=T);switch(P){case E.M:y=C[U++],g=C[U++],m=y,T=g;break;case E.L:if(w){if(H.containStroke(m,T,C[U],C[U+1],L,p,n))return!0}else d+=t(m,T,C[U],C[U+1],p,n)||0;m=C[U++],T=C[U++];break;case E.C:if(w){if(O.containStroke(m,T,C[U++],C[U++],C[U++],C[U++],C[U],C[U+1],L,p,n))return!0}else d+=u(m,T,C[U++],C[U++],C[U++],C[U++],C[U],C[U+1],p,n)||0;m=C[U++],T=C[U++];break;case E.Q:if(w){if(Q.containStroke(m,T,C[U++],C[U++],C[U],C[U+1],L,p,n))return!0}else d+=c(m,T,C[U++],C[U++],C[U],C[U+1],p,n)||0;m=C[U++],T=C[U++];break;case E.A:var I=C[U++],G=C[U++],K=C[U++],D=C[U++],J=C[U++],X=C[U++];U+=1;var ne=1-C[U++],ue=Math.cos(J)*K+I,Oe=Math.sin(J)*D+G;U>1?d+=t(m,T,ue,Oe,p,n):(y=ue,g=Oe);var _e=(p-I)*D/K+I;if(w){if(M.containStroke(I,G,D,J,J+X,ne,L,_e,n))return!0}else d+=i(I,G,D,J,J+X,ne,_e,n);m=Math.cos(J+X)*K+I,T=Math.sin(J+X)*D+G;break;case E.R:y=m=C[U++],g=T=C[U++];var De=C[U++],Ue=C[U++],ue=y+De,Oe=g+Ue;if(w){if(H.containStroke(y,g,ue,g,L,p,n)||H.containStroke(ue,g,ue,Oe,L,p,n)||H.containStroke(ue,Oe,y,Oe,L,p,n)||H.containStroke(y,Oe,y,g,L,p,n))return!0}else d+=t(ue,g,ue,Oe,p,n),d+=t(y,Oe,y,g,p,n);break;case E.Z:if(w){if(H.containStroke(m,T,y,g,L,p,n))return!0}else d+=t(m,T,y,g,p,n);m=y,T=g;break}}return!w&&!h(T,g)&&(d+=t(m,T,y,g,p,n)||0),d!==0}function v(C,L,w){return l(C,0,!1,L,w)}function B(C,L,w,p){return l(C,L,!0,w,p)}Ae.contain=v,Ae.containStroke=B},"2fw6":function(Ve,Ae,N){var Z=N("y+Vt"),H=Z.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(O,Q,M){M&&O.moveTo(Q.cx+Q.r,Q.cy),O.arc(Q.cx,Q.cy,Q.r,0,Math.PI*2,!0)}});Ve.exports=H},"3/fG":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return H});function Z(O,Q){let M;return Q.length===0?M=O:M=O.replace(/\{(\d+)\}/g,function(_,R){const b=R[0];return typeof Q[b]!="undefined"?Q[b]:_}),M}function H(O,Q,...M){return Z(Q,M)}},"3C/r":function(Ve,Ae){var N=function(H,O){this.image=H,this.repeat=O,this.type="pattern"};N.prototype.getCanvasPattern=function(H){return H.createPattern(this.image,this.repeat||"repeat")};var Z=N;Ve.exports=Z},"3CBa":function(Ve,Ae,N){var Z=N("hydK"),H=Z.createElement,O=N("bYtY"),Q=N("SUKs"),M=N("y+Vt"),_=N("Dagg"),R=N("dqUG"),b=N("DBLp"),t=N("sW+o"),E=N("n6Mw"),a=N("vKoX"),A=N("P47w"),h=A.path,s=A.image,o=A.text;function f(n){return parseInt(n,10)}function u(n){return n instanceof M?h:n instanceof _?s:n instanceof R?o:h}function c(n,d){return d&&n&&d.parentNode!==n}function i(n,d,m){if(c(n,d)&&m){var T=m.nextSibling;T?n.insertBefore(d,T):n.appendChild(d)}}function l(n,d){if(c(n,d)){var m=n.firstChild;m?n.insertBefore(d,m):n.appendChild(d)}}function v(n,d){d&&n&&d.parentNode===n&&n.removeChild(d)}function B(n){return n.__textSvgEl}function C(n){return n.__svgEl}var L=function(n,d,m,T){this.root=n,this.storage=d,this._opts=m=O.extend({},m||{});var y=H("svg");y.setAttribute("xmlns","http://www.w3.org/2000/svg"),y.setAttribute("version","1.1"),y.setAttribute("baseProfile","full"),y.style.cssText="user-select:none;position:absolute;left:0;top:0;";var g=H("g");y.appendChild(g);var U=H("g");y.appendChild(U),this.gradientManager=new t(T,U),this.clipPathManager=new E(T,U),this.shadowManager=new a(T,U);var P=document.createElement("div");P.style.cssText="overflow:hidden;position:relative",this._svgDom=y,this._svgRoot=U,this._backgroundRoot=g,this._viewport=P,n.appendChild(P),P.appendChild(y),this.resize(m.width,m.height),this._visibleList=[]};L.prototype={constructor:L,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var n=this.getViewportRoot();if(n)return{offsetLeft:n.offsetLeft||0,offsetTop:n.offsetTop||0}},refresh:function(){var n=this.storage.getDisplayList(!0);this._paintList(n)},setBackgroundColor:function(n){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var d=H("rect");d.setAttribute("width",this.getWidth()),d.setAttribute("height",this.getHeight()),d.setAttribute("x",0),d.setAttribute("y",0),d.setAttribute("id",0),d.style.fill=n,this._backgroundRoot.appendChild(d),this._backgroundNode=d},_paintList:function(n){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var d=this._svgRoot,m=this._visibleList,T=n.length,y=[],g;for(g=0;g<T;g++){var U=n[g],P=u(U),I=C(U)||B(U);U.invisible||(U.__dirty&&(P&&P.brush(U),this.clipPathManager.update(U),U.style&&(this.gradientManager.update(U.style.fill),this.gradientManager.update(U.style.stroke),this.shadowManager.update(I,U)),U.__dirty=!1),y.push(U))}var G=b(m,y),K;for(g=0;g<G.length;g++){var D=G[g];if(D.removed)for(var J=0;J<D.count;J++){var U=m[D.indices[J]],I=C(U),X=B(U);v(d,I),v(d,X)}}for(g=0;g<G.length;g++){var D=G[g];if(D.added)for(var J=0;J<D.count;J++){var U=y[D.indices[J]],I=C(U),X=B(U);K?i(d,I,K):l(d,I),I?i(d,X,I):K?i(d,X,K):l(d,X),i(d,X,I),K=X||I||K,this.gradientManager.addWithoutUpdate(I||X,U),this.shadowManager.addWithoutUpdate(I||X,U),this.clipPathManager.markUsed(U)}else if(!D.removed)for(var J=0;J<D.count;J++){var U=y[D.indices[J]],I=C(U),X=B(U),I=C(U),X=B(U);this.gradientManager.markUsed(U),this.gradientManager.addWithoutUpdate(I||X,U),this.shadowManager.markUsed(U),this.shadowManager.addWithoutUpdate(I||X,U),this.clipPathManager.markUsed(U),X&&i(d,X,I),K=I||X||K}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=y},_getDefs:function(n){var d=this._svgDom,m=d.getElementsByTagName("defs");if(m.length===0)if(n){var m=d.insertBefore(H("defs"),d.firstChild);return m.contains||(m.contains=function(y){var g=m.children;if(!g)return!1;for(var U=g.length-1;U>=0;--U)if(g[U]===y)return!0;return!1}),m}else return null;else return m[0]},resize:function(n,d){var m=this._viewport;m.style.display="none";var T=this._opts;if(n!=null&&(T.width=n),d!=null&&(T.height=d),n=this._getSize(0),d=this._getSize(1),m.style.display="",this._width!==n||this._height!==d){this._width=n,this._height=d;var y=m.style;y.width=n+"px",y.height=d+"px";var g=this._svgDom;g.setAttribute("width",n),g.setAttribute("height",d)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",n),this._backgroundNode.setAttribute("height",d))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(n){var d=this._opts,m=["width","height"][n],T=["clientWidth","clientHeight"][n],y=["paddingLeft","paddingTop"][n],g=["paddingRight","paddingBottom"][n];if(d[m]!=null&&d[m]!=="auto")return parseFloat(d[m]);var U=this.root,P=document.defaultView.getComputedStyle(U);return(U[T]||f(P[m])||f(U.style[m]))-(f(P[y])||0)-(f(P[g])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){this.refresh();var n=encodeURIComponent(this._svgDom.outerHTML.replace(/></g,`>
|
|
\r<`));return"data:image/svg+xml;charset=UTF-8,"+n}};function w(n){return function(){Q('In SVG mode painter not support method "'+n+'"')}}O.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(n){L.prototype[n]=w(n)});var p=L;Ve.exports=p},"3e3G":function(Ve,Ae,N){var Z=N("bYtY"),H=N("QuXc"),O=function(M,_,R,b,t){this.x=M==null?.5:M,this.y=_==null?.5:_,this.r=R==null?.5:R,this.type="radial",this.global=t||!1,H.call(this,b)};O.prototype={constructor:O},Z.inherits(O,H);var Q=O;Ve.exports=Q},"3gBT":function(Ve,Ae){var N=2311;function Z(){return N++}Ve.exports=Z},"49sm":function(Ve,Ae){var N={}.toString;Ve.exports=Array.isArray||function(Z){return N.call(Z)=="[object Array]"}},"4fz+":function(Ve,Ae,N){var Z=N("bYtY"),H=N("1bdT"),O=N("mFDi"),Q=function(_){_=_||{},H.call(this,_);for(var R in _)_.hasOwnProperty(R)&&(this[R]=_[R]);this._children=[],this.__storage=null,this.__dirty=!0};Q.prototype={constructor:Q,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(_){return this._children[_]},childOfName:function(_){for(var R=this._children,b=0;b<R.length;b++)if(R[b].name===_)return R[b]},childCount:function(){return this._children.length},add:function(_){return _&&_!==this&&_.parent!==this&&(this._children.push(_),this._doAdd(_)),this},addBefore:function(_,R){if(_&&_!==this&&_.parent!==this&&R&&R.parent===this){var b=this._children,t=b.indexOf(R);t>=0&&(b.splice(t,0,_),this._doAdd(_))}return this},_doAdd:function(_){_.parent&&_.parent.remove(_),_.parent=this;var R=this.__storage,b=this.__zr;R&&R!==_.__storage&&(R.addToStorage(_),_ instanceof Q&&_.addChildrenToStorage(R)),b&&b.refresh()},remove:function(_){var R=this.__zr,b=this.__storage,t=this._children,E=Z.indexOf(t,_);return E<0?this:(t.splice(E,1),_.parent=null,b&&(b.delFromStorage(_),_ instanceof Q&&_.delChildrenFromStorage(b)),R&&R.refresh(),this)},removeAll:function(){var _=this._children,R=this.__storage,b,t;for(t=0;t<_.length;t++)b=_[t],R&&(R.delFromStorage(b),b instanceof Q&&b.delChildrenFromStorage(R)),b.parent=null;return _.length=0,this},eachChild:function(_,R){for(var b=this._children,t=0;t<b.length;t++){var E=b[t];_.call(R,E,t)}return this},traverse:function(_,R){for(var b=0;b<this._children.length;b++){var t=this._children[b];_.call(R,t),t.type==="group"&&t.traverse(_,R)}return this},addChildrenToStorage:function(_){for(var R=0;R<this._children.length;R++){var b=this._children[R];_.addToStorage(b),b instanceof Q&&b.addChildrenToStorage(_)}},delChildrenFromStorage:function(_){for(var R=0;R<this._children.length;R++){var b=this._children[R];_.delFromStorage(b),b instanceof Q&&b.delChildrenFromStorage(_)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(_){for(var R=null,b=new O(0,0,0,0),t=_||this._children,E=[],a=0;a<t.length;a++){var A=t[a];if(A.ignore||A.invisible)continue;var h=A.getBoundingRect(),s=A.getLocalTransform(E);s?(b.copy(h),b.applyTransform(s),R=R||b.clone(),R.union(b)):(R=R||h.clone(),R.union(h))}return R||b}},Z.inherits(Q,H);var M=Q;Ve.exports=M},"4mN7":function(Ve,Ae,N){var Z=N("QBsz"),H=N("Sj9i"),O=Math.min,Q=Math.max,M=Math.sin,_=Math.cos,R=Math.PI*2,b=Z.create(),t=Z.create(),E=Z.create();function a(c,i,l){if(c.length===0)return;var v=c[0],B=v[0],C=v[0],L=v[1],w=v[1],p;for(p=1;p<c.length;p++)v=c[p],B=O(B,v[0]),C=Q(C,v[0]),L=O(L,v[1]),w=Q(w,v[1]);i[0]=B,i[1]=L,l[0]=C,l[1]=w}function A(c,i,l,v,B,C){B[0]=O(c,l),B[1]=O(i,v),C[0]=Q(c,l),C[1]=Q(i,v)}var h=[],s=[];function o(c,i,l,v,B,C,L,w,p,n){var d=H.cubicExtrema,m=H.cubicAt,T,y=d(c,l,B,L,h);for(p[0]=Infinity,p[1]=Infinity,n[0]=-Infinity,n[1]=-Infinity,T=0;T<y;T++){var g=m(c,l,B,L,h[T]);p[0]=O(g,p[0]),n[0]=Q(g,n[0])}for(y=d(i,v,C,w,s),T=0;T<y;T++){var U=m(i,v,C,w,s[T]);p[1]=O(U,p[1]),n[1]=Q(U,n[1])}p[0]=O(c,p[0]),n[0]=Q(c,n[0]),p[0]=O(L,p[0]),n[0]=Q(L,n[0]),p[1]=O(i,p[1]),n[1]=Q(i,n[1]),p[1]=O(w,p[1]),n[1]=Q(w,n[1])}function f(c,i,l,v,B,C,L,w){var p=H.quadraticExtremum,n=H.quadraticAt,d=Q(O(p(c,l,B),1),0),m=Q(O(p(i,v,C),1),0),T=n(c,l,B,d),y=n(i,v,C,m);L[0]=O(c,B,T),L[1]=O(i,C,y),w[0]=Q(c,B,T),w[1]=Q(i,C,y)}function u(c,i,l,v,B,C,L,w,p){var n=Z.min,d=Z.max,m=Math.abs(B-C);if(m%R<1e-4&&m>1e-4){w[0]=c-l,w[1]=i-v,p[0]=c+l,p[1]=i+v;return}if(b[0]=_(B)*l+c,b[1]=M(B)*v+i,t[0]=_(C)*l+c,t[1]=M(C)*v+i,n(w,b,t),d(p,b,t),B=B%R,B<0&&(B=B+R),C=C%R,C<0&&(C=C+R),B>C&&!L?C+=R:B<C&&L&&(B+=R),L){var T=C;C=B,B=T}for(var y=0;y<C;y+=Math.PI/2)y>B&&(E[0]=_(y)*l+c,E[1]=M(y)*v+i,n(w,E,w),d(p,E,p))}Ae.fromPoints=a,Ae.fromLine=A,Ae.fromCubic=o,Ae.fromQuadratic=f,Ae.fromArc=u},"55Ip":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return i});var Z=N("Ty5D"),H=N("dI71"),O=N("q1tI"),Q=N.n(O),M=N("YS25"),_=N("17x9"),R=N.n(_),b=N("wx14"),t=N("zLVn"),E=N("9R94"),a=function(n){Object(H.a)(d,n);function d(){for(var T,y=arguments.length,g=new Array(y),U=0;U<y;U++)g[U]=arguments[U];return T=n.call.apply(n,[this].concat(g))||this,T.history=Object(M.a)(T.props),T}var m=d.prototype;return m.render=function(){return Q.a.createElement(Z.c,{history:this.history,children:this.props.children})},d}(Q.a.Component),A=function(n){Object(H.a)(d,n);function d(){for(var T,y=arguments.length,g=new Array(y),U=0;U<y;U++)g[U]=arguments[U];return T=n.call.apply(n,[this].concat(g))||this,T.history=Object(M.b)(T.props),T}var m=d.prototype;return m.render=function(){return Q.a.createElement(Z.c,{history:this.history,children:this.props.children})},d}(Q.a.Component),h=function(d,m){return typeof d=="function"?d(m):d},s=function(d,m){return typeof d=="string"?Object(M.c)(d,null,null,m):d},o=function(d){return d},f=Q.a.forwardRef;typeof f=="undefined"&&(f=o);function u(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var c=f(function(n,d){var m=n.innerRef,T=n.navigate,y=n.onClick,g=Object(t.a)(n,["innerRef","navigate","onClick"]),U=g.target,P=Object(b.a)({},g,{onClick:function(G){try{y&&y(G)}catch(K){throw G.preventDefault(),K}!G.defaultPrevented&&G.button===0&&(!U||U==="_self")&&!u(G)&&(G.preventDefault(),T())}});return o!==f?P.ref=d||m:P.ref=m,Q.a.createElement("a",P)}),i=f(function(n,d){var m=n.component,T=m===void 0?c:m,y=n.replace,g=n.to,U=n.innerRef,P=Object(t.a)(n,["component","replace","to","innerRef"]);return Q.a.createElement(Z.e.Consumer,null,function(I){I||Object(E.a)(!1);var G=I.history,K=s(h(g,I.location),I.location),D=K?G.createHref(K):"",J=Object(b.a)({},P,{href:D,navigate:function(){var ne=h(g,I.location),ue=y?G.replace:G.push;ue(ne)}});return o!==f?J.ref=d||U:J.innerRef=U,Q.a.createElement(T,J)})});if(!1)var l,v;var B=function(d){return d},C=Q.a.forwardRef;typeof C=="undefined"&&(C=B);function L(){for(var n=arguments.length,d=new Array(n),m=0;m<n;m++)d[m]=arguments[m];return d.filter(function(T){return T}).join(" ")}var w=C(function(n,d){var m=n["aria-current"],T=m===void 0?"page":m,y=n.activeClassName,g=y===void 0?"active":y,U=n.activeStyle,P=n.className,I=n.exact,G=n.isActive,K=n.location,D=n.sensitive,J=n.strict,X=n.style,ne=n.to,ue=n.innerRef,Oe=Object(t.a)(n,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return Q.a.createElement(Z.e.Consumer,null,function(_e){_e||Object(E.a)(!1);var De=K||_e.location,Ue=s(h(ne,De),De),Ke=Ue.pathname,Le=Ke&&Ke.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ae=Le?Object(Z.f)(De.pathname,{path:Le,exact:I,sensitive:D,strict:J}):null,V=!!(G?G(ae,De):ae),$=V?L(P,g):P,q=V?Object(b.a)({},X,{},U):X,se=Object(b.a)({"aria-current":V&&T||null,className:$,style:q,to:Ue},Oe);return B!==C?se.ref=d||ue:se.innerRef=ue,Q.a.createElement(i,se)})});if(!1)var p},"59Ip":function(Ve,Ae,N){var Z=N("Sj9i");function H(O,Q,M,_,R,b,t,E,a,A,h){if(a===0)return!1;var s=a;if(h>Q+s&&h>_+s&&h>b+s&&h>E+s||h<Q-s&&h<_-s&&h<b-s&&h<E-s||A>O+s&&A>M+s&&A>R+s&&A>t+s||A<O-s&&A<M-s&&A<R-s&&A<t-s)return!1;var o=Z.cubicProjectPoint(O,Q,M,_,R,b,t,E,A,h,null);return o<=s/2}Ae.containStroke=H},"5VLF":function(Ve,Ae,N){"use strict";var Z,H;function O(Q,M,_){var R=function(b,t){return Q.js_beautify(b,t)};return R.js=Q.js_beautify,R.css=M.css_beautify,R.html=_.html_beautify,R.js_beautify=Q.js_beautify,R.css_beautify=M.css_beautify,R.html_beautify=_.html_beautify,R}!(Z=[N("6UM0"),N("TXwP"),N("psGv")],H=function(Q,M,_){return O(Q,M,_)}.apply(Ae,Z),H!==void 0&&(Ve.exports=H))},"5Y4S":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return O});var Z=N("MNsG");const H=Z.b.performance&&typeof Z.b.performance.now=="function";class O{constructor(Q){this._highResolution=H&&Q,this._startTime=this._now(),this._stopTime=-1}static create(Q=!0){return new O(Q)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Z.b.performance.now():Date.now()}}},"5gs/":function(Ve,Ae,N){"use strict";N.r(Ae);var Z=N("cWXX"),H=N("/ezw"),O=N("g9YV"),Q=N("wCAj"),M=N("/zsF"),_=N("PArb"),R=N("14J3"),b=N("BMrR"),t=N("+L6B"),E=N("2/Rp"),a=N("jCWc"),A=N("kPKH"),h=N("sPJy"),s=N("bE4q"),o=N("miYZ"),f=N("tsqr"),u=N("2qtc"),c=N("kLXV"),i=N("9og8"),l=N("Pv/L"),v=N("k1fw"),B=N("tJVT"),C=N("PpiC"),L=N("WmNS"),w=N.n(L),p=N("q1tI"),n=N.n(p),d=N("wd/R"),m=N.n(d),T=N("xOOu"),y=N.n(T),g=N("Ty5D"),U=N("9kvl"),P=N("55Ip"),I=N("jhfD"),G=N("CTES"),K=N("RCxd"),D=N("/MfK"),J=N("m3rI"),X=N("xKgJ"),ne=N("1vsH"),ue=N("cVA7"),Oe=N.n(ue),_e=N("z9Ch"),De=N.n(_e),Ue={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}},Ke=function(Ie){var Pe,Qe,tt,mt,Bt,Et=Ie.shixunHomeworks,Ct=Ie.globalSetting,nt=Ie.loading,qe=Ie.dispatch,$e=Object(g.i)(),Re=Object(g.h)(),Ne=Object(p.useState)([]),ct=Object(B.a)(Ne,2),rt=ct[0],gt=ct[1],pt=Object(p.useState)(Re.query.tabs||0),at=Object(B.a)(pt,2),vt=at[0],St=at[1],wt=Et.shixunWorkReport,Dt=((Pe=wt.echart_data)===null||Pe===void 0?void 0:Pe.efficiency_list.length)-parseInt((Qe=wt.echart_data)===null||Qe===void 0?void 0:Qe.myself_eff[0]),Ar=function(){var Ft,er,ir;return{title:{text:"\u5B66\u4E60\u6548\u7387",subtext:"\u5B66\u4E60\u6548\u7387=log(\u5B9E\u8BAD\u603B\u5F97\u5206/\u5B9E\u8BAD\u603B\u8017\u65F6)"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{left:"3%",right:"9%",bottom:"3%",containLabel:!0},tooltip:{showDelay:0,formatter:function($t){if($t.name===wt.username){var Xt;return"\u59D3\u540D\uFF1A"+wt.username+"<br/>\u5B66\u53F7\uFF1A "+wt.user_id+"<br/>\u6548\u7387\uFF1A"+((Xt=wt.echart_data)===null||Xt===void 0?void 0:Xt.myself_eff[1])}else return $t.name+":"+$t.value+" "},axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}}},xAxis:[{type:"value",name:"\u5B66\u751F\u4F4D\u7F6E",nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:""},axisTick:{show:!1},splitLine:{show:!1}}],yAxis:[{type:"value",name:" ",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:"{value}"},splitLine:{show:!1}}],series:[{name:"",type:"scatter",data:(Ft=wt.echart_data)===null||Ft===void 0?void 0:Ft.efficiency_list,itemStyle:{normal:{color:"#2e65ad"}},markArea:{silent:!0,itemStyle:{normal:{color:"transparent",borderWidth:1,borderType:"dashed"}},data:[[{name:"\u5B66\u4E60\u6548\u7387\u5206\u5E03\u533A\u95F4",xAxis:"min",yAxis:"min"},{xAxis:"max",yAxis:"max"}]]},markPoint:{data:[{name:wt.username,xAxis:Dt,yAxis:(er=wt.echart_data)===null||er===void 0?void 0:er.myself_eff[1],value:(ir=wt.echart_data)===null||ir===void 0?void 0:ir.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}},xr=function(){var Ft,er,ir,Kt;return{title:{text:"\u80FD\u529B\u503C",subtext:"\u80FD\u529B\u503C\uFF08\u5B9E\u8BAD\u83B7\u5F97\u7ECF\u9A8C\u503C/\u5B9E\u8BAD\u8BC4\u6D4B\u6B21\u6570\uFF09"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{x:"10%",x2:150,y:"18%",y2:"10%"},tooltip:{padding:10,backgroundColor:"#222",borderColor:"#777",borderWidth:1,formatter:function(Xt){var Xr=Xt.value;if(Xt.name===wt.username){var Br;return"\u59D3\u540D\uFF1A"+wt.username+"<br/>\u5B66\u53F7\uFF1A "+wt.user_id+"<br/>\u5F97\u5206\uFF1A"+((Br=wt.echart_data)===null||Br===void 0?void 0:Br.myself_object[1])}}},xAxis:{type:"value",name:"log(\u5B9E\u8BAD\u7684\u603B\u65F6\u95F4)",nameGap:16,nameTextStyle:{color:"#000",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#000"}}},yAxis:{type:"value",name:" ",nameLocation:"end",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},axisLine:{lineStyle:{color:"#000"}},splitLine:{show:!1}},series:[{name:"\u80FD\u529B",type:"scatter",itemStyle:Ue,data:(Ft=wt.echart_data)===null||Ft===void 0?void 0:Ft.consume_list,symbolSize:function(Xt){return Math.round(Xt[2])},markPoint:{data:[{name:wt.username,xAxis:(er=wt.echart_data)===null||er===void 0?void 0:er.myself_object[0],yAxis:(ir=wt.echart_data)===null||ir===void 0?void 0:ir.myself_object[1],value:(Kt=wt.echart_data)===null||Kt===void 0?void 0:Kt.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]}};return n.a.createElement(n.a.Fragment,null,n.a.createElement("aside",{className:"ml60 pr30"},n.a.createElement(b.a,null,n.a.createElement(A.a,{flex:"800px"},n.a.createElement(Oe.a,{style:{width:750,height:580},option:Ar()})),n.a.createElement(A.a,{flex:"1"},n.a.createElement("aside",{className:De.a.rightInfo},n.a.createElement("ul",null,n.a.createElement("li",null,n.a.createElement("span",null,"\u59D3\u540D")," ",n.a.createElement("span",{className:"ml30"},wt.username)),n.a.createElement("li",null,n.a.createElement("span",null,"\u5B66\u53F7")," ",n.a.createElement("span",{className:"ml30"},wt.student_id||"--")),n.a.createElement("li",null,n.a.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",n.a.createElement("span",{className:"ml30 c-orange"},(tt=wt.echart_data)===null||tt===void 0?void 0:tt.myself_eff[1])),n.a.createElement("li",null,n.a.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",n.a.createElement("span",{className:"ml30 c-orange"},(mt=wt.echart_data)===null||mt===void 0?void 0:mt.myself_eff[0]))),n.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",n.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",n.a.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",n.a.createElement("br",null),"\u6A59\u8272\u6A2A\u5411\u7BAD\u5934\uFF1A\u4E2D\u4F4D\u503C\uFF0C\u8868\u793A\u6574\u4E2A\u8BFE\u5802\u5B66\u751F\u8868\u73B0\u7684\u5E73\u5747\u503C"))))),n.a.createElement("aside",{className:"ml60 pr30"},n.a.createElement(b.a,null,n.a.createElement(A.a,{flex:"800px"},n.a.createElement(Oe.a,{style:{width:750,height:580},option:xr()})),n.a.createElement(A.a,{flex:"1"},n.a.createElement("aside",{className:De.a.rightInfo},n.a.createElement("ul",null,n.a.createElement("li",null,n.a.createElement("span",null,"\u59D3\u540D")," ",n.a.createElement("span",{className:"ml30"},wt.username)),n.a.createElement("li",null,n.a.createElement("span",null,"\u5B66\u53F7")," ",n.a.createElement("span",{className:"ml30"},wt.student_id||"--")),n.a.createElement("li",null,n.a.createElement("span",null,"\u80FD\u529B")," ",n.a.createElement("span",{className:"ml30 c-orange"},(Bt=wt.echart_data)===null||Bt===void 0?void 0:Bt.myself_object[1]))),n.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",n.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",n.a.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",n.a.createElement("br",null)))))))},Le=Object(U.a)(function(xe){var Ie=xe.shixunHomeworks,Pe=xe.loading,Qe=xe.globalSetting;return{shixunHomeworks:Ie,globalSetting:Qe,loading:Pe.effects}})(Ke),ae=N("giR+"),V=N("fyUT"),$=function(xe){var Ie=xe.defaultValue,Pe=xe.onBlur,Qe=xe.max,tt=xe.className,mt=tt===void 0?"game-score":tt,Bt=Object(p.useState)(Ie),Et=Object(B.a)(Bt,2),Ct=Et[0],nt=Et[1];Object(p.useEffect)(function(){nt(Ie)},[Ie]);function qe(Re){nt(Re)}function $e(){Ct!==Ie&&Pe(Ct>Qe?Qe:Ct)}return n.a.createElement(V.a,{max:Qe,min:0,className:mt,value:Ct,onChange:qe,onBlur:$e})},q=N("OaEy"),se=N("2fM7"),te=N("ZW9T"),oe=N("Ot1p"),re=N("1eJ8"),ie=N.n(re),ee=se.a.Option,de={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},Ce;(function(xe){xe[xe.SET_PATH=0]="SET_PATH",xe[xe.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT"})(Ce||(Ce={}));function Me(xe,Ie){switch(Ie.type){case Ce.SET_PATH:return Object(v.a)(Object(v.a)({},xe),{},{selectedPath:Ie.payload});case Ce.GET_PASSED_CONTENT:return Object(v.a)(Object(v.a)({},xe),{},{passedContent:Ie.payload});default:throw new Error}}var Ye=function(xe){var Ie,Pe,Qe,tt,mt=xe.path,Bt=xe.game_id,Et=xe.onPathChange,Ct=xe.autoHeight,nt=xe.diff_code_count,qe=xe.data,$e=xe.game_codes_cn,Re=mt.split("\uFF1B").filter(function(wt){return!!wt}),Ne=Object(p.useReducer)(Me,{selectedPath:Re[0],passedContent:{language:"python",content:""}}),ct=Object(B.a)(Ne,2),rt=ct[0],gt=ct[1],pt=rt.selectedPath,at=rt.passedContent;function vt(wt){gt({type:Ce.SET_PATH,payload:wt})}var St={\u6700\u540E\u901A\u5173\u4EE3\u7801:"\u901A\u8FC7\u4E86\u672C\u9898\uFF0C\u5728\u4F5C\u4E1A\u65F6\u95F4\u5185\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u7684\u901A\u5173\u4EE3\u7801",\u6700\u65B0\u4EE3\u7801:"\u672A\u901A\u8FC7\u672C\u9898\uFF0C\u5C55\u793A\u6700\u540E\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\u8BE6\u60C5",\u622A\u6B62\u540E\u901A\u5173\u4EE3\u7801:"\u5728\u4F5C\u4E1A\u65F6\u95F4\u7ED3\u675F\u540E\u901A\u5173\u8BE5\u9898\u7684\u4EE3\u7801\u8BE6\u60C5"};return console.log(qe,22),n.a.createElement(n.a.Fragment,null,n.a.createElement("h2",null," ",n.a.createElement("span",null,$e,$e&&n.a.createElement("span",{className:"ml5 font12 c-grey-999"},St[$e])),nt&&n.a.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",nt),n.a.createElement("span",null,n.a.createElement(se.a,{style:{width:200},value:pt,onChange:vt}," ",Re.map(function(wt){return n.a.createElement(ee,{key:wt,value:wt},wt)})," "))," "),(pt==null?void 0:pt.split(".")[1])==="md"&&n.a.createElement(oe.a,{height:300,autoHeight:Ct,defaultValue:(qe==null||((Ie=qe.filter(function(wt){return wt.path===pt}))===null||Ie===void 0||((Pe=Ie[0])===null||Pe===void 0))?void 0:Pe.content)||"",className:ie.a.md}),(pt==null?void 0:pt.split(".")[1])!=="md"&&n.a.createElement(te.b,{height:300,language:at.language,value:(qe==null||((Qe=qe.filter(function(wt){return wt.path===pt}))===null||Qe===void 0||((tt=Qe[0])===null||tt===void 0))?void 0:tt.content)||"",autoHeight:Ct,theme:"default",options:de}))},et=N("ErOA"),st=function(Ie){var Pe=Ie.shixunHomeworks,Qe=Ie.autoHeight,tt=Ie.dispatch,mt=Pe.shixunWorkReport,Bt=mt.stage_list,Et=mt.work_id,Ct=Object(g.i)(),nt=Object(X.c)(),qe=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:120},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail"},{title:"\u8BC4\u6D4B\u8017\u65F6(S)",dataIndex:"ts_time"},{title:"\u5185\u5B58\u6D88\u8017(MB)",dataIndex:"ts_mem"}];function $e(rt,gt){return Re.apply(this,arguments)}function Re(){return Re=Object(i.a)(w.a.mark(function rt(gt,pt){var at,vt;return w.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return at=Bt[gt].challenge_id,wt.next=3,tt({type:"shixunHomeworks/changeScore",payload:{categoryId:Ct.homeworkId,type:"report",score:pt,challenge_id:at}});case 3:return vt=wt.sent,wt.next=6,tt({type:"shixunHomeworks/getShixunWorkReport",payload:Object(v.a)({},Ct)});case 6:vt.status===0&&f.b.success("\u64CD\u4F5C\u6210\u529F");case 7:case"end":return wt.stop()}},rt)})),Re.apply(this,arguments)}function Ne(rt,gt){return Object(et.c)("student_works/".concat(Et,"/rep_passed_content.json"),{path:gt,game_id:rt})}var ct=Object(ne.p)(5,mt.shixun_detail);return n.a.createElement(n.a.Fragment,null,ct==null?void 0:ct.map(function(rt,gt){return n.a.createElement("div",{key:gt},rt.map(function(pt,at){var vt;return n.a.createElement("aside",{className:"pl30 pr30",key:at},n.a.createElement("div",{className:"".concat(De.a.shixunTitle," mt10")},n.a.createElement("div",null,n.a.createElement("span",{className:"fa fa-code "}),n.a.createElement("strong",{className:"c-black"},"\u7B2C",gt*5+at+1,"\u5173"," ",n.a.createElement(P.a,{className:"c-black",to:"/tasks/".concat(pt.game_identifier)},pt.subject))),nt?n.a.createElement("span",null,"\u8C03\u5206\uFF1A",n.a.createElement($,{className:"game-score",max:Bt[at].game_score_full,defaultValue:Bt[at].game_score,onBlur:function(wt){$e(at,wt)}})):null),n.a.createElement("div",{className:"font16 mt10"},pt.st===0&&(pt.path?n.a.createElement("aside",{className:De.a.shixunWrp},n.a.createElement(Ye,{game_codes_cn:pt==null?void 0:pt.game_codes_cn,autoHeight:Qe,path:pt.path,game_id:pt.id,data:pt.game_codes,diff_code_count:pt.diff_code_count,onPathChange:Ne})):"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A"),pt.st===1&&(pt.complete_status===0?"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801":"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A")),n.a.createElement("aside",{className:"mt10 font16"},(vt=pt.outputs)!==null&&vt!==void 0&&vt.length?n.a.createElement(Q.a,{columns:qe,pagination:{hideOnSinglePage:!0},dataSource:pt.outputs}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"))}))}))},ut=Object(U.a)(function(xe){var Ie=xe.shixunHomeworks,Pe=xe.loading,Qe=xe.globalSetting;return{shixunHomeworks:Ie,globalSetting:Qe,loading:Pe.effects}})(st),yt=N("5NDa"),xt=N("5rEg"),je=N("y8nQ"),He=N("Vl3Y"),ot=function(Ie){var Pe=Ie.shixunHomeworks,Qe=Ie.dispatch,tt=Object(C.a)(Ie,["shixunHomeworks","dispatch"]),mt=Object(g.i)(),Bt=Object(p.useState)(!1),Et=Object(B.a)(Bt,2),Ct=Et[0],nt=Et[1],qe=He.a.useForm(),$e=Object(B.a)(qe,1),Re=$e[0];Object(p.useEffect)(function(){var ct,rt,gt,pt;Pe.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Re.setFieldsValue({comment:(ct=Pe.actionTabs.selectArrs)===null||ct===void 0||((rt=ct.data)===null||rt===void 0)?void 0:rt.work_comment,hidden_comment:(gt=Pe.actionTabs.selectArrs)===null||gt===void 0||((pt=gt.data)===null||pt===void 0)?void 0:pt.work_comment_hidden})},[Pe.actionTabs.key]);var Ne=function(){var ct=Object(i.a)(w.a.mark(function rt(){var gt,pt;return w.a.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:return gt=Re.getFieldValue(),vt.next=3,Object(et.a)("/api/student_works/".concat(mt.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:gt.hidden_comment,comment:gt.comment}});case 3:pt=vt.sent,pt.status===0&&(f.b.success("\u8BC4\u9605\u6210\u529F"),Re.resetFields(),Qe({type:"shixunHomeworks/setActionTabs",payload:{}}),Qe({type:"shixunHomeworks/getShixunWorkReport",payload:Object(v.a)({},mt)}));case 5:case"end":return vt.stop()}},rt)}));return function(){return ct.apply(this,arguments)}}();return n.a.createElement(n.a.Fragment,null,n.a.createElement(c.a,{centered:!0,title:"\u66F4\u6539\u70B9\u8BC4",visible:Pe.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(i.a)(w.a.mark(function ct(){var rt;return w.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:rt=Re.getFieldValue(),JSON.stringify(rt)==="{}"||rt.hidden_comment===""&&rt.comment===""?nt(!0):Ne();case 2:case"end":return pt.stop()}},ct)})),onCancel:function(){Qe({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(He.a,{form:Re,onChange:function(){Ct&&nt(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(He.a.Item,{name:"comment"},n.a.createElement(xt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),n.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(He.a.Item,{name:"hidden_comment"},n.a.createElement(xt.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),Ct&&n.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},ht=Object(U.a)(function(xe){var Ie=xe.shixunHomeworks;return{shixunHomeworks:Ie}})(ot),we=N("Xm8N"),he=N("9Bee"),fe=N("XYT7"),ge=N("1n7x"),Te=N.n(ge),me=function(Ie){var Pe,Qe,tt=Ie.shixunHomeworks,mt=Ie.globalSetting,Bt=Ie.loading,Et=Ie.dispatch,Ct=Object(C.a)(Ie,["shixunHomeworks","globalSetting","loading","dispatch"]),nt=Object(p.useState)(Object(v.a)({},Object(g.i)())),qe=Object(B.a)(nt,2),$e=qe[0],Re=qe[1],Ne=Object(g.i)(),ct=Object(p.useState)([]),rt=Object(l.a)(ct),gt=Object(p.useState)({last:!1}),pt=Object(B.a)(gt,2),at=pt[0],vt=pt[1],St=Object(p.useState)({last:!1}),wt=Object(B.a)(St,2),Dt=wt[0],Ar=wt[1],xr=Object(p.useRef)(),_r=Object(p.useRef)(),Ft=Object(p.useState)(!1),er=Object(B.a)(Ft,2),ir=er[0],Kt=er[1],$t=Object(p.useState)(!1),Xt=Object(B.a)($t,2),Xr=Xt[0],Br=Xt[1],be=Object(p.useState)(!1),Be=Object(B.a)(be,2),ke=Be[0],Ze=Be[1],Je=tt.shixunWorkReport,Ot=Object(X.c)(),Lt=Object(p.useState)(new y.a),bt=Object(B.a)(Lt,2),Rt=bt[0],At=bt[1],Ut=Object(p.useState)(0),Gt=Object(B.a)(Ut,2),gr=Gt[0],fr=Gt[1],br=Object(p.useState)([]),Cr=Object(B.a)(br,2),ar=Cr[0],Hr=Cr[1],hr=Object(p.useState)(!1),yr=Object(B.a)(hr,2),mr=yr[0],Dr=yr[1],Rr=Object(p.useState)(!1),jr=Object(B.a)(Rr,2),or=jr[0],Mr=jr[1];Object(p.useEffect)(function(){return Et({type:"globalSetting/footerToggle",payload:!1}),function(){Et({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(p.useEffect)(function(){tt.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&ar.length>0&&cn("all")},[ar]),Object(p.useEffect)(function(){Re(Object(v.a)({},Ne))},[Ct.location.pathname]);var zr=function(){document.body.scrollIntoView()};function Tn(){return Vr.apply(this,arguments)}function Vr(){return Vr=Object(i.a)(w.a.mark(function Er(){var sr,Yt,dr,wr,Or,sn,Kr;return w.a.wrap(function(zn){for(;;)switch(zn.prev=zn.next){case 0:return dr=JSON.parse(sessionStorage.all_student_works_params||"{}"),zn.next=3,Et({type:"shixunHomeworks/getAllStudentWorks",payload:Object(v.a)(Object(v.a)({},$e),dr)});case 3:wr=zn.sent,Hr(wr.all_student_works),Or=(sr=wr.all_student_works)===null||sr===void 0?void 0:sr.map(function(Sn){return String(Sn.student_work_id)}).indexOf($e.homeworkId),Or===((Yt=wr.all_student_works)===null||Yt===void 0?void 0:Yt.length)-1?vt({last:!0}):vt((sn=wr.all_student_works)===null||sn===void 0?void 0:sn[Or+1]),Or===0?Ar({last:!0}):Ar((Kr=wr.all_student_works)===null||Kr===void 0?void 0:Kr[Or-1]);case 8:case"end":return zn.stop()}},Er)})),Vr.apply(this,arguments)}var en=function(){document.querySelectorAll("canvas").forEach(function(sr){(!sr.clientWidth||!sr.clientHeight)&&sr.remove()})},En=function(){xr.current.offsetHeight>62e3?Ze(!1):Ze(!0)},cn=function(){var Er=Object(i.a)(w.a.mark(function sr(Yt){var dr,wr,Or,sn,Kr,Yr;return w.a.wrap(function(Sn){for(;;)switch(Sn.prev=Sn.next){case 0:if(Kr=function(){return Kr=Object(i.a)(w.a.mark(function Yn(){var xn;return w.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Et({type:"shixunHomeworks/getShixunWorkReport",payload:{homeworkId:ar[dr].student_work_id}});case 2:xn=In.sent,zr(),dr++,setTimeout(Object(i.a)(w.a.mark(function Bn(){var Jn,Mn,si,Fn,dn,Un,zt;return w.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:en(),Mn=Rt.folder("".concat(xn==null?void 0:xn.username)),si=document.querySelector("#export-all").children,Fn=Te()(),dn=w.a.mark(function cr(Tr){return w.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,Fn.set(Or).from(si[Tr]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var nn=Object(i.a)(w.a.mark(function Rn(Ir){return w.a.wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:if(!(Tr<si.length-1)){Fr.next=3;break}return Fr.next=3,Ir.addPage();case 3:case"end":return Fr.stop()}},Rn)}));return function(Rn){return nn.apply(this,arguments)}}());case 2:case"end":return vr.stop()}},cr)}),Un=0;case 6:if(!(Un<si.length)){jt.next=11;break}return jt.delegateYield(dn(Un),"t0",8);case 8:Un++,jt.next=6;break;case 11:Mn.file("".concat(ar[dr-1].student_work_user_name).concat(dr,".pdf"),Fn.output("blob")),zt=Mn.folder("\u4EE3\u7801\u6587\u4EF6"),xn==null||((Jn=xn.shixun_detail)===null||Jn===void 0)||Jn.map(function(cr,Tr){var Wr,vr=zt.folder("\u7B2C".concat(Tr+1,"\u5173-").concat(cr.subject,"-").concat(cr.id));cr==null||((Wr=cr.game_codes)===null||Wr===void 0)||Wr.map(function(nn){vr.file("".concat(nn.filename,".txt"),nn==null?void 0:nn.content)})}),wr.update({content:n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},dr),"/",ar==null?void 0:ar.length,n.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),dr==(ar==null?void 0:ar.length)?(wr.destroy(),rn()):sn();case 16:case"end":return jt.stop()}},Bn)})),2200);case 6:case"end":return In.stop()}},Yn)})),Kr.apply(this,arguments)},sn=function(){return Kr.apply(this,arguments)},dr=0,wr=c.a.info({width:460,title:n.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",n.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},dr+1),"/",Yt!=="all"?1:ar==null?void 0:ar.length,n.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:De.a.modal,onOk:function(){}}),Or={margin:[0,0],filename:"".concat(Je.username,".pdf"),html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},!(Yt!=="all"||(ar==null?void 0:ar.length)<2)){Sn.next=12;break}return Sn.delegateYield(w.a.mark(function _n(){var Yn,xn,$r,In,Bn,Jn,Mn;return w.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:en(),zr(),xn=_r.current.children,$r=Te()(),In=Rt.folder("".concat(Je==null?void 0:Je.username)),Bn=w.a.mark(function dn(Un){return w.a.wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return lr.next=2,$r.set(Or).from(xn[Un]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var jt=Object(i.a)(w.a.mark(function cr(Tr){return w.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:if(!(Un<xn.length-1)){vr.next=3;break}return vr.next=3,Tr.addPage();case 3:case"end":return vr.stop()}},cr)}));return function(cr){return jt.apply(this,arguments)}}());case 2:case"end":return lr.stop()}},dn)}),Jn=0;case 7:if(!(Jn<xn.length)){Fn.next=12;break}return Fn.delegateYield(Bn(Jn),"t0",9);case 9:Jn++,Fn.next=7;break;case 12:return Kt(!1),In.file("".concat(Je.username,".pdf"),$r.output("blob"),{base64:!1}),Mn=In.folder("\u4EE3\u7801\u6587\u4EF6"),Je==null||((Yn=Je.shixun_detail)===null||Yn===void 0)||Yn.map(function(dn,Un){var zt,lr=Mn.folder("\u7B2C".concat(Un+1,"\u5173-").concat(dn.subject,"-").concat(dn.id));dn==null||((zt=dn.game_codes)===null||zt===void 0)||zt.map(function(jt){lr.file("".concat(jt.filename,".txt"),jt==null?void 0:jt.content)})}),wr.destroy(),rn(),Fn.abrupt("return",{v:void 0});case 19:case"end":return Fn.stop()}},_n)})(),"t0",7);case 7:if(Yr=Sn.t0,!(typeof Yr=="object")){Sn.next=10;break}return Sn.abrupt("return",Yr.v);case 10:Sn.next=13;break;case 12:sn();case 13:case"end":return Sn.stop()}},sr)}));return function(Yt){return Er.apply(this,arguments)}}(),rn=function(){Rt.generateAsync({type:"blob"}).then(function(sr){var Yt=document.createElement("a");Yt.href=window.URL.createObjectURL(sr),Yt.download=Je.course_name+".zip",document.body.appendChild(Yt);var dr=document.createEvent("MouseEvents");dr.initEvent("click",!1,!1),Yt.dispatchEvent(dr),document.body.removeChild(Yt),At(new y.a)}),Ze(!1)};Object(p.useEffect)(function(){hn()},[$e.homeworkId]);var hn=function(){var Er=Object(i.a)(w.a.mark(function sr(){return w.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return Br(!0),dr.next=3,Et({type:"shixunHomeworks/getShixunWorkReport",payload:Object(v.a)({},$e)});case 3:Br(!1),Object(X.c)()&&Tn();case 5:case"end":return dr.stop()}},sr)}));return function(){return Er.apply(this,arguments)}}(),wn=[{title:"\u5173\u5361",dataIndex:"name",render:function(sr,Yt,dr){return dr+1}},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:function(sr,Yt,dr){return n.a.createElement("div",null,sr,Yt.complete_status===4&&n.a.createElement(ne.g,{status:Yt.complete_status}))}},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time"},{title:"\u4EE3\u7801\u4FEE\u6539\u884C\u6570",dataIndex:"diff_code_count",render:function(sr,Yt,dr){return sr||"- -"}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time"},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"time_consuming"},{title:"\u662F\u5426\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",render:function(sr){return sr?"\u662F":"\u5426"}},{title:"\u7ECF\u9A8C\u503C",dataIndex:"experience",render:function(sr,Yt){return n.a.createElement("div",null,n.a.createElement("span",{className:"c-green"},Yt.myself_experience),"/",sr)}},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:function(sr,Yt){return n.a.createElement("div",null,n.a.createElement("span",{className:"c-green"},sr),"/",Yt.game_score_full)}},{title:"\u8C03\u5206",dataIndex:"game_score",render:function(sr,Yt){return Ot?n.a.createElement($,{max:Yt.game_score_full,defaultValue:parseFloat(sr),onBlur:function(){var dr=Object(i.a)(w.a.mark(function wr(Or){var sn;return w.a.wrap(function(Yr){for(;;)switch(Yr.prev=Yr.next){case 0:return Yr.next=2,Et({type:"shixunHomeworks/changeScore",payload:{categoryId:$e.homeworkId,type:"report",score:Or,challenge_id:Yt.challenge_id}});case 2:return sn=Yr.sent,Yr.next=5,Et({type:"shixunHomeworks/getShixunWorkReport",payload:Object(v.a)({},$e)});case 5:sn.status===0&&f.b.success("\u64CD\u4F5C\u6210\u529F");case 6:case"end":return Yr.stop()}},wr)}));return function(wr){return dr.apply(this,arguments)}}()}):sr}}],Dn=function(sr){Et({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(function(){sr==="next"?U.d.push("/classrooms/".concat($e.coursesId,"/shixun_homework/").concat($e.categoryId,"/").concat(at==null?void 0:at.student_work_id,"/comment")):U.d.push("/classrooms/".concat($e.coursesId,"/shixun_homework/").concat($e.categoryId,"/").concat(Dt==null?void 0:Dt.student_work_id,"/comment"))},200)};return n.a.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},n.a.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},n.a.createElement(H.a,{loading:Xr,active:!0,avatar:{size:40},paragraph:{rows:5}},n.a.createElement("div",{className:"edu-container"},Je.course_id&&n.a.createElement("section",{className:"animated fadeIn"},n.a.createElement("aside",{className:""},Je.category&&n.a.createElement(s.a,{separator:">"},n.a.createElement(s.a.Item,null,n.a.createElement(P.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework")},Je.course_name)),n.a.createElement(s.a.Item,null,n.a.createElement(P.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework/").concat(Je.category.main?"":Je.category.category_id)},Je.category.category_name)),n.a.createElement(s.a.Item,null,n.a.createElement(P.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework/").concat(Je.homework_common_id,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),n.a.createElement(s.a.Item,null,Je.username))),n.a.createElement("aside",{className:[De.a.title1,"mt20"].join(" ")},n.a.createElement(b.a,{align:"middle"},n.a.createElement(A.a,{flex:1},n.a.createElement(P.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework/").concat(Je.homework_common_id,"/detail")},n.a.createElement(I.a,{className:"font16 c-black"})),n.a.createElement("strong",{className:"font20 ml5"},Je.shixun_name),n.a.createElement(ne.m,{temporary:!0,status:Je.homework_status})),n.a.createElement(A.a,{className:De.a.title1_right},Je.view_tpi&&n.a.createElement(E.a,null,n.a.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),n.a.createElement(P.a,{className:"c-black",target:"_blank",to:"/tasks/".concat(Je==null||((Pe=Je.shixun_detail)===null||Pe===void 0||((Qe=Pe[0])===null||Qe===void 0))?void 0:Qe.game_identifier)},"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD")),Object(X.c)()&&Je.homework_end===!1&&!!Je.myshixun_id&&n.a.createElement(E.a,{className:"ml10",onClick:Object(i.a)(w.a.mark(function Er(){return w.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,Et({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:Je.myshixun_identifier}}});case 2:case"end":return Yt.stop()}},Er)}))},n.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),n.a.createElement(E.a,{className:"ml10",onClick:function(){return cn("")},loading:ir},n.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),Object(X.c)()&&(ar==null?void 0:ar.length)>1&&n.a.createElement(E.a,{className:"ml10",onClick:function(){return cn("all")}},n.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),n.a.createElement("aside",{className:"mt30 relative"})),n.a.createElement("aside",{className:"edu-container bg-white",ref:xr},n.a.createElement("div",{id:"export-all",ref:_r},n.a.createElement("div",{id:"export-all-1"},n.a.createElement("div",{className:De.a.title},n.a.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),n.a.createElement("div",null,Object(X.c)()&&n.a.createElement(E.a,{className:"mr20",type:"primary",onClick:function(){Et({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Je.user_id,data:Object(v.a)({},Je)}}})}},n.a.createElement(G.a,null),Je.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),n.a.createElement(_.a,{style:{marginTop:0}}),n.a.createElement(b.a,{className:"pl30 pr30"},n.a.createElement(A.a,null,n.a.createElement("img",{className:De.a.userPic,src:"".concat(J.a.IMG_SERVER,"/images/").concat(Je.image_url),alt:Je.username})),n.a.createElement(A.a,null,n.a.createElement("span",{className:"font16 ml40"},Je.username),n.a.createElement(ne.g,{status:Je.compelete_status}),n.a.createElement("ul",{className:De.a.userInfo},n.a.createElement("li",null,"\u5B66\u53F7\uFF1A",Je.student_id||"--"),n.a.createElement("li",null,"\u5206\u73ED\uFF1A",Je.group_name||"--"),n.a.createElement("br",null),n.a.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",n.a.createElement("span",{className:"c-red"},Je.complete_count),"/",n.a.createElement("span",{className:"c-red"},Je.challenges_count)),n.a.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",n.a.createElement("span",{className:"c-red"},Je.current_complete_count||"-"),"/",n.a.createElement("span",{className:"c-red"},Je.challenges_count)),n.a.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",Je&&Je.efficiency===null?"--":Je&&Je.efficiency),n.a.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",Je&&Je.max_efficiency===null?"--":Je&&Je.max_efficiency))),n.a.createElement("ul",{className:[De.a.listItem,"mt10"].join(" ")},n.a.createElement("li",null,n.a.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),n.a.createElement("div",{className:"c-light-black mt20"},Je&&Je.passed_time===null||Je&&Je.passed_time==="--"?"--":m()(Je&&Je.passed_time).format("YYYY-MM-DD HH:mm"))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",n.a.createElement("i",{onClick:function(sr){sr.stopPropagation(),sr.preventDefault(),Dr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),n.a.createElement("div",{className:"c-light-black mt20"},Je==null?void 0:Je.human_training_time_rules)),n.a.createElement("li",null,n.a.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",n.a.createElement("i",{onClick:function(sr){sr.stopPropagation(),sr.preventDefault(),Mr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),n.a.createElement("div",{className:"c-light-black mt20"},Je.time_consuming)),n.a.createElement("li",null,n.a.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),n.a.createElement("div",{className:"mt20"},Je.evaluate_count)),(Je==null?void 0:Je.eff_score_full)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("li",null,n.a.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},Je.challenge_score),"/",n.a.createElement("span",{className:"c-light-black"},Je.challenge_score_full))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u6548\u7387\u5206"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},Je.eff_score),"/",n.a.createElement("span",{className:"c-light-black"},Je.eff_score_full)))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u8FDF\u4EA4\u6263\u5206"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",null,Je.late_penalty||"- -"))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},Je.work_score),"/",n.a.createElement("span",{className:"c-light-black"},Je.all_work_score))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u603B\u8BC4"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},Je.overall_appraisal))))),n.a.createElement(_.a,{style:{margin:0}}),(Je.work_comment_hidden||Je.work_comment)&&n.a.createElement("div",null,n.a.createElement(b.a,{align:"middle"},n.a.createElement(A.a,{flex:1},n.a.createElement("h1",{className:De.a.title},"\u70B9\u8BC4\u5185\u5BB9")),n.a.createElement(A.a,{className:"pr30"},Object(X.c)()&&n.a.createElement(E.a,{onClick:Object(i.a)(w.a.mark(function Er(){return w.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:c.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:n.a.createElement(K.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(i.a)(w.a.mark(function wr(){var Or;return w.a.wrap(function(Kr){for(;;)switch(Kr.prev=Kr.next){case 0:return Kr.next=2,Object(fe.m)({comment_id:Je.comment_id,homeworkId:$e.homeworkId});case 2:Or=Kr.sent,Or.status===0&&(f.b.success("\u5220\u9664\u6210\u529F"),Et({type:"shixunHomeworks/getShixunWorkReport",payload:Object(v.a)({},$e)}));case 4:case"end":return Kr.stop()}},wr)}))()}});case 1:case"end":return Yt.stop()}},Er)}))},n.a.createElement(D.a,null),"\u5220\u9664"))),n.a.createElement(_.a,{style:{margin:0}}),Je.work_comment&&n.a.createElement("aside",{className:"pl30 pr30 mt20"},n.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement("br",null),n.a.createElement(he.a,{value:Je.work_comment})),Je.work_comment_hidden&&n.a.createElement("aside",{className:"pl30 pr30 mt20"},n.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement("br",null),n.a.createElement(he.a,{value:Je.work_comment_hidden}))),n.a.createElement("h1",{className:De.a.title},"\u9636\u6BB5\u6210\u7EE9"),n.a.createElement("aside",{className:"pl30 pr30"},n.a.createElement(Q.a,{dataSource:Je.stage_list,pagination:!1,columns:wn})),(Je==null?void 0:Je.work_description)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("h1",{className:De.a.title},"\u4E2A\u4EBA\u603B\u7ED3"),n.a.createElement("aside",{className:"pl30 pr30"},n.a.createElement(he.a,{value:Je==null?void 0:Je.work_description}))),n.a.createElement("h1",{className:De.a.title},"\u56FE\u5F62\u7EDF\u8BA1"),n.a.createElement(Le,null),n.a.createElement("h1",{className:De.a.title},"\u5B9E\u8BAD\u8BE6\u60C5")),n.a.createElement(ut,{autoHeight:ke}))),Object(X.c)()&&n.a.createElement("aside",{className:"".concat(De.a.footerBar," ").concat(ir?De.a.footerBarStatic:"")},n.a.createElement("aside",{className:"edu-container"},n.a.createElement(b.a,{align:"middle"},n.a.createElement(A.a,{flex:"1"},n.a.createElement(P.a,{className:De.a.exitComment,to:"/classrooms/".concat($e.coursesId,"/shixun_homework/").concat($e.categoryId,"/detail")},"\u8FD4\u56DE\u5217\u8868")),n.a.createElement(A.a,{flex:"1",className:"tr"},n.a.createElement(E.a,{type:"default",disabled:Dt==null?void 0:Dt.last,onClick:function(){return Dn()}},"\u4E0A\u4E00\u4E2A"),n.a.createElement(E.a,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:at==null?void 0:at.last,onClick:function(){return Dn("next")}},"\u4E0B\u4E00\u4E2A"),Object(X.c)()&&n.a.createElement(E.a,{type:"primary",onClick:Object(i.a)(w.a.mark(function Er(){return w.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:Et({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Je.user_id,data:Object(v.a)({},Je)}}});case 1:case"end":return Yt.stop()}},Er)}))},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),n.a.createElement(ht,null),n.a.createElement(we.a,null),n.a.createElement(c.a,{visible:mr,width:860,centered:!0,onCancel:function(){Dr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},n.a.createElement("div",{style:{color:"#333333",fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),n.a.createElement("br",null),n.a.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),n.a.createElement("br",null),n.a.createElement("span",null," ","\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),n.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," ","\u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5"," "),n.a.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002"," "),n.a.createElement("br",null),n.a.createElement("span",null," ","\u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),n.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," ","\u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5"," "),n.a.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),n.a.createElement("br",null),n.a.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),n.a.createElement(c.a,{visible:or,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:function(){Mr(!1)},width:600},n.a.createElement("div",{style:{fontWeight:400,color:"#333333"}},n.a.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.a.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),n.a.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.a.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),n.a.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.a.createElement("span",{style:{color:"#145DFF"}},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))))},Ee=Ae.default=Object(U.a)(function(xe){var Ie=xe.shixunHomeworks,Pe=xe.loading,Qe=xe.globalSetting;return{shixunHomeworks:Ie,globalSetting:Qe,loading:Pe.effects}})(me)},"6+eU":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return C});var Z=N("wx14"),H=N("rePB"),O=N("VTBJ"),Q=N("1OyB"),M=N("vuIU"),_=N("Ji7U"),R=N("LK+K"),b=N("q1tI"),t=N.n(b),E=N("TSYQ"),a=N.n(E),A=function(w){var p,n="".concat(w.rootPrefixCls,"-item"),d=a()(n,"".concat(n,"-").concat(w.page),(p={},Object(H.a)(p,"".concat(n,"-active"),w.active),Object(H.a)(p,w.className,!!w.className),Object(H.a)(p,"".concat(n,"-disabled"),!w.page),p)),m=function(){w.onClick(w.page)},T=function(g){w.onKeyPress(g,w.onClick,w.page)};return t.a.createElement("li",{title:w.showTitle?w.page:null,className:d,onClick:m,onKeyPress:T,tabIndex:"0"},w.itemRender(w.page,"page",t.a.createElement("a",{rel:"nofollow"},w.page)))},h=A,s={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},o=function(L){Object(_.a)(p,L);var w=Object(R.a)(p);function p(){var n;Object(Q.a)(this,p);for(var d=arguments.length,m=new Array(d),T=0;T<d;T++)m[T]=arguments[T];return n=w.call.apply(w,[this].concat(m)),n.state={goInputText:""},n.buildOptionText=function(y){return"".concat(y," ").concat(n.props.locale.items_per_page)},n.changeSize=function(y){n.props.changeSize(Number(y))},n.handleChange=function(y){n.setState({goInputText:y.target.value})},n.handleBlur=function(y){var g=n.props,U=g.goButton,P=g.quickGo,I=g.rootPrefixCls,G=n.state.goInputText;if(U||G==="")return;if(y.relatedTarget&&(y.relatedTarget.className.indexOf("".concat(I,"-prev"))>=0||y.relatedTarget.className.indexOf("".concat(I,"-next"))>=0))return;n.setState({goInputText:""}),P(n.getValidValue())},n.go=function(y){var g=n.state.goInputText;if(g==="")return;(y.keyCode===s.ENTER||y.type==="click")&&(n.setState({goInputText:""}),n.props.quickGo(n.getValidValue()))},n}return Object(M.a)(p,[{key:"getValidValue",value:function(){var d=this.state,m=d.goInputText,T=d.current;return!m||isNaN(m)?T:Number(m)}},{key:"getPageSizeOptions",value:function(){var d=this.props,m=d.pageSize,T=d.pageSizeOptions;return T.some(function(y){return y.toString()===m.toString()})?T:T.concat([m.toString()]).sort(function(y,g){var U=isNaN(Number(y))?0:Number(y),P=isNaN(Number(g))?0:Number(g);return U-P})}},{key:"render",value:function(){var d=this,m=this.props,T=m.pageSize,y=m.locale,g=m.rootPrefixCls,U=m.changeSize,P=m.quickGo,I=m.goButton,G=m.selectComponentClass,K=m.buildOptionText,D=m.selectPrefixCls,J=m.disabled,X=this.state.goInputText,ne="".concat(g,"-options"),ue=G,Oe=null,_e=null,De=null;if(!U&&!P)return null;var Ue=this.getPageSizeOptions();if(U&&ue){var Ke=Ue.map(function(Le,ae){return t.a.createElement(ue.Option,{key:ae,value:Le.toString()},(K||d.buildOptionText)(Le))});Oe=t.a.createElement(ue,{disabled:J,prefixCls:D,showSearch:!1,className:"".concat(ne,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(T||Ue[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ae){return ae.parentNode}},Ke)}return P&&(I&&(De=typeof I=="boolean"?t.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:J,className:"".concat(ne,"-quick-jumper-button")},y.jump_to_confirm):t.a.createElement("span",{onClick:this.go,onKeyUp:this.go},I)),_e=t.a.createElement("div",{className:"".concat(ne,"-quick-jumper")},y.jump_to,t.a.createElement("input",{disabled:J,type:"text",value:X,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),y.page,De)),t.a.createElement("li",{className:"".concat(ne)},Oe,_e)}}]),p}(t.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var f=o,u=N("N2Kk");function c(){}function i(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function l(L,w,p){return p}function v(L,w,p){var n=typeof L=="undefined"?w.pageSize:L;return Math.floor((p.total-1)/n)+1}var B=function(L){Object(_.a)(p,L);var w=Object(R.a)(p);function p(n){var d;Object(Q.a)(this,p),d=w.call(this,n),d.getJumpPrevPage=function(){return Math.max(1,d.state.current-(d.props.showLessItems?3:5))},d.getJumpNextPage=function(){return Math.min(v(void 0,d.state,d.props),d.state.current+(d.props.showLessItems?3:5))},d.getItemIcon=function(U,P){var I=d.props.prefixCls,G=U||t.a.createElement("button",{type:"button","aria-label":P,className:"".concat(I,"-item-link")});return typeof U=="function"&&(G=t.a.createElement(U,Object(O.a)({},d.props))),G},d.savePaginationNode=function(U){d.paginationNode=U},d.isValid=function(U){return i(U)&&U!==d.state.current},d.shouldDisplayQuickJumper=function(){var U=d.props,P=U.showQuickJumper,I=U.pageSize,G=U.total;return G<=I?!1:P},d.handleKeyDown=function(U){(U.keyCode===s.ARROW_UP||U.keyCode===s.ARROW_DOWN)&&U.preventDefault()},d.handleKeyUp=function(U){var P=d.getValidValue(U),I=d.state.currentInputValue;P!==I&&d.setState({currentInputValue:P}),U.keyCode===s.ENTER?d.handleChange(P):U.keyCode===s.ARROW_UP?d.handleChange(P-1):U.keyCode===s.ARROW_DOWN&&d.handleChange(P+1)},d.changePageSize=function(U){var P=d.state.current,I=v(U,d.state,d.props);P=P>I?I:P,I===0&&(P=d.state.current),typeof U=="number"&&("pageSize"in d.props||d.setState({pageSize:U}),"current"in d.props||d.setState({current:P,currentInputValue:P})),d.props.onShowSizeChange(P,U),"onChange"in d.props&&d.props.onChange&&d.props.onChange(P,U)},d.handleChange=function(U){var P=d.props.disabled,I=U;if(d.isValid(I)&&!P){var G=v(void 0,d.state,d.props);I>G?I=G:I<1&&(I=1),"current"in d.props||d.setState({current:I,currentInputValue:I});var K=d.state.pageSize;return d.props.onChange(I,K),I}return d.state.current},d.prev=function(){d.hasPrev()&&d.handleChange(d.state.current-1)},d.next=function(){d.hasNext()&&d.handleChange(d.state.current+1)},d.jumpPrev=function(){d.handleChange(d.getJumpPrevPage())},d.jumpNext=function(){d.handleChange(d.getJumpNextPage())},d.hasPrev=function(){return d.state.current>1},d.hasNext=function(){return d.state.current<v(void 0,d.state,d.props)},d.runIfEnter=function(U,P){if(U.key==="Enter"||U.charCode===13){for(var I=arguments.length,G=new Array(I>2?I-2:0),K=2;K<I;K++)G[K-2]=arguments[K];P.apply(void 0,G)}},d.runIfEnterPrev=function(U){d.runIfEnter(U,d.prev)},d.runIfEnterNext=function(U){d.runIfEnter(U,d.next)},d.runIfEnterJumpPrev=function(U){d.runIfEnter(U,d.jumpPrev)},d.runIfEnterJumpNext=function(U){d.runIfEnter(U,d.jumpNext)},d.handleGoTO=function(U){(U.keyCode===s.ENTER||U.type==="click")&&d.handleChange(d.state.currentInputValue)};var m=n.onChange!==c,T="current"in n;T&&!m&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var y=n.defaultCurrent;"current"in n&&(y=n.current);var g=n.defaultPageSize;return"pageSize"in n&&(g=n.pageSize),y=Math.min(y,v(g,void 0,n)),d.state={current:y,currentInputValue:y,pageSize:g},d}return Object(M.a)(p,[{key:"componentDidUpdate",value:function(d,m){var T=this.props.prefixCls;if(m.current!==this.state.current&&this.paginationNode){var y=this.paginationNode.querySelector(".".concat(T,"-item-").concat(m.current));y&&document.activeElement===y&&y.blur()}}},{key:"getValidValue",value:function(d){var m=d.target.value,T=v(void 0,this.state,this.props),y=this.state.currentInputValue,g;return m===""?g=m:isNaN(Number(m))?g=y:m>=T?g=T:g=Number(m),g}},{key:"getShowSizeChanger",value:function(){var d=this.props,m=d.showSizeChanger,T=d.total,y=d.totalBoundaryShowSizeChanger;return typeof m!="undefined"?m:T>y}},{key:"renderPrev",value:function(d){var m=this.props,T=m.prevIcon,y=m.itemRender,g=y(d,"prev",this.getItemIcon(T,"prev page")),U=!this.hasPrev();return Object(b.isValidElement)(g)?Object(b.cloneElement)(g,{disabled:U}):g}},{key:"renderNext",value:function(d){var m=this.props,T=m.nextIcon,y=m.itemRender,g=y(d,"next",this.getItemIcon(T,"next page")),U=!this.hasNext();return Object(b.isValidElement)(g)?Object(b.cloneElement)(g,{disabled:U}):g}},{key:"render",value:function(){var d=this,m=this.props,T=m.prefixCls,y=m.className,g=m.style,U=m.disabled,P=m.hideOnSinglePage,I=m.total,G=m.locale,K=m.showQuickJumper,D=m.showLessItems,J=m.showTitle,X=m.showTotal,ne=m.simple,ue=m.itemRender,Oe=m.showPrevNextJumpers,_e=m.jumpPrevIcon,De=m.jumpNextIcon,Ue=m.selectComponentClass,Ke=m.selectPrefixCls,Le=m.pageSizeOptions,ae=this.state,V=ae.current,$=ae.pageSize,q=ae.currentInputValue;if(P===!0&&I<=$)return null;var se=v(void 0,this.state,this.props),te=[],oe=null,re=null,ie=null,ee=null,de=null,Ce=K&&K.goButton,Me=D?1:2,Ye=V-1>0?V-1:0,et=V+1<se?V+1:se,st=Object.keys(this.props).reduce(function(me,Ee){return(Ee.substr(0,5)==="data-"||Ee.substr(0,5)==="aria-"||Ee==="role")&&(me[Ee]=d.props[Ee]),me},{});if(ne)return Ce&&(typeof Ce=="boolean"?de=t.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},G.jump_to_confirm):de=t.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Ce),de=t.a.createElement("li",{title:J?"".concat(G.jump_to).concat(V,"/").concat(se):null,className:"".concat(T,"-simple-pager")},de)),t.a.createElement("ul",Object(Z.a)({className:a()(T,"".concat(T,"-simple"),Object(H.a)({},"".concat(T,"-disabled"),U),y),style:g,ref:this.savePaginationNode},st),t.a.createElement("li",{title:J?G.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:a()("".concat(T,"-prev"),Object(H.a)({},"".concat(T,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Ye)),t.a.createElement("li",{title:J?"".concat(V,"/").concat(se):null,className:"".concat(T,"-simple-pager")},t.a.createElement("input",{type:"text",value:q,disabled:U,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),t.a.createElement("span",{className:"".concat(T,"-slash")},"/"),se),t.a.createElement("li",{title:J?G.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:a()("".concat(T,"-next"),Object(H.a)({},"".concat(T,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(et)),de);if(se<=3+Me*2){var ut={locale:G,rootPrefixCls:T,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:J,itemRender:ue};se||te.push(t.a.createElement(h,Object(Z.a)({},ut,{key:"noPager",page:se,className:"".concat(T,"-disabled")})));for(var yt=1;yt<=se;yt+=1){var xt=V===yt;te.push(t.a.createElement(h,Object(Z.a)({},ut,{key:yt,page:yt,active:xt})))}}else{var je=D?G.prev_3:G.prev_5,He=D?G.next_3:G.next_5;Oe&&(oe=t.a.createElement("li",{title:J?je:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:a()("".concat(T,"-jump-prev"),Object(H.a)({},"".concat(T,"-jump-prev-custom-icon"),!!_e))},ue(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(_e,"prev page"))),re=t.a.createElement("li",{title:J?He:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:a()("".concat(T,"-jump-next"),Object(H.a)({},"".concat(T,"-jump-next-custom-icon"),!!De))},ue(this.getJumpNextPage(),"jump-next",this.getItemIcon(De,"next page")))),ee=t.a.createElement(h,{locale:G,last:!0,rootPrefixCls:T,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:se,page:se,active:!1,showTitle:J,itemRender:ue}),ie=t.a.createElement(h,{locale:G,rootPrefixCls:T,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:J,itemRender:ue});var ot=Math.max(1,V-Me),ht=Math.min(V+Me,se);V-1<=Me&&(ht=1+Me*2),se-V<=Me&&(ot=se-Me*2);for(var we=ot;we<=ht;we+=1){var he=V===we;te.push(t.a.createElement(h,{locale:G,rootPrefixCls:T,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:we,page:we,active:he,showTitle:J,itemRender:ue}))}V-1>=Me*2&&V!==1+2&&(te[0]=Object(b.cloneElement)(te[0],{className:"".concat(T,"-item-after-jump-prev")}),te.unshift(oe)),se-V>=Me*2&&V!==se-2&&(te[te.length-1]=Object(b.cloneElement)(te[te.length-1],{className:"".concat(T,"-item-before-jump-next")}),te.push(re)),ot!==1&&te.unshift(ie),ht!==se&&te.push(ee)}var fe=null;X&&(fe=t.a.createElement("li",{className:"".concat(T,"-total-text")},X(I,[I===0?0:(V-1)*$+1,V*$>I?I:V*$])));var ge=!this.hasPrev()||!se,Te=!this.hasNext()||!se;return t.a.createElement("ul",Object(Z.a)({className:a()(T,y,Object(H.a)({},"".concat(T,"-disabled"),U)),style:g,unselectable:"unselectable",ref:this.savePaginationNode},st),fe,t.a.createElement("li",{title:J?G.prev_page:null,onClick:this.prev,tabIndex:ge?null:0,onKeyPress:this.runIfEnterPrev,className:a()("".concat(T,"-prev"),Object(H.a)({},"".concat(T,"-disabled"),ge)),"aria-disabled":ge},this.renderPrev(Ye)),te,t.a.createElement("li",{title:J?G.next_page:null,onClick:this.next,tabIndex:Te?null:0,onKeyPress:this.runIfEnterNext,className:a()("".concat(T,"-next"),Object(H.a)({},"".concat(T,"-disabled"),Te)),"aria-disabled":Te},this.renderNext(et)),t.a.createElement(f,{disabled:U,locale:G,rootPrefixCls:T,selectComponentClass:Ue,selectPrefixCls:Ke,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:V,pageSize:$,pageSizeOptions:Le,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ce}))}}],[{key:"getDerivedStateFromProps",value:function(d,m){var T={};if("current"in d&&(T.current=d.current,d.current!==m.current&&(T.currentInputValue=T.current)),"pageSize"in d&&d.pageSize!==m.pageSize){var y=m.current,g=v(d.pageSize,m,d);y=y>g?g:y,"current"in d||(T.current=y,T.currentInputValue=y),T.pageSize=d.pageSize}return T}}]),p}(t.a.Component);B.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:c,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:c,locale:u.a,style:{},itemRender:l,totalBoundaryShowSizeChanger:50};var C=B},"6GrX":function(Ve,Ae,N){var Z=N("mFDi"),H=N("Xnb7"),O=N("bYtY"),Q=O.getContext,M=O.extend,_=O.retrieve2,R=O.retrieve3,b=O.trim,t={},E=0,a=5e3,A=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,h="12px sans-serif",s={};function o(P,I){s[P]=I}function f(P,I){I=I||h;var G=P+":"+I;if(t[G])return t[G];for(var K=(P+"").split(`
|
|
`),D=0,J=0,X=K.length;J<X;J++)D=Math.max(m(K[J],I).width,D);return E>a&&(E=0,t={}),E++,t[G]=D,D}function u(P,I,G,K,D,J,X,ne){return X?i(P,I,G,K,D,J,X,ne):c(P,I,G,K,D,J,ne)}function c(P,I,G,K,D,J,X){var ne=T(P,I,D,J,X),ue=f(P,I);D&&(ue+=D[1]+D[3]);var Oe=ne.outerHeight,_e=l(0,ue,G),De=v(0,Oe,K),Ue=new Z(_e,De,ue,Oe);return Ue.lineHeight=ne.lineHeight,Ue}function i(P,I,G,K,D,J,X,ne){var ue=y(P,{rich:X,truncate:ne,font:I,textAlign:G,textPadding:D,textLineHeight:J}),Oe=ue.outerWidth,_e=ue.outerHeight,De=l(0,Oe,G),Ue=v(0,_e,K);return new Z(De,Ue,Oe,_e)}function l(P,I,G){return G==="right"?P-=I:G==="center"&&(P-=I/2),P}function v(P,I,G){return G==="middle"?P-=I/2:G==="bottom"&&(P-=I),P}function B(P,I,G){var K=I.textPosition,D=I.textDistance,J=G.x,X=G.y;D=D||0;var ne=G.height,ue=G.width,Oe=ne/2,_e="left",De="top";switch(K){case"left":J-=D,X+=Oe,_e="right",De="middle";break;case"right":J+=D+ue,X+=Oe,De="middle";break;case"top":J+=ue/2,X-=D,_e="center",De="bottom";break;case"bottom":J+=ue/2,X+=ne+D,_e="center";break;case"inside":J+=ue/2,X+=Oe,_e="center",De="middle";break;case"insideLeft":J+=D,X+=Oe,De="middle";break;case"insideRight":J+=ue-D,X+=Oe,_e="right",De="middle";break;case"insideTop":J+=ue/2,X+=D,_e="center";break;case"insideBottom":J+=ue/2,X+=ne-D,_e="center",De="bottom";break;case"insideTopLeft":J+=D,X+=D;break;case"insideTopRight":J+=ue-D,X+=D,_e="right";break;case"insideBottomLeft":J+=D,X+=ne-D,De="bottom";break;case"insideBottomRight":J+=ue-D,X+=ne-D,_e="right",De="bottom";break}return P=P||{},P.x=J,P.y=X,P.textAlign=_e,P.textVerticalAlign=De,P}function C(P,I,G){var K={textPosition:P,textDistance:G};return B({},K,I)}function L(P,I,G,K,D){if(!I)return"";var J=(P+"").split(`
|
|
`);D=w(I,G,K,D);for(var X=0,ne=J.length;X<ne;X++)J[X]=p(J[X],D);return J.join(`
|
|
`)}function w(P,I,G,K){K=M({},K),K.font=I;var G=_(G,"...");K.maxIterations=_(K.maxIterations,2);var D=K.minChar=_(K.minChar,0);K.cnCharWidth=f("\u56FD",I);var J=K.ascCharWidth=f("a",I);K.placeholder=_(K.placeholder,"");for(var X=P=Math.max(0,P-1),ne=0;ne<D&&X>=J;ne++)X-=J;var ue=f(G,I);return ue>X&&(G="",ue=0),X=P-ue,K.ellipsis=G,K.ellipsisWidth=ue,K.contentWidth=X,K.containerWidth=P,K}function p(P,I){var G=I.containerWidth,K=I.font,D=I.contentWidth;if(!G)return"";var J=f(P,K);if(J<=G)return P;for(var X=0;;X++){if(J<=D||X>=I.maxIterations){P+=I.ellipsis;break}var ne=X===0?n(P,D,I.ascCharWidth,I.cnCharWidth):J>0?Math.floor(P.length*D/J):0;P=P.substr(0,ne),J=f(P,K)}return P===""&&(P=I.placeholder),P}function n(P,I,G,K){for(var D=0,J=0,X=P.length;J<X&&D<I;J++){var ne=P.charCodeAt(J);D+=0<=ne&&ne<=127?G:K}return J}function d(P){return f("\u56FD",P)}function m(P,I){return s.measureText(P,I)}s.measureText=function(P,I){var G=Q();return G.font=I||h,G.measureText(P)};function T(P,I,G,K,D){P!=null&&(P+="");var J=_(K,d(I)),X=P?P.split(`
|
|
`):[],ne=X.length*J,ue=ne,Oe=!0;if(G&&(ue+=G[0]+G[2]),P&&D){Oe=!1;var _e=D.outerHeight,De=D.outerWidth;if(_e!=null&&ue>_e)P="",X=[];else if(De!=null)for(var Ue=w(De-(G?G[1]+G[3]:0),I,D.ellipsis,{minChar:D.minChar,placeholder:D.placeholder}),Ke=0,Le=X.length;Ke<Le;Ke++)X[Ke]=p(X[Ke],Ue)}return{lines:X,height:ne,outerHeight:ue,lineHeight:J,canCacheByTextString:Oe}}function y(P,I){var G={lines:[],width:0,height:0};if(P!=null&&(P+=""),!P)return G;for(var K=A.lastIndex=0,D;(D=A.exec(P))!=null;){var J=D.index;J>K&&g(G,P.substring(K,J)),g(G,D[2],D[1]),K=A.lastIndex}K<P.length&&g(G,P.substring(K,P.length));var X=G.lines,ne=0,ue=0,Oe=[],_e=I.textPadding,De=I.truncate,Ue=De&&De.outerWidth,Ke=De&&De.outerHeight;_e&&(Ue!=null&&(Ue-=_e[1]+_e[3]),Ke!=null&&(Ke-=_e[0]+_e[2]));for(var Le=0;Le<X.length;Le++){for(var ae=X[Le],V=0,$=0,q=0;q<ae.tokens.length;q++){var se=ae.tokens[q],te=se.styleName&&I.rich[se.styleName]||{},oe=se.textPadding=te.textPadding,re=se.font=te.font||I.font,ie=se.textHeight=_(te.textHeight,d(re));if(oe&&(ie+=oe[0]+oe[2]),se.height=ie,se.lineHeight=R(te.textLineHeight,I.textLineHeight,ie),se.textAlign=te&&te.textAlign||I.textAlign,se.textVerticalAlign=te&&te.textVerticalAlign||"middle",Ke!=null&&ne+se.lineHeight>Ke)return{lines:[],width:0,height:0};se.textWidth=f(se.text,re);var ee=te.textWidth,de=ee==null||ee==="auto";if(typeof ee=="string"&&ee.charAt(ee.length-1)==="%")se.percentWidth=ee,Oe.push(se),ee=0;else{if(de){ee=se.textWidth;var Ce=te.textBackgroundColor,Me=Ce&&Ce.image;Me&&(Me=H.findExistImage(Me),H.isImageReady(Me)&&(ee=Math.max(ee,Me.width*ie/Me.height)))}var Ye=oe?oe[1]+oe[3]:0;ee+=Ye;var et=Ue!=null?Ue-$:null;et!=null&&et<ee&&(!de||et<Ye?(se.text="",se.textWidth=ee=0):(se.text=L(se.text,et-Ye,re,De.ellipsis,{minChar:De.minChar}),se.textWidth=f(se.text,re),ee=se.textWidth+Ye))}$+=se.width=ee,te&&(V=Math.max(V,se.lineHeight))}ae.width=$,ae.lineHeight=V,ne+=V,ue=Math.max(ue,$)}G.outerWidth=G.width=_(I.textWidth,ue),G.outerHeight=G.height=_(I.textHeight,ne),_e&&(G.outerWidth+=_e[1]+_e[3],G.outerHeight+=_e[0]+_e[2]);for(var Le=0;Le<Oe.length;Le++){var se=Oe[Le],st=se.percentWidth;se.width=parseInt(st,10)/100*ue}return G}function g(P,I,G){for(var K=I==="",D=I.split(`
|
|
`),J=P.lines,X=0;X<D.length;X++){var ne=D[X],ue={styleName:G,text:ne,isLineHolder:!ne&&!K};if(X)J.push({tokens:[ue]});else{var Oe=(J[J.length-1]||(J[0]={tokens:[]})).tokens,_e=Oe.length;_e===1&&Oe[0].isLineHolder?Oe[0]=ue:(ne||!_e||K)&&Oe.push(ue)}}}function U(P){var I=(P.fontSize||P.fontFamily)&&[P.fontStyle,P.fontWeight,(P.fontSize||12)+"px",P.fontFamily||"sans-serif"].join(" ");return I&&b(I)||P.textFont||P.font}Ae.DEFAULT_FONT=h,Ae.$override=o,Ae.getWidth=f,Ae.getBoundingRect=u,Ae.adjustTextX=l,Ae.adjustTextY=v,Ae.calculateTextPosition=B,Ae.adjustTextPositionOnRect=C,Ae.truncateText=L,Ae.getLineHeight=d,Ae.measureText=m,Ae.parsePlainText=T,Ae.parseRichText=y,Ae.makeFont=U},"6RRn":function(Ve,Ae,N){"use strict";var Z=N("wCXF"),H=N("n6Qo");N.d(Ae,"b",function(){return H.a});var O=N("IBYe"),Q=N("6eGT"),M=N("hW8S");N.d(Ae,"a",function(){return M.a}),Ae.c=Z.b},"6UM0":function(Ve,Ae,N){var Z,H;(function(){var O;(function(){"use strict";var M=[function(t,E,a){var A=a(1).Beautifier,h=a(5).Options;function s(o,f){var u=new A(o,f);return u.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new h}},function(t,E,a){var A=a(2).Output,h=a(3).Token,s=a(4),o=a(5).Options,f=a(7).Tokenizer,u=a(7).line_starters,c=a(7).positionable_operators,i=a(7).TOKEN;function l(D,J){return J.indexOf(D)!==-1}function v(D){return D.replace(/^\s+/g,"")}function B(D){for(var J={},X=0;X<D.length;X++)J[D[X].replace(/-/g,"_")]=D[X];return J}function C(D,J){return D&&D.type===i.RESERVED&&D.text===J}function L(D,J){return D&&D.type===i.RESERVED&&l(D.text,J)}var w=["case","return","do","if","throw","else","await","break","continue","async"],p=["before-newline","after-newline","preserve-newline"],n=B(p),d=[n.before_newline,n.preserve_newline],m={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function T(D,J){if(J.multiline_frame||J.mode===m.ForInitializer||J.mode===m.Conditional)return;D.remove_indent(J.start_line_index)}function y(D){D=D.replace(s.allLineBreaks,`
|
|
`);for(var J=[],X=D.indexOf(`
|
|
`);X!==-1;)J.push(D.substring(0,X)),D=D.substring(X+1),X=D.indexOf(`
|
|
`);return D.length&&J.push(D),J}function g(D){return D===m.ArrayLiteral}function U(D){return l(D,[m.Expression,m.ForInitializer,m.Conditional])}function P(D,J){for(var X=0;X<D.length;X++){var ne=D[X].trim();if(ne.charAt(0)!==J)return!1}return!0}function I(D,J){for(var X=0,ne=D.length,ue;X<ne;X++)if(ue=D[X],ue&&ue.indexOf(J)!==0)return!1;return!0}function G(D,J){J=J||{},this._source_text=D||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new o(J)}G.prototype.create_flags=function(D,J){var X=0;D&&(X=D.indentation_level,!this._output.just_added_newline()&&D.line_indent_level>X&&(X=D.line_indent_level));var ne={mode:J,parent:D,last_token:D?D.last_token:new h(i.START_BLOCK,""),last_word:D?D.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:X,alignment:0,line_indent_level:D?D.line_indent_level:X,start_line_index:this._output.get_line_number(),ternary_depth:0};return ne},G.prototype._reset=function(D){var J=D.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new A(this._options,J),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(m.BlockStatement);var X=new f(D,this._options);return this._tokens=X.tokenize(),D},G.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var D,J=this._reset(this._source_text),X=this._options.eol;this._options.eol==="auto"&&(X=`
|
|
`,J&&s.lineBreak.test(J||"")&&(X=J.match(s.lineBreak)[0]));for(var ne=this._tokens.next();ne;)this.handle_token(ne),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ne,ne=this._tokens.next();return D=this._output.get_code(X),D},G.prototype.handle_token=function(D,J){D.type===i.START_EXPR?this.handle_start_expr(D):D.type===i.END_EXPR?this.handle_end_expr(D):D.type===i.START_BLOCK?this.handle_start_block(D):D.type===i.END_BLOCK?this.handle_end_block(D):D.type===i.WORD?this.handle_word(D):D.type===i.RESERVED?this.handle_word(D):D.type===i.SEMICOLON?this.handle_semicolon(D):D.type===i.STRING?this.handle_string(D):D.type===i.EQUALS?this.handle_equals(D):D.type===i.OPERATOR?this.handle_operator(D):D.type===i.COMMA?this.handle_comma(D):D.type===i.BLOCK_COMMENT?this.handle_block_comment(D,J):D.type===i.COMMENT?this.handle_comment(D,J):D.type===i.DOT?this.handle_dot(D):D.type===i.EOF?this.handle_eof(D):D.type===i.UNKNOWN?this.handle_unknown(D,J):this.handle_unknown(D,J)},G.prototype.handle_whitespace_and_comments=function(D,J){var X=D.newlines,ne=this._options.keep_array_indentation&&g(this._flags.mode);if(D.comments_before)for(var ue=D.comments_before.next();ue;)this.handle_whitespace_and_comments(ue,J),this.handle_token(ue,J),ue=D.comments_before.next();if(ne)for(var Oe=0;Oe<X;Oe+=1)this.print_newline(Oe>0,J);else if(this._options.max_preserve_newlines&&X>this._options.max_preserve_newlines&&(X=this._options.max_preserve_newlines),this._options.preserve_newlines&&X>1){this.print_newline(!1,J);for(var _e=1;_e<X;_e+=1)this.print_newline(!0,J)}};var K=["async","break","continue","return","throw","yield"];G.prototype.allow_wrap_or_preserved_newline=function(D,J){if(J=J===void 0?!1:J,this._output.just_added_newline())return;var X=this._options.preserve_newlines&&D.newlines||J,ne=l(this._flags.last_token.text,c)||l(D.text,c);if(ne){var ue=l(this._flags.last_token.text,c)&&l(this._options.operator_position,d)||l(D.text,c);X=X&&ue}if(X)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(L(this._flags.last_token,K))return;this._output.set_wrap_point()}},G.prototype.print_newline=function(D,J){if(!J&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var X=this._tokens.peek();this._flags.mode===m.Statement&&!(this._flags.if_block&&C(X,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(D)&&(this._flags.multiline_frame=!0)},G.prototype.print_token_line_indentation=function(D){this._output.just_added_newline()&&(this._options.keep_array_indentation&&D.newlines&&(D.text==="["||g(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(D.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))},G.prototype.print_token=function(D){if(this._output.raw){this._output.add_raw_token(D);return}if(this._options.comma_first&&D.previous&&D.previous.type===i.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(D),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(D),this._output.non_breaking_space=!0,this._output.add_token(D.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},G.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.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))},G.prototype.set_mode=function(D){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,D),this._flags=this.create_flags(this._previous_flags,D),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===m.Statement&&T(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.start_of_object_property=function(){return this._flags.parent.mode===m.ObjectLiteral&&this._flags.mode===m.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"]))},G.prototype.start_of_statement=function(D){var J=!1;return J=J||L(this._flags.last_token,["var","let","const"])&&D.type===i.WORD,J=J||C(this._flags.last_token,"do"),J=J||!(this._flags.parent.mode===m.ObjectLiteral&&this._flags.mode===m.Statement)&&L(this._flags.last_token,K)&&!D.newlines,J=J||C(this._flags.last_token,"else")&&!(C(D,"if")&&!D.comments_before),J=J||this._flags.last_token.type===i.END_EXPR&&(this._previous_flags.mode===m.ForInitializer||this._previous_flags.mode===m.Conditional),J=J||this._flags.last_token.type===i.WORD&&this._flags.mode===m.BlockStatement&&!this._flags.in_case&&!(D.text==="--"||D.text==="++")&&this._last_last_text!=="function"&&D.type!==i.WORD&&D.type!==i.RESERVED,J=J||this._flags.mode===m.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"])),J?(this.set_mode(m.Statement),this.indent(),this.handle_whitespace_and_comments(D,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D,L(D,["do","for","if","while"])),!0):!1},G.prototype.handle_start_expr=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D);var J=m.Expression;if(D.text==="["){if(this._flags.last_token.type===i.WORD||this._flags.last_token.text===")"){L(this._flags.last_token,u)&&(this._output.space_before_token=!0),this.print_token(D),this.set_mode(J),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}J=m.ArrayLiteral,g(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())),l(this._flags.last_token.type,[i.START_EXPR,i.END_EXPR,i.WORD,i.OPERATOR,i.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===i.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,J=m.ForInitializer):l(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,J=m.Conditional):l(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&D.whitespace_before===""?this._output.space_before_token=!1:(l(this._flags.last_token.text,u)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D);else if(this._flags.last_token.type===i.WORD){this._output.space_before_token=!1;var X=this._tokens.peek(-3);if(this._options.space_after_named_function&&X){var ne=this._tokens.peek(-4);L(X,["async","function"])||X.text==="*"&&L(ne,["async","function"])?this._output.space_before_token=!0:this._flags.mode===m.ObjectLiteral?(X.text==="{"||X.text===","||X.text==="*"&&(ne.text==="{"||ne.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(D);(this._flags.last_token.type===i.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(l(this._last_last_text,["function","yield"])||this._flags.mode===m.ObjectLiteral&&l(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===i.START_BLOCK?this.print_newline():(this._flags.last_token.type===i.END_EXPR||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===i.COMMA)&&this.allow_wrap_or_preserved_newline(D,D.newlines),this.print_token(D),this.set_mode(J),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},G.prototype.handle_end_expr=function(D){for(;this._flags.mode===m.Statement;)this.restore_mode();this.handle_whitespace_and_comments(D),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(D,D.text==="]"&&g(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===i.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(D),this.restore_mode(),T(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===m.Conditional&&(this._previous_flags.mode=m.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},G.prototype.handle_start_block=function(D){this.handle_whitespace_and_comments(D);var J=this._tokens.peek(),X=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===i.END_EXPR?(this.set_mode(m.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(m.BlockStatement):X&&(l(X.text,[":",","])&&l(J.type,[i.STRING,i.WORD,i.RESERVED])||l(J.text,["get","set","..."])&&l(X.type,[i.WORD,i.RESERVED]))?l(this._last_last_text,["class","interface"])&&!l(X.text,[":",","])?this.set_mode(m.BlockStatement):this.set_mode(m.ObjectLiteral):this._flags.last_token.type===i.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(m.BlockStatement):l(this._flags.last_token.type,[i.EQUALS,i.START_EXPR,i.COMMA,i.OPERATOR])||L(this._flags.last_token,["return","throw","import","default"])?this.set_mode(m.ObjectLiteral):this.set_mode(m.BlockStatement),this._flags.last_token&&(L(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ne=!J.comments_before&&J.text==="}",ue=ne&&this._flags.last_word==="function"&&this._flags.last_token.type===i.END_EXPR;if(this._options.brace_preserve_inline){var Oe=0,_e=null;this._flags.inline_frame=!0;do if(Oe+=1,_e=this._tokens.peek(Oe-1),_e.newlines){this._flags.inline_frame=!1;break}while(_e.type!==i.EOF&&!(_e.type===i.END_BLOCK&&_e.opened===D))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==i.OPERATOR&&(ue||this._flags.last_token.type===i.EQUALS||L(this._flags.last_token,w)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(g(this._previous_flags.mode)&&(this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.COMMA)&&((this._flags.last_token.type===i.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(D),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==i.OPERATOR&&this._flags.last_token.type!==i.START_EXPR&&(this._flags.last_token.type===i.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(D),this.indent(),!ne&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},G.prototype.handle_end_block=function(D){for(this.handle_whitespace_and_comments(D);this._flags.mode===m.Statement;)this.restore_mode();var J=this._flags.last_token.type===i.START_BLOCK;this._flags.inline_frame&&!J?this._output.space_before_token=!0:this._options.brace_style==="expand"?J||this.print_newline():J||(g(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(D)},G.prototype.handle_word=function(D){if(D.type===i.RESERVED){if(l(D.text,["set","get"])&&this._flags.mode!==m.ObjectLiteral)D.type=i.WORD;else if(D.text==="import"&&l(this._tokens.peek().text,["(","."]))D.type=i.WORD;else if(l(D.text,["as","from"])&&!this._flags.import_block)D.type=i.WORD;else if(this._flags.mode===m.ObjectLiteral){var J=this._tokens.peek();J.text===":"&&(D.type=i.WORD)}}if(this.start_of_statement(D)?L(this._flags.last_token,["var","let","const"])&&D.type===i.WORD&&(this._flags.declaration_statement=!0):D.newlines&&!U(this._flags.mode)&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==i.EQUALS&&(this._options.preserve_newlines||!L(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(D),this.print_newline()):this.handle_whitespace_and_comments(D),this._flags.do_block&&!this._flags.do_while)if(C(D,"while")){this._output.space_before_token=!0,this.print_token(D),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(D,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===m.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&L(D,["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(D),this._flags.in_case=!0;return}if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D)),C(D,"function")){(l(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(l(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===i.OPERATOR))&&(!this._output.just_added_blankline()&&!D.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD?L(this._flags.last_token,["get","set","new","export"])||L(this._flags.last_token,K)?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===i.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(U(this._flags.mode)||g(this._flags.mode))||this.print_newline(),this.print_token(D),this._flags.last_word=D.text;return}var X="NONE";if(this._flags.last_token.type===i.END_BLOCK?this._previous_flags.inline_frame?X="SPACE":L(D,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines?X="NEWLINE":(X="SPACE",this._output.space_before_token=!0):X="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&this._flags.mode===m.BlockStatement?X="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&U(this._flags.mode)?X="SPACE":this._flags.last_token.type===i.STRING?X="NEWLINE":this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.last_token.text==="*"&&(l(this._last_last_text,["function","yield"])||this._flags.mode===m.ObjectLiteral&&l(this._last_last_text,["{",","]))?X="SPACE":this._flags.last_token.type===i.START_BLOCK?this._flags.inline_frame?X="SPACE":X="NEWLINE":this._flags.last_token.type===i.END_EXPR&&(this._output.space_before_token=!0,X="NEWLINE"),L(D,u)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?X="SPACE":X="NEWLINE"),L(D,["else","catch","finally"]))if((!(this._flags.last_token.type===i.END_BLOCK&&this._previous_flags.mode===m.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ne=this._output.current_line;ne.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else X==="NEWLINE"?L(this._flags.last_token,w)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&L(D,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==i.END_EXPR?(this._flags.last_token.type!==i.START_EXPR||!L(D,["var","let","const"]))&&this._flags.last_token.text!==":"&&(C(D,"if")&&C(D.previous,"else")?this._output.space_before_token=!0:this.print_newline()):L(D,u)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&g(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():X==="SPACE"&&(this._output.space_before_token=!0);D.previous&&(D.previous.type===i.WORD||D.previous.type===i.RESERVED)&&(this._output.space_before_token=!0),this.print_token(D),this._flags.last_word=D.text,D.type===i.RESERVED&&(D.text==="do"?this._flags.do_block=!0:D.text==="if"?this._flags.if_block=!0:D.text==="import"?this._flags.import_block=!0:this._flags.import_block&&C(D,"from")&&(this._flags.import_block=!1))},G.prototype.handle_semicolon=function(D){this.start_of_statement(D)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(D);for(var J=this._tokens.peek();this._flags.mode===m.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(D)},G.prototype.handle_string=function(D){D.text.startsWith("`")&&D.newlines===0&&D.whitespace_before===""&&(D.previous.text===")"||this._flags.last_token.type===i.WORD)||(this.start_of_statement(D)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(D),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D):D.text.startsWith("`")&&this._flags.last_token.type===i.END_EXPR&&(D.previous.text==="]"||D.previous.text===")")&&D.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(D)},G.prototype.handle_equals=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0},G.prototype.handle_comma=function(D){this.handle_whitespace_and_comments(D,!0),this.print_token(D),this._output.space_before_token=!0,this._flags.declaration_statement?(U(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(D)):this._flags.mode===m.ObjectLiteral||this._flags.mode===m.Statement&&this._flags.parent.mode===m.ObjectLiteral?(this._flags.mode===m.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(D)},G.prototype.handle_operator=function(D){var J=D.text==="*"&&(L(this._flags.last_token,["function","yield"])||l(this._flags.last_token.type,[i.START_BLOCK,i.COMMA,i.END_BLOCK,i.SEMICOLON])),X=l(D.text,["-","+"])&&(l(this._flags.last_token.type,[i.START_BLOCK,i.START_EXPR,i.EQUALS,i.OPERATOR])||l(this._flags.last_token.text,u)||this._flags.last_token.text===",");if(!this.start_of_statement(D)){var ne=!J;this.handle_whitespace_and_comments(D,ne)}if(D.text==="*"&&this._flags.last_token.type===i.DOT){this.print_token(D);return}if(D.text==="::"){this.print_token(D);return}if(this._flags.last_token.type===i.OPERATOR&&l(this._options.operator_position,d)&&this.allow_wrap_or_preserved_newline(D),D.text===":"&&this._flags.in_case){this.print_token(D),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==i.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 ue=!0,Oe=!0,_e=!1;if(D.text===":"?this._flags.ternary_depth===0?ue=!1:(this._flags.ternary_depth-=1,_e=!0):D.text==="?"&&(this._flags.ternary_depth+=1),!X&&!J&&this._options.preserve_newlines&&l(D.text,c)){var De=D.text===":",Ue=De&&_e,Ke=De&&!_e;switch(this._options.operator_position){case n.before_newline:this._output.space_before_token=!Ke,this.print_token(D),(!De||Ue)&&this.allow_wrap_or_preserved_newline(D),this._output.space_before_token=!0;return;case n.after_newline:this._output.space_before_token=!0,!De||Ue?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(D):this._output.space_before_token=!1,this.print_token(D),this._output.space_before_token=!0;return;case n.preserve_newline:Ke||this.allow_wrap_or_preserved_newline(D),ue=!(this._output.just_added_newline()||Ke),this._output.space_before_token=ue,this.print_token(D),this._output.space_before_token=!0;return}}if(J){this.allow_wrap_or_preserved_newline(D),ue=!1;var Le=this._tokens.peek();Oe=Le&&l(Le.type,[i.WORD,i.RESERVED])}else if(D.text==="...")this.allow_wrap_or_preserved_newline(D),ue=this._flags.last_token.type===i.START_BLOCK,Oe=!1;else if(l(D.text,["--","++","!","~"])||X){if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR)&&this.allow_wrap_or_preserved_newline(D),ue=!1,Oe=!1,D.newlines&&(D.text==="--"||D.text==="++"||D.text==="~")){var ae=L(this._flags.last_token,w)&&D.newlines;ae&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ae,!0)}this._flags.last_token.text===";"&&U(this._flags.mode)&&(ue=!0),this._flags.last_token.type===i.RESERVED?ue=!0:this._flags.last_token.type===i.END_EXPR?ue=!(this._flags.last_token.text==="]"&&(D.text==="--"||D.text==="++")):this._flags.last_token.type===i.OPERATOR&&(ue=l(D.text,["--","-","++","+"])&&l(this._flags.last_token.text,["--","-","++","+"]),l(D.text,["+","-"])&&l(this._flags.last_token.text,["--","++"])&&(Oe=!0)),(this._flags.mode===m.BlockStatement&&!this._flags.inline_frame||this._flags.mode===m.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ue,this.print_token(D),this._output.space_before_token=Oe},G.prototype.handle_block_comment=function(D,J){if(this._output.raw){this._output.add_raw_token(D),D.directives&&D.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(D.directives){this.print_newline(!1,J),this.print_token(D),D.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!s.newline.test(D.text)&&!D.newlines){this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0;return}else this.print_block_commment(D,J)},G.prototype.print_block_commment=function(D,J){var X=y(D.text),ne,ue=!1,Oe=!1,_e=D.whitespace_before,De=_e.length;if(this.print_newline(!1,J),this.print_token_line_indentation(D),this._output.add_token(X[0]),this.print_newline(!1,J),X.length>1){for(X=X.slice(1),ue=P(X,"*"),Oe=I(X,_e),ue&&(this._flags.alignment=1),ne=0;ne<X.length;ne++)ue?(this.print_token_line_indentation(D),this._output.add_token(v(X[ne]))):Oe&&X[ne]?(this.print_token_line_indentation(D),this._output.add_token(X[ne].substring(De))):(this._output.current_line.set_indent(-1),this._output.add_token(X[ne])),this.print_newline(!1,J);this._flags.alignment=0}},G.prototype.handle_comment=function(D,J){D.newlines?this.print_newline(!1,J):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(D),this.print_newline(!1,J)},G.prototype.handle_dot=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),L(this._flags.last_token,w)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(D,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(D)},G.prototype.handle_unknown=function(D,J){this.print_token(D),D.text[D.text.length-1]===`
|
|
`&&this.print_newline(!1,J)},G.prototype.handle_eof=function(D){for(;this._flags.mode===m.Statement;)this.restore_mode();this.handle_whitespace_and_comments(D)},t.exports.Beautifier=G},function(t){function E(h){this.__parent=h,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}E.prototype.clone_empty=function(){var h=new E(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},E.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},E.prototype.has_match=function(h){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(h))return!0;return!1},E.prototype.set_indent=function(h,s){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},E.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},E.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},E.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},E.prototype.is_empty=function(){return this.__items.length===0},E.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},E.prototype.push=function(h){this.__items.push(h);var s=h.lastIndexOf(`
|
|
`);s!==-1?this.__character_count=h.length-s:this.__character_count+=h.length},E.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},E.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},E.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},E.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},E.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function a(h,s){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),s=s||"",h.indent_level>0&&(s=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}a.prototype.get_indent_size=function(h,s){var o=this.__base_string_length;return s=s||0,h<0&&(o=0),o+=h*this.__indent_size,o+=s,o},a.prototype.get_indent_string=function(h,s){var o=this.__base_string;return s=s||0,h<0&&(h=0,o=""),s+=h*this.__indent_size,this.__ensure_cache(s),o+=this.__cache[s],o},a.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var h=this.__cache.length,s=0,o="";this.__indent_size&&h>=this.__indent_size&&(s=Math.floor(h/this.__indent_size),h-=s*this.__indent_size,o=new Array(s+1).join(this.__indent_string)),h&&(o+=new Array(h+1).join(" ")),this.__cache.push(o)};function A(h,s){this.__indent_cache=new a(h,s),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new E(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}A.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},A.prototype.get_line_number=function(){return this.__lines.length},A.prototype.get_indent_string=function(h,s){return this.__indent_cache.get_indent_string(h,s)},A.prototype.get_indent_size=function(h,s){return this.__indent_cache.get_indent_size(h,s)},A.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},A.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},A.prototype.get_code=function(h){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
|
|
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
|
|
`);return h!==`
|
|
`&&(o=o.replace(/[\n]/g,h)),o},A.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},A.prototype.set_indent=function(h,s){return h=h||0,s=s||0,this.next_line.set_indent(h,s),this.__lines.length>1?(this.current_line.set_indent(h,s),!0):(this.current_line.set_indent(),!1)},A.prototype.add_raw_token=function(h){for(var s=0;s<h.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},A.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},A.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(" "))},A.prototype.remove_indent=function(h){for(var s=this.__lines.length;h<s;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},A.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&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},A.prototype.just_added_newline=function(){return this.current_line.is_empty()},A.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},A.prototype.ensure_empty_line_above=function(h,s){for(var o=this.__lines.length-2;o>=0;){var f=this.__lines[o];if(f.is_empty())break;if(f.item(0).indexOf(h)!==0&&f.item(-1)!==s){this.__lines.splice(o+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},t.exports.Output=A},function(t){function E(a,A,h,s){this.type=a,this.text=A,this.comments_before=null,this.newlines=h||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}t.exports.Token=E},function(t,E){var a="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",A="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",h="\\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",s="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="(?:\\\\u[0-9a-fA-F]{4}|["+a+h+"])",f="(?:\\\\u[0-9a-fA-F]{4}|["+A+h+s+"])*";E.identifier=new RegExp(o+f,"g"),E.identifierStart=new RegExp(o),E.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+A+h+s+"])+");var u=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;E.newline=/[\n\r\u2028\u2029]/,E.lineBreak=new RegExp(`\r
|
|
|`+E.newline.source),E.allLineBreaks=new RegExp(E.lineBreak.source,"g")},function(t,E,a){var A=a(6).Options,h=["before-newline","after-newline","preserve-newline"];function s(o){A.call(this,o,"js");var f=this.raw_options.brace_style||null;f==="expand-strict"?this.raw_options.brace_style="expand":f==="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 u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var c=0;c<u.length;c++)u[c]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=u[c];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",h),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}s.prototype=new A,t.exports.Options=s},function(t){function E(h,s){this.raw_options=a(h,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}E.prototype._get_array=function(h,s){var o=this.raw_options[h],f=s||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(f=o.concat()):typeof o=="string"&&(f=o.split(/[^a-zA-Z0-9_\/\-]+/)),f},E.prototype._get_boolean=function(h,s){var o=this.raw_options[h],f=o===void 0?!!s:!!o;return f},E.prototype._get_characters=function(h,s){var o=this.raw_options[h],f=s||"";return typeof o=="string"&&(f=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),f},E.prototype._get_number=function(h,s){var o=this.raw_options[h];s=parseInt(s,10),isNaN(s)&&(s=0);var f=parseInt(o,10);return isNaN(f)&&(f=s),f},E.prototype._get_selection=function(h,s,o){var f=this._get_selection_list(h,s,o);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[h]+"'");return f[0]},E.prototype._get_selection_list=function(h,s,o){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[s[0]],!this._is_valid_selection(o,s))throw new Error("Invalid Default Value!");var f=this._get_array(h,o);if(!this._is_valid_selection(f,s))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[h]+"'");return f},E.prototype._is_valid_selection=function(h,s){return h.length&&s.length&&!h.some(function(o){return s.indexOf(o)===-1})};function a(h,s){var o={};h=A(h);var f;for(f in h)f!==s&&(o[f]=h[f]);if(s&&h[s])for(f in h[s])o[f]=h[s][f];return o}function A(h){var s={},o;for(o in h){var f=o.replace(/-/g,"_");s[f]=h[o]}return s}t.exports.Options=E,t.exports.normalizeOpts=A,t.exports.mergeOpts=a},function(t,E,a){var A=a(8).InputScanner,h=a(9).Tokenizer,s=a(9).TOKEN,o=a(13).Directives,f=a(4),u=a(12).Pattern,c=a(14).TemplatablePattern;function i(P,I){return I.indexOf(P)!==-1}var l={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:s.START,RAW:s.RAW,EOF:s.EOF},v=new o(/\/\*/,/\*\//),B=/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\.]/,w=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),p=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";p=p.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),p="\\?\\.(?!\\d) "+p,p=p.replace(/ /g,"|");var n=new RegExp(p),d="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),m=d.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),T=new RegExp("^(?:"+m.join("|")+")$"),y,g=function(P,I){h.call(this,P,I),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var G=new u(this._input),K=new c(this._input).read_options(this._options);this.__patterns={template:K,identifier:K.starting_with(f.identifier).matching(f.identifierMatch),number:G.matching(B),punct:G.matching(n),comment:G.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:G.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:G.matching(/<!--/),html_comment_end:G.matching(/-->/),include:G.starting_with(/#include/).until_after(f.lineBreak),shebang:G.starting_with(/#!/).until_after(f.lineBreak),xml:G.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:K.until(/['\\\n\r\u2028\u2029]/),double_quote:K.until(/["\\\n\r\u2028\u2029]/),template_text:K.until(/[`\\$]/),template_expression:K.until(/[`}\\]/)}};g.prototype=new h,g.prototype._is_comment=function(P){return P.type===l.COMMENT||P.type===l.BLOCK_COMMENT||P.type===l.UNKNOWN},g.prototype._is_opening=function(P){return P.type===l.START_BLOCK||P.type===l.START_EXPR},g.prototype._is_closing=function(P,I){return(P.type===l.END_BLOCK||P.type===l.END_EXPR)&&I&&(P.text==="]"&&I.text==="["||P.text===")"&&I.text==="("||P.text==="}"&&I.text==="{")},g.prototype._reset=function(){y=!1},g.prototype._get_next_token=function(P,I){var G=null;this._readWhitespace();var K=this._input.peek();return K===null?this._create_token(l.EOF,""):(G=G||this._read_non_javascript(K),G=G||this._read_string(K),G=G||this._read_word(P),G=G||this._read_singles(K),G=G||this._read_comment(K),G=G||this._read_regexp(K,P),G=G||this._read_xml(K,P),G=G||this._read_punctuation(),G=G||this._create_token(l.UNKNOWN,this._input.next()),G)},g.prototype._read_word=function(P){var I;if(I=this.__patterns.identifier.read(),I!=="")return I=I.replace(f.allLineBreaks,`
|
|
`),!(P.type===l.DOT||P.type===l.RESERVED&&(P.text==="set"||P.text==="get"))&&T.test(I)?(I==="in"||I==="of")&&(P.type===l.WORD||P.type===l.STRING)?this._create_token(l.OPERATOR,I):this._create_token(l.RESERVED,I):this._create_token(l.WORD,I);if(I=this.__patterns.number.read(),I!=="")return this._create_token(l.WORD,I)},g.prototype._read_singles=function(P){var I=null;return P==="("||P==="["?I=this._create_token(l.START_EXPR,P):P===")"||P==="]"?I=this._create_token(l.END_EXPR,P):P==="{"?I=this._create_token(l.START_BLOCK,P):P==="}"?I=this._create_token(l.END_BLOCK,P):P===";"?I=this._create_token(l.SEMICOLON,P):P==="."&&L.test(this._input.peek(1))?I=this._create_token(l.DOT,P):P===","&&(I=this._create_token(l.COMMA,P)),I&&this._input.next(),I},g.prototype._read_punctuation=function(){var P=this.__patterns.punct.read();if(P!=="")return P==="="?this._create_token(l.EQUALS,P):P==="?."?this._create_token(l.DOT,P):this._create_token(l.OPERATOR,P)},g.prototype._read_non_javascript=function(P){var I="";if(P==="#"){if(this._is_first_token()&&(I=this.__patterns.shebang.read(),I))return this._create_token(l.UNKNOWN,I.trim()+`
|
|
`);if(I=this.__patterns.include.read(),I)return this._create_token(l.UNKNOWN,I.trim()+`
|
|
`);P=this._input.next();var G="#";if(this._input.hasNext()&&this._input.testChar(C)){do P=this._input.next(),G+=P;while(this._input.hasNext()&&P!=="#"&&P!=="=");return P==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(G+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(G+="{}",this._input.next(),this._input.next())),this._create_token(l.WORD,G)}this._input.back()}else if(P==="<"&&this._is_first_token()){if(I=this.__patterns.html_comment_start.read(),I){for(;this._input.hasNext()&&!this._input.testChar(f.newline);)I+=this._input.next();return y=!0,this._create_token(l.COMMENT,I)}}else if(y&&P==="-"&&(I=this.__patterns.html_comment_end.read(),I))return y=!1,this._create_token(l.COMMENT,I);return null},g.prototype._read_comment=function(P){var I=null;if(P==="/"){var G="";if(this._input.peek(1)==="*"){G=this.__patterns.block_comment.read();var K=v.get_directives(G);K&&K.ignore==="start"&&(G+=v.readIgnored(this._input)),G=G.replace(f.allLineBreaks,`
|
|
`),I=this._create_token(l.BLOCK_COMMENT,G),I.directives=K}else this._input.peek(1)==="/"&&(G=this.__patterns.comment.read(),I=this._create_token(l.COMMENT,G))}return I},g.prototype._read_string=function(P){if(P==="`"||P==="'"||P==='"'){var I=this._input.next();return this.has_char_escapes=!1,P==="`"?I+=this._read_string_recursive("`",!0,"${"):I+=this._read_string_recursive(P),this.has_char_escapes&&this._options.unescape_strings&&(I=U(I)),this._input.peek()===P&&(I+=this._input.next()),I=I.replace(f.allLineBreaks,`
|
|
`),this._create_token(l.STRING,I)}return null},g.prototype._allow_regexp_or_xml=function(P){return P.type===l.RESERVED&&i(P.text,["return","case","throw","else","do","typeof","yield"])||P.type===l.END_EXPR&&P.text===")"&&P.opened.previous.type===l.RESERVED&&i(P.opened.previous.text,["if","while","for"])||i(P.type,[l.COMMENT,l.START_EXPR,l.START_BLOCK,l.START,l.END_BLOCK,l.OPERATOR,l.EQUALS,l.EOF,l.SEMICOLON,l.COMMA])},g.prototype._read_regexp=function(P,I){if(P==="/"&&this._allow_regexp_or_xml(I)){for(var G=this._input.next(),K=!1,D=!1;this._input.hasNext()&&(K||D||this._input.peek()!==P)&&!this._input.testChar(f.newline);)G+=this._input.peek(),K?K=!1:(K=this._input.peek()==="\\",this._input.peek()==="["?D=!0:this._input.peek()==="]"&&(D=!1)),this._input.next();return this._input.peek()===P&&(G+=this._input.next(),G+=this._input.read(f.identifier)),this._create_token(l.STRING,G)}return null},g.prototype._read_xml=function(P,I){if(this._options.e4x&&P==="<"&&this._allow_regexp_or_xml(I)){var G="",K=this.__patterns.xml.read_match();if(K){for(var D=K[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),J=D.indexOf("{")===0,X=0;K;){var ne=!!K[1],ue=K[2],Oe=!!K[K.length-1]||ue.slice(0,8)==="![CDATA[";if(!Oe&&(ue===D||J&&ue.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ne?--X:++X),G+=K[0],X<=0)break;K=this.__patterns.xml.read_match()}return K||(G+=this._input.match(/[\s\S]*/g)[0]),G=G.replace(f.allLineBreaks,`
|
|
`),this._create_token(l.STRING,G)}}return null};function U(P){for(var I="",G=0,K=new A(P),D=null;K.hasNext();)if(D=K.match(/([\s]|[^\\]|\\\\)+/g),D&&(I+=D[0]),K.peek()==="\\"){if(K.next(),K.peek()==="x")D=K.match(/x([0-9A-Fa-f]{2})/g);else if(K.peek()==="u")D=K.match(/u([0-9A-Fa-f]{4})/g);else{I+="\\",K.hasNext()&&(I+=K.next());continue}if(!D)return P;if(G=parseInt(D[1],16),G>126&&G<=255&&D[0].indexOf("x")===0)return P;if(G>=0&&G<32){I+="\\"+D[0];continue}else G===34||G===39||G===92?I+="\\"+String.fromCharCode(G):I+=String.fromCharCode(G)}return I}g.prototype._read_string_recursive=function(P,I,G){var K,D;P==="'"?D=this.__patterns.single_quote:P==='"'?D=this.__patterns.double_quote:P==="`"?D=this.__patterns.template_text:P==="}"&&(D=this.__patterns.template_expression);for(var J=D.read(),X="";this._input.hasNext();){if(X=this._input.next(),X===P||!I&&f.newline.test(X)){this._input.back();break}else X==="\\"&&this._input.hasNext()?(K=this._input.peek(),K==="x"||K==="u"?this.has_char_escapes=!0:K==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),X+=this._input.next()):G&&(G==="${"&&X==="$"&&this._input.peek()==="{"&&(X+=this._input.next()),G===X&&(P==="`"?X+=this._read_string_recursive("}",I,"`"):X+=this._read_string_recursive("`",I,"${"),this._input.hasNext()&&(X+=this._input.next())));X+=D.read(),J+=X}return J},t.exports.Tokenizer=g,t.exports.TOKEN=l,t.exports.positionable_operators=w.slice(),t.exports.line_starters=d.slice()},function(t){var E=RegExp.prototype.hasOwnProperty("sticky");function a(A){this.__input=A||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var A=null;return this.hasNext()&&(A=this.__input.charAt(this.__position),this.__position+=1),A},a.prototype.peek=function(A){var h=null;return A=A||0,A+=this.__position,A>=0&&A<this.__input_length&&(h=this.__input.charAt(A)),h},a.prototype.__match=function(A,h){A.lastIndex=h;var s=A.exec(this.__input);return s&&!(E&&A.sticky)&&(s.index!==h&&(s=null)),s},a.prototype.test=function(A,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(A,h):!1},a.prototype.testChar=function(A,h){var s=this.peek(h);return A.lastIndex=0,s!==null&&A.test(s)},a.prototype.match=function(A){var h=this.__match(A,this.__position);return h?this.__position+=h[0].length:h=null,h},a.prototype.read=function(A,h,s){var o="",f;return A&&(f=this.match(A),f&&(o+=f[0])),h&&(f||!A)&&(o+=this.readUntil(h,s)),o},a.prototype.readUntil=function(A,h){var s="",o=this.__position;A.lastIndex=this.__position;var f=A.exec(this.__input);return f?(o=f.index,h&&(o+=f[0].length)):o=this.__input_length,s=this.__input.substring(this.__position,o),this.__position=o,s},a.prototype.readUntilAfter=function(A){return this.readUntil(A,!0)},a.prototype.get_regexp=function(A,h){var s=null,o="g";return h&&E&&(o="y"),typeof A=="string"&&A!==""?s=new RegExp(A,o):A&&(s=new RegExp(A.source,o)),s},a.prototype.get_literal_regexp=function(A){return RegExp(A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(A){var h=this.__position,s=this.readUntilAfter(A);return this.__position=h,s},a.prototype.lookBack=function(A){var h=this.__position-1;return h>=A.length&&this.__input.substring(h-A.length,h).toLowerCase()===A},t.exports.InputScanner=a},function(t,E,a){var A=a(8).InputScanner,h=a(3).Token,s=a(10).TokenStream,o=a(11).WhitespacePattern,f={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(c,i){this._input=new A(c),this._options=i||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var c,i=new h(f.START,""),l=null,v=[],B=new s;i.type!==f.EOF;){for(c=this._get_next_token(i,l);this._is_comment(c);)B.add(c),c=this._get_next_token(i,l);B.isEmpty()||(c.comments_before=B,B=new s),c.parent=l,this._is_opening(c)?(v.push(l),l=c):l&&this._is_closing(c,l)&&(c.opened=l,l.closed=c,l=v.pop(),c.parent=l),c.previous=i,i.next=c,this.__tokens.add(c),i=c}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(c,i){this._readWhitespace();var l=this._input.read(/.+/g);return l?this._create_token(f.RAW,l):this._create_token(f.EOF,"")},u.prototype._is_comment=function(c){return!1},u.prototype._is_opening=function(c){return!1},u.prototype._is_closing=function(c,i){return!1},u.prototype._create_token=function(c,i){var l=new h(c,i,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return l},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=u,t.exports.TOKEN=f},function(t){function E(a){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=a}E.prototype.restart=function(){this.__position=0},E.prototype.isEmpty=function(){return this.__tokens_length===0},E.prototype.hasNext=function(){return this.__position<this.__tokens_length},E.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__tokens[this.__position],this.__position+=1),a},E.prototype.peek=function(a){var A=null;return a=a||0,a+=this.__position,a>=0&&a<this.__tokens_length&&(A=this.__tokens[a]),A},E.prototype.add=function(a){this.__parent_token&&(a.parent=this.__parent_token),this.__tokens.push(a),this.__tokens_length+=1},t.exports.TokenStream=E},function(t,E,a){var A=a(12).Pattern;function h(s,o){A.call(this,s,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}h.prototype=new A,h.prototype.__set_whitespace_patterns=function(s,o){s+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+s+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},h.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var s=this._input.read(this._match_pattern);if(s===" ")this.whitespace_before_token=" ";else if(s){var o=this.__split(this._newline_regexp,s);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return s},h.prototype.matching=function(s,o){var f=this._create();return f.__set_whitespace_patterns(s,o),f._update(),f},h.prototype._create=function(){return new h(this._input,this)},h.prototype.__split=function(s,o){s.lastIndex=0;for(var f=0,u=[],c=s.exec(o);c;)u.push(o.substring(f,c.index)),f=c.index+c[0].length,c=s.exec(o);return f<o.length?u.push(o.substring(f,o.length)):u.push(""),u},t.exports.WhitespacePattern=h},function(t){function E(a,A){this._input=a,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,A&&(this._starting_pattern=this._input.get_regexp(A._starting_pattern,!0),this._match_pattern=this._input.get_regexp(A._match_pattern,!0),this._until_pattern=this._input.get_regexp(A._until_pattern),this._until_after=A._until_after)}E.prototype.read=function(){var a=this._input.read(this._starting_pattern);return(!this._starting_pattern||a)&&(a+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),a},E.prototype.read_match=function(){return this._input.match(this._match_pattern)},E.prototype.until_after=function(a){var A=this._create();return A._until_after=!0,A._until_pattern=this._input.get_regexp(a),A._update(),A},E.prototype.until=function(a){var A=this._create();return A._until_after=!1,A._until_pattern=this._input.get_regexp(a),A._update(),A},E.prototype.starting_with=function(a){var A=this._create();return A._starting_pattern=this._input.get_regexp(a,!0),A._update(),A},E.prototype.matching=function(a){var A=this._create();return A._match_pattern=this._input.get_regexp(a,!0),A._update(),A},E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){},t.exports.Pattern=E},function(t){function E(a,A){a=typeof a=="string"?a:a.source,A=typeof A=="string"?A:A.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+A,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+A,"g")}E.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var A={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(a);h;)A[h[1]]=h[2],h=this.__directive_pattern.exec(a);return A},E.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=E},function(t,E,a){var A=a(12).Pattern,h={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(o,f){A.call(this,o,f),this.__template_pattern=null,this._disabled=Object.assign({},h),this._excluded=Object.assign({},h),f&&(this.__template_pattern=this._input.get_regexp(f.__template_pattern),this._excluded=Object.assign(this._excluded,f._excluded),this._disabled=Object.assign(this._disabled,f._disabled));var u=new A(o);this.__patterns={handlebars_comment:u.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:u.starting_with(/{{{/).until_after(/}}}/),handlebars:u.starting_with(/{{/).until_after(/}}/),php:u.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:u.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:u.starting_with(/{%/).until_after(/%}/),django_value:u.starting_with(/{{/).until_after(/}}/),django_comment:u.starting_with(/{#/).until_after(/#}/),smarty:u.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:u.starting_with(/{\*/).until_after(/\*}/),smarty_literal:u.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new A,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(o){var f=this._create();return f._disabled[o]=!0,f._update(),f},s.prototype.read_options=function(o){var f=this._create();for(var u in h)f._disabled[u]=o.templating.indexOf(u)===-1;return f._update(),f},s.prototype.exclude=function(o){var f=this._create();return f._excluded[o]=!0,f._update(),f},s.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var f=this._read_template();f;)this._match_pattern?f+=this._input.read(this._match_pattern):f+=this._input.readUntil(this.__template_pattern),o+=f,f=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},s.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},s.prototype._read_template=function(){var o="",f=this._input.peek();if(f==="<"){var u=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&u==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&u==="%"&&(o=o||this.__patterns.erb.read())}else f==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},t.exports.TemplatablePattern=s}],_={};function R(t){var E=_[t];if(E!==void 0)return E.exports;var a=_[t]={exports:{}};return M[t](a,a.exports,R),a.exports}var b=R(0);O=b})();var Q=O;!(Z=[],H=function(){return{js_beautify:Q}}.apply(Ae,Z),H!==void 0&&(Ve.exports=H))})()},"6eGT":function(Ve,Ae,N){"use strict";function Z(H){return null}Ae.a=Z},"6fms":function(Ve,Ae,N){var Z=N("SUKs"),H=N("06Qe"),O=N("bYtY"),Q=O.each;function M(t){return parseInt(t,10)}function _(t,E){H.initVML(),this.root=t,this.storage=E;var a=document.createElement("div"),A=document.createElement("div");a.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",A.style.cssText="position:absolute;left:0;top:0;",t.appendChild(a),this._vmlRoot=A,this._vmlViewport=a,this.resize();var h=E.delFromStorage,s=E.addToStorage;E.delFromStorage=function(o){h.call(E,o),o&&(o.onRemove&&o.onRemove(A))},E.addToStorage=function(o){o.onAdd&&o.onAdd(A),s.call(E,o)},this._firstPaint=!0}_.prototype={constructor:_,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var E=this._vmlRoot,a=0;a<t.length;a++){var A=t[a];A.invisible||A.ignore?(A.__alreadyNotVisible||A.onRemove(E),A.__alreadyNotVisible=!0):(A.__alreadyNotVisible&&A.onAdd(E),A.__alreadyNotVisible=!1,A.__dirty&&(A.beforeBrush&&A.beforeBrush(),(A.brushVML||A.brush).call(A,E),A.afterBrush&&A.afterBrush())),A.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(E),this._firstPaint=!1)},resize:function(t,E){var t=t==null?this._getWidth():t,E=E==null?this._getHeight():E;if(this._width!==t||this._height!==E){this._width=t,this._height=E;var a=this._vmlViewport.style;a.width=t+"px",a.height=E+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,E=t.currentStyle;return(t.clientWidth||M(E.width))-M(E.paddingLeft)-M(E.paddingRight)|0},_getHeight:function(){var t=this.root,E=t.currentStyle;return(t.clientHeight||M(E.height))-M(E.paddingTop)-M(E.paddingBottom)|0}};function R(t){return function(){Z('In IE8.0 VML mode painter not support method "'+t+'"')}}Q(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){_.prototype[t]=R(t)});var b=_;Ve.exports=b},"746U":function(Ve,Ae,N){"use strict";N.d(Ae,"f",function(){return Z}),N.d(Ae,"l",function(){return H}),N.d(Ae,"k",function(){return O}),N.d(Ae,"j",function(){return Q}),N.d(Ae,"g",function(){return M}),N.d(Ae,"m",function(){return _}),N.d(Ae,"h",function(){return R}),N.d(Ae,"n",function(){return b}),N.d(Ae,"c",function(){return t}),N.d(Ae,"a",function(){return E}),N.d(Ae,"i",function(){return a}),N.d(Ae,"o",function(){return A}),N.d(Ae,"e",function(){return o}),N.d(Ae,"d",function(){return f}),N.d(Ae,"p",function(){return u}),N.d(Ae,"b",function(){return c});function Z(i){return Array.isArray(i)}function H(i){return typeof i=="string"}function O(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)&&!(i instanceof RegExp)&&!(i instanceof Date)}function Q(i){return typeof i=="number"&&!isNaN(i)}function M(i){return i===!0||i===!1}function _(i){return typeof i=="undefined"}function R(i){return!b(i)}function b(i){return _(i)||i===null}function t(i,l){if(!i)throw new Error(l?`Unexpected type, expected '${l}'`:"Unexpected type")}function E(i){if(b(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function a(i){return typeof i=="function"}function A(i,l){const v=Math.min(i.length,l.length);for(let B=0;B<v;B++)h(i[B],l[B])}function h(i,l){if(H(l)){if(typeof i!==l)throw new Error(`argument does not match constraint: typeof ${l}`)}else if(a(l)){try{if(i instanceof l)return}catch(v){}if(!b(i)&&i.constructor===l)return;if(l.length===1&&l.call(void 0,i)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function s(i){let l=[],v=Object.getPrototypeOf(i);for(;Object.prototype!==v;)l=l.concat(Object.getOwnPropertyNames(v)),v=Object.getPrototypeOf(v);return l}function o(i){const l=[];for(const v of s(i))typeof i[v]=="function"&&l.push(v);return l}function f(i,l){const v=C=>function(){const L=Array.prototype.slice.call(arguments,0);return l(C,L)};let B={};for(const C of i)B[C]=v(C);return B}function u(i){return i===null?void 0:i}function c(i,l="Unreachable"){throw new Error(l)}},"7Cbv":function(Ve,Ae,N){"use strict";var Z=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),H=new Uint8Array(16);function O(){if(!Z)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z(H)}var Q=/^(?:[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 M(h){return typeof h=="string"&&Q.test(h)}for(var _=M,R=[],b=0;b<256;++b)R.push((b+256).toString(16).substr(1));function t(h){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(R[h[s+0]]+R[h[s+1]]+R[h[s+2]]+R[h[s+3]]+"-"+R[h[s+4]]+R[h[s+5]]+"-"+R[h[s+6]]+R[h[s+7]]+"-"+R[h[s+8]]+R[h[s+9]]+"-"+R[h[s+10]]+R[h[s+11]]+R[h[s+12]]+R[h[s+13]]+R[h[s+14]]+R[h[s+15]]).toLowerCase();if(!_(o))throw TypeError("Stringified UUID is invalid");return o}var E=t;function a(h,s,o){h=h||{};var f=h.random||(h.rng||O)();if(f[6]=f[6]&15|64,f[8]=f[8]&63|128,s){o=o||0;for(var u=0;u<16;++u)s[o+u]=f[u];return s}return E(f)}var A=Ae.a=a},"7SHv":function(Ve,Ae,N){var Z=N("LPTA"),H=Z.devicePixelRatio,O=N("bYtY"),Q=N("SUKs"),M=N("mFDi"),_=N("BPZU"),R=N("Xmg4"),b=N("mLcG"),t=N("Dagg"),E=N("ItGF"),a=1e5,A=314159,h=.01,s=.001;function o(w){return parseInt(w,10)}function f(w){return w?w.__builtin__?!0:!(typeof w.resize!="function"||typeof w.refresh!="function"):!1}var u=new M(0,0,0,0),c=new M(0,0,0,0);function i(w,p,n){return u.copy(w.getBoundingRect()),w.transform&&u.applyTransform(w.transform),c.width=p,c.height=n,!u.intersect(c)}function l(w,p){if(w===p)return!1;if(!w||!p||w.length!==p.length)return!0;for(var n=0;n<w.length;n++)if(w[n]!==p[n])return!0;return!1}function v(w,p){for(var n=0;n<w.length;n++){var d=w[n];d.setTransform(p),p.beginPath(),d.buildPath(p,d.shape),p.clip(),d.restoreTransform(p)}}function B(w,p){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+w+"px","height:"+p+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}var C=function(w,p,n){this.type="canvas";var d=!w.nodeName||w.nodeName.toUpperCase()==="CANVAS";this._opts=n=O.extend({},n||{}),this.dpr=n.devicePixelRatio||H,this._singleCanvas=d,this.root=w;var m=w.style;m&&(m["-webkit-tap-highlight-color"]="transparent",m["-webkit-user-select"]=m["user-select"]=m["-webkit-touch-callout"]="none",w.innerHTML=""),this.storage=p;var T=this._zlevelList=[],y=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,d){var U=w.width,P=w.height;n.width!=null&&(U=n.width),n.height!=null&&(P=n.height),this.dpr=n.devicePixelRatio||1,w.width=U*this.dpr,w.height=P*this.dpr,this._width=U,this._height=P;var I=new R(w,this,this.dpr);I.__builtin__=!0,I.initContext(),y[A]=I,I.zlevel=A,T.push(A),this._domRoot=w}else{this._width=this._getSize(0),this._height=this._getSize(1);var g=this._domRoot=B(this._width,this._height);w.appendChild(g)}this._hoverlayer=null,this._hoverElements=[]};C.prototype={constructor:C,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var w=this.getViewportRoot();if(w)return{offsetLeft:w.offsetLeft||0,offsetTop:w.offsetTop||0}},refresh:function(w){var p=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(p,w,this._redrawId);for(var d=0;d<n.length;d++){var m=n[d],T=this._layers[m];if(!T.__builtin__&&T.refresh){var y=d===0?this._backgroundColor:null;T.refresh(y)}}return this.refreshHover(),this},addHover:function(w,p){if(w.__hoverMir)return;var n=new w.constructor({style:w.style,shape:w.shape,z:w.z,z2:w.z2,silent:w.silent});return n.__from=w,w.__hoverMir=n,p&&n.setStyle(p),this._hoverElements.push(n),n},removeHover:function(w){var p=w.__hoverMir,n=this._hoverElements,d=O.indexOf(n,p);d>=0&&n.splice(d,1),w.__hoverMir=null},clearHover:function(w){for(var p=this._hoverElements,n=0;n<p.length;n++){var d=p[n].__from;d&&(d.__hoverMir=null)}p.length=0},refreshHover:function(){var w=this._hoverElements,p=w.length,n=this._hoverlayer;if(n&&n.clear(),!p)return;_(w,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(a));var d={};n.ctx.save();for(var m=0;m<p;){var T=w[m],y=T.__from;if(!(y&&y.__zr)){w.splice(m,1),y.__hoverMir=null,p--;continue}m++,y.invisible||(T.transform=y.transform,T.invTransform=y.invTransform,T.__clipPaths=y.__clipPaths,this._doPaintEl(T,n,!0,d))}n.ctx.restore()},getHoverLayer:function(){return this.getLayer(a)},_paintList:function(w,p,n){if(this._redrawId!==n)return;p=p||!1,this._updateLayerStatus(w);var d=this._doPaintList(w,p);if(this._needsManuallyCompositing&&this._compositeManually(),!d){var m=this;b(function(){m._paintList(w,p,n)})}},_compositeManually:function(){var w=this.getLayer(A).ctx,p=this._domRoot.width,n=this._domRoot.height;w.clearRect(0,0,p,n),this.eachBuiltinLayer(function(d){d.virtual&&w.drawImage(d.dom,0,0,p,n)})},_doPaintList:function(w,p){for(var n=[],d=0;d<this._zlevelList.length;d++){var m=this._zlevelList[d],T=this._layers[m];T.__builtin__&&T!==this._hoverlayer&&(T.__dirty||p)&&n.push(T)}for(var y=!0,g=0;g<n.length;g++){var T=n[g],U=T.ctx,P={};U.save();var I=p?T.__startIndex:T.__drawIndex,G=!p&&T.incremental&&Date.now,K=G&&Date.now(),D=T.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(T.__startIndex===T.__endIndex)T.clear(!1,D);else if(I===T.__startIndex){var J=w[I];(!J.incremental||!J.notClear||p)&&T.clear(!1,D)}I===-1&&(console.error("For some unknown reason. drawIndex is -1"),I=T.__startIndex);for(var X=I;X<T.__endIndex;X++){var ne=w[X];if(this._doPaintEl(ne,T,p,P),ne.__dirty=ne.__dirtyText=!1,G){var ue=Date.now()-K;if(ue>15)break}}T.__drawIndex=X,T.__drawIndex<T.__endIndex&&(y=!1),P.prevElClipPaths&&U.restore(),U.restore()}return E.wxa&&O.each(this._layers,function(Oe){Oe&&Oe.ctx&&Oe.ctx.draw&&Oe.ctx.draw()}),y},_doPaintEl:function(w,p,n,d){var m=p.ctx,T=w.transform;if((p.__dirty||n)&&!w.invisible&&w.style.opacity!==0&&!(T&&!T[0]&&!T[3])&&!(w.culling&&i(w,this._width,this._height))){var y=w.__clipPaths,g=d.prevElClipPaths;(!g||l(y,g))&&(g&&(m.restore(),d.prevElClipPaths=null,d.prevEl=null),y&&(m.save(),v(y,m),d.prevElClipPaths=y)),w.beforeBrush&&w.beforeBrush(m),w.brush(m,d.prevEl||null),d.prevEl=w,w.afterBrush&&w.afterBrush(m)}},getLayer:function(w,p){this._singleCanvas&&!this._needsManuallyCompositing&&(w=A);var n=this._layers[w];return n||(n=new R("zr_"+w,this,this.dpr),n.zlevel=w,n.__builtin__=!0,this._layerConfig[w]?O.merge(n,this._layerConfig[w],!0):this._layerConfig[w-h]&&O.merge(n,this._layerConfig[w-h],!0),p&&(n.virtual=p),this.insertLayer(w,n),n.initContext()),n},insertLayer:function(w,p){var n=this._layers,d=this._zlevelList,m=d.length,T=null,y=-1,g=this._domRoot;if(n[w]){Q("ZLevel "+w+" has been used already");return}if(!f(p)){Q("Layer of zlevel "+w+" is not valid");return}if(m>0&&w>d[0]){for(y=0;y<m-1&&!(d[y]<w&&d[y+1]>w);y++);T=n[d[y]]}if(d.splice(y+1,0,w),n[w]=p,!p.virtual)if(T){var U=T.dom;U.nextSibling?g.insertBefore(p.dom,U.nextSibling):g.appendChild(p.dom)}else g.firstChild?g.insertBefore(p.dom,g.firstChild):g.appendChild(p.dom)},eachLayer:function(w,p){var n=this._zlevelList,d,m;for(m=0;m<n.length;m++)d=n[m],w.call(p,this._layers[d],d)},eachBuiltinLayer:function(w,p){var n=this._zlevelList,d,m,T;for(T=0;T<n.length;T++)m=n[T],d=this._layers[m],d.__builtin__&&w.call(p,d,m)},eachOtherLayer:function(w,p){var n=this._zlevelList,d,m,T;for(T=0;T<n.length;T++)m=n[T],d=this._layers[m],d.__builtin__||w.call(p,d,m)},getLayers:function(){return this._layers},_updateLayerStatus:function(w){this.eachBuiltinLayer(function(P,I){P.__dirty=P.__used=!1});function p(P){m&&(m.__endIndex!==P&&(m.__dirty=!0),m.__endIndex=P)}if(this._singleCanvas)for(var n=1;n<w.length;n++){var d=w[n];if(d.zlevel!==w[n-1].zlevel||d.incremental){this._needsManuallyCompositing=!0;break}}for(var m=null,T=0,y,n=0;n<w.length;n++){var d=w[n],g=d.zlevel,U;y!==g&&(y=g,T=0),d.incremental?(U=this.getLayer(g+s,this._needsManuallyCompositing),U.incremental=!0,T=1):U=this.getLayer(g+(T>0?h:0),this._needsManuallyCompositing),U.__builtin__||Q("ZLevel "+g+" has been used by unkown layer "+U.id),U!==m&&(U.__used=!0,U.__startIndex!==n&&(U.__dirty=!0),U.__startIndex=n,U.incremental?U.__drawIndex=-1:U.__drawIndex=n,p(n),m=U),d.__dirty&&(U.__dirty=!0,U.incremental&&U.__drawIndex<0&&(U.__drawIndex=n))}p(n),this.eachBuiltinLayer(function(P,I){!P.__used&&P.getElementCount()>0&&(P.__dirty=!0,P.__startIndex=P.__endIndex=P.__drawIndex=0),P.__dirty&&P.__drawIndex<0&&(P.__drawIndex=P.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(w){w.clear()},setBackgroundColor:function(w){this._backgroundColor=w},configLayer:function(w,p){if(p){var n=this._layerConfig;n[w]?O.merge(n[w],p,!0):n[w]=p;for(var d=0;d<this._zlevelList.length;d++){var m=this._zlevelList[d];if(m===w||m===w+h){var T=this._layers[m];O.merge(T,n[w],!0)}}}},delLayer:function(w){var p=this._layers,n=this._zlevelList,d=p[w];if(!d)return;d.dom.parentNode.removeChild(d.dom),delete p[w],n.splice(O.indexOf(n,w),1)},resize:function(w,p){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var d=this._opts;if(w!=null&&(d.width=w),p!=null&&(d.height=p),w=this._getSize(0),p=this._getSize(1),n.style.display="",this._width!==w||p!==this._height){n.style.width=w+"px",n.style.height=p+"px";for(var m in this._layers)this._layers.hasOwnProperty(m)&&this._layers[m].resize(w,p);O.each(this._progressiveLayers,function(T){T.resize(w,p)}),this.refresh(!0)}this._width=w,this._height=p}else{if(w==null||p==null)return;this._width=w,this._height=p,this.getLayer(A).resize(w,p)}return this},clearLayer:function(w){var p=this._layers[w];p&&p.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(w){if(w=w||{},this._singleCanvas&&!this._compositeManually)return this._layers[A].dom;var p=new R("image",this,w.pixelRatio||this.dpr);if(p.initContext(),p.clear(!1,w.backgroundColor||this._backgroundColor),w.pixelRatio<=this.dpr){this.refresh();var n=p.dom.width,d=p.dom.height,m=p.ctx;this.eachLayer(function(P){P.__builtin__?m.drawImage(P.dom,0,0,n,d):P.renderToCanvas&&(p.ctx.save(),P.renderToCanvas(p.ctx),p.ctx.restore())})}else for(var T={},y=this.storage.getDisplayList(!0),g=0;g<y.length;g++){var U=y[g];this._doPaintEl(U,p,!0,T)}return p.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(w){var p=this._opts,n=["width","height"][w],d=["clientWidth","clientHeight"][w],m=["paddingLeft","paddingTop"][w],T=["paddingRight","paddingBottom"][w];if(p[n]!=null&&p[n]!=="auto")return parseFloat(p[n]);var y=this.root,g=document.defaultView.getComputedStyle(y);return(y[d]||o(g[n])||o(y.style[n]))-(o(g[m])||0)-(o(g[T])||0)|0},pathToImage:function(w,p){p=p||this.dpr;var n=document.createElement("canvas"),d=n.getContext("2d"),m=w.getBoundingRect(),T=w.style,y=T.shadowBlur*p,g=T.shadowOffsetX*p,U=T.shadowOffsetY*p,P=T.hasStroke()?T.lineWidth:0,I=Math.max(P/2,-g+y),G=Math.max(P/2,g+y),K=Math.max(P/2,-U+y),D=Math.max(P/2,U+y),J=m.width+I+G,X=m.height+K+D;n.width=J*p,n.height=X*p,d.scale(p,p),d.clearRect(0,0,J,X),d.dpr=p;var ne={position:w.position,rotation:w.rotation,scale:w.scale};w.position=[I-m.x,K-m.y],w.rotation=0,w.scale=[1,1],w.updateTransform(),w&&w.brush(d);var ue=t,Oe=new ue({style:{x:0,y:0,image:n}});return ne.position!=null&&(Oe.position=w.position=ne.position),ne.rotation!=null&&(Oe.rotation=w.rotation=ne.rotation),ne.scale!=null&&(Oe.scale=w.scale=ne.scale),Oe}};var L=C;Ve.exports=L},"7ahc":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return v});var Z=N("k1fw"),H=N("0Owb"),O=N("+L6B"),Q=N("2/Rp"),M=N("y8nQ"),_=N("Vl3Y"),R=N("tJVT"),b=N("OaEy"),t=N("2fM7"),E=N("q1tI"),a=N.n(E),A=N("VrN/"),h=N.n(A),s=N("p77/"),o=N.n(s),f=N("c5Ni"),u=N.n(f),c=t.a.Option,i={labelCol:{span:4},wrapperCol:{span:20}},l={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"]};Ae.b=function(B){var C=B.callback,L=B.onCancel,w=Object(E.useState)("python"),p=Object(R.a)(w,2),n=p[0],d=p[1];function m(y){d(l[y][1])}function T(y){C(y)}return a.a.createElement(_.a,Object(H.a)({},i,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:T}),a.a.createElement(_.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},a.a.createElement(t.a,{onChange:m},Object.keys(l).map(function(y){return a.a.createElement(c,{key:y,value:y},l[y][0])}))),a.a.createElement(_.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},a.a.createElement(v,{mode:n})),a.a.createElement("div",{className:"flex-container flex-end"},a.a.createElement(Q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),a.a.createElement(Q.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function v(B){var C=B.value,L=B.onChange,w=B.mode,p=B.options,n=p===void 0?{}:p,d=Object(E.useRef)(),m=Object(E.useState)(),T=Object(R.a)(m,2),y=T[0],g=T[1];return Object(E.useEffect)(function(){if(y){function U(P){var I=P.getValue();L&&L(I)}return y.on("change",U),function(){y.off("change",U)}}},[y,L]),Object(E.useEffect)(function(){y&&y.setOption("mode",w)},[y,w]),Object(E.useEffect)(function(){y&&((C!==y.getValue()||C==="")&&setTimeout(function(){y.setValue(C||" ")},300))},[y,C]),Object(E.useEffect)(function(){if(d.current&&!y){var U=h.a.fromTextArea(d.current,Object(Z.a)({mode:w,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},n));g(U)}},[d.current,y]),a.a.createElement("div",{className:"my-codemirror-container"},a.a.createElement("textarea",{ref:d}))}},"7ixt":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return O});var Z={adjustX:1,adjustY:1},H=[0,0],O={left:{points:["cr","cl"],overflow:Z,offset:[-4,0],targetOffset:H},right:{points:["cl","cr"],overflow:Z,offset:[4,0],targetOffset:H},top:{points:["bc","tc"],overflow:Z,offset:[0,-4],targetOffset:H},bottom:{points:["tc","bc"],overflow:Z,offset:[0,4],targetOffset:H},topLeft:{points:["bl","tl"],overflow:Z,offset:[0,-4],targetOffset:H},leftTop:{points:["tr","tl"],overflow:Z,offset:[-4,0],targetOffset:H},topRight:{points:["br","tr"],overflow:Z,offset:[0,-4],targetOffset:H},rightTop:{points:["tl","tr"],overflow:Z,offset:[4,0],targetOffset:H},bottomRight:{points:["tr","br"],overflow:Z,offset:[0,4],targetOffset:H},rightBottom:{points:["bl","br"],overflow:Z,offset:[4,0],targetOffset:H},bottomLeft:{points:["tl","bl"],overflow:Z,offset:[0,4],targetOffset:H},leftBottom:{points:["br","bl"],overflow:Z,offset:[-4,0],targetOffset:H}},Q=O},"7oTu":function(Ve,Ae,N){var Z=N("IMiH"),H=N("QBsz"),O=H.applyTransform,Q=Z.CMD,M=[[],[],[]],_=Math.sqrt,R=Math.atan2;function b(t,E){var a=t.data,A,h,s,o,f,u,c=Q.M,i=Q.C,l=Q.L,v=Q.R,B=Q.A,C=Q.Q;for(s=0,o=0;s<a.length;){A=a[s++],o=s,h=0;switch(A){case c:h=1;break;case l:h=1;break;case i:h=3;break;case C:h=2;break;case B:var L=E[4],w=E[5],p=_(E[0]*E[0]+E[1]*E[1]),n=_(E[2]*E[2]+E[3]*E[3]),d=R(-E[1]/n,E[0]/p);a[s]*=p,a[s++]+=L,a[s]*=n,a[s++]+=w,a[s++]*=p,a[s++]*=n,a[s++]+=d,a[s++]+=d,s+=2,o=s;break;case v:u[0]=a[s++],u[1]=a[s++],O(u,u,E),a[o++]=u[0],a[o++]=u[1],u[0]+=a[s++],u[1]+=a[s++],O(u,u,E),a[o++]=u[0],a[o++]=u[1]}for(f=0;f<h;f++){var u=M[f];u[0]=a[s++],u[1]=a[s++],O(u,u,E),a[o++]=u[0],a[o++]=u[1]}}}Ve.exports=b},"815F":function(Ve,Ae,N){"use strict";N.d(Ae,"e",function(){return R}),N.d(Ae,"c",function(){return t}),N.d(Ae,"d",function(){return E}),N.d(Ae,"a",function(){return A}),N.d(Ae,"f",function(){return h}),N.d(Ae,"b",function(){return s});var Z=N("KQm4"),H=N("VTBJ"),O=N("Ff2n"),Q=N("Zm9Q"),M=N("Kwbf"),_=N("OZM5");function R(o,f){return o!=null?o:f}function b(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=new Map;function u(c){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(c||[]).forEach(function(l){var v=l.key,B=l.children;Object(M.a)(v!=null,"Tree node must have a certain key: [".concat(i).concat(v,"]"));var C=String(v);Object(M.a)(!f.has(C)||v===null||v===void 0,"Same 'key' exist in the Tree: ".concat(C)),f.set(C,!0),u(B,"".concat(i).concat(C," > "))})}u(o)}function t(o){function f(u){var c=Object(Q.a)(u);return c.map(function(i){if(!Object(_.i)(i))return Object(M.a)(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var l=i.key,v=i.props,B=v.children,C=Object(O.a)(v,["children"]),L=Object(H.a)({key:l},C),w=f(B);return w.length&&(L.children=w),L}).filter(function(i){return i})}return f(o)}function E(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],u=new Set(f===!0?[]:f),c=[];function i(l){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return l.map(function(B,C){var L=Object(_.h)(v?v.pos:"0",C),w=R(B.key,L),p=Object(H.a)(Object(H.a)({},B),{},{parent:v,pos:L,children:null,data:B,isStart:[].concat(Object(Z.a)(v?v.isStart:[]),[C===0]),isEnd:[].concat(Object(Z.a)(v?v.isEnd:[]),[C===l.length-1])});return c.push(p),f===!0||u.has(w)?p.children=i(B.children||[],p):p.children=[],p})}return i(o),c}function a(o,f,u){var c;u?typeof u=="string"?c=function(v){return v[u]}:typeof u=="function"&&(c=function(v){return u(v)}):c=function(v,B){return R(v.key,B)};function i(l,v,B){var C=l?l.children:o,L=l?Object(_.h)(B.pos,v):"0";if(l){var w=c(l,L),p={node:l,index:v,pos:L,key:w,parentPos:B.node?B.pos:null,level:B.level+1};f(p)}C&&C.forEach(function(n,d){i(n,d,{node:l,pos:L,level:B?B.level+1:-1})})}i(null)}function A(o){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=f.initWrapper,c=f.processEntity,i=f.onProcessFinished,l=arguments.length>2?arguments[2]:void 0,v={},B={},C={posEntities:v,keyEntities:B};return u&&(C=u(C)||C),a(o,function(L){var w=L.node,p=L.index,n=L.pos,d=L.key,m=L.parentPos,T=L.level,y={node:w,index:p,key:d,pos:n,level:T},g=R(d,n);v[n]=y,B[g]=y,y.parent=v[m],y.parent&&(y.parent.children=y.parent.children||[],y.parent.children.push(y)),c&&c(y,C)},l),i&&i(C),C}function h(o,f){var u=f.expandedKeys,c=f.selectedKeys,i=f.loadedKeys,l=f.loadingKeys,v=f.checkedKeys,B=f.halfCheckedKeys,C=f.dragOverNodeKey,L=f.dropPosition,w=f.keyEntities,p=w[o],n={eventKey:o,expanded:u.indexOf(o)!==-1,selected:c.indexOf(o)!==-1,loaded:i.indexOf(o)!==-1,loading:l.indexOf(o)!==-1,checked:v.indexOf(o)!==-1,halfChecked:B.indexOf(o)!==-1,pos:String(p?p.pos:""),dragOver:C===o&&L===0,dragOverGapTop:C===o&&L===-1,dragOverGapBottom:C===o&&L===1};return n}function s(o){var f=o.data,u=o.expanded,c=o.selected,i=o.checked,l=o.loaded,v=o.loading,B=o.halfChecked,C=o.dragOver,L=o.dragOverGapTop,w=o.dragOverGapBottom,p=o.pos,n=o.active,d=Object(H.a)(Object(H.a)({},f),{},{expanded:u,selected:c,checked:i,loaded:l,loading:v,halfChecked:B,dragOver:C,dragOverGapTop:L,dragOverGapBottom:w,pos:p,active:n});return"props"in d||Object.defineProperty(d,"props",{get:function(){return Object(M.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),d}},"8EBN":function(Ve,Ae,N){(function(Z){Z(N("VrN/"))})(function(Z){"use strict";Z.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 H=0;H<Z.modeInfo.length;H++){var O=Z.modeInfo[H];O.mimes&&(O.mime=O.mimes[0])}Z.findModeByMIME=function(Q){Q=Q.toLowerCase();for(var M=0;M<Z.modeInfo.length;M++){var _=Z.modeInfo[M];if(_.mime==Q)return _;if(_.mimes){for(var R=0;R<_.mimes.length;R++)if(_.mimes[R]==Q)return _}}if(/\+xml$/.test(Q))return Z.findModeByMIME("application/xml");if(/\+json$/.test(Q))return Z.findModeByMIME("application/json")},Z.findModeByExtension=function(Q){Q=Q.toLowerCase();for(var M=0;M<Z.modeInfo.length;M++){var _=Z.modeInfo[M];if(_.ext){for(var R=0;R<_.ext.length;R++)if(_.ext[R]==Q)return _}}},Z.findModeByFileName=function(Q){for(var M=0;M<Z.modeInfo.length;M++){var _=Z.modeInfo[M];if(_.file&&_.file.test(Q))return _}var R=Q.lastIndexOf("."),b=R>-1&&Q.substring(R+1,Q.length);if(b)return Z.findModeByExtension(b)},Z.findModeByName=function(Q){Q=Q.toLowerCase();for(var M=0;M<Z.modeInfo.length;M++){var _=Z.modeInfo[M];if(_.name.toLowerCase()==Q)return _;if(_.alias){for(var R=0;R<_.alias.length;R++)if(_.alias[R].toLowerCase()==Q)return _}}}})},"8HAY":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return M}),N.d(Ae,"b",function(){return _}),N.d(Ae,"d",function(){return R}),N.d(Ae,"e",function(){return b}),N.d(Ae,"c",function(){return t});var Z=N("MI8n"),H=N("pmY6"),O=N("3/fG"),Q=function(E,a,A,h){function s(o){return o instanceof A?o:new A(function(f){f(o)})}return new(A||(A=Promise))(function(o,f){function u(l){try{i(h.next(l))}catch(v){f(v)}}function c(l){try{i(h.throw(l))}catch(v){f(v)}}function i(l){l.done?o(l.value):s(l.value).then(u,c)}i((h=h.apply(E,a||[])).next())})};class M extends H.a{constructor(E,a="",A="",h=!0,s){super();this._onDidChange=this._register(new Z.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=E,this._label=a,this._cssClass=A,this._enabled=h,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(E){this._setLabel(E)}_setLabel(E){this._label!==E&&(this._label=E,this._onDidChange.fire({label:E}))}get tooltip(){return this._tooltip||""}set tooltip(E){this._setTooltip(E)}_setTooltip(E){this._tooltip!==E&&(this._tooltip=E,this._onDidChange.fire({tooltip:E}))}get class(){return this._cssClass}set class(E){this._setClass(E)}_setClass(E){this._cssClass!==E&&(this._cssClass=E,this._onDidChange.fire({class:E}))}get enabled(){return this._enabled}set enabled(E){this._setEnabled(E)}_setEnabled(E){this._enabled!==E&&(this._enabled=E,this._onDidChange.fire({enabled:E}))}get checked(){return this._checked}set checked(E){this._setChecked(E)}_setChecked(E){this._checked!==E&&(this._checked=E,this._onDidChange.fire({checked:E}))}run(E,a){return Q(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(E))})}}class _ extends H.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new Z.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new Z.b),this.onDidRun=this._onDidRun.event}run(E,a){return Q(this,void 0,void 0,function*(){if(!E.enabled)return;this._onBeforeRun.fire({action:E});let A;try{yield this.runAction(E,a)}catch(h){A=h}this._onDidRun.fire({action:E,error:A})})}runAction(E,a){return Q(this,void 0,void 0,function*(){yield E.run(a)})}}class R extends M{constructor(E){super(R.ID,E,E?"separator text":"separator");this.checked=!1,this.enabled=!1}}R.ID="vs.actions.separator";class b{constructor(E,a,A,h){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=E,this.label=a,this.class=h,this._actions=A}get actions(){return this._actions}dispose(){}run(){return Q(this,void 0,void 0,function*(){})}}class t extends M{constructor(){super(t.ID,O.a("submenu.empty","(empty)"),void 0,!1)}}t.ID="vs.actions.empty"},"8XDt":function(Ve,Ae,N){N("qH13");var Z=N("aX58"),H=Z.registerPainter,O=N("6fms");H("vml",O)},"8hTe":function(Ve,Ae,N){Ve.exports={button:"button___1wy9m"}},"9Bee":function(Ve,Ae,N){"use strict";var Z=N("DYRE"),H=N("zeV3"),O=N("+L6B"),Q=N("2/Rp"),M=N("k1fw"),_=N("9og8"),R=N("tJVT"),b=N("WmNS"),t=N.n(b),E=N("q1tI"),a=N.n(E),A=N("vg9a"),h=N("DlQD"),s=N.n(h),o=N("rUJ1");function f(we,he){var fe=we.match(/^(\s+)(?:```)/);if(fe===null)return he;var ge=fe[1];return he.split(`
|
|
`).map(function(Te){var me=Te.match(/^\s+/);if(me===null)return Te;var Ee=Object(R.a)(me,1),xe=Ee[0];return xe.length>=ge.length?Te.slice(ge.length):Te}).join(`
|
|
`)}var u=[],c=["<ul>"],i=new s.a.Renderer,l=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function v(){u.length=0,c=["<ul>"]}var B={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function C(we,he,fe,ge){if(he>=we.length||we[he].level<=fe)return he;var Te=we[he];ge.push("<li><a href='#"+Te.anchor+"'>"+Te.text+"</a>"),he++;var me=[];return he=C(we,he,Te.level,me),me.length>0&&(ge.push("<ul>"),me.forEach(function(Ee){ge.push(Ee)}),ge.push("</ul>")),ge.push("</li>"),he=C(we,he,fe,ge),he}function L(){return C(u,0,0,c),c.push("</ul>"),c.join("")}var w={heading:function(he){var fe=l.exec(he);if(fe)return{type:"heading",raw:fe[0],depth:fe[1].length,text:fe[2]}},fences:function(he){var fe=this.rules.block.fences.exec(he);if(fe){var ge=fe[0],Te=f(ge,fe[3]||""),me=fe[2]?fe[2].trim():fe[2];if(["latex","katex","math"].indexOf(me)>=0){var Ee=d(),xe=Te;Te=Ee,m[Ee]={type:"block",expression:xe}}return{type:"code",raw:ge,lang:me,text:Te}}}},p=/(?:\${2})([^\n`]+?)(?:\${2})/gi,n=0,d=function(){return"__special_katext_id_".concat(n++,"__")},m={};function T(){return m}function y(){n=0,m={}}function g(we){return we=we.replace(p,function(he,fe){var ge=d();return m[ge]={type:"inline",expression:fe},ge}),we}var U=i.listitem;i.listitem=function(we){return U(g(we))};var P=i.paragraph;i.paragraph=function(we){return P(g(we))};var I=i.tablecell;i.tablecell=function(we,he){return I(g(we),he)},i.code=function(we,he,fe){var ge=(he||"").match(/\S*/)[0];return ge?["latex","katex","math"].indexOf(ge)>=0?"<p class='editormd-tex'>".concat(we,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(he,'">').concat(fe?we:Object(o.escape)(we,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(fe?we:Object(o.escape)(we,!0))+"</code></pre>"},i.heading=function(we,he,fe){var ge=this.options.headerPrefix+fe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return u.push({anchor:ge,level:he,text:we}),"<h"+he+' id="'+ge+'">'+we+"</h"+he+">"},s.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),s.a.use({tokenizer:w,renderer:i});var G=s.a,K=N("SJMd"),D=N("ulZh"),J=N.n(D),X=N("m3rI"),ne=N("Oy/b"),ue=N("p5ED"),Oe=N("ErOA"),_e=N("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 De=function(we,he){return(De=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ge){fe.__proto__=ge}||function(fe,ge){for(var Te in ge)Object.prototype.hasOwnProperty.call(ge,Te)&&(fe[Te]=ge[Te])})(we,he)};function Ue(we,he){if(typeof he!="function"&&he!==null)throw new TypeError("Class extends value "+String(he)+" is not a constructor or null");function fe(){this.constructor=we}De(we,he),we.prototype=he===null?Object.create(he):(fe.prototype=he.prototype,new fe)}function Ke(we,he,fe,ge){return new(fe||(fe=Promise))(function(Te,me){function Ee(Pe){try{Ie(ge.next(Pe))}catch(Qe){me(Qe)}}function xe(Pe){try{Ie(ge.throw(Pe))}catch(Qe){me(Qe)}}function Ie(Pe){var Qe;Pe.done?Te(Pe.value):(Qe=Pe.value,Qe instanceof fe?Qe:new fe(function(tt){tt(Qe)})).then(Ee,xe)}Ie((ge=ge.apply(we,he||[])).next())})}function Le(we,he){var fe,ge,Te,me,Ee={label:0,sent:function(){if(1&Te[0])throw Te[1];return Te[1]},trys:[],ops:[]};return me={next:xe(0),throw:xe(1),return:xe(2)},typeof Symbol=="function"&&(me[Symbol.iterator]=function(){return this}),me;function xe(Ie){return function(Pe){return function(Qe){if(fe)throw new TypeError("Generator is already executing.");for(;Ee;)try{if(fe=1,ge&&(Te=2&Qe[0]?ge.return:Qe[0]?ge.throw||((Te=ge.return)&&Te.call(ge),0):ge.next)&&!(Te=Te.call(ge,Qe[1])).done)return Te;switch(ge=0,Te&&(Qe=[2&Qe[0],Te.value]),Qe[0]){case 0:case 1:Te=Qe;break;case 4:return Ee.label++,{value:Qe[1],done:!1};case 5:Ee.label++,ge=Qe[1],Qe=[0];continue;case 7:Qe=Ee.ops.pop(),Ee.trys.pop();continue;default:if(!(Te=Ee.trys,(Te=Te.length>0&&Te[Te.length-1])||Qe[0]!==6&&Qe[0]!==2)){Ee=0;continue}if(Qe[0]===3&&(!Te||Qe[1]>Te[0]&&Qe[1]<Te[3])){Ee.label=Qe[1];break}if(Qe[0]===6&&Ee.label<Te[1]){Ee.label=Te[1],Te=Qe;break}if(Te&&Ee.label<Te[2]){Ee.label=Te[2],Ee.ops.push(Qe);break}Te[2]&&Ee.ops.pop(),Ee.trys.pop();continue}Qe=he.call(we,Ee)}catch(tt){Qe=[6,tt],ge=0}finally{fe=Te=0}if(5&Qe[0])throw Qe[1];return{value:Qe[0]?Qe[1]:void 0,done:!0}}([Ie,Pe])}}}var ae=function(){function we(){}return we.addKey=function(he){we.key=he},Object.defineProperty(we,"isLicensed",{get:function(){return!!we.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(we.key)},enumerable:!1,configurable:!0}),we}(),V=function(){function we(){}return we.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},we.setAttributes=function(he,fe){for(var ge=0,Te=fe;ge<Te.length;ge++){var me=Te[ge],Ee=me[0],xe=me[1];he.setAttribute(Ee,xe)}},we.createRect=function(he,fe,ge){var Te=document.createElementNS("http://www.w3.org/2000/svg","rect");return Te.setAttribute("width",he.toString()),Te.setAttribute("height",fe.toString()),ge&&we.setAttributes(Te,ge),Te},we.createLine=function(he,fe,ge,Te,me){var Ee=document.createElementNS("http://www.w3.org/2000/svg","line");return Ee.setAttribute("x1",he.toString()),Ee.setAttribute("y1",fe.toString()),Ee.setAttribute("x2",ge.toString()),Ee.setAttribute("y2",Te.toString()),me&&we.setAttributes(Ee,me),Ee},we.createPolygon=function(he,fe){var ge=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ge.setAttribute("points",he),fe&&we.setAttributes(ge,fe),ge},we.createCircle=function(he,fe){var ge=document.createElementNS("http://www.w3.org/2000/svg","circle");return ge.setAttribute("cx",(he/2).toString()),ge.setAttribute("cy",(he/2).toString()),ge.setAttribute("r",he.toString()),fe&&we.setAttributes(ge,fe),ge},we.createEllipse=function(he,fe,ge){var Te=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Te.setAttribute("cx",(he/2).toString()),Te.setAttribute("cy",(fe/2).toString()),Te.setAttribute("rx",(he/2).toString()),Te.setAttribute("ry",(fe/2).toString()),ge&&we.setAttributes(Te,ge),Te},we.createGroup=function(he){var fe=document.createElementNS("http://www.w3.org/2000/svg","g");return he&&we.setAttributes(fe,he),fe},we.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},we.createMarker=function(he,fe,ge,Te,me,Ee,xe){var Ie=document.createElementNS("http://www.w3.org/2000/svg","marker");return we.setAttributes(Ie,[["id",he],["orient",fe],["markerWidth",ge.toString()],["markerHeight",Te.toString()],["refX",me.toString()],["refY",Ee.toString()]]),Ie.appendChild(xe),Ie},we.createText=function(he){var fe=document.createElementNS("http://www.w3.org/2000/svg","text");return fe.setAttribute("x","0"),fe.setAttribute("y","0"),he&&we.setAttributes(fe,he),fe},we.createTSpan=function(he,fe){var ge=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ge.textContent=he,fe&&we.setAttributes(ge,fe),ge},we.createImage=function(he){var fe=document.createElementNS("http://www.w3.org/2000/svg","image");return he&&we.setAttributes(fe,he),fe},we.createPoint=function(he,fe){var ge=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ge.x=he,ge.y=fe,ge},we.createPath=function(he,fe){var ge=document.createElementNS("http://www.w3.org/2000/svg","path");return ge.setAttribute("d",he),fe&&we.setAttributes(ge,fe),ge},we.createElement=function(he,fe){var ge=document.createElementNS("http://www.w3.org/2000/svg",he);return fe&&we.setAttributes(ge,fe),ge},we.getHollowRectanglePath=function(he,fe,ge,Te,me,Ee,xe,Ie){return"M"+he+","+fe+"V"+(fe+Te)+"H"+(he+ge)+"V"+fe+"H"+me+"V"+Ee+"H"+(me+xe)+"V"+(Ee+Ie)+"H"+me+"V"+fe+"Z"},we}(),$=function(){function we(he){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+he+"_"}return Object.defineProperty(we.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(we.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(we.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),we.prototype.addClass=function(he){return this.styleSheet===void 0&&this.addStyleSheet(),he.name=""+this.classNamePrefix+he.localName,this.classes.push(he),this.styleSheet.sheet.insertRule("."+he.name+" {"+he.style+"}",this.styleSheet.sheet.cssRules.length),he},we.prototype.addRule=function(he){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(he),this.styleSheet.sheet.insertRule(he.selector+" {"+he.style+"}",this.styleSheet.sheet.cssRules.length)},we.prototype.addStyleSheet=function(){var he;this.styleSheet=document.createElement("style"),((he=this.styleSheetRoot)!==null&&he!==void 0?he: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 se("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new se("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},we.prototype.removeStyleSheet=function(){var he;this.styleSheet&&(((he=this.styleSheetRoot)!==null&&he!==void 0?he:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},we}(),q=function(we,he){this.selector=we,this.style=he},se=function(we,he){this.localName=we,this.style=he},te=function(){function we(){this.blocks=[],this.display=""}return we.prototype.addButtonBlock=function(he){he.className=this.blockClassName,he.buttonClassName=this.buttonClassName,he.buttonColorsClassName=this.buttonColorsClassName,he.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(he)},we.prototype.addElementBlock=function(he){he.className===void 0&&(he.className=this.blockClassName),this.blocks.push(he)},we.prototype.getUI=function(){var he=document.createElement("div");return he.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,he.style.display=this.display,this.blocks.forEach(function(fe){return he.appendChild(fe.getUI())}),he},we}(),oe=function(){function we(){}return we.prototype.getUI=function(){var he=document.createElement("div");if(he.className=this.className,this.minWidth!==void 0&&(he.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":he.style.justifyContent="flex-start";break;case"center":he.style.justifyContent="center";break;case"end":he.style.justifyContent="flex-end"}return he.style.whiteSpace="nowrap",he},we}(),re=function(we){function he(){var fe=we!==null&&we.apply(this,arguments)||this;return fe.buttons=[],fe}return Ue(he,we),he.prototype.addButton=function(fe){fe.className=this.buttonClassName,fe.colorsClassName=this.buttonColorsClassName,fe.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(fe)},he.prototype.getUI=function(){var fe=we.prototype.getUI.call(this);return this.buttons.forEach(function(ge){return fe.appendChild(ge.getUI())}),fe},he}(oe),ie=function(){function we(he,fe){this._isActive=!1,this._isHidden=!1,this._icon=he,this.title=fe,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(we.prototype,"icon",{get:function(){return this._icon},set:function(he){this._icon=he,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"isActive",{get:function(){return this._isActive},set:function(he){this._isActive=he,this.adjustClassName()},enumerable:!1,configurable:!0}),we.prototype.getUI=function(){var he=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 he.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},we.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,"")))},we.prototype.hide=function(){this._isHidden=!0},we}(),ee=function(we){function he(){var fe=we!==null&&we.apply(this,arguments)||this;return fe.elements=[],fe}return Ue(he,we),he.prototype.addElement=function(fe){this.elements.push(fe)},he.prototype.getUI=function(){var fe=we.prototype.getUI.call(this);return this.elements.forEach(function(ge){return fe.appendChild(ge)}),fe},he}(oe),de=function(){function we(he,fe){this.horizontal=he,this.vertical=fe}return Object.defineProperty(we.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),we.prototype.getVerticalLength=function(he){return he/this.ratio},we.prototype.getHorizontalLength=function(he){return he*this.ratio},we}(),Ce=function(){function we(){}return we.getIcon=function(he,fe){if(he>0&&fe>0){var ge=new de(he,fe),Te=ge.ratio>=1?20:ge.getHorizontalLength(20),me=ge.ratio<1?20:ge.getVerticalLength(20),Ee=document.createElementNS("http://www.w3.org/2000/svg","svg");Ee.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ee.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ee);var xe=V.createDefs();Ee.appendChild(xe);var Ie=V.createElement("clipPath",[["id","text-bg-clip"]]);xe.appendChild(Ie);var Pe=V.createPath(V.getHollowRectanglePath((24-Te)/2,(24-me)/2,Te,me,(24-Te)/2+2,(24-me)/2+2,Te-4,me-4));Ee.appendChild(Pe);var Qe=V.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Qe.appendChild(V.createTSpan(he+":"+fe)),Ee.appendChild(Qe);var tt=Qe.getBBox();V.setAttributes(Qe,[["x",((24-tt.width)/2).toString()],["y",((24-tt.height)/2-tt.y).toString()]]);var mt=V.createPath(V.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(tt.width))/2,(24-Math.ceil(tt.height))/2,Math.ceil(tt.width),Math.ceil(tt.height)));return Ie.appendChild(mt),V.setAttributes(Pe,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ee),Ee.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>'},we}(),Me=function(we){function he(fe,ge,Te){var me=we.call(this,fe,ge)||this;return me.isDropdownOpen=!1,me.onClick=me.dropdownButtonClicked,me.dropdownButtons=Te,me}return Ue(he,we),he.prototype.setupDropdown=function(){var fe=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ge){ge.className=fe.className,ge.colorsClassName=fe.colorsClassName,fe.dropdownBlock.appendChild(ge.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},he.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},he.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},he.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},he.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},he.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},he}(ie),Ye=function(){function we(he,fe){this.GRIP_SIZE=10,this.color=he,this.fillColor=fe,this.visual=V.createGroup(),this.visual.appendChild(V.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(V.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return we.prototype.ownsTarget=function(he){return he===this.visual||he===this.visual.childNodes[0]||he===this.visual.childNodes[1]},we.prototype.setCenter=function(he,fe){this.visual.childNodes.forEach(function(ge){return V.setAttributes(ge,[["cx",he.toString()],["cy",fe.toString()]])})},we}(),et=function(){function we(he,fe,ge,Te){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=he,this.canvasHeight=fe,this.margin=ge,this.container=Te,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(we.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(he){this._aspectRatio=he,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(he){this._isGridVisible=he,this.gridContainer&&V.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(he){this._zoomFactor=he,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),we.prototype.open=function(){var he=this;this.cropShadeElement=V.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=V.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var fe=0;fe<this.numberOfGridLines;fe++)this.horizontalGridLines.push(V.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(V.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ge){return he.gridContainer.appendChild(ge)}),this.verticalGridLines.forEach(function(ge){return he.gridContainer.appendChild(ge)}),this.cropRectElement=V.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Ye(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Ye(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Ye(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Ye(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},we.prototype.setCropRectangle=function(he){this.cropRect=he;var fe=Object.assign({},this.cropRect);this.zoomFactor!==1&&(fe.width=this.cropRect.width*this.zoomFactor,fe.height=this.cropRect.height*this.zoomFactor,fe.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-fe.width/2,fe.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-fe.height/2),V.setAttributes(this.cropRectElement,[["x",fe.x.toString()],["y",fe.y.toString()],["width",fe.width.toString()],["height",fe.height.toString()]]);var ge=fe.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(me,Ee){var xe=fe.y+ge*(Ee+1);V.setAttributes(me,[["x1",""+fe.x],["y1",""+xe],["x2",""+(fe.x+fe.width)],["y2",""+xe]])});var Te=fe.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(me,Ee){var xe=fe.x+Te*(Ee+1);V.setAttributes(me,[["x1",""+xe],["y1",""+fe.y],["x2",""+xe],["y2",""+(fe.y+fe.height)]])}),V.setAttributes(this.cropShadeElement,[["d",V.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,fe.x,fe.y,fe.width,fe.height)]]),this.topLeftGrip.setCenter(fe.x,fe.y),this.topRightGrip.setCenter(fe.x+fe.width,fe.y),this.bottomLeftGrip.setCenter(fe.x,fe.y+fe.height),this.bottomRightGrip.setCenter(fe.x+fe.width,fe.y+fe.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},we.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)},we.prototype.clientToLocalCoordinates=function(he,fe){var ge=this.container.getBoundingClientRect();return{x:he-ge.left+this.margin,y:fe-ge.top+this.margin}},we.prototype.onPointerDown=function(he){this.container.setPointerCapture(he.pointerId),this.previousPoint=this.clientToLocalCoordinates(he.clientX,he.clientY),this.cropRectElement===he.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(he.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(he.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(he.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(he.target)&&(this.activeGrip=this.bottomRightGrip)},we.prototype.onPointerMove=function(he){if(this.isMoving)this.move(this.clientToLocalCoordinates(he.clientX,he.clientY));else if(this.activeGrip){var fe=this.clientToLocalCoordinates(he.clientX,he.clientY);this.resize(fe)}he.preventDefault()},we.prototype.onPointerUp=function(he){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(he.pointerId)},we.prototype.move=function(he){var fe=he.x-this.previousPoint.x,ge=he.y-this.previousPoint.y;this.zoomFactor!==1&&(fe=-fe/this.zoomFactor,ge=-ge/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+fe),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ge),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=he},we.prototype.resize=function(he){var fe=Object.assign({},this.cropRect),ge=he.x-this.previousPoint.x,Te=he.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:fe.x+ge<this.margin&&(ge=this.margin-fe.x),fe.x+=ge,fe.width=this.cropRect.x+this.cropRect.width-fe.x;break;case this.bottomRightGrip:case this.topRightGrip:fe.width+ge>this.canvasWidth*this.zoomFactor&&(ge=this.canvasWidth*this.zoomFactor-fe.width),fe.width+=ge}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(fe.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ge),fe.height=this.aspectRatio.getVerticalLength(fe.width)):(fe.y+=Te,fe.height=this.cropRect.y+this.cropRect.height-fe.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?fe.height=this.aspectRatio.getVerticalLength(fe.width):fe.height+=Te}fe.width<10&&(fe.x=this.cropRect.x,fe.width=10),fe.height<10&&(fe.y=this.cropRect.y,fe.height=10),this.previousPoint=he,fe.x>=this.margin&&fe.y>=this.margin&&fe.x-this.margin+fe.width<=this.canvasWidth&&fe.y-this.margin+fe.height<=this.canvasHeight&&(this.cropRect=fe,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},we.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var he=this.cropRect.x+this.cropRect.width/2,fe=this.cropRect.y+this.cropRect.height/2,ge=this.aspectRatio.getHorizontalLength(this.cropRect.height),Te=this.aspectRatio.getVerticalLength(this.cropRect.width);ge/this.canvasWidth<Te/this.canvasHeight?this.cropRect.width=ge:this.cropRect.height=Te,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=he-this.cropRect.width/2,this.cropRect.y=fe-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)}},we.prototype.getRescaledRect=function(he,fe,ge,Te,me,Ee){var xe=ge/he,Ie=Te/fe;return{x:(me.x-Ee)*xe+Ee,y:(me.y-Ee)*Ie+Ee,width:me.width*xe,height:me.height*Ie}},we.prototype.scaleCanvas=function(he,fe){var ge=this.getRescaledRect(this.canvasWidth,this.canvasHeight,he,fe,this.cropRect,this.margin);this.canvasWidth=he,this.canvasHeight=fe,this.onCropChange&&this.onCropChange(ge),this.setCropRectangle(ge)},we}(),st=function(){function we(he){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=he,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(we.prototype,"angle",{get:function(){return this._angle},set:function(he){this._angle=he,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),we.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},we.prototype.onPointerDown=function(he){this.controlContainer.setPointerCapture(he.pointerId),this.isDragging=!0,this.previousPoint={x:he.clientX,y:he.clientY}},we.prototype.onPointerMove=function(he){this.isDragging&&(this.onAngleChange&&this.onAngleChange((he.clientX-this.previousPoint.x)/5),this.previousPoint.x=he.clientX)},we.prototype.onPointerUp=function(he){this.isDragging&&this.onAngleChange&&this.onAngleChange((he.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(he.pointerId)},we.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var he=this.angleLabelText.getBBox();V.setAttributes(this.angleLabelElement,[["x",((this.width-he.width)/2).toString()],["y",(this.height/2).toString()]])}},we.prototype.positionScaleShape=function(){if(this.scaleShape){var he=this.scaleShape.transform.baseVal.getItem(0);he.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(he,0)}},we.prototype.getVisual=function(){var he=document.createElementNS("http://www.w3.org/2000/svg","svg");he.setAttribute("xmlns","http://www.w3.org/2000/svg"),he.setAttribute("width",this.width+"px"),he.setAttribute("height",this.height+"px"),he.setAttribute("viewBox","0 0 "+this.width+" "+this.height),he.style.flexShrink="0",document.body.appendChild(he);for(var fe="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ge=1;ge<=this.width/5+10;ge++){var Te=ge%5==0?this.height/3:this.height/6;fe+="h4v"+-Te+"h1v"+Te}fe+="v1H0Z",this.scaleShape=V.createPath(fe);var me=V.createTransform();this.scaleShape.transform.baseVal.appendItem(me),he.appendChild(this.scaleShape),this.angleLabelElement=V.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=V.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ee=V.createTSpan("");return Ee.innerHTML="°",this.angleLabelElement.appendChild(Ee),he.appendChild(this.angleLabelElement),document.body.removeChild(he),he},we}(),ut=function(){function we(){this.naturalSize=!1,this.imageType="image/png"}return we.prototype.rasterize=function(he,fe,ge,Te,me,Ee,xe){var Ie=this;return new Promise(function(Pe){var Qe=document.createElement("canvas");Qe.width=he.width.baseVal.value-2*Te,Qe.height=he.height.baseVal.value-2*Te;var tt=1,mt=1;Ie.naturalSize===!0?(tt=fe.naturalWidth/(he.width.baseVal.value-2*Te)/Ee,mt=fe.naturalHeight/(he.height.baseVal.value-2*Te)/xe,Qe.width=fe.naturalWidth/Ee,Qe.height=fe.naturalHeight/xe):Ie.width!==void 0&&Ie.height!==void 0&&(tt=Ie.width/ge.width,mt=Ie.height/ge.height,Qe.width*=tt,Qe.height*=mt);var Bt=Qe.getContext("2d");Bt.translate(Qe.width/2,Qe.height/2),Bt.rotate(me*Math.PI/180),Bt.scale(Ee,xe),Bt.translate(-Qe.width/2,-Qe.height/2),Bt.drawImage(fe,0,0,Qe.width,Qe.height);var Et=document.createElement("canvas");Et.width=ge.width*tt,Et.height=ge.height*mt,Et.getContext("2d").putImageData(Bt.getImageData((ge.x-Te)*tt,(ge.y-Te)*mt,ge.width*tt,ge.height*mt),0,0),Pe(Et.toDataURL(Ie.imageType,Ie.imageQuality))})},we}(),yt=function(){function we(he){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=we.instanceCounter++,this.styles=new $(this.instanceNo),this.target=he,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(we.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(he){this._zoomToCropEnabled=he,he?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(he){this._isGridVisible=he,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"gridLines",{get:function(){return this._gridLines},set:function(he){this._gridLines=he,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(he){this._rotationAngle=he,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"aspectRatio",{get:function(){var he;return(he=this._aspectRatio)!==null&&he!==void 0?he:this.aspectRatios[0]},set:function(he){this._aspectRatio=he},enumerable:!1,configurable:!0}),we.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},we.prototype.show=function(){this.showUI(),this.open()},we.prototype.close=function(he){he===void 0&&(he=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),he||this.closeEventListeners.forEach(function(fe){return fe()}),this._isOpen=!1)},we.prototype.addRenderEventListener=function(he){this.renderEventListeners.push(he)},we.prototype.removeRenderEventListener=function(he){this.renderEventListeners.indexOf(he)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(he),1)},we.prototype.addCloseEventListener=function(he){this.closeEventListeners.push(he)},we.prototype.removeCloseEventListener=function(he){this.closeEventListeners.indexOf(he)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(he),1)},we.prototype.setupResizeObserver=function(){var he=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){he.resize(he.target.clientWidth,he.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))},we.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var he=1*this.target.clientWidth/this.target.clientHeight,fe=this.contentDiv.clientWidth/he>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*he:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ge=fe+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/he;this.resize(fe,ge)}},we.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},we.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",V.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},we.prototype.resize=function(he,fe){this.imageWidth=Math.round(he),this.imageHeight=Math.round(fe),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()},we.prototype.setEditingTarget=function(){var he=document.createElement("canvas");he.width=this.target.naturalWidth,he.height=this.target.naturalHeight,he.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var fe=he.toDataURL();V.setAttributes(this.editingTarget,[["href",fe]]),this.setEditingTargetSize()},we.prototype.setTopLeft=function(){var he=this.target.getBoundingClientRect(),fe=this.editorCanvas.getBoundingClientRect();this.left=he.left-fe.left-this.CANVAS_MARGIN,this.top=he.top-fe.top-this.CANVAS_MARGIN},we.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=V.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=V.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=V.createGroup(),this.editingTargetRotationScaleContainer=V.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var he=V.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(he);var fe=V.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(fe),this.editingTargetContainer=V.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)},we.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},we.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=V.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new et(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()},we.prototype.zoomToCrop=function(){if(this.cropRect){var he=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,fe=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=he+"px "+fe+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-he+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-fe+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},we.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)},we.prototype.cropRectChanged=function(he){this.cropRect=he,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},we.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},we.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"},we.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},we.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 he=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,fe=this.target.offsetTop>he+this.CANVAS_MARGIN?this.target.offsetTop-(he+this.CANVAS_MARGIN):0;this.coverDiv.style.top=fe+"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},we.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},we.prototype.addTopToolbar=function(){var he=this;this.topToolbar=new te,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 fe=new re;fe.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(fe);var ge=[];this.aspectRatios.forEach(function(mt){var Bt=new ie(Ce.getIcon(mt.horizontal,mt.vertical),mt.horizontal===0&&mt.vertical===0?"FREE":mt.horizontal+":"+mt.vertical);Bt.onClick=function(){return he.ratioButtonClicked(mt)},ge.push(Bt)}),this.aspectRatioButton=new Me(Ce.getIcon(0,0),"Aspect ratio",ge),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,fe.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Te=new ie('<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");Te.isActive=this.isGridVisible,Te.onClick=function(){he.isGridVisible=!he.isGridVisible,Te.isActive=he.isGridVisible},fe.addButton(Te);var me=new ie('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(me.isActive=this.zoomToCropEnabled,me.onClick=function(){he.zoomToCropEnabled=!he.zoomToCropEnabled,me.isActive=he.zoomToCropEnabled},fe.addButton(me),!ae.isLicensed){var Ee=new ee;this.topToolbar.addElementBlock(Ee);var xe=document.createElement("div");xe.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ie=document.createElement("a");Ie.style.color="currentColor",Ie.href="https://markerjs.com/products/cropro",Ie.target="_blank",Ie.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>',xe.appendChild(Ie),Ee.addElement(xe)}var Pe=new re;Pe.minWidth=3*this.toolbarHeight+"px",Pe.contentAlign="end",this.topToolbar.addButtonBlock(Pe);var Qe=new ie('<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");Qe.onClick=this.startRenderAndClose,Pe.addButton(Qe),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Qe.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var tt=new ie('<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");tt.onClick=this.close,Pe.addButton(tt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(tt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},we.prototype.addBottomToolbar=function(){var he=this;this.bottomToolbar=new te,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 fe=new re;fe.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(fe);var ge=new ie('<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");ge.onClick=this.rotateLeftButtonClicked,fe.addButton(ge);var Te=new ie('<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");Te.onClick=this.rotateRightButtonClicked,fe.addButton(Te);var me=new ee;me.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(me),this.straightener=new st("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Pe){he.rotateBy(Pe),he.straightener.angle=he.rotationAngle},me.addElement(this.straightener.getUI());var Ee=new re;Ee.minWidth=2*this.toolbarHeight+"px",Ee.contentAlign="end",this.bottomToolbar.addButtonBlock(Ee);var xe=new ie('<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");xe.onClick=this.flipHorizontallyButtonClicked,Ee.addButton(xe);var Ie=new ie('<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");Ie.onClick=this.flipVerticallyButtonClicked,Ee.addButton(Ie)},we.prototype.ratioButtonClicked=function(he){this.aspectRatio=he,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},we.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Ce.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},we.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new de(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},we.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},we.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},we.prototype.restoreState=function(he){if(he){var fe=this.cropLayer.getRescaledRect(he.width,he.height,this.imageWidth,this.imageHeight,he.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(fe),this.cropRectChanged(fe),this.flippedHorizontally=he.flippedHorizontally,this.flippedVertically=he.flippedVertically,this.applyFlip(),this.rotationAngle=he.rotationAngle,this.applyRotation()}},we.prototype.clientToLocalCoordinates=function(he,fe){var ge=this.cropImage.getBoundingClientRect();return{x:he-ge.left,y:fe-ge.top}},we.prototype.onWindowResize=function(){this.positionUI()},we.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var he=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=he+"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()},we.prototype.rotateLeftButtonClicked=function(){var he=this.rotationAngle-90;this.rotationAngle%90!=0&&(he+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(he)},we.prototype.rotateRightButtonClicked=function(){var he=this.rotationAngle+90;this.rotationAngle%90!=0&&(he-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(he)},we.prototype.rotateTo=function(he){he=(he=he>180?he-360:he)<=-180?he+360:he,this.rotationAngle=he,this.applyRotation()},we.prototype.rotateBy=function(he){this.rotateTo((this.rotationAngle+he)%360)},we.prototype.applyRotation=function(){var he=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var fe=this.editingTargetRotationContainer.transform.baseVal.getItem(0);fe.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(fe,0);var ge=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ge.width,this.imageHeight/ge.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=he},we.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},we.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},we.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},we.prototype.startRenderAndClose=function(){return Ke(this,void 0,void 0,function(){var he,fe;return Le(this,function(ge){switch(ge.label){case 0:return[4,this.render()];case 1:return he=ge.sent(),fe=this.getState(),this.renderEventListeners.forEach(function(Te){return Te(he,fe)}),this.close(!0),[2]}})})},we.prototype.render=function(){return Ke(this,void 0,void 0,function(){var he;return Le(this,function(fe){switch(fe.label){case 0:return(he=new ut).naturalSize=this.renderAtNaturalSize,he.imageType=this.renderImageType,he.imageQuality=this.renderImageQuality,he.width=this.renderWidth,he.height=this.renderHeight,this.unzoomFromCrop(),V.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,he.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 fe.sent(),[4,he.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,fe.sent()]}})})},we.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new se("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 se("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new se("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var he=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new se("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*he)+`px;
|
|
height: `+(this.toolbarHeight-2*he)+`px;
|
|
padding: `+he+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new se("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new se("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 se("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 se("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new se("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 se("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*he)+`px;
|
|
padding: `+he+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new se("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},we.instanceCounter=0,we}(),xt=N("8hTe"),je=N.n(xt),He=/<pre[^>]*>/g;function ot(we){var he=document.createElement("div");return he.innerHTML=we,he.childNodes.length===0?"":he.childNodes[0].nodeValue}var ht=Ae.a=function(we){var he=we.value,fe=he===void 0?"":he,ge=we.edit,Te=ge===void 0?!1:ge,me=we.className,Ee=we.showTextOnly,xe=we.showLines,Ie=we.replaces,Pe=we.zoomImg,Qe=we.hasMask,tt=we.style,mt=tt===void 0?{}:tt,Bt=we.stylesPrev,Et=Bt===void 0?{}:Bt,Ct=String(fe),nt=Object(E.useRef)(),qe=Object(E.useRef)(),$e=Object(E.useState)(""),Re=Object(R.a)($e,2),Ne=Re[0],ct=Re[1],rt=Object(E.useState)("office"),gt=Object(R.a)(rt,2),pt=gt[0],at=gt[1],vt=function(){var er=new yt(qe.current);er.displayMode="popup",er.addRenderEventListener(function(){var ir=Object(_.a)(t.a.mark(function Kt($t){var Xt;return t.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return nt.current.style.display="none",Br.next=3,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:$t}});case 3:Xt=Br.sent,Xt!=null&&Xt.id&&Ie(qe.current.getAttribute("src").replace(X.a.API_SERVER,""),"/api/attachments/".concat(Xt==null?void 0:Xt.id,"?type=").concat(Xt.content_type));case 5:case"end":return Br.stop()}},Kt)}));return function(Kt){return ir.apply(this,arguments)}}()),er.show()},St=function(){var er=new _e.a(qe.current);er.settings.displayMode="popup",er.addEventListener("render",function(){var ir=Object(_.a)(t.a.mark(function Kt($t){var Xt;return t.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:if(nt.current.style.display="none",!qe.current){Br.next=6;break}return Br.next=4,Object(Oe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:$t.dataUrl}});case 4:Xt=Br.sent,Xt!=null&&Xt.id&&Ie(qe.current.getAttribute("src").replace(X.a.API_SERVER,""),"/api/attachments/".concat(Xt==null?void 0:Xt.id,"?type=").concat(Xt.content_type));case 6:case"end":return Br.stop()}},Kt)}));return function(Kt){return ir.apply(this,arguments)}}()),er.show(),window.markerArea=er},wt=Object(E.useMemo)(function(){nt.current&&(nt.current.style.zIndex=-1);try{var Ft=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,er=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ir=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ct=Ct.replace(Ft,"("+X.a.API_SERVER+"/api/attachments/").replace(er,'"'+X.a.API_SERVER+"/api/attachments/").replace(ir,'"'+X.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(Xr){}var Kt=G(Ct),$t=T();if(Ct.match(/\[TOC\]/)&&(Kt=Kt.replace("<p>[TOC]</p>",L()),v()),Kt=Kt.replace(/(__special_katext_id_\d+__)/g,function(Xr,Br){var be=$t[Br],Be=be.type,ke=be.expression;return Object(ne.renderToString)(ot(ke)||"",{displayMode:Be==="block",throwOnError:!1,output:"html"})}),Kt=Kt.replace(/▁/g,"\u2581\u2581\u2581"),y(),Ee){var Xt=document.createElement("div");return Xt.innerHTML=Kt,Xt.innerText}return setTimeout(function(){return xr()},500),Kt},[Ct]),Dt=Object(E.useRef)();B.WebkitLineClamp=xe,xe&&(mt=Object(M.a)(Object(M.a)({},mt),B));function Ar(Ft){var er=Ft.target;if(er.tagName.toUpperCase()==="IMG"){if(Pe){var ir=er.getAttribute("src");ct(ir),at("image")}}else if(er.tagName.toUpperCase()==="A"){var Kt=er.getAttribute("href");if(Kt.indexOf("office")>-1)Ft.preventDefault(),ct(Kt),at("office");else if(Kt.indexOf("application/pdf")>-1)Ft.preventDefault(),ct(Kt),at("pdf");else if(Kt.indexOf("text/html")>-1)Ft.preventDefault(),ct(Kt),at("html");else if(Kt.startsWith("#")){Ft.preventDefault();var $t=document.getElementById(Kt.replace("#",""));$t&&$t.scrollIntoView(!0)}}}var xr=function(){var er,ir=(er=Dt.current)===null||er===void 0?void 0:er.querySelectorAll("video");ir==null||ir.forEach(function(Kt){if(Kt.oncontextmenu=function(){return!1},Kt.src.indexOf(".m3u8")>-1&&!Kt.canPlayType("application/vnd.apple.mpegurl")){if(J.a.isSupported()){var $t=new J.a;$t.loadSource(Kt.src),$t.attachMedia(Kt)}}})};Object(E.useEffect)(function(){if(Dt.current&&wt&&(wt.match(He)&&window.PR.prettyPrint()),Dt.current)return Dt.current.addEventListener("click",Ar),function(){Dt.current.removeEventListener("click",Ar),y(),v()}},[wt,Dt.current,Ar]);var _r=function(er){if(!Te)return;er.target.nodeName==="IMG"?(nt.current.style.zIndex=1,nt.current.style.display="flex",nt.current.style.width=er.target.clientWidth+"px",nt.current.style.height=er.target.clientHeight+"px",nt.current.style.top=er.target.offsetTop+"px",nt.current.style.left=er.target.offsetLeft+"px",qe.current.src=er.target.getAttribute("src")):nt.current.style.display="none"};return a.a.createElement("div",{style:{position:"relative"}},a.a.createElement("div",{ref:Dt,style:Object(M.a)({},mt),className:"".concat(me||""," markdown-body ").concat(je.a.mdBody),onMouseOver:_r,dangerouslySetInnerHTML:{__html:wt}}),a.a.createElement("div",{ref:nt,className:je.a.button},a.a.createElement(H.a,null,a.a.createElement(Q.a,{onClick:function(){return vt()}},"\u88C1\u526A"),a.a.createElement(Q.a,{onClick:function(){return St()}},"\u7F16\u8F91"))),a.a.createElement("img",{ref:qe,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),a.a.createElement(ue.a,{close:!0,data:Ne,type:Ne!=null&&Ne.length?pt:"",style:Object(M.a)({},Et),onClose:function(){return ct("")}}))}},"9VGf":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return O});var Z=N("q1tI"),H=N.n(Z);function O(Q,M){var _=Object(Z.useRef)();Object(Z.useEffect)(function(){_.current=Q}),Object(Z.useEffect)(function(){function R(){_.current()}if(M!==null){var b=setInterval(R,M);return function(){return clearInterval(b)}}},[M])}},BPZU:function(Ve,Ae){var N=32,Z=7,H=256;function O(a){for(var A=0;a>=N;)A|=a&1,a>>=1;return a+A}function Q(a,A,h,s){var o=A+1;if(o===h)return 1;if(s(a[o++],a[A])<0){for(;o<h&&s(a[o],a[o-1])<0;)o++;M(a,A,o)}else for(;o<h&&s(a[o],a[o-1])>=0;)o++;return o-A}function M(a,A,h){for(h--;A<h;){var s=a[A];a[A++]=a[h],a[h--]=s}}function _(a,A,h,s,o){for(s===A&&s++;s<h;s++){for(var f=a[s],u=A,c=s,i;u<c;)i=u+c>>>1,o(f,a[i])<0?c=i:u=i+1;var l=s-u;switch(l){case 3:a[u+3]=a[u+2];case 2:a[u+2]=a[u+1];case 1:a[u+1]=a[u];break;default:for(;l>0;)a[u+l]=a[u+l-1],l--}a[u]=f}}function R(a,A,h,s,o,f){var u=0,c=0,i=1;if(f(a,A[h+o])>0){for(c=s-o;i<c&&f(a,A[h+o+i])>0;)u=i,i=(i<<1)+1,i<=0&&(i=c);i>c&&(i=c),u+=o,i+=o}else{for(c=o+1;i<c&&f(a,A[h+o-i])<=0;)u=i,i=(i<<1)+1,i<=0&&(i=c);i>c&&(i=c);var l=u;u=o-i,i=o-l}for(u++;u<i;){var v=u+(i-u>>>1);f(a,A[h+v])>0?u=v+1:i=v}return i}function b(a,A,h,s,o,f){var u=0,c=0,i=1;if(f(a,A[h+o])<0){for(c=o+1;i<c&&f(a,A[h+o-i])<0;)u=i,i=(i<<1)+1,i<=0&&(i=c);i>c&&(i=c);var l=u;u=o-i,i=o-l}else{for(c=s-o;i<c&&f(a,A[h+o+i])>=0;)u=i,i=(i<<1)+1,i<=0&&(i=c);i>c&&(i=c),u+=o,i+=o}for(u++;u<i;){var v=u+(i-u>>>1);f(a,A[h+v])<0?i=v:u=v+1}return i}function t(a,A){var h=Z,s=0,o=H,f=0,u,c,i=0;s=a.length,s<2*H&&(o=s>>>1);var l=[];f=s<120?5:s<1542?10:s<119151?19:40,u=[],c=[];function v(n,d){u[i]=n,c[i]=d,i+=1}function B(){for(;i>1;){var n=i-2;if(n>=1&&c[n-1]<=c[n]+c[n+1]||n>=2&&c[n-2]<=c[n]+c[n-1])c[n-1]<c[n+1]&&n--;else if(c[n]>c[n+1])break;L(n)}}function C(){for(;i>1;){var n=i-2;n>0&&c[n-1]<c[n+1]&&n--,L(n)}}function L(n){var d=u[n],m=c[n],T=u[n+1],y=c[n+1];c[n]=m+y,n===i-3&&(u[n+1]=u[n+2],c[n+1]=c[n+2]),i--;var g=b(a[T],a,d,m,0,A);if(d+=g,m-=g,m===0)return;if(y=R(a[d+m-1],a,T,y,y-1,A),y===0)return;m<=y?w(d,m,T,y):p(d,m,T,y)}function w(n,d,m,T){var y=0;for(y=0;y<d;y++)l[y]=a[n+y];var g=0,U=m,P=n;if(a[P++]=a[U++],--T===0){for(y=0;y<d;y++)a[P+y]=l[g+y];return}if(d===1){for(y=0;y<T;y++)a[P+y]=a[U+y];a[P+T]=l[g];return}for(var I=h,G,K,D;;){G=0,K=0,D=!1;do if(A(a[U],l[g])<0){if(a[P++]=a[U++],K++,G=0,--T===0){D=!0;break}}else if(a[P++]=l[g++],G++,K=0,--d===1){D=!0;break}while((G|K)<I);if(D)break;do{if(G=b(a[U],l,g,d,0,A),G!==0){for(y=0;y<G;y++)a[P+y]=l[g+y];if(P+=G,g+=G,d-=G,d<=1){D=!0;break}}if(a[P++]=a[U++],--T===0){D=!0;break}if(K=R(l[g],a,U,T,0,A),K!==0){for(y=0;y<K;y++)a[P+y]=a[U+y];if(P+=K,U+=K,T-=K,T===0){D=!0;break}}if(a[P++]=l[g++],--d===1){D=!0;break}I--}while(G>=Z||K>=Z);if(D)break;I<0&&(I=0),I+=2}if(h=I,h<1&&(h=1),d===1){for(y=0;y<T;y++)a[P+y]=a[U+y];a[P+T]=l[g]}else{if(d===0)throw new Error;for(y=0;y<d;y++)a[P+y]=l[g+y]}}function p(n,d,m,T){var y=0;for(y=0;y<T;y++)l[y]=a[m+y];var g=n+d-1,U=T-1,P=m+T-1,I=0,G=0;if(a[P--]=a[g--],--d===0){for(I=P-(T-1),y=0;y<T;y++)a[I+y]=l[y];return}if(T===1){for(P-=d,g-=d,G=P+1,I=g+1,y=d-1;y>=0;y--)a[G+y]=a[I+y];a[P]=l[U];return}for(var K=h;;){var D=0,J=0,X=!1;do if(A(l[U],a[g])<0){if(a[P--]=a[g--],D++,J=0,--d===0){X=!0;break}}else if(a[P--]=l[U--],J++,D=0,--T===1){X=!0;break}while((D|J)<K);if(X)break;do{if(D=d-b(l[U],a,n,d,d-1,A),D!==0){for(P-=D,g-=D,d-=D,G=P+1,I=g+1,y=D-1;y>=0;y--)a[G+y]=a[I+y];if(d===0){X=!0;break}}if(a[P--]=l[U--],--T===1){X=!0;break}if(J=T-R(a[g],l,0,T,T-1,A),J!==0){for(P-=J,U-=J,T-=J,G=P+1,I=U+1,y=0;y<J;y++)a[G+y]=l[I+y];if(T<=1){X=!0;break}}if(a[P--]=a[g--],--d===0){X=!0;break}K--}while(D>=Z||J>=Z);if(X)break;K<0&&(K=0),K+=2}if(h=K,h<1&&(h=1),T===1){for(P-=d,g-=d,G=P+1,I=g+1,y=d-1;y>=0;y--)a[G+y]=a[I+y];a[P]=l[U]}else{if(T===0)throw new Error;for(I=P-(T-1),y=0;y<T;y++)a[I+y]=l[y]}}this.mergeRuns=B,this.forceMergeRuns=C,this.pushRun=v}function E(a,A,h,s){h||(h=0),s||(s=a.length);var o=s-h;if(o<2)return;var f=0;if(o<N){f=Q(a,h,s,A),_(a,h,s,h+f,A);return}var u=new t(a,A),c=O(o);do{if(f=Q(a,h,s,A),f<c){var i=o;i>c&&(i=c),_(a,h,h+i,h+f,A),f=i}u.pushRun(h,f),u.mergeRuns(),o-=f,h+=f}while(o!==0);u.forceMergeRuns()}Ve.exports=E},BU3w:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return _});var Z=N("MNnm"),H="rc-util-key";function O(R){if(R.attachTo)return R.attachTo;var b=document.querySelector("head");return b||document.body}function Q(R){var b,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Z.a)())return null;var E=document.createElement("style");if((b=t.csp)===null||b===void 0?void 0:b.nonce){var a;E.nonce=(a=t.csp)===null||a===void 0?void 0:a.nonce}E.innerHTML=R;var A=O(t),h=A.firstChild;return t.prepend&&A.prepend?A.prepend(E):t.prepend&&h?A.insertBefore(E,h):A.appendChild(E),E}var M=new Map;function _(R,b){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E=O(t);if(!M.has(E)){var a=Q("",t),A=a.parentNode;M.set(E,A),A.removeChild(a)}var h=Array.from(M.get(E).children).find(function(c){return c.tagName==="STYLE"&&c[H]===b});if(h){var s,o;if(((s=t.csp)===null||s===void 0?void 0:s.nonce)&&h.nonce!==((o=t.csp)===null||o===void 0?void 0:o.nonce)){var f;h.nonce=(f=t.csp)===null||f===void 0?void 0:f.nonce}return h.innerHTML!==R&&(h.innerHTML=R),h}var u=Q(R,t);return u[H]=b,u}},Bd2K:function(Ve,Ae,N){(function(Z){Z(N("VrN/"),N("osHv"))})(function(Z){Z.defineOption("autoCloseTags",!1,function(t,E,a){if(a!=Z.Init&&a&&t.removeKeyMap("autoCloseTags"),!E)return;var A={name:"autoCloseTags"};(typeof E!="object"||E.whenClosing!==!1)&&(A["'/'"]=function(h){return _(h)}),(typeof E!="object"||E.whenOpening!==!1)&&(A["'>'"]=function(h){return Q(h)}),t.addKeyMap(A)});var H=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["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 Q(t){if(t.getOption("disableInput"))return Z.Pass;for(var E=t.listSelections(),a=[],A=t.getOption("autoCloseTags"),h=0;h<E.length;h++){if(!E[h].empty())return Z.Pass;var s=E[h].head,o=t.getTokenAt(s),f=Z.innerMode(t.getMode(),o.state),u=f.state,c=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(u),i=c&&c.name;if(!i)return Z.Pass;var l=f.mode.configuration=="html",v=typeof A=="object"&&A.dontCloseTags||l&&H,B=typeof A=="object"&&A.indentTags||l&&O;o.end>s.ch&&(i=i.slice(0,i.length-o.end+s.ch));var C=i.toLowerCase();if(!i||o.type=="string"&&(o.end!=s.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&c.close||o.string.indexOf("/")==s.ch-o.start-1||v&&R(v,C)>-1||b(t,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(u)||[],i,s,!0))return Z.Pass;var L=typeof A=="object"&&A.emptyTags;if(L&&R(L,i)>-1){a[h]={text:"/>",newPos:Z.Pos(s.line,s.ch+2)};continue}var w=B&&R(B,C)>-1;a[h]={indent:w,text:">"+(w?`
|
|
|
|
`:"")+"</"+i+">",newPos:w?Z.Pos(s.line+1,0):Z.Pos(s.line,s.ch+1)}}for(var p=typeof A=="object"&&A.dontIndentOnAutoClose,h=E.length-1;h>=0;h--){var n=a[h];t.replaceRange(n.text,E[h].head,E[h].anchor,"+insert");var d=t.listSelections().slice(0);d[h]={head:n.newPos,anchor:n.newPos},t.setSelections(d),!p&&n.indent&&(t.indentLine(n.newPos.line,null,!0),t.indentLine(n.newPos.line+1,null,!0))}}function M(t,E){for(var a=t.listSelections(),A=[],h=E?"/":"</",s=t.getOption("autoCloseTags"),o=typeof s=="object"&&s.dontIndentOnSlash,f=0;f<a.length;f++){if(!a[f].empty())return Z.Pass;var u=a[f].head,c=t.getTokenAt(u),i=Z.innerMode(t.getMode(),c.state),l=i.state;if(E&&(c.type=="string"||c.string.charAt(0)!="<"||c.start!=u.ch-1))return Z.Pass;var v,B=i.mode.name!="xml"&&t.getMode().name=="htmlmixed";if(B&&i.mode.name=="javascript")v=h+"script";else if(B&&i.mode.name=="css")v=h+"style";else{var C=i.mode.xmlCurrentContext&&i.mode.xmlCurrentContext(l);if(!C||C.length&&b(t,C,C[C.length-1],u))return Z.Pass;v=h+C[C.length-1]}t.getLine(u.line).charAt(c.end)!=">"&&(v+=">"),A[f]=v}if(t.replaceSelections(A),a=t.listSelections(),!o)for(var f=0;f<a.length;f++)(f==a.length-1||a[f].head.line<a[f+1].head.line)&&t.indentLine(a[f].head.line)}function _(t){return t.getOption("disableInput")?Z.Pass:M(t,!0)}Z.commands.closeTag=function(t){return M(t)};function R(t,E){if(t.indexOf)return t.indexOf(E);for(var a=0,A=t.length;a<A;++a)if(t[a]==E)return a;return-1}function b(t,E,a,A,h){if(!Z.scanForClosingTag)return!1;var s=Math.min(t.lastLine()+1,A.line+500),o=Z.scanForClosingTag(t,A,null,s);if(!o||o.tag!=a)return!1;for(var f=h?1:0,u=E.length-1;u>=0&&E[u]==a;u--)++f;A=o.to;for(var u=1;u<f;u++){var c=Z.scanForClosingTag(t,A,null,s);if(!c||c.tag!=a)return!1;A=c.to}return!0}})},BjJ7:function(Ve,Ae,N){"use strict";N.d(Ae,"d",function(){return H}),N.d(Ae,"c",function(){return O}),N.d(Ae,"e",function(){return Q}),N.d(Ae,"b",function(){return M}),N.d(Ae,"a",function(){return R});var Z=N("m3rI");function H(b){var t=!0;if(b.length>0){for(var E=0;E<b.length;E++)if(b[E].compile_success==0||!b[E].compile_success){t=!1;break}}else t=!1;return t}function O(b){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",E=[],a=0;a<b.length;a++){var A=b[a],h=t?"".concat(t,"/").concat(A.name):"".concat(A.name);E.push({title:A.name,isLeaf:!(A.type==="tree"),key:h})}return E}function Q(b,t,E){for(var a=0;a<b.length;a++){var A=b[a];if(A.key===t){A.children=E;break}A.children&&Q(A.children,t,E)}return b}function M(b,t,E){var a;return function(){var A=this,h=arguments,s=function(){a=null,E||b.apply(A,h)},o=E&&!a;clearTimeout(a),a=setTimeout(s,t),o&&b.apply(A,h)}}var _=!0,R=Z.a.API_SERVER},BlVb:function(Ve,Ae,N){var Z=N("hyiK"),H=1e-8;function O(M,_){return Math.abs(M-_)<H}function Q(M,_,R){var b=0,t=M[0];if(!t)return!1;for(var E=1;E<M.length;E++){var a=M[E];b+=Z(t[0],t[1],a[0],a[1],_,R),t=a}var A=M[0];return(!O(t[0],A[0])||!O(t[1],A[1]))&&(b+=Z(t[0],t[1],A[0],A[1],_,R)),b!==0}Ae.contain=Q},Bq2U:function(Ve,Ae,N){var Z=N("RDYZ"),H=N("Qe9p"),O=N("bYtY"),Q=O.isArrayLike,M=Array.prototype.slice;function _(v,B){return v[B]}function R(v,B,C){v[B]=C}function b(v,B,C){return(B-v)*C+v}function t(v,B,C){return C>.5?B:v}function E(v,B,C,L,w){var p=v.length;if(w===1)for(var n=0;n<p;n++)L[n]=b(v[n],B[n],C);else for(var d=p&&v[0].length,n=0;n<p;n++)for(var m=0;m<d;m++)L[n][m]=b(v[n][m],B[n][m],C)}function a(v,B,C){var L=v.length,w=B.length;if(L!==w){var p=L>w;if(p)v.length=w;else for(var n=L;n<w;n++)v.push(C===1?B[n]:M.call(B[n]))}for(var d=v[0]&&v[0].length,n=0;n<v.length;n++)if(C===1)isNaN(v[n])&&(v[n]=B[n]);else for(var m=0;m<d;m++)isNaN(v[n][m])&&(v[n][m]=B[n][m])}function A(v,B,C){if(v===B)return!0;var L=v.length;if(L!==B.length)return!1;if(C===1){for(var w=0;w<L;w++)if(v[w]!==B[w])return!1}else for(var p=v[0].length,w=0;w<L;w++)for(var n=0;n<p;n++)if(v[w][n]!==B[w][n])return!1;return!0}function h(v,B,C,L,w,p,n,d,m){var T=v.length;if(m===1)for(var y=0;y<T;y++)d[y]=s(v[y],B[y],C[y],L[y],w,p,n);else for(var g=v[0].length,y=0;y<T;y++)for(var U=0;U<g;U++)d[y][U]=s(v[y][U],B[y][U],C[y][U],L[y][U],w,p,n)}function s(v,B,C,L,w,p,n){var d=(C-v)*.5,m=(L-B)*.5;return(2*(B-C)+d+m)*n+(-3*(B-C)-2*d-m)*p+d*w+B}function o(v){if(Q(v)){var B=v.length;if(Q(v[0])){for(var C=[],L=0;L<B;L++)C.push(M.call(v[L]));return C}return M.call(v)}return v}function f(v){return v[0]=Math.floor(v[0]),v[1]=Math.floor(v[1]),v[2]=Math.floor(v[2]),"rgba("+v.join(",")+")"}function u(v){var B=v[v.length-1].value;return Q(B&&B[0])?2:1}function c(v,B,C,L,w,p){var n=v._getter,d=v._setter,m=B==="spline",T=L.length;if(!T)return;var y=L[0].value,g=Q(y),U=!1,P=!1,I=g?u(L):0,G;L.sort(function(re,ie){return re.time-ie.time}),G=L[T-1].time;for(var K=[],D=[],J=L[0].value,X=!0,ne=0;ne<T;ne++){K.push(L[ne].time/G);var ue=L[ne].value;if(g&&A(ue,J,I)||!g&&ue===J||(X=!1),J=ue,typeof ue=="string"){var Oe=H.parse(ue);Oe?(ue=Oe,U=!0):P=!0}D.push(ue)}if(!p&&X)return;for(var _e=D[T-1],ne=0;ne<T-1;ne++)g?a(D[ne],_e,I):isNaN(D[ne])&&!isNaN(_e)&&!P&&!U&&(D[ne]=_e);g&&a(n(v._target,w),_e,I);var De=0,Ue=0,Ke,Le,ae,V,$,q;if(U)var se=[0,0,0,0];var te=function(re,ie){var ee;if(ie<0)ee=0;else if(ie<Ue){for(Ke=Math.min(De+1,T-1),ee=Ke;ee>=0&&!(K[ee]<=ie);ee--);ee=Math.min(ee,T-2)}else{for(ee=De;ee<T&&!(K[ee]>ie);ee++);ee=Math.min(ee-1,T-2)}De=ee,Ue=ie;var de=K[ee+1]-K[ee];if(de===0)return;if(Le=(ie-K[ee])/de,m)if(V=D[ee],ae=D[ee===0?ee:ee-1],$=D[ee>T-2?T-1:ee+1],q=D[ee>T-3?T-1:ee+2],g)h(ae,V,$,q,Le,Le*Le,Le*Le*Le,n(re,w),I);else{var Ce;if(U)Ce=h(ae,V,$,q,Le,Le*Le,Le*Le*Le,se,1),Ce=f(se);else{if(P)return t(V,$,Le);Ce=s(ae,V,$,q,Le,Le*Le,Le*Le*Le)}d(re,w,Ce)}else if(g)E(D[ee],D[ee+1],Le,n(re,w),I);else{var Ce;if(U)E(D[ee],D[ee+1],Le,se,1),Ce=f(se);else{if(P)return t(D[ee],D[ee+1],Le);Ce=b(D[ee],D[ee+1],Le)}d(re,w,Ce)}},oe=new Z({target:v._target,life:G,loop:v._loop,delay:v._delay,onframe:te,ondestroy:C});return B&&B!=="spline"&&(oe.easing=B),oe}var i=function(v,B,C,L){this._tracks={},this._target=v,this._loop=B||!1,this._getter=C||_,this._setter=L||R,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};i.prototype={when:function(v,B){var C=this._tracks;for(var L in B){if(!B.hasOwnProperty(L))continue;if(!C[L]){C[L]=[];var w=this._getter(this._target,L);if(w==null)continue;v!==0&&C[L].push({time:0,value:o(w)})}C[L].push({time:v,value:B[L]})}return this},during:function(v){return this._onframeList.push(v),this},pause:function(){for(var v=0;v<this._clipList.length;v++)this._clipList[v].pause();this._paused=!0},resume:function(){for(var v=0;v<this._clipList.length;v++)this._clipList[v].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var v=this._doneList,B=v.length,C=0;C<B;C++)v[C].call(this)},start:function(v,B){var C=this,L=0,w=function(){L--,L||C._doneCallback()},p;for(var n in this._tracks){if(!this._tracks.hasOwnProperty(n))continue;var d=c(this,v,w,this._tracks[n],n,B);d&&(this._clipList.push(d),L++,this.animation&&this.animation.addClip(d),p=d)}if(p){var m=p.onframe;p.onframe=function(T,y){m(T,y);for(var g=0;g<C._onframeList.length;g++)C._onframeList[g](T,y)}}return L||this._doneCallback(),this},stop:function(v){for(var B=this._clipList,C=this.animation,L=0;L<B.length;L++){var w=B[L];v&&w.onframe(this._target,1),C&&C.removeClip(w)}B.length=0},delay:function(v){return this._delay=v,this},done:function(v){return v&&this._doneList.push(v),this},getClips:function(){return this._clipList}};var l=i;Ve.exports=l},"C+DQ":function(Ve,Ae,N){},"C/vA":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return Z});function Z(H){const O=this;let Q=!1,M;return function(){return Q||(Q=!0,M=H.apply(O,arguments)),M}}},C0SR:function(Ve,Ae,N){var Z=N("YH21"),H=function(){this._track=[]};H.prototype={constructor:H,recognize:function(R,b,t){return this._doTrack(R,b,t),this._recognize(R)},clear:function(){return this._track.length=0,this},_doTrack:function(R,b,t){var E=R.touches;if(!E)return;for(var a={points:[],touches:[],target:b,event:R},A=0,h=E.length;A<h;A++){var s=E[A],o=Z.clientToLocal(t,s,{});a.points.push([o.zrX,o.zrY]),a.touches.push(s)}this._track.push(a)},_recognize:function(R){for(var b in M)if(M.hasOwnProperty(b)){var t=M[b](this._track,R);if(t)return t}}};function O(R){var b=R[1][0]-R[0][0],t=R[1][1]-R[0][1];return Math.sqrt(b*b+t*t)}function Q(R){return[(R[0][0]+R[1][0])/2,(R[0][1]+R[1][1])/2]}var M={pinch:function(R,b){var t=R.length;if(!t)return;var E=(R[t-1]||{}).points,a=(R[t-2]||{}).points||E;if(a&&a.length>1&&E&&E.length>1){var A=O(E)/O(a);!isFinite(A)&&(A=1),b.pinchScale=A;var h=Q(E);return b.pinchX=h[0],b.pinchY=h[1],{type:"pinch",target:R[0].target,event:b}}}},_=H;Ve.exports=_},"Cg/j":function(Ve,Ae,N){"use strict";N.d(Ae,"b",function(){return Z}),N.d(Ae,"a",function(){return H}),N.d(Ae,"c",function(){return Q}),N.d(Ae,"d",function(){return M});var Z;(function(_){_.serviceIds=new Map,_.DI_TARGET="$di$target",_.DI_DEPENDENCIES="$di$dependencies";function R(b){return b[_.DI_DEPENDENCIES]||[]}_.getServiceDependencies=R})(Z||(Z={}));const H=Q("instantiationService");function O(_,R,b,t){R[Z.DI_TARGET]===R?R[Z.DI_DEPENDENCIES].push({id:_,index:b,optional:t}):(R[Z.DI_DEPENDENCIES]=[{id:_,index:b,optional:t}],R[Z.DI_TARGET]=R)}function Q(_){if(Z.serviceIds.has(_))return Z.serviceIds.get(_);const R=function(b,t,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");O(R,b,E,!1)};return R.toString=()=>_,Z.serviceIds.set(_,R),R}function M(_){return function(R,b,t){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");O(_,R,t,!0)}}},DBLp:function(Ve,Ae){function N(){}N.prototype={diff:function(M,_,R){R||(R=function(i,l){return i===l}),this.equals=R;var b=this;M=M.slice(),_=_.slice();var t=_.length,E=M.length,a=1,A=t+E,h=[{newPos:-1,components:[]}],s=this.extractCommon(h[0],_,M,0);if(h[0].newPos+1>=t&&s+1>=E){for(var o=[],f=0;f<_.length;f++)o.push(f);return[{indices:o,count:_.length}]}function u(){for(var i=-1*a;i<=a;i+=2){var l,v=h[i-1],B=h[i+1],C=(B?B.newPos:0)-i;v&&(h[i-1]=void 0);var L=v&&v.newPos+1<t,w=B&&0<=C&&C<E;if(!L&&!w){h[i]=void 0;continue}if(!L||w&&v.newPos<B.newPos?(l=H(B),b.pushComponent(l.components,void 0,!0)):(l=v,l.newPos++,b.pushComponent(l.components,!0,void 0)),C=b.extractCommon(l,_,M,i),l.newPos+1>=t&&C+1>=E)return Z(b,l.components,_,M);h[i]=l}a++}for(;a<=A;){var c=u();if(c)return c}},pushComponent:function(M,_,R){var b=M[M.length-1];b&&b.added===_&&b.removed===R?M[M.length-1]={count:b.count+1,added:_,removed:R}:M.push({count:1,added:_,removed:R})},extractCommon:function(M,_,R,b){for(var t=_.length,E=R.length,a=M.newPos,A=a-b,h=0;a+1<t&&A+1<E&&this.equals(_[a+1],R[A+1]);)a++,A++,h++;return h&&M.components.push({count:h}),M.newPos=a,A},tokenize:function(M){return M.slice()},join:function(M){return M.slice()}};function Z(M,_,R,b){for(var t=0,E=_.length,a=0,A=0;t<E;t++){var h=_[t];if(h.removed){for(var s=[],o=A;o<A+h.count;o++)s.push(o);h.indices=s,A+=h.count}else{for(var s=[],o=a;o<a+h.count;o++)s.push(o);h.indices=s,a+=h.count,h.added||(A+=h.count)}}return _}function H(M){return{newPos:M.newPos,components:M.components.slice(0)}}var O=new N;function Q(M,_,R){return O.diff(M,_,R)}Ve.exports=Q},DN4a:function(Ve,Ae,N){var Z=N("Fofx"),H=N("QBsz"),O=Z.identity,Q=5e-5;function M(A){return A>Q||A<-Q}var _=function(A){A=A||{},A.position||(this.position=[0,0]),A.rotation==null&&(this.rotation=0),A.scale||(this.scale=[1,1]),this.origin=this.origin||null},R=_.prototype;R.transform=null,R.needLocalTransform=function(){return M(this.rotation)||M(this.position[0])||M(this.position[1])||M(this.scale[0]-1)||M(this.scale[1]-1)};var b=[];R.updateTransform=function(){var A=this.parent,h=A&&A.transform,s=this.needLocalTransform(),o=this.transform;if(!(s||h)){o&&O(o);return}o=o||Z.create(),s?this.getLocalTransform(o):O(o),h&&(s?Z.mul(o,A.transform,o):Z.copy(o,A.transform)),this.transform=o;var f=this.globalScaleRatio;if(f!=null&&f!==1){this.getGlobalScale(b);var u=b[0]<0?-1:1,c=b[1]<0?-1:1,i=((b[0]-u)*f+u)/b[0]||0,l=((b[1]-c)*f+c)/b[1]||0;o[0]*=i,o[1]*=i,o[2]*=l,o[3]*=l}this.invTransform=this.invTransform||Z.create(),Z.invert(this.invTransform,o)},R.getLocalTransform=function(A){return _.getLocalTransform(this,A)},R.setTransform=function(A){var h=this.transform,s=A.dpr||1;h?A.setTransform(s*h[0],s*h[1],s*h[2],s*h[3],s*h[4],s*h[5]):A.setTransform(s,0,0,s,0,0)},R.restoreTransform=function(A){var h=A.dpr||1;A.setTransform(h,0,0,h,0,0)};var t=[],E=Z.create();R.setLocalTransform=function(A){if(!A)return;var h=A[0]*A[0]+A[1]*A[1],s=A[2]*A[2]+A[3]*A[3],o=this.position,f=this.scale;M(h-1)&&(h=Math.sqrt(h)),M(s-1)&&(s=Math.sqrt(s)),A[0]<0&&(h=-h),A[3]<0&&(s=-s),o[0]=A[4],o[1]=A[5],f[0]=h,f[1]=s,this.rotation=Math.atan2(-A[1]/s,A[0]/h)},R.decomposeTransform=function(){if(!this.transform)return;var A=this.parent,h=this.transform;A&&A.transform&&(Z.mul(t,A.invTransform,h),h=t);var s=this.origin;s&&(s[0]||s[1])&&(E[4]=s[0],E[5]=s[1],Z.mul(t,h,E),t[4]-=s[0],t[5]-=s[1],h=t),this.setLocalTransform(h)},R.getGlobalScale=function(A){var h=this.transform;return A=A||[],h?(A[0]=Math.sqrt(h[0]*h[0]+h[1]*h[1]),A[1]=Math.sqrt(h[2]*h[2]+h[3]*h[3]),h[0]<0&&(A[0]=-A[0]),h[3]<0&&(A[1]=-A[1]),A):(A[0]=1,A[1]=1,A)},R.transformCoordToLocal=function(A,h){var s=[A,h],o=this.invTransform;return o&&H.applyTransform(s,s,o),s},R.transformCoordToGlobal=function(A,h){var s=[A,h],o=this.transform;return o&&H.applyTransform(s,s,o),s},_.getLocalTransform=function(A,h){h=h||[],O(h);var s=A.origin,o=A.scale||[1,1],f=A.rotation||0,u=A.position||[0,0];return s&&(h[4]-=s[0],h[5]-=s[1]),Z.scale(h,h,o),f&&Z.rotate(h,h,f),s&&(h[4]+=s[0],h[5]+=s[1]),h[4]+=u[0],h[5]+=u[1],h};var a=_;Ve.exports=a},Dagg:function(Ve,Ae,N){var Z=N("Gev7"),H=N("mFDi"),O=N("bYtY"),Q=N("Xnb7");function M(R){Z.call(this,R)}M.prototype={constructor:M,type:"image",brush:function(R,b){var t=this.style,E=t.image;t.bind(R,this,b);var a=this._image=Q.createOrUpdateImage(E,this._image,this,this.onload);if(!a||!Q.isImageReady(a))return;var A=t.x||0,h=t.y||0,s=t.width,o=t.height,f=a.width/a.height;if(s==null&&o!=null?s=o*f:o==null&&s!=null?o=s/f:s==null&&o==null&&(s=a.width,o=a.height),this.setTransform(R),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;R.drawImage(a,u,c,t.sWidth,t.sHeight,A,h,s,o)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,i=s-u,l=o-c;R.drawImage(a,u,c,i,l,A,h,s,o)}else R.drawImage(a,A,h,s,o);t.text!=null&&(this.restoreTransform(R),this.drawRectText(R,this.getBoundingRect()))},getBoundingRect:function(){var R=this.style;return this._rect||(this._rect=new H(R.x||0,R.y||0,R.width||0,R.height||0)),this._rect}},O.inherits(M,Z);var _=M;Ve.exports=_},DlQD:function(Ve,Ae,N){(function(Z,H){Ve.exports=H()})(this,function(){"use strict";function Z(fe,ge){for(var Te=0;Te<ge.length;Te++){var me=ge[Te];me.enumerable=me.enumerable||!1,me.configurable=!0,"value"in me&&(me.writable=!0),Object.defineProperty(fe,me.key,me)}}function H(fe,ge,Te){return ge&&Z(fe.prototype,ge),Te&&Z(fe,Te),fe}function O(fe,ge){if(!fe)return;if(typeof fe=="string")return Q(fe,ge);var Te=Object.prototype.toString.call(fe).slice(8,-1);if(Te==="Object"&&fe.constructor&&(Te=fe.constructor.name),Te==="Map"||Te==="Set")return Array.from(fe);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return Q(fe,ge)}function Q(fe,ge){(ge==null||ge>fe.length)&&(ge=fe.length);for(var Te=0,me=new Array(ge);Te<ge;Te++)me[Te]=fe[Te];return me}function M(fe,ge){var Te;if(typeof Symbol=="undefined"||fe[Symbol.iterator]==null){if(Array.isArray(fe)||(Te=O(fe))||ge&&fe&&typeof fe.length=="number"){Te&&(fe=Te);var me=0;return function(){return me>=fe.length?{done:!0}:{done:!1,value:fe[me++]}}}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 Te=fe[Symbol.iterator](),Te.next.bind(Te)}function _(fe,ge){return ge={exports:{}},fe(ge,ge.exports),ge.exports}var R=_(function(fe){function ge(){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 Te(me){fe.exports.defaults=me}fe.exports={defaults:ge(),getDefaults:ge,changeDefaults:Te}}),b=R.defaults,t=R.getDefaults,E=R.changeDefaults,a=/[&<>"']/,A=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(ge){return o[ge]};function u(fe,ge){if(ge){if(a.test(fe))return fe.replace(A,f)}else if(h.test(fe))return fe.replace(s,f);return fe}var c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function i(fe){return fe.replace(c,function(ge,Te){return Te=Te.toLowerCase(),Te==="colon"?":":Te.charAt(0)==="#"?Te.charAt(1)==="x"?String.fromCharCode(parseInt(Te.substring(2),16)):String.fromCharCode(+Te.substring(1)):""})}var l=/(^|[^\[])\^/g;function v(fe,ge){fe=fe.source||fe,ge=ge||"";var Te={replace:function(Ee,xe){return xe=xe.source||xe,xe=xe.replace(l,"$1"),fe=fe.replace(Ee,xe),Te},getRegex:function(){return new RegExp(fe,ge)}};return Te}var B=/[^\w:]/g,C=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(fe,ge,Te){if(fe){var me;try{me=decodeURIComponent(i(Te)).replace(B,"").toLowerCase()}catch(Ee){return null}if(me.indexOf("javascript:")===0||me.indexOf("vbscript:")===0||me.indexOf("data:")===0)return null}ge&&!C.test(Te)&&(Te=m(ge,Te));try{Te=encodeURI(Te).replace(/%25/g,"%")}catch(Ee){return null}return Te}var w={},p=/^[^:]+:\/*[^/]*$/,n=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function m(fe,ge){w[" "+fe]||(p.test(fe)?w[" "+fe]=fe+"/":w[" "+fe]=U(fe,"/",!0)),fe=w[" "+fe];var Te=fe.indexOf(":")===-1;return ge.substring(0,2)==="//"?Te?ge:fe.replace(n,"$1")+ge:ge.charAt(0)==="/"?Te?ge:fe.replace(d,"$1")+ge:fe+ge}var T={exec:function(){}};function y(fe){for(var ge=1,Te,me;ge<arguments.length;ge++){Te=arguments[ge];for(me in Te)Object.prototype.hasOwnProperty.call(Te,me)&&(fe[me]=Te[me])}return fe}function g(fe,ge){var Te=fe.replace(/\|/g,function(xe,Ie,Pe){for(var Qe=!1,tt=Ie;--tt>=0&&Pe[tt]==="\\";)Qe=!Qe;return Qe?"|":" |"}),me=Te.split(/ \|/),Ee=0;if(me.length>ge)me.splice(ge);else for(;me.length<ge;)me.push("");for(;Ee<me.length;Ee++)me[Ee]=me[Ee].trim().replace(/\\\|/g,"|");return me}function U(fe,ge,Te){var me=fe.length;if(me===0)return"";for(var Ee=0;Ee<me;){var xe=fe.charAt(me-Ee-1);if(xe===ge&&!Te)Ee++;else if(xe!==ge&&Te)Ee++;else break}return fe.substr(0,me-Ee)}function P(fe,ge){if(fe.indexOf(ge[1])===-1)return-1;for(var Te=fe.length,me=0,Ee=0;Ee<Te;Ee++)if(fe[Ee]==="\\")Ee++;else if(fe[Ee]===ge[0])me++;else if(fe[Ee]===ge[1]&&(me--,me<0))return Ee;return-1}function I(fe){fe&&fe.sanitize&&!fe.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 G={escape:u,unescape:i,edit:v,cleanUrl:L,resolveUrl:m,noopTest:T,merge:y,splitCells:g,rtrim:U,findClosingBracket:P,checkSanitizeDeprecation:I},K=R.defaults,D=G.rtrim,J=G.splitCells,X=G.escape,ne=G.findClosingBracket;function ue(fe,ge,Te){var me=ge.href,Ee=ge.title?X(ge.title):null,xe=fe[1].replace(/\\([\[\]])/g,"$1");return fe[0].charAt(0)!=="!"?{type:"link",raw:Te,href:me,title:Ee,text:xe}:{type:"image",raw:Te,href:me,title:Ee,text:X(xe)}}function Oe(fe,ge){var Te=fe.match(/^(\s+)(?:```)/);if(Te===null)return ge;var me=Te[1];return ge.split(`
|
|
`).map(function(Ee){var xe=Ee.match(/^\s+/);if(xe===null)return Ee;var Ie=xe[0];return Ie.length>=me.length?Ee.slice(me.length):Ee}).join(`
|
|
`)}var _e=function(){function fe(Te){this.options=Te||K}var ge=fe.prototype;return ge.space=function(me){var Ee=this.rules.block.newline.exec(me);if(Ee)return Ee[0].length>1?{type:"space",raw:Ee[0]}:{raw:`
|
|
`}},ge.code=function(me,Ee){var xe=this.rules.block.code.exec(me);if(xe){var Ie=Ee[Ee.length-1];if(Ie&&Ie.type==="paragraph")return{raw:xe[0],text:xe[0].trimRight()};var Pe=xe[0].replace(/^ {4}/gm,"");return{type:"code",raw:xe[0],codeBlockStyle:"indented",text:this.options.pedantic?Pe:D(Pe,`
|
|
`)}}},ge.fences=function(me){var Ee=this.rules.block.fences.exec(me);if(Ee){var xe=Ee[0],Ie=Oe(xe,Ee[3]||"");return{type:"code",raw:xe,lang:Ee[2]?Ee[2].trim():Ee[2],text:Ie}}},ge.heading=function(me){var Ee=this.rules.block.heading.exec(me);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},ge.nptable=function(me){var Ee=this.rules.block.nptable.exec(me);if(Ee){var xe={type:"table",header:J(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
`):[],raw:Ee[0]};if(xe.header.length===xe.align.length){var Ie=xe.align.length,Pe;for(Pe=0;Pe<Ie;Pe++)/^ *-+: *$/.test(xe.align[Pe])?xe.align[Pe]="right":/^ *:-+: *$/.test(xe.align[Pe])?xe.align[Pe]="center":/^ *:-+ *$/.test(xe.align[Pe])?xe.align[Pe]="left":xe.align[Pe]=null;for(Ie=xe.cells.length,Pe=0;Pe<Ie;Pe++)xe.cells[Pe]=J(xe.cells[Pe],xe.header.length);return xe}}},ge.hr=function(me){var Ee=this.rules.block.hr.exec(me);if(Ee)return{type:"hr",raw:Ee[0]}},ge.blockquote=function(me){var Ee=this.rules.block.blockquote.exec(me);if(Ee){var xe=Ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ee[0],text:xe}}},ge.list=function(me){var Ee=this.rules.block.list.exec(me);if(Ee){for(var xe=Ee[0],Ie=Ee[2],Pe=Ie.length>1,Qe=Ie[Ie.length-1]===")",tt={type:"list",raw:xe,ordered:Pe,start:Pe?+Ie.slice(0,-1):"",loose:!1,items:[]},mt=Ee[0].match(this.rules.block.item),Bt=!1,Et,Ct,nt,qe,$e,Re,Ne,ct=mt.length,rt=0;rt<ct;rt++)Et=mt[rt],xe=Et,Ct=Et.length,Et=Et.replace(/^ *([*+-]|\d+[.)]) */,""),~Et.indexOf(`
|
|
`)&&(Ct-=Et.length,Et=this.options.pedantic?Et.replace(/^ {1,4}/gm,""):Et.replace(new RegExp("^ {1,"+Ct+"}","gm"),"")),rt!==ct-1&&(nt=this.rules.block.bullet.exec(mt[rt+1])[0],(Pe?nt.length===1||!Qe&&nt[nt.length-1]===")":nt.length>1||this.options.smartLists&&nt!==Ie)&&(qe=mt.slice(rt+1).join(`
|
|
`),tt.raw=tt.raw.substring(0,tt.raw.length-qe.length),rt=ct-1)),$e=Bt||/\n\n(?!\s*$)/.test(Et),rt!==ct-1&&(Bt=Et.charAt(Et.length-1)===`
|
|
`,$e||($e=Bt)),$e&&(tt.loose=!0),Re=/^\[[ xX]\] /.test(Et),Ne=void 0,Re&&(Ne=Et[1]!==" ",Et=Et.replace(/^\[[ xX]\] +/,"")),tt.items.push({type:"list_item",raw:xe,task:Re,checked:Ne,loose:$e,text:Et});return tt}},ge.html=function(me){var Ee=this.rules.block.html.exec(me);if(Ee)return{type:this.options.sanitize?"paragraph":"html",raw:Ee[0],pre:!this.options.sanitizer&&(Ee[1]==="pre"||Ee[1]==="script"||Ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ee[0]):X(Ee[0]):Ee[0]}},ge.def=function(me){var Ee=this.rules.block.def.exec(me);if(Ee){Ee[3]&&(Ee[3]=Ee[3].substring(1,Ee[3].length-1));var xe=Ee[1].toLowerCase().replace(/\s+/g," ");return{tag:xe,raw:Ee[0],href:Ee[2],title:Ee[3]}}},ge.table=function(me){var Ee=this.rules.block.table.exec(me);if(Ee){var xe={type:"table",header:J(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
`):[]};if(xe.header.length===xe.align.length){xe.raw=Ee[0];var Ie=xe.align.length,Pe;for(Pe=0;Pe<Ie;Pe++)/^ *-+: *$/.test(xe.align[Pe])?xe.align[Pe]="right":/^ *:-+: *$/.test(xe.align[Pe])?xe.align[Pe]="center":/^ *:-+ *$/.test(xe.align[Pe])?xe.align[Pe]="left":xe.align[Pe]=null;for(Ie=xe.cells.length,Pe=0;Pe<Ie;Pe++)xe.cells[Pe]=J(xe.cells[Pe].replace(/^ *\| *| *\| *$/g,""),xe.header.length);return xe}}},ge.lheading=function(me){var Ee=this.rules.block.lheading.exec(me);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[2].charAt(0)==="="?1:2,text:Ee[1]}},ge.paragraph=function(me){var Ee=this.rules.block.paragraph.exec(me);if(Ee)return{type:"paragraph",raw:Ee[0],text:Ee[1].charAt(Ee[1].length-1)===`
|
|
`?Ee[1].slice(0,-1):Ee[1]}},ge.text=function(me,Ee){var xe=this.rules.block.text.exec(me);if(xe){var Ie=Ee[Ee.length-1];return Ie&&Ie.type==="text"?{raw:xe[0],text:xe[0]}:{type:"text",raw:xe[0],text:xe[0]}}},ge.escape=function(me){var Ee=this.rules.inline.escape.exec(me);if(Ee)return{type:"escape",raw:Ee[0],text:X(Ee[1])}},ge.tag=function(me,Ee,xe){var Ie=this.rules.inline.tag.exec(me);if(Ie)return!Ee&&/^<a /i.test(Ie[0])?Ee=!0:Ee&&/^<\/a>/i.test(Ie[0])&&(Ee=!1),!xe&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ie[0])?xe=!0:xe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ie[0])&&(xe=!1),{type:this.options.sanitize?"text":"html",raw:Ie[0],inLink:Ee,inRawBlock:xe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ie[0]):X(Ie[0]):Ie[0]}},ge.link=function(me){var Ee=this.rules.inline.link.exec(me);if(Ee){var xe=ne(Ee[2],"()");if(xe>-1){var Ie=Ee[0].indexOf("!")===0?5:4,Pe=Ie+Ee[1].length+xe;Ee[2]=Ee[2].substring(0,xe),Ee[0]=Ee[0].substring(0,Pe).trim(),Ee[3]=""}var Qe=Ee[2],tt="";if(this.options.pedantic){var mt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Qe);mt?(Qe=mt[1],tt=mt[3]):tt=""}else tt=Ee[3]?Ee[3].slice(1,-1):"";Qe=Qe.trim().replace(/^<([\s\S]*)>$/,"$1");var Bt=ue(Ee,{href:Qe&&Qe.replace(this.rules.inline._escapes,"$1"),title:tt&&tt.replace(this.rules.inline._escapes,"$1")},Ee[0]);return Bt}},ge.reflink=function(me,Ee){var xe;if((xe=this.rules.inline.reflink.exec(me))||(xe=this.rules.inline.nolink.exec(me))){var Ie=(xe[2]||xe[1]).replace(/\s+/g," ");if(Ie=Ee[Ie.toLowerCase()],!Ie||!Ie.href){var Pe=xe[0].charAt(0);return{type:"text",raw:Pe,text:Pe}}var Qe=ue(xe,Ie,xe[0]);return Qe}},ge.strong=function(me,Ee,xe){xe===void 0&&(xe="");var Ie=this.rules.inline.strong.start.exec(me);if(Ie&&(!Ie[1]||Ie[1]&&(xe===""||this.rules.inline.punctuation.exec(xe)))){Ee=Ee.slice(-1*me.length);var Pe=Ie[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Pe.lastIndex=0;for(var Qe;(Ie=Pe.exec(Ee))!=null;)if(Qe=this.rules.inline.strong.middle.exec(Ee.slice(0,Ie.index+3)),Qe)return{type:"strong",raw:me.slice(0,Qe[0].length),text:me.slice(2,Qe[0].length-2)}}},ge.em=function(me,Ee,xe){xe===void 0&&(xe="");var Ie=this.rules.inline.em.start.exec(me);if(Ie&&(!Ie[1]||Ie[1]&&(xe===""||this.rules.inline.punctuation.exec(xe)))){Ee=Ee.slice(-1*me.length);var Pe=Ie[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Pe.lastIndex=0;for(var Qe;(Ie=Pe.exec(Ee))!=null;)if(Qe=this.rules.inline.em.middle.exec(Ee.slice(0,Ie.index+2)),Qe)return{type:"em",raw:me.slice(0,Qe[0].length),text:me.slice(1,Qe[0].length-1)}}},ge.codespan=function(me){var Ee=this.rules.inline.code.exec(me);if(Ee){var xe=Ee[2].replace(/\n/g," "),Ie=/[^ ]/.test(xe),Pe=xe.startsWith(" ")&&xe.endsWith(" ");return Ie&&Pe&&(xe=xe.substring(1,xe.length-1)),xe=X(xe,!0),{type:"codespan",raw:Ee[0],text:xe}}},ge.br=function(me){var Ee=this.rules.inline.br.exec(me);if(Ee)return{type:"br",raw:Ee[0]}},ge.del=function(me){var Ee=this.rules.inline.del.exec(me);if(Ee)return{type:"del",raw:Ee[0],text:Ee[1]}},ge.autolink=function(me,Ee){var xe=this.rules.inline.autolink.exec(me);if(xe){var Ie,Pe;return xe[2]==="@"?(Ie=X(this.options.mangle?Ee(xe[1]):xe[1]),Pe="mailto:"+Ie):(Ie=X(xe[1]),Pe=Ie),{type:"link",raw:xe[0],text:Ie,href:Pe,tokens:[{type:"text",raw:Ie,text:Ie}]}}},ge.url=function(me,Ee){var xe;if(xe=this.rules.inline.url.exec(me)){var Ie,Pe;if(xe[2]==="@")Ie=X(this.options.mangle?Ee(xe[0]):xe[0]),Pe="mailto:"+Ie;else{var Qe;do Qe=xe[0],xe[0]=this.rules.inline._backpedal.exec(xe[0])[0];while(Qe!==xe[0]);Ie=X(xe[0]),xe[1]==="www."?Pe="http://"+Ie:Pe=Ie}return{type:"link",raw:xe[0],text:Ie,href:Pe,tokens:[{type:"text",raw:Ie,text:Ie}]}}},ge.inlineText=function(me,Ee,xe){var Ie=this.rules.inline.text.exec(me);if(Ie){var Pe;return Ee?Pe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ie[0]):X(Ie[0]):Ie[0]:Pe=X(this.options.smartypants?xe(Ie[0]):Ie[0]),{type:"text",raw:Ie[0],text:Pe}}},fe}(),De=G.noopTest,Ue=G.edit,Ke=G.merge,Le={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:De,table:De,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Le._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Le._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Le.def=Ue(Le.def).replace("label",Le._label).replace("title",Le._title).getRegex(),Le.bullet=/(?:[*+-]|\d{1,9}[.)])/,Le.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Le.item=Ue(Le.item,"gm").replace(/bull/g,Le.bullet).getRegex(),Le.list=Ue(Le.list).replace(/bull/g,Le.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Le.def.source+")").getRegex(),Le._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",Le._comment=/<!--(?!-?>)[\s\S]*?-->/,Le.html=Ue(Le.html,"i").replace("comment",Le._comment).replace("tag",Le._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Le.paragraph=Ue(Le._paragraph).replace("hr",Le.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",Le._tag).getRegex(),Le.blockquote=Ue(Le.blockquote).replace("paragraph",Le.paragraph).getRegex(),Le.normal=Ke({},Le),Le.gfm=Ke({},Le.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*|$)"}),Le.gfm.nptable=Ue(Le.gfm.nptable).replace("hr",Le.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",Le._tag).getRegex(),Le.gfm.table=Ue(Le.gfm.table).replace("hr",Le.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",Le._tag).getRegex(),Le.pedantic=Ke({},Le.normal,{html:Ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Le._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:De,paragraph:Ue(Le.normal._paragraph).replace("hr",Le.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",Le.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ae={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:De,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:De,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ae._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ae.punctuation=Ue(ae.punctuation).replace(/punctuation/g,ae._punctuation).getRegex(),ae._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ae._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ae.em.start=Ue(ae.em.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.middle=Ue(ae.em.middle).replace(/punctuation/g,ae._punctuation).replace(/overlapSkip/g,ae._overlapSkip).getRegex(),ae.em.endAst=Ue(ae.em.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.endUnd=Ue(ae.em.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.start=Ue(ae.strong.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.middle=Ue(ae.strong.middle).replace(/punctuation/g,ae._punctuation).replace(/blockSkip/g,ae._blockSkip).getRegex(),ae.strong.endAst=Ue(ae.strong.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.endUnd=Ue(ae.strong.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.blockSkip=Ue(ae._blockSkip,"g").getRegex(),ae.overlapSkip=Ue(ae._overlapSkip,"g").getRegex(),ae._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ae._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ae._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])?)+(?![-_])/,ae.autolink=Ue(ae.autolink).replace("scheme",ae._scheme).replace("email",ae._email).getRegex(),ae._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ae.tag=Ue(ae.tag).replace("comment",Le._comment).replace("attribute",ae._attribute).getRegex(),ae._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ae._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ae._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ae.link=Ue(ae.link).replace("label",ae._label).replace("href",ae._href).replace("title",ae._title).getRegex(),ae.reflink=Ue(ae.reflink).replace("label",ae._label).getRegex(),ae.reflinkSearch=Ue(ae.reflinkSearch,"g").replace("reflink",ae.reflink).replace("nolink",ae.nolink).getRegex(),ae.normal=Ke({},ae),ae.pedantic=Ke({},ae.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:Ue(/^!?\[(label)\]\((.*?)\)/).replace("label",ae._label).getRegex(),reflink:Ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae._label).getRegex()}),ae.gfm=Ke({},ae.normal,{escape:Ue(ae.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ae.gfm.url=Ue(ae.gfm.url,"i").replace("email",ae.gfm._extended_email).getRegex(),ae.breaks=Ke({},ae.gfm,{br:Ue(ae.br).replace("{2,}","*").getRegex(),text:Ue(ae.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var V={block:Le,inline:ae},$=R.defaults,q=V.block,se=V.inline;function te(fe){return fe.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 oe(fe){var ge="",Te,me,Ee=fe.length;for(Te=0;Te<Ee;Te++)me=fe.charCodeAt(Te),Math.random()>.5&&(me="x"+me.toString(16)),ge+="&#"+me+";";return ge}var re=function(){function fe(Te){this.tokens=[],this.tokens.links=Object.create(null),this.options=Te||$,this.options.tokenizer=this.options.tokenizer||new _e,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var me={block:q.normal,inline:se.normal};this.options.pedantic?(me.block=q.pedantic,me.inline=se.pedantic):this.options.gfm&&(me.block=q.gfm,this.options.breaks?me.inline=se.breaks:me.inline=se.gfm),this.tokenizer.rules=me}fe.lex=function(me,Ee){var xe=new fe(Ee);return xe.lex(me)};var ge=fe.prototype;return ge.lex=function(me){return me=me.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(me,this.tokens,!0),this.inline(this.tokens),this.tokens},ge.blockTokens=function(me,Ee,xe){Ee===void 0&&(Ee=[]),xe===void 0&&(xe=!0),me=me.replace(/^ +$/gm,"");for(var Ie,Pe,Qe,tt;me;){if(Ie=this.tokenizer.space(me)){me=me.substring(Ie.raw.length),Ie.type&&Ee.push(Ie);continue}if(Ie=this.tokenizer.code(me,Ee)){me=me.substring(Ie.raw.length),Ie.type?Ee.push(Ie):(tt=Ee[Ee.length-1],tt.raw+=`
|
|
`+Ie.raw,tt.text+=`
|
|
`+Ie.text);continue}if(Ie=this.tokenizer.fences(me)){me=me.substring(Ie.raw.length),Ee.push(Ie);continue}if(Ie=this.tokenizer.heading(me)){me=me.substring(Ie.raw.length),Ee.push(Ie);continue}if(Ie=this.tokenizer.nptable(me)){me=me.substring(Ie.raw.length),Ee.push(Ie);continue}if(Ie=this.tokenizer.hr(me)){me=me.substring(Ie.raw.length),Ee.push(Ie);continue}if(Ie=this.tokenizer.blockquote(me)){me=me.substring(Ie.raw.length),Ie.tokens=this.blockTokens(Ie.text,[],xe),Ee.push(Ie);continue}if(Ie=this.tokenizer.list(me)){for(me=me.substring(Ie.raw.length),Qe=Ie.items.length,Pe=0;Pe<Qe;Pe++)Ie.items[Pe].tokens=this.blockTokens(Ie.items[Pe].text,[],!1);Ee.push(Ie);continue}if(Ie=this.tokenizer.html(me)){me=me.substring(Ie.raw.length),Ee.push(Ie);continue}if(xe&&(Ie=this.tokenizer.def(me))){me=me.substring(Ie.raw.length),this.tokens.links[Ie.tag]||(this.tokens.links[Ie.tag]={href:Ie.href,title:Ie.title});continue}if(Ie=this.tokenizer.table(me)){me=me.substring(Ie.raw.length),Ee.push(Ie);continue}if(Ie=this.tokenizer.lheading(me)){me=me.substring(Ie.raw.length),Ee.push(Ie);continue}if(xe&&(Ie=this.tokenizer.paragraph(me))){me=me.substring(Ie.raw.length),Ee.push(Ie);continue}if(Ie=this.tokenizer.text(me,Ee)){me=me.substring(Ie.raw.length),Ie.type?Ee.push(Ie):(tt=Ee[Ee.length-1],tt.raw+=`
|
|
`+Ie.raw,tt.text+=`
|
|
`+Ie.text);continue}if(me){var mt="Infinite loop on byte: "+me.charCodeAt(0);if(this.options.silent){console.error(mt);break}else throw new Error(mt)}}return Ee},ge.inline=function(me){var Ee,xe,Ie,Pe,Qe,tt,mt=me.length;for(Ee=0;Ee<mt;Ee++){tt=me[Ee];switch(tt.type){case"paragraph":case"text":case"heading":{tt.tokens=[],this.inlineTokens(tt.text,tt.tokens);break}case"table":{for(tt.tokens={header:[],cells:[]},Pe=tt.header.length,xe=0;xe<Pe;xe++)tt.tokens.header[xe]=[],this.inlineTokens(tt.header[xe],tt.tokens.header[xe]);for(Pe=tt.cells.length,xe=0;xe<Pe;xe++)for(Qe=tt.cells[xe],tt.tokens.cells[xe]=[],Ie=0;Ie<Qe.length;Ie++)tt.tokens.cells[xe][Ie]=[],this.inlineTokens(Qe[Ie],tt.tokens.cells[xe][Ie]);break}case"blockquote":{this.inline(tt.tokens);break}case"list":{for(Pe=tt.items.length,xe=0;xe<Pe;xe++)this.inline(tt.items[xe].tokens);break}}}return me},ge.inlineTokens=function(me,Ee,xe,Ie,Pe){Ee===void 0&&(Ee=[]),xe===void 0&&(xe=!1),Ie===void 0&&(Ie=!1),Pe===void 0&&(Pe="");var Qe,tt=me,mt;if(this.tokens.links){var Bt=Object.keys(this.tokens.links);if(Bt.length>0)for(;(mt=this.tokenizer.rules.inline.reflinkSearch.exec(tt))!=null;)Bt.includes(mt[0].slice(mt[0].lastIndexOf("[")+1,-1))&&(tt=tt.slice(0,mt.index)+"["+"a".repeat(mt[0].length-2)+"]"+tt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(mt=this.tokenizer.rules.inline.blockSkip.exec(tt))!=null;)tt=tt.slice(0,mt.index)+"["+"a".repeat(mt[0].length-2)+"]"+tt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;me;){if(Qe=this.tokenizer.escape(me)){me=me.substring(Qe.raw.length),Ee.push(Qe);continue}if(Qe=this.tokenizer.tag(me,xe,Ie)){me=me.substring(Qe.raw.length),xe=Qe.inLink,Ie=Qe.inRawBlock,Ee.push(Qe);continue}if(Qe=this.tokenizer.link(me)){me=me.substring(Qe.raw.length),Qe.type==="link"&&(Qe.tokens=this.inlineTokens(Qe.text,[],!0,Ie)),Ee.push(Qe);continue}if(Qe=this.tokenizer.reflink(me,this.tokens.links)){me=me.substring(Qe.raw.length),Qe.type==="link"&&(Qe.tokens=this.inlineTokens(Qe.text,[],!0,Ie)),Ee.push(Qe);continue}if(Qe=this.tokenizer.strong(me,tt,Pe)){me=me.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],xe,Ie),Ee.push(Qe);continue}if(Qe=this.tokenizer.em(me,tt,Pe)){me=me.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],xe,Ie),Ee.push(Qe);continue}if(Qe=this.tokenizer.codespan(me)){me=me.substring(Qe.raw.length),Ee.push(Qe);continue}if(Qe=this.tokenizer.br(me)){me=me.substring(Qe.raw.length),Ee.push(Qe);continue}if(Qe=this.tokenizer.del(me)){me=me.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],xe,Ie),Ee.push(Qe);continue}if(Qe=this.tokenizer.autolink(me,oe)){me=me.substring(Qe.raw.length),Ee.push(Qe);continue}if(!xe&&(Qe=this.tokenizer.url(me,oe))){me=me.substring(Qe.raw.length),Ee.push(Qe);continue}if(Qe=this.tokenizer.inlineText(me,Ie,te)){me=me.substring(Qe.raw.length),Pe=Qe.raw.slice(-1),Ee.push(Qe);continue}if(me){var Et="Infinite loop on byte: "+me.charCodeAt(0);if(this.options.silent){console.error(Et);break}else throw new Error(Et)}}return Ee},H(fe,null,[{key:"rules",get:function(){return{block:q,inline:se}}}]),fe}(),ie=R.defaults,ee=G.cleanUrl,de=G.escape,Ce=function(){function fe(Te){this.options=Te||ie}var ge=fe.prototype;return ge.code=function(me,Ee,xe){var Ie=(Ee||"").match(/\S*/)[0];if(this.options.highlight){var Pe=this.options.highlight(me,Ie);Pe!=null&&Pe!==me&&(xe=!0,me=Pe)}return Ie?'<pre><code class="'+this.options.langPrefix+de(Ie,!0)+'">'+(xe?me:de(me,!0))+`</code></pre>
|
|
`:"<pre><code>"+(xe?me:de(me,!0))+`</code></pre>
|
|
`},ge.blockquote=function(me){return`<blockquote>
|
|
`+me+`</blockquote>
|
|
`},ge.html=function(me){return me},ge.heading=function(me,Ee,xe,Ie){return this.options.headerIds?"<h"+Ee+' id="'+this.options.headerPrefix+Ie.slug(xe)+'">'+me+"</h"+Ee+`>
|
|
`:"<h"+Ee+">"+me+"</h"+Ee+`>
|
|
`},ge.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},ge.list=function(me,Ee,xe){var Ie=Ee?"ol":"ul",Pe=Ee&&xe!==1?' start="'+xe+'"':"";return"<"+Ie+Pe+`>
|
|
`+me+"</"+Ie+`>
|
|
`},ge.listitem=function(me){return"<li>"+me+`</li>
|
|
`},ge.checkbox=function(me){return"<input "+(me?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ge.paragraph=function(me){return"<p>"+me+`</p>
|
|
`},ge.table=function(me,Ee){return Ee&&(Ee="<tbody>"+Ee+"</tbody>"),`<table>
|
|
<thead>
|
|
`+me+`</thead>
|
|
`+Ee+`</table>
|
|
`},ge.tablerow=function(me){return`<tr>
|
|
`+me+`</tr>
|
|
`},ge.tablecell=function(me,Ee){var xe=Ee.header?"th":"td",Ie=Ee.align?"<"+xe+' align="'+Ee.align+'">':"<"+xe+">";return Ie+me+"</"+xe+`>
|
|
`},ge.strong=function(me){return"<strong>"+me+"</strong>"},ge.em=function(me){return"<em>"+me+"</em>"},ge.codespan=function(me){return"<code>"+me+"</code>"},ge.br=function(){return this.options.xhtml?"<br/>":"<br>"},ge.del=function(me){return"<del>"+me+"</del>"},ge.link=function(me,Ee,xe){if(me=ee(this.options.sanitize,this.options.baseUrl,me),me===null)return xe;var Ie='<a href="'+de(me)+'"';return Ee&&(Ie+=' title="'+Ee+'"'),Ie+=">"+xe+"</a>",Ie},ge.image=function(me,Ee,xe){if(me=ee(this.options.sanitize,this.options.baseUrl,me),me===null)return xe;var Ie='<img src="'+me+'" alt="'+xe+'"';return Ee&&(Ie+=' title="'+Ee+'"'),Ie+=this.options.xhtml?"/>":">",Ie},ge.text=function(me){return me},fe}(),Me=function(){function fe(){}var ge=fe.prototype;return ge.strong=function(me){return me},ge.em=function(me){return me},ge.codespan=function(me){return me},ge.del=function(me){return me},ge.html=function(me){return me},ge.text=function(me){return me},ge.link=function(me,Ee,xe){return""+xe},ge.image=function(me,Ee,xe){return""+xe},ge.br=function(){return""},fe}(),Ye=function(){function fe(){this.seen={}}var ge=fe.prototype;return ge.slug=function(me){var Ee=me.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ee)){var xe=Ee;do this.seen[xe]++,Ee=xe+"-"+this.seen[xe];while(this.seen.hasOwnProperty(Ee))}return this.seen[Ee]=0,Ee},fe}(),et=R.defaults,st=G.unescape,ut=function(){function fe(Te){this.options=Te||et,this.options.renderer=this.options.renderer||new Ce,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Me,this.slugger=new Ye}fe.parse=function(me,Ee){var xe=new fe(Ee);return xe.parse(me)};var ge=fe.prototype;return ge.parse=function(me,Ee){Ee===void 0&&(Ee=!0);var xe="",Ie,Pe,Qe,tt,mt,Bt,Et,Ct,nt,qe,$e,Re,Ne,ct,rt,gt,pt,at,vt=me.length;for(Ie=0;Ie<vt;Ie++){qe=me[Ie];switch(qe.type){case"space":continue;case"hr":{xe+=this.renderer.hr();continue}case"heading":{xe+=this.renderer.heading(this.parseInline(qe.tokens),qe.depth,st(this.parseInline(qe.tokens,this.textRenderer)),this.slugger);continue}case"code":{xe+=this.renderer.code(qe.text,qe.lang,qe.escaped);continue}case"table":{for(Ct="",Et="",tt=qe.header.length,Pe=0;Pe<tt;Pe++)Et+=this.renderer.tablecell(this.parseInline(qe.tokens.header[Pe]),{header:!0,align:qe.align[Pe]});for(Ct+=this.renderer.tablerow(Et),nt="",tt=qe.cells.length,Pe=0;Pe<tt;Pe++){for(Bt=qe.tokens.cells[Pe],Et="",mt=Bt.length,Qe=0;Qe<mt;Qe++)Et+=this.renderer.tablecell(this.parseInline(Bt[Qe]),{header:!1,align:qe.align[Qe]});nt+=this.renderer.tablerow(Et)}xe+=this.renderer.table(Ct,nt);continue}case"blockquote":{nt=this.parse(qe.tokens),xe+=this.renderer.blockquote(nt);continue}case"list":{for($e=qe.ordered,Re=qe.start,Ne=qe.loose,tt=qe.items.length,nt="",Pe=0;Pe<tt;Pe++)rt=qe.items[Pe],gt=rt.checked,pt=rt.task,ct="",rt.task&&(at=this.renderer.checkbox(gt),Ne?rt.tokens.length>0&&rt.tokens[0].type==="text"?(rt.tokens[0].text=at+" "+rt.tokens[0].text,rt.tokens[0].tokens&&rt.tokens[0].tokens.length>0&&rt.tokens[0].tokens[0].type==="text"&&(rt.tokens[0].tokens[0].text=at+" "+rt.tokens[0].tokens[0].text)):rt.tokens.unshift({type:"text",text:at}):ct+=at),ct+=this.parse(rt.tokens,Ne),nt+=this.renderer.listitem(ct,pt,gt);xe+=this.renderer.list(nt,$e,Re);continue}case"html":{xe+=this.renderer.html(qe.text);continue}case"paragraph":{xe+=this.renderer.paragraph(this.parseInline(qe.tokens));continue}case"text":{for(nt=qe.tokens?this.parseInline(qe.tokens):qe.text;Ie+1<vt&&me[Ie+1].type==="text";)qe=me[++Ie],nt+=`
|
|
`+(qe.tokens?this.parseInline(qe.tokens):qe.text);xe+=Ee?this.renderer.paragraph(nt):nt;continue}default:{var St='Token with "'+qe.type+'" type was not found.';if(this.options.silent){console.error(St);return}else throw new Error(St)}}}return xe},ge.parseInline=function(me,Ee){Ee=Ee||this.renderer;var xe="",Ie,Pe,Qe=me.length;for(Ie=0;Ie<Qe;Ie++){Pe=me[Ie];switch(Pe.type){case"escape":{xe+=Ee.text(Pe.text);break}case"html":{xe+=Ee.html(Pe.text);break}case"link":{xe+=Ee.link(Pe.href,Pe.title,this.parseInline(Pe.tokens,Ee));break}case"image":{xe+=Ee.image(Pe.href,Pe.title,Pe.text);break}case"strong":{xe+=Ee.strong(this.parseInline(Pe.tokens,Ee));break}case"em":{xe+=Ee.em(this.parseInline(Pe.tokens,Ee));break}case"codespan":{xe+=Ee.codespan(Pe.text);break}case"br":{xe+=Ee.br();break}case"del":{xe+=Ee.del(this.parseInline(Pe.tokens,Ee));break}case"text":{xe+=Ee.text(Pe.text);break}default:{var tt='Token with "'+Pe.type+'" type was not found.';if(this.options.silent){console.error(tt);return}else throw new Error(tt)}}}return xe},fe}(),yt=G.merge,xt=G.checkSanitizeDeprecation,je=G.escape,He=R.getDefaults,ot=R.changeDefaults,ht=R.defaults;function we(fe,ge,Te){if(typeof fe=="undefined"||fe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof fe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(fe)+", string expected");if(typeof ge=="function"&&(Te=ge,ge=null),ge=yt({},we.defaults,ge||{}),xt(ge),Te){var me=ge.highlight,Ee;try{Ee=re.lex(fe,ge)}catch(Qe){return Te(Qe)}var xe=function(tt){var mt;if(!tt)try{mt=ut.parse(Ee,ge)}catch(Bt){tt=Bt}return ge.highlight=me,tt?Te(tt):Te(null,mt)};if(!me||me.length<3)return xe();if(delete ge.highlight,!Ee.length)return xe();var Ie=0;we.walkTokens(Ee,function(Qe){Qe.type==="code"&&(Ie++,setTimeout(function(){me(Qe.text,Qe.lang,function(tt,mt){if(tt)return xe(tt);mt!=null&&mt!==Qe.text&&(Qe.text=mt,Qe.escaped=!0),Ie--,Ie===0&&xe()})},0))}),Ie===0&&xe();return}try{var Pe=re.lex(fe,ge);return ge.walkTokens&&we.walkTokens(Pe,ge.walkTokens),ut.parse(Pe,ge)}catch(Qe){if(Qe.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ge.silent)return"<p>An error occurred:</p><pre>"+je(Qe.message+"",!0)+"</pre>";throw Qe}}we.options=we.setOptions=function(fe){return yt(we.defaults,fe),ot(we.defaults),we},we.getDefaults=He,we.defaults=ht,we.use=function(fe){var ge=yt({},fe);if(fe.renderer&&function(){var me=we.defaults.renderer||new Ce,Ee=function(Pe){var Qe=me[Pe];me[Pe]=function(){for(var tt=arguments.length,mt=new Array(tt),Bt=0;Bt<tt;Bt++)mt[Bt]=arguments[Bt];var Et=fe.renderer[Pe].apply(me,mt);return Et===!1&&(Et=Qe.apply(me,mt)),Et}};for(var xe in fe.renderer)Ee(xe);ge.renderer=me}(),fe.tokenizer&&function(){var me=we.defaults.tokenizer||new _e,Ee=function(Pe){var Qe=me[Pe];me[Pe]=function(){for(var tt=arguments.length,mt=new Array(tt),Bt=0;Bt<tt;Bt++)mt[Bt]=arguments[Bt];var Et=fe.tokenizer[Pe].apply(me,mt);return Et===!1&&(Et=Qe.apply(me,mt)),Et}};for(var xe in fe.tokenizer)Ee(xe);ge.tokenizer=me}(),fe.walkTokens){var Te=we.defaults.walkTokens;ge.walkTokens=function(me){fe.walkTokens(me),Te&&Te(me)}}we.setOptions(ge)},we.walkTokens=function(fe,ge){for(var Te=M(fe),me;!(me=Te()).done;){var Ee=me.value;ge(Ee);switch(Ee.type){case"table":{for(var xe=M(Ee.tokens.header),Ie;!(Ie=xe()).done;){var Pe=Ie.value;we.walkTokens(Pe,ge)}for(var Qe=M(Ee.tokens.cells),tt;!(tt=Qe()).done;)for(var mt=tt.value,Bt=M(mt),Et;!(Et=Bt()).done;){var Ct=Et.value;we.walkTokens(Ct,ge)}break}case"list":{we.walkTokens(Ee.items,ge);break}default:Ee.tokens&&we.walkTokens(Ee.tokens,ge)}}},we.Parser=ut,we.parser=ut.parse,we.Renderer=Ce,we.TextRenderer=Me,we.Lexer=re,we.lexer=re.lex,we.Tokenizer=_e,we.Slugger=Ye,we.parse=we;var he=we;return he})},ELLl:function(Ve,Ae,N){(function(Z){Z(N("VrN/"))})(function(Z){var H={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},O=Z.Pos;Z.defineOption("autoCloseBrackets",!1,function(o,f,u){u&&u!=Z.Init&&(o.removeKeyMap(M),o.state.closeBrackets=null),f&&(_(Q(f,"pairs")),o.state.closeBrackets=f,o.addKeyMap(M))});function Q(o,f){return f=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[f]!=null?o[f]:H[f]}var M={Backspace:t,Enter:E};function _(o){for(var f=0;f<o.length;f++){var u=o.charAt(f),c="'"+u+"'";M[c]||(M[c]=R(u))}}_(H.pairs+"`");function R(o){return function(f){return A(f,o)}}function b(o){var f=o.state.closeBrackets;if(!f||f.override)return f;var u=o.getModeAt(o.getCursor());return u.closeBrackets||f}function t(o){var f=b(o);if(!f||o.getOption("disableInput"))return Z.Pass;for(var u=Q(f,"pairs"),c=o.listSelections(),i=0;i<c.length;i++){if(!c[i].empty())return Z.Pass;var l=h(o,c[i].head);if(!l||u.indexOf(l)%2!=0)return Z.Pass}for(var i=c.length-1;i>=0;i--){var v=c[i].head;o.replaceRange("",O(v.line,v.ch-1),O(v.line,v.ch+1),"+delete")}}function E(o){var f=b(o),u=f&&Q(f,"explode");if(!u||o.getOption("disableInput"))return Z.Pass;for(var c=o.listSelections(),i=0;i<c.length;i++){if(!c[i].empty())return Z.Pass;var l=h(o,c[i].head);if(!l||u.indexOf(l)%2!=0)return Z.Pass}o.operation(function(){var v=o.lineSeparator()||`
|
|
`;o.replaceSelection(v+v,null),o.execCommand("goCharLeft"),c=o.listSelections();for(var B=0;B<c.length;B++){var C=c[B].head.line;o.indentLine(C,null,!0),o.indentLine(C+1,null,!0)}})}function a(o){var f=Z.cmpPos(o.anchor,o.head)>0;return{anchor:new O(o.anchor.line,o.anchor.ch+(f?-1:1)),head:new O(o.head.line,o.head.ch+(f?1:-1))}}function A(o,f){var u=b(o);if(!u||o.getOption("disableInput"))return Z.Pass;var c=Q(u,"pairs"),i=c.indexOf(f);if(i==-1)return Z.Pass;for(var l=Q(u,"closeBefore"),v=Q(u,"triples"),B=c.charAt(i+1)==f,C=o.listSelections(),L=i%2==0,w,p=0;p<C.length;p++){var n=C[p],d=n.head,m,T=o.getRange(d,O(d.line,d.ch+1));if(L&&!n.empty())m="surround";else if((B||!L)&&T==f)B&&s(o,d)?m="both":v.indexOf(f)>=0&&o.getRange(d,O(d.line,d.ch+3))==f+f+f?m="skipThree":m="skip";else if(B&&d.ch>1&&v.indexOf(f)>=0&&o.getRange(O(d.line,d.ch-2),d)==f+f){if(d.ch>2&&/\bstring/.test(o.getTokenTypeAt(O(d.line,d.ch-2))))return Z.Pass;m="addFour"}else if(B){var y=d.ch==0?" ":o.getRange(O(d.line,d.ch-1),d);if(!Z.isWordChar(T)&&y!=f&&!Z.isWordChar(y))m="both";else return Z.Pass}else if(L&&(T.length===0||/\s/.test(T)||l.indexOf(T)>-1))m="both";else return Z.Pass;if(!w)w=m;else if(w!=m)return Z.Pass}var g=i%2?c.charAt(i-1):f,U=i%2?f:c.charAt(i+1);o.operation(function(){if(w=="skip")o.execCommand("goCharRight");else if(w=="skipThree")for(var P=0;P<3;P++)o.execCommand("goCharRight");else if(w=="surround"){for(var I=o.getSelections(),P=0;P<I.length;P++)I[P]=g+I[P]+U;o.replaceSelections(I,"around"),I=o.listSelections().slice();for(var P=0;P<I.length;P++)I[P]=a(I[P]);o.setSelections(I)}else w=="both"?(o.replaceSelection(g+U,null),o.triggerElectric(g+U),o.execCommand("goCharLeft")):w=="addFour"&&(o.replaceSelection(g+g+g+g,"before"),o.execCommand("goCharRight"))})}function h(o,f){var u=o.getRange(O(f.line,f.ch-1),O(f.line,f.ch+1));return u.length==2?u:null}function s(o,f){var u=o.getTokenAt(O(f.line,f.ch+1));return/\bstring/.test(u.type)&&u.start==f.ch&&(f.ch==0||!/\bstring/.test(o.getTokenTypeAt(f)))}})},FWmy:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return Z});function Z(H,O){if(!H)throw new Error(O?`Assertion failed (${O})`:"Assertion Failed")}},Fofx:function(Ve,Ae){var N=typeof Float32Array=="undefined"?Array:Float32Array;function Z(){var E=new N(6);return H(E),E}function H(E){return E[0]=1,E[1]=0,E[2]=0,E[3]=1,E[4]=0,E[5]=0,E}function O(E,a){return E[0]=a[0],E[1]=a[1],E[2]=a[2],E[3]=a[3],E[4]=a[4],E[5]=a[5],E}function Q(E,a,A){var h=a[0]*A[0]+a[2]*A[1],s=a[1]*A[0]+a[3]*A[1],o=a[0]*A[2]+a[2]*A[3],f=a[1]*A[2]+a[3]*A[3],u=a[0]*A[4]+a[2]*A[5]+a[4],c=a[1]*A[4]+a[3]*A[5]+a[5];return E[0]=h,E[1]=s,E[2]=o,E[3]=f,E[4]=u,E[5]=c,E}function M(E,a,A){return E[0]=a[0],E[1]=a[1],E[2]=a[2],E[3]=a[3],E[4]=a[4]+A[0],E[5]=a[5]+A[1],E}function _(E,a,A){var h=a[0],s=a[2],o=a[4],f=a[1],u=a[3],c=a[5],i=Math.sin(A),l=Math.cos(A);return E[0]=h*l+f*i,E[1]=-h*i+f*l,E[2]=s*l+u*i,E[3]=-s*i+l*u,E[4]=l*o+i*c,E[5]=l*c-i*o,E}function R(E,a,A){var h=A[0],s=A[1];return E[0]=a[0]*h,E[1]=a[1]*s,E[2]=a[2]*h,E[3]=a[3]*s,E[4]=a[4]*h,E[5]=a[5]*s,E}function b(E,a){var A=a[0],h=a[2],s=a[4],o=a[1],f=a[3],u=a[5],c=A*f-o*h;return c?(c=1/c,E[0]=f*c,E[1]=-o*c,E[2]=-h*c,E[3]=A*c,E[4]=(h*u-f*s)*c,E[5]=(o*s-A*u)*c,E):null}function t(E){var a=Z();return O(a,E),a}Ae.create=Z,Ae.identity=H,Ae.copy=O,Ae.mul=Q,Ae.translate=M,Ae.rotate=_,Ae.scale=R,Ae.invert=b,Ae.clone=t},FxDU:function(Ve,Ae,N){"use strict";Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.createSensor=void 0;var Z=N("QO+J"),H=N("j5sG"),O=typeof ResizeObserver!="undefined"?H.createSensor:Z.createSensor;Ae.createSensor=O},Gev7:function(Ve,Ae,N){var Z=N("bYtY"),H=N("K2GJ"),O=N("1bdT"),Q=N("ni6a");function M(R){R=R||{},O.call(this,R);for(var b in R)R.hasOwnProperty(b)&&b!=="style"&&(this[b]=R[b]);this.style=new H(R.style,this),this._rect=null,this.__clipPaths=null}M.prototype={constructor:M,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(R){},afterBrush:function(R){},brush:function(R,b){},getBoundingRect:function(){},contain:function(R,b){return this.rectContain(R,b)},traverse:function(R,b){R.call(b,this)},rectContain:function(R,b){var t=this.transformCoordToLocal(R,b),E=this.getBoundingRect();return E.contain(t[0],t[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(R){return this.animate("style",R)},attrKV:function(R,b){R!=="style"?O.prototype.attrKV.call(this,R,b):this.style.set(b)},setStyle:function(R,b){return this.style.set(R,b),this.dirty(!1),this},useStyle:function(R){return this.style=new H(R,this),this.dirty(!1),this},calculateTextPosition:null},Z.inherits(M,O),Z.mixin(M,Q);var _=M;Ve.exports=_},Gytx:function(Ve,Ae){Ve.exports=function(Z,H,O,Q){var M=O?O.call(Q,Z,H):void 0;if(M!==void 0)return!!M;if(Z===H)return!0;if(typeof Z!="object"||!Z||typeof H!="object"||!H)return!1;var _=Object.keys(Z),R=Object.keys(H);if(_.length!==R.length)return!1;for(var b=Object.prototype.hasOwnProperty.bind(H),t=0;t<_.length;t++){var E=_[t];if(!b(E))return!1;var a=Z[E],A=H[E];if(M=O?O.call(Q,a,A,E):void 0,M===!1||M===void 0&&a!==A)return!1}return!0}},H6uX:function(Ve,Ae){var N=Array.prototype.slice,Z=function(M){this._$handlers={},this._$eventProcessor=M};Z.prototype={constructor:Z,one:function(M,_,R,b){return O(this,M,_,R,b,!0)},on:function(M,_,R,b){return O(this,M,_,R,b,!1)},isSilent:function(M){var _=this._$handlers;return!_[M]||!_[M].length},off:function(M,_){var R=this._$handlers;if(!M)return this._$handlers={},this;if(_){if(R[M]){for(var b=[],t=0,E=R[M].length;t<E;t++)R[M][t].h!==_&&b.push(R[M][t]);R[M]=b}R[M]&&R[M].length===0&&delete R[M]}else delete R[M];return this},trigger:function(M){var _=this._$handlers[M],R=this._$eventProcessor;if(_){var b=arguments,t=b.length;t>3&&(b=N.call(b,1));for(var E=_.length,a=0;a<E;){var A=_[a];if(R&&R.filter&&A.query!=null&&!R.filter(M,A.query)){a++;continue}switch(t){case 1:A.h.call(A.ctx);break;case 2:A.h.call(A.ctx,b[1]);break;case 3:A.h.call(A.ctx,b[1],b[2]);break;default:A.h.apply(A.ctx,b);break}A.one?(_.splice(a,1),E--):a++}}return R&&R.afterTrigger&&R.afterTrigger(M),this},triggerWithContext:function(M){var _=this._$handlers[M],R=this._$eventProcessor;if(_){var b=arguments,t=b.length;t>4&&(b=N.call(b,1,b.length-1));for(var E=b[b.length-1],a=_.length,A=0;A<a;){var h=_[A];if(R&&R.filter&&h.query!=null&&!R.filter(M,h.query)){A++;continue}switch(t){case 1:h.h.call(E);break;case 2:h.h.call(E,b[1]);break;case 3:h.h.call(E,b[1],b[2]);break;default:h.h.apply(E,b);break}h.one?(_.splice(A,1),a--):A++}}return R&&R.afterTrigger&&R.afterTrigger(M),this}};function H(M,_){var R=M._$eventProcessor;return _!=null&&R&&R.normalizeQuery&&(_=R.normalizeQuery(_)),_}function O(M,_,R,b,t,E){var a=M._$handlers;if(typeof R=="function"&&(t=b,b=R,R=null),!b||!_)return M;R=H(M,R),a[_]||(a[_]=[]);for(var A=0;A<a[_].length;A++)if(a[_][A].h===b)return M;var h={h:b,one:E,query:R,ctx:t||M,callAtLast:b.zrEventfulCallAtLast},s=a[_].length-1,o=a[_][s];return o&&o.callAtLast?a[_].splice(s,0,h):a[_].push(h),M}var Q=Z;Ve.exports=Q},H7XF:function(Ve,Ae,N){"use strict";Ae.byteLength=b,Ae.toByteArray=E,Ae.fromByteArray=h;for(var Z=[],H=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=0,_=Q.length;M<_;++M)Z[M]=Q[M],H[Q.charCodeAt(M)]=M;H["-".charCodeAt(0)]=62,H["_".charCodeAt(0)]=63;function R(s){var o=s.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=s.indexOf("=");f===-1&&(f=o);var u=f===o?0:4-f%4;return[f,u]}function b(s){var o=R(s),f=o[0],u=o[1];return(f+u)*3/4-u}function t(s,o,f){return(o+f)*3/4-f}function E(s){var o,f=R(s),u=f[0],c=f[1],i=new O(t(s,u,c)),l=0,v=c>0?u-4:u,B;for(B=0;B<v;B+=4)o=H[s.charCodeAt(B)]<<18|H[s.charCodeAt(B+1)]<<12|H[s.charCodeAt(B+2)]<<6|H[s.charCodeAt(B+3)],i[l++]=o>>16&255,i[l++]=o>>8&255,i[l++]=o&255;return c===2&&(o=H[s.charCodeAt(B)]<<2|H[s.charCodeAt(B+1)]>>4,i[l++]=o&255),c===1&&(o=H[s.charCodeAt(B)]<<10|H[s.charCodeAt(B+1)]<<4|H[s.charCodeAt(B+2)]>>2,i[l++]=o>>8&255,i[l++]=o&255),i}function a(s){return Z[s>>18&63]+Z[s>>12&63]+Z[s>>6&63]+Z[s&63]}function A(s,o,f){for(var u,c=[],i=o;i<f;i+=3)u=(s[i]<<16&16711680)+(s[i+1]<<8&65280)+(s[i+2]&255),c.push(a(u));return c.join("")}function h(s){for(var o,f=s.length,u=f%3,c=[],i=16383,l=0,v=f-u;l<v;l+=i)c.push(A(s,l,l+i>v?v:l+i));return u===1?(o=s[f-1],c.push(Z[o>>2]+Z[o<<4&63]+"==")):u===2&&(o=(s[f-2]<<8)+s[f-1],c.push(Z[o>>10]+Z[o>>4&63]+Z[o<<2&63]+"=")),c.join("")}},HDXh:function(Ve,Ae,N){"use strict";(function(Z){/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/var H=N("H7XF"),O=N("kVK+"),Q=N("49sm");Ae.Buffer=b,Ae.SlowBuffer=c,Ae.INSPECT_MAX_BYTES=50,b.TYPED_ARRAY_SUPPORT=Z.TYPED_ARRAY_SUPPORT!==void 0?Z.TYPED_ARRAY_SUPPORT:M(),Ae.kMaxLength=_();function M(){try{var oe=new Uint8Array(1);return oe.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},oe.foo()===42&&typeof oe.subarray=="function"&&oe.subarray(1,1).byteLength===0}catch(re){return!1}}function _(){return b.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function R(oe,re){if(_()<re)throw new RangeError("Invalid typed array length");return b.TYPED_ARRAY_SUPPORT?(oe=new Uint8Array(re),oe.__proto__=b.prototype):(oe===null&&(oe=new b(re)),oe.length=re),oe}function b(oe,re,ie){if(!b.TYPED_ARRAY_SUPPORT&&!(this instanceof b))return new b(oe,re,ie);if(typeof oe=="number"){if(typeof re=="string")throw new Error("If encoding is specified then the first argument must be a string");return A(this,oe)}return t(this,oe,re,ie)}b.poolSize=8192,b._augment=function(oe){return oe.__proto__=b.prototype,oe};function t(oe,re,ie,ee){if(typeof re=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&re instanceof ArrayBuffer?o(oe,re,ie,ee):typeof re=="string"?h(oe,re,ie):f(oe,re)}b.from=function(oe,re,ie){return t(null,oe,re,ie)},b.TYPED_ARRAY_SUPPORT&&(b.prototype.__proto__=Uint8Array.prototype,b.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&b[Symbol.species]===b&&Object.defineProperty(b,Symbol.species,{value:null,configurable:!0}));function E(oe){if(typeof oe!="number")throw new TypeError('"size" argument must be a number');if(oe<0)throw new RangeError('"size" argument must not be negative')}function a(oe,re,ie,ee){return E(re),re<=0?R(oe,re):ie!==void 0?typeof ee=="string"?R(oe,re).fill(ie,ee):R(oe,re).fill(ie):R(oe,re)}b.alloc=function(oe,re,ie){return a(null,oe,re,ie)};function A(oe,re){if(E(re),oe=R(oe,re<0?0:u(re)|0),!b.TYPED_ARRAY_SUPPORT)for(var ie=0;ie<re;++ie)oe[ie]=0;return oe}b.allocUnsafe=function(oe){return A(null,oe)},b.allocUnsafeSlow=function(oe){return A(null,oe)};function h(oe,re,ie){if((typeof ie!="string"||ie==="")&&(ie="utf8"),!b.isEncoding(ie))throw new TypeError('"encoding" must be a valid string encoding');var ee=i(re,ie)|0;oe=R(oe,ee);var de=oe.write(re,ie);return de!==ee&&(oe=oe.slice(0,de)),oe}function s(oe,re){var ie=re.length<0?0:u(re.length)|0;oe=R(oe,ie);for(var ee=0;ee<ie;ee+=1)oe[ee]=re[ee]&255;return oe}function o(oe,re,ie,ee){if(re.byteLength,ie<0||re.byteLength<ie)throw new RangeError("'offset' is out of bounds");if(re.byteLength<ie+(ee||0))throw new RangeError("'length' is out of bounds");return ie===void 0&&ee===void 0?re=new Uint8Array(re):ee===void 0?re=new Uint8Array(re,ie):re=new Uint8Array(re,ie,ee),b.TYPED_ARRAY_SUPPORT?(oe=re,oe.__proto__=b.prototype):oe=s(oe,re),oe}function f(oe,re){if(b.isBuffer(re)){var ie=u(re.length)|0;return oe=R(oe,ie),oe.length===0||re.copy(oe,0,0,ie),oe}if(re){if(typeof ArrayBuffer!="undefined"&&re.buffer instanceof ArrayBuffer||"length"in re)return typeof re.length!="number"||te(re.length)?R(oe,0):s(oe,re);if(re.type==="Buffer"&&Q(re.data))return s(oe,re.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function u(oe){if(oe>=_())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_().toString(16)+" bytes");return oe|0}function c(oe){return+oe!=oe&&(oe=0),b.alloc(+oe)}b.isBuffer=function(re){return!!(re!=null&&re._isBuffer)},b.compare=function(re,ie){if(!b.isBuffer(re)||!b.isBuffer(ie))throw new TypeError("Arguments must be Buffers");if(re===ie)return 0;for(var ee=re.length,de=ie.length,Ce=0,Me=Math.min(ee,de);Ce<Me;++Ce)if(re[Ce]!==ie[Ce]){ee=re[Ce],de=ie[Ce];break}return ee<de?-1:de<ee?1:0},b.isEncoding=function(re){switch(String(re).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},b.concat=function(re,ie){if(!Q(re))throw new TypeError('"list" argument must be an Array of Buffers');if(re.length===0)return b.alloc(0);var ee;if(ie===void 0)for(ie=0,ee=0;ee<re.length;++ee)ie+=re[ee].length;var de=b.allocUnsafe(ie),Ce=0;for(ee=0;ee<re.length;++ee){var Me=re[ee];if(!b.isBuffer(Me))throw new TypeError('"list" argument must be an Array of Buffers');Me.copy(de,Ce),Ce+=Me.length}return de};function i(oe,re){if(b.isBuffer(oe))return oe.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(oe)||oe instanceof ArrayBuffer))return oe.byteLength;typeof oe!="string"&&(oe=""+oe);var ie=oe.length;if(ie===0)return 0;for(var ee=!1;;)switch(re){case"ascii":case"latin1":case"binary":return ie;case"utf8":case"utf-8":case void 0:return ae(oe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie*2;case"hex":return ie>>>1;case"base64":return q(oe).length;default:if(ee)return ae(oe).length;re=(""+re).toLowerCase(),ee=!0}}b.byteLength=i;function l(oe,re,ie){var ee=!1;if((re===void 0||re<0)&&(re=0),re>this.length)return"";if((ie===void 0||ie>this.length)&&(ie=this.length),ie<=0)return"";if(ie>>>=0,re>>>=0,ie<=re)return"";for(oe||(oe="utf8");;)switch(oe){case"hex":return G(this,re,ie);case"utf8":case"utf-8":return y(this,re,ie);case"ascii":return P(this,re,ie);case"latin1":case"binary":return I(this,re,ie);case"base64":return T(this,re,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,re,ie);default:if(ee)throw new TypeError("Unknown encoding: "+oe);oe=(oe+"").toLowerCase(),ee=!0}}b.prototype._isBuffer=!0;function v(oe,re,ie){var ee=oe[re];oe[re]=oe[ie],oe[ie]=ee}b.prototype.swap16=function(){var re=this.length;if(re%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ie=0;ie<re;ie+=2)v(this,ie,ie+1);return this},b.prototype.swap32=function(){var re=this.length;if(re%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ie=0;ie<re;ie+=4)v(this,ie,ie+3),v(this,ie+1,ie+2);return this},b.prototype.swap64=function(){var re=this.length;if(re%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ie=0;ie<re;ie+=8)v(this,ie,ie+7),v(this,ie+1,ie+6),v(this,ie+2,ie+5),v(this,ie+3,ie+4);return this},b.prototype.toString=function(){var re=this.length|0;return re===0?"":arguments.length===0?y(this,0,re):l.apply(this,arguments)},b.prototype.equals=function(re){if(!b.isBuffer(re))throw new TypeError("Argument must be a Buffer");return this===re?!0:b.compare(this,re)===0},b.prototype.inspect=function(){var re="",ie=Ae.INSPECT_MAX_BYTES;return this.length>0&&(re=this.toString("hex",0,ie).match(/.{2}/g).join(" "),this.length>ie&&(re+=" ... ")),"<Buffer "+re+">"},b.prototype.compare=function(re,ie,ee,de,Ce){if(!b.isBuffer(re))throw new TypeError("Argument must be a Buffer");if(ie===void 0&&(ie=0),ee===void 0&&(ee=re?re.length:0),de===void 0&&(de=0),Ce===void 0&&(Ce=this.length),ie<0||ee>re.length||de<0||Ce>this.length)throw new RangeError("out of range index");if(de>=Ce&&ie>=ee)return 0;if(de>=Ce)return-1;if(ie>=ee)return 1;if(ie>>>=0,ee>>>=0,de>>>=0,Ce>>>=0,this===re)return 0;for(var Me=Ce-de,Ye=ee-ie,et=Math.min(Me,Ye),st=this.slice(de,Ce),ut=re.slice(ie,ee),yt=0;yt<et;++yt)if(st[yt]!==ut[yt]){Me=st[yt],Ye=ut[yt];break}return Me<Ye?-1:Ye<Me?1:0};function B(oe,re,ie,ee,de){if(oe.length===0)return-1;if(typeof ie=="string"?(ee=ie,ie=0):ie>2147483647?ie=2147483647:ie<-2147483648&&(ie=-2147483648),ie=+ie,isNaN(ie)&&(ie=de?0:oe.length-1),ie<0&&(ie=oe.length+ie),ie>=oe.length){if(de)return-1;ie=oe.length-1}else if(ie<0)if(de)ie=0;else return-1;if(typeof re=="string"&&(re=b.from(re,ee)),b.isBuffer(re))return re.length===0?-1:C(oe,re,ie,ee,de);if(typeof re=="number")return re=re&255,b.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?de?Uint8Array.prototype.indexOf.call(oe,re,ie):Uint8Array.prototype.lastIndexOf.call(oe,re,ie):C(oe,[re],ie,ee,de);throw new TypeError("val must be string, number or Buffer")}function C(oe,re,ie,ee,de){var Ce=1,Me=oe.length,Ye=re.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(oe.length<2||re.length<2)return-1;Ce=2,Me/=2,Ye/=2,ie/=2}function et(je,He){return Ce===1?je[He]:je.readUInt16BE(He*Ce)}var st;if(de){var ut=-1;for(st=ie;st<Me;st++)if(et(oe,st)===et(re,ut===-1?0:st-ut)){if(ut===-1&&(ut=st),st-ut+1===Ye)return ut*Ce}else ut!==-1&&(st-=st-ut),ut=-1}else for(ie+Ye>Me&&(ie=Me-Ye),st=ie;st>=0;st--){for(var yt=!0,xt=0;xt<Ye;xt++)if(et(oe,st+xt)!==et(re,xt)){yt=!1;break}if(yt)return st}return-1}b.prototype.includes=function(re,ie,ee){return this.indexOf(re,ie,ee)!==-1},b.prototype.indexOf=function(re,ie,ee){return B(this,re,ie,ee,!0)},b.prototype.lastIndexOf=function(re,ie,ee){return B(this,re,ie,ee,!1)};function L(oe,re,ie,ee){ie=Number(ie)||0;var de=oe.length-ie;ee?(ee=Number(ee),ee>de&&(ee=de)):ee=de;var Ce=re.length;if(Ce%2!==0)throw new TypeError("Invalid hex string");ee>Ce/2&&(ee=Ce/2);for(var Me=0;Me<ee;++Me){var Ye=parseInt(re.substr(Me*2,2),16);if(isNaN(Ye))return Me;oe[ie+Me]=Ye}return Me}function w(oe,re,ie,ee){return se(ae(re,oe.length-ie),oe,ie,ee)}function p(oe,re,ie,ee){return se(V(re),oe,ie,ee)}function n(oe,re,ie,ee){return p(oe,re,ie,ee)}function d(oe,re,ie,ee){return se(q(re),oe,ie,ee)}function m(oe,re,ie,ee){return se($(re,oe.length-ie),oe,ie,ee)}b.prototype.write=function(re,ie,ee,de){if(ie===void 0)de="utf8",ee=this.length,ie=0;else if(ee===void 0&&typeof ie=="string")de=ie,ee=this.length,ie=0;else if(isFinite(ie))ie=ie|0,isFinite(ee)?(ee=ee|0,de===void 0&&(de="utf8")):(de=ee,ee=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ce=this.length-ie;if((ee===void 0||ee>Ce)&&(ee=Ce),re.length>0&&(ee<0||ie<0)||ie>this.length)throw new RangeError("Attempt to write outside buffer bounds");de||(de="utf8");for(var Me=!1;;)switch(de){case"hex":return L(this,re,ie,ee);case"utf8":case"utf-8":return w(this,re,ie,ee);case"ascii":return p(this,re,ie,ee);case"latin1":case"binary":return n(this,re,ie,ee);case"base64":return d(this,re,ie,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,re,ie,ee);default:if(Me)throw new TypeError("Unknown encoding: "+de);de=(""+de).toLowerCase(),Me=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(oe,re,ie){return re===0&&ie===oe.length?H.fromByteArray(oe):H.fromByteArray(oe.slice(re,ie))}function y(oe,re,ie){ie=Math.min(oe.length,ie);for(var ee=[],de=re;de<ie;){var Ce=oe[de],Me=null,Ye=Ce>239?4:Ce>223?3:Ce>191?2:1;if(de+Ye<=ie){var et,st,ut,yt;switch(Ye){case 1:Ce<128&&(Me=Ce);break;case 2:et=oe[de+1],(et&192)===128&&(yt=(Ce&31)<<6|et&63,yt>127&&(Me=yt));break;case 3:et=oe[de+1],st=oe[de+2],(et&192)===128&&(st&192)===128&&(yt=(Ce&15)<<12|(et&63)<<6|st&63,yt>2047&&(yt<55296||yt>57343)&&(Me=yt));break;case 4:et=oe[de+1],st=oe[de+2],ut=oe[de+3],(et&192)===128&&(st&192)===128&&(ut&192)===128&&(yt=(Ce&15)<<18|(et&63)<<12|(st&63)<<6|ut&63,yt>65535&&yt<1114112&&(Me=yt))}}Me===null?(Me=65533,Ye=1):Me>65535&&(Me-=65536,ee.push(Me>>>10&1023|55296),Me=56320|Me&1023),ee.push(Me),de+=Ye}return U(ee)}var g=4096;function U(oe){var re=oe.length;if(re<=g)return String.fromCharCode.apply(String,oe);for(var ie="",ee=0;ee<re;)ie+=String.fromCharCode.apply(String,oe.slice(ee,ee+=g));return ie}function P(oe,re,ie){var ee="";ie=Math.min(oe.length,ie);for(var de=re;de<ie;++de)ee+=String.fromCharCode(oe[de]&127);return ee}function I(oe,re,ie){var ee="";ie=Math.min(oe.length,ie);for(var de=re;de<ie;++de)ee+=String.fromCharCode(oe[de]);return ee}function G(oe,re,ie){var ee=oe.length;(!re||re<0)&&(re=0),(!ie||ie<0||ie>ee)&&(ie=ee);for(var de="",Ce=re;Ce<ie;++Ce)de+=Le(oe[Ce]);return de}function K(oe,re,ie){for(var ee=oe.slice(re,ie),de="",Ce=0;Ce<ee.length;Ce+=2)de+=String.fromCharCode(ee[Ce]+ee[Ce+1]*256);return de}b.prototype.slice=function(re,ie){var ee=this.length;re=~~re,ie=ie===void 0?ee:~~ie,re<0?(re+=ee,re<0&&(re=0)):re>ee&&(re=ee),ie<0?(ie+=ee,ie<0&&(ie=0)):ie>ee&&(ie=ee),ie<re&&(ie=re);var de;if(b.TYPED_ARRAY_SUPPORT)de=this.subarray(re,ie),de.__proto__=b.prototype;else{var Ce=ie-re;de=new b(Ce,void 0);for(var Me=0;Me<Ce;++Me)de[Me]=this[Me+re]}return de};function D(oe,re,ie){if(oe%1!==0||oe<0)throw new RangeError("offset is not uint");if(oe+re>ie)throw new RangeError("Trying to access beyond buffer length")}b.prototype.readUIntLE=function(re,ie,ee){re=re|0,ie=ie|0,ee||D(re,ie,this.length);for(var de=this[re],Ce=1,Me=0;++Me<ie&&(Ce*=256);)de+=this[re+Me]*Ce;return de},b.prototype.readUIntBE=function(re,ie,ee){re=re|0,ie=ie|0,ee||D(re,ie,this.length);for(var de=this[re+--ie],Ce=1;ie>0&&(Ce*=256);)de+=this[re+--ie]*Ce;return de},b.prototype.readUInt8=function(re,ie){return ie||D(re,1,this.length),this[re]},b.prototype.readUInt16LE=function(re,ie){return ie||D(re,2,this.length),this[re]|this[re+1]<<8},b.prototype.readUInt16BE=function(re,ie){return ie||D(re,2,this.length),this[re]<<8|this[re+1]},b.prototype.readUInt32LE=function(re,ie){return ie||D(re,4,this.length),(this[re]|this[re+1]<<8|this[re+2]<<16)+this[re+3]*16777216},b.prototype.readUInt32BE=function(re,ie){return ie||D(re,4,this.length),this[re]*16777216+(this[re+1]<<16|this[re+2]<<8|this[re+3])},b.prototype.readIntLE=function(re,ie,ee){re=re|0,ie=ie|0,ee||D(re,ie,this.length);for(var de=this[re],Ce=1,Me=0;++Me<ie&&(Ce*=256);)de+=this[re+Me]*Ce;return Ce*=128,de>=Ce&&(de-=Math.pow(2,8*ie)),de},b.prototype.readIntBE=function(re,ie,ee){re=re|0,ie=ie|0,ee||D(re,ie,this.length);for(var de=ie,Ce=1,Me=this[re+--de];de>0&&(Ce*=256);)Me+=this[re+--de]*Ce;return Ce*=128,Me>=Ce&&(Me-=Math.pow(2,8*ie)),Me},b.prototype.readInt8=function(re,ie){return ie||D(re,1,this.length),this[re]&128?(255-this[re]+1)*-1:this[re]},b.prototype.readInt16LE=function(re,ie){ie||D(re,2,this.length);var ee=this[re]|this[re+1]<<8;return ee&32768?ee|4294901760:ee},b.prototype.readInt16BE=function(re,ie){ie||D(re,2,this.length);var ee=this[re+1]|this[re]<<8;return ee&32768?ee|4294901760:ee},b.prototype.readInt32LE=function(re,ie){return ie||D(re,4,this.length),this[re]|this[re+1]<<8|this[re+2]<<16|this[re+3]<<24},b.prototype.readInt32BE=function(re,ie){return ie||D(re,4,this.length),this[re]<<24|this[re+1]<<16|this[re+2]<<8|this[re+3]},b.prototype.readFloatLE=function(re,ie){return ie||D(re,4,this.length),O.read(this,re,!0,23,4)},b.prototype.readFloatBE=function(re,ie){return ie||D(re,4,this.length),O.read(this,re,!1,23,4)},b.prototype.readDoubleLE=function(re,ie){return ie||D(re,8,this.length),O.read(this,re,!0,52,8)},b.prototype.readDoubleBE=function(re,ie){return ie||D(re,8,this.length),O.read(this,re,!1,52,8)};function J(oe,re,ie,ee,de,Ce){if(!b.isBuffer(oe))throw new TypeError('"buffer" argument must be a Buffer instance');if(re>de||re<Ce)throw new RangeError('"value" argument is out of bounds');if(ie+ee>oe.length)throw new RangeError("Index out of range")}b.prototype.writeUIntLE=function(re,ie,ee,de){if(re=+re,ie=ie|0,ee=ee|0,!de){var Ce=Math.pow(2,8*ee)-1;J(this,re,ie,ee,Ce,0)}var Me=1,Ye=0;for(this[ie]=re&255;++Ye<ee&&(Me*=256);)this[ie+Ye]=re/Me&255;return ie+ee},b.prototype.writeUIntBE=function(re,ie,ee,de){if(re=+re,ie=ie|0,ee=ee|0,!de){var Ce=Math.pow(2,8*ee)-1;J(this,re,ie,ee,Ce,0)}var Me=ee-1,Ye=1;for(this[ie+Me]=re&255;--Me>=0&&(Ye*=256);)this[ie+Me]=re/Ye&255;return ie+ee},b.prototype.writeUInt8=function(re,ie,ee){return re=+re,ie=ie|0,ee||J(this,re,ie,1,255,0),b.TYPED_ARRAY_SUPPORT||(re=Math.floor(re)),this[ie]=re&255,ie+1};function X(oe,re,ie,ee){re<0&&(re=65535+re+1);for(var de=0,Ce=Math.min(oe.length-ie,2);de<Ce;++de)oe[ie+de]=(re&255<<8*(ee?de:1-de))>>>(ee?de:1-de)*8}b.prototype.writeUInt16LE=function(re,ie,ee){return re=+re,ie=ie|0,ee||J(this,re,ie,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[ie]=re&255,this[ie+1]=re>>>8):X(this,re,ie,!0),ie+2},b.prototype.writeUInt16BE=function(re,ie,ee){return re=+re,ie=ie|0,ee||J(this,re,ie,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[ie]=re>>>8,this[ie+1]=re&255):X(this,re,ie,!1),ie+2};function ne(oe,re,ie,ee){re<0&&(re=4294967295+re+1);for(var de=0,Ce=Math.min(oe.length-ie,4);de<Ce;++de)oe[ie+de]=re>>>(ee?de:3-de)*8&255}b.prototype.writeUInt32LE=function(re,ie,ee){return re=+re,ie=ie|0,ee||J(this,re,ie,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[ie+3]=re>>>24,this[ie+2]=re>>>16,this[ie+1]=re>>>8,this[ie]=re&255):ne(this,re,ie,!0),ie+4},b.prototype.writeUInt32BE=function(re,ie,ee){return re=+re,ie=ie|0,ee||J(this,re,ie,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[ie]=re>>>24,this[ie+1]=re>>>16,this[ie+2]=re>>>8,this[ie+3]=re&255):ne(this,re,ie,!1),ie+4},b.prototype.writeIntLE=function(re,ie,ee,de){if(re=+re,ie=ie|0,!de){var Ce=Math.pow(2,8*ee-1);J(this,re,ie,ee,Ce-1,-Ce)}var Me=0,Ye=1,et=0;for(this[ie]=re&255;++Me<ee&&(Ye*=256);)re<0&&et===0&&this[ie+Me-1]!==0&&(et=1),this[ie+Me]=(re/Ye>>0)-et&255;return ie+ee},b.prototype.writeIntBE=function(re,ie,ee,de){if(re=+re,ie=ie|0,!de){var Ce=Math.pow(2,8*ee-1);J(this,re,ie,ee,Ce-1,-Ce)}var Me=ee-1,Ye=1,et=0;for(this[ie+Me]=re&255;--Me>=0&&(Ye*=256);)re<0&&et===0&&this[ie+Me+1]!==0&&(et=1),this[ie+Me]=(re/Ye>>0)-et&255;return ie+ee},b.prototype.writeInt8=function(re,ie,ee){return re=+re,ie=ie|0,ee||J(this,re,ie,1,127,-128),b.TYPED_ARRAY_SUPPORT||(re=Math.floor(re)),re<0&&(re=255+re+1),this[ie]=re&255,ie+1},b.prototype.writeInt16LE=function(re,ie,ee){return re=+re,ie=ie|0,ee||J(this,re,ie,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[ie]=re&255,this[ie+1]=re>>>8):X(this,re,ie,!0),ie+2},b.prototype.writeInt16BE=function(re,ie,ee){return re=+re,ie=ie|0,ee||J(this,re,ie,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[ie]=re>>>8,this[ie+1]=re&255):X(this,re,ie,!1),ie+2},b.prototype.writeInt32LE=function(re,ie,ee){return re=+re,ie=ie|0,ee||J(this,re,ie,4,2147483647,-2147483648),b.TYPED_ARRAY_SUPPORT?(this[ie]=re&255,this[ie+1]=re>>>8,this[ie+2]=re>>>16,this[ie+3]=re>>>24):ne(this,re,ie,!0),ie+4},b.prototype.writeInt32BE=function(re,ie,ee){return re=+re,ie=ie|0,ee||J(this,re,ie,4,2147483647,-2147483648),re<0&&(re=4294967295+re+1),b.TYPED_ARRAY_SUPPORT?(this[ie]=re>>>24,this[ie+1]=re>>>16,this[ie+2]=re>>>8,this[ie+3]=re&255):ne(this,re,ie,!1),ie+4};function ue(oe,re,ie,ee,de,Ce){if(ie+ee>oe.length)throw new RangeError("Index out of range");if(ie<0)throw new RangeError("Index out of range")}function Oe(oe,re,ie,ee,de){return de||ue(oe,re,ie,4,34028234663852886e22,-34028234663852886e22),O.write(oe,re,ie,ee,23,4),ie+4}b.prototype.writeFloatLE=function(re,ie,ee){return Oe(this,re,ie,!0,ee)},b.prototype.writeFloatBE=function(re,ie,ee){return Oe(this,re,ie,!1,ee)};function _e(oe,re,ie,ee,de){return de||ue(oe,re,ie,8,17976931348623157e292,-17976931348623157e292),O.write(oe,re,ie,ee,52,8),ie+8}b.prototype.writeDoubleLE=function(re,ie,ee){return _e(this,re,ie,!0,ee)},b.prototype.writeDoubleBE=function(re,ie,ee){return _e(this,re,ie,!1,ee)},b.prototype.copy=function(re,ie,ee,de){if(ee||(ee=0),!de&&de!==0&&(de=this.length),ie>=re.length&&(ie=re.length),ie||(ie=0),de>0&&de<ee&&(de=ee),de===ee)return 0;if(re.length===0||this.length===0)return 0;if(ie<0)throw new RangeError("targetStart out of bounds");if(ee<0||ee>=this.length)throw new RangeError("sourceStart out of bounds");if(de<0)throw new RangeError("sourceEnd out of bounds");de>this.length&&(de=this.length),re.length-ie<de-ee&&(de=re.length-ie+ee);var Ce=de-ee,Me;if(this===re&&ee<ie&&ie<de)for(Me=Ce-1;Me>=0;--Me)re[Me+ie]=this[Me+ee];else if(Ce<1e3||!b.TYPED_ARRAY_SUPPORT)for(Me=0;Me<Ce;++Me)re[Me+ie]=this[Me+ee];else Uint8Array.prototype.set.call(re,this.subarray(ee,ee+Ce),ie);return Ce},b.prototype.fill=function(re,ie,ee,de){if(typeof re=="string"){if(typeof ie=="string"?(de=ie,ie=0,ee=this.length):typeof ee=="string"&&(de=ee,ee=this.length),re.length===1){var Ce=re.charCodeAt(0);Ce<256&&(re=Ce)}if(de!==void 0&&typeof de!="string")throw new TypeError("encoding must be a string");if(typeof de=="string"&&!b.isEncoding(de))throw new TypeError("Unknown encoding: "+de)}else typeof re=="number"&&(re=re&255);if(ie<0||this.length<ie||this.length<ee)throw new RangeError("Out of range index");if(ee<=ie)return this;ie=ie>>>0,ee=ee===void 0?this.length:ee>>>0,re||(re=0);var Me;if(typeof re=="number")for(Me=ie;Me<ee;++Me)this[Me]=re;else{var Ye=b.isBuffer(re)?re:ae(new b(re,de).toString()),et=Ye.length;for(Me=0;Me<ee-ie;++Me)this[Me+ie]=Ye[Me%et]}return this};var De=/[^+\/0-9A-Za-z-_]/g;function Ue(oe){if(oe=Ke(oe).replace(De,""),oe.length<2)return"";for(;oe.length%4!==0;)oe=oe+"=";return oe}function Ke(oe){return oe.trim?oe.trim():oe.replace(/^\s+|\s+$/g,"")}function Le(oe){return oe<16?"0"+oe.toString(16):oe.toString(16)}function ae(oe,re){re=re||Infinity;for(var ie,ee=oe.length,de=null,Ce=[],Me=0;Me<ee;++Me){if(ie=oe.charCodeAt(Me),ie>55295&&ie<57344){if(!de){if(ie>56319){(re-=3)>-1&&Ce.push(239,191,189);continue}else if(Me+1===ee){(re-=3)>-1&&Ce.push(239,191,189);continue}de=ie;continue}if(ie<56320){(re-=3)>-1&&Ce.push(239,191,189),de=ie;continue}ie=(de-55296<<10|ie-56320)+65536}else de&&((re-=3)>-1&&Ce.push(239,191,189));if(de=null,ie<128){if((re-=1)<0)break;Ce.push(ie)}else if(ie<2048){if((re-=2)<0)break;Ce.push(ie>>6|192,ie&63|128)}else if(ie<65536){if((re-=3)<0)break;Ce.push(ie>>12|224,ie>>6&63|128,ie&63|128)}else if(ie<1114112){if((re-=4)<0)break;Ce.push(ie>>18|240,ie>>12&63|128,ie>>6&63|128,ie&63|128)}else throw new Error("Invalid code point")}return Ce}function V(oe){for(var re=[],ie=0;ie<oe.length;++ie)re.push(oe.charCodeAt(ie)&255);return re}function $(oe,re){for(var ie,ee,de,Ce=[],Me=0;Me<oe.length&&!((re-=2)<0);++Me)ie=oe.charCodeAt(Me),ee=ie>>8,de=ie%256,Ce.push(de),Ce.push(ee);return Ce}function q(oe){return H.toByteArray(Ue(oe))}function se(oe,re,ie,ee){for(var de=0;de<ee&&!(de+ie>=re.length||de>=oe.length);++de)re[de+ie]=oe[de];return de}function te(oe){return oe!==oe}}).call(this,N("IyRk"))},HmJG:function(Ve,Ae,N){},I8Z2:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return Q}),N.d(Ae,"b",function(){return h}),N.d(Ae,"c",function(){return o});var Z=N("q1tI"),H=function(){var f=function(u,c){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,l){i.__proto__=l}||function(i,l){for(var v in l)l.hasOwnProperty(v)&&(i[v]=l[v])},f(u,c)};return function(u,c){f(u,c);function i(){this.constructor=u}u.prototype=c===null?Object.create(c):(i.prototype=c.prototype,new i)}}(),O=Z.createContext(null),Q=function(f){H(u,f);function u(){return f!==null&&f.apply(this,arguments)||this}return u.prototype.render=function(){return Z.createElement(O.Provider,{value:this.props.store},this.props.children)},u}(Z.Component),M=N("Gytx"),_=N.n(M),R=N("2mql"),b=N.n(R),t=function(){var f=function(u,c){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,l){i.__proto__=l}||function(i,l){for(var v in l)l.hasOwnProperty(v)&&(i[v]=l[v])},f(u,c)};return function(u,c){f(u,c);function i(){this.constructor=u}u.prototype=c===null?Object.create(c):(i.prototype=c.prototype,new i)}}(),E=function(){return E=Object.assign||function(f){for(var u,c=1,i=arguments.length;c<i;c++){u=arguments[c];for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(f[l]=u[l])}return f},E.apply(this,arguments)};function a(f){return f.displayName||f.name||"Component"}var A=function(){return{}};function h(f,u){u===void 0&&(u={});var c=!!f,i=f||A;return function(v){var B=function(L){t(w,L);function w(p,n){var d=L.call(this,p,n)||this;return d.unsubscribe=null,d.handleChange=function(){if(!d.unsubscribe)return;var m=i(d.store.getState(),d.props);d.setState({subscribed:m})},d.store=d.context,d.state={subscribed:i(d.store.getState(),p),store:d.store,props:p},d}return w.getDerivedStateFromProps=function(p,n){return f&&f.length===2&&p!==n.props?{subscribed:i(n.store.getState(),p),props:p}:{props:p}},w.prototype.componentDidMount=function(){this.trySubscribe()},w.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},w.prototype.shouldComponentUpdate=function(p,n){return!_()(this.props,p)||!_()(this.state.subscribed,n.subscribed)},w.prototype.trySubscribe=function(){c&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},w.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},w.prototype.render=function(){var p=E(E(E({},this.props),this.state.subscribed),{store:this.store});return Z.createElement(v,E({},p,{ref:this.props.miniStoreForwardedRef}))},w.displayName="Connect("+a(v)+")",w.contextType=O,w}(Z.Component);if(u.forwardRef){var C=Z.forwardRef(function(L,w){return Z.createElement(B,E({},L,{miniStoreForwardedRef:w}))});return b()(C,v)}return b()(B,v)}}var s=function(){return s=Object.assign||function(f){for(var u,c=1,i=arguments.length;c<i;c++){u=arguments[c];for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(f[l]=u[l])}return f},s.apply(this,arguments)};function o(f){var u=f,c=[];function i(B){u=s(s({},u),B);for(var C=0;C<c.length;C++)c[C]()}function l(){return u}function v(B){return c.push(B),function(){var L=c.indexOf(B);c.splice(L,1)}}return{setState:i,getState:l,subscribe:v}}},IBYe:function(Ve,Ae,N){"use strict";function Z(H){return null}Ae.a=Z},IMiH:function(Ve,Ae,N){var Z=N("Sj9i"),H=N("QBsz"),O=N("4mN7"),Q=N("mFDi"),M=N("LPTA"),_=M.devicePixelRatio,R={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},b=[],t=[],E=[],a=[],A=Math.min,h=Math.max,s=Math.cos,o=Math.sin,f=Math.sqrt,u=Math.abs,c=typeof Float32Array!="undefined",i=function(v){this._saveData=!(v||!1),this._saveData&&(this.data=[]),this._ctx=null};i.prototype={constructor:i,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(v,B,C){C=C||0,this._ux=u(C/_/v)||0,this._uy=u(C/_/B)||0},getContext:function(){return this._ctx},beginPath:function(v){return this._ctx=v,v&&v.beginPath(),v&&(this.dpr=v.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(v,B){return this.addData(R.M,v,B),this._ctx&&this._ctx.moveTo(v,B),this._x0=v,this._y0=B,this._xi=v,this._yi=B,this},lineTo:function(v,B){var C=u(v-this._xi)>this._ux||u(B-this._yi)>this._uy||this._len<5;return this.addData(R.L,v,B),this._ctx&&C&&(this._needsDash()?this._dashedLineTo(v,B):this._ctx.lineTo(v,B)),C&&(this._xi=v,this._yi=B),this},bezierCurveTo:function(v,B,C,L,w,p){return this.addData(R.C,v,B,C,L,w,p),this._ctx&&(this._needsDash()?this._dashedBezierTo(v,B,C,L,w,p):this._ctx.bezierCurveTo(v,B,C,L,w,p)),this._xi=w,this._yi=p,this},quadraticCurveTo:function(v,B,C,L){return this.addData(R.Q,v,B,C,L),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(v,B,C,L):this._ctx.quadraticCurveTo(v,B,C,L)),this._xi=C,this._yi=L,this},arc:function(v,B,C,L,w,p){return this.addData(R.A,v,B,C,C,L,w-L,0,p?0:1),this._ctx&&this._ctx.arc(v,B,C,L,w,p),this._xi=s(w)*C+v,this._yi=o(w)*C+B,this},arcTo:function(v,B,C,L,w){return this._ctx&&this._ctx.arcTo(v,B,C,L,w),this},rect:function(v,B,C,L){return this._ctx&&this._ctx.rect(v,B,C,L),this.addData(R.R,v,B,C,L),this},closePath:function(){this.addData(R.Z);var v=this._ctx,B=this._x0,C=this._y0;return v&&(this._needsDash()&&this._dashedLineTo(B,C),v.closePath()),this._xi=B,this._yi=C,this},fill:function(v){v&&v.fill(),this.toStatic()},stroke:function(v){v&&v.stroke(),this.toStatic()},setLineDash:function(v){if(v instanceof Array){this._lineDash=v,this._dashIdx=0;for(var B=0,C=0;C<v.length;C++)B+=v[C];this._dashSum=B}return this},setLineDashOffset:function(v){return this._dashOffset=v,this},len:function(){return this._len},setData:function(v){var B=v.length;!(this.data&&this.data.length===B)&&c&&(this.data=new Float32Array(B));for(var C=0;C<B;C++)this.data[C]=v[C];this._len=B},appendPath:function(v){v instanceof Array||(v=[v]);for(var B=v.length,C=0,L=this._len,w=0;w<B;w++)C+=v[w].len();c&&this.data instanceof Float32Array&&(this.data=new Float32Array(L+C));for(var w=0;w<B;w++)for(var p=v[w].data,n=0;n<p.length;n++)this.data[L++]=p[n];this._len=L},addData:function(v){if(!this._saveData)return;var B=this.data;this._len+arguments.length>B.length&&(this._expandData(),B=this.data);for(var C=0;C<arguments.length;C++)B[this._len++]=arguments[C];this._prevCmd=v},_expandData:function(){if(!(this.data instanceof Array)){for(var v=[],B=0;B<this._len;B++)v[B]=this.data[B];this.data=v}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(v,B){var C=this._dashSum,L=this._dashOffset,w=this._lineDash,p=this._ctx,n=this._xi,d=this._yi,m=v-n,T=B-d,y=f(m*m+T*T),g=n,U=d,P,I=w.length,G;for(m/=y,T/=y,L<0&&(L=C+L),L%=C,g-=L*m,U-=L*T;m>0&&g<=v||m<0&&g>=v||m===0&&(T>0&&U<=B||T<0&&U>=B);){if(G=this._dashIdx,P=w[G],g+=m*P,U+=T*P,this._dashIdx=(G+1)%I,m>0&&g<n||m<0&&g>n||T>0&&U<d||T<0&&U>d)continue;p[G%2?"moveTo":"lineTo"](m>=0?A(g,v):h(g,v),T>=0?A(U,B):h(U,B))}m=g-v,T=U-B,this._dashOffset=-f(m*m+T*T)},_dashedBezierTo:function(v,B,C,L,w,p){var n=this._dashSum,d=this._dashOffset,m=this._lineDash,T=this._ctx,y=this._xi,g=this._yi,U,P,I,G=Z.cubicAt,K=0,D=this._dashIdx,J=m.length,X,ne,ue=0;for(d<0&&(d=n+d),d%=n,U=0;U<1;U+=.1)P=G(y,v,C,w,U+.1)-G(y,v,C,w,U),I=G(g,B,L,p,U+.1)-G(g,B,L,p,U),K+=f(P*P+I*I);for(;D<J&&!(ue+=m[D],ue>d);D++);for(U=(ue-d)/K;U<=1;)X=G(y,v,C,w,U),ne=G(g,B,L,p,U),D%2?T.moveTo(X,ne):T.lineTo(X,ne),U+=m[D]/K,D=(D+1)%J;D%2!==0&&T.lineTo(w,p),P=w-X,I=p-ne,this._dashOffset=-f(P*P+I*I)},_dashedQuadraticTo:function(v,B,C,L){var w=C,p=L;C=(C+2*v)/3,L=(L+2*B)/3,v=(this._xi+2*v)/3,B=(this._yi+2*B)/3,this._dashedBezierTo(v,B,C,L,w,p)},toStatic:function(){var v=this.data;v instanceof Array&&(v.length=this._len,c&&(this.data=new Float32Array(v)))},getBoundingRect:function(){b[0]=b[1]=E[0]=E[1]=Number.MAX_VALUE,t[0]=t[1]=a[0]=a[1]=-Number.MAX_VALUE;for(var v=this.data,B=0,C=0,L=0,w=0,p=0;p<v.length;){var n=v[p++];p===1&&(B=v[p],C=v[p+1],L=B,w=C);switch(n){case R.M:L=v[p++],w=v[p++],B=L,C=w,E[0]=L,E[1]=w,a[0]=L,a[1]=w;break;case R.L:O.fromLine(B,C,v[p],v[p+1],E,a),B=v[p++],C=v[p++];break;case R.C:O.fromCubic(B,C,v[p++],v[p++],v[p++],v[p++],v[p],v[p+1],E,a),B=v[p++],C=v[p++];break;case R.Q:O.fromQuadratic(B,C,v[p++],v[p++],v[p],v[p+1],E,a),B=v[p++],C=v[p++];break;case R.A:var d=v[p++],m=v[p++],T=v[p++],y=v[p++],g=v[p++],U=v[p++]+g;p+=1;var P=1-v[p++];p===1&&(L=s(g)*T+d,w=o(g)*y+m),O.fromArc(d,m,T,y,g,U,P,E,a),B=s(U)*T+d,C=o(U)*y+m;break;case R.R:L=B=v[p++],w=C=v[p++];var I=v[p++],G=v[p++];O.fromLine(L,w,L+I,w+G,E,a);break;case R.Z:B=L,C=w;break}H.min(b,b,E),H.max(t,t,a)}return p===0&&(b[0]=b[1]=t[0]=t[1]=0),new Q(b[0],b[1],t[0]-b[0],t[1]-b[1])},rebuildPath:function(v){for(var B=this.data,C,L,w,p,n,d,m=this._ux,T=this._uy,y=this._len,g=0;g<y;){var U=B[g++];g===1&&(w=B[g],p=B[g+1],C=w,L=p);switch(U){case R.M:C=w=B[g++],L=p=B[g++],v.moveTo(w,p);break;case R.L:n=B[g++],d=B[g++],(u(n-w)>m||u(d-p)>T||g===y-1)&&(v.lineTo(n,d),w=n,p=d);break;case R.C:v.bezierCurveTo(B[g++],B[g++],B[g++],B[g++],B[g++],B[g++]),w=B[g-2],p=B[g-1];break;case R.Q:v.quadraticCurveTo(B[g++],B[g++],B[g++],B[g++]),w=B[g-2],p=B[g-1];break;case R.A:var P=B[g++],I=B[g++],G=B[g++],K=B[g++],D=B[g++],J=B[g++],X=B[g++],ne=B[g++],ue=G>K?G:K,Oe=G>K?1:G/K,_e=G>K?K/G:1,De=Math.abs(G-K)>.001,Ue=D+J;De?(v.translate(P,I),v.rotate(X),v.scale(Oe,_e),v.arc(0,0,ue,D,Ue,1-ne),v.scale(1/Oe,1/_e),v.rotate(-X),v.translate(-P,-I)):v.arc(P,I,ue,D,Ue,1-ne),g===1&&(C=s(D)*G+P,L=o(D)*K+I),w=s(Ue)*G+P,p=o(Ue)*K+I;break;case R.R:C=w=B[g],L=p=B[g+1],v.rect(B[g++],B[g++],B[g++],B[g++]);break;case R.Z:v.closePath(),w=C,p=L}}}},i.CMD=R;var l=i;Ve.exports=l},ItGF:function(Ve,Ae){var N={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?N={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document=="undefined"&&typeof self!="undefined"?N={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator=="undefined"?N={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:N=H(navigator.userAgent);var Z=N;function H(O){var Q={},M={},_=O.match(/Firefox\/([\d.]+)/),R=O.match(/MSIE\s([\d.]+)/)||O.match(/Trident\/.+?rv:(([\d.]+))/),b=O.match(/Edge\/([\d.]+)/),t=/micromessenger/i.test(O);return _&&(M.firefox=!0,M.version=_[1]),R&&(M.ie=!0,M.version=R[1]),b&&(M.edge=!0,M.version=b[1]),t&&(M.weChat=!0),{browser:M,os:Q,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!="undefined",touchEventsSupported:"ontouchstart"in window&&!M.ie&&!M.edge,pointerEventsSupported:"onpointerdown"in window&&(M.edge||M.ie&&M.version>=11),domSupported:typeof document!="undefined"}}Ve.exports=Z},JYp7:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return Z});var Z;(function(H){function O(l){return l&&typeof l=="object"&&typeof l[Symbol.iterator]=="function"}H.is=O;const Q=Object.freeze([]);function M(){return Q}H.empty=M;function*_(l){yield l}H.single=_;function R(l){return l||Q}H.from=R;function b(l){return!l||l[Symbol.iterator]().next().done===!0}H.isEmpty=b;function t(l){return l[Symbol.iterator]().next().value}H.first=t;function E(l,v){for(const B of l)if(v(B))return!0;return!1}H.some=E;function a(l,v){for(const B of l)if(v(B))return B;return}H.find=a;function*A(l,v){for(const B of l)v(B)&&(yield B)}H.filter=A;function*h(l,v){let B=0;for(const C of l)yield v(C,B++)}H.map=h;function*s(...l){for(const v of l)for(const B of v)yield B}H.concat=s;function*o(l){for(const v of l)for(const B of v)yield B}H.concatNested=o;function f(l,v,B){let C=B;for(const L of l)C=v(C,L);return C}H.reduce=f;function*u(l,v,B=l.length){for(v<0&&(v+=l.length),B<0?B+=l.length:B>l.length&&(B=l.length);v<B;v++)yield l[v]}H.slice=u;function c(l,v=Number.POSITIVE_INFINITY){const B=[];if(v===0)return[B,l];const C=l[Symbol.iterator]();for(let L=0;L<v;L++){const w=C.next();if(w.done)return[B,H.empty()];B.push(w.value)}return[B,{[Symbol.iterator](){return C}}]}H.consume=c;function i(l,v,B=(C,L)=>C===L){const C=l[Symbol.iterator](),L=v[Symbol.iterator]();for(;;){const w=C.next(),p=L.next();if(w.done!==p.done)return!1;if(w.done)return!0;if(!B(w.value,p.value))return!1}}H.equals=i})(Z||(Z={}))},K2GJ:function(Ve,Ae,N){var Z=N("fW2E"),H=N("gut8"),O=H.ContextCachedBy,Q=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],M=function(A){this.extendFrom(A,!1)};function _(A,h,s){var o=h.x==null?0:h.x,f=h.x2==null?1:h.x2,u=h.y==null?0:h.y,c=h.y2==null?0:h.y2;h.global||(o=o*s.width+s.x,f=f*s.width+s.x,u=u*s.height+s.y,c=c*s.height+s.y),o=isNaN(o)?0:o,f=isNaN(f)?1:f,u=isNaN(u)?0:u,c=isNaN(c)?0:c;var i=A.createLinearGradient(o,u,f,c);return i}function R(A,h,s){var o=s.width,f=s.height,u=Math.min(o,f),c=h.x==null?.5:h.x,i=h.y==null?.5:h.y,l=h.r==null?.5:h.r;h.global||(c=c*o+s.x,i=i*f+s.y,l=l*u);var v=A.createRadialGradient(c,i,0,c,i,l);return v}M.prototype={constructor:M,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(A,h,s){var o=this,f=s&&s.style,u=!f||A.__attrCachedBy!==O.STYLE_BIND;A.__attrCachedBy=O.STYLE_BIND;for(var c=0;c<Q.length;c++){var i=Q[c],l=i[0];(u||o[l]!==f[l])&&(A[l]=Z(A,l,o[l]||i[1]))}if((u||o.fill!==f.fill)&&(A.fillStyle=o.fill),(u||o.stroke!==f.stroke)&&(A.strokeStyle=o.stroke),(u||o.opacity!==f.opacity)&&(A.globalAlpha=o.opacity==null?1:o.opacity),(u||o.blend!==f.blend)&&(A.globalCompositeOperation=o.blend||"source-over"),this.hasStroke()){var v=o.lineWidth;A.lineWidth=v/(this.strokeNoScale&&h&&h.getLineScale?h.getLineScale():1)}},hasFill:function(){var A=this.fill;return A!=null&&A!=="none"},hasStroke:function(){var A=this.stroke;return A!=null&&A!=="none"&&this.lineWidth>0},extendFrom:function(A,h){if(A)for(var s in A)A.hasOwnProperty(s)&&(h===!0||(h===!1?!this.hasOwnProperty(s):A[s]!=null))&&(this[s]=A[s])},set:function(A,h){typeof A=="string"?this[A]=h:this.extendFrom(A,!0)},clone:function(){var A=new this.constructor;return A.extendFrom(this,!0),A},getGradient:function(A,h,s){for(var o=h.type==="radial"?R:_,f=o(A,h,s),u=h.colorStops,c=0;c<u.length;c++)f.addColorStop(u[c].offset,u[c].color);return f}};for(var b=M.prototype,t=0;t<Q.length;t++){var E=Q[t];E[0]in b||(b[E[0]]=E[1])}M.getGradient=b.getGradient;var a=M;Ve.exports=a},LPTA:function(Ve,Ae){var N=1;typeof window!="undefined"&&(N=Math.max(window.devicePixelRatio||1,1));var Z=0,H=N;Ae.debugMode=Z,Ae.devicePixelRatio=H},LdHM:function(Ve,Ae,N){"use strict";N.d(Ae,"b",function(){return l}),N.d(Ae,"a",function(){return B});var Z=N("1OyB"),H=N("vuIU"),O=N("Ji7U"),Q=N("LK+K"),M=N("q1tI"),_=N("rePB"),R=N("Ff2n"),b=N("ODXe"),t=N("4IlW"),E=N("bX4T"),a=N("YrtM"),A=N("TSYQ"),h=N.n(A),s=N("+nKL"),o=N("8OUc"),f=function(J,X){var ne=J.prefixCls,ue=J.id,Oe=J.flattenOptions,_e=J.childrenAsData,De=J.values,Ue=J.searchValue,Ke=J.multiple,Le=J.defaultActiveFirstOption,ae=J.height,V=J.itemHeight,$=J.notFoundContent,q=J.open,se=J.menuItemSelectedIcon,te=J.virtual,oe=J.onSelect,re=J.onToggleOpen,ie=J.onActiveValue,ee=J.onScroll,de=J.onMouseEnter,Ce="".concat(ne,"-item"),Me=Object(a.a)(function(){return Oe},[q,Oe],function(he,fe){return fe[0]&&he[1]!==fe[1]}),Ye=M.useRef(null),et=function(fe){fe.preventDefault()},st=function(fe){Ye.current&&Ye.current.scrollTo({index:fe})},ut=function(fe){for(var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Te=Me.length,me=0;me<Te;me+=1){var Ee=(fe+me*ge+Te)%Te,xe=Me[Ee],Ie=xe.group,Pe=xe.data;if(!Ie&&!Pe.disabled)return Ee}return-1},yt=M.useState(function(){return ut(0)}),xt=Object(b.a)(yt,2),je=xt[0],He=xt[1],ot=function(fe){He(fe);var ge=Me[fe];if(!ge){ie(null,-1);return}ie(ge.data.value,fe)};M.useEffect(function(){ot(Le!==!1?ut(0):-1)},[Me.length,Ue]),M.useEffect(function(){var he=setTimeout(function(){if(!Ke&&q&&De.size===1){var fe=Array.from(De)[0],ge=Me.findIndex(function(Te){var me=Te.data;return me.value===fe});ot(ge),st(ge)}});return function(){return clearTimeout(he)}},[q]);var ht=function(fe){fe!==void 0&&oe(fe,{selected:!De.has(fe)}),Ke||re(!1)};if(M.useImperativeHandle(X,function(){return{onKeyDown:function(fe){var ge=fe.which;switch(ge){case t.a.UP:case t.a.DOWN:{var Te=0;if(ge===t.a.UP?Te=-1:ge===t.a.DOWN&&(Te=1),Te!==0){var me=ut(je+Te,Te);st(me),ot(me)}break}case t.a.ENTER:{var Ee=Me[je];Ee&&!Ee.data.disabled?ht(Ee.data.value):ht(void 0),q&&fe.preventDefault();break}case t.a.ESC:re(!1)}},onKeyUp:function(){},scrollTo:function(fe){st(fe)}}}),Me.length===0)return M.createElement("div",{role:"listbox",id:"".concat(ue,"_list"),className:"".concat(Ce,"-empty"),onMouseDown:et},$);function we(he){var fe=Me[he];if(!fe)return null;var ge=fe.data||{},Te=ge.value,me=ge.label,Ee=ge.children,xe=Object(E.a)(ge,!0),Ie=_e?Ee:me;return fe?M.createElement("div",Object.assign({"aria-label":typeof Ie=="string"?Ie:null},xe,{key:he,role:"option",id:"".concat(ue,"_list_").concat(he),"aria-selected":De.has(Te)}),Te):null}return M.createElement(M.Fragment,null,M.createElement("div",{role:"listbox",id:"".concat(ue,"_list"),style:{height:0,width:0,overflow:"hidden"}},we(je-1),we(je),we(je+1)),M.createElement(s.a,{itemKey:"key",ref:Ye,data:Me,height:ae,itemHeight:V,fullHeight:!1,onMouseDown:et,onScroll:ee,virtual:te,onMouseEnter:de},function(he,fe){var ge,Te=he.group,me=he.groupOption,Ee=he.data,xe=Ee.label,Ie=Ee.key;if(Te)return M.createElement("div",{className:h()(Ce,"".concat(Ce,"-group"))},xe!==void 0?xe:Ie);var Pe=Ee.disabled,Qe=Ee.value,tt=Ee.title,mt=Ee.children,Bt=Ee.style,Et=Ee.className,Ct=Object(R.a)(Ee,["disabled","value","title","children","style","className"]),nt=De.has(Qe),qe="".concat(Ce,"-option"),$e=h()(Ce,qe,Et,(ge={},Object(_.a)(ge,"".concat(qe,"-grouped"),me),Object(_.a)(ge,"".concat(qe,"-active"),je===fe&&!Pe),Object(_.a)(ge,"".concat(qe,"-disabled"),Pe),Object(_.a)(ge,"".concat(qe,"-selected"),nt),ge)),Re=_e?mt:xe,Ne=!se||typeof se=="function"||nt;return M.createElement("div",Object.assign({},Ct,{"aria-selected":nt,className:$e,title:tt,onMouseMove:function(){if(je===fe||Pe)return;ot(fe)},onClick:function(){Pe||ht(Qe)},style:Bt}),M.createElement("div",{className:"".concat(qe,"-content")},Re||Qe),M.isValidElement(se)||nt,Ne&&M.createElement(o.a,{className:"".concat(Ce,"-option-state"),customizeIcon:se,customizeIconProps:{isSelected:nt}},nt?"\u2713":null))}))},u=M.forwardRef(f);u.displayName="OptionList";var c=u,i=function(){return null};i.isSelectOption=!0;var l=i,v=function(){return null};v.isSelectOptGroup=!0;var B=v,C=N("VTBJ"),L=N("Zm9Q");function w(D){var J=D.key,X=D.props,ne=X.children,ue=X.value,Oe=Object(R.a)(X,["children","value"]);return Object(C.a)({key:J,value:ue!==void 0?ue:J,children:ne},Oe)}function p(D){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(D).map(function(X,ne){if(!M.isValidElement(X)||!X.type)return null;var ue=X.type.isSelectOptGroup,Oe=X.key,_e=X.props,De=_e.children,Ue=Object(R.a)(_e,["children"]);return J||!ue?w(X):Object(C.a)(Object(C.a)({key:"__RC_SELECT_GRP__".concat(Oe===null?ne:Oe,"__"),label:Oe},Ue),{},{options:p(De)})}).filter(function(X){return X})}var n=N("2Qr1"),d=N("qNPg"),m=N("U8pU"),T=N("Kwbf"),y=N("WKfj");function g(D){var J=D.mode,X=D.options,ne=D.children,ue=D.backfill,Oe=D.allowClear,_e=D.placeholder,De=D.getInputElement,Ue=D.showSearch,Ke=D.onSearch,Le=D.defaultOpen,ae=D.autoFocus,V=D.labelInValue,$=D.value,q=D.inputValue,se=D.optionLabelProp,te=J==="multiple"||J==="tags",oe=Ue!==void 0?Ue:te||J==="combobox",re=X||p(ne);if(Object(T.a)(J!=="tags"||re.every(function(Ce){return!Ce.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),J==="tags"||J==="combobox"){var ie=re.some(function(Ce){return Ce.options?Ce.options.some(function(Me){return typeof("value"in Me?Me.value:Me.key)=="number"}):typeof("value"in Ce?Ce.value:Ce.key)=="number"});Object(T.a)(!ie,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(T.a)(J!=="combobox"||!se,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(T.a)(J==="combobox"||!ue,"`backfill` only works with `combobox` mode."),Object(T.a)(J==="combobox"||!De,"`getInputElement` only work with `combobox` mode."),Object(T.b)(J!=="combobox"||!De||!Oe||!_e,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ke&&!oe&&J!=="combobox"&&J!=="tags"&&Object(T.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(T.b)(!Le||ae,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),$!=null){var ee=Object(y.d)($);Object(T.a)(!V||ee.every(function(Ce){return Object(m.a)(Ce)==="object"&&("key"in Ce||"value"in Ce)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(T.a)(!te||Array.isArray($),"`value` should be array when `mode` is `multiple` or `tags`")}if(ne){var de=null;Object(L.a)(ne).some(function(Ce){if(!M.isValidElement(Ce)||!Ce.type)return!1;var Me=Ce.type;if(Me.isSelectOption)return!1;if(Me.isSelectOptGroup){var Ye=Object(L.a)(Ce.props.children).every(function(et){return!M.isValidElement(et)||!Ce.type||et.type.isSelectOption?!0:(de=et.type,!1)});return!Ye}return de=Me,!0}),de&&Object(T.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(de.displayName||de.name||de,"`.")),Object(T.a)(q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var U=g,P=Object(d.a)({prefixCls:"rc-select",components:{optionList:c},convertChildrenToData:p,flattenOptions:n.d,getLabeledValue:n.e,filterOptions:n.b,isValueDisabled:n.g,findValueOption:n.c,warningProps:U,fillOptionsWithMissingValue:n.a}),I=function(D){Object(O.a)(X,D);var J=Object(Q.a)(X);function X(){var ne;return Object(Z.a)(this,X),ne=J.apply(this,arguments),ne.selectRef=M.createRef(),ne.focus=function(){ne.selectRef.current.focus()},ne.blur=function(){ne.selectRef.current.blur()},ne}return Object(H.a)(X,[{key:"render",value:function(){return M.createElement(P,Object.assign({ref:this.selectRef},this.props))}}]),X}(M.Component);I.Option=l,I.OptGroup=B;var G=I,K=Ae.c=G},M8RZ:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return t});var Z=N("fWQN"),H=N("mtLc"),O=N("yKVA"),Q=N("879j"),M=N("q1tI"),_=N.n(M),R=N("i8i4"),b=N.n(R),t=function(E){Object(O.a)(A,E);var a=Object(Q.a)(A);function A(h){var s;Object(Z.a)(this,A),s=a.call(this,h);var o=window.document;return s.node=o.createElement("div"),o.body.appendChild(s.node),s}return Object(H.a)(A,[{key:"render",value:function(){var s=this.props.children;return Object(R.createPortal)(s,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),A}(_.a.Component)},MEGo:function(Ve,Ae,N){var Z=N("4fz+"),H=N("Dagg"),O=N("dqUG"),Q=N("2fw6"),M=N("x6Kt"),_=N("rmlV"),R=N("yxFR"),b=N("y+Vt"),t=N("h7HQ"),E=N("1Jh7"),a=N("SKnc"),A=N("K2GJ"),h=N("Fofx"),s=N("NC18"),o=s.createFromString,f=N("bYtY"),u=f.isString,c=f.extend,i=f.defaults,l=f.trim,v=f.each,B=/[\s,]+/;function C(X){if(u(X)){var ne=new DOMParser;X=ne.parseFromString(X,"text/xml")}for(X.nodeType===9&&(X=X.firstChild);X.nodeName.toLowerCase()!=="svg"||X.nodeType!==1;)X=X.nextSibling;return X}function L(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}L.prototype.parse=function(X,ne){ne=ne||{};var ue=C(X);if(!ue)throw new Error("Illegal svg");var Oe=new Z;this._root=Oe;var _e=ue.getAttribute("viewBox")||"",De=parseFloat(ue.getAttribute("width")||ne.width),Ue=parseFloat(ue.getAttribute("height")||ne.height);isNaN(De)&&(De=null),isNaN(Ue)&&(Ue=null),y(ue,Oe,null,!0);for(var Ke=ue.firstChild;Ke;)this._parseNode(Ke,Oe),Ke=Ke.nextSibling;var Le,ae;if(_e){var V=l(_e).split(B);V.length>=4&&(Le={x:parseFloat(V[0]||0),y:parseFloat(V[1]||0),width:parseFloat(V[2]),height:parseFloat(V[3])})}if(Le&&De!=null&&Ue!=null&&(ae=D(Le,De,Ue),!ne.ignoreViewBox)){var $=Oe;Oe=new Z,Oe.add($),$.scale=ae.scale.slice(),$.position=ae.position.slice()}return!ne.ignoreRootClip&&De!=null&&Ue!=null&&Oe.setClipPath(new M({shape:{x:0,y:0,width:De,height:Ue}})),{root:Oe,width:De,height:Ue,viewBoxRect:Le,viewBoxTransform:ae}},L.prototype._parseNode=function(X,ne){var ue=X.nodeName.toLowerCase();ue==="defs"?this._isDefine=!0:ue==="text"&&(this._isText=!0);var Oe;if(this._isDefine){var _e=p[ue];if(_e){var De=_e.call(this,X),Ue=X.getAttribute("id");Ue&&(this._defs[Ue]=De)}}else{var _e=w[ue];_e&&(Oe=_e.call(this,X,ne),ne.add(Oe))}for(var Ke=X.firstChild;Ke;)Ke.nodeType===1&&this._parseNode(Ke,Oe),Ke.nodeType===3&&this._isText&&this._parseText(Ke,Oe),Ke=Ke.nextSibling;ue==="defs"?this._isDefine=!1:ue==="text"&&(this._isText=!1)},L.prototype._parseText=function(X,ne){if(X.nodeType===1){var ue=X.getAttribute("dx")||0,Oe=X.getAttribute("dy")||0;this._textX+=parseFloat(ue),this._textY+=parseFloat(Oe)}var _e=new O({style:{text:X.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});d(ne,_e),y(X,_e,this._defs);var De=_e.style.fontSize;De&&De<9&&(_e.style.fontSize=9,_e.scale=_e.scale||[1,1],_e.scale[0]*=De/9,_e.scale[1]*=De/9);var Ue=_e.getBoundingRect();return this._textX+=Ue.width,ne.add(_e),_e};var w={g:function(X,ne){var ue=new Z;return d(ne,ue),y(X,ue,this._defs),ue},rect:function(X,ne){var ue=new M;return d(ne,ue),y(X,ue,this._defs),ue.setShape({x:parseFloat(X.getAttribute("x")||0),y:parseFloat(X.getAttribute("y")||0),width:parseFloat(X.getAttribute("width")||0),height:parseFloat(X.getAttribute("height")||0)}),ue},circle:function(X,ne){var ue=new Q;return d(ne,ue),y(X,ue,this._defs),ue.setShape({cx:parseFloat(X.getAttribute("cx")||0),cy:parseFloat(X.getAttribute("cy")||0),r:parseFloat(X.getAttribute("r")||0)}),ue},line:function(X,ne){var ue=new R;return d(ne,ue),y(X,ue,this._defs),ue.setShape({x1:parseFloat(X.getAttribute("x1")||0),y1:parseFloat(X.getAttribute("y1")||0),x2:parseFloat(X.getAttribute("x2")||0),y2:parseFloat(X.getAttribute("y2")||0)}),ue},ellipse:function(X,ne){var ue=new _;return d(ne,ue),y(X,ue,this._defs),ue.setShape({cx:parseFloat(X.getAttribute("cx")||0),cy:parseFloat(X.getAttribute("cy")||0),rx:parseFloat(X.getAttribute("rx")||0),ry:parseFloat(X.getAttribute("ry")||0)}),ue},polygon:function(X,ne){var ue=X.getAttribute("points");ue&&(ue=m(ue));var Oe=new t({shape:{points:ue||[]}});return d(ne,Oe),y(X,Oe,this._defs),Oe},polyline:function(X,ne){var ue=new b;d(ne,ue),y(X,ue,this._defs);var Oe=X.getAttribute("points");Oe&&(Oe=m(Oe));var _e=new E({shape:{points:Oe||[]}});return _e},image:function(X,ne){var ue=new H;return d(ne,ue),y(X,ue,this._defs),ue.setStyle({image:X.getAttribute("xlink:href"),x:X.getAttribute("x"),y:X.getAttribute("y"),width:X.getAttribute("width"),height:X.getAttribute("height")}),ue},text:function(X,ne){var ue=X.getAttribute("x")||0,Oe=X.getAttribute("y")||0,_e=X.getAttribute("dx")||0,De=X.getAttribute("dy")||0;this._textX=parseFloat(ue)+parseFloat(_e),this._textY=parseFloat(Oe)+parseFloat(De);var Ue=new Z;return d(ne,Ue),y(X,Ue,this._defs),Ue},tspan:function(X,ne){var ue=X.getAttribute("x"),Oe=X.getAttribute("y");ue!=null&&(this._textX=parseFloat(ue)),Oe!=null&&(this._textY=parseFloat(Oe));var _e=X.getAttribute("dx")||0,De=X.getAttribute("dy")||0,Ue=new Z;return d(ne,Ue),y(X,Ue,this._defs),this._textX+=_e,this._textY+=De,Ue},path:function(X,ne){var ue=X.getAttribute("d")||"",Oe=o(ue);return d(ne,Oe),y(X,Oe,this._defs),Oe}},p={lineargradient:function(X){var ne=parseInt(X.getAttribute("x1")||0,10),ue=parseInt(X.getAttribute("y1")||0,10),Oe=parseInt(X.getAttribute("x2")||10,10),_e=parseInt(X.getAttribute("y2")||0,10),De=new a(ne,ue,Oe,_e);return n(X,De),De},radialgradient:function(X){}};function n(X,ne){for(var ue=X.firstChild;ue;){if(ue.nodeType===1){var Oe=ue.getAttribute("offset");Oe.indexOf("%")>0?Oe=parseInt(Oe,10)/100:Oe?Oe=parseFloat(Oe):Oe=0;var _e=ue.getAttribute("stop-color")||"#000000";ne.addColorStop(Oe,_e)}ue=ue.nextSibling}}function d(X,ne){X&&X.__inheritedStyle&&(ne.__inheritedStyle||(ne.__inheritedStyle={}),i(ne.__inheritedStyle,X.__inheritedStyle))}function m(X){for(var ne=l(X).split(B),ue=[],Oe=0;Oe<ne.length;Oe+=2){var _e=parseFloat(ne[Oe]),De=parseFloat(ne[Oe+1]);ue.push([_e,De])}return ue}var T={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function y(X,ne,ue,Oe){var _e=ne.__inheritedStyle||{},De=ne.type==="text";if(X.nodeType===1&&(I(X,ne),c(_e,K(X)),!Oe)){for(var Ue in T)if(T.hasOwnProperty(Ue)){var Ke=X.getAttribute(Ue);Ke!=null&&(_e[T[Ue]]=Ke)}}var Le=De?"textFill":"fill",ae=De?"textStroke":"stroke";ne.style=ne.style||new A;var V=ne.style;_e.fill!=null&&V.set(Le,U(_e.fill,ue)),_e.stroke!=null&&V.set(ae,U(_e.stroke,ue)),v(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function($){var q=$==="lineWidth"&&De?"textStrokeWidth":$;_e[$]!=null&&V.set(q,parseFloat(_e[$]))}),(!_e.textBaseline||_e.textBaseline==="auto")&&(_e.textBaseline="alphabetic"),_e.textBaseline==="alphabetic"&&(_e.textBaseline="bottom"),_e.textAlign==="start"&&(_e.textAlign="left"),_e.textAlign==="end"&&(_e.textAlign="right"),v(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function($){_e[$]!=null&&V.set($,_e[$])}),_e.lineDash&&(ne.style.lineDash=l(_e.lineDash).split(B)),V[ae]&&V[ae]!=="none"&&(ne[ae]=!0),ne.__inheritedStyle=_e}var g=/url\(\s*#(.*?)\)/;function U(X,ne){var ue=ne&&X&&X.match(g);if(ue){var Oe=l(ue[1]),_e=ne[Oe];return _e}return X}var P=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function I(X,ne){var ue=X.getAttribute("transform");if(ue){ue=ue.replace(/,/g," ");var Oe=null,_e=[];ue.replace(P,function(Le,ae,V){_e.push(ae,V)});for(var De=_e.length-1;De>0;De-=2){var Ue=_e[De],Ke=_e[De-1];Oe=Oe||h.create();switch(Ke){case"translate":Ue=l(Ue).split(B),h.translate(Oe,Oe,[parseFloat(Ue[0]),parseFloat(Ue[1]||0)]);break;case"scale":Ue=l(Ue).split(B),h.scale(Oe,Oe,[parseFloat(Ue[0]),parseFloat(Ue[1]||Ue[0])]);break;case"rotate":Ue=l(Ue).split(B),h.rotate(Oe,Oe,parseFloat(Ue[0]));break;case"skew":Ue=l(Ue).split(B),console.warn("Skew transform is not supported yet");break;case"matrix":var Ue=l(Ue).split(B);Oe[0]=parseFloat(Ue[0]),Oe[1]=parseFloat(Ue[1]),Oe[2]=parseFloat(Ue[2]),Oe[3]=parseFloat(Ue[3]),Oe[4]=parseFloat(Ue[4]),Oe[5]=parseFloat(Ue[5]);break}}ne.setLocalTransform(Oe)}}var G=/([^\s:;]+)\s*:\s*([^:;]+)/g;function K(X){var ne=X.getAttribute("style"),ue={};if(!ne)return ue;var Oe={};G.lastIndex=0;for(var _e;(_e=G.exec(ne))!=null;)Oe[_e[1]]=_e[2];for(var De in T)T.hasOwnProperty(De)&&Oe[De]!=null&&(ue[T[De]]=Oe[De]);return ue}function D(X,ne,ue){var Oe=ne/X.width,_e=ue/X.height,De=Math.min(Oe,_e),Ue=[De,De],Ke=[-(X.x+X.width/2)*De+ne/2,-(X.y+X.height/2)*De+ue/2];return{scale:Ue,position:Ke}}function J(X,ne){var ue=new L;return ue.parse(X,ne)}Ae.parseXML=C,Ae.makeViewBoxTransform=D,Ae.parseSVG=J},MI8n:function(Ve,Ae,N){"use strict";N.d(Ae,"c",function(){return M}),N.d(Ae,"b",function(){return t}),N.d(Ae,"e",function(){return E}),N.d(Ae,"a",function(){return a}),N.d(Ae,"d",function(){return A}),N.d(Ae,"f",function(){return h});var Z=N("/cxE"),H=N("pmY6"),O=N("24hK"),Q=N("5Y4S"),M;(function(s){s.None=()=>H.a.None;function o(g){return(U,P=null,I)=>{let G=!1,K;return K=g(D=>G?void 0:(K?K.dispose():G=!0,U.call(P,D)),null,I),G&&K.dispose(),K}}s.once=o;function f(g,U){return B((P,I=null,G)=>g(K=>P.call(I,U(K)),null,G))}s.map=f;function u(g,U){return B((P,I=null,G)=>g(K=>{U(K),P.call(I,K)},null,G))}s.forEach=u;function c(g,U){return B((P,I=null,G)=>g(K=>U(K)&&P.call(I,K),null,G))}s.filter=c;function i(g){return g}s.signal=i;function l(...g){return(U,P=null,I)=>Object(H.e)(...g.map(G=>G(K=>U.call(P,K),null,I)))}s.any=l;function v(g,U,P){let I=P;return f(g,G=>(I=U(I,G),I))}s.reduce=v;function B(g){let U;const P=new t({onFirstListenerAdd(){U=g(P.fire,P)},onLastListenerRemove(){U.dispose()}});return P.event}function C(g,U,P=100,I=!1,G){let K,D,J,X=0;const ne=new t({leakWarningThreshold:G,onFirstListenerAdd(){K=g(ue=>{X++,D=U(D,ue),I&&!J&&(ne.fire(D),D=void 0),clearTimeout(J),J=setTimeout(()=>{const Oe=D;D=void 0,J=void 0,(!I||X>1)&&ne.fire(Oe),X=0},P)})},onLastListenerRemove(){K.dispose()}});return ne.event}s.debounce=C;function L(g,U=(P,I)=>P===I){let P=!0,I;return c(g,G=>{const K=P||!U(G,I);return P=!1,I=G,K})}s.latch=L;function w(g,U){return[s.filter(g,U),s.filter(g,P=>!U(P))]}s.split=w;function p(g,U=!1,P=[]){let I=P.slice(),G=g(J=>{I?I.push(J):D.fire(J)});const K=()=>{I&&I.forEach(J=>D.fire(J)),I=null},D=new t({onFirstListenerAdd(){G||(G=g(J=>D.fire(J)))},onFirstListenerDidAdd(){I&&(U?setTimeout(K):K())},onLastListenerRemove(){G&&G.dispose(),G=null}});return D.event}s.buffer=p;class n{constructor(g){this.event=g}map(g){return new n(f(this.event,g))}forEach(g){return new n(u(this.event,g))}filter(g){return new n(c(this.event,g))}reduce(g,U){return new n(v(this.event,g,U))}latch(){return new n(L(this.event))}debounce(g,U=100,P=!1,I){return new n(C(this.event,g,U,P,I))}on(g,U,P){return this.event(g,U,P)}once(g,U,P){return o(this.event)(g,U,P)}}function d(g){return new n(g)}s.chain=d;function m(g,U,P=I=>I){const I=(...J)=>D.fire(P(...J)),G=()=>g.on(U,I),K=()=>g.removeListener(U,I),D=new t({onFirstListenerAdd:G,onLastListenerRemove:K});return D.event}s.fromNodeEventEmitter=m;function T(g,U,P=I=>I){const I=(...J)=>D.fire(P(...J)),G=()=>g.addEventListener(U,I),K=()=>g.removeEventListener(U,I),D=new t({onFirstListenerAdd:G,onLastListenerRemove:K});return D.event}s.fromDOMEventEmitter=T;function y(g){return new Promise(U=>o(g)(U))}s.toPromise=y})(M||(M={}));class _{constructor(s){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${s}_${_._idPool++}`}start(s){this._stopWatch=new Q.a(!0),this._listenerCount=s}stop(){if(this._stopWatch){const s=this._stopWatch.elapsed();this._elapsedOverall+=s,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${s.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}_._idPool=0;let R=-1;class b{constructor(s,o=Math.random().toString(18).slice(2,5)){this.customThreshold=s,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(s){let o=R;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||s<o)return;this._stacks||(this._stacks=new Map);const f=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),u=this._stacks.get(f)||0;if(this._stacks.set(f,u+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=o*.5;let c,i=0;for(const[l,v]of this._stacks)(!c||i<v)&&(c=l,i=v);console.warn(`[${this.name}] potential listener LEAK detected, having ${s} listeners already. MOST frequent listener (${i}):`),console.warn(c)}return()=>{const c=this._stacks.get(f)||0;this._stacks.set(f,c-1)}}}class t{constructor(s){var o;this._disposed=!1,this._options=s,this._leakageMon=R>0?new b(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new _(this._options._profName):void 0}get event(){return this._event||(this._event=(s,o,f)=>{var u;this._listeners||(this._listeners=new O.a);const c=this._listeners.isEmpty();c&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const i=this._listeners.push(o?[s,o]:s);c&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,s,o);const l=(u=this._leakageMon)===null||u===void 0?void 0:u.check(this._listeners.size),v=Object(H.i)(()=>{if(l&&l(),!this._disposed&&(i(),this._options&&this._options.onLastListenerRemove)){const B=this._listeners&&!this._listeners.isEmpty();B||this._options.onLastListenerRemove(this)}});return f instanceof H.b?f.add(v):Array.isArray(f)&&f.push(v),v}),this._event}fire(s){var o,f;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new O.a);for(let u of this._listeners)this._deliveryQueue.push([u,s]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[u,c]=this._deliveryQueue.shift();try{typeof u=="function"?u.call(void 0,c):u[0].call(u[1],c)}catch(i){Object(Z.f)(i)}}(f=this._perfMon)===null||f===void 0||f.stop()}}dispose(){var s,o,f,u,c;this._disposed||(this._disposed=!0,(s=this._listeners)===null||s===void 0||s.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(u=(f=this._options)===null||f===void 0?void 0:f.onLastListenerRemove)===null||u===void 0||u.call(f),(c=this._leakageMon)===null||c===void 0||c.dispose())}}class E extends t{constructor(s){super(s);this._isPaused=0,this._eventQueue=new O.a,this._mergeFn=s==null?void 0:s.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const s=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(s))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(s){this._listeners&&(this._isPaused!==0?this._eventQueue.push(s):super.fire(s))}}class a extends E{constructor(s){var o;super(s);this._delay=(o=s.delay)!==null&&o!==void 0?o:100}fire(s){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(s)}}class A{constructor(){this.buffers=[]}wrapEvent(s){return(o,f,u)=>s(c=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>o.call(f,c)):o.call(f,c)},void 0,u)}bufferEvents(s){const o=[];this.buffers.push(o);const f=s();return this.buffers.pop(),o.forEach(u=>u()),f}}class h{constructor(){this.listening=!1,this.inputEvent=M.None,this.inputEventListener=H.a.None,this.emitter=new t({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(s){this.inputEvent=s,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=s(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MKOG:function(Ve,Ae,N){var Z=N("bYtY"),H=N("YH21"),O=H.Dispatcher,Q=N("mLcG"),M=N("Bq2U"),_=function(b){b=b||{},this.stage=b.stage||{},this.onframe=b.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,O.call(this)};_.prototype={constructor:_,addClip:function(b){this._clips.push(b)},addAnimator:function(b){b.animation=this;for(var t=b.getClips(),E=0;E<t.length;E++)this.addClip(t[E])},removeClip:function(b){var t=Z.indexOf(this._clips,b);t>=0&&this._clips.splice(t,1)},removeAnimator:function(b){for(var t=b.getClips(),E=0;E<t.length;E++)this.removeClip(t[E]);b.animation=null},_update:function(){for(var b=new Date().getTime()-this._pausedTime,t=b-this._time,E=this._clips,a=E.length,A=[],h=[],s=0;s<a;s++){var o=E[s],f=o.step(b,t);f&&(A.push(f),h.push(o))}for(var s=0;s<a;)E[s]._needsRemove?(E[s]=E[a-1],E.pop(),a--):s++;a=A.length;for(var s=0;s<a;s++)h[s].fire(A[s]);this._time=b,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var b=this;this._running=!0;function t(){b._running&&(Q(t),!b._paused&&b._update())}Q(t)},start:function(){this._time=new Date().getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=new Date().getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=new Date().getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(b,t){t=t||{};var E=new M(b,t.loop,t.getter,t.setter);return this.addAnimator(E),E}},Z.mixin(_,O);var R=_;Ve.exports=R},MNsG:function(Ve,Ae,N){"use strict";(function(Z,H){N.d(Ae,"b",function(){return f}),N.d(Ae,"i",function(){return l}),N.d(Ae,"f",function(){return v}),N.d(Ae,"d",function(){return B}),N.d(Ae,"g",function(){return C}),N.d(Ae,"h",function(){return L}),N.d(Ae,"c",function(){return w}),N.d(Ae,"k",function(){return p}),N.d(Ae,"j",function(){return n}),N.d(Ae,"a",function(){return d}),N.d(Ae,"e",function(){return y});var O;const Q="en";let M=!1,_=!1,R=!1,b=!1,t=!1,E=!1,a=!1,A,h=Q,s,o;const f=typeof self=="object"?self:typeof Z=="object"?Z:{};let u;typeof f.vscode!="undefined"&&typeof f.vscode.process!="undefined"?u=f.vscode.process:typeof H!="undefined"&&(u=H);const c=typeof((O=u==null?void 0:u.versions)===null||O===void 0?void 0:O.electron)=="string"&&u.type==="renderer";if(typeof navigator=="object"&&!c)o=navigator.userAgent,M=o.indexOf("Windows")>=0,_=o.indexOf("Macintosh")>=0,a=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,R=o.indexOf("Linux")>=0,E=!0,A=navigator.language,h=A;else if(typeof u=="object"){M=u.platform==="win32",_=u.platform==="darwin",R=u.platform==="linux",b=R&&!!u.env.SNAP&&!!u.env.SNAP_REVISION,A=Q,h=Q;const g=u.env.VSCODE_NLS_CONFIG;if(g)try{const U=JSON.parse(g),P=U.availableLanguages["*"];A=U.locale,h=P||Q,s=U._translationsConfigFile}catch(U){}t=!0}else console.error("Unable to resolve platform.");let i=0;_?i=1:M?i=3:R&&(i=2);const l=M,v=_,B=R,C=t,L=E,w=a,p=o,n=function(){if(f.setImmediate)return f.setImmediate.bind(f);if(typeof f.postMessage=="function"&&!f.importScripts){let P=[];f.addEventListener("message",G=>{if(G.data&&G.data.vscodeSetImmediateId)for(let K=0,D=P.length;K<D;K++){const J=P[K];if(J.id===G.data.vscodeSetImmediateId){P.splice(K,1),J.callback();return}}});let I=0;return G=>{const K=++I;P.push({id:K,callback:G}),f.postMessage({vscodeSetImmediateId:K},"*")}}if(typeof(u==null?void 0:u.nextTick)=="function")return u.nextTick.bind(u);const U=Promise.resolve();return P=>U.then(P)}(),d=_||a?2:M?1:3;let m=!0,T=!1;function y(){if(!T){T=!0;const g=new Uint8Array(2);g[0]=1,g[1]=2;const U=new Uint16Array(g.buffer);m=U[0]===(2<<8)+1}return m}}).call(this,N("IyRk"),N("Q2Ig"))},N0LK:function(Ve,Ae,N){"use strict";N.d(Ae,"C",function(){return Z}),N.d(Ae,"v",function(){return O}),N.d(Ae,"s",function(){return Q}),N.d(Ae,"t",function(){return M}),N.d(Ae,"U",function(){return _}),N.d(Ae,"J",function(){return R}),N.d(Ae,"O",function(){return b}),N.d(Ae,"p",function(){return t}),N.d(Ae,"T",function(){return E}),N.d(Ae,"q",function(){return a}),N.d(Ae,"N",function(){return A}),N.d(Ae,"M",function(){return h}),N.d(Ae,"Q",function(){return s}),N.d(Ae,"u",function(){return o}),N.d(Ae,"x",function(){return f}),N.d(Ae,"I",function(){return u}),N.d(Ae,"f",function(){return c}),N.d(Ae,"h",function(){return i}),N.d(Ae,"g",function(){return l}),N.d(Ae,"i",function(){return v}),N.d(Ae,"G",function(){return B}),N.d(Ae,"H",function(){return C}),N.d(Ae,"r",function(){return L}),N.d(Ae,"R",function(){return w}),N.d(Ae,"d",function(){return p}),N.d(Ae,"e",function(){return n}),N.d(Ae,"E",function(){return d}),N.d(Ae,"F",function(){return m}),N.d(Ae,"j",function(){return T}),N.d(Ae,"z",function(){return y}),N.d(Ae,"K",function(){return U}),N.d(Ae,"L",function(){return P}),N.d(Ae,"m",function(){return G}),N.d(Ae,"k",function(){return D}),N.d(Ae,"A",function(){return X}),N.d(Ae,"a",function(){return ne}),N.d(Ae,"n",function(){return ue}),N.d(Ae,"l",function(){return Oe}),N.d(Ae,"D",function(){return _e}),N.d(Ae,"B",function(){return De}),N.d(Ae,"b",function(){return Ue}),N.d(Ae,"S",function(){return Ke}),N.d(Ae,"o",function(){return Le}),N.d(Ae,"P",function(){return ae}),N.d(Ae,"w",function(){return V}),N.d(Ae,"c",function(){return $}),N.d(Ae,"y",function(){return te});function Z(ee){return!ee||typeof ee!="string"?!0:ee.trim().length===0}const H=/{(\d+)}/g;function O(ee,...de){return de.length===0?ee:ee.replace(H,function(Ce,Me){const Ye=parseInt(Me,10);return isNaN(Ye)||Ye<0||Ye>=de.length?Ce:de[Ye]})}function Q(ee){return ee.replace(/[<>&]/g,function(de){switch(de){case"<":return"<";case">":return">";case"&":return"&";default:return de}})}function M(ee){return ee.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function _(ee,de=" "){const Ce=R(ee,de);return b(Ce,de)}function R(ee,de){if(!ee||!de)return ee;const Ce=de.length;if(Ce===0||ee.length===0)return ee;let Me=0;for(;ee.indexOf(de,Me)===Me;)Me=Me+Ce;return ee.substring(Me)}function b(ee,de){if(!ee||!de)return ee;const Ce=de.length,Me=ee.length;if(Ce===0||Me===0)return ee;let Ye=Me,et=-1;for(;!(et=ee.lastIndexOf(de,Ye-1),et===-1||et+Ce!==Ye);){if(et===0)return"";Ye=et}return ee.substring(0,Ye)}function t(ee){return ee.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function E(ee){return ee.replace(/\*/g,"")}function a(ee,de,Ce={}){if(!ee)throw new Error("Cannot create regex from empty string");de||(ee=M(ee)),Ce.wholeWord&&(/\B/.test(ee.charAt(0))||(ee="\\b"+ee),/\B/.test(ee.charAt(ee.length-1))||(ee=ee+"\\b"));let Me="";return Ce.global&&(Me+="g"),Ce.matchCase||(Me+="i"),Ce.multiline&&(Me+="m"),Ce.unicode&&(Me+="u"),new RegExp(ee,Me)}function A(ee){if(ee.source==="^"||ee.source==="^$"||ee.source==="$"||ee.source==="^\\s*$")return!1;const de=ee.exec("");return!!(de&&ee.lastIndex===0)}function h(ee){return(ee.global?"g":"")+(ee.ignoreCase?"i":"")+(ee.multiline?"m":"")+(ee.unicode?"u":"")}function s(ee){return ee.split(/\r\n|\r|\n/)}function o(ee){for(let de=0,Ce=ee.length;de<Ce;de++){const Me=ee.charCodeAt(de);if(Me!==32&&Me!==9)return de}return-1}function f(ee,de=0,Ce=ee.length){for(let Me=de;Me<Ce;Me++){const Ye=ee.charCodeAt(Me);if(Ye!==32&&Ye!==9)return ee.substring(de,Me)}return ee.substring(de,Ce)}function u(ee,de=ee.length-1){for(let Ce=de;Ce>=0;Ce--){const Me=ee.charCodeAt(Ce);if(Me!==32&&Me!==9)return Ce}return-1}function c(ee,de){return ee<de?-1:ee>de?1:0}function i(ee,de,Ce=0,Me=ee.length,Ye=0,et=de.length){for(;Ce<Me&&Ye<et;Ce++,Ye++){let yt=ee.charCodeAt(Ce),xt=de.charCodeAt(Ye);if(yt<xt)return-1;if(yt>xt)return 1}const st=Me-Ce,ut=et-Ye;return st<ut?-1:st>ut?1:0}function l(ee,de){return v(ee,de,0,ee.length,0,de.length)}function v(ee,de,Ce=0,Me=ee.length,Ye=0,et=de.length){for(;Ce<Me&&Ye<et;Ce++,Ye++){let yt=ee.charCodeAt(Ce),xt=de.charCodeAt(Ye);if(yt===xt)continue;if(yt>=128||xt>=128)return i(ee.toLowerCase(),de.toLowerCase(),Ce,Me,Ye,et);B(yt)&&(yt-=32),B(xt)&&(xt-=32);const je=yt-xt;if(je===0)continue;return je}const st=Me-Ce,ut=et-Ye;return st<ut?-1:st>ut?1:0}function B(ee){return ee>=97&&ee<=122}function C(ee){return ee>=65&&ee<=90}function L(ee,de){return ee.length===de.length&&v(ee,de)===0}function w(ee,de){const Ce=de.length;return de.length>ee.length?!1:v(ee,de,0,Ce)===0}function p(ee,de){let Ce,Me=Math.min(ee.length,de.length);for(Ce=0;Ce<Me;Ce++)if(ee.charCodeAt(Ce)!==de.charCodeAt(Ce))return Ce;return Me}function n(ee,de){let Ce,Me=Math.min(ee.length,de.length);const Ye=ee.length-1,et=de.length-1;for(Ce=0;Ce<Me;Ce++)if(ee.charCodeAt(Ye-Ce)!==de.charCodeAt(et-Ce))return Ce;return Me}function d(ee){return 55296<=ee&&ee<=56319}function m(ee){return 56320<=ee&&ee<=57343}function T(ee,de){return(ee-55296<<10)+(de-56320)+65536}function y(ee,de,Ce){const Me=ee.charCodeAt(Ce);if(d(Me)&&Ce+1<de){const Ye=ee.charCodeAt(Ce+1);if(m(Ye))return T(Me,Ye)}return Me}function g(ee,de){const Ce=ee.charCodeAt(de-1);if(m(Ce)&&de>1){const Me=ee.charCodeAt(de-2);if(d(Me))return T(Me,Ce)}return Ce}function U(ee,de){const Ce=q.getInstance(),Me=de,Ye=ee.length,et=y(ee,Ye,de);de+=et>=65536?2:1;let st=Ce.getGraphemeBreakType(et);for(;de<Ye;){const ut=y(ee,Ye,de),yt=Ce.getGraphemeBreakType(ut);if($(st,yt))break;de+=ut>=65536?2:1,st=yt}return de-Me}function P(ee,de){const Ce=q.getInstance(),Me=de,Ye=g(ee,de);de-=Ye>=65536?2:1;let et=Ce.getGraphemeBreakType(Ye);for(;de>0;){const st=g(ee,de),ut=Ce.getGraphemeBreakType(st);if($(ut,et))break;de-=st>=65536?2:1,et=ut}return Me-de}const I=/(?:[\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 G(ee){return I.test(ee)}const K=/(?:[\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 D(ee){return K.test(ee)}const J=/^[\t\n\r\x20-\x7E]*$/;function X(ee){return J.test(ee)}const ne=/[\u2028\u2029]/;function ue(ee){return ne.test(ee)}function Oe(ee){for(let de=0,Ce=ee.length;de<Ce;de++)if(_e(ee.charCodeAt(de)))return!0;return!1}function _e(ee){return ee=+ee,ee>=11904&&ee<=55215||ee>=63744&&ee<=64255||ee>=65281&&ee<=65374}function De(ee){return ee>=127462&&ee<=127487||ee===8986||ee===8987||ee===9200||ee===9203||ee>=9728&&ee<=10175||ee===11088||ee===11093||ee>=127744&&ee<=128591||ee>=128640&&ee<=128764||ee>=128992&&ee<=129003||ee>=129280&&ee<=129535||ee>=129648&&ee<=129750}const Ue=String.fromCharCode(65279);function Ke(ee){return!!(ee&&ee.length>0&&ee.charCodeAt(0)===65279)}function Le(ee,de=!1){return ee?(de&&(ee=ee.replace(/\\./g,"")),ee.toLowerCase()!==ee):!1}function ae(ee){const de=90-65+1;return ee=ee%(2*de),ee<de?String.fromCharCode(97+ee):String.fromCharCode(65+ee-de)}function V(ee){const de=q.getInstance();return de.getGraphemeBreakType(ee)}function $(ee,de){return ee===0?de!==5&&de!==7:ee===2&&de===3?!1:ee===4||ee===2||ee===3||(de===4||de===2||de===3)?!0:ee===8&&(de===8||de===9||de===11||de===12)||((ee===11||ee===9)&&(de===9||de===10)||((ee===12||ee===10)&&de===10||(de===5||de===13||(de===7||(ee===1||ee===13&&de===14)))))?!1:!(ee===6&&de===6)}class q{constructor(){this._data=se()}static getInstance(){return q._INSTANCE||(q._INSTANCE=new q),q._INSTANCE}getGraphemeBreakType(ee){if(ee<32)return ee===10?3:ee===13?2:4;if(ee<127)return 0;const de=this._data,Ce=de.length/3;let Me=1;for(;Me<=Ce;)if(ee<de[3*Me])Me=2*Me;else if(ee>de[3*Me+1])Me=2*Me+1;else return de[3*Me+2];return 0}}q._INSTANCE=null;function se(){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 te(ee,de){if(ee===0)return 0;const Ce=oe(ee,de);if(Ce!==void 0)return Ce;const Me=g(de,ee);return ee-=re(Me),ee}function oe(ee,de){let Ce=g(de,ee);for(ee-=re(Ce);ie(Ce)||Ce===65039||Ce===8419;){if(ee===0)return;Ce=g(de,ee),ee-=re(Ce)}if(!De(Ce))return;if(ee>=0){const Me=g(de,ee);Me===8205&&(ee-=re(Me))}return ee}function re(ee){return ee>=65536?2:1}function ie(ee){return 127995<=ee&&ee<=127999}},NC18:function(Ve,Ae,N){var Z=N("y+Vt"),H=N("IMiH"),O=N("7oTu"),Q=Math.sqrt,M=Math.sin,_=Math.cos,R=Math.PI,b=function(i){return Math.sqrt(i[0]*i[0]+i[1]*i[1])},t=function(i,l){return(i[0]*l[0]+i[1]*l[1])/(b(i)*b(l))},E=function(i,l){return(i[0]*l[1]<i[1]*l[0]?-1:1)*Math.acos(t(i,l))};function a(i,l,v,B,C,L,w,p,n,d,m){var T=n*(R/180),y=_(T)*(i-v)/2+M(T)*(l-B)/2,g=-1*M(T)*(i-v)/2+_(T)*(l-B)/2,U=y*y/(w*w)+g*g/(p*p);U>1&&(w*=Q(U),p*=Q(U));var P=(C===L?-1:1)*Q((w*w*(p*p)-w*w*(g*g)-p*p*(y*y))/(w*w*(g*g)+p*p*(y*y)))||0,I=P*w*g/p,G=P*-p*y/w,K=(i+v)/2+_(T)*I-M(T)*G,D=(l+B)/2+M(T)*I+_(T)*G,J=E([1,0],[(y-I)/w,(g-G)/p]),X=[(y-I)/w,(g-G)/p],ne=[(-1*y-I)/w,(-1*g-G)/p],ue=E(X,ne);t(X,ne)<=-1&&(ue=R),t(X,ne)>=1&&(ue=0),L===0&&ue>0&&(ue=ue-2*R),L===1&&ue<0&&(ue=ue+2*R),m.addData(d,K,D,w,p,J,ue,T,L)}var A=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,h=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function s(i){if(!i)return new H;for(var l=0,v=0,B=l,C=v,L,w=new H,p=H.CMD,n=i.match(A),d=0;d<n.length;d++){for(var m=n[d],T=m.charAt(0),y,g=m.match(h)||[],U=g.length,P=0;P<U;P++)g[P]=parseFloat(g[P]);for(var I=0;I<U;){var G,K,D,J,X,ne,ue,Oe=l,_e=v;switch(T){case"l":l+=g[I++],v+=g[I++],y=p.L,w.addData(y,l,v);break;case"L":l=g[I++],v=g[I++],y=p.L,w.addData(y,l,v);break;case"m":l+=g[I++],v+=g[I++],y=p.M,w.addData(y,l,v),B=l,C=v,T="l";break;case"M":l=g[I++],v=g[I++],y=p.M,w.addData(y,l,v),B=l,C=v,T="L";break;case"h":l+=g[I++],y=p.L,w.addData(y,l,v);break;case"H":l=g[I++],y=p.L,w.addData(y,l,v);break;case"v":v+=g[I++],y=p.L,w.addData(y,l,v);break;case"V":v=g[I++],y=p.L,w.addData(y,l,v);break;case"C":y=p.C,w.addData(y,g[I++],g[I++],g[I++],g[I++],g[I++],g[I++]),l=g[I-2],v=g[I-1];break;case"c":y=p.C,w.addData(y,g[I++]+l,g[I++]+v,g[I++]+l,g[I++]+v,g[I++]+l,g[I++]+v),l+=g[I-2],v+=g[I-1];break;case"S":G=l,K=v;var De=w.len(),Ue=w.data;L===p.C&&(G+=l-Ue[De-4],K+=v-Ue[De-3]),y=p.C,Oe=g[I++],_e=g[I++],l=g[I++],v=g[I++],w.addData(y,G,K,Oe,_e,l,v);break;case"s":G=l,K=v;var De=w.len(),Ue=w.data;L===p.C&&(G+=l-Ue[De-4],K+=v-Ue[De-3]),y=p.C,Oe=l+g[I++],_e=v+g[I++],l+=g[I++],v+=g[I++],w.addData(y,G,K,Oe,_e,l,v);break;case"Q":Oe=g[I++],_e=g[I++],l=g[I++],v=g[I++],y=p.Q,w.addData(y,Oe,_e,l,v);break;case"q":Oe=g[I++]+l,_e=g[I++]+v,l+=g[I++],v+=g[I++],y=p.Q,w.addData(y,Oe,_e,l,v);break;case"T":G=l,K=v;var De=w.len(),Ue=w.data;L===p.Q&&(G+=l-Ue[De-4],K+=v-Ue[De-3]),l=g[I++],v=g[I++],y=p.Q,w.addData(y,G,K,l,v);break;case"t":G=l,K=v;var De=w.len(),Ue=w.data;L===p.Q&&(G+=l-Ue[De-4],K+=v-Ue[De-3]),l+=g[I++],v+=g[I++],y=p.Q,w.addData(y,G,K,l,v);break;case"A":D=g[I++],J=g[I++],X=g[I++],ne=g[I++],ue=g[I++],Oe=l,_e=v,l=g[I++],v=g[I++],y=p.A,a(Oe,_e,l,v,ne,ue,D,J,X,y,w);break;case"a":D=g[I++],J=g[I++],X=g[I++],ne=g[I++],ue=g[I++],Oe=l,_e=v,l+=g[I++],v+=g[I++],y=p.A,a(Oe,_e,l,v,ne,ue,D,J,X,y,w);break}}(T==="z"||T==="Z")&&(y=p.Z,w.addData(y),l=B,v=C),L=y}return w.toStatic(),w}function o(i,l){var v=s(i);return l=l||{},l.buildPath=function(B){if(B.setData){B.setData(v.data);var C=B.getContext();C&&B.rebuildPath(C)}else{var C=B;v.rebuildPath(C)}},l.applyTransform=function(B){O(v,B),this.dirty(!0)},l}function f(i,l){return new Z(o(i,l))}function u(i,l){return Z.extend(o(i,l))}function c(i,l){for(var v=[],B=i.length,C=0;C<B;C++){var L=i[C];L.path||L.createPathProxy(),L.__dirtyPath&&L.buildPath(L.path,L.shape,!0),v.push(L.path)}var w=new Z(l);return w.createPathProxy(),w.buildPath=function(p){p.appendPath(v);var n=p.getContext();n&&p.rebuildPath(n)},w}Ae.createFromString=f,Ae.extendFromString=u,Ae.mergePath=c},NohK:function(Ve,Ae,N){"use strict";Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.default=void 0;var Z=function(O){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,M=null;return function(){for(var _=this,R=arguments.length,b=new Array(R),t=0;t<R;t++)b[t]=arguments[t];clearTimeout(M),M=setTimeout(function(){O.apply(_,b)},Q)}};Ae.default=Z},NvD2:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return _});var Z=N("Kwbf");function H(R,b){var t=new Set;return R.forEach(function(E){b.has(E)||t.add(E)}),t}function O(R){var b=R||{},t=b.disabled,E=b.disableCheckbox,a=b.checkable;return!!(t||E)||a===!1}function Q(R,b,t,E){for(var a=new Set(R),A=new Set,h=0;h<=t;h+=1){var s=b.get(h)||new Set;s.forEach(function(c){var i=c.key,l=c.node,v=c.children,B=v===void 0?[]:v;a.has(i)&&!E(l)&&B.filter(function(C){return!E(C.node)}).forEach(function(C){a.add(C.key)})})}for(var o=new Set,f=t;f>=0;f-=1){var u=b.get(f)||new Set;u.forEach(function(c){var i=c.parent,l=c.node;if(E(l)||!c.parent||o.has(c.parent.key))return;if(E(c.parent.node)){o.add(i.key);return}var v=!0,B=!1;(i.children||[]).filter(function(C){return!E(C.node)}).forEach(function(C){var L=C.key,w=a.has(L);v&&!w&&(v=!1),!B&&(w||A.has(L))&&(B=!0)}),v&&a.add(i.key),B&&A.add(i.key),o.add(i.key)})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(H(A,a))}}function M(R,b,t,E,a){for(var A=new Set(R),h=new Set(b),s=0;s<=E;s+=1){var o=t.get(s)||new Set;o.forEach(function(i){var l=i.key,v=i.node,B=i.children,C=B===void 0?[]:B;!A.has(l)&&!h.has(l)&&!a(v)&&C.filter(function(L){return!a(L.node)}).forEach(function(L){A.delete(L.key)})})}h=new Set;for(var f=new Set,u=E;u>=0;u-=1){var c=t.get(u)||new Set;c.forEach(function(i){var l=i.parent,v=i.node;if(a(v)||!i.parent||f.has(i.parent.key))return;if(a(i.parent.node)){f.add(l.key);return}var B=!0,C=!1;(l.children||[]).filter(function(L){return!a(L.node)}).forEach(function(L){var w=L.key,p=A.has(w);B&&!p&&(B=!1),!C&&(p||h.has(w))&&(C=!0)}),B||A.delete(l.key),C&&h.add(l.key),f.add(l.key)})}return{checkedKeys:Array.from(A),halfCheckedKeys:Array.from(H(h,A))}}function _(R,b,t,E){var a=[],A;E?A=E:A=O;var h=new Set(R.filter(function(u){var c=!!t[u];return c||a.push(u),c})),s=new Map,o=0;Object.keys(t).forEach(function(u){var c=t[u],i=c.level,l=s.get(i);l||(l=new Set,s.set(i,l)),l.add(c),o=Math.max(o,i)}),Object(Z.a)(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(u){return"'".concat(u,"'")}).join(", ")));var f;return b===!0?f=Q(h,s,o,A):f=M(h,b.halfCheckedKeys,s,o,A),f}},OLES:function(Ve,Ae,N){"use strict";var Z=N("U8pU"),H=N("VTBJ"),O=N("Ff2n"),Q=N("q1tI"),M=N("uciX"),_=N("7ixt"),R=function(h){var s=h.overlay,o=h.prefixCls,f=h.id,u=h.overlayInnerStyle;return Q.createElement("div",{className:"".concat(o,"-inner"),id:f,role:"tooltip",style:u},typeof s=="function"?s():s)},b=R,t=function(h,s){var o=h.overlayClassName,f=h.trigger,u=f===void 0?["hover"]:f,c=h.mouseEnterDelay,i=c===void 0?0:c,l=h.mouseLeaveDelay,v=l===void 0?.1:l,B=h.overlayStyle,C=h.prefixCls,L=C===void 0?"rc-tooltip":C,w=h.children,p=h.onVisibleChange,n=h.afterVisibleChange,d=h.transitionName,m=h.animation,T=h.placement,y=T===void 0?"right":T,g=h.align,U=g===void 0?{}:g,P=h.destroyTooltipOnHide,I=P===void 0?!1:P,G=h.defaultVisible,K=h.getTooltipContainer,D=h.overlayInnerStyle,J=Object(O.a)(h,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),X=Object(Q.useRef)(null);Object(Q.useImperativeHandle)(s,function(){return X.current});var ne=Object(H.a)({},J);"visible"in h&&(ne.popupVisible=h.visible);var ue=function(){var Ke=h.arrowContent,Le=Ke===void 0?null:Ke,ae=h.overlay,V=h.id;return[Q.createElement("div",{className:"".concat(L,"-arrow"),key:"arrow"},Le),Q.createElement(b,{key:"content",prefixCls:L,id:V,overlay:ae,overlayInnerStyle:D})]},Oe=!1,_e=!1;if(typeof I=="boolean")Oe=I;else if(I&&Object(Z.a)(I)==="object"){var De=I.keepParent;Oe=De===!0,_e=De===!1}return Q.createElement(M.a,Object.assign({popupClassName:o,prefixCls:L,popup:ue,action:u,builtinPlacements:_.a,popupPlacement:y,ref:X,popupAlign:U,getPopupContainer:K,onPopupVisibleChange:p,afterPopupVisibleChange:n,popupTransitionName:d,popupAnimation:m,defaultPopupVisible:G,destroyPopupOnHide:Oe,autoDestroy:_e,mouseLeaveDelay:v,popupStyle:B,mouseEnterDelay:i},ne),w)},E=Object(Q.forwardRef)(t),a=Ae.a=E},OS9S:function(Ve,Ae,N){var Z=N("bYtY"),H=Z.inherits,O=N("Gev7"),Q=N("mFDi");function M(b){O.call(this,b),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}M.prototype.incremental=!0,M.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},M.prototype.addDisplayable=function(b,t){t?this._temporaryDisplayables.push(b):this._displayables.push(b),this.dirty()},M.prototype.addDisplayables=function(b,t){t=t||!1;for(var E=0;E<b.length;E++)this.addDisplayable(b[E],t)},M.prototype.eachPendingDisplayable=function(b){for(var t=this._cursor;t<this._displayables.length;t++)b&&b(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)b&&b(this._temporaryDisplayables[t])},M.prototype.update=function(){this.updateTransform();for(var b=this._cursor;b<this._displayables.length;b++){var t=this._displayables[b];t.parent=this,t.update(),t.parent=null}for(var b=0;b<this._temporaryDisplayables.length;b++){var t=this._temporaryDisplayables[b];t.parent=this,t.update(),t.parent=null}},M.prototype.brush=function(b,t){for(var E=this._cursor;E<this._displayables.length;E++){var a=this._displayables[E];a.beforeBrush&&a.beforeBrush(b),a.brush(b,E===this._cursor?null:this._displayables[E-1]),a.afterBrush&&a.afterBrush(b)}this._cursor=E;for(var E=0;E<this._temporaryDisplayables.length;E++){var a=this._temporaryDisplayables[E];a.beforeBrush&&a.beforeBrush(b),a.brush(b,E===0?null:this._temporaryDisplayables[E-1]),a.afterBrush&&a.afterBrush(b)}this._temporaryDisplayables=[],this.notClear=!0};var _=[];M.prototype.getBoundingRect=function(){if(!this._rect){for(var b=new Q(Infinity,Infinity,-Infinity,-Infinity),t=0;t<this._displayables.length;t++){var E=this._displayables[t],a=E.getBoundingRect().clone();E.needLocalTransform()&&a.applyTransform(E.getLocalTransform(_)),b.union(a)}this._rect=b}return this._rect},M.prototype.contain=function(b,t){var E=this.transformCoordToLocal(b,t),a=this.getBoundingRect();if(a.contain(E[0],E[1]))for(var A=0;A<this._displayables.length;A++){var h=this._displayables[A];if(h.contain(b,t))return!0}return!1},H(M,O);var R=M;Ve.exports=R},OZM5:function(Ve,Ae,N){"use strict";N.d(Ae,"b",function(){return E}),N.d(Ae,"a",function(){return a}),N.d(Ae,"k",function(){return A}),N.d(Ae,"h",function(){return h}),N.d(Ae,"i",function(){return s}),N.d(Ae,"g",function(){return o}),N.d(Ae,"c",function(){return f}),N.d(Ae,"d",function(){return u}),N.d(Ae,"j",function(){return l}),N.d(Ae,"e",function(){return v}),N.d(Ae,"f",function(){return B});var Z=N("KQm4"),H=N("U8pU"),O=N("Ff2n"),Q=N("q1tI"),M=N.n(Q),_=N("Kwbf"),R=N("WaYH"),b=.25,t=2;function E(C,L){var w=C.slice(),p=w.indexOf(L);return p>=0&&w.splice(p,1),w}function a(C,L){var w=C.slice();return w.indexOf(L)===-1&&w.push(L),w}function A(C){return C.split("-")}function h(C,L){return"".concat(C,"-").concat(L)}function s(C){return C&&C.type&&C.type.isTreeNode}function o(C,L){var w=[C],p=L[C];function n(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];d.forEach(function(m){var T=m.key,y=m.children;w.push(T),n(y)})}return n(p.children),w}function f(C,L){var w=C.clientY,p=L.selectHandle.getBoundingClientRect(),n=p.top,d=p.bottom,m=p.height,T=Math.max(m*b,t);return w<=n+T?-1:w>=d-T?1:0}function u(C,L){if(!C)return;var w=L.multiple;return w?C.slice():C.length?[C[0]]:C}var c=function(L){return L};function i(C,L){if(!C)return[];var w=L||{},p=w.processProps,n=p===void 0?c:p,d=Array.isArray(C)?C:[C];return d.map(function(m){var T=m.children,y=Object(O.a)(m,["children"]),g=i(T,L);return M.a.createElement(R.a,Object.assign({},n(y)),g)})}function l(C){if(!C)return null;var L;if(Array.isArray(C))L={checkedKeys:C,halfCheckedKeys:void 0};else if(Object(H.a)(C)==="object")L={checkedKeys:C.checked||void 0,halfCheckedKeys:C.halfChecked||void 0};else return Object(_.a)(!1,"`checkedKeys` is not an array or an object"),null;return L}function v(C,L){var w=new Set;function p(n){if(w.has(n))return;var d=L[n];if(!d)return;w.add(n);var m=d.parent,T=d.node;if(T.disabled)return;m&&p(m.key)}return(C||[]).forEach(function(n){p(n)}),Object(Z.a)(w)}function B(C){var L={};return Object.keys(C).forEach(function(w){(w.startsWith("data-")||w.startsWith("aria-"))&&(L[w]=C[w])}),L}},Ot1p:function(Ve,Ae,N){"use strict";var Z=N("2qtc"),H=N("kLXV"),O=N("rAM+"),Q=N("miYZ"),M=N("tsqr"),_=N("9og8"),R=N("tJVT"),b=N("jrin"),t=N("WmNS"),E=N.n(t),a=N("q1tI"),A=N.n(a),h=N("VrN/"),s=N.n(h),o=N("bdgK"),f=N("p77/"),u=N("Bd2K"),c=N("ELLl"),i=N("19Vz"),l=N("lZu9"),v=N("+NIl"),B=N("kSUc"),C=N("9Bee"),L=function(Pe){var Qe=Pe.value,tt=Qe===void 0?"":Qe,mt=Pe.className,Bt=Pe.showTextOnly,Et=Pe.showLines,Ct=Pe.style,nt=Ct===void 0?{}:Ct,qe=Object(a.useMemo)(function(){return""},[tt]);return A.a.createElement(A.a.Fragment,null,A.a.createElement("div",{dangerouslySetInnerHTML:{__html:qe}}))},w=N("0Owb"),p=N("dejd"),n=N("C+DQ"),d=N("1vsH"),m=N("m3rI"),T=[{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 y(Pe){var Qe=Pe.onActionCallback,tt=Pe.title,mt=Pe.icon,Bt=Pe.actionName,Et=Pe.className,Ct=Et===void 0?"":Et,nt=Pe.children;function qe(){Qe(Bt)}return A.a.createElement("a",{title:tt,className:Ct,onClick:qe},A.a.createElement("i",{className:"md-iconfont ".concat(mt)}),nt)}var g=function(Pe){var Qe=Pe.watch,tt=Pe.showNullButton,mt=Pe.onActionCallback,Bt=Pe.fullScreen,Et=Pe.insertTemp,Ct=Pe.hidetoolBar,nt=Pe.uuid,qe=Pe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(d.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(d.F)("_educoder_session"),"&key=").concat(nt,"&api=").concat(encodeURIComponent(m.a.PROXY_SERVER)));var $e=[].concat(T,[{title:"".concat(Qe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Qe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return A.a.createElement("ul",{className:"markdown-toolbar-container"},!Ct&&$e.map(function(Re,Ne){return A.a.createElement("li",{key:Ne},Re.actionName?A.a.createElement(y,Object(w.a)({},Re,{onActionCallback:mt})):A.a.createElement("span",{className:"v-line"}))}),tt?A.a.createElement("li",null,A.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:mt},A.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Et&&A.a.createElement("li",null,A.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Et),onActionCallback:mt},A.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),A.a.createElement("li",{className:"btn-full-screen"},A.a.createElement(y,{icon:"".concat(Bt?"icon-shrink":"icon-enlarge"),title:Bt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:mt})))},U=N("M8RZ"),P=N("+L6B"),I=N("2/Rp"),G=N("y8nQ"),K=N("Vl3Y"),D=N("5NDa"),J=N("5rEg"),X={labelCol:{span:4},wrapperCol:{span:20}},ne=function(Pe){var Qe=Pe.callback,tt=Pe.onCancel;function mt(Bt){Qe(Bt)}return A.a.createElement(K.a,Object(w.a)({},X,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:mt}),A.a.createElement(K.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},A.a.createElement(J.a,null)),A.a.createElement(K.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},A.a.createElement(J.a,null)),A.a.createElement("div",{className:"flex-container flex-end"},A.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(I.a,{type:"ghost",onClick:tt},"\u53D6\u6D88")))},ue=N("7ahc"),Oe=N("HmJG"),_e=N("BjJ7"),De=K.a.useForm,Ue={width:280,marginRight:10},Ke={labelCol:{span:5},wrapperCol:{span:19}},Le=function(Pe){var Qe=Pe.callback,tt=Pe.onCancel,mt=De(),Bt=Object(R.a)(mt,1),Et=Bt[0];function Ct($e){Qe($e)}function nt($e,Re){if($e.status===-1){M.b.error($e.message);return}Et.setFieldsValue({src:"/api/attachments/".concat($e.id),type:Re.type})}function qe($e){var Re=$e.target.files[0];V(Re,nt)}return A.a.createElement(K.a,Object(w.a)({form:Et},Ke,{className:"upload-image-panel",onFinish:Ct}),A.a.createElement(K.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},A.a.createElement("div",{className:"flex-container"},A.a.createElement(K.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},A.a.createElement(J.a,{style:Ue})),A.a.createElement(ae,{onFileChange:qe}))),A.a.createElement(K.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},A.a.createElement(J.a,{style:{width:264}})),A.a.createElement(K.a.Item,{style:{textAlign:"right"}},A.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(I.a,{type:"ghost",onClick:tt},"\u53D6\u6D88")))};function ae(Pe){var Qe=Pe.onFileChange;return A.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",A.a.createElement("input",{type:"file",onChange:Qe}))}function V(Pe,Qe){if(!Pe)throw new String("\u6CA1\u6709\u6587\u4EF6");var tt=new FormData;tt.append("editormd-image-file",Pe),tt.append("file_param_name","editormd-image-file"),tt.append("byxhr","true");var mt=new window.XMLHttpRequest;mt.withCredentials=!0,mt.addEventListener("load",function(Bt){Qe(JSON.parse(Bt.target.responseText),Pe)},!1),mt.addEventListener("error",function(Bt){console.error(Bt)},!1),mt.open("POST","".concat(_e.a,"/api/attachments.json")),mt.send(tt)}var $=N("giR+"),q=N("fyUT"),se=N("7Kak"),te=N("9yH6"),oe=te.a.Group,re={margin:"0 8px"},ie=function(Pe){var Qe=Pe.callback,tt=Pe.onCancel;function mt(Bt){Qe(Bt)}return A.a.createElement(K.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:mt},A.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},A.a.createElement("span",{style:re},"\u5355\u5143\u683C\u6570\uFF1A"),A.a.createElement("span",{style:re},"\u884C\u6570"),A.a.createElement(K.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},A.a.createElement(q.a,null)),A.a.createElement("span",{style:re},"\u5217\u6570"),A.a.createElement(K.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},A.a.createElement(q.a,null))),A.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},A.a.createElement("span",{style:re},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),A.a.createElement(K.a.Item,{name:"align"},A.a.createElement(oe,null,A.a.createElement(te.a,{value:"default"},A.a.createElement("i",{className:"fa fa-align-justify"})),A.a.createElement(te.a,{value:"left"},A.a.createElement("i",{className:"fa fa-align-left"})),A.a.createElement(te.a,{value:"center"},A.a.createElement("i",{className:"fa fa-align-center"})),A.a.createElement(te.a,{value:"right"},A.a.createElement("i",{className:"fa fa-align-right"}))))),A.a.createElement("div",{className:"flex-container flex-end"},A.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),A.a.createElement(I.a,{type:"ghost",onClick:tt},"\u53D6\u6D88")))},ee=N("ErOA"),de=N("7Cbv"),Ce="link",Me="upload-image",Ye="code-block",et="add-table",st="------------",ut={default:st,left:":".concat(st),center:":".concat(st,":"),right:"".concat(st,":")},yt=N("9VGf"),xt,je;function He(){}var ot=0,ht=1e4,we="\u2581",he=`
|
|
**\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 fe(Pe){return/^\d+$/.test(Pe)?"".concat(Pe,"px"):Pe}var ge=navigator.platform.toUpperCase().indexOf("MAC")>=0,Te=ge?"Cmd":"Ctrl",me=["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"],Ee=(xt={},Object(b.a)(xt,Te+"-B","bold"),Object(b.a)(xt,Te+"-I","italic"),xt),xe=(je={},Object(b.a)(je,Ce,"\u6DFB\u52A0\u94FE\u63A5"),Object(b.a)(je,Ye,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(b.a)(je,Me,"\u6DFB\u52A0\u6587\u4EF6"),Object(b.a)(je,et,"\u6DFB\u52A0\u8868\u683C"),je),Ie=Ae.a=function(Pe){var Qe=Pe.defaultValue,tt=Qe===void 0?"":Qe,mt=Pe.onChange,Bt=Pe.width,Et=Bt===void 0?"100%":Bt,Ct=Pe.height,nt=Ct===void 0?400:Ct,qe=Pe.miniToolbar,$e=qe===void 0?!1:qe,Re=Pe.isFocus,Ne=Re===void 0?!1:Re,ct=Pe.watch,rt=Pe.insertTemp,gt=Pe.mode,pt=gt===void 0?"markdown":gt,at=Pe.id,vt=at===void 0?"markdown-editor-id":at,St=Pe.showResizeBar,wt=St===void 0?!1:St,Dt=Pe.noStorage,Ar=Dt===void 0?!1:Dt,xr=Pe.showNullButton,_r=xr===void 0?!1:xr,Ft=Pe.hidetoolBar,er=Ft===void 0?!1:Ft,ir=Pe.fullScreen,Kt=ir===void 0?!1:ir,$t=Pe.onBlur,Xt=Pe.onCMBeforeChange,Xr=Pe.onFullScreen,Br=Pe.className,be=Br===void 0?"":Br,Be=Pe.disablePaste,ke=Be===void 0?!1:Be,Ze=Pe.placeholder,Je=Ze===void 0?"":Ze,Ot=Pe.values,Lt=Ot===void 0?"":Ot,bt=Object(a.useState)(null),Rt=Object(R.a)(bt,2),At=Rt[0],Ut=Rt[1],Gt=Object(a.useState)(tt),gr=Object(R.a)(Gt,2),fr=gr[0],br=gr[1],Cr=Object(a.useState)(ct),ar=Object(R.a)(Cr,2),Hr=ar[0],hr=ar[1],yr=Object(a.useState)(Kt),mr=Object(R.a)(yr,2),Dr=mr[0],Rr=mr[1],jr=Object(a.useState)(""),or=Object(R.a)(jr,2),Mr=or[0],zr=or[1],Tn=Object(a.useState)(0),Vr=Object(R.a)(Tn,2),en=Vr[0],En=Vr[1],cn=Object(a.useState)(nt),rn=Object(R.a)(cn,2),hn=rn[0],wn=rn[1],Dn=Object(a.useState)(!1),Er=Object(R.a)(Dn,2),sr=Er[0],Yt=Er[1],dr=Object(a.useRef)(Object(de.a)()),wr=Object(a.useRef)(!1),Or=Object(a.useRef)(),sn=Object(a.useRef)(),Kr=Object(a.useRef)(),Yr=Object(a.useRef)(),zn=Object(a.useRef)(),Sn=function(){var zt=Object(_.a)(E.a.mark(function lr(){var jt,cr;return E.a.wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:return Wr.next=2,Object(ee.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:dr.current}});case 2:cr=Wr.sent,cr!=null&&(jt=cr.attachments)!==null&&jt!==void 0&&jt.length&&(console.log("cm:",At,sn),cr.attachments.map(function(vr){vr.content_type.indexOf("image")>-1?At.replaceSelection(".concat(vr.content_type,")")):vr.content_type.indexOf("video")>-1?At.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):vr.content_type.indexOf("pdf")>-1?At.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(vr.id,"?type=").concat(vr.content_type,'&disposition=inline" target="_blank">').concat(vr.name,"</a>")):At.replaceSelection("[".concat(vr.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(vr.id,"?type=").concat(vr.content_type,")"))}));case 4:case"end":return Wr.stop()}},lr)}));return function(){return zt.apply(this,arguments)}}();Object(a.useEffect)(function(){br(Lt),At==null||At.setValue(Lt)},[Lt]),Object(a.useEffect)(function(){Xr==null||Xr(Dr)},[Dr]),Object(a.useEffect)(function(){if(sn.current){var zt=s.a.fromTextArea(sn.current,{mode:pt,lineNumbers:!$e,lineWrapping:!0,value:tt,autoCloseTags:!0,autoCloseBrackets:!0});Ne&&zt.focus();function lr(jt,cr){if(ke){cr.preventDefault();return}var Tr=cr.clipboardData;if(Tr){var Wr=Tr.types.toString(),vr=Tr.items;if(Wr==="Files"||Tr.types.indexOf("Files")>-1){if(cr.preventDefault(),pt=="stex")return;try{var nn,Rn=vr[1];((nn=vr[0])===null||nn===void 0?void 0:nn.kind)==="file"&&(Rn=vr[0]);var Ir=Rn.getAsFile(),li=Ir.name.split(".").pop();V(Ir,function(Fr){if(Fr.id){var Hn,Qn,ui;(Ir==null||((Hn=Ir.type)===null||Hn===void 0)?void 0:Hn.indexOf("image"))>-1?zt.replaceSelection(".concat(Fr.content_type,")")):(Ir==null||((Qn=Ir.type)===null||Qn===void 0)?void 0:Qn.indexOf("video"))>-1?zt.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Fr.id,'"></video>')):(Ir==null||((ui=Ir.type)===null||ui===void 0)?void 0:ui.indexOf("pdf"))>-1?zt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Fr.id,"?type=").concat(Ir.type,'&disposition=inline" target="_blank">').concat(Ir.name,"</a>")):me.includes(li)?zt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Fr.id,'?type=office&disposition=inline" target="_blank">').concat(Ir.name,"</a>")):zt.replaceSelection("[".concat(Ir.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(Fr.id,"?type=").concat(Fr.content_type,")"))}else(Fr==null?void 0:Fr.status)===401&&(document.location.href="/user/login")})}catch(Fr){M.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return zt.on("paste",lr),zt.on("dragleave",function(jt,cr){Kr.current.classList.remove("mouse-hover-md")}),zt.on("dragover",function(jt,cr){Kr.current.classList.add("mouse-hover-md")}),zt.on("drop",function(jt,cr){Kr.current.classList.add("mouse-hover-md");var Tr;if(Tr=cr.dataTransfer.files,Tr.length>0){cr.preventDefault(),cr.stopPropagation();for(var Wr=function(Rn){var Ir=Tr[Rn],li=Ir.name.split(".").pop();V(Ir,function(Fr){if(Fr.id){var Hn,Qn,ui;(Ir==null||((Hn=Ir.type)===null||Hn===void 0)?void 0:Hn.indexOf("image"))>-1?zt.replaceSelection(".concat(Fr.content_type,")")):(Ir==null||((Qn=Ir.type)===null||Qn===void 0)?void 0:Qn.indexOf("video"))>-1?zt.replaceSelection('<video width="100%" controls src="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Fr.id,'"></video>')):(Ir==null||((ui=Ir.type)===null||ui===void 0)?void 0:ui.indexOf("pdf"))>-1?zt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Fr.id,"?type=").concat(Ir.type,'&disposition=inline" target="_blank">').concat(Ir.name,"</a>")):me.includes(li)?zt.replaceSelection('<a href="'.concat(m.a.API_SERVER,"/api/attachments/").concat(Fr.id,'?type=office&disposition=inline" target="_blank">').concat(Ir.name,"</a>")):zt.replaceSelection("[".concat(Ir.name,"](").concat(m.a.API_SERVER,"/api/attachments/").concat(Fr.id,"?type=").concat(Fr.content_type,")"))}else(Fr==null?void 0:Fr.status)===401&&(document.location.href="/user/login")})},vr=0;vr<Tr.length;vr++)Wr(vr)}}),Ut(zt),function(){zt.off("paste",lr)}}},[]);var _n=Object(a.useCallback)(function(){if(Kr.current)try{}catch(zt){console.log(zt,"---- to set md editor body height")}},[hn,Kr,Dr]);Object(a.useEffect)(function(){function zt(){var jt=new o.default(function(cr){var Tr=Object(O.a)(cr),Wr;try{for(Tr.s();!(Wr=Tr.n()).done;){var vr=Wr.value;(vr.target.offsetHeight>0||vr.target.offsetWidth>0)&&(_n(),At.setSize("100%","100%"),At.refresh())}}catch(nn){Tr.e(nn)}finally{Tr.f()}});return jt.observe(sn.current.parentElement),jt}if(At){var lr=zt();return function(){lr.unobserve(sn.current.parentElement)}}},[At,_n]),Object(a.useEffect)(function(){if(At){for(var zt=[],lr=function(){var vr=cr[jt];Tr=Object(R.a)(vr,2);var nn=Tr[0],Rn=Tr[1],Ir=Object(b.a)({},nn,function(){Yn(Rn)});zt.push(Ir),At.addKeyMap(Ir)},jt=0,cr=Object.entries(Ee);jt<cr.length;jt++){var Tr;lr()}return Or.current=setInterval(function(){wr.current&&Sn()},4e3),function(){clearInterval(Or.current);var Wr=Object(O.a)(zt),vr;try{for(Wr.s();!(vr=Wr.n()).done;){var nn=vr.value;At.removeKeyMap(nn)}}catch(Rn){Wr.e(Rn)}finally{Wr.f()}}}},[At]),Object(a.useEffect)(function(){Kt!==Dr&&Rr(Kt)},[Kt]),Object(yt.a)(function(){if(!Ar&&en>0){var zt=new Date().getTime(),lr=window.sessionStorage.getItem(vt);zt>=en+ht&&(!lr||lr!==fr)&&(window.sessionStorage.setItem(vt,fr),Yt(!0))}},ht),Object(a.useEffect)(function(){hr(ct)},[At,ct]),Object(a.useEffect)(function(){At&&(Ne&&At.focus())},[At,Ne]),Object(a.useEffect)(function(){if(Hr&&At){var zt=At.getScrollerElement();function lr(jt){var cr=jt.target;if(zn.current){var Tr=cr.scrollTop/cr.scrollHeight;zn.current.scrollTop=zn.current.scrollHeight*Tr}}return zt.addEventListener("scroll",lr),function(){zt.removeEventListener("scroll",lr)}}},[At,Hr]),Object(a.useEffect)(function(){if(At&&Xt){function zt(lr,jt){Xt(lr,jt)}return At.on("beforeChange",zt),function(){At.off("beforeChange",zt)}}},[At,Xt]),Object(a.useEffect)(function(){if(At&&$t){function zt(){$t(At.getValue())}return At.on("blur",zt),function(){At.off("blur",zt)}}},[At,$t]),Object(a.useEffect)(function(){if(At){function zt(lr){var jt=lr.getValue();br(jt),En(new Date().getTime()),lr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),mt&&mt(jt)}return At.on("change",zt),function(){At.off("change",zt)}}},[At,mt]),Object(a.useEffect)(function(){At&&(tt==null?(At.setValue(""),br("")):tt!==At.getValue()&&(At.setValue(tt),br(tt),At.setCursor(At.lineCount(),0)))},[At,tt]);var Yn=Object(a.useCallback)(function(zt){var lr=At.getCursor(),jt=At.getSelection(),cr=jt.split(`
|
|
`);switch(zt){case"bold":return At.replaceSelection("**"+jt+"**"),jt===""&&At.setCursor(lr.line,lr.ch+2),At.focus();case"italic":return At.replaceSelection("*"+jt+"*"),jt===""&&At.setCursor(lr.line,lr.ch+1),At.focus();case"code":return At.replaceSelection("`"+jt+"`"),jt===""&&At.setCursor(lr.line,lr.ch+1),At.focus();case"inline-latex":return At.replaceSelection("`$$"+jt+"$$`"),jt===""&&At.setCursor(lr.line,lr.ch+3),At.focus();case"latex":return At.replaceSelection("```latex\n"+jt+"\n```"),At.setCursor(lr.line+1,jt.length+1),At.focus();case"line-break":return At.replaceSelection(`<br/>
|
|
`),At.focus();case"list-ul":return jt===""?At.replaceSelection("- "+jt):At.replaceSelection(cr.map(function(Tr){return Tr===""?"":"- ".concat(Tr)}).join(`
|
|
`)),At.focus();case"list-ol":return jt===""?At.replaceSelection("1. "+jt):At.replaceSelection(cr.map(function(Tr,Wr){return Tr===""?"":"".concat(Wr+1,". ").concat(Tr)}).join(`
|
|
`)),At.focus();case"add-null-ch":return jt===""&&At.setCursor(lr.line,lr.ch+1),At.replaceSelection(we),At.focus();case"inster-template-1":return jt===""&&At.setCursor(lr.line,lr.ch),At.replaceSelection(he),At.focus();case"eraser":return At.setValue(""),At.focus();case"trigger-watch":return hr(!Hr),At.focus();case"trigger-full-screen":return Rr(!Dr),At.focus();case Ce:zr(Ce);return;case Ye:zr(Ye);return;case Me:zr(Me);return;case et:zr(et);return;default:throw new Error}},[At,Hr,Dr]),xn=Object(a.useCallback)(function(zt){zr("");switch(Mr){case Ce:var lr=zt.title,jt=zt.link;return At.replaceSelection("[".concat(lr,"](").concat(jt,")")),At.focus();case Ye:var cr=zt.language,Tr=zt.content;return At.replaceSelection(["```"+cr,Tr,"```"].join(`
|
|
`)),At.focus();case Me:var Wr=zt.src,vr=zt.alt;return vr?At.replaceSelection(".concat(Wr,' "').concat(vr,'" )')):At.replaceSelection("")),At.focus();case et:for(var nn=zt.row,Rn=zt.col,Ir=zt.align,li=`
|
|
`,Fr=0;Fr<nn;Fr++){for(var Hn=[],Qn=[],ui=0;ui<Rn;ui++)Fr===1&&Qn.push(ut[Ir]),Hn.push(" ");Fr===1&&(li+="| ".concat(Qn.join(" | "),` |
|
|
`)),li+="| ".concat(Hn.join(Rn===1?"":" | "),` |
|
|
`)}return At.replaceSelection(li+`
|
|
`),At.focus();default:throw new Error}},[At,Mr]),$r=Object(a.useMemo)(function(){switch(Mr){case Ce:return A.a.createElement(ne,{callback:xn,onCancel:In});case Ye:return A.a.createElement(ue.b,{callback:xn,onCancel:In});case Me:return A.a.createElement(Le,{callback:xn,onCancel:In});case et:return A.a.createElement(ie,{callback:xn,onCancel:In});default:return null}},[Mr]);function In(){zr("")}Object(a.useEffect)(function(){if(Yr.current){var zt=Yr.current,lr=!1,jt=0;function cr(vr){lr=!0,jt=vr.pageY}function Tr(){lr=!1}function Wr(vr){if(lr){var nn=vr.pageY-jt;nn<0&&(nn=0),nn>300&&(nn=300);var Rn=nt+nn+"px";wn(Rn)}}return zt.addEventListener("mousedown",cr),document.addEventListener("mousemove",Wr),document.addEventListener("mouseup",Tr),function(){zt.removeEventListener("mousedown",cr),document.removeEventListener("mousemove",Wr),document.removeEventListener("mouseup",Tr)}}},[At,Yr]),Object(a.useEffect)(function(){wn(nt)},[nt]);var Bn=fe(Et),Jn=fe(hn),Mn={width:Bn,height:Jn},si=Object(a.useMemo)(function(){if(en){var zt=new Date(en),lr=zt.getHours(),jt=zt.getMinutes(),cr=zt.getSeconds();return lr=lr<10?"0"+lr:lr,jt=jt<10?"0"+jt:jt,cr=cr<10?"0"+cr:cr,"".concat(lr,":").concat(jt,":").concat(cr)}return 0},[en]);function Fn(){window.sessionStorage.removeItem(vt),Yt(!1),En(0)}function dn(){Yt(!1),En(0),At.setValue(window.sessionStorage.getItem(vt))}function Un(zt,lr){var jt=At.getValue();jt=jt.replace(zt,lr),br(jt),At==null||At.setValue(jt)}return A.a.createElement(a.Fragment,null,A.a.createElement("div",{className:"markdown-editor-wrapper",ref:Kr},A.a.createElement("div",{className:"markdown-editor-container ".concat(be," ").concat(Hr?"on-preview":""," ").concat($e?"mini":""," ").concat(Dr?"full-screen":""),style:Mn},A.a.createElement(g,{insertTemp:rt,watch:Hr,fullScreen:Dr,showNullButton:_r,onActionCallback:Yn,hidetoolBar:er,uuid:dr.current,setOpenPhones:function(){wr.current=!0}}),A.a.createElement("div",{className:"markdown-editor-body"},A.a.createElement("div",{className:"codemirror-container"},A.a.createElement("textarea",{ref:sn,placeholder:Je})),Hr?A.a.createElement("div",{ref:zn,className:"preview-container"},pt==="stex"&&A.a.createElement(L,{value:fr}),pt!=="stex"&&A.a.createElement(C.a,{edit:!0,value:fr,replaces:Un})):null))),wt?A.a.createElement("a",{ref:Yr,className:"editor-resize"}):null,A.a.createElement(U.a,null,xe[Mr]?A.a.createElement(H.a,{centered:!0,title:xe[Mr],visible:!0,onCancel:In,footer:null,className:"markdown-popup-form"},$r):null))}},P47w:function(Ve,Ae,N){var Z=N("hydK"),H=Z.createElement,O=N("IMiH"),Q=N("mFDi"),M=N("Fofx"),_=N("6GrX"),R=N("pzxd"),b=N("dqUG"),t=O.CMD,E=Array.prototype.join,a="none",A=Math.round,h=Math.sin,s=Math.cos,o=Math.PI,f=Math.PI*2,u=180/o,c=1e-4;function i(X){return A(X*1e4)/1e4}function l(X){return X<c&&X>-c}function v(X,ne){var ue=ne?X.textFill:X.fill;return ue!=null&&ue!==a}function B(X,ne){var ue=ne?X.textStroke:X.stroke;return ue!=null&&ue!==a}function C(X,ne){ne&&L(X,"transform","matrix("+E.call(ne,",")+")")}function L(X,ne,ue){(!ue||ue.type!=="linear"&&ue.type!=="radial")&&X.setAttribute(ne,ue)}function w(X,ne,ue){X.setAttributeNS("http://www.w3.org/1999/xlink",ne,ue)}function p(X,ne,ue,Oe){if(v(ne,ue)){var _e=ue?ne.textFill:ne.fill;_e=_e==="transparent"?a:_e,L(X,"fill",_e),L(X,"fill-opacity",ne.fillOpacity!=null?ne.fillOpacity*ne.opacity:ne.opacity)}else L(X,"fill",a);if(B(ne,ue)){var De=ue?ne.textStroke:ne.stroke;De=De==="transparent"?a:De,L(X,"stroke",De);var Ue=ue?ne.textStrokeWidth:ne.lineWidth,Ke=!ue&&ne.strokeNoScale?Oe.getLineScale():1;L(X,"stroke-width",Ue/Ke),L(X,"paint-order",ue?"stroke":"fill"),L(X,"stroke-opacity",ne.strokeOpacity!=null?ne.strokeOpacity:ne.opacity);var Le=ne.lineDash;Le?(L(X,"stroke-dasharray",ne.lineDash.join(",")),L(X,"stroke-dashoffset",A(ne.lineDashOffset||0))):L(X,"stroke-dasharray",""),ne.lineCap&&L(X,"stroke-linecap",ne.lineCap),ne.lineJoin&&L(X,"stroke-linejoin",ne.lineJoin),ne.miterLimit&&L(X,"stroke-miterlimit",ne.miterLimit)}else L(X,"stroke",a)}function n(X){for(var ne=[],ue=X.data,Oe=X.len(),_e=0;_e<Oe;){var De=ue[_e++],Ue="",Ke=0;switch(De){case t.M:Ue="M",Ke=2;break;case t.L:Ue="L",Ke=2;break;case t.Q:Ue="Q",Ke=4;break;case t.C:Ue="C",Ke=6;break;case t.A:var Le=ue[_e++],ae=ue[_e++],V=ue[_e++],$=ue[_e++],q=ue[_e++],se=ue[_e++],te=ue[_e++],oe=ue[_e++],re=Math.abs(se),ie=l(re-f)||(oe?se>=f:-se>=f),ee=se>0?se%f:se%f+f,de=!1;ie?de=!0:l(re)?de=!1:de=ee>=o===!!oe;var Ce=i(Le+V*s(q)),Me=i(ae+$*h(q));ie&&(oe?se=f-1e-4:se=-f+1e-4,de=!0,_e===9&&ne.push("M",Ce,Me));var Ye=i(Le+V*s(q+se)),et=i(ae+$*h(q+se));ne.push("A",i(V),i($),A(te*u),+de,+oe,Ye,et);break;case t.Z:Ue="Z";break;case t.R:var Ye=i(ue[_e++]),et=i(ue[_e++]),st=i(ue[_e++]),ut=i(ue[_e++]);ne.push("M",Ye,et,"L",Ye+st,et,"L",Ye+st,et+ut,"L",Ye,et+ut,"L",Ye,et);break}Ue&&ne.push(Ue);for(var yt=0;yt<Ke;yt++)ne.push(i(ue[_e++]))}return ne.join(" ")}var d={};d.brush=function(X){var ne=X.style,ue=X.__svgEl;ue||(ue=H("path"),X.__svgEl=ue),X.path||X.createPathProxy();var Oe=X.path;if(X.__dirtyPath){Oe.beginPath(),Oe.subPixelOptimize=!1,X.buildPath(Oe,X.shape),X.__dirtyPath=!1;var _e=n(Oe);_e.indexOf("NaN")<0&&L(ue,"d",_e)}p(ue,ne,!1,X),C(ue,X.transform),ne.text!=null?I(X,X.getBoundingRect()):J(X)};var m={};m.brush=function(X){var ne=X.style,ue=ne.image;if(ue instanceof HTMLImageElement){var Oe=ue.src;ue=Oe}if(!ue)return;var _e=ne.x||0,De=ne.y||0,Ue=ne.width,Ke=ne.height,Le=X.__svgEl;Le||(Le=H("image"),X.__svgEl=Le),ue!==X.__imageSrc&&(w(Le,"href",ue),X.__imageSrc=ue),L(Le,"width",Ue),L(Le,"height",Ke),L(Le,"x",_e),L(Le,"y",De),C(Le,X.transform),ne.text!=null?I(X,X.getBoundingRect()):J(X)};var T={},y=new Q,g={},U=[],P={left:"start",right:"end",center:"middle",middle:"middle"},I=function(X,ne){var ue=X.style,Oe=X.transform,_e=X instanceof b||ue.transformText;X.__dirty&&R.normalizeTextStyle(ue,!0);var De=ue.text;if(De!=null&&(De+=""),!R.needDrawText(De,ue))return;De==null&&(De=""),!_e&&Oe&&(y.copy(ne),y.applyTransform(Oe),ne=y);var Ue=X.__textSvgEl;Ue||(Ue=H("text"),X.__textSvgEl=Ue);var Ke=Ue.style,Le=ue.font||_.DEFAULT_FONT,ae=Ue.__computedFont;Le!==Ue.__styleFont&&(Ke.font=Ue.__styleFont=Le,ae=Ue.__computedFont=Ke.font);var V=ue.textPadding,$=ue.textLineHeight,q=X.__textCotentBlock;(!q||X.__dirtyText)&&(q=X.__textCotentBlock=_.parsePlainText(De,ae,V,$,ue.truncate));var se=q.outerHeight,te=q.lineHeight;R.getBoxPosition(g,X,ue,ne);var oe=g.baseX,re=g.baseY,ie=g.textAlign||"left",ee=g.textVerticalAlign;G(Ue,_e,Oe,ue,ne,oe,re);var de=_.adjustTextY(re,se,ee),Ce=oe,Me=de;V&&(Ce=K(oe,ie,V),Me+=V[0]),Me+=te/2,p(Ue,ue,!0,X);var Ye=q.canCacheByTextString,et=X.__tspanList||(X.__tspanList=[]),st=et.length;if(Ye&&X.__canCacheByTextString&&X.__text===De){if(X.__dirtyText&&st)for(var ut=0;ut<st;++ut)D(et[ut],ie,Ce,Me+ut*te)}else{X.__text=De,X.__canCacheByTextString=Ye;for(var yt=q.lines,xt=yt.length,ut=0;ut<xt;ut++){var je=et[ut],He=yt[ut];je?je.__zrText!==He&&(je.innerHTML="",je.appendChild(document.createTextNode(He))):(je=et[ut]=H("tspan"),Ue.appendChild(je),je.appendChild(document.createTextNode(He))),D(je,ie,Ce,Me+ut*te)}if(st>xt){for(;ut<st;ut++)Ue.removeChild(et[ut]);et.length=xt}}};function G(X,ne,ue,Oe,_e,De,Ue){M.identity(U),ne&&ue&&M.copy(U,ue);var Ke=Oe.textRotation;if(_e&&Ke){var Le=Oe.textOrigin;Le==="center"?(De=_e.width/2+_e.x,Ue=_e.height/2+_e.y):Le&&(De=Le[0]+_e.x,Ue=Le[1]+_e.y),U[4]-=De,U[5]-=Ue,M.rotate(U,U,Ke),U[4]+=De,U[5]+=Ue}C(X,U)}function K(X,ne,ue){return ne==="right"?X-ue[1]:ne==="center"?X+ue[3]/2-ue[1]/2:X+ue[3]}function D(X,ne,ue,Oe){L(X,"dominant-baseline","middle"),L(X,"text-anchor",P[ne]),L(X,"x",ue),L(X,"y",Oe)}function J(X){X&&X.__textSvgEl&&(X.__textSvgEl.parentNode&&X.__textSvgEl.parentNode.removeChild(X.__textSvgEl),X.__textSvgEl=null,X.__tspanList=[],X.__text=null)}T.drawRectText=I,T.brush=function(X){var ne=X.style;ne.text!=null?I(X,!1):J(X)},Ae.path=d,Ae.image=m,Ae.text=T},P4Qj:function(Ve,Ae,N){"use strict";Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.removeSensor=Ae.getSensor=void 0;var Z=Q(N("chpo")),H=N("FxDU"),O=N("24YM");function Q(b){return b&&b.__esModule?b:{default:b}}var M={},_=function(t){var E=t.getAttribute(O.SizeSensorId);if(E&&M[E])return M[E];var a=(0,Z.default)();t.setAttribute(O.SizeSensorId,a);var A=(0,H.createSensor)(t);return M[a]=A,A};Ae.getSensor=_;var R=function(t){var E=t.element.getAttribute(O.SizeSensorId);t.element.removeAttribute(O.SizeSensorId),t.destroy(),E&&M[E]&&delete M[E]};Ae.removeSensor=R},QBsz:function(Ve,Ae){var N=typeof Float32Array=="undefined"?Array:Float32Array;function Z(p,n){var d=new N(2);return p==null&&(p=0),n==null&&(n=0),d[0]=p,d[1]=n,d}function H(p,n){return p[0]=n[0],p[1]=n[1],p}function O(p){var n=new N(2);return n[0]=p[0],n[1]=p[1],n}function Q(p,n,d){return p[0]=n,p[1]=d,p}function M(p,n,d){return p[0]=n[0]+d[0],p[1]=n[1]+d[1],p}function _(p,n,d,m){return p[0]=n[0]+d[0]*m,p[1]=n[1]+d[1]*m,p}function R(p,n,d){return p[0]=n[0]-d[0],p[1]=n[1]-d[1],p}function b(p){return Math.sqrt(E(p))}var t=b;function E(p){return p[0]*p[0]+p[1]*p[1]}var a=E;function A(p,n,d){return p[0]=n[0]*d[0],p[1]=n[1]*d[1],p}function h(p,n,d){return p[0]=n[0]/d[0],p[1]=n[1]/d[1],p}function s(p,n){return p[0]*n[0]+p[1]*n[1]}function o(p,n,d){return p[0]=n[0]*d,p[1]=n[1]*d,p}function f(p,n){var d=b(n);return d===0?(p[0]=0,p[1]=0):(p[0]=n[0]/d,p[1]=n[1]/d),p}function u(p,n){return Math.sqrt((p[0]-n[0])*(p[0]-n[0])+(p[1]-n[1])*(p[1]-n[1]))}var c=u;function i(p,n){return(p[0]-n[0])*(p[0]-n[0])+(p[1]-n[1])*(p[1]-n[1])}var l=i;function v(p,n){return p[0]=-n[0],p[1]=-n[1],p}function B(p,n,d,m){return p[0]=n[0]+m*(d[0]-n[0]),p[1]=n[1]+m*(d[1]-n[1]),p}function C(p,n,d){var m=n[0],T=n[1];return p[0]=d[0]*m+d[2]*T+d[4],p[1]=d[1]*m+d[3]*T+d[5],p}function L(p,n,d){return p[0]=Math.min(n[0],d[0]),p[1]=Math.min(n[1],d[1]),p}function w(p,n,d){return p[0]=Math.max(n[0],d[0]),p[1]=Math.max(n[1],d[1]),p}Ae.create=Z,Ae.copy=H,Ae.clone=O,Ae.set=Q,Ae.add=M,Ae.scaleAndAdd=_,Ae.sub=R,Ae.len=b,Ae.length=t,Ae.lenSquare=E,Ae.lengthSquare=a,Ae.mul=A,Ae.div=h,Ae.dot=s,Ae.scale=o,Ae.normalize=f,Ae.distance=u,Ae.dist=c,Ae.distanceSquare=i,Ae.distSquare=l,Ae.negate=v,Ae.lerp=B,Ae.applyTransform=C,Ae.min=L,Ae.max=w},"QO+J":function(Ve,Ae,N){"use strict";Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.createSensor=void 0;var Z=O(N("NohK")),H=N("24YM");function O(M){return M&&M.__esModule?M:{default:M}}var Q=function(_){var R=void 0,b=[],t=function(){getComputedStyle(_).position==="static"&&(_.style.position="relative");var o=document.createElement("object");return o.onload=function(){o.contentDocument.defaultView.addEventListener("resize",E),E()},o.style.display="block",o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.height="100%",o.style.width="100%",o.style.overflow="hidden",o.style.pointerEvents="none",o.style.zIndex="-1",o.style.opacity="0",o.setAttribute("class",H.SensorClassName),o.setAttribute("tabindex",H.SensorTabIndex),o.type="text/html",_.appendChild(o),o.data="about:blank",o},E=(0,Z.default)(function(){b.forEach(function(s){s(_)})}),a=function(o){R||(R=t()),b.indexOf(o)===-1&&b.push(o)},A=function(){R&&R.parentNode&&(R.contentDocument&&R.contentDocument.defaultView.removeEventListener("resize",E),R.parentNode.removeChild(R),R=void 0,b=[])},h=function(o){var f=b.indexOf(o);f!==-1&&b.splice(f,1),b.length===0&&R&&A()};return{element:_,bind:a,destroy:A,unbind:h}};Ae.createSensor=Q},Qe9p:function(Ve,Ae,N){var Z=N("1RvN"),H={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function O(n){return n=Math.round(n),n<0?0:n>255?255:n}function Q(n){return n=Math.round(n),n<0?0:n>360?360:n}function M(n){return n<0?0:n>1?1:n}function _(n){return n.length&&n.charAt(n.length-1)==="%"?O(parseFloat(n)/100*255):O(parseInt(n,10))}function R(n){return n.length&&n.charAt(n.length-1)==="%"?M(parseFloat(n)/100):M(parseFloat(n))}function b(n,d,m){return m<0?m+=1:m>1&&(m-=1),m*6<1?n+(d-n)*m*6:m*2<1?d:m*3<2?n+(d-n)*(2/3-m)*6:n}function t(n,d,m){return n+(d-n)*m}function E(n,d,m,T,y){return n[0]=d,n[1]=m,n[2]=T,n[3]=y,n}function a(n,d){return n[0]=d[0],n[1]=d[1],n[2]=d[2],n[3]=d[3],n}var A=new Z(20),h=null;function s(n,d){h&&a(h,d),h=A.put(n,h||d.slice())}function o(n,d){if(!n)return;d=d||[];var m=A.get(n);if(m)return a(d,m);n=n+"";var T=n.replace(/ /g,"").toLowerCase();if(T in H)return a(d,H[T]),s(n,d),d;if(T.charAt(0)==="#"){if(T.length===4){var y=parseInt(T.substr(1),16);if(!(y>=0&&y<=4095)){E(d,0,0,0,1);return}return E(d,(y&3840)>>4|(y&3840)>>8,y&240|(y&240)>>4,y&15|(y&15)<<4,1),s(n,d),d}else if(T.length===7){var y=parseInt(T.substr(1),16);if(!(y>=0&&y<=16777215)){E(d,0,0,0,1);return}return E(d,(y&16711680)>>16,(y&65280)>>8,y&255,1),s(n,d),d}return}var g=T.indexOf("("),U=T.indexOf(")");if(g!==-1&&U+1===T.length){var P=T.substr(0,g),I=T.substr(g+1,U-(g+1)).split(","),G=1;switch(P){case"rgba":if(I.length!==4){E(d,0,0,0,1);return}G=R(I.pop());case"rgb":if(I.length!==3){E(d,0,0,0,1);return}return E(d,_(I[0]),_(I[1]),_(I[2]),G),s(n,d),d;case"hsla":if(I.length!==4){E(d,0,0,0,1);return}return I[3]=R(I[3]),f(I,d),s(n,d),d;case"hsl":if(I.length!==3){E(d,0,0,0,1);return}return f(I,d),s(n,d),d;default:return}}E(d,0,0,0,1);return}function f(n,d){var m=(parseFloat(n[0])%360+360)%360/360,T=R(n[1]),y=R(n[2]),g=y<=.5?y*(T+1):y+T-y*T,U=y*2-g;return d=d||[],E(d,O(b(U,g,m+1/3)*255),O(b(U,g,m)*255),O(b(U,g,m-1/3)*255),1),n.length===4&&(d[3]=n[3]),d}function u(n){if(!n)return;var d=n[0]/255,m=n[1]/255,T=n[2]/255,y=Math.min(d,m,T),g=Math.max(d,m,T),U=g-y,P=(g+y)/2,I,G;if(U===0)I=0,G=0;else{P<.5?G=U/(g+y):G=U/(2-g-y);var K=((g-d)/6+U/2)/U,D=((g-m)/6+U/2)/U,J=((g-T)/6+U/2)/U;d===g?I=J-D:m===g?I=1/3+K-J:T===g&&(I=2/3+D-K),I<0&&(I+=1),I>1&&(I-=1)}var X=[I*360,G,P];return n[3]!=null&&X.push(n[3]),X}function c(n,d){var m=o(n);if(m){for(var T=0;T<3;T++)d<0?m[T]=m[T]*(1-d)|0:m[T]=(255-m[T])*d+m[T]|0,m[T]>255?m[T]=255:n[T]<0&&(m[T]=0);return p(m,m.length===4?"rgba":"rgb")}}function i(n){var d=o(n);if(d)return((1<<24)+(d[0]<<16)+(d[1]<<8)+ +d[2]).toString(16).slice(1)}function l(n,d,m){if(!(d&&d.length)||!(n>=0&&n<=1))return;m=m||[];var T=n*(d.length-1),y=Math.floor(T),g=Math.ceil(T),U=d[y],P=d[g],I=T-y;return m[0]=O(t(U[0],P[0],I)),m[1]=O(t(U[1],P[1],I)),m[2]=O(t(U[2],P[2],I)),m[3]=M(t(U[3],P[3],I)),m}var v=l;function B(n,d,m){if(!(d&&d.length)||!(n>=0&&n<=1))return;var T=n*(d.length-1),y=Math.floor(T),g=Math.ceil(T),U=o(d[y]),P=o(d[g]),I=T-y,G=p([O(t(U[0],P[0],I)),O(t(U[1],P[1],I)),O(t(U[2],P[2],I)),M(t(U[3],P[3],I))],"rgba");return m?{color:G,leftIndex:y,rightIndex:g,value:T}:G}var C=B;function L(n,d,m,T){if(n=o(n),n)return n=u(n),d!=null&&(n[0]=Q(d)),m!=null&&(n[1]=R(m)),T!=null&&(n[2]=R(T)),p(f(n),"rgba")}function w(n,d){if(n=o(n),n&&d!=null)return n[3]=M(d),p(n,"rgba")}function p(n,d){if(!n||!n.length)return;var m=n[0]+","+n[1]+","+n[2];return(d==="rgba"||d==="hsva"||d==="hsla")&&(m+=","+n[3]),d+"("+m+")"}Ae.parse=o,Ae.lift=c,Ae.toHex=i,Ae.fastLerp=l,Ae.fastMapToColor=v,Ae.lerp=B,Ae.mapToColor=C,Ae.modifyHSL=L,Ae.modifyAlpha=w,Ae.stringify=p},QuXc:function(Ve,Ae){var N=function(H){this.colorStops=H||[]};N.prototype={constructor:N,addColorStop:function(H,O){this.colorStops.push({offset:H,color:O})}};var Z=N;Ve.exports=Z},RDYZ:function(Ve,Ae,N){var Z=N("dMvE");function H(Q){this._target=Q.target,this._life=Q.life||1e3,this._delay=Q.delay||0,this._initialized=!1,this.loop=Q.loop==null?!1:Q.loop,this.gap=Q.gap||0,this.easing=Q.easing||"Linear",this.onframe=Q.onframe,this.ondestroy=Q.ondestroy,this.onrestart=Q.onrestart,this._pausedTime=0,this._paused=!1}H.prototype={constructor:H,step:function(Q,M){if(this._initialized||(this._startTime=Q+this._delay,this._initialized=!0),this._paused){this._pausedTime+=M;return}var _=(Q-this._startTime-this._pausedTime)/this._life;if(_<0)return;_=Math.min(_,1);var R=this.easing,b=typeof R=="string"?Z[R]:R,t=typeof b=="function"?b(_):_;return this.fire("frame",t),_===1?this.loop?(this.restart(Q),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(Q){var M=(Q-this._startTime-this._pausedTime)%this._life;this._startTime=Q-M+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(Q,M){Q="on"+Q,this[Q]&&this[Q](this._target,M)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var O=H;Ve.exports=O},RXMa:function(Ve,Ae,N){var Z=N("y+Vt"),H=Z.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(O,Q){var M=Q.cx,_=Q.cy,R=Math.PI*2;O.moveTo(M+Q.r,_),O.arc(M,_,Q.r,0,R,!1),O.moveTo(M+Q.r0,_),O.arc(M,_,Q.r0,0,R,!0)}});Ve.exports=H},"SA+Z":function(Ve,Ae,N){var Z=N("wTVA"),H=N("EbDI"),O=N("ZhPi"),Q=N("wkBT");function M(_){return Z(_)||H(_)||O(_)||Q()}Ve.exports=M,Ve.exports.__esModule=!0,Ve.exports.default=Ve.exports},SJMd:function(Ve,Ae){/**
|
|
* @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 N,Z,H,O=!1,Q,M;window.PR_SHOULD_USE_CONTINUATION=!0;var _,R;(function(){var b=window,t=["break,continue,do,else,for,if,return,while"],E=[t,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],a=[E,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],A=[a,"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"],h=[a,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[a,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],o="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",f=[a,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],u="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",c=[t,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],i=[t,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],l=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],v=[A,s,h,f,u,c,i,l],B=/^(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",w="com",p="typ",n="lit",d="pun",m="pln",T="tag",y="dec",g="src",U="atn",P="atv",I="nocode",G="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function K(oe){for(var re=0,ie=!1,ee=!1,de=0,Ce=oe.length;de<Ce;++de){var Me=oe[de];if(Me.ignoreCase)ee=!0;else if(/[a-z]/i.test(Me.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){ie=!0,ee=!1;break}}var Ye={b:8,t:9,n:10,v:11,f:12,r:13};function et(je){var He=je.charCodeAt(0);if(He!==92)return He;var ot=je.charAt(1);return He=Ye[ot],He||("0"<=ot&&ot<="7"?parseInt(je.substring(1),8):ot==="u"||ot==="x"?parseInt(je.substring(2),16):je.charCodeAt(1))}function st(je){if(je<32)return(je<16?"\\x0":"\\x")+je.toString(16);var He=String.fromCharCode(je);return He==="\\"||He==="-"||He==="]"||He==="^"?"\\"+He:He}function ut(je){var He=je.substring(1,je.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")),ot=[],ht=He[0]==="^",we=["["];ht&&we.push("^");for(var he=ht?1:0,fe=He.length;he<fe;++he){var ge=He[he];if(/\\[bdsw]/i.test(ge))we.push(ge);else{var Te=et(ge),me;he+2<fe&&He[he+1]==="-"?(me=et(He[he+2]),he+=2):me=Te,ot.push([Te,me]),me<65||Te>122||(me<65||Te>90||ot.push([Math.max(65,Te)|32,Math.min(me,90)|32]),me<97||Te>122||ot.push([Math.max(97,Te)&~32,Math.min(me,122)&~32]))}}ot.sort(function(Pe,Qe){return Pe[0]-Qe[0]||Qe[1]-Pe[1]});for(var Ee=[],xe=[],he=0;he<ot.length;++he){var Ie=ot[he];Ie[0]<=xe[1]+1?xe[1]=Math.max(xe[1],Ie[1]):Ee.push(xe=Ie)}for(var he=0;he<Ee.length;++he){var Ie=Ee[he];we.push(st(Ie[0])),Ie[1]>Ie[0]&&(Ie[1]+1>Ie[0]&&we.push("-"),we.push(st(Ie[1])))}return we.push("]"),we.join("")}function yt(je){for(var He=je.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")),ot=He.length,ht=[],we=0,he=0;we<ot;++we){var fe=He[we];if(fe==="(")++he;else if(fe.charAt(0)==="\\"){var ge=+fe.substring(1);ge&&(ge<=he?ht[ge]=-1:He[we]=st(ge))}}for(var we=1;we<ht.length;++we)ht[we]===-1&&(ht[we]=++re);for(var we=0,he=0;we<ot;++we){var fe=He[we];if(fe==="(")++he,ht[he]||(He[we]="(?:");else if(fe.charAt(0)==="\\"){var ge=+fe.substring(1);ge&&ge<=he&&(He[we]="\\"+ht[ge])}}for(var we=0;we<ot;++we)He[we]==="^"&&He[we+1]!=="^"&&(He[we]="");if(je.ignoreCase&&ie)for(var we=0;we<ot;++we){var fe=He[we],Te=fe.charAt(0);fe.length>=2&&Te==="["?He[we]=ut(fe):Te!=="\\"&&(He[we]=fe.replace(/[a-zA-Z]/g,function(xe){var Ie=xe.charCodeAt(0);return"["+String.fromCharCode(Ie&~32,Ie|32)+"]"}))}return He.join("")}for(var xt=[],de=0,Ce=oe.length;de<Ce;++de){var Me=oe[de];if(Me.global||Me.multiline)throw new Error(""+Me);xt.push("(?:"+yt(Me)+")")}return new RegExp(xt.join("|"),ee?"gi":"g")}function D(oe,re){var ie=/(?:^|\s)nocode(?:\s|$)/,ee=[],de=0,Ce=[],Me=0;function Ye(et){var st=et.nodeType;if(st==1){if(ie.test(et.className))return;for(var ut=et.firstChild;ut;ut=ut.nextSibling)Ye(ut);var yt=et.nodeName.toLowerCase();(yt==="br"||yt==="li")&&(ee[Me]=`
|
|
`,Ce[Me<<1]=de++,Ce[Me++<<1|1]=et)}else if(st==3||st==4){var xt=et.nodeValue;xt.length&&(re?xt=xt.replace(/\r\n?/g,`
|
|
`):xt=xt.replace(/[ \t\r\n]+/g," "),ee[Me]=xt,Ce[Me<<1]=de,de+=xt.length,Ce[Me++<<1|1]=et)}}return Ye(oe),{sourceCode:ee.join("").replace(/\n$/,""),spans:Ce}}function J(oe,re,ie,ee,de){if(!ie)return;var Ce={sourceNode:oe,pre:1,langExtension:null,numberLines:null,sourceCode:ie,spans:null,basePos:re,decorations:null};ee(Ce),de.push.apply(de,Ce.decorations)}var X=/\S/;function ne(oe){for(var re=void 0,ie=oe.firstChild;ie;ie=ie.nextSibling){var ee=ie.nodeType;re=ee===1?re?oe:ie:ee===3&&X.test(ie.nodeValue)?oe:re}return re===oe?void 0:re}function ue(oe,re){var ie={},ee;(function(){for(var Me=oe.concat(re),Ye=[],et={},st=0,ut=Me.length;st<ut;++st){var yt=Me[st],xt=yt[3];if(xt)for(var je=xt.length;--je>=0;)ie[xt.charAt(je)]=yt;var He=yt[1],ot=""+He;et.hasOwnProperty(ot)||(Ye.push(He),et[ot]=null)}Ye.push(/[\0-\uffff]/),ee=K(Ye)})();var de=re.length,Ce=function(Me){for(var Ye=Me.sourceCode,et=Me.basePos,st=Me.sourceNode,ut=[et,m],yt=0,xt=Ye.match(ee)||[],je={},He=0,ot=xt.length;He<ot;++He){var ht=xt[He],we=je[ht],he=void 0,fe;if(typeof we=="string")fe=!1;else{var ge=ie[ht.charAt(0)];if(ge)he=ht.match(ge[1]),we=ge[0];else{for(var Te=0;Te<de;++Te)if(ge=re[Te],he=ht.match(ge[1]),he){we=ge[0];break}he||(we=m)}fe=we.length>=5&&we.substring(0,5)==="lang-",fe&&!(he&&typeof he[1]=="string")&&(fe=!1,we=g),fe||(je[ht]=we)}var me=yt;if(yt+=ht.length,!fe)ut.push(et+me,we);else{var Ee=he[1],xe=ht.indexOf(Ee),Ie=xe+Ee.length;he[2]&&(Ie=ht.length-he[2].length,xe=Ie-Ee.length);var Pe=we.substring(5);J(st,et+me,ht.substring(0,xe),Ce,ut),J(st,et+me+xe,Ee,ae(Pe,Ee),ut),J(st,et+me+Ie,ht.substring(Ie),Ce,ut)}}Me.decorations=ut};return Ce}function Oe(oe){var re=[],ie=[];oe.tripleQuotedStrings?re.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):oe.multiLineStrings?re.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):re.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),oe.verbatimStrings&&ie.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ee=oe.hashComments;ee&&(oe.cStyleComments?(ee>1?re.push([w,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):re.push([w,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ie.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):re.push([w,/^#[^\r\n]*/,null,"#"])),oe.cStyleComments&&(ie.push([w,/^\/\/[^\r\n]*/,null]),ie.push([w,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var de=oe.regexLiterals;if(de){var Ce=de>1?"":`
|
|
\r`,Me=Ce?".":"[\\S\\s]",Ye="/(?=[^/*"+Ce+"])(?:[^/\\x5B\\x5C"+Ce+"]|\\x5C"+Me+"|\\x5B(?:[^\\x5C\\x5D"+Ce+"]|\\x5C"+Me+")*(?:\\x5D|$))+/";ie.push(["lang-regex",RegExp("^"+G+"("+Ye+")")])}var et=oe.types;et&&ie.push([p,et]);var st=(""+oe.keywords).replace(/^ | $/g,"");st.length&&ie.push([L,new RegExp("^(?:"+st.replace(/[\s,]+/g,"|")+")\\b"),null]),re.push([m,/^\s+/,null,` \r
|
|
\xA0`]);var ut="^.[^\\s\\w.$@'\"`/\\\\]*";return oe.regexLiterals&&(ut+="(?!s*/)"),ie.push([n,/^@[a-z_$][a-z_$@0-9]*/i,null],[p,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[m,/^[a-z_$][a-z_$@0-9]*/i,null],[n,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[m,/^\\[\s\S]?/,null],[d,new RegExp(ut),null]),ue(re,ie)}var _e=Oe({keywords:v,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function De(oe,re,ie){for(var ee=/(?:^|\s)nocode(?:\s|$)/,de=/\r\n?|\n/,Ce=oe.ownerDocument,Me=Ce.createElement("li");oe.firstChild;)Me.appendChild(oe.firstChild);var Ye=[Me];function et(He){var ot=He.nodeType;if(ot==1&&!ee.test(He.className))if(He.nodeName==="br")st(He),He.parentNode&&He.parentNode.removeChild(He);else for(var ht=He.firstChild;ht;ht=ht.nextSibling)et(ht);else if((ot==3||ot==4)&&ie){var we=He.nodeValue,he=we.match(de);if(he){var fe=we.substring(0,he.index);He.nodeValue=fe;var ge=we.substring(he.index+he[0].length);if(ge){var Te=He.parentNode;Te.insertBefore(Ce.createTextNode(ge),He.nextSibling)}st(He),fe||He.parentNode.removeChild(He)}}}function st(He){for(;!He.nextSibling;)if(He=He.parentNode,!He)return;function ot(he,fe){var ge=fe?he.cloneNode(!1):he,Te=he.parentNode;if(Te){var me=ot(Te,1),Ee=he.nextSibling;me.appendChild(ge);for(var xe=Ee;xe;xe=Ee)Ee=xe.nextSibling,me.appendChild(xe)}return ge}for(var ht=ot(He.nextSibling,0),we;(we=ht.parentNode)&&we.nodeType===1;)ht=we;Ye.push(ht)}for(var ut=0;ut<Ye.length;++ut)et(Ye[ut]);re===(re|0)&&Ye[0].setAttribute("value",re);var yt=Ce.createElement("ol");yt.className="linenums";for(var xt=Math.max(0,re-1|0)||0,ut=0,je=Ye.length;ut<je;++ut)Me=Ye[ut],Me.className="L"+(ut+xt)%10,Me.firstChild||Me.appendChild(Ce.createTextNode("\xA0")),yt.appendChild(Me);oe.appendChild(yt)}function Ue(oe){var re=/\bMSIE\s(\d+)/.exec(navigator.userAgent);re=re&&+re[1]<=8;var ie=/\n/g,ee=oe.sourceCode,de=ee.length,Ce=0,Me=oe.spans,Ye=Me.length,et=0,st=oe.decorations,ut=st.length,yt=0;st[ut]=de;var xt,je;for(je=xt=0;je<ut;)st[je]!==st[je+2]?(st[xt++]=st[je++],st[xt++]=st[je++]):je+=2;for(ut=xt,je=xt=0;je<ut;){for(var He=st[je],ot=st[je+1],ht=je+2;ht+2<=ut&&st[ht+1]===ot;)ht+=2;st[xt++]=He,st[xt++]=ot,je=ht}ut=st.length=xt;var we=oe.sourceNode,he="";we&&(he=we.style.display,we.style.display="none");try{for(var fe=null;et<Ye;){var ge=Me[et],Te=Me[et+2]||de,me=st[yt+2]||de,ht=Math.min(Te,me),Ee=Me[et+1],xe;if(Ee.nodeType!==1&&(xe=ee.substring(Ce,ht))){re&&(xe=xe.replace(ie,"\r")),Ee.nodeValue=xe;var Ie=Ee.ownerDocument,Pe=Ie.createElement("span");Pe.className=st[yt+1];var Qe=Ee.parentNode;Qe.replaceChild(Pe,Ee),Pe.appendChild(Ee),Ce<Te&&(Me[et+1]=Ee=Ie.createTextNode(ee.substring(ht,Te)),Qe.insertBefore(Ee,Pe.nextSibling))}Ce=ht,Ce>=Te&&(et+=2),Ce>=me&&(yt+=2)}}finally{we&&(we.style.display=he)}}var Ke={};function Le(oe,re){for(var ie=re.length;--ie>=0;){var ee=re[ie];Ke.hasOwnProperty(ee)?b.console&&console.warn("cannot override language handler %s",ee):Ke[ee]=oe}}function ae(oe,re){return oe&&Ke.hasOwnProperty(oe)||(oe=/^\s*</.test(re)?"default-markup":"default-code"),Ke[oe]}Le(_e,["default-code"]),Le(ue([],[[m,/^[^<?]+/],[y,/^<!\w[^>]*(?:>|$)/],[w,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[d,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),Le(ue([[m,/^[\s]+/,null,` \r
|
|
`],[P,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[T,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[U,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[d,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),Le(ue([],[[P,/^[\s\S]+/]]),["uq.val"]),Le(Oe({keywords:A,hashComments:!0,cStyleComments:!0,types:B}),["c","cc","cpp","cxx","cyc","m"]),Le(Oe({keywords:"null,true,false"}),["json"]),Le(Oe({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:B}),["cs"]),Le(Oe({keywords:h,cStyleComments:!0}),["java"]),Le(Oe({keywords:l,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Le(Oe({keywords:c,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Le(Oe({keywords:u,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Le(Oe({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Le(Oe({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Le(Oe({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Le(ue([],[[C,/^[\s\S]+/]]),["regex"]);function V(oe){var re=oe.langExtension;try{var ie=D(oe.sourceNode,oe.pre),ee=ie.sourceCode;oe.sourceCode=ee,oe.spans=ie.spans,oe.basePos=0,ae(re,ee)(oe),Ue(oe)}catch(de){b.console&&console.log(de&&de.stack||de)}}function $(oe,re,ie){var ee=ie||!1,de=re||null,Ce=document.createElement("div");Ce.innerHTML="<pre>"+oe+"</pre>",Ce=Ce.firstChild,ee&&De(Ce,ee,!0);var Me={langExtension:de,numberLines:ee,sourceNode:Ce,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return V(Me),Ce.innerHTML}function q(oe,re){var ie=re||document.body,ee=ie.ownerDocument||document;function de(ge){return ie.getElementsByTagName(ge)}for(var Ce=[de("pre"),de("code"),de("xmp")],Me=[],Ye=0;Ye<Ce.length;++Ye)for(var et=0,st=Ce[Ye].length;et<st;++et)Me.push(Ce[Ye][et]);Ce=null;var ut=Date;ut.now||(ut={now:function(){return+new Date}});var yt=0,xt=/\blang(?:uage)?-([\w.]+)(?!\S)/,je=/\bprettyprint\b/,He=/\bprettyprinted\b/,ot=/pre|xmp/i,ht=/^code$/i,we=/^(?:pre|code|xmp)$/i,he={};function fe(){for(var ge=b.PR_SHOULD_USE_CONTINUATION?ut.now()+250:Infinity;yt<Me.length&&ut.now()<ge;yt++){for(var Te=Me[yt],me=he,Ee=Te;Ee=Ee.previousSibling;){var xe=Ee.nodeType,Ie=(xe===7||xe===8)&&Ee.nodeValue;if(Ie?!/^\??prettify\b/.test(Ie):xe!==3||/\S/.test(Ee.nodeValue))break;if(Ie){me={},Ie.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ct,rt,gt){me[rt]=gt});break}}var Pe=Te.className;if((me!==he||je.test(Pe))&&!He.test(Pe)){for(var Qe=!1,tt=Te.parentNode;tt;tt=tt.parentNode){var mt=tt.tagName;if(we.test(mt)&&tt.className&&je.test(tt.className)){Qe=!0;break}}if(!Qe){Te.className+=" prettyprinted";var Bt=me.lang;if(!Bt){Bt=Pe.match(xt);var Et;!Bt&&(Et=ne(Te))&&ht.test(Et.tagName)&&(Bt=Et.className.match(xt)),Bt&&(Bt=Bt[1])}var Ct;if(ot.test(Te.tagName))Ct=1;else{var nt=Te.currentStyle,qe=ee.defaultView,$e=nt?nt.whiteSpace:qe&&qe.getComputedStyle?qe.getComputedStyle(Te,null).getPropertyValue("white-space"):0;Ct=$e&&$e.substring(0,3)==="pre"}var Re=me.linenums;(Re=Re==="true"||+Re)||(Re=Pe.match(/\blinenums\b(?::(\d+))?/),Re=Re?Re[1]&&Re[1].length?+Re[1]:!0:!1),Re&&De(Te,Re,Ct);var Ne={langExtension:Bt,sourceNode:Te,numberLines:Re,pre:Ct,sourceCode:null,basePos:null,spans:null,decorations:null};V(Ne)}}}yt<Me.length?b.setTimeout(fe,250):typeof oe=="function"&&oe()}fe()}var se=b.PR={createSimpleLexer:ue,registerLangHandler:Le,sourceDecorator:Oe,PR_ATTRIB_NAME:U,PR_ATTRIB_VALUE:P,PR_COMMENT:w,PR_DECLARATION:y,PR_KEYWORD:L,PR_LITERAL:n,PR_NOCODE:I,PR_PLAIN:m,PR_PUNCTUATION:d,PR_SOURCE:g,PR_STRING:C,PR_TAG:T,PR_TYPE:p,prettyPrintOne:O?b.prettyPrintOne=$:_=$,prettyPrint:R=O?b.prettyPrint=q:R=q},te=b.define;typeof te=="function"&&te.amd&&te("google-code-prettify",[],function(){return se})})()},SKnc:function(Ve,Ae,N){var Z=N("bYtY"),H=N("QuXc"),O=function(M,_,R,b,t,E){this.x=M==null?0:M,this.y=_==null?0:_,this.x2=R==null?1:R,this.y2=b==null?0:b,this.type="linear",this.global=E||!1,H.call(this,t)};O.prototype={constructor:O},Z.inherits(O,H);var Q=O;Ve.exports=Q},STEk:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return Le});/*! *****************************************************************************
|
|
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 Z=function(ae,V){return(Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,q){$.__proto__=q}||function($,q){for(var se in q)Object.prototype.hasOwnProperty.call(q,se)&&($[se]=q[se])})(ae,V)};function H(ae,V){function $(){this.constructor=ae}Z(ae,V),ae.prototype=V===null?Object.create(V):($.prototype=V.prototype,new $)}function O(ae,V,$,q){return new($||($=Promise))(function(se,te){function oe(ee){try{ie(q.next(ee))}catch(de){te(de)}}function re(ee){try{ie(q.throw(ee))}catch(de){te(de)}}function ie(ee){var de;ee.done?se(ee.value):(de=ee.value,de instanceof $?de:new $(function(Ce){Ce(de)})).then(oe,re)}ie((q=q.apply(ae,V||[])).next())})}function Q(ae,V){var $,q,se,te,oe={label:0,sent:function(){if(1&se[0])throw se[1];return se[1]},trys:[],ops:[]};return te={next:re(0),throw:re(1),return:re(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function re(ie){return function(ee){return function(de){if($)throw new TypeError("Generator is already executing.");for(;oe;)try{if($=1,q&&(se=2&de[0]?q.return:de[0]?q.throw||((se=q.return)&&se.call(q),0):q.next)&&!(se=se.call(q,de[1])).done)return se;switch(q=0,se&&(de=[2&de[0],se.value]),de[0]){case 0:case 1:se=de;break;case 4:return oe.label++,{value:de[1],done:!1};case 5:oe.label++,q=de[1],de=[0];continue;case 7:de=oe.ops.pop(),oe.trys.pop();continue;default:if(!(se=oe.trys,(se=se.length>0&&se[se.length-1])||de[0]!==6&&de[0]!==2)){oe=0;continue}if(de[0]===3&&(!se||de[1]>se[0]&&de[1]<se[3])){oe.label=de[1];break}if(de[0]===6&&oe.label<se[1]){oe.label=se[1],se=de;break}if(se&&oe.label<se[2]){oe.label=se[2],oe.ops.push(de);break}se[2]&&oe.ops.pop(),oe.trys.pop();continue}de=V.call(ae,oe)}catch(Ce){de=[6,Ce],q=0}finally{$=se=0}if(5&de[0])throw de[1];return{value:de[0]?de[1]:void 0,done:!0}}([ie,ee])}}}function M(){for(var ae=0,V=0,$=arguments.length;V<$;V++)ae+=arguments[V].length;var q=Array(ae),se=0;for(V=0;V<$;V++)for(var te=arguments[V],oe=0,re=te.length;oe<re;oe++,se++)q[se]=te[oe];return q}var _=function(){function ae(){}return ae.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ae.setAttributes=function(V,$){for(var q=0,se=$;q<se.length;q++){var te=se[q],oe=te[0],re=te[1];V.setAttribute(oe,re)}},ae.createRect=function(V,$,q){var se=document.createElementNS("http://www.w3.org/2000/svg","rect");return se.setAttribute("width",V.toString()),se.setAttribute("height",$.toString()),q&&ae.setAttributes(se,q),se},ae.createLine=function(V,$,q,se,te){var oe=document.createElementNS("http://www.w3.org/2000/svg","line");return oe.setAttribute("x1",V.toString()),oe.setAttribute("y1",$.toString()),oe.setAttribute("x2",q.toString()),oe.setAttribute("y2",se.toString()),te&&ae.setAttributes(oe,te),oe},ae.createPolygon=function(V,$){var q=document.createElementNS("http://www.w3.org/2000/svg","polygon");return q.setAttribute("points",V),$&&ae.setAttributes(q,$),q},ae.createCircle=function(V,$){var q=document.createElementNS("http://www.w3.org/2000/svg","circle");return q.setAttribute("cx",(V/2).toString()),q.setAttribute("cy",(V/2).toString()),q.setAttribute("r",V.toString()),$&&ae.setAttributes(q,$),q},ae.createEllipse=function(V,$,q){var se=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return se.setAttribute("cx",(V/2).toString()),se.setAttribute("cy",($/2).toString()),se.setAttribute("rx",(V/2).toString()),se.setAttribute("ry",($/2).toString()),q&&ae.setAttributes(se,q),se},ae.createGroup=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&ae.setAttributes($,V),$},ae.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ae.createMarker=function(V,$,q,se,te,oe,re){var ie=document.createElementNS("http://www.w3.org/2000/svg","marker");return ae.setAttributes(ie,[["id",V],["orient",$],["markerWidth",q.toString()],["markerHeight",se.toString()],["refX",te.toString()],["refY",oe.toString()]]),ie.appendChild(re),ie},ae.createText=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","text");return $.setAttribute("x","0"),$.setAttribute("y","0"),V&&ae.setAttributes($,V),$},ae.createTSpan=function(V,$){var q=document.createElementNS("http://www.w3.org/2000/svg","tspan");return q.textContent=V,$&&ae.setAttributes(q,$),q},ae.createImage=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&ae.setAttributes($,V),$},ae.createPoint=function(V,$){var q=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return q.x=V,q.y=$,q},ae.createPath=function(V,$){var q=document.createElementNS("http://www.w3.org/2000/svg","path");return q.setAttribute("d",V),$&&ae.setAttributes(q,$),q},ae}(),R=function(){function ae(){}return ae.addKey=function(V){ae.key=V},Object.defineProperty(ae,"isLicensed",{get:function(){return!!ae.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ae.key)},enumerable:!1,configurable:!0}),ae}(),b=function(){function ae(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ae.prototype.rasterize=function(V,$,q){var se=this;return new Promise(function(te){var oe=q!==void 0?q:document.createElement("canvas");V===null&&(se.markersOnly=!0,se.naturalSize=!1);var re=document.createElementNS("http://www.w3.org/2000/svg","svg");re.setAttribute("xmlns","http://www.w3.org/2000/svg"),re.setAttribute("width",$.width.baseVal.valueAsString),re.setAttribute("height",$.height.baseVal.valueAsString),re.setAttribute("viewBox","0 0 "+$.viewBox.baseVal.width.toString()+" "+$.viewBox.baseVal.height.toString()),re.innerHTML=$.innerHTML,se.naturalSize===!0?(re.width.baseVal.value=V.naturalWidth,re.height.baseVal.value=V.naturalHeight):se.width!==void 0&&se.height!==void 0&&(re.width.baseVal.value=se.width,re.height.baseVal.value=se.height),oe.width=re.width.baseVal.value,oe.height=re.height.baseVal.value;var ie=re.outerHTML,ee=oe.getContext("2d");se.markersOnly!==!0&&ee.drawImage(V,0,0,oe.width,oe.height);var de=window.URL,Ce=new Image(oe.width,oe.height);Ce.setAttribute("crossOrigin","anonymous");var Me=new Blob([ie],{type:"image/svg+xml"}),Ye=de.createObjectURL(Me);Ce.onload=function(){ee.drawImage(Ce,0,0),de.revokeObjectURL(Ye);var et=oe.toDataURL(se.imageType,se.imageQuality);te(et)},Ce.src=Ye})},ae}(),t=function(){},E=function(){function ae(V){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+V+"_"}return Object.defineProperty(ae.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ae.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(ae.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ae.prototype.addClass=function(V){return this.styleSheet===void 0&&this.addStyleSheet(),V.name=""+this.classNamePrefix+V.localName,this.classes.push(V),this.styleSheet.sheet.insertRule("."+V.name+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length),V},ae.prototype.addRule=function(V){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(V),this.styleSheet.sheet.insertRule(V.selector+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length)},ae.prototype.addStyleSheet=function(){var V;this.styleSheet=document.createElement("style"),((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).appendChild(this.styleSheet),this.addRule(new a("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new a("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new a("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new A("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new A("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},ae.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ae}(),a=function(ae,V){this.selector=ae,this.style=V},A=function(ae,V){this.localName=ae,this.style=V},h=function(){function ae(V,$,q,se,te){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=V,this.displayMode=$,this.markerItems=q,this.uiStyleSettings=se,this.styles=te,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ae.prototype.show=function(V){var $=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var 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(te){var oe=document.createElement("div");oe.className=""+$.toolbarButtonStyleClass.name,oe.setAttribute("data-type-name",te.typeName),oe.innerHTML=te.icon,oe.addEventListener("click",function(){$.markerToolbarButtonClicked(oe,te)}),$.buttons.push(oe),$.markerButtons.push(oe)}),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 se=document.createElement("div");se.className=this.toolbarBlockStyleClass.name,se.style.whiteSpace="nowrap",se.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(se),this.addActionButton(se,'<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(se,'<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()},ae.prototype.addButtonClickListener=function(V){this.buttonClickListeners.push(V)},ae.prototype.removeButtonClickListener=function(V){this.buttonClickListeners.indexOf(V)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(V),1)},ae.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ae.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var V=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var $=0;$<this.markerButtons.length;$++)$<V||$===V&&this.markerButtons.length-1===V?this.markerButtonBlock.appendChild(this.markerButtons[$]):($===V&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[$]))}},ae.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")},ae.prototype.resetButtonStyles=function(){var V=this;this.buttons.forEach(function($){$.className=$.className.replace(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name,"").trim(),$.className=$.className.replace(V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:V.toolbarActiveButtonStyleColorsClass.name,"").trim(),$.className+=" "+(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name)})},ae.prototype.addActionButton=function(V,$,q){var se=this,te=document.createElement("div");switch(te.className=""+this.toolbarButtonStyleClass.name,te.innerHTML=$,te.setAttribute("data-action",q),te.addEventListener("click",function(){se.actionToolbarButtonClicked(te,q)}),q){case"select":te.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":te.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":te.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":te.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":te.style.fill=this.uiStyleSettings.closeButtonColor}V.appendChild(te),this.buttons.push(te)},ae.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new A("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 A("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new A("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new A("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 A("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var V=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new A("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
|
|
padding: `+V+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new A("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new A("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new a("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new a("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},ae.prototype.markerToolbarButtonClicked=function(V,$){this.setActiveButton(V),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(q){return q("marker",$)}),this.markerButtonOverflowBlock.style.display="none"},ae.prototype.actionToolbarButtonClicked=function(V,$){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(q){return q("action",$)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ae.prototype.setActiveButton=function(V){this.resetButtonStyles(),V.className=V.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),V.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ae.prototype.setActiveMarkerButton=function(V){var $=this.markerButtons.find(function(q){return q.getAttribute("data-type-name")===V});$&&this.setActiveButton($)},ae.prototype.setCurrentMarker=function(V){var $=this;this.currentMarker=V,this.buttons.filter(function(q){return/delete|notes/.test(q.getAttribute("data-action"))}).forEach(function(q){$.currentMarker===void 0?(q.style.fillOpacity="0.4",q.style.pointerEvents="none"):(q.style.fillOpacity="1",q.style.pointerEvents="all")})},ae}(),s=function(){function ae(V,$,q,se){this.panels=[],this.panelButtons=[],this.markerjsContainer=V,this.displayMode=$,this.uiStyleSettings=q,this.styles=se,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ae.prototype.addStyles=function(){var V;this.toolboxStyleClass=this.styles.addClass(new A("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 A("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var $=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new A("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new A("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new A("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 A("toolbox-panel-row_colors",`
|
|
background-color: `+((V=this.uiStyleSettings.toolboxBackgroundColor)!==null&&V!==void 0?V:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new A("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
|
|
padding: `+$+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new A("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new A("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new a("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new a("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},ae.prototype.show=function(V){var $;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolboxStyleClass.name+" "+(($=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ae.prototype.setPanelButtons=function(V){var $,q,se=this;this.panels=V,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&$!==void 0?$: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(te){var oe;te.uiStyleSettings=se.uiStyleSettings;var re=document.createElement("div");re.className=se.toolboxButtonStyleClass.name+" "+((oe=se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&oe!==void 0?oe:se.toolboxButtonStyleColorsClass.name),re.innerHTML=te.icon,re.title=te.title,re.addEventListener("click",function(){se.panelButtonClick(te)}),se.panelButtons.push(re),se.buttonRow.appendChild(re)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ae.prototype.panelButtonClick=function(V){var $=this,q=-1;if(V!==this.activePanel){q=this.panels.indexOf(V),this.panelRow.innerHTML="";var se=V.getUi();se.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(se),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=V}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){$.displayMode==="inline"?$.panelRow.style.display="none":$.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(te,oe){var re,ie;te.className=$.toolboxButtonStyleClass.name+" "+(oe===q?""+((re=$.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&re!==void 0?re:$.toolboxActiveButtonStyleColorsClass.name):""+((ie=$.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ie!==void 0?ie:$.toolboxButtonStyleColorsClass.name))})},ae}(),o=function(ae,V){this.title=ae,this.icon=V},f=function(ae){function V($,q,se,te){var oe=ae.call(this,$,te||'<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 oe.colors=[],oe.addTransparent=!1,oe.colorBoxes=[],oe.colors=q,oe.currentColor=se,oe.setCurrentColor=oe.setCurrentColor.bind(oe),oe.getColorBox=oe.getColorBox.bind(oe),oe}return H(V,ae),V.prototype.getUi=function(){var $=this,q=document.createElement("div");return q.style.overflow="hidden",q.style.whiteSpace="nowrap",this.colors.forEach(function(se){var te=$.getColorBox(se);q.appendChild(te),$.colorBoxes.push(te)}),q},V.prototype.getColorBox=function($){var q=this,se=this.uiStyleSettings.toolbarHeight/4,te=this.uiStyleSettings.toolbarHeight-se,oe=document.createElement("div");oe.style.display="inline-block",oe.style.boxSizing="content-box",oe.style.width=te-2+"px",oe.style.height=te-2+"px",oe.style.padding="1px",oe.style.marginRight="2px",oe.style.marginBottom="2px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderRadius=(te+2)/2+"px",oe.style.borderColor=$===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){q.setCurrentColor($,oe)});var re=document.createElement("div");return re.style.display="inline-block",re.style.width=te-2+"px",re.style.height=te-2+"px",re.style.backgroundColor=$,re.style.borderRadius=te/2+"px",$==="transparent"&&(re.style.fill=this.uiStyleSettings.toolboxAccentColor,re.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>`),oe.appendChild(re),oe},V.prototype.setCurrentColor=function($,q){var se=this;this.currentColor=$,this.colorBoxes.forEach(function(te){te.style.borderColor=te===q?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged($)},V}(o),u=function(){function ae(V,$,q){this._state="new",this._isSelected=!1,this._container=V,this._overlayContainer=$,this.globalSettings=q,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ae.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ae.prototype.ownsTarget=function(V){return!1},Object.defineProperty(ae.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ae.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ae.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ae.prototype.pointerDown=function(V,$){},ae.prototype.dblClick=function(V,$){},ae.prototype.manipulate=function(V){},ae.prototype.pointerUp=function(V){this.stateChanged()},ae.prototype.dispose=function(){},ae.prototype.addMarkerVisualToContainer=function(V){this.container.childNodes.length>0?this.container.insertBefore(V,this.container.childNodes[0]):this.container.appendChild(V)},ae.prototype.getState=function(){return{typeName:ae.typeName,state:this.state,notes:this.notes}},ae.prototype.restoreState=function(V){this._state=V.state,this.notes=V.notes},ae.prototype.scale=function(V,$){},ae.prototype.colorChanged=function(V){this.onColorChanged&&this.onColorChanged(V),this.stateChanged()},ae.prototype.fillColorChanged=function(V){this.onFillColorChanged&&this.onFillColorChanged(V),this.stateChanged()},ae.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var V=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),V.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(V)&&this.onStateChanged(this)}},ae.typeName="MarkerBase",ae}(),c=function(){function ae(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ae.prototype.findGripByVisual=function(V){return this.topLeft.ownsTarget(V)?this.topLeft:this.topCenter.ownsTarget(V)?this.topCenter:this.topRight.ownsTarget(V)?this.topRight:this.centerLeft.ownsTarget(V)?this.centerLeft:this.centerRight.ownsTarget(V)?this.centerRight:this.bottomLeft.ownsTarget(V)?this.bottomLeft:this.bottomCenter.ownsTarget(V)?this.bottomCenter:this.bottomRight.ownsTarget(V)?this.bottomRight:void 0},ae}(),i=function(){function ae(){this.GRIP_SIZE=10,this.visual=_.createGroup(),this.visual.appendChild(_.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ae.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},ae}(),l=function(){function ae(){}return ae.toITransformMatrix=function(V){return{a:V.a,b:V.b,c:V.c,d:V.d,e:V.e,f:V.f}},ae.toSVGMatrix=function(V,$){return V.a=$.a,V.b=$.b,V.c=$.c,V.d=$.d,V.e=$.e,V.f=$.f,V},ae}(),v=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.left=0,te.top=0,te.width=0,te.height=0,te.defaultSize={x:50,y:20},te.offsetX=0,te.offsetY=0,te.rotationAngle=0,te.CB_DISTANCE=10,te._suppressMarkerCreateEvent=!1,te.container.transform.baseVal.appendItem(_.createTransform()),te.setupControlBox(),te}return H(V,ae),Object.defineProperty(V.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"visual",{get:function(){return this._visual},set:function($){this._visual=$;var q=_.createTransform();this._visual.transform.baseVal.appendItem(q)},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function($){return!!ae.prototype.ownsTarget.call(this,$)||!!(this.controlGrips.findGripByVisual($)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($))},V.prototype.pointerDown=function($,q){ae.prototype.pointerDown.call(this,$,q),this.state==="new"&&(this.left=$.x,this.top=$.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var se=this.unrotatePoint($);if(this.manipulationStartX=se.x,this.manipulationStartY=se.y,this.offsetX=se.x-this.left,this.offsetY=se.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 te=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=te.x-this.width/2,this.top=te.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var oe=this.container.transform.baseVal.getItem(0);oe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(oe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},V.prototype.pointerUp=function($){var q=this.state;ae.prototype.pointerUp.call(this,$),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate($),this._state="select",q==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},V.prototype.moveVisual=function($){this.visual.style.transform="translate("+$.x+"px, "+$.y+"px)"},V.prototype.manipulate=function($){var q=this.unrotatePoint($);this.state==="creating"?this.resize($):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($)},V.prototype.resize=function($){var q=this.manipulationStartLeft,se=this.manipulationStartWidth,te=this.manipulationStartTop,oe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:q=this.manipulationStartLeft+$.x-this.manipulationStartX,se=this.manipulationStartWidth+this.manipulationStartLeft-q;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:se=this.manipulationStartWidth+$.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:te=this.manipulationStartTop+$.y-this.manipulationStartY,oe=this.manipulationStartHeight+this.manipulationStartTop-te;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:oe=this.manipulationStartHeight+$.y-this.manipulationStartY}se>=0?(this.left=q,this.width=se):(this.left=q+se,this.width=-se),oe>=0?(this.top=te,this.height=oe):(this.top=te+oe,this.height=-oe),this.setSize()},V.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},V.prototype.rotate=function($){if(Math.abs($.x-this.centerX)>.1){var q=Math.sign($.x-this.centerX);this.rotationAngle=180*Math.atan(($.y-this.centerY)/($.x-this.centerX))/Math.PI+90*q,this.applyRotation()}},V.prototype.applyRotation=function(){var $=this.container.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem($,0)},V.prototype.rotatePoint=function($){if(this.rotationAngle===0)return $;var q=this.container.getCTM(),se=_.createPoint($.x,$.y);return{x:(se=se.matrixTransform(q)).x,y:se.y}},V.prototype.unrotatePoint=function($){if(this.rotationAngle===0)return $;var q=this.container.getCTM();q=q.inverse();var se=_.createPoint($.x,$.y);return{x:(se=se.matrixTransform(q)).x,y:se.y}},V.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=_.createGroup();var $=_.createTransform();$.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem($),this.container.appendChild(this.controlBox),this.controlRect=_.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=_.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 c,this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){var $=this.controlBox.transform.baseVal.getItem(0);$.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem($,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},V.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},V.prototype.createGrip=function(){var $=new i;return $.visual.transform.baseVal.appendItem(_.createTransform()),this.controlBox.appendChild($.visual),$},V.prototype.positionGrips=function(){var $=this.controlGrips.topLeft.GRIP_SIZE,q=-$/2,se=q,te=(this.width+this.CB_DISTANCE)/2-$/2,oe=(this.height+this.CB_DISTANCE)/2-$/2,re=this.height+this.CB_DISTANCE-$/2,ie=this.width+this.CB_DISTANCE-$/2;this.positionGrip(this.controlGrips.topLeft.visual,q,se),this.positionGrip(this.controlGrips.topCenter.visual,te,se),this.positionGrip(this.controlGrips.topRight.visual,ie,se),this.positionGrip(this.controlGrips.centerLeft.visual,q,oe),this.positionGrip(this.controlGrips.centerRight.visual,ie,oe),this.positionGrip(this.controlGrips.bottomLeft.visual,q,re),this.positionGrip(this.controlGrips.bottomCenter.visual,te,re),this.positionGrip(this.controlGrips.bottomRight.visual,ie,re),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,te,se-3*this.CB_DISTANCE)},V.prototype.positionGrip=function($,q,se){var te=$.transform.baseVal.getItem(0);te.setTranslate(q,se),$.transform.baseVal.replaceItem(te,0)},V.prototype.hideControlBox=function(){this.controlBox.style.display="none"},V.prototype.showControlBox=function(){this.controlBox.style.display=""},V.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:l.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:l.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ae.prototype.getState.call(this))},V.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var q=$;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(l.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,q.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(l.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,q.containerTransformMatrix))},V.prototype.scale=function($,q){ae.prototype.scale.call(this,$,q);var se=this.rotatePoint({x:this.left,y:this.top}),te=this.unrotatePoint({x:se.x*$,y:se.y*q});this.left=te.x,this.top=te.y,this.width=this.width*$,this.height=this.height*q,this.adjustControlBox()},V}(u),B=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.fillColor="transparent",te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.opacity=1,te.setStrokeColor=te.setStrokeColor.bind(te),te.setFillColor=te.setFillColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.createVisual=te.createVisual.bind(te),te}return H(V,ae),V.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual)},V.prototype.createVisual=function(){this.visual=_.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function($,q){ae.prototype.pointerDown.call(this,$,q),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},V.prototype.manipulate=function($){ae.prototype.manipulate.call(this,$)},V.prototype.resize=function($){ae.prototype.resize.call(this,$),this.setSize()},V.prototype.setSize=function(){ae.prototype.setSize.call(this),_.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function($){ae.prototype.pointerUp.call(this,$),this.setSize()},V.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&_.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},V.prototype.setFillColor=function($){this.fillColor=$,this.visual&&_.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&_.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&_.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this))},V.prototype.restoreState=function($){var q=$;this.fillColor=q.fillColor,this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.opacity=q.opacity,this.createVisual(),ae.prototype.restoreState.call(this,$),this.setSize()},V.prototype.scale=function($,q){ae.prototype.scale.call(this,$,q),this.setSize()},V.title="Rectangle marker",V}(v),C=function(ae){function V($,q,se,te){var oe=ae.call(this,$,te||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return oe.widths=[],oe.widthBoxes=[],oe.widths=q,oe.currentWidth=se,oe.setCurrentWidth=oe.setCurrentWidth.bind(oe),oe}return H(V,ae),V.prototype.getUi=function(){var $=this,q=document.createElement("div");return q.style.display="flex",q.style.overflow="hidden",q.style.flexGrow="2",this.widths.forEach(function(se){var te=document.createElement("div");te.style.display="flex",te.style.flexGrow="2",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.borderColor=se===$.currentWidth?$.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){$.setCurrentWidth(se,te)}),q.appendChild(te);var oe=document.createElement("div");oe.innerText=se.toString(),oe.style.marginRight="5px",te.appendChild(oe);var re=document.createElement("div");re.style.minHeight="20px",re.style.flexGrow="2",re.style.display="flex",re.style.alignItems="center";var ie=document.createElement("hr");ie.style.minWidth="20px",ie.style.border="0px",ie.style.borderTop=se+"px solid "+$.uiStyleSettings.toolboxColor,ie.style.flexGrow="2",re.appendChild(ie),te.appendChild(re),$.widthBoxes.push(te)}),q},V.prototype.setCurrentWidth=function($,q){var se=this;this.currentWidth=$,this.widthBoxes.forEach(function(te){te.style.borderColor=te===q?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},V}(o),L=function(ae){function V($,q,se,te){var oe=ae.call(this,$,te||'<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 oe.styles=[],oe.styleBoxes=[],oe.styles=q,oe.currentStyle=se,oe.setCurrentStyle=oe.setCurrentStyle.bind(oe),oe}return H(V,ae),V.prototype.getUi=function(){var $=this,q=document.createElement("div");return q.style.display="flex",q.style.overflow="hidden",q.style.flexGrow="2",this.styles.forEach(function(se){var te=document.createElement("div");te.style.display="flex",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.overflow="hidden",te.style.maxWidth=100/$.styles.length-5+"%",te.style.borderColor=se===$.currentStyle?$.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){$.setCurrentStyle(se,te)}),q.appendChild(te);var oe=document.createElement("div");oe.style.minHeight="20px",oe.style.flexGrow="2",oe.style.overflow="hidden";var re=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+$.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(se!==""?'stroke-dasharray="'+se+'"':"")+` />
|
|
</svg>`;oe.innerHTML=re,te.appendChild(oe),$.styleBoxes.push(te)}),q},V.prototype.setCurrentStyle=function($,q){var se=this;this.currentStyle=$,this.styleBoxes.forEach(function(te){te.style.borderColor=te===q?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},V}(o),w=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.strokeColor=se.defaultColor,te.strokeWidth=se.defaultStrokeWidth,te.strokeDasharray=se.defaultStrokeDasharray,te.strokePanel=new f("Line color",se.defaultColorSet,se.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new C("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new L("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return H(V,ae),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=V.typeName,$},V.typeName="FrameMarker",V.title="Frame marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',V}(B),p=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},n=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.x1=0,te.y1=0,te.x2=0,te.y2=0,te.defaultLength=50,te.manipulationStartX=0,te.manipulationStartY=0,te.manipulationStartX1=0,te.manipulationStartY1=0,te.manipulationStartX2=0,te.manipulationStartY2=0,te.setupControlBox(),te}return H(V,ae),V.prototype.ownsTarget=function($){return!!ae.prototype.ownsTarget.call(this,$)||!(!this.grip1.ownsTarget($)&&!this.grip2.ownsTarget($))},V.prototype.pointerDown=function($,q){ae.prototype.pointerDown.call(this,$,q),this.manipulationStartX=$.x,this.manipulationStartY=$.y,this.state==="new"&&(this.x1=$.x,this.y1=$.y,this.x2=$.x,this.y2=$.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")},V.prototype.pointerUp=function($){var q=this.state;ae.prototype.pointerUp.call(this,$),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($),this._state="select",q==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},V.prototype.adjustVisual=function(){},V.prototype.manipulate=function($){this.state==="creating"?this.resize($):this.state==="move"?(this.x1=this.manipulationStartX1+$.x-this.manipulationStartX,this.y1=this.manipulationStartY1+$.y-this.manipulationStartY,this.x2=this.manipulationStartX2+$.x-this.manipulationStartX,this.y2=this.manipulationStartY2+$.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize($)},V.prototype.resize=function($){switch(this.activeGrip){case this.grip1:this.x1=$.x,this.y1=$.y;break;case this.grip2:case void 0:this.x2=$.x,this.y2=$.y}this.adjustVisual(),this.adjustControlBox()},V.prototype.select=function(){ae.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ae.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=_.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){this.positionGrips()},V.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},V.prototype.createGrip=function(){var $=new i;return $.visual.transform.baseVal.appendItem(_.createTransform()),this.controlBox.appendChild($.visual),$},V.prototype.positionGrips=function(){var $=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-$/2,this.y1-$/2),this.positionGrip(this.grip2.visual,this.x2-$/2,this.y2-$/2)},V.prototype.positionGrip=function($,q,se){var te=$.transform.baseVal.getItem(0);te.setTranslate(q,se),$.transform.baseVal.replaceItem(te,0)},V.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ae.prototype.getState.call(this))},V.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var q=$;this.x1=q.x1,this.y1=q.y1,this.x2=q.x2,this.y2=q.y2},V.prototype.scale=function($,q){ae.prototype.scale.call(this,$,q),this.x1=this.x1*$,this.y1=this.y1*q,this.x2=this.x2*$,this.y2=this.y2*q,this.adjustVisual(),this.adjustControlBox()},V}(u),d=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.setStrokeColor=te.setStrokeColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.strokeColor=se.defaultColor,te.strokeWidth=se.defaultStrokeWidth,te.strokeDasharray=se.defaultStrokeDasharray,te.strokePanel=new f("Line color",se.defaultColorSet,se.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new C("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new L("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return H(V,ae),V.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorLine&&$!==this.visibleLine)},V.prototype.createVisual=function(){this.visual=_.createGroup(),this.selectorLine=_.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=_.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function($,q){ae.prototype.pointerDown.call(this,$,q),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},V.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),_.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),_.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),_.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ae.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var q=$;this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.createVisual(),this.adjustVisual()},V.typeName="LineMarker",V.title="Line marker",V.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',V}(n),m=function(ae){function V($,q,se,te){var oe=ae.call(this,$,te||'<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 oe.fonts=[],oe.fontBoxes=[],oe.fonts=q,oe.currentFont=se,oe.setCurrentFont=oe.setCurrentFont.bind(oe),oe}return H(V,ae),V.prototype.getUi=function(){var $=this,q=document.createElement("div");return q.style.overflow="hidden",q.style.flexGrow="2",this.fonts.forEach(function(se){var te=document.createElement("div");te.style.display="inline-block",te.style.alignItems="center",te.style.justifyContent="space-between",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.overflow="hidden",te.style.maxWidth=100/$.fonts.length-5+"%",te.style.borderColor=se===$.currentFont?$.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){$.setCurrentFont(se,te)}),q.appendChild(te);var oe=document.createElement("div");oe.style.display="flex",oe.style.minHeight="20px",oe.style.flexGrow="2",oe.style.fontFamily=se,oe.style.overflow="hidden";var re=document.createElement("div");re.style.whiteSpace="nowrap",re.style.overflow="hidden",re.style.textOverflow="ellipsis",re.innerHTML="The quick brown fox jumps over the lazy dog",oe.appendChild(re),te.appendChild(oe),$.fontBoxes.push(te)}),q},V.prototype.setCurrentFont=function($,q){var se=this;this.currentFont=$,this.fontBoxes.forEach(function(te){te.style.borderColor=te===q?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},V}(o),T=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.color="transparent",te.padding=5,te.DEFAULT_TEXT="your text here",te.text=te.DEFAULT_TEXT,te.isMoved=!1,te.color=se.defaultColor,te.fontFamily=se.defaultFontFamily,te.defaultSize={x:100,y:30},te.setColor=te.setColor.bind(te),te.setFont=te.setFont.bind(te),te.renderText=te.renderText.bind(te),te.sizeText=te.sizeText.bind(te),te.textEditDivClicked=te.textEditDivClicked.bind(te),te.showTextEditor=te.showTextEditor.bind(te),te.setSize=te.setSize.bind(te),te.positionTextEditor=te.positionTextEditor.bind(te),te.colorPanel=new f("Color",se.defaultColorSet,se.defaultColor),te.colorPanel.onColorChanged=te.setColor,te.fontFamilyPanel=new m("Font",se.defaultFontFamilies,se.defaultFontFamily),te.fontFamilyPanel.onFontChanged=te.setFont,te}return H(V,ae),V.prototype.ownsTarget=function($){if(ae.prototype.ownsTarget.call(this,$)||$===this.visual||$===this.textElement||$===this.bgRectangle)return!0;var q=!1;return this.textElement.childNodes.forEach(function(se){se===$&&(q=!0)}),q},V.prototype.createVisual=function(){this.visual=_.createGroup(),this.bgRectangle=_.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=_.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(_.createTransform()),this.textElement.transform.baseVal.appendItem(_.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},V.prototype.pointerDown=function($,q){ae.prototype.pointerDown.call(this,$,q),this.isMoved=!1,this.pointerDownPoint=$,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},V.prototype.renderText=function(){var $=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){$.textElement.appendChild(_.createTSpan(q.trim()===""?" ":q.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},V.prototype.getTextScale=function(){var $=this.textElement.getBBox(),q=1;if($.width>0&&$.height>0){var se=(1*this.width-this.width*this.padding*2/100)/$.width,te=(1*this.height-this.height*this.padding*2/100)/$.height;q=Math.min(se,te)}return q},V.prototype.getTextPosition=function($){var q=this.textElement.getBBox(),se=0,te=0;return q.width>0&&q.height>0&&(se=(this.width-q.width*$)/2,te=this.height/2-q.height*$/2),{x:se,y:te}},V.prototype.sizeText=function(){var $=this.textElement.getBBox(),q=this.getTextScale(),se=this.getTextPosition(q);se.y-=$.y*q,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+se.x+"px, "+se.y+"px) scale("+q+", "+q+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(se.x,se.y),this.textElement.transform.baseVal.getItem(1).setScale(q,q))},V.prototype.manipulate=function($){ae.prototype.manipulate.call(this,$),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs($.x-this.pointerDownPoint.x)>5||Math.abs($.y-this.pointerDownPoint.y)>5)},V.prototype.resize=function($){ae.prototype.resize.call(this,$),this.isMoved=!0,this.setSize(),this.sizeText()},V.prototype.setSize=function(){ae.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(_.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},V.prototype.pointerUp=function($){var q=this.state;q==="creating"&&(this._suppressMarkerCreateEvent=!0),ae.prototype.pointerUp.call(this,$),this.setSize(),(q==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},V.prototype.showTextEditor=function(){var $=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($.textEditor.style.fontSize);$.textEditor.clientWidth>=Number.parseInt($.textEditor.style.maxWidth)&&q>.9;)q-=.1,$.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 se=q.clipboardData.getData("text"),te=window.getSelection();if(!te.rangeCount)return!1;te.deleteFromDocument(),te.getRangeAt(0).insertNode(document.createTextNode(se)),q.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){$.textEditDivClicked($.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},V.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var $=this.getTextScale(),q=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),se=this.textElement.getBBox(),te={x:se.width*$,y:se.height*$};q.x-=te.x/2,q.y-=te.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*$,12)+"px",this.textElement.style.display="none"}},V.prototype.textEditDivClicked=function($){this.text=$.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},V.prototype.select=function(){ae.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},V.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ae.prototype.deselect.call(this)},V.prototype.dblClick=function($,q){ae.prototype.dblClick.call(this,$,q),this.showTextEditor()},V.prototype.setColor=function($){this.textElement&&_.setAttributes(this.textElement,[["fill",$]]),this.color=$,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged($)},V.prototype.setFont=function($){this.textElement&&_.setAttributes(this.textElement,[["font-family",$]]),this.fontFamily=$,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},V.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},V.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ae.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){var q=$;this.color=q.color,this.fontFamily=q.fontFamily,this.padding=q.padding,this.text=q.text,this.createVisual(),ae.prototype.restoreState.call(this,$),this.setSize()},V.prototype.scale=function($,q){ae.prototype.scale.call(this,$,q),this.setSize(),this.sizeText(),this.positionTextEditor()},V.typeName="TextMarker",V.title="Text marker",V.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',V}(v),y=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.color="transparent",te.lineWidth=3,te.drawing=!1,te.pixelRatio=1,te.color=se.defaultColor,te.lineWidth=se.defaultStrokeWidth,te.pixelRatio=se.freehandPixelRatio,te.setColor=te.setColor.bind(te),te.addCanvas=te.addCanvas.bind(te),te.finishCreation=te.finishCreation.bind(te),te.setLineWidth=te.setLineWidth.bind(te),te.colorPanel=new f("Color",se.defaultColorSet,se.defaultColor),te.colorPanel.onColorChanged=te.setColor,te.lineWidthPanel=new C("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),te.lineWidthPanel.onWidthChanged=te.setLineWidth,te}return H(V,ae),V.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.drawingImage)},V.prototype.createVisual=function(){this.visual=_.createGroup(),this.drawingImage=_.createImage(),this.visual.appendChild(this.drawingImage);var $=_.createTransform();this.visual.transform.baseVal.appendItem($),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function($,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($.x,$.y),this.drawing=!0):ae.prototype.pointerDown.call(this,$,q)},V.prototype.manipulate=function($){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo($.x,$.y),this.canvasContext.stroke()):ae.prototype.manipulate.call(this,$)},V.prototype.resize=function($){ae.prototype.resize.call(this,$),_.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function($){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ae.prototype.pointerUp.call(this,$)},V.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},V.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.select.call(this)},V.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ae.prototype.deselect.call(this)},V.prototype.finishCreation=function(){for(var $=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),q=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],se=q[0],te=q[1],oe=q[2],re=q[3],ie=!1,ee=0;ee<this.canvasElement.height;ee++)for(var de=0;de<this.canvasElement.width;de++)$.data[ee*this.canvasElement.width*4+4*de+3]>0&&(ie=!0,ee<te&&(te=ee),de<se&&(se=de),ee>re&&(re=ee),de>oe&&(oe=de));if(ie){this.left=se/this.pixelRatio,this.top=te/this.pixelRatio,this.width=(oe-se)/this.pixelRatio,this.height=(re-te)/this.pixelRatio;var Ce=document.createElement("canvas");Ce.width=oe-se,Ce.height=re-te,Ce.getContext("2d").putImageData(this.canvasContext.getImageData(se,te,oe-se,re-te),0,0),this.drawingImgUrl=Ce.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},V.prototype.setDrawingImage=function(){_.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),_.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},V.prototype.setColor=function($){this.color=$,this.colorChanged($)},V.prototype.setLineWidth=function($){this.lineWidth=$},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({drawingImgUrl:this.drawingImgUrl},ae.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){this.createVisual(),ae.prototype.restoreState.call(this,$),this.drawingImgUrl=$.drawingImgUrl,this.setDrawingImage()},V.prototype.scale=function($,q){ae.prototype.scale.call(this,$,q),this.setDrawingImage()},V.typeName="FreehandMarker",V.title="Freehand marker",V.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',V}(v),g=function(ae){function V($,q,se){var te=ae.call(this,$,se||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return te.typeBoxes=[],te.currentType=q,te.setCurrentType=te.setCurrentType.bind(te),te}return H(V,ae),V.prototype.getUi=function(){var $=this,q=document.createElement("div");q.style.display="flex",q.style.overflow="hidden",q.style.flexGrow="2";for(var se=function(re){var ie="both";switch(re){case 0:ie="both";break;case 1:ie="start";break;case 2:ie="end";break;case 3:ie="none"}var ee=document.createElement("div");if(ee.style.display="flex",ee.style.flexGrow="2",ee.style.alignItems="center",ee.style.justifyContent="space-between",ee.style.padding="5px",ee.style.borderWidth="2px",ee.style.borderStyle="solid",ee.style.borderColor=ie===te.currentType?te.uiStyleSettings.toolboxAccentColor:"transparent",ee.addEventListener("click",function(){$.setCurrentType(ie,ee)}),q.appendChild(ee),ie==="both"||ie==="start"){var de=document.createElement("div");de.style.display="flex",de.style.alignItems="center",de.style.minHeight="20px",de.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="`+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,de.style.marginLeft="5px",ee.appendChild(de)}var Ce=document.createElement("div");Ce.style.display="flex",Ce.style.alignItems="center",Ce.style.minHeight="20px",Ce.style.flexGrow="2";var Me=document.createElement("hr");if(Me.style.minWidth="20px",Me.style.border="0px",Me.style.borderTop="3px solid "+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee"),Me.style.flexGrow="2",Ce.appendChild(Me),ee.appendChild(Ce),ie==="both"||ie==="end"){var Ye=document.createElement("div");Ye.style.display="flex",Ye.style.alignItems="center",Ye.style.minHeight="20px",Ye.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="`+(te.uiStyleSettings!==void 0?te.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ye.style.marginRight="5px",ee.appendChild(Ye)}te.typeBoxes.push(ee)},te=this,oe=0;oe<4;oe++)se(oe);return q},V.prototype.setCurrentType=function($,q){var se=this;this.currentType=$,this.typeBoxes.forEach(function(te){te.style.borderColor=te===q?se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},V}(o),U=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.arrowType="end",te.arrowBaseHeight=10,te.arrowBaseWidth=10,te.getArrowPoints=te.getArrowPoints.bind(te),te.setArrowType=te.setArrowType.bind(te),te.arrowTypePanel=new g("Arrow type","end"),te.arrowTypePanel.onArrowTypeChanged=te.setArrowType,te}return H(V,ae),V.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.arrow1&&$!==this.arrow2)},V.prototype.getArrowPoints=function($,q){var se=this.arrowBaseWidth+2*this.strokeWidth,te=this.arrowBaseHeight+2*this.strokeWidth;return $-se/2+","+(q+te/2)+" "+$+","+(q-te/2)+" "+($+se/2)+","+(q+te/2)},V.prototype.createTips=function(){this.arrow1=_.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(_.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=_.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(_.createTransform()),this.visual.appendChild(this.arrow2)},V.prototype.pointerDown=function($,q){ae.prototype.pointerDown.call(this,$,q),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(ae.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",_.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),_.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var $=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($,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(q,0);var se=this.arrow2.transform.baseVal.getItem(0);se.setRotate($+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(se,0)}},V.prototype.setArrowType=function($){this.arrowType=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({arrowType:this.arrowType},ae.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var q=$;this.arrowType=q.arrowType,this.createTips(),this.adjustVisual()},V.typeName="ArrowMarker",V.title="Arrow marker",V.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',V}(d),P=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.fillColor=se.defaultFillColor,te.strokeWidth=0,te.fillPanel=new f("Color",se.defaultColorSet,se.defaultFillColor),te.fillPanel.onColorChanged=te.setFillColor,te}return H(V,ae),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=V.typeName,$},V.typeName="CoverMarker",V.title="Cover marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',V}(B),I=function(ae){function V($,q,se,te){var oe=ae.call(this,$,te||'<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 oe.opacities=[],oe.opacityBoxes=[],oe.opacities=q,oe.currentOpacity=se,oe.setCurrentOpacity=oe.setCurrentOpacity.bind(oe),oe}return H(V,ae),V.prototype.getUi=function(){var $=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(se){var te=document.createElement("div");te.style.display="flex",te.style.alignItems="center",te.style.justifyContent="center",te.style.padding="5px",te.style.borderWidth="2px",te.style.borderStyle="solid",te.style.borderColor=se===$.currentOpacity?$.uiStyleSettings.toolboxAccentColor:"transparent",te.addEventListener("click",function(){$.setCurrentOpacity(se,te)}),q.appendChild(te);var oe=document.createElement("div");oe.innerText=100*se+"%",te.appendChild(oe),$.opacityBoxes.push(te)}),q},V.prototype.setCurrentOpacity=function($,q){var se=this;this.currentOpacity=$,this.opacityBoxes.forEach(function(te){te.style.borderColor=te===q?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},V}(o),G=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.setOpacity=te.setOpacity.bind(te),te.fillColor=se.defaultHighlightColor,te.strokeWidth=0,te.opacity=se.defaultHighlightOpacity,te.fillPanel=new f("Color",se.defaultColorSet,te.fillColor),te.fillPanel.onColorChanged=te.setFillColor,te.opacityPanel=new I("Opacity",se.defaultOpacitySteps,te.opacity),te.opacityPanel.onOpacityChanged=te.setOpacity,te}return H(V,ae),V.prototype.setOpacity=function($){this.opacity=$,this.visual&&_.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=V.typeName,$},V.typeName="HighlightMarker",V.title="Highlight marker",V.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',V}(P),K='<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>',D=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.bgColor="transparent",te.tipPosition={x:0,y:0},te.tipBase1Position={x:0,y:0},te.tipBase2Position={x:0,y:0},te.tipMoving=!1,te.color=se.defaultStrokeColor,te.bgColor=se.defaultFillColor,te.fontFamily=se.defaultFontFamily,te.defaultSize={x:100,y:30},te.setBgColor=te.setBgColor.bind(te),te.getTipPoints=te.getTipPoints.bind(te),te.positionTip=te.positionTip.bind(te),te.setTipPoints=te.setTipPoints.bind(te),te.colorPanel=new f("Text color",se.defaultColorSet,te.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>'),te.colorPanel.onColorChanged=te.setColor,te.bgColorPanel=new f("Fill color",se.defaultColorSet,te.bgColor,K),te.bgColorPanel.onColorChanged=te.setBgColor,te.fontFamilyPanel=new m("Font",se.defaultFontFamilies,se.defaultFontFamily),te.fontFamilyPanel.onFontChanged=te.setFont,te.tipGrip=new i,te.tipGrip.visual.transform.baseVal.appendItem(_.createTransform()),te.controlBox.appendChild(te.tipGrip.visual),te}return H(V,ae),V.prototype.ownsTarget=function($){return ae.prototype.ownsTarget.call(this,$)||this.tipGrip.ownsTarget($)||this.tip===$},V.prototype.createTip=function(){_.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=_.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},V.prototype.pointerDown=function($,q){this.state==="new"&&ae.prototype.pointerDown.call(this,$,q),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(q)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ae.prototype.pointerDown.call(this,$,q)},V.prototype.pointerUp=function($){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ae.prototype.pointerUp.call(this,$);else{var q=this.state==="creating";ae.prototype.pointerUp.call(this,$),this.setTipPoints(q),this.positionTip()}},V.prototype.manipulate=function($){if(this.tipMoving){var q=this.unrotatePoint($);this.tipPosition={x:q.x-this.manipulationStartLeft,y:q.y-this.manipulationStartTop},this.positionTip()}else ae.prototype.manipulate.call(this,$)},V.prototype.setBgColor=function($){this.bgRectangle&&this.tip&&(_.setAttributes(this.bgRectangle,[["fill",$]]),_.setAttributes(this.tip,[["fill",$]])),this.bgColor=$,this.fillColorChanged($)},V.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},V.prototype.setTipPoints=function($){$===void 0&&($=!1);var q=Math.min(this.height/2,15),se=this.height/5;$&&(this.tipPosition={x:q+se/2,y:this.height+20});var te=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?te<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(se=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:q,y:0},this.tipBase2Position={x:q+se,y:0}):(this.tipBase1Position={x:0,y:q},this.tipBase2Position={x:0,y:q+se}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?te<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(se=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-q-se,y:0},this.tipBase2Position={x:this.width-q,y:0}):(this.tipBase1Position={x:this.width,y:q},this.tipBase2Position={x:this.width,y:q+se}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?te<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(se=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-q-se,y:this.height},this.tipBase2Position={x:this.width-q,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-q-se},this.tipBase2Position={x:this.width,y:this.height-q}):te<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(se=this.width/5,q=Math.min(this.width/2,15),this.tipBase1Position={x:q,y:this.height},this.tipBase2Position={x:q+se,y:this.height}):(this.tipBase1Position={x:0,y:this.height-q},this.tipBase2Position={x:0,y:this.height-q-se})},V.prototype.resize=function($){ae.prototype.resize.call(this,$),this.positionTip()},V.prototype.positionTip=function(){_.setAttributes(this.tip,[["points",this.getTipPoints()]]);var $=this.tipGrip.visual.transform.baseVal.getItem(0);$.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem($,0)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.select=function(){this.positionTip(),ae.prototype.select.call(this)},V.prototype.getState=function(){var $=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ae.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){var q=$;this.bgColor=q.bgColor,this.tipPosition=q.tipPosition,ae.prototype.restoreState.call(this,$),this.createTip(),this.setTipPoints()},V.prototype.scale=function($,q){ae.prototype.scale.call(this,$,q),this.tipPosition={x:this.tipPosition.x*$,y:this.tipPosition.y*q},this.positionTip()},V.typeName="CalloutMarker",V.title="Callout marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',V}(T),J=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.fillColor="transparent",te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.opacity=1,te.strokeColor=se.defaultColor,te.strokeWidth=se.defaultStrokeWidth,te.strokeDasharray=se.defaultStrokeDasharray,te.fillColor=se.defaultFillColor,te.setStrokeColor=te.setStrokeColor.bind(te),te.setFillColor=te.setFillColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.setOpacity=te.setOpacity.bind(te),te.createVisual=te.createVisual.bind(te),te.strokePanel=new f("Line color",M(se.defaultColorSet,["transparent"]),se.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.fillPanel=new f("Fill color",M(se.defaultColorSet,["transparent"]),te.fillColor,K),te.fillPanel.onColorChanged=te.setFillColor,te.strokeWidthPanel=new C("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new L("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te.opacityPanel=new I("Opacity",se.defaultOpacitySteps,te.opacity),te.opacityPanel.onOpacityChanged=te.setOpacity,te}return H(V,ae),V.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual)},V.prototype.createVisual=function(){this.visual=_.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function($,q){ae.prototype.pointerDown.call(this,$,q),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},V.prototype.manipulate=function($){ae.prototype.manipulate.call(this,$)},V.prototype.resize=function($){ae.prototype.resize.call(this,$),this.setSize()},V.prototype.setSize=function(){ae.prototype.setSize.call(this),_.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},V.prototype.pointerUp=function($){ae.prototype.pointerUp.call(this,$),this.setSize()},V.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&_.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},V.prototype.setFillColor=function($){this.fillColor=$,this.visual&&_.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged($),this.stateChanged()},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&_.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&_.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.setOpacity=function($){this.opacity=$,this.visual&&_.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ae.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){var q=$;this.fillColor=q.fillColor,this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.opacity=q.opacity,this.createVisual(),ae.prototype.restoreState.call(this,$),this.setSize()},V.prototype.scale=function($,q){ae.prototype.scale.call(this,$,q),this.setSize()},V.typeName="EllipseMarker",V.title="Ellipse marker",V.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',V}(v),X=function(ae){function V($,q,se){return ae.call(this,$,q,se)||this}return H(V,ae),Object.defineProperty(V.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.tip1&&$!==this.tip2)},V.prototype.createTips=function(){this.tip1=_.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(_.createTransform()),this.visual.appendChild(this.tip1),this.tip2=_.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(_.createTransform()),this.visual.appendChild(this.tip2)},V.prototype.pointerDown=function($,q){ae.prototype.pointerDown.call(this,$,q),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(ae.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(_.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()]]),_.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 $=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($,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(q,0);var se=this.tip2.transform.baseVal.getItem(0);se.setRotate($+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(se,0)}},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=V.typeName,$},V.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$),this.createTips(),this.adjustVisual()},V.typeName="MeasurementMarker",V.title="Measurement marker",V.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',V}(d),ne=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.strokePanel.colors=se.defaultColorSet,te.fillColor="transparent",te}return H(V,ae),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=ae.prototype.getState.call(this);return $.typeName=V.typeName,$},V.typeName="EllipseFrameMarker",V.title="Ellipse frame marker",V.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',V}(J),ue=function(){function ae(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ae.prototype.addUndoStep=function(V){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(V)||(this.undoStack.push(V),JSON.stringify(this.lastRedoStep)!==JSON.stringify(V)&&this.redoStack.splice(0,this.redoStack.length))},ae.prototype.replaceLastUndoStep=function(V){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=V)},ae.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ae.prototype.undo=function(){if(this.undoStack.length>1){var V=this.undoStack.pop();return V!==void 0&&this.redoStack.push(V),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ae.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ae}(),Oe=function(ae){function V($,q,se){var te=ae.call(this,$,q,se)||this;return te.strokeColor="transparent",te.strokeWidth=0,te.strokeDasharray="",te.curveX=0,te.curveY=0,te.manipulationStartCurveX=0,te.manipulationStartCurveY=0,te.setStrokeColor=te.setStrokeColor.bind(te),te.setStrokeWidth=te.setStrokeWidth.bind(te),te.setStrokeDasharray=te.setStrokeDasharray.bind(te),te.positionGrips=te.positionGrips.bind(te),te.addControlGrips=te.addControlGrips.bind(te),te.adjustVisual=te.adjustVisual.bind(te),te.setupControlBox=te.setupControlBox.bind(te),te.resize=te.resize.bind(te),te.strokeColor=se.defaultColor,te.strokeWidth=se.defaultStrokeWidth,te.strokeDasharray=se.defaultStrokeDasharray,te.strokePanel=new f("Line color",se.defaultColorSet,se.defaultColor),te.strokePanel.onColorChanged=te.setStrokeColor,te.strokeWidthPanel=new C("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),te.strokeWidthPanel.onWidthChanged=te.setStrokeWidth,te.strokeStylePanel=new L("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),te.strokeStylePanel.onStyleChanged=te.setStrokeDasharray,te}return H(V,ae),V.prototype.ownsTarget=function($){return!(!ae.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorCurve&&$!==this.visibleCurve&&!this.curveGrip.ownsTarget($))},V.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},V.prototype.createVisual=function(){this.visual=_.createGroup(),this.selectorCurve=_.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=_.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function($,q){ae.prototype.pointerDown.call(this,$,q),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=$.x,this.curveY=$.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(q)&&(this.activeGrip=this.curveGrip,this._state="resize")},V.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),_.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),_.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),_.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setupControlBox=function(){ae.prototype.setupControlBox.call(this),this.curveControlLine1=_.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=_.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},V.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ae.prototype.addControlGrips.call(this)},V.prototype.positionGrips=function(){ae.prototype.positionGrips.call(this);var $=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-$/2,this.curveY-$/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},V.prototype.manipulate=function($){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+$.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+$.y-this.manipulationStartY),ae.prototype.manipulate.call(this,$)},V.prototype.resize=function($){this.activeGrip===this.curveGrip&&(this.curveX=$.x,this.curveY=$.y),ae.prototype.resize.call(this,$),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},V.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual()},V.prototype.scale=function($,q){this.curveX=this.curveX*$,this.curveY=this.curveY*q,ae.prototype.scale.call(this,$,q)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ae.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){ae.prototype.restoreState.call(this,$);var q=$;this.strokeColor=q.strokeColor,this.strokeWidth=q.strokeWidth,this.strokeDasharray=q.strokeDasharray,this.curveX=q.curveX,this.curveY=q.curveY,this.createVisual(),this.adjustVisual()},V.typeName="CurveMarker",V.title="Curve marker",V.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',V}(n),_e=function(){function ae(V,$){$===void 0&&($=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=V,this.cancelable=$}return Object.defineProperty(ae.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ae.prototype.preventDefault=function(){this._defaultPrevented=!0},ae}(),De=function(ae){function V($,q,se){var te=ae.call(this,$,!1)||this;return te.dataUrl=q,te.state=se,te}return H(V,ae),V}(_e),Ue=function(ae){function V($,q,se){se===void 0&&(se=!1);var te=ae.call(this,$,se)||this;return te.marker=q,te}return H(V,ae),V}(_e),Ke=function(){function ae(){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 ae.prototype.addEventListener=function(V,$){this[V].push($)},ae.prototype.removeEventListener=function(V,$){var q=this[V].indexOf($);q>-1&&this[V].splice(q,1)},ae}(),Le=function(){function ae(V){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new p,this._isOpen=!1,this.undoRedoManager=new ue,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 Ke,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ae.instanceCounter++,this.styles=new E(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=V,this.targetRoot=document.body,this.width=V.clientWidth,this.height=V.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(ae.prototype,"ALL_MARKER_TYPES",{get:function(){return[w,y,U,T,ne,J,G,D,X,P,d,Oe]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[w,y,U,T,J,G,D]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"BASIC_MARKER_TYPES",{get:function(){return[w,y,U,T,G]},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(V){var $=this;this._availableMarkerTypes.splice(0),V.forEach(function(q){if(typeof q=="string"){var se=$.ALL_MARKER_TYPES.find(function(te){return te.typeName===q});se!==void 0&&$._availableMarkerTypes.push(se)}else $._availableMarkerTypes.push(q)})},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(V){this._zoomLevel=V,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ae.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),R.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ae.prototype.show=function(){var V=this;this.styles.styleSheetRoot===void 0&&t.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=t.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function($){return $(new _e(V))})},ae.prototype.render=function(){return O(this,void 0,void 0,function(){var V;return Q(this,function($){switch($.label){case 0:return this.setCurrentMarker(),(V=new b).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.markersOnly=this.renderMarkersOnly,V.width=this.renderWidth,V.height=this.renderHeight,[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return $.sent(),[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,$.sent()]}})})},ae.prototype.close=function(V){var $=this;if(V===void 0&&(V=!1),this.isOpen){var q=!1;V||this.eventListeners.beforeclose.forEach(function(se){var te=new _e($,!0);se(te),te.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(se){return se(new _e($))}),this.detachEvents(),this._isOpen=!1)}},ae.prototype.addMarkersToToolbar=function(){for(var V,$=[],q=0;q<arguments.length;q++)$[q]=arguments[q];(V=this._availableMarkerTypes).push.apply(V,$)},ae.prototype.addRenderEventListener=function(V){this.addEventListener("render",function($){V($.dataUrl,$.state)})},ae.prototype.removeRenderEventListener=function(V){},ae.prototype.addCloseEventListener=function(V){this.addEventListener("close",function(){V()})},ae.prototype.removeCloseEventListener=function(V){},ae.prototype.setupResizeObserver=function(){var V=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return V.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ae.prototype.onPopupTargetResize=function(){var V=1*this.target.clientWidth/this.target.clientHeight,$=this.editorCanvas.clientWidth/V>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*V:this.editorCanvas.clientWidth,q=$<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/V;this.resize($,q)},ae.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ae.prototype.resize=function(V,$){this._isResizing=!0;var q=V/this.imageWidth,se=$/this.imageHeight;this.imageWidth=Math.round(V),this.imageHeight=Math.round($),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,se),this._isResizing=!1},ae.prototype.scaleMarkers=function(V,$){var q,se=this;this._currentMarker&&this._currentMarker instanceof T?this._currentMarker.scale(V,$):(q=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(te){te!==se._currentMarker&&te.scale(V,$)}),q!==void 0&&this.setCurrentMarker(q)},ae.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"},ae.prototype.setTopLeft=function(){var V=this.editingTarget.getBoundingClientRect(),$=this.editorCanvas.getBoundingClientRect();this.left=V.left-$.left,this.top=V.top-$.top},ae.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)},ae.prototype.addDefs=function(){for(var V,$=[],q=0;q<arguments.length;q++)$[q]=arguments[q];this.defs=_.createDefs(),this.addDefsToImage(),(V=this.defs).append.apply(V,$)},ae.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ae.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)},ae.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ae.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ae.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)},ae.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ae.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)},ae.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var V=document.createElement("a");V.href="https://markerjs.com/",V.target="_blank",V.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',V.title="Powered by marker.js",V.style.display="grid",V.style.alignItems="center",V.style.justifyItems="center",V.style.padding="3px",V.style.width="20px",V.style.height="20px",this.logoUI.appendChild(V),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ae.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")},ae.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"},ae.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ae.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 V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"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 h(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 s(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ae.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ae.prototype.removeMarker=function(V){this.markerImage.removeChild(V.container),this.markers.indexOf(V)>-1&&this.markers.splice(this.markers.indexOf(V),1),V.dispose()},ae.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())},ae.prototype.toolbarButtonClicked=function(V,$){if(V==="marker"&&$!==void 0)this.createNewMarker($);else if(V==="action")switch($){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()}},ae.prototype.deleteSelectedMarker=function(){var V=this;if(this._currentMarker!==void 0){var $=!1;if(this.eventListeners.markerbeforedelete.forEach(function(se){var te=new Ue(V,V._currentMarker,!0);se(te),te.defaultPrevented&&($=!0)}),!$){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(se){return se(new Ue(V,q))})}}},ae.prototype.clear=function(){var V=this,$=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(oe){var re=new Ue(V,void 0,!0);oe(re),re.defaultPrevented&&($=!0)}),!$)){this.setCurrentMarker();for(var q=function(oe){var re=se.markers[oe];se.setCurrentMarker(se.markers[oe]),se._currentMarker.dispose(),se.markerImage.removeChild(se._currentMarker.container),se.markers.splice(se.markers.indexOf(se._currentMarker),1),se.eventListeners.markerdelete.forEach(function(ie){return ie(new Ue(V,re))})},se=this,te=this.markers.length-1;te>=0;te--)q(te);this.addUndoStep()}},Object.defineProperty(ae.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ae.prototype.showNotesEditor=function(){var V;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(V=this._currentMarker.notes)!==null&&V!==void 0?V:"",this.overlayContainer.appendChild(this.notesArea))},ae.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)},ae.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ae.prototype.addUndoStep=function(){var V=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var $=this.getState(),q=this.undoRedoManager.getLastUndoStep();if(!q||q.width===$.width&&q.height===$.height){var se=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep($),se<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(te){return te(new _e(V))})}else this.undoRedoManager.replaceLastUndoStep($),this.eventListeners.statechange.forEach(function(te){return te(new _e(V))})}},ae.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ae.prototype.undoStep=function(){var V=this,$=this.undoRedoManager.undo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(q){return q(new _e(V))}))},ae.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ae.prototype.redoStep=function(){var V=this,$=this.undoRedoManager.redo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(q){return q(new _e(V))}))},ae.prototype.stepZoom=function(){var V=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=V<this.zoomSteps.length-1?this.zoomSteps[V+1]:this.zoomSteps[0]},ae.prototype.panTo=function(V){this.contentDiv.scrollBy({left:this.prevPanPoint.x-V.x,top:this.prevPanPoint.y-V.y}),this.prevPanPoint=V},ae.prototype.startRenderAndClose=function(){return O(this,void 0,void 0,function(){var V,$,q=this;return Q(this,function(se){switch(se.label){case 0:return[4,this.render()];case 1:return V=se.sent(),$=this.getState(),this.eventListeners.render.forEach(function(te){return te(new De(q,V,$))}),this.close(!0),[2]}})})},ae.prototype.getState=function(V){V===!0&&this.setCurrentMarker();var $={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(q){return $.markers.push(q.getState())}),$},ae.prototype.restoreState=function(V){var $=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);V.markers.forEach(function(q){var se=$._availableMarkerTypes.find(function(oe){return oe.typeName===q.typeName});if(se!==void 0){var te=$.addNewMarker(se);te.restoreState(q),$.markers.push(te)}}),V.width&&V.height&&(V.width!==this.imageWidth||V.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/V.width,this.imageHeight/V.height),this.eventListeners.restorestate.forEach(function(q){return q(new _e($))})},ae.prototype.addNewMarker=function(V){var $=_.createGroup();return this.markerImage.appendChild($),new V($,this.overlayContainer,this.settings)},ae.prototype.createNewMarker=function(V){var $,q=this;($=typeof V=="string"?this._availableMarkerTypes.find(function(se){return se.typeName===V}):V)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker($),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($.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(se){return se(new Ue(q,q._currentMarker))}))},ae.prototype.markerCreated=function(V){var $=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(V),this.setCurrentMarker(V),V instanceof y&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(y):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(q){return q(new Ue($,$._currentMarker))})},ae.prototype.colorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=V,this.settings.defaultStrokeColor=V)},ae.prototype.fillColorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=V)},ae.prototype.markerStateChanged=function(V){var $=this;this.eventListeners.markerchange.forEach(function(q){return q(new Ue($,V))})},ae.prototype.setCurrentMarker=function(V){var $=this;this._currentMarker!==V&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(q){return q(new Ue($,$._currentMarker))})),this._currentMarker=V,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(q){return q(new Ue($,$._currentMarker))}))},ae.prototype.onPointerDown=function(V){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||V.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var $=this.markers.find(function(q){return q.ownsTarget(V.target)});$!==void 0?(this.setCurrentMarker($),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(V.clientX,V.clientY),V.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:V.clientX,y:V.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(V.clientX,V.clientY))},ae.prototype.onDblClick=function(V){if(this._isFocused||this.focus(),this.mode==="select"){var $=this.markers.find(function(q){return q.ownsTarget(V.target)});$!==void 0&&$!==this._currentMarker&&this.setCurrentMarker($),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(V.clientX,V.clientY),V.target):this.setCurrentMarker()}},ae.prototype.onPointerMove=function(V){this.touchPoints!==1&&V.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||V.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(V.clientX,V.clientY)):this.zoomLevel>1&&this.panTo({x:V.clientX,y:V.clientY}))},ae.prototype.onPointerUp=function(V){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(V.clientX,V.clientY)),this.isDragging=!1,this.addUndoStep()},ae.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ae.prototype.onKeyUp=function(V){this._currentMarker===void 0||this.notesArea!==void 0||V.key!=="Delete"&&V.key!=="Backspace"||this.deleteSelectedMarker()},ae.prototype.clientToLocalCoordinates=function(V,$){var q=this.markerImage.getBoundingClientRect();return{x:(V-q.left)/this.zoomLevel,y:($-q.top)/this.zoomLevel}},ae.prototype.onWindowResize=function(){this.positionUI()},ae.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},ae.prototype.addLicenseKey=function(V){R.addKey(V)},ae.prototype.addEventListener=function(V,$){this.eventListeners.addEventListener(V,$)},ae.prototype.removeEventListener=function(V,$){this.eventListeners.removeEventListener(V,$)},ae.prototype.renderState=function(V){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(V),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ae.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ae.prototype.focus=function(){var V=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function($){return $(new _e(V))}))},ae.prototype.blur=function(){var V=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function($){return $(new _e(V))}))},ae.instanceCounter=0,ae}()},SUKs:function(Ve,Ae,N){var Z=N("LPTA"),H=Z.debugMode,O=function(){};H===1&&(O=console.error);var Q=O;Ve.exports=Q},Sj9i:function(Ve,Ae,N){var Z=N("QBsz"),H=Z.create,O=Z.distSquare,Q=Math.pow,M=Math.sqrt,_=1e-8,R=1e-4,b=M(3),t=1/3,E=H(),a=H(),A=H();function h(n){return n>-_&&n<_}function s(n){return n>_||n<-_}function o(n,d,m,T,y){var g=1-y;return g*g*(g*n+3*y*d)+y*y*(y*T+3*g*m)}function f(n,d,m,T,y){var g=1-y;return 3*(((d-n)*g+2*(m-d)*y)*g+(T-m)*y*y)}function u(n,d,m,T,y,g){var U=T+3*(d-m)-n,P=3*(m-d*2+n),I=3*(d-n),G=n-y,K=P*P-3*U*I,D=P*I-9*U*G,J=I*I-3*P*G,X=0;if(h(K)&&h(D))if(h(P))g[0]=0;else{var ne=-I/P;ne>=0&&ne<=1&&(g[X++]=ne)}else{var ue=D*D-4*K*J;if(h(ue)){var Oe=D/K,ne=-P/U+Oe,_e=-Oe/2;ne>=0&&ne<=1&&(g[X++]=ne),_e>=0&&_e<=1&&(g[X++]=_e)}else if(ue>0){var De=M(ue),Ue=K*P+1.5*U*(-D+De),Ke=K*P+1.5*U*(-D-De);Ue<0?Ue=-Q(-Ue,t):Ue=Q(Ue,t),Ke<0?Ke=-Q(-Ke,t):Ke=Q(Ke,t);var ne=(-P-(Ue+Ke))/(3*U);ne>=0&&ne<=1&&(g[X++]=ne)}else{var Le=(2*K*P-3*U*D)/(2*M(K*K*K)),ae=Math.acos(Le)/3,V=M(K),$=Math.cos(ae),ne=(-P-2*V*$)/(3*U),_e=(-P+V*($+b*Math.sin(ae)))/(3*U),q=(-P+V*($-b*Math.sin(ae)))/(3*U);ne>=0&&ne<=1&&(g[X++]=ne),_e>=0&&_e<=1&&(g[X++]=_e),q>=0&&q<=1&&(g[X++]=q)}}return X}function c(n,d,m,T,y){var g=6*m-12*d+6*n,U=9*d+3*T-3*n-9*m,P=3*d-3*n,I=0;if(h(U)){if(s(g)){var G=-P/g;G>=0&&G<=1&&(y[I++]=G)}}else{var K=g*g-4*U*P;if(h(K))y[0]=-g/(2*U);else if(K>0){var D=M(K),G=(-g+D)/(2*U),J=(-g-D)/(2*U);G>=0&&G<=1&&(y[I++]=G),J>=0&&J<=1&&(y[I++]=J)}}return I}function i(n,d,m,T,y,g){var U=(d-n)*y+n,P=(m-d)*y+d,I=(T-m)*y+m,G=(P-U)*y+U,K=(I-P)*y+P,D=(K-G)*y+G;g[0]=n,g[1]=U,g[2]=G,g[3]=D,g[4]=D,g[5]=K,g[6]=I,g[7]=T}function l(n,d,m,T,y,g,U,P,I,G,K){var D,J=.005,X=Infinity,ne,ue,Oe,_e;E[0]=I,E[1]=G;for(var De=0;De<1;De+=.05)a[0]=o(n,m,y,U,De),a[1]=o(d,T,g,P,De),Oe=O(E,a),Oe<X&&(D=De,X=Oe);X=Infinity;for(var Ue=0;Ue<32&&!(J<R);Ue++)ne=D-J,ue=D+J,a[0]=o(n,m,y,U,ne),a[1]=o(d,T,g,P,ne),Oe=O(a,E),ne>=0&&Oe<X?(D=ne,X=Oe):(A[0]=o(n,m,y,U,ue),A[1]=o(d,T,g,P,ue),_e=O(A,E),ue<=1&&_e<X?(D=ue,X=_e):J*=.5);return K&&(K[0]=o(n,m,y,U,D),K[1]=o(d,T,g,P,D)),M(X)}function v(n,d,m,T){var y=1-T;return y*(y*n+2*T*d)+T*T*m}function B(n,d,m,T){return 2*((1-T)*(d-n)+T*(m-d))}function C(n,d,m,T,y){var g=n-2*d+m,U=2*(d-n),P=n-T,I=0;if(h(g)){if(s(U)){var G=-P/U;G>=0&&G<=1&&(y[I++]=G)}}else{var K=U*U-4*g*P;if(h(K)){var G=-U/(2*g);G>=0&&G<=1&&(y[I++]=G)}else if(K>0){var D=M(K),G=(-U+D)/(2*g),J=(-U-D)/(2*g);G>=0&&G<=1&&(y[I++]=G),J>=0&&J<=1&&(y[I++]=J)}}return I}function L(n,d,m){var T=n+m-2*d;return T===0?.5:(n-d)/T}function w(n,d,m,T,y){var g=(d-n)*T+n,U=(m-d)*T+d,P=(U-g)*T+g;y[0]=n,y[1]=g,y[2]=P,y[3]=P,y[4]=U,y[5]=m}function p(n,d,m,T,y,g,U,P,I){var G,K=.005,D=Infinity;E[0]=U,E[1]=P;for(var J=0;J<1;J+=.05){a[0]=v(n,m,y,J),a[1]=v(d,T,g,J);var X=O(E,a);X<D&&(G=J,D=X)}D=Infinity;for(var ne=0;ne<32&&!(K<R);ne++){var ue=G-K,Oe=G+K;a[0]=v(n,m,y,ue),a[1]=v(d,T,g,ue);var X=O(a,E);if(ue>=0&&X<D)G=ue,D=X;else{A[0]=v(n,m,y,Oe),A[1]=v(d,T,g,Oe);var _e=O(A,E);Oe<=1&&_e<D?(G=Oe,D=_e):K*=.5}}return I&&(I[0]=v(n,m,y,G),I[1]=v(d,T,g,G)),M(D)}Ae.cubicAt=o,Ae.cubicDerivativeAt=f,Ae.cubicRootAt=u,Ae.cubicExtrema=c,Ae.cubicSubdivide=i,Ae.cubicProjectPoint=l,Ae.quadraticAt=v,Ae.quadraticDerivativeAt=B,Ae.quadraticRootAt=C,Ae.quadraticExtremum=L,Ae.quadraticSubdivide=w,Ae.quadraticProjectPoint=p},SqI9:function(Ve,Ae,N){var Z=N("y+Vt"),H=N("iXp4"),O=Z.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:H(Z.prototype.brush),buildPath:function(Q,M){var _=M.cx,R=M.cy,b=Math.max(M.r0||0,0),t=Math.max(M.r,0),E=M.startAngle,a=M.endAngle,A=M.clockwise,h=Math.cos(E),s=Math.sin(E);Q.moveTo(h*b+_,s*b+R),Q.lineTo(h*t+_,s*t+R),Q.arc(_,R,t,E,a,!A),Q.lineTo(Math.cos(a)*b+_,Math.sin(a)*b+R),b!==0&&Q.arc(_,R,b,a,E,A),Q.closePath()}});Ve.exports=O},SrGk:function(Ve,Ae,N){var Z=N("hydK"),H=Z.createElement,O=N("bYtY"),Q=N("y+Vt"),M=N("Dagg"),_=N("dqUG"),R=N("P47w"),b=R.path,t=R.image,E=R.text,a="0",A="1";function h(o,f,u,c,i){this._zrId=o,this._svgRoot=f,this._tagNames=typeof u=="string"?[u]:u,this._markLabel=c,this._domName=i||"_dom",this.nextId=0}h.prototype.createElement=H,h.prototype.getDefs=function(o){var f=this._svgRoot,u=this._svgRoot.getElementsByTagName("defs");return u.length===0?o?(u=f.insertBefore(this.createElement("defs"),f.firstChild),u.contains||(u.contains=function(c){var i=u.children;if(!i)return!1;for(var l=i.length-1;l>=0;--l)if(i[l]===c)return!0;return!1}),u):null:u[0]},h.prototype.update=function(o,f){if(!o)return;var u=this.getDefs(!1);if(o[this._domName]&&u.contains(o[this._domName]))typeof f=="function"&&f(o);else{var c=this.add(o);c&&(o[this._domName]=c)}},h.prototype.addDom=function(o){var f=this.getDefs(!0);f.appendChild(o)},h.prototype.removeDom=function(o){var f=this.getDefs(!1);f&&o[this._domName]&&(f.removeChild(o[this._domName]),o[this._domName]=null)},h.prototype.getDoms=function(){var o=this.getDefs(!1);if(!o)return[];var f=[];return O.each(this._tagNames,function(u){var c=o.getElementsByTagName(u);f=f.concat([].slice.call(c))}),f},h.prototype.markAllUnused=function(){var o=this.getDoms(),f=this;O.each(o,function(u){u[f._markLabel]=a})},h.prototype.markUsed=function(o){o&&(o[this._markLabel]=A)},h.prototype.removeUnused=function(){var o=this.getDefs(!1);if(!o)return;var f=this.getDoms(),u=this;O.each(f,function(c){c[u._markLabel]!==A&&o.removeChild(c)})},h.prototype.getSvgProxy=function(o){return o instanceof Q?b:o instanceof M?t:o instanceof _?E:b},h.prototype.getTextSvgElement=function(o){return o.__textSvgEl},h.prototype.getSvgElement=function(o){return o.__svgEl};var s=h;Ve.exports=s},T6xi:function(Ve,Ae,N){var Z=N("YgsL"),H=N("nCxF");function O(Q,M,_){var R=M.points,b=M.smooth;if(R&&R.length>=2){if(b&&b!=="spline"){var t=H(R,b,_,M.smoothConstraint);Q.moveTo(R[0][0],R[0][1]);for(var E=R.length,a=0;a<(_?E:E-1);a++){var A=t[a*2],h=t[a*2+1],s=R[(a+1)%E];Q.bezierCurveTo(A[0],A[1],h[0],h[1],s[0],s[1])}}else{b==="spline"&&(R=Z(R,_)),Q.moveTo(R[0][0],R[0][1]);for(var a=1,o=R.length;a<o;a++)Q.lineTo(R[a][0],R[a][1])}_&&Q.closePath()}}Ae.buildPath=O},T8No:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return R}),N.d(Ae,"e",function(){return b}),N.d(Ae,"c",function(){return d}),N.d(Ae,"b",function(){return m}),N.d(Ae,"d",function(){return T}),N.d(Ae,"f",function(){return U});var Z=N("MNsG"),H=N("N0LK"),O=N("Cg/j");let Q=Z.k||"";const M=new Map;M.set("false",!1),M.set("true",!0),M.set("isMac",Z.f),M.set("isLinux",Z.d),M.set("isWindows",Z.i),M.set("isWeb",Z.h),M.set("isMacNative",Z.f&&!Z.h),M.set("isEdge",Q.indexOf("Edg/")>=0),M.set("isFirefox",Q.indexOf("Firefox")>=0),M.set("isChrome",Q.indexOf("Chrome")>=0),M.set("isSafari",Q.indexOf("Safari")>=0);const _=Object.prototype.hasOwnProperty;class R{static has(I){return A.create(I)}static equals(I,G){return h.create(I,G)}static regex(I,G){return C.create(I,G)}static not(I){return u.create(I)}static and(...I){return p.create(I,null)}static or(...I){return n.create(I,null,!0)}static deserialize(I,G=!1){return I?this._deserializeOrExpression(I,G):void 0}static _deserializeOrExpression(I,G){let K=I.split("||");return n.create(K.map(D=>this._deserializeAndExpression(D,G)),null,!0)}static _deserializeAndExpression(I,G){let K=I.split("&&");return p.create(K.map(D=>this._deserializeOne(D,G)),null)}static _deserializeOne(I,G){if(I=I.trim(),I.indexOf("!=")>=0){let K=I.split("!=");return f.create(K[0].trim(),this._deserializeValue(K[1],G))}if(I.indexOf("==")>=0){let K=I.split("==");return h.create(K[0].trim(),this._deserializeValue(K[1],G))}if(I.indexOf("=~")>=0){let K=I.split("=~");return C.create(K[0].trim(),this._deserializeRegexValue(K[1],G))}if(I.indexOf(" in ")>=0){let K=I.split(" in ");return s.create(K[0].trim(),K[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(I)){const K=I.split(">=");return l.create(K[0].trim(),K[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(I)){const K=I.split(">");return i.create(K[0].trim(),K[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(I)){const K=I.split("<=");return B.create(K[0].trim(),K[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(I)){const K=I.split("<");return v.create(K[0].trim(),K[1].trim())}return/^\!\s*/.test(I)?u.create(I.substr(1).trim()):A.create(I)}static _deserializeValue(I,G){if(I=I.trim(),I==="true")return!0;if(I==="false")return!1;let K=/^'([^']*)'$/.exec(I);return K?K[1].trim():I}static _deserializeRegexValue(I,G){if(Object(H.C)(I)){if(G)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let K=I.indexOf("/"),D=I.lastIndexOf("/");if(K===D||K<0){if(G)throw new Error(`bad regexp-value '${I}', missing /-enclosure`);return console.warn(`bad regexp-value '${I}', missing /-enclosure`),null}let J=I.slice(K+1,D),X=I[D+1]==="i"?"i":"";try{return new RegExp(J,X)}catch(ne){if(G)throw new Error(`bad regexp-value '${I}', parse error: ${ne}`);return console.warn(`bad regexp-value '${I}', parse error: ${ne}`),null}}}function b(I,G){const K=I?I.substituteConstants():void 0,D=G?G.substituteConstants():void 0;return!K&&!D?!0:!K||!D?!1:K.equals(D)}function t(I,G){return I.cmp(G)}class E{constructor(){this.type=0}cmp(I){return this.type-I.type}equals(I){return I.type===this.type}substituteConstants(){return this}evaluate(I){return!1}serialize(){return"false"}keys(){return[]}negate(){return a.INSTANCE}}E.INSTANCE=new E;class a{constructor(){this.type=1}cmp(I){return this.type-I.type}equals(I){return I.type===this.type}substituteConstants(){return this}evaluate(I){return!0}serialize(){return"true"}keys(){return[]}negate(){return E.INSTANCE}}a.INSTANCE=new a;class A{constructor(I,G){this.key=I,this.negated=G,this.type=2}static create(I,G=null){const K=M.get(I);return typeof K=="boolean"?K?a.INSTANCE:E.INSTANCE:new A(I,G)}cmp(I){return I.type!==this.type?this.type-I.type:y(this.key,I.key)}equals(I){return I.type===this.type?this.key===I.key:!1}substituteConstants(){const I=M.get(this.key);return typeof I=="boolean"?I?a.INSTANCE:E.INSTANCE:this}evaluate(I){return!!I.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this)),this.negated}}class h{constructor(I,G,K){this.key=I,this.value=G,this.negated=K,this.type=4}static create(I,G,K=null){if(typeof G=="boolean")return G?A.create(I,K):u.create(I,K);const D=M.get(I);if(typeof D=="boolean"){const J=D?"true":"false";return G===J?a.INSTANCE:E.INSTANCE}return new h(I,G,K)}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){const I=M.get(this.key);if(typeof I=="boolean"){const G=I?"true":"false";return this.value===G?a.INSTANCE:E.INSTANCE}return this}evaluate(I){return I.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class s{constructor(I,G){this.key=I,this.valueKey=G,this.type=10,this.negated=null}static create(I,G){return new s(I,G)}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.valueKey,I.key,I.valueKey)}equals(I){return I.type===this.type?this.key===I.key&&this.valueKey===I.valueKey:!1}substituteConstants(){return this}evaluate(I){const G=I.getValue(this.valueKey),K=I.getValue(this.key);return Array.isArray(G)?G.indexOf(K)>=0:typeof K=="string"&&typeof G=="object"&&G!==null?_.call(G,K):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=o.create(this)),this.negated}}class o{constructor(I){this._actual=I,this.type=11}static create(I){return new o(I)}cmp(I){return I.type!==this.type?this.type-I.type:this._actual.cmp(I._actual)}equals(I){return I.type===this.type?this._actual.equals(I._actual):!1}substituteConstants(){return this}evaluate(I){return!this._actual.evaluate(I)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class f{constructor(I,G,K){this.key=I,this.value=G,this.negated=K,this.type=5}static create(I,G,K=null){if(typeof G=="boolean")return G?u.create(I,K):A.create(I,K);const D=M.get(I);if(typeof D=="boolean"){const J=D?"true":"false";return G===J?E.INSTANCE:a.INSTANCE}return new f(I,G,K)}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){const I=M.get(this.key);if(typeof I=="boolean"){const G=I?"true":"false";return this.value===G?E.INSTANCE:a.INSTANCE}return this}evaluate(I){return I.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this.value,this)),this.negated}}class u{constructor(I,G){this.key=I,this.negated=G,this.type=3}static create(I,G=null){const K=M.get(I);return typeof K=="boolean"?K?E.INSTANCE:a.INSTANCE:new u(I,G)}cmp(I){return I.type!==this.type?this.type-I.type:y(this.key,I.key)}equals(I){return I.type===this.type?this.key===I.key:!1}substituteConstants(){const I=M.get(this.key);return typeof I=="boolean"?I?E.INSTANCE:a.INSTANCE:this}evaluate(I){return!I.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this)),this.negated}}function c(I,G){if(typeof I=="string"){const K=parseFloat(I);isNaN(K)||(I=K)}return typeof I=="string"||typeof I=="number"?G(I):E.INSTANCE}class i{constructor(I,G,K){this.key=I,this.value=G,this.negated=K,this.type=12}static create(I,G,K=null){return c(G,D=>new i(I,D,K))}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){return this}evaluate(I){return typeof this.value=="string"?!1:parseFloat(I.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this.key,this.value,this)),this.negated}}class l{constructor(I,G,K){this.key=I,this.value=G,this.negated=K,this.type=13}static create(I,G,K=null){return c(G,D=>new l(I,D,K))}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){return this}evaluate(I){return typeof this.value=="string"?!1:parseFloat(I.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this.value,this)),this.negated}}class v{constructor(I,G,K){this.key=I,this.value=G,this.negated=K,this.type=14}static create(I,G,K=null){return c(G,D=>new v(I,D,K))}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){return this}evaluate(I){return typeof this.value=="string"?!1:parseFloat(I.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this.value,this)),this.negated}}class B{constructor(I,G,K){this.key=I,this.value=G,this.negated=K,this.type=15}static create(I,G,K=null){return c(G,D=>new B(I,D,K))}cmp(I){return I.type!==this.type?this.type-I.type:g(this.key,this.value,I.key,I.value)}equals(I){return I.type===this.type?this.key===I.key&&this.value===I.value:!1}substituteConstants(){return this}evaluate(I){return typeof this.value=="string"?!1:parseFloat(I.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=i.create(this.key,this.value,this)),this.negated}}class C{constructor(I,G){this.key=I,this.regexp=G,this.type=7,this.negated=null}static create(I,G){return new C(I,G)}cmp(I){if(I.type!==this.type)return this.type-I.type;if(this.key<I.key)return-1;if(this.key>I.key)return 1;const G=this.regexp?this.regexp.source:"",K=I.regexp?I.regexp.source:"";return G<K?-1:G>K?1:0}equals(I){if(I.type===this.type){const G=this.regexp?this.regexp.source:"",K=I.regexp?I.regexp.source:"";return this.key===I.key&&G===K}return!1}substituteConstants(){return this}evaluate(I){let G=I.getValue(this.key);return this.regexp?this.regexp.test(G):!1}serialize(){const I=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${I}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this)),this.negated}}class L{constructor(I){this._actual=I,this.type=8}static create(I){return new L(I)}cmp(I){return I.type!==this.type?this.type-I.type:this._actual.cmp(I._actual)}equals(I){return I.type===this.type?this._actual.equals(I._actual):!1}substituteConstants(){return this}evaluate(I){return!this._actual.evaluate(I)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function w(I){let G=null;for(let K=0,D=I.length;K<D;K++){const J=I[K].substituteConstants();if(I[K]!==J&&G===null){G=[];for(let X=0;X<K;X++)G[X]=I[X]}G!==null&&(G[K]=J)}return G===null?I:G}class p{constructor(I,G){this.expr=I,this.negated=G,this.type=6}static create(I,G){return p._normalizeArr(I,G)}cmp(I){if(I.type!==this.type)return this.type-I.type;if(this.expr.length<I.expr.length)return-1;if(this.expr.length>I.expr.length)return 1;for(let G=0,K=this.expr.length;G<K;G++){const D=t(this.expr[G],I.expr[G]);if(D!==0)return D}return 0}equals(I){if(I.type===this.type){if(this.expr.length!==I.expr.length)return!1;for(let G=0,K=this.expr.length;G<K;G++)if(!this.expr[G].equals(I.expr[G]))return!1;return!0}return!1}substituteConstants(){const I=w(this.expr);return I===this.expr?this:p.create(I,this.negated)}evaluate(I){for(let G=0,K=this.expr.length;G<K;G++)if(!this.expr[G].evaluate(I))return!1;return!0}static _normalizeArr(I,G){const K=[];let D=!1;for(const J of I){if(!J)continue;if(J.type===1){D=!0;continue}if(J.type===0)return E.INSTANCE;if(J.type===6){K.push(...J.expr);continue}K.push(J)}if(K.length===0&&D)return a.INSTANCE;if(K.length===0)return;if(K.length===1)return K[0];K.sort(t);for(let J=1;J<K.length;J++)K[J-1].equals(K[J])&&(K.splice(J,1),J--);if(K.length===1)return K[0];for(;K.length>1;){const J=K[K.length-1];if(J.type!==9)break;K.pop();const X=K.pop(),ne=K.length===0,ue=n.create(J.expr.map(Oe=>p.create([Oe,X],null)),null,ne);ue&&(K.push(ue),K.sort(t))}return K.length===1?K[0]:new p(K,G)}serialize(){return this.expr.map(I=>I.serialize()).join(" && ")}keys(){const I=[];for(let G of this.expr)I.push(...G.keys());return I}negate(){if(!this.negated){const I=[];for(let G of this.expr)I.push(G.negate());this.negated=n.create(I,this,!0)}return this.negated}}class n{constructor(I,G){this.expr=I,this.negated=G,this.type=9}static create(I,G,K){return n._normalizeArr(I,G,K)}cmp(I){if(I.type!==this.type)return this.type-I.type;if(this.expr.length<I.expr.length)return-1;if(this.expr.length>I.expr.length)return 1;for(let G=0,K=this.expr.length;G<K;G++){const D=t(this.expr[G],I.expr[G]);if(D!==0)return D}return 0}equals(I){if(I.type===this.type){if(this.expr.length!==I.expr.length)return!1;for(let G=0,K=this.expr.length;G<K;G++)if(!this.expr[G].equals(I.expr[G]))return!1;return!0}return!1}substituteConstants(){const I=w(this.expr);return I===this.expr?this:n.create(I,this.negated,!1)}evaluate(I){for(let G=0,K=this.expr.length;G<K;G++)if(this.expr[G].evaluate(I))return!0;return!1}static _normalizeArr(I,G,K){let D=[],J=!1;if(I){for(let X=0,ne=I.length;X<ne;X++){const ue=I[X];if(!ue)continue;if(ue.type===0){J=!0;continue}if(ue.type===1)return a.INSTANCE;if(ue.type===9){D=D.concat(ue.expr);continue}D.push(ue)}if(D.length===0&&J)return E.INSTANCE;D.sort(t)}if(D.length===0)return;if(D.length===1)return D[0];for(let X=1;X<D.length;X++)D[X-1].equals(D[X])&&(D.splice(X,1),X--);if(D.length===1)return D[0];if(K){for(let X=0;X<D.length;X++)for(let ne=X+1;ne<D.length;ne++)U(D[X],D[ne])&&(D.splice(ne,1),ne--);if(D.length===1)return D[0]}return new n(D,G)}serialize(){return this.expr.map(I=>I.serialize()).join(" || ")}keys(){const I=[];for(let G of this.expr)I.push(...G.keys());return I}negate(){if(!this.negated){let I=[];for(let G of this.expr)I.push(G.negate());for(;I.length>1;){const G=I.shift(),K=I.shift(),D=[];for(const X of P(G))for(const ne of P(K))D.push(p.create([X,ne],null));const J=I.length===0;I.unshift(n.create(D,null,J))}this.negated=I[0]}return this.negated}}class d extends A{constructor(I,G,K){super(I,null);this._defaultValue=G,typeof K=="object"?d._info.push(Object.assign(Object.assign({},K),{key:I})):K!==!0&&d._info.push({key:I,description:K,type:G!=null?typeof G:void 0})}static all(){return d._info.values()}bindTo(I){return I.createKey(this.key,this._defaultValue)}getValue(I){return I.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(I){return h.create(this.key,I)}}d._info=[];const m=Object(O.c)("contextKeyService"),T="setContext";function y(I,G){return I<G?-1:I>G?1:0}function g(I,G,K,D){return I<K?-1:I>K?1:G<D?-1:G>D?1:0}function U(I,G){if(G.type===6&&I.type!==9&&I.type!==6){for(const J of G.expr)if(I.equals(J))return!0}const K=I.negate(),D=P(K).concat(P(G));D.sort(t);for(let J=0;J<D.length;J++){const X=D[J],ne=X.negate();for(let ue=J+1;ue<D.length;ue++){const Oe=D[ue];if(ne.equals(Oe))return!0}}return!1}function P(I){return I.type===9?I.expr:[I]}},TXwP:function(Ve,Ae,N){var Z,H;(function(){var O;(function(){"use strict";var M=[,,function(t){function E(h){this.__parent=h,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}E.prototype.clone_empty=function(){var h=new E(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},E.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},E.prototype.has_match=function(h){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(h))return!0;return!1},E.prototype.set_indent=function(h,s){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},E.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},E.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},E.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},E.prototype.is_empty=function(){return this.__items.length===0},E.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},E.prototype.push=function(h){this.__items.push(h);var s=h.lastIndexOf(`
|
|
`);s!==-1?this.__character_count=h.length-s:this.__character_count+=h.length},E.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},E.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},E.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},E.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},E.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function a(h,s){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),s=s||"",h.indent_level>0&&(s=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}a.prototype.get_indent_size=function(h,s){var o=this.__base_string_length;return s=s||0,h<0&&(o=0),o+=h*this.__indent_size,o+=s,o},a.prototype.get_indent_string=function(h,s){var o=this.__base_string;return s=s||0,h<0&&(h=0,o=""),s+=h*this.__indent_size,this.__ensure_cache(s),o+=this.__cache[s],o},a.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var h=this.__cache.length,s=0,o="";this.__indent_size&&h>=this.__indent_size&&(s=Math.floor(h/this.__indent_size),h-=s*this.__indent_size,o=new Array(s+1).join(this.__indent_string)),h&&(o+=new Array(h+1).join(" ")),this.__cache.push(o)};function A(h,s){this.__indent_cache=new a(h,s),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new E(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}A.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},A.prototype.get_line_number=function(){return this.__lines.length},A.prototype.get_indent_string=function(h,s){return this.__indent_cache.get_indent_string(h,s)},A.prototype.get_indent_size=function(h,s){return this.__indent_cache.get_indent_size(h,s)},A.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},A.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},A.prototype.get_code=function(h){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
|
|
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
|
|
`);return h!==`
|
|
`&&(o=o.replace(/[\n]/g,h)),o},A.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},A.prototype.set_indent=function(h,s){return h=h||0,s=s||0,this.next_line.set_indent(h,s),this.__lines.length>1?(this.current_line.set_indent(h,s),!0):(this.current_line.set_indent(),!1)},A.prototype.add_raw_token=function(h){for(var s=0;s<h.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},A.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},A.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(" "))},A.prototype.remove_indent=function(h){for(var s=this.__lines.length;h<s;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},A.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&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},A.prototype.just_added_newline=function(){return this.current_line.is_empty()},A.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},A.prototype.ensure_empty_line_above=function(h,s){for(var o=this.__lines.length-2;o>=0;){var f=this.__lines[o];if(f.is_empty())break;if(f.item(0).indexOf(h)!==0&&f.item(-1)!==s){this.__lines.splice(o+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},t.exports.Output=A},,,,function(t){function E(h,s){this.raw_options=a(h,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}E.prototype._get_array=function(h,s){var o=this.raw_options[h],f=s||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(f=o.concat()):typeof o=="string"&&(f=o.split(/[^a-zA-Z0-9_\/\-]+/)),f},E.prototype._get_boolean=function(h,s){var o=this.raw_options[h],f=o===void 0?!!s:!!o;return f},E.prototype._get_characters=function(h,s){var o=this.raw_options[h],f=s||"";return typeof o=="string"&&(f=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),f},E.prototype._get_number=function(h,s){var o=this.raw_options[h];s=parseInt(s,10),isNaN(s)&&(s=0);var f=parseInt(o,10);return isNaN(f)&&(f=s),f},E.prototype._get_selection=function(h,s,o){var f=this._get_selection_list(h,s,o);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[h]+"'");return f[0]},E.prototype._get_selection_list=function(h,s,o){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[s[0]],!this._is_valid_selection(o,s))throw new Error("Invalid Default Value!");var f=this._get_array(h,o);if(!this._is_valid_selection(f,s))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[h]+"'");return f},E.prototype._is_valid_selection=function(h,s){return h.length&&s.length&&!h.some(function(o){return s.indexOf(o)===-1})};function a(h,s){var o={};h=A(h);var f;for(f in h)f!==s&&(o[f]=h[f]);if(s&&h[s])for(f in h[s])o[f]=h[s][f];return o}function A(h){var s={},o;for(o in h){var f=o.replace(/-/g,"_");s[f]=h[o]}return s}t.exports.Options=E,t.exports.normalizeOpts=A,t.exports.mergeOpts=a},,function(t){var E=RegExp.prototype.hasOwnProperty("sticky");function a(A){this.__input=A||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var A=null;return this.hasNext()&&(A=this.__input.charAt(this.__position),this.__position+=1),A},a.prototype.peek=function(A){var h=null;return A=A||0,A+=this.__position,A>=0&&A<this.__input_length&&(h=this.__input.charAt(A)),h},a.prototype.__match=function(A,h){A.lastIndex=h;var s=A.exec(this.__input);return s&&!(E&&A.sticky)&&(s.index!==h&&(s=null)),s},a.prototype.test=function(A,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(A,h):!1},a.prototype.testChar=function(A,h){var s=this.peek(h);return A.lastIndex=0,s!==null&&A.test(s)},a.prototype.match=function(A){var h=this.__match(A,this.__position);return h?this.__position+=h[0].length:h=null,h},a.prototype.read=function(A,h,s){var o="",f;return A&&(f=this.match(A),f&&(o+=f[0])),h&&(f||!A)&&(o+=this.readUntil(h,s)),o},a.prototype.readUntil=function(A,h){var s="",o=this.__position;A.lastIndex=this.__position;var f=A.exec(this.__input);return f?(o=f.index,h&&(o+=f[0].length)):o=this.__input_length,s=this.__input.substring(this.__position,o),this.__position=o,s},a.prototype.readUntilAfter=function(A){return this.readUntil(A,!0)},a.prototype.get_regexp=function(A,h){var s=null,o="g";return h&&E&&(o="y"),typeof A=="string"&&A!==""?s=new RegExp(A,o):A&&(s=new RegExp(A.source,o)),s},a.prototype.get_literal_regexp=function(A){return RegExp(A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(A){var h=this.__position,s=this.readUntilAfter(A);return this.__position=h,s},a.prototype.lookBack=function(A){var h=this.__position-1;return h>=A.length&&this.__input.substring(h-A.length,h).toLowerCase()===A},t.exports.InputScanner=a},,,,,function(t){function E(a,A){a=typeof a=="string"?a:a.source,A=typeof A=="string"?A:A.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+A,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+A,"g")}E.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var A={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(a);h;)A[h[1]]=h[2],h=this.__directive_pattern.exec(a);return A},E.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=E},,function(t,E,a){var A=a(16).Beautifier,h=a(17).Options;function s(o,f){var u=new A(o,f);return u.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new h}},function(t,E,a){var A=a(17).Options,h=a(2).Output,s=a(8).InputScanner,o=a(13).Directives,f=new o(/\/\*/,/\*\//),u=/\r\n|[\r\n]/,c=/\r\n|[\r\n]/g,i=/\s/,l=/(?:\s|\n)+/g,v=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,B=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function C(L,w){this._source_text=L||"",this._options=new A(w),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 w="";for(this._ch=this._input.next();this._ch;){if(w+=this._ch,this._ch==="\\")w+=this._input.next();else if(L.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return w},C.prototype.eatWhitespace=function(L){for(var w=i.test(this._input.peek()),p=0;i.test(this._input.peek());)this._ch=this._input.next(),L&&this._ch===`
|
|
`&&((p===0||p<this._options.max_preserve_newlines)&&(p++,this._output.add_new_line(!0)));return w},C.prototype.foundNestedPseudoClass=function(){for(var L=0,w=1,p=this._input.peek(w);p;){if(p==="{")return!0;if(p==="(")L+=1;else if(p===")"){if(L===0)return!1;L-=1}else if(p===";"||p==="}")return!1;w++,p=this._input.peek(w)}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,w=this._options.eol;w==="auto"&&(w=`
|
|
`,L&&u.test(L||"")&&(w=L.match(u)[0])),L=L.replace(c,`
|
|
`);var p=L.match(/^[\t ]*/)[0];this._output=new h(this._options,p),this._input=new s(L),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var n=0,d=!1,m=!1,T=!1,y=!1,g=!1,U=!1,P=this._ch,I=!1,G,K,D;G=this._input.read(l),K=G!=="",D=P,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),P=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var J=this._input.read(v),X=f.get_directives(J);X&&X.ignore==="start"&&(J+=f.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(B)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(K),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ne=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ne.match(/[ :]$/)&&(ne=this.eatString(": ").replace(/\s$/,""),this.print_string(ne),this._output.space_before_token=!0),ne=ne.replace(/\s$/,""),ne==="extend"?y=!0:ne==="import"&&(g=!0),ne in this.NESTED_AT_RULE?(this._nestedLevel+=1,ne in this.CONDITIONAL_GROUP_RULE&&(T=!0)):!d&&n===0&&ne.indexOf(":")!==-1&&(m=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(K),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")m&&(m=!1,this.outdent()),T?(T=!1,d=this._indentLevel>=this._nestedLevel):d=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&d&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(D==="("?this._output.space_before_token=!1:D!==","&&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(),D==="{"&&this._output.trim(!0),g=!1,y=!1,m&&(this.outdent(),m=!1),this.print_string(this._ch),d=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var ue=0;ue<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;ue++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[ue])){I=!0;break}(d||T)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!y&&n===0?(this.print_string(":"),m||(m=!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 Oe=D==='"'||D==="'";this.preserveSingleSpace(Oe||K),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")I=!1,n===0?(m&&(this.outdent(),m=!1),y=!1,g=!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(),n++,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(")")),n&&(n--,this.outdent()));else{var _e=!1;this._input.lookBack("with")&&(_e=!0),this.preserveSingleSpace(K||_e),this.print_string(this._ch),m&&D==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),U=!0):(this.eatWhitespace(),n++,this.indent())}else if(this._ch===")")n&&(n--,this.outdent()),U&&this._input.peek()===";"&&this._options.selector_separator_newline&&(U=!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&&(!m||U)&&n===0&&!g&&!y?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!m&&n===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&&i.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(K),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),i.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 De=D==='"'||D==="'";this.preserveSingleSpace(De||K),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&I&&this._output.add_new_line()}var Ue=this._output.get_code(w);return Ue},t.exports.Beautifier=C},function(t,E,a){var A=a(6).Options;function h(s){A.call(this,s,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var u=0;u<f.length;u++)f[u]!=="expand"?this.brace_style="collapse":this.brace_style=f[u]}h.prototype=new A,t.exports.Options=h}],_={};function R(t){var E=_[t];if(E!==void 0)return E.exports;var a=_[t]={exports:{}};return M[t](a,a.exports,R),a.exports}var b=R(15);O=b})();var Q=O;!(Z=[],H=function(){return{css_beautify:Q}}.apply(Ae,Z),H!==void 0&&(Ve.exports=H))})()},Vhoy:function(Ve,Ae,N){"use strict";N.d(Ae,"d",function(){return Q}),N.d(Ae,"e",function(){return M}),N.d(Ae,"c",function(){return _}),N.d(Ae,"b",function(){return R}),N.d(Ae,"a",function(){return b});var Z=N("MI8n");class H{constructor(){this._icons=new Map,this._onDidRegister=new Z.b}add(t){const E=this._icons.get(t.id);E?t.description?E.description=t.description:console.error(`Duplicate registration of codicon ${t.id}`):(this._icons.set(t.id,t),this._onDidRegister.fire(t))}get(t){return this._icons.get(t)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const O=new H,Q=O;function M(t,E){return new R(t,E)}function _(t){return t?t.replace(/\$\((.*?)\)/g,(E,a)=>` ${a} `).trim():""}class R{constructor(t,E,a){this.id=t,this.definition=E,this.description=a,O.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var b;(function(t){t.iconNameSegment="[A-Za-z0-9]+",t.iconNameExpression="[A-Za-z0-9\\-]+",t.iconModifierExpression="~[A-Za-z]+";const E=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function a(s){if(s instanceof R)return["codicon","codicon-"+s.id];const o=E.exec(s.id);if(!o)return a(R.error);let[,f,u]=o;const c=["codicon","codicon-"+f];return u&&c.push("codicon-modifier-"+u.substr(1)),c}t.asClassNameArray=a;function A(s){return a(s).join(" ")}t.asClassName=A;function h(s){return"."+a(s).join(".")}t.asCSSSelector=h})(b||(b={})),function(t){t.add=new t("add",{fontCharacter:"\\ea60"}),t.plus=new t("plus",t.add.definition),t.gistNew=new t("gist-new",t.add.definition),t.repoCreate=new t("repo-create",t.add.definition),t.lightbulb=new t("lightbulb",{fontCharacter:"\\ea61"}),t.lightBulb=new t("light-bulb",{fontCharacter:"\\ea61"}),t.repo=new t("repo",{fontCharacter:"\\ea62"}),t.repoDelete=new t("repo-delete",{fontCharacter:"\\ea62"}),t.gistFork=new t("gist-fork",{fontCharacter:"\\ea63"}),t.repoForked=new t("repo-forked",{fontCharacter:"\\ea63"}),t.gitPullRequest=new t("git-pull-request",{fontCharacter:"\\ea64"}),t.gitPullRequestAbandoned=new t("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),t.recordKeys=new t("record-keys",{fontCharacter:"\\ea65"}),t.keyboard=new t("keyboard",{fontCharacter:"\\ea65"}),t.tag=new t("tag",{fontCharacter:"\\ea66"}),t.tagAdd=new t("tag-add",{fontCharacter:"\\ea66"}),t.tagRemove=new t("tag-remove",{fontCharacter:"\\ea66"}),t.person=new t("person",{fontCharacter:"\\ea67"}),t.personFollow=new t("person-follow",{fontCharacter:"\\ea67"}),t.personOutline=new t("person-outline",{fontCharacter:"\\ea67"}),t.personFilled=new t("person-filled",{fontCharacter:"\\ea67"}),t.gitBranch=new t("git-branch",{fontCharacter:"\\ea68"}),t.gitBranchCreate=new t("git-branch-create",{fontCharacter:"\\ea68"}),t.gitBranchDelete=new t("git-branch-delete",{fontCharacter:"\\ea68"}),t.sourceControl=new t("source-control",{fontCharacter:"\\ea68"}),t.mirror=new t("mirror",{fontCharacter:"\\ea69"}),t.mirrorPublic=new t("mirror-public",{fontCharacter:"\\ea69"}),t.star=new t("star",{fontCharacter:"\\ea6a"}),t.starAdd=new t("star-add",{fontCharacter:"\\ea6a"}),t.starDelete=new t("star-delete",{fontCharacter:"\\ea6a"}),t.starEmpty=new t("star-empty",{fontCharacter:"\\ea6a"}),t.comment=new t("comment",{fontCharacter:"\\ea6b"}),t.commentAdd=new t("comment-add",{fontCharacter:"\\ea6b"}),t.alert=new t("alert",{fontCharacter:"\\ea6c"}),t.warning=new t("warning",{fontCharacter:"\\ea6c"}),t.search=new t("search",{fontCharacter:"\\ea6d"}),t.searchSave=new t("search-save",{fontCharacter:"\\ea6d"}),t.logOut=new t("log-out",{fontCharacter:"\\ea6e"}),t.signOut=new t("sign-out",{fontCharacter:"\\ea6e"}),t.logIn=new t("log-in",{fontCharacter:"\\ea6f"}),t.signIn=new t("sign-in",{fontCharacter:"\\ea6f"}),t.eye=new t("eye",{fontCharacter:"\\ea70"}),t.eyeUnwatch=new t("eye-unwatch",{fontCharacter:"\\ea70"}),t.eyeWatch=new t("eye-watch",{fontCharacter:"\\ea70"}),t.circleFilled=new t("circle-filled",{fontCharacter:"\\ea71"}),t.primitiveDot=new t("primitive-dot",{fontCharacter:"\\ea71"}),t.closeDirty=new t("close-dirty",{fontCharacter:"\\ea71"}),t.debugBreakpoint=new t("debug-breakpoint",{fontCharacter:"\\ea71"}),t.debugBreakpointDisabled=new t("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),t.debugHint=new t("debug-hint",{fontCharacter:"\\ea71"}),t.primitiveSquare=new t("primitive-square",{fontCharacter:"\\ea72"}),t.edit=new t("edit",{fontCharacter:"\\ea73"}),t.pencil=new t("pencil",{fontCharacter:"\\ea73"}),t.info=new t("info",{fontCharacter:"\\ea74"}),t.issueOpened=new t("issue-opened",{fontCharacter:"\\ea74"}),t.gistPrivate=new t("gist-private",{fontCharacter:"\\ea75"}),t.gitForkPrivate=new t("git-fork-private",{fontCharacter:"\\ea75"}),t.lock=new t("lock",{fontCharacter:"\\ea75"}),t.mirrorPrivate=new t("mirror-private",{fontCharacter:"\\ea75"}),t.close=new t("close",{fontCharacter:"\\ea76"}),t.removeClose=new t("remove-close",{fontCharacter:"\\ea76"}),t.x=new t("x",{fontCharacter:"\\ea76"}),t.repoSync=new t("repo-sync",{fontCharacter:"\\ea77"}),t.sync=new t("sync",{fontCharacter:"\\ea77"}),t.clone=new t("clone",{fontCharacter:"\\ea78"}),t.desktopDownload=new t("desktop-download",{fontCharacter:"\\ea78"}),t.beaker=new t("beaker",{fontCharacter:"\\ea79"}),t.microscope=new t("microscope",{fontCharacter:"\\ea79"}),t.vm=new t("vm",{fontCharacter:"\\ea7a"}),t.deviceDesktop=new t("device-desktop",{fontCharacter:"\\ea7a"}),t.file=new t("file",{fontCharacter:"\\ea7b"}),t.fileText=new t("file-text",{fontCharacter:"\\ea7b"}),t.more=new t("more",{fontCharacter:"\\ea7c"}),t.ellipsis=new t("ellipsis",{fontCharacter:"\\ea7c"}),t.kebabHorizontal=new t("kebab-horizontal",{fontCharacter:"\\ea7c"}),t.mailReply=new t("mail-reply",{fontCharacter:"\\ea7d"}),t.reply=new t("reply",{fontCharacter:"\\ea7d"}),t.organization=new t("organization",{fontCharacter:"\\ea7e"}),t.organizationFilled=new t("organization-filled",{fontCharacter:"\\ea7e"}),t.organizationOutline=new t("organization-outline",{fontCharacter:"\\ea7e"}),t.newFile=new t("new-file",{fontCharacter:"\\ea7f"}),t.fileAdd=new t("file-add",{fontCharacter:"\\ea7f"}),t.newFolder=new t("new-folder",{fontCharacter:"\\ea80"}),t.fileDirectoryCreate=new t("file-directory-create",{fontCharacter:"\\ea80"}),t.trash=new t("trash",{fontCharacter:"\\ea81"}),t.trashcan=new t("trashcan",{fontCharacter:"\\ea81"}),t.history=new t("history",{fontCharacter:"\\ea82"}),t.clock=new t("clock",{fontCharacter:"\\ea82"}),t.folder=new t("folder",{fontCharacter:"\\ea83"}),t.fileDirectory=new t("file-directory",{fontCharacter:"\\ea83"}),t.symbolFolder=new t("symbol-folder",{fontCharacter:"\\ea83"}),t.logoGithub=new t("logo-github",{fontCharacter:"\\ea84"}),t.markGithub=new t("mark-github",{fontCharacter:"\\ea84"}),t.github=new t("github",{fontCharacter:"\\ea84"}),t.terminal=new t("terminal",{fontCharacter:"\\ea85"}),t.console=new t("console",{fontCharacter:"\\ea85"}),t.repl=new t("repl",{fontCharacter:"\\ea85"}),t.zap=new t("zap",{fontCharacter:"\\ea86"}),t.symbolEvent=new t("symbol-event",{fontCharacter:"\\ea86"}),t.error=new t("error",{fontCharacter:"\\ea87"}),t.stop=new t("stop",{fontCharacter:"\\ea87"}),t.variable=new t("variable",{fontCharacter:"\\ea88"}),t.symbolVariable=new t("symbol-variable",{fontCharacter:"\\ea88"}),t.array=new t("array",{fontCharacter:"\\ea8a"}),t.symbolArray=new t("symbol-array",{fontCharacter:"\\ea8a"}),t.symbolModule=new t("symbol-module",{fontCharacter:"\\ea8b"}),t.symbolPackage=new t("symbol-package",{fontCharacter:"\\ea8b"}),t.symbolNamespace=new t("symbol-namespace",{fontCharacter:"\\ea8b"}),t.symbolObject=new t("symbol-object",{fontCharacter:"\\ea8b"}),t.symbolMethod=new t("symbol-method",{fontCharacter:"\\ea8c"}),t.symbolFunction=new t("symbol-function",{fontCharacter:"\\ea8c"}),t.symbolConstructor=new t("symbol-constructor",{fontCharacter:"\\ea8c"}),t.symbolBoolean=new t("symbol-boolean",{fontCharacter:"\\ea8f"}),t.symbolNull=new t("symbol-null",{fontCharacter:"\\ea8f"}),t.symbolNumeric=new t("symbol-numeric",{fontCharacter:"\\ea90"}),t.symbolNumber=new t("symbol-number",{fontCharacter:"\\ea90"}),t.symbolStructure=new t("symbol-structure",{fontCharacter:"\\ea91"}),t.symbolStruct=new t("symbol-struct",{fontCharacter:"\\ea91"}),t.symbolParameter=new t("symbol-parameter",{fontCharacter:"\\ea92"}),t.symbolTypeParameter=new t("symbol-type-parameter",{fontCharacter:"\\ea92"}),t.symbolKey=new t("symbol-key",{fontCharacter:"\\ea93"}),t.symbolText=new t("symbol-text",{fontCharacter:"\\ea93"}),t.symbolReference=new t("symbol-reference",{fontCharacter:"\\ea94"}),t.goToFile=new t("go-to-file",{fontCharacter:"\\ea94"}),t.symbolEnum=new t("symbol-enum",{fontCharacter:"\\ea95"}),t.symbolValue=new t("symbol-value",{fontCharacter:"\\ea95"}),t.symbolRuler=new t("symbol-ruler",{fontCharacter:"\\ea96"}),t.symbolUnit=new t("symbol-unit",{fontCharacter:"\\ea96"}),t.activateBreakpoints=new t("activate-breakpoints",{fontCharacter:"\\ea97"}),t.archive=new t("archive",{fontCharacter:"\\ea98"}),t.arrowBoth=new t("arrow-both",{fontCharacter:"\\ea99"}),t.arrowDown=new t("arrow-down",{fontCharacter:"\\ea9a"}),t.arrowLeft=new t("arrow-left",{fontCharacter:"\\ea9b"}),t.arrowRight=new t("arrow-right",{fontCharacter:"\\ea9c"}),t.arrowSmallDown=new t("arrow-small-down",{fontCharacter:"\\ea9d"}),t.arrowSmallLeft=new t("arrow-small-left",{fontCharacter:"\\ea9e"}),t.arrowSmallRight=new t("arrow-small-right",{fontCharacter:"\\ea9f"}),t.arrowSmallUp=new t("arrow-small-up",{fontCharacter:"\\eaa0"}),t.arrowUp=new t("arrow-up",{fontCharacter:"\\eaa1"}),t.bell=new t("bell",{fontCharacter:"\\eaa2"}),t.bold=new t("bold",{fontCharacter:"\\eaa3"}),t.book=new t("book",{fontCharacter:"\\eaa4"}),t.bookmark=new t("bookmark",{fontCharacter:"\\eaa5"}),t.debugBreakpointConditionalUnverified=new t("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),t.debugBreakpointConditional=new t("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),t.debugBreakpointConditionalDisabled=new t("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),t.debugBreakpointDataUnverified=new t("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),t.debugBreakpointData=new t("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),t.debugBreakpointDataDisabled=new t("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),t.debugBreakpointLogUnverified=new t("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),t.debugBreakpointLog=new t("debug-breakpoint-log",{fontCharacter:"\\eaab"}),t.debugBreakpointLogDisabled=new t("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),t.briefcase=new t("briefcase",{fontCharacter:"\\eaac"}),t.broadcast=new t("broadcast",{fontCharacter:"\\eaad"}),t.browser=new t("browser",{fontCharacter:"\\eaae"}),t.bug=new t("bug",{fontCharacter:"\\eaaf"}),t.calendar=new t("calendar",{fontCharacter:"\\eab0"}),t.caseSensitive=new t("case-sensitive",{fontCharacter:"\\eab1"}),t.check=new t("check",{fontCharacter:"\\eab2"}),t.checklist=new t("checklist",{fontCharacter:"\\eab3"}),t.chevronDown=new t("chevron-down",{fontCharacter:"\\eab4"}),t.dropDownButton=new t("drop-down-button",t.chevronDown.definition),t.chevronLeft=new t("chevron-left",{fontCharacter:"\\eab5"}),t.chevronRight=new t("chevron-right",{fontCharacter:"\\eab6"}),t.chevronUp=new t("chevron-up",{fontCharacter:"\\eab7"}),t.chromeClose=new t("chrome-close",{fontCharacter:"\\eab8"}),t.chromeMaximize=new t("chrome-maximize",{fontCharacter:"\\eab9"}),t.chromeMinimize=new t("chrome-minimize",{fontCharacter:"\\eaba"}),t.chromeRestore=new t("chrome-restore",{fontCharacter:"\\eabb"}),t.circleOutline=new t("circle-outline",{fontCharacter:"\\eabc"}),t.debugBreakpointUnverified=new t("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),t.circleSlash=new t("circle-slash",{fontCharacter:"\\eabd"}),t.circuitBoard=new t("circuit-board",{fontCharacter:"\\eabe"}),t.clearAll=new t("clear-all",{fontCharacter:"\\eabf"}),t.clippy=new t("clippy",{fontCharacter:"\\eac0"}),t.closeAll=new t("close-all",{fontCharacter:"\\eac1"}),t.cloudDownload=new t("cloud-download",{fontCharacter:"\\eac2"}),t.cloudUpload=new t("cloud-upload",{fontCharacter:"\\eac3"}),t.code=new t("code",{fontCharacter:"\\eac4"}),t.collapseAll=new t("collapse-all",{fontCharacter:"\\eac5"}),t.colorMode=new t("color-mode",{fontCharacter:"\\eac6"}),t.commentDiscussion=new t("comment-discussion",{fontCharacter:"\\eac7"}),t.compareChanges=new t("compare-changes",{fontCharacter:"\\eafd"}),t.creditCard=new t("credit-card",{fontCharacter:"\\eac9"}),t.dash=new t("dash",{fontCharacter:"\\eacc"}),t.dashboard=new t("dashboard",{fontCharacter:"\\eacd"}),t.database=new t("database",{fontCharacter:"\\eace"}),t.debugContinue=new t("debug-continue",{fontCharacter:"\\eacf"}),t.debugDisconnect=new t("debug-disconnect",{fontCharacter:"\\ead0"}),t.debugPause=new t("debug-pause",{fontCharacter:"\\ead1"}),t.debugRestart=new t("debug-restart",{fontCharacter:"\\ead2"}),t.debugStart=new t("debug-start",{fontCharacter:"\\ead3"}),t.debugStepInto=new t("debug-step-into",{fontCharacter:"\\ead4"}),t.debugStepOut=new t("debug-step-out",{fontCharacter:"\\ead5"}),t.debugStepOver=new t("debug-step-over",{fontCharacter:"\\ead6"}),t.debugStop=new t("debug-stop",{fontCharacter:"\\ead7"}),t.debug=new t("debug",{fontCharacter:"\\ead8"}),t.deviceCameraVideo=new t("device-camera-video",{fontCharacter:"\\ead9"}),t.deviceCamera=new t("device-camera",{fontCharacter:"\\eada"}),t.deviceMobile=new t("device-mobile",{fontCharacter:"\\eadb"}),t.diffAdded=new t("diff-added",{fontCharacter:"\\eadc"}),t.diffIgnored=new t("diff-ignored",{fontCharacter:"\\eadd"}),t.diffModified=new t("diff-modified",{fontCharacter:"\\eade"}),t.diffRemoved=new t("diff-removed",{fontCharacter:"\\eadf"}),t.diffRenamed=new t("diff-renamed",{fontCharacter:"\\eae0"}),t.diff=new t("diff",{fontCharacter:"\\eae1"}),t.discard=new t("discard",{fontCharacter:"\\eae2"}),t.editorLayout=new t("editor-layout",{fontCharacter:"\\eae3"}),t.emptyWindow=new t("empty-window",{fontCharacter:"\\eae4"}),t.exclude=new t("exclude",{fontCharacter:"\\eae5"}),t.extensions=new t("extensions",{fontCharacter:"\\eae6"}),t.eyeClosed=new t("eye-closed",{fontCharacter:"\\eae7"}),t.fileBinary=new t("file-binary",{fontCharacter:"\\eae8"}),t.fileCode=new t("file-code",{fontCharacter:"\\eae9"}),t.fileMedia=new t("file-media",{fontCharacter:"\\eaea"}),t.filePdf=new t("file-pdf",{fontCharacter:"\\eaeb"}),t.fileSubmodule=new t("file-submodule",{fontCharacter:"\\eaec"}),t.fileSymlinkDirectory=new t("file-symlink-directory",{fontCharacter:"\\eaed"}),t.fileSymlinkFile=new t("file-symlink-file",{fontCharacter:"\\eaee"}),t.fileZip=new t("file-zip",{fontCharacter:"\\eaef"}),t.files=new t("files",{fontCharacter:"\\eaf0"}),t.filter=new t("filter",{fontCharacter:"\\eaf1"}),t.flame=new t("flame",{fontCharacter:"\\eaf2"}),t.foldDown=new t("fold-down",{fontCharacter:"\\eaf3"}),t.foldUp=new t("fold-up",{fontCharacter:"\\eaf4"}),t.fold=new t("fold",{fontCharacter:"\\eaf5"}),t.folderActive=new t("folder-active",{fontCharacter:"\\eaf6"}),t.folderOpened=new t("folder-opened",{fontCharacter:"\\eaf7"}),t.gear=new t("gear",{fontCharacter:"\\eaf8"}),t.gift=new t("gift",{fontCharacter:"\\eaf9"}),t.gistSecret=new t("gist-secret",{fontCharacter:"\\eafa"}),t.gist=new t("gist",{fontCharacter:"\\eafb"}),t.gitCommit=new t("git-commit",{fontCharacter:"\\eafc"}),t.gitCompare=new t("git-compare",{fontCharacter:"\\eafd"}),t.gitMerge=new t("git-merge",{fontCharacter:"\\eafe"}),t.githubAction=new t("github-action",{fontCharacter:"\\eaff"}),t.githubAlt=new t("github-alt",{fontCharacter:"\\eb00"}),t.globe=new t("globe",{fontCharacter:"\\eb01"}),t.grabber=new t("grabber",{fontCharacter:"\\eb02"}),t.graph=new t("graph",{fontCharacter:"\\eb03"}),t.gripper=new t("gripper",{fontCharacter:"\\eb04"}),t.heart=new t("heart",{fontCharacter:"\\eb05"}),t.home=new t("home",{fontCharacter:"\\eb06"}),t.horizontalRule=new t("horizontal-rule",{fontCharacter:"\\eb07"}),t.hubot=new t("hubot",{fontCharacter:"\\eb08"}),t.inbox=new t("inbox",{fontCharacter:"\\eb09"}),t.issueClosed=new t("issue-closed",{fontCharacter:"\\eba4"}),t.issueReopened=new t("issue-reopened",{fontCharacter:"\\eb0b"}),t.issues=new t("issues",{fontCharacter:"\\eb0c"}),t.italic=new t("italic",{fontCharacter:"\\eb0d"}),t.jersey=new t("jersey",{fontCharacter:"\\eb0e"}),t.json=new t("json",{fontCharacter:"\\eb0f"}),t.kebabVertical=new t("kebab-vertical",{fontCharacter:"\\eb10"}),t.key=new t("key",{fontCharacter:"\\eb11"}),t.law=new t("law",{fontCharacter:"\\eb12"}),t.lightbulbAutofix=new t("lightbulb-autofix",{fontCharacter:"\\eb13"}),t.linkExternal=new t("link-external",{fontCharacter:"\\eb14"}),t.link=new t("link",{fontCharacter:"\\eb15"}),t.listOrdered=new t("list-ordered",{fontCharacter:"\\eb16"}),t.listUnordered=new t("list-unordered",{fontCharacter:"\\eb17"}),t.liveShare=new t("live-share",{fontCharacter:"\\eb18"}),t.loading=new t("loading",{fontCharacter:"\\eb19"}),t.location=new t("location",{fontCharacter:"\\eb1a"}),t.mailRead=new t("mail-read",{fontCharacter:"\\eb1b"}),t.mail=new t("mail",{fontCharacter:"\\eb1c"}),t.markdown=new t("markdown",{fontCharacter:"\\eb1d"}),t.megaphone=new t("megaphone",{fontCharacter:"\\eb1e"}),t.mention=new t("mention",{fontCharacter:"\\eb1f"}),t.milestone=new t("milestone",{fontCharacter:"\\eb20"}),t.mortarBoard=new t("mortar-board",{fontCharacter:"\\eb21"}),t.move=new t("move",{fontCharacter:"\\eb22"}),t.multipleWindows=new t("multiple-windows",{fontCharacter:"\\eb23"}),t.mute=new t("mute",{fontCharacter:"\\eb24"}),t.noNewline=new t("no-newline",{fontCharacter:"\\eb25"}),t.note=new t("note",{fontCharacter:"\\eb26"}),t.octoface=new t("octoface",{fontCharacter:"\\eb27"}),t.openPreview=new t("open-preview",{fontCharacter:"\\eb28"}),t.package_=new t("package",{fontCharacter:"\\eb29"}),t.paintcan=new t("paintcan",{fontCharacter:"\\eb2a"}),t.pin=new t("pin",{fontCharacter:"\\eb2b"}),t.play=new t("play",{fontCharacter:"\\eb2c"}),t.run=new t("run",{fontCharacter:"\\eb2c"}),t.plug=new t("plug",{fontCharacter:"\\eb2d"}),t.preserveCase=new t("preserve-case",{fontCharacter:"\\eb2e"}),t.preview=new t("preview",{fontCharacter:"\\eb2f"}),t.project=new t("project",{fontCharacter:"\\eb30"}),t.pulse=new t("pulse",{fontCharacter:"\\eb31"}),t.question=new t("question",{fontCharacter:"\\eb32"}),t.quote=new t("quote",{fontCharacter:"\\eb33"}),t.radioTower=new t("radio-tower",{fontCharacter:"\\eb34"}),t.reactions=new t("reactions",{fontCharacter:"\\eb35"}),t.references=new t("references",{fontCharacter:"\\eb36"}),t.refresh=new t("refresh",{fontCharacter:"\\eb37"}),t.regex=new t("regex",{fontCharacter:"\\eb38"}),t.remoteExplorer=new t("remote-explorer",{fontCharacter:"\\eb39"}),t.remote=new t("remote",{fontCharacter:"\\eb3a"}),t.remove=new t("remove",{fontCharacter:"\\eb3b"}),t.replaceAll=new t("replace-all",{fontCharacter:"\\eb3c"}),t.replace=new t("replace",{fontCharacter:"\\eb3d"}),t.repoClone=new t("repo-clone",{fontCharacter:"\\eb3e"}),t.repoForcePush=new t("repo-force-push",{fontCharacter:"\\eb3f"}),t.repoPull=new t("repo-pull",{fontCharacter:"\\eb40"}),t.repoPush=new t("repo-push",{fontCharacter:"\\eb41"}),t.report=new t("report",{fontCharacter:"\\eb42"}),t.requestChanges=new t("request-changes",{fontCharacter:"\\eb43"}),t.rocket=new t("rocket",{fontCharacter:"\\eb44"}),t.rootFolderOpened=new t("root-folder-opened",{fontCharacter:"\\eb45"}),t.rootFolder=new t("root-folder",{fontCharacter:"\\eb46"}),t.rss=new t("rss",{fontCharacter:"\\eb47"}),t.ruby=new t("ruby",{fontCharacter:"\\eb48"}),t.saveAll=new t("save-all",{fontCharacter:"\\eb49"}),t.saveAs=new t("save-as",{fontCharacter:"\\eb4a"}),t.save=new t("save",{fontCharacter:"\\eb4b"}),t.screenFull=new t("screen-full",{fontCharacter:"\\eb4c"}),t.screenNormal=new t("screen-normal",{fontCharacter:"\\eb4d"}),t.searchStop=new t("search-stop",{fontCharacter:"\\eb4e"}),t.server=new t("server",{fontCharacter:"\\eb50"}),t.settingsGear=new t("settings-gear",{fontCharacter:"\\eb51"}),t.settings=new t("settings",{fontCharacter:"\\eb52"}),t.shield=new t("shield",{fontCharacter:"\\eb53"}),t.smiley=new t("smiley",{fontCharacter:"\\eb54"}),t.sortPrecedence=new t("sort-precedence",{fontCharacter:"\\eb55"}),t.splitHorizontal=new t("split-horizontal",{fontCharacter:"\\eb56"}),t.splitVertical=new t("split-vertical",{fontCharacter:"\\eb57"}),t.squirrel=new t("squirrel",{fontCharacter:"\\eb58"}),t.starFull=new t("star-full",{fontCharacter:"\\eb59"}),t.starHalf=new t("star-half",{fontCharacter:"\\eb5a"}),t.symbolClass=new t("symbol-class",{fontCharacter:"\\eb5b"}),t.symbolColor=new t("symbol-color",{fontCharacter:"\\eb5c"}),t.symbolConstant=new t("symbol-constant",{fontCharacter:"\\eb5d"}),t.symbolEnumMember=new t("symbol-enum-member",{fontCharacter:"\\eb5e"}),t.symbolField=new t("symbol-field",{fontCharacter:"\\eb5f"}),t.symbolFile=new t("symbol-file",{fontCharacter:"\\eb60"}),t.symbolInterface=new t("symbol-interface",{fontCharacter:"\\eb61"}),t.symbolKeyword=new t("symbol-keyword",{fontCharacter:"\\eb62"}),t.symbolMisc=new t("symbol-misc",{fontCharacter:"\\eb63"}),t.symbolOperator=new t("symbol-operator",{fontCharacter:"\\eb64"}),t.symbolProperty=new t("symbol-property",{fontCharacter:"\\eb65"}),t.wrench=new t("wrench",{fontCharacter:"\\eb65"}),t.wrenchSubaction=new t("wrench-subaction",{fontCharacter:"\\eb65"}),t.symbolSnippet=new t("symbol-snippet",{fontCharacter:"\\eb66"}),t.tasklist=new t("tasklist",{fontCharacter:"\\eb67"}),t.telescope=new t("telescope",{fontCharacter:"\\eb68"}),t.textSize=new t("text-size",{fontCharacter:"\\eb69"}),t.threeBars=new t("three-bars",{fontCharacter:"\\eb6a"}),t.thumbsdown=new t("thumbsdown",{fontCharacter:"\\eb6b"}),t.thumbsup=new t("thumbsup",{fontCharacter:"\\eb6c"}),t.tools=new t("tools",{fontCharacter:"\\eb6d"}),t.triangleDown=new t("triangle-down",{fontCharacter:"\\eb6e"}),t.triangleLeft=new t("triangle-left",{fontCharacter:"\\eb6f"}),t.triangleRight=new t("triangle-right",{fontCharacter:"\\eb70"}),t.triangleUp=new t("triangle-up",{fontCharacter:"\\eb71"}),t.twitter=new t("twitter",{fontCharacter:"\\eb72"}),t.unfold=new t("unfold",{fontCharacter:"\\eb73"}),t.unlock=new t("unlock",{fontCharacter:"\\eb74"}),t.unmute=new t("unmute",{fontCharacter:"\\eb75"}),t.unverified=new t("unverified",{fontCharacter:"\\eb76"}),t.verified=new t("verified",{fontCharacter:"\\eb77"}),t.versions=new t("versions",{fontCharacter:"\\eb78"}),t.vmActive=new t("vm-active",{fontCharacter:"\\eb79"}),t.vmOutline=new t("vm-outline",{fontCharacter:"\\eb7a"}),t.vmRunning=new t("vm-running",{fontCharacter:"\\eb7b"}),t.watch=new t("watch",{fontCharacter:"\\eb7c"}),t.whitespace=new t("whitespace",{fontCharacter:"\\eb7d"}),t.wholeWord=new t("whole-word",{fontCharacter:"\\eb7e"}),t.window=new t("window",{fontCharacter:"\\eb7f"}),t.wordWrap=new t("word-wrap",{fontCharacter:"\\eb80"}),t.zoomIn=new t("zoom-in",{fontCharacter:"\\eb81"}),t.zoomOut=new t("zoom-out",{fontCharacter:"\\eb82"}),t.listFilter=new t("list-filter",{fontCharacter:"\\eb83"}),t.listFlat=new t("list-flat",{fontCharacter:"\\eb84"}),t.listSelection=new t("list-selection",{fontCharacter:"\\eb85"}),t.selection=new t("selection",{fontCharacter:"\\eb85"}),t.listTree=new t("list-tree",{fontCharacter:"\\eb86"}),t.debugBreakpointFunctionUnverified=new t("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),t.debugBreakpointFunction=new t("debug-breakpoint-function",{fontCharacter:"\\eb88"}),t.debugBreakpointFunctionDisabled=new t("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),t.debugStackframeActive=new t("debug-stackframe-active",{fontCharacter:"\\eb89"}),t.debugStackframeDot=new t("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),t.debugStackframe=new t("debug-stackframe",{fontCharacter:"\\eb8b"}),t.debugStackframeFocused=new t("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),t.debugBreakpointUnsupported=new t("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),t.symbolString=new t("symbol-string",{fontCharacter:"\\eb8d"}),t.debugReverseContinue=new t("debug-reverse-continue",{fontCharacter:"\\eb8e"}),t.debugStepBack=new t("debug-step-back",{fontCharacter:"\\eb8f"}),t.debugRestartFrame=new t("debug-restart-frame",{fontCharacter:"\\eb90"}),t.callIncoming=new t("call-incoming",{fontCharacter:"\\eb92"}),t.callOutgoing=new t("call-outgoing",{fontCharacter:"\\eb93"}),t.menu=new t("menu",{fontCharacter:"\\eb94"}),t.expandAll=new t("expand-all",{fontCharacter:"\\eb95"}),t.feedback=new t("feedback",{fontCharacter:"\\eb96"}),t.groupByRefType=new t("group-by-ref-type",{fontCharacter:"\\eb97"}),t.ungroupByRefType=new t("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),t.account=new t("account",{fontCharacter:"\\eb99"}),t.bellDot=new t("bell-dot",{fontCharacter:"\\eb9a"}),t.debugConsole=new t("debug-console",{fontCharacter:"\\eb9b"}),t.library=new t("library",{fontCharacter:"\\eb9c"}),t.output=new t("output",{fontCharacter:"\\eb9d"}),t.runAll=new t("run-all",{fontCharacter:"\\eb9e"}),t.syncIgnored=new t("sync-ignored",{fontCharacter:"\\eb9f"}),t.pinned=new t("pinned",{fontCharacter:"\\eba0"}),t.githubInverted=new t("github-inverted",{fontCharacter:"\\eba1"}),t.debugAlt=new t("debug-alt",{fontCharacter:"\\eb91"}),t.serverProcess=new t("server-process",{fontCharacter:"\\eba2"}),t.serverEnvironment=new t("server-environment",{fontCharacter:"\\eba3"}),t.pass=new t("pass",{fontCharacter:"\\eba4"}),t.stopCircle=new t("stop-circle",{fontCharacter:"\\eba5"}),t.playCircle=new t("play-circle",{fontCharacter:"\\eba6"}),t.record=new t("record",{fontCharacter:"\\eba7"}),t.debugAltSmall=new t("debug-alt-small",{fontCharacter:"\\eba8"}),t.vmConnect=new t("vm-connect",{fontCharacter:"\\eba9"}),t.cloud=new t("cloud",{fontCharacter:"\\ebaa"}),t.merge=new t("merge",{fontCharacter:"\\ebab"}),t.exportIcon=new t("export",{fontCharacter:"\\ebac"}),t.graphLeft=new t("graph-left",{fontCharacter:"\\ebad"}),t.magnet=new t("magnet",{fontCharacter:"\\ebae"}),t.notebook=new t("notebook",{fontCharacter:"\\ebaf"}),t.redo=new t("redo",{fontCharacter:"\\ebb0"}),t.checkAll=new t("check-all",{fontCharacter:"\\ebb1"}),t.pinnedDirty=new t("pinned-dirty",{fontCharacter:"\\ebb2"}),t.passFilled=new t("pass-filled",{fontCharacter:"\\ebb3"}),t.circleLargeFilled=new t("circle-large-filled",{fontCharacter:"\\ebb4"}),t.circleLargeOutline=new t("circle-large-outline",{fontCharacter:"\\ebb5"}),t.combine=new t("combine",{fontCharacter:"\\ebb6"}),t.gather=new t("gather",{fontCharacter:"\\ebb6"}),t.table=new t("table",{fontCharacter:"\\ebb7"}),t.variableGroup=new t("variable-group",{fontCharacter:"\\ebb8"}),t.typeHierarchy=new t("type-hierarchy",{fontCharacter:"\\ebb9"}),t.typeHierarchySub=new t("type-hierarchy-sub",{fontCharacter:"\\ebba"}),t.typeHierarchySuper=new t("type-hierarchy-super",{fontCharacter:"\\ebbb"}),t.gitPullRequestCreate=new t("git-pull-request-create",{fontCharacter:"\\ebbc"}),t.runAbove=new t("run-above",{fontCharacter:"\\ebbd"}),t.runBelow=new t("run-below",{fontCharacter:"\\ebbe"}),t.notebookTemplate=new t("notebook-template",{fontCharacter:"\\ebbf"}),t.debugRerun=new t("debug-rerun",{fontCharacter:"\\ebc0"}),t.workspaceTrusted=new t("workspace-trusted",{fontCharacter:"\\ebc1"}),t.workspaceUntrusted=new t("workspace-untrusted",{fontCharacter:"\\ebc2"}),t.workspaceUnspecified=new t("workspace-unspecified",{fontCharacter:"\\ebc3"}),t.terminalCmd=new t("terminal-cmd",{fontCharacter:"\\ebc4"}),t.terminalDebian=new t("terminal-debian",{fontCharacter:"\\ebc5"}),t.terminalLinux=new t("terminal-linux",{fontCharacter:"\\ebc6"}),t.terminalPowershell=new t("terminal-powershell",{fontCharacter:"\\ebc7"}),t.terminalTmux=new t("terminal-tmux",{fontCharacter:"\\ebc8"}),t.terminalUbuntu=new t("terminal-ubuntu",{fontCharacter:"\\ebc9"}),t.terminalBash=new t("terminal-bash",{fontCharacter:"\\ebca"}),t.arrowSwap=new t("arrow-swap",{fontCharacter:"\\ebcb"}),t.copy=new t("copy",{fontCharacter:"\\ebcc"}),t.personAdd=new t("person-add",{fontCharacter:"\\ebcd"}),t.filterFilled=new t("filter-filled",{fontCharacter:"\\ebce"}),t.wand=new t("wand",{fontCharacter:"\\ebcf"}),t.debugLineByLine=new t("debug-line-by-line",{fontCharacter:"\\ebd0"}),t.inspect=new t("inspect",{fontCharacter:"\\ebd1"}),t.layers=new t("layers",{fontCharacter:"\\ebd2"}),t.layersDot=new t("layers-dot",{fontCharacter:"\\ebd3"}),t.layersActive=new t("layers-active",{fontCharacter:"\\ebd4"}),t.compass=new t("compass",{fontCharacter:"\\ebd5"}),t.compassDot=new t("compass-dot",{fontCharacter:"\\ebd6"}),t.compassActive=new t("compass-active",{fontCharacter:"\\ebd7"}),t.azure=new t("azure",{fontCharacter:"\\ebd8"}),t.issueDraft=new t("issue-draft",{fontCharacter:"\\ebd9"}),t.gitPullRequestClosed=new t("git-pull-request-closed",{fontCharacter:"\\ebda"}),t.gitPullRequestDraft=new t("git-pull-request-draft",{fontCharacter:"\\ebdb"}),t.debugAll=new t("debug-all",{fontCharacter:"\\ebdc"}),t.debugCoverage=new t("debug-coverage",{fontCharacter:"\\ebdd"}),t.runErrors=new t("run-errors",{fontCharacter:"\\ebde"}),t.folderLibrary=new t("folder-library",{fontCharacter:"\\ebdf"}),t.debugContinueSmall=new t("debug-continue-small",{fontCharacter:"\\ebe0"}),t.beakerStop=new t("beaker-stop",{fontCharacter:"\\ebe1"}),t.graphLine=new t("graph-line",{fontCharacter:"\\ebe2"}),t.graphScatter=new t("graph-scatter",{fontCharacter:"\\ebe3"}),t.pieChart=new t("pie-chart",{fontCharacter:"\\ebe4"}),t.bracket=new t("bracket",t.json.definition),t.bracketDot=new t("bracket-dot",{fontCharacter:"\\ebe5"}),t.bracketError=new t("bracket-error",{fontCharacter:"\\ebe6"}),t.lockSmall=new t("lock-small",{fontCharacter:"\\ebe7"}),t.azureDevops=new t("azure-devops",{fontCharacter:"\\ebe8"}),t.verifiedFilled=new t("verified-filled",{fontCharacter:"\\ebe9"})}(R||(R={}))},VpOo:function(Ve,Ae){function N(Z,H){var O=H.x,Q=H.y,M=H.width,_=H.height,R=H.r,b,t,E,a;M<0&&(O=O+M,M=-M),_<0&&(Q=Q+_,_=-_),typeof R=="number"?b=t=E=a=R:R instanceof Array?R.length===1?b=t=E=a=R[0]:R.length===2?(b=E=R[0],t=a=R[1]):R.length===3?(b=R[0],t=a=R[1],E=R[2]):(b=R[0],t=R[1],E=R[2],a=R[3]):b=t=E=a=0;var A;b+t>M&&(A=b+t,b*=M/A,t*=M/A),E+a>M&&(A=E+a,E*=M/A,a*=M/A),t+E>_&&(A=t+E,t*=_/A,E*=_/A),b+a>_&&(A=b+a,b*=_/A,a*=_/A),Z.moveTo(O+b,Q),Z.lineTo(O+M-t,Q),t!==0&&Z.arc(O+M-t,Q+t,t,-Math.PI/2,0),Z.lineTo(O+M,Q+_-E),E!==0&&Z.arc(O+M-E,Q+_-E,E,0,Math.PI/2),Z.lineTo(O+a,Q+_),a!==0&&Z.arc(O+a,Q+_-a,a,Math.PI/2,Math.PI),Z.lineTo(O,Q+b),b!==0&&Z.arc(O+b,Q+b,b,Math.PI,Math.PI*1.5)}Ae.buildPath=N},"VrN/":function(Ve,Ae,N){(function(Z,H){Ve.exports=H()})(this,function(){"use strict";var Z=navigator.userAgent,H=navigator.platform,O=/gecko\/\d/i.test(Z),Q=/MSIE \d/.test(Z),M=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Z),_=/Edge\/(\d+)/.exec(Z),R=Q||M||_,b=R&&(Q?document.documentMode||6:+(_||M)[1]),t=!_&&/WebKit\//.test(Z),E=t&&/Qt\/\d+\.\d+/.test(Z),a=!_&&/Chrome\//.test(Z),A=/Opera\//.test(Z),h=/Apple Computer/.test(navigator.vendor),s=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Z),o=/PhantomJS/.test(Z),f=!_&&/AppleWebKit/.test(Z)&&/Mobile\/\w+/.test(Z),u=/Android/.test(Z),c=f||u||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Z),i=f||/Mac/.test(H),l=/\bCrOS\b/.test(Z),v=/win/i.test(H),B=A&&Z.match(/Version\/(\d*\.\d*)/);B&&(B=Number(B[1])),B&&B>=15&&(A=!1,t=!0);var C=i&&(E||A&&(B==null||B<12.11)),L=O||R&&b>=9;function w(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var p=function(e,r){var S=e.className,x=w(r).exec(S);if(x){var F=S.slice(x.index+x[0].length);e.className=S.slice(0,x.index)+(F?x[1]+F:"")}};function n(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function d(e,r){return n(e).appendChild(r)}function m(e,r,S,x){var F=document.createElement(e);if(S&&(F.className=S),x&&(F.style.cssText=x),typeof r=="string")F.appendChild(document.createTextNode(r));else if(r)for(var Y=0;Y<r.length;++Y)F.appendChild(r[Y]);return F}function T(e,r,S,x){var F=m(e,r,S,x);return F.setAttribute("role","presentation"),F}var y;document.createRange?y=function(e,r,S,x){var F=document.createRange();return F.setEnd(x||e,S),F.setStart(e,r),F}:y=function(e,r,S){var x=document.body.createTextRange();try{x.moveToElementText(e.parentNode)}catch(F){return x}return x.collapse(!0),x.moveEnd("character",S),x.moveStart("character",r),x};function g(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function U(){var e;try{e=document.activeElement}catch(r){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function P(e,r){var S=e.className;w(r).test(S)||(e.className+=(S?" ":"")+r)}function I(e,r){for(var S=e.split(" "),x=0;x<S.length;x++)S[x]&&!w(S[x]).test(r)&&(r+=" "+S[x]);return r}var G=function(e){e.select()};f?G=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:R&&(G=function(e){try{e.select()}catch(r){}});function K(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function D(e,r,S){r||(r={});for(var x in e)e.hasOwnProperty(x)&&(S!==!1||!r.hasOwnProperty(x))&&(r[x]=e[x]);return r}function J(e,r,S,x,F){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var Y=x||0,le=F||0;;){var pe=e.indexOf(" ",Y);if(pe<0||pe>=r)return le+(r-Y);le+=pe-Y,le+=S-le%S,Y=pe+1}}var X=function(){this.id=null,this.f=null,this.time=0,this.handler=K(this.onTimeout,this)};X.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},X.prototype.set=function(e,r){this.f=r;var S=+new Date+e;(!this.id||S<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=S)};function ne(e,r){for(var S=0;S<e.length;++S)if(e[S]==r)return S;return-1}var ue=50,Oe={toString:function(){return"CodeMirror.Pass"}},_e={scroll:!1},De={origin:"*mouse"},Ue={origin:"+move"};function Ke(e,r,S){for(var x=0,F=0;;){var Y=e.indexOf(" ",x);Y==-1&&(Y=e.length);var le=Y-x;if(Y==e.length||F+le>=r)return x+Math.min(le,r-F);if(F+=Y-x,F+=S-F%S,x=Y+1,F>=r)return x}}var Le=[""];function ae(e){for(;Le.length<=e;)Le.push(V(Le)+" ");return Le[e]}function V(e){return e[e.length-1]}function $(e,r){for(var S=[],x=0;x<e.length;x++)S[x]=r(e[x],x);return S}function q(e,r,S){for(var x=0,F=S(r);x<e.length&&S(e[x])<=F;)x++;e.splice(x,0,r)}function se(){}function te(e,r){var S;return Object.create?S=Object.create(e):(se.prototype=e,S=new se),r&&D(r,S),S}var oe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||oe.test(e))}function ie(e,r){return r?r.source.indexOf("\\w")>-1&&re(e)?!0:r.test(e):re(e)}function ee(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var de=/[\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 Ce(e){return e.charCodeAt(0)>=768&&de.test(e)}function Me(e,r,S){for(;(S<0?r>0:r<e.length)&&Ce(e.charAt(r));)r+=S;return r}function Ye(e,r,S){for(var x=r>S?-1:1;;){if(r==S)return r;var F=(r+S)/2,Y=x<0?Math.ceil(F):Math.floor(F);if(Y==r)return e(Y)?r:S;e(Y)?S=Y:r=Y+x}}function et(e,r,S,x){if(!e)return x(r,S,"ltr",0);for(var F=!1,Y=0;Y<e.length;++Y){var le=e[Y];(le.from<S&&le.to>r||r==S&&le.to==r)&&(x(Math.max(le.from,r),Math.min(le.to,S),le.level==1?"rtl":"ltr",Y),F=!0)}F||x(r,S,"ltr")}var st=null;function ut(e,r,S){var x;st=null;for(var F=0;F<e.length;++F){var Y=e[F];if(Y.from<r&&Y.to>r)return F;Y.to==r&&(Y.from!=Y.to&&S=="before"?x=F:st=F),Y.from==r&&(Y.from!=Y.to&&S!="before"?x=F:st=F)}return x!=null?x:st}var yt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function S(Se){return Se<=247?e.charAt(Se):1424<=Se&&Se<=1524?"R":1536<=Se&&Se<=1785?r.charAt(Se-1536):1774<=Se&&Se<=2220?"r":8192<=Se&&Se<=8203?"w":Se==8204?"b":"L"}var x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,F=/[stwN]/,Y=/[LRr]/,le=/[Lb1n]/,pe=/[1n]/;function ve(Se,ze,Xe){this.level=Se,this.from=ze,this.to=Xe}return function(Se,ze){var Xe=ze=="ltr"?"L":"R";if(Se.length==0||ze=="ltr"&&!x.test(Se))return!1;for(var dt=Se.length,lt=[],It=0;It<dt;++It)lt.push(S(Se.charCodeAt(It)));for(var Mt=0,Pt=Xe;Mt<dt;++Mt){var Ht=lt[Mt];Ht=="m"?lt[Mt]=Pt:Pt=Ht}for(var Wt=0,Qt=Xe;Wt<dt;++Wt){var Jt=lt[Wt];Jt=="1"&&Qt=="r"?lt[Wt]="n":Y.test(Jt)&&(Qt=Jt,Jt=="r"&&(lt[Wt]="R"))}for(var pr=1,ur=lt[0];pr<dt-1;++pr){var Lr=lt[pr];Lr=="+"&&ur=="1"&<[pr+1]=="1"?lt[pr]="1":Lr==","&&ur==lt[pr+1]&&(ur=="1"||ur=="n")&&(lt[pr]=ur),ur=Lr}for(var pn=0;pn<dt;++pn){var Wn=lt[pn];if(Wn==",")lt[pn]="N";else if(Wn=="%"){var Cn=void 0;for(Cn=pn+1;Cn<dt&<[Cn]=="%";++Cn);for(var di=pn&<[pn-1]=="!"||Cn<dt&<[Cn]=="1"?"1":"N",qn=pn;qn<Cn;++qn)lt[qn]=di;pn=Cn-1}}for(var Ln=0,ei=Xe;Ln<dt;++Ln){var Xn=lt[Ln];ei=="L"&&Xn=="1"?lt[Ln]="L":Y.test(Xn)&&(ei=Xn)}for(var Nt=0;Nt<dt;++Nt)if(F.test(lt[Nt])){var vn=void 0;for(vn=Nt+1;vn<dt&&F.test(lt[vn]);++vn);for(var yn=(Nt?lt[Nt-1]:Xe)=="L",bn=(vn<dt?lt[vn]:Xe)=="L",Wa=yn==bn?yn?"L":"R":Xe,Qr=Nt;Qr<vn;++Qr)lt[Qr]=Wa;Nt=vn-1}for(var Pr=[],vi,Gn=0;Gn<dt;)if(le.test(lt[Gn])){var Ga=Gn;for(++Gn;Gn<dt&&le.test(lt[Gn]);++Gn);Pr.push(new ve(0,Ga,Gn))}else{var Gi=Gn,Mi=Pr.length,xa=ze=="rtl"?1:0;for(++Gn;Gn<dt&<[Gn]!="L";++Gn);for(var ii=Gi;ii<Gn;)if(pe.test(lt[ii])){Gi<ii&&(Pr.splice(Mi,0,new ve(1,Gi,ii)),Mi+=xa);var Ca=ii;for(++ii;ii<Gn&&pe.test(lt[ii]);++ii);Pr.splice(Mi,0,new ve(2,Ca,ii)),Mi+=xa,Gi=ii}else++ii;Gi<Gn&&Pr.splice(Mi,0,new ve(1,Gi,Gn))}return ze=="ltr"&&(Pr[0].level==1&&(vi=Se.match(/^\s+/))&&(Pr[0].from=vi[0].length,Pr.unshift(new ve(0,0,vi[0].length))),V(Pr).level==1&&(vi=Se.match(/\s+$/))&&(V(Pr).to-=vi[0].length,Pr.push(new ve(0,dt-vi[0].length,dt)))),ze=="rtl"?Pr.reverse():Pr}}();function xt(e,r){var S=e.order;return S==null&&(S=e.order=yt(e.text,r)),S}var je=[],He=function(e,r,S){if(e.addEventListener)e.addEventListener(r,S,!1);else if(e.attachEvent)e.attachEvent("on"+r,S);else{var x=e._handlers||(e._handlers={});x[r]=(x[r]||je).concat(S)}};function ot(e,r){return e._handlers&&e._handlers[r]||je}function ht(e,r,S){if(e.removeEventListener)e.removeEventListener(r,S,!1);else if(e.detachEvent)e.detachEvent("on"+r,S);else{var x=e._handlers,F=x&&x[r];if(F){var Y=ne(F,S);Y>-1&&(x[r]=F.slice(0,Y).concat(F.slice(Y+1)))}}}function we(e,r){var S=ot(e,r);if(!S.length)return;for(var x=Array.prototype.slice.call(arguments,2),F=0;F<S.length;++F)S[F].apply(null,x)}function he(e,r,S){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),we(e,S||r.type,e,r),xe(r)||r.codemirrorIgnore}function fe(e){var r=e._handlers&&e._handlers.cursorActivity;if(!r)return;for(var S=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),x=0;x<r.length;++x)ne(S,r[x])==-1&&S.push(r[x])}function ge(e,r){return ot(e,r).length>0}function Te(e){e.prototype.on=function(r,S){He(this,r,S)},e.prototype.off=function(r,S){ht(this,r,S)}}function me(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ie(e){me(e),Ee(e)}function Pe(e){return e.target||e.srcElement}function Qe(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),i&&e.ctrlKey&&r==1&&(r=3),r}var tt=function(){if(R&&b<9)return!1;var e=m("div");return"draggable"in e||"dragDrop"in e}(),mt;function Bt(e){if(mt==null){var r=m("span","\u200B");d(e,m("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(mt=r.offsetWidth<=1&&r.offsetHeight>2&&!(R&&b<8))}var S=mt?m("span","\u200B"):m("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return S.setAttribute("cm-text",""),S}var Et;function Ct(e){if(Et!=null)return Et;var r=d(e,document.createTextNode("A\u062EA")),S=y(r,0,1).getBoundingClientRect(),x=y(r,1,2).getBoundingClientRect();return n(e),!S||S.left==S.right?!1:Et=x.right-S.right<3}var nt=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var r=0,S=[],x=e.length;r<=x;){var F=e.indexOf(`
|
|
`,r);F==-1&&(F=e.length);var Y=e.slice(r,e.charAt(F-1)=="\r"?F-1:F),le=Y.indexOf("\r");le!=-1?(S.push(Y.slice(0,le)),r+=le+1):(S.push(Y),r=F+1)}return S}:function(e){return e.split(/\r\n?|\n/)},qe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(S){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},$e=function(){var e=m("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Re=null;function Ne(e){if(Re!=null)return Re;var r=d(e,m("span","x")),S=r.getBoundingClientRect(),x=y(r,0,1).getBoundingClientRect();return Re=Math.abs(S.left-x.left)>1}var ct={},rt={};function gt(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),ct[e]=r}function pt(e,r){rt[e]=r}function at(e){if(typeof e=="string"&&rt.hasOwnProperty(e))e=rt[e];else if(e&&typeof e.name=="string"&&rt.hasOwnProperty(e.name)){var r=rt[e.name];typeof r=="string"&&(r={name:r}),e=te(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return at("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return at("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function vt(e,r){r=at(r);var S=ct[r.name];if(!S)return vt(e,"text/plain");var x=S(e,r);if(St.hasOwnProperty(r.name)){var F=St[r.name];for(var Y in F){if(!F.hasOwnProperty(Y))continue;x.hasOwnProperty(Y)&&(x["_"+Y]=x[Y]),x[Y]=F[Y]}}if(x.name=r.name,r.helperType&&(x.helperType=r.helperType),r.modeProps)for(var le in r.modeProps)x[le]=r.modeProps[le];return x}var St={};function wt(e,r){var S=St.hasOwnProperty(e)?St[e]:St[e]={};D(r,S)}function Dt(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var S={};for(var x in r){var F=r[x];F instanceof Array&&(F=F.concat([])),S[x]=F}return S}function Ar(e,r){for(var S;e.innerMode&&!(S=e.innerMode(r),!S||S.mode==e);)r=S.state,e=S.mode;return S||{mode:e,state:r}}function xr(e,r,S){return e.startState?e.startState(r,S):!0}var _r=function(e,r,S){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=S};_r.prototype.eol=function(){return this.pos>=this.string.length},_r.prototype.sol=function(){return this.pos==this.lineStart},_r.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},_r.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},_r.prototype.eat=function(e){var r=this.string.charAt(this.pos),S;if(typeof e=="string"?S=r==e:S=r&&(e.test?e.test(r):e(r)),S)return++this.pos,r},_r.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},_r.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},_r.prototype.skipToEnd=function(){this.pos=this.string.length},_r.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},_r.prototype.backUp=function(e){this.pos-=e},_r.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)},_r.prototype.indentation=function(){return J(this.string,null,this.tabSize)-(this.lineStart?J(this.string,this.lineStart,this.tabSize):0)},_r.prototype.match=function(e,r,S){if(typeof e=="string"){var x=function(le){return S?le.toLowerCase():le},F=this.string.substr(this.pos,e.length);if(x(F)==x(e))return r!==!1&&(this.pos+=e.length),!0}else{var Y=this.string.slice(this.pos).match(e);return Y&&Y.index>0?null:(Y&&r!==!1&&(this.pos+=Y[0].length),Y)}},_r.prototype.current=function(){return this.string.slice(this.start,this.pos)},_r.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},_r.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},_r.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ft(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var S=e;!S.lines;)for(var x=0;;++x){var F=S.children[x],Y=F.chunkSize();if(r<Y){S=F;break}r-=Y}return S.lines[r]}function er(e,r,S){var x=[],F=r.line;return e.iter(r.line,S.line+1,function(Y){var le=Y.text;F==S.line&&(le=le.slice(0,S.ch)),F==r.line&&(le=le.slice(r.ch)),x.push(le),++F}),x}function ir(e,r,S){var x=[];return e.iter(r,S,function(F){x.push(F.text)}),x}function Kt(e,r){var S=r-e.height;if(S)for(var x=e;x;x=x.parent)x.height+=S}function $t(e){if(e.parent==null)return null;for(var r=e.parent,S=ne(r.lines,e),x=r.parent;x;r=x,x=x.parent)for(var F=0;!(x.children[F]==r);++F)S+=x.children[F].chunkSize();return S+r.first}function Xt(e,r){var S=e.first;e:do{for(var x=0;x<e.children.length;++x){var F=e.children[x],Y=F.height;if(r<Y){e=F;continue e}r-=Y,S+=F.chunkSize()}return S}while(!e.lines);for(var le=0;le<e.lines.length;++le){var pe=e.lines[le],ve=pe.height;if(r<ve)break;r-=ve}return S+le}function Xr(e,r){return r>=e.first&&r<e.first+e.size}function Br(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function be(e,r,S){if(S===void 0&&(S=null),!(this instanceof be))return new be(e,r,S);this.line=e,this.ch=r,this.sticky=S}function Be(e,r){return e.line-r.line||e.ch-r.ch}function ke(e,r){return e.sticky==r.sticky&&Be(e,r)==0}function Ze(e){return be(e.line,e.ch)}function Je(e,r){return Be(e,r)<0?r:e}function Ot(e,r){return Be(e,r)<0?e:r}function Lt(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function bt(e,r){if(r.line<e.first)return be(e.first,0);var S=e.first+e.size-1;return r.line>S?be(S,Ft(e,S).text.length):Rt(r,Ft(e,r.line).text.length)}function Rt(e,r){var S=e.ch;return S==null||S>r?be(e.line,r):S<0?be(e.line,0):e}function At(e,r){for(var S=[],x=0;x<r.length;x++)S[x]=bt(e,r[x]);return S}var Ut=function(e,r){this.state=e,this.lookAhead=r},Gt=function(e,r,S,x){this.state=r,this.doc=e,this.line=S,this.maxLookAhead=x||0,this.baseTokens=null,this.baseTokenPos=1};Gt.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},Gt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Gt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Gt.fromSaved=function(e,r,S){return r instanceof Ut?new Gt(e,Dt(e.mode,r.state),S,r.lookAhead):new Gt(e,Dt(e.mode,r),S)},Gt.prototype.save=function(e){var r=e!==!1?Dt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ut(r,this.maxLookAhead):r};function gr(e,r,S,x){var F=[e.state.modeGen],Y={};Dr(e,r.text,e.doc.mode,S,function(Se,ze){return F.push(Se,ze)},Y,x);for(var le=S.state,pe=function(Se){S.baseTokens=F;var ze=e.state.overlays[Se],Xe=1,dt=0;S.state=!0,Dr(e,r.text,ze.mode,S,function(lt,It){for(var Mt=Xe;dt<lt;){var Pt=F[Xe];Pt>lt&&F.splice(Xe,1,lt,F[Xe+1],Pt),Xe+=2,dt=Math.min(lt,Pt)}if(!It)return;if(ze.opaque)F.splice(Mt,Xe-Mt,lt,"overlay "+It),Xe=Mt+2;else for(;Mt<Xe;Mt+=2){var Ht=F[Mt+1];F[Mt+1]=(Ht?Ht+" ":"")+"overlay "+It}},Y),S.state=le,S.baseTokens=null,S.baseTokenPos=1},ve=0;ve<e.state.overlays.length;++ve)pe(ve);return{styles:F,classes:Y.bgClass||Y.textClass?Y:null}}function fr(e,r,S){if(!r.styles||r.styles[0]!=e.state.modeGen){var x=br(e,$t(r)),F=r.text.length>e.options.maxHighlightLength&&Dt(e.doc.mode,x.state),Y=gr(e,r,x);F&&(x.state=F),r.stateAfter=x.save(!F),r.styles=Y.styles,Y.classes?r.styleClasses=Y.classes:r.styleClasses&&(r.styleClasses=null),S===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function br(e,r,S){var x=e.doc,F=e.display;if(!x.mode.startState)return new Gt(x,!0,r);var Y=Rr(e,r,S),le=Y>x.first&&Ft(x,Y-1).stateAfter,pe=le?Gt.fromSaved(x,le,Y):new Gt(x,xr(x.mode),Y);return x.iter(Y,r,function(ve){Cr(e,ve.text,pe);var Se=pe.line;ve.stateAfter=Se==r-1||Se%5==0||Se>=F.viewFrom&&Se<F.viewTo?pe.save():null,pe.nextLine()}),S&&(x.modeFrontier=pe.line),pe}function Cr(e,r,S,x){var F=e.doc.mode,Y=new _r(r,e.options.tabSize,S);for(Y.start=Y.pos=x||0,r==""&&ar(F,S.state);!Y.eol();)Hr(F,Y,S.state),Y.start=Y.pos}function ar(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var S=Ar(e,r);if(S.mode.blankLine)return S.mode.blankLine(S.state)}function Hr(e,r,S,x){for(var F=0;F<10;F++){x&&(x[0]=Ar(e,S).mode);var Y=e.token(r,S);if(r.pos>r.start)return Y}throw new Error("Mode "+e.name+" failed to advance stream.")}var hr=function(e,r,S){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=S};function yr(e,r,S,x){var F=e.doc,Y=F.mode,le;r=bt(F,r);var pe=Ft(F,r.line),ve=br(e,r.line,S),Se=new _r(pe.text,e.options.tabSize,ve),ze;for(x&&(ze=[]);(x||Se.pos<r.ch)&&!Se.eol();)Se.start=Se.pos,le=Hr(Y,Se,ve.state),x&&ze.push(new hr(Se,le,Dt(F.mode,ve.state)));return x?ze:new hr(Se,le,ve.state)}function mr(e,r){if(e)for(;;){var S=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!S)break;e=e.slice(0,S.index)+e.slice(S.index+S[0].length);var x=S[1]?"bgClass":"textClass";r[x]==null?r[x]=S[2]:new RegExp("(?:^|\\s)"+S[2]+"(?:$|\\s)").test(r[x])||(r[x]+=" "+S[2])}return e}function Dr(e,r,S,x,F,Y,le){var pe=S.flattenSpans;pe==null&&(pe=e.options.flattenSpans);var ve=0,Se=null,ze=new _r(r,e.options.tabSize,x),Xe,dt=e.options.addModeClass&&[null];for(r==""&&mr(ar(S,x.state),Y);!ze.eol();){if(ze.pos>e.options.maxHighlightLength?(pe=!1,le&&Cr(e,r,x,ze.pos),ze.pos=r.length,Xe=null):Xe=mr(Hr(S,ze,x.state,dt),Y),dt){var lt=dt[0].name;lt&&(Xe="m-"+(Xe?lt+" "+Xe:lt))}if(!pe||Se!=Xe){for(;ve<ze.start;)ve=Math.min(ze.start,ve+5e3),F(ve,Se);Se=Xe}ze.start=ze.pos}for(;ve<ze.pos;){var It=Math.min(ze.pos,ve+5e3);F(It,Se),ve=It}}function Rr(e,r,S){for(var x,F,Y=e.doc,le=S?-1:r-(e.doc.mode.innerMode?1e3:100),pe=r;pe>le;--pe){if(pe<=Y.first)return Y.first;var ve=Ft(Y,pe-1),Se=ve.stateAfter;if(Se&&(!S||pe+(Se instanceof Ut?Se.lookAhead:0)<=Y.modeFrontier))return pe;var ze=J(ve.text,null,e.options.tabSize);(F==null||x>ze)&&(F=pe-1,x=ze)}return F}function jr(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontier<r-10)return;for(var S=e.first,x=r-1;x>S;x--){var F=Ft(e,x).stateAfter;if(F&&(!(F instanceof Ut)||x+F.lookAhead<r)){S=x+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,S)}var or=!1,Mr=!1;function zr(){or=!0}function Tn(){Mr=!0}function Vr(e,r,S){this.marker=e,this.from=r,this.to=S}function en(e,r){if(e)for(var S=0;S<e.length;++S){var x=e[S];if(x.marker==r)return x}}function En(e,r){for(var S,x=0;x<e.length;++x)e[x]!=r&&(S||(S=[])).push(e[x]);return S}function cn(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function rn(e,r,S){var x;if(e)for(var F=0;F<e.length;++F){var Y=e[F],le=Y.marker,pe=Y.from==null||(le.inclusiveLeft?Y.from<=r:Y.from<r);if(pe||Y.from==r&&le.type=="bookmark"&&(!S||!Y.marker.insertLeft)){var ve=Y.to==null||(le.inclusiveRight?Y.to>=r:Y.to>r);(x||(x=[])).push(new Vr(le,Y.from,ve?null:Y.to))}}return x}function hn(e,r,S){var x;if(e)for(var F=0;F<e.length;++F){var Y=e[F],le=Y.marker,pe=Y.to==null||(le.inclusiveRight?Y.to>=r:Y.to>r);if(pe||Y.from==r&&le.type=="bookmark"&&(!S||Y.marker.insertLeft)){var ve=Y.from==null||(le.inclusiveLeft?Y.from<=r:Y.from<r);(x||(x=[])).push(new Vr(le,ve?null:Y.from-r,Y.to==null?null:Y.to-r))}}return x}function wn(e,r){if(r.full)return null;var S=Xr(e,r.from.line)&&Ft(e,r.from.line).markedSpans,x=Xr(e,r.to.line)&&Ft(e,r.to.line).markedSpans;if(!S&&!x)return null;var F=r.from.ch,Y=r.to.ch,le=Be(r.from,r.to)==0,pe=rn(S,F,le),ve=hn(x,Y,le),Se=r.text.length==1,ze=V(r.text).length+(Se?F:0);if(pe)for(var Xe=0;Xe<pe.length;++Xe){var dt=pe[Xe];if(dt.to==null){var lt=en(ve,dt.marker);lt?Se&&(dt.to=lt.to==null?null:lt.to+ze):dt.to=F}}if(ve)for(var It=0;It<ve.length;++It){var Mt=ve[It];if(Mt.to!=null&&(Mt.to+=ze),Mt.from==null){var Pt=en(pe,Mt.marker);Pt||(Mt.from=ze,Se&&(pe||(pe=[])).push(Mt))}else Mt.from+=ze,Se&&(pe||(pe=[])).push(Mt)}pe&&(pe=Dn(pe)),ve&&ve!=pe&&(ve=Dn(ve));var Ht=[pe];if(!Se){var Wt=r.text.length-2,Qt;if(Wt>0&&pe)for(var Jt=0;Jt<pe.length;++Jt)pe[Jt].to==null&&(Qt||(Qt=[])).push(new Vr(pe[Jt].marker,null,null));for(var pr=0;pr<Wt;++pr)Ht.push(Qt);Ht.push(ve)}return Ht}function Dn(e){for(var r=0;r<e.length;++r){var S=e[r];S.from!=null&&S.from==S.to&&S.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function Er(e,r,S){var x=null;if(e.iter(r.line,S.line+1,function(lt){if(lt.markedSpans)for(var It=0;It<lt.markedSpans.length;++It){var Mt=lt.markedSpans[It].marker;Mt.readOnly&&(!x||ne(x,Mt)==-1)&&(x||(x=[])).push(Mt)}}),!x)return null;for(var F=[{from:r,to:S}],Y=0;Y<x.length;++Y)for(var le=x[Y],pe=le.find(0),ve=0;ve<F.length;++ve){var Se=F[ve];if(Be(Se.to,pe.from)<0||Be(Se.from,pe.to)>0)continue;var ze=[ve,1],Xe=Be(Se.from,pe.from),dt=Be(Se.to,pe.to);(Xe<0||!le.inclusiveLeft&&!Xe)&&ze.push({from:Se.from,to:pe.from}),(dt>0||!le.inclusiveRight&&!dt)&&ze.push({from:pe.to,to:Se.to}),F.splice.apply(F,ze),ve+=ze.length-3}return F}function sr(e){var r=e.markedSpans;if(!r)return;for(var S=0;S<r.length;++S)r[S].marker.detachLine(e);e.markedSpans=null}function Yt(e,r){if(!r)return;for(var S=0;S<r.length;++S)r[S].marker.attachLine(e);e.markedSpans=r}function dr(e){return e.inclusiveLeft?-1:0}function wr(e){return e.inclusiveRight?1:0}function Or(e,r){var S=e.lines.length-r.lines.length;if(S!=0)return S;var x=e.find(),F=r.find(),Y=Be(x.from,F.from)||dr(e)-dr(r);if(Y)return-Y;var le=Be(x.to,F.to)||wr(e)-wr(r);return le||r.id-e.id}function sn(e,r){var S=Mr&&e.markedSpans,x;if(S)for(var F=void 0,Y=0;Y<S.length;++Y)F=S[Y],F.marker.collapsed&&(r?F.from:F.to)==null&&(!x||Or(x,F.marker)<0)&&(x=F.marker);return x}function Kr(e){return sn(e,!0)}function Yr(e){return sn(e,!1)}function zn(e,r){var S=Mr&&e.markedSpans,x;if(S)for(var F=0;F<S.length;++F){var Y=S[F];Y.marker.collapsed&&(Y.from==null||Y.from<r)&&(Y.to==null||Y.to>r)&&(!x||Or(x,Y.marker)<0)&&(x=Y.marker)}return x}function Sn(e,r,S,x,F){var Y=Ft(e,r),le=Mr&&Y.markedSpans;if(le)for(var pe=0;pe<le.length;++pe){var ve=le[pe];if(!ve.marker.collapsed)continue;var Se=ve.marker.find(0),ze=Be(Se.from,S)||dr(ve.marker)-dr(F),Xe=Be(Se.to,x)||wr(ve.marker)-wr(F);if(ze>=0&&Xe<=0||ze<=0&&Xe>=0)continue;if(ze<=0&&(ve.marker.inclusiveRight&&F.inclusiveLeft?Be(Se.to,S)>=0:Be(Se.to,S)>0)||ze>=0&&(ve.marker.inclusiveRight&&F.inclusiveLeft?Be(Se.from,x)<=0:Be(Se.from,x)<0))return!0}}function _n(e){for(var r;r=Kr(e);)e=r.find(-1,!0).line;return e}function Yn(e){for(var r;r=Yr(e);)e=r.find(1,!0).line;return e}function xn(e){for(var r,S;r=Yr(e);)e=r.find(1,!0).line,(S||(S=[])).push(e);return S}function $r(e,r){var S=Ft(e,r),x=_n(S);return S==x?r:$t(x)}function In(e,r){if(r>e.lastLine())return r;var S=Ft(e,r),x;if(!Bn(e,S))return r;for(;x=Yr(S);)S=x.find(1,!0).line;return $t(S)+1}function Bn(e,r){var S=Mr&&r.markedSpans;if(S)for(var x=void 0,F=0;F<S.length;++F){if(x=S[F],!x.marker.collapsed)continue;if(x.from==null)return!0;if(x.marker.widgetNode)continue;if(x.from==0&&x.marker.inclusiveLeft&&Jn(e,r,x))return!0}}function Jn(e,r,S){if(S.to==null){var x=S.marker.find(1,!0);return Jn(e,x.line,en(x.line.markedSpans,S.marker))}if(S.marker.inclusiveRight&&S.to==r.text.length)return!0;for(var F=void 0,Y=0;Y<r.markedSpans.length;++Y)if(F=r.markedSpans[Y],F.marker.collapsed&&!F.marker.widgetNode&&F.from==S.to&&(F.to==null||F.to!=S.from)&&(F.marker.inclusiveLeft||S.marker.inclusiveRight)&&Jn(e,r,F))return!0}function Mn(e){e=_n(e);for(var r=0,S=e.parent,x=0;x<S.lines.length;++x){var F=S.lines[x];if(F==e)break;r+=F.height}for(var Y=S.parent;Y;S=Y,Y=S.parent)for(var le=0;le<Y.children.length;++le){var pe=Y.children[le];if(pe==S)break;r+=pe.height}return r}function si(e){if(e.height==0)return 0;for(var r=e.text.length,S,x=e;S=Kr(x);){var F=S.find(0,!0);x=F.from.line,r+=F.from.ch-F.to.ch}for(x=e;S=Yr(x);){var Y=S.find(0,!0);r-=x.text.length-Y.from.ch,x=Y.to.line,r+=x.text.length-Y.to.ch}return r}function Fn(e){var r=e.display,S=e.doc;r.maxLine=Ft(S,S.first),r.maxLineLength=si(r.maxLine),r.maxLineChanged=!0,S.iter(function(x){var F=si(x);F>r.maxLineLength&&(r.maxLineLength=F,r.maxLine=x)})}var dn=function(e,r,S){this.text=e,Yt(this,r),this.height=S?S(this):1};dn.prototype.lineNo=function(){return $t(this)},Te(dn);function Un(e,r,S,x){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),sr(e),Yt(e,S);var F=x?x(e):1;F!=e.height&&Kt(e,F)}function zt(e){e.parent=null,sr(e)}var lr={},jt={};function cr(e,r){if(!e||/^\s*$/.test(e))return null;var S=r.addModeClass?jt:lr;return S[e]||(S[e]=e.replace(/\S+/g,"cm-$&"))}function Tr(e,r){var S=T("span",null,null,t?"padding-right: .1px":null),x={pre:T("pre",[S],"CodeMirror-line"),content:S,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var F=0;F<=(r.rest?r.rest.length:0);F++){var Y=F?r.rest[F-1]:r.line,le=void 0;x.pos=0,x.addToken=vr,Ct(e.display.measure)&&(le=xt(Y,e.doc.direction))&&(x.addToken=Rn(x.addToken,le)),x.map=[];var pe=r!=e.display.externalMeasured&&$t(Y);li(Y,x,fr(e,Y,pe)),Y.styleClasses&&(Y.styleClasses.bgClass&&(x.bgClass=I(Y.styleClasses.bgClass,x.bgClass||"")),Y.styleClasses.textClass&&(x.textClass=I(Y.styleClasses.textClass,x.textClass||""))),x.map.length==0&&x.map.push(0,0,x.content.appendChild(Bt(e.display.measure))),F==0?(r.measure.map=x.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(x.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(t){var ve=x.content.lastChild;(/\bcm-tab\b/.test(ve.className)||ve.querySelector&&ve.querySelector(".cm-tab"))&&(x.content.className="cm-tab-wrap-hack")}return we(e,"renderLine",e,r.line,x.pre),x.pre.className&&(x.textClass=I(x.pre.className,x.textClass||"")),x}function Wr(e){var r=m("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function vr(e,r,S,x,F,Y,le){if(!r)return;var pe=e.splitSpaces?nn(r,e.trailingSpace):r,ve=e.cm.state.specialChars,Se=!1,ze;if(!ve.test(r))e.col+=r.length,ze=document.createTextNode(pe),e.map.push(e.pos,e.pos+r.length,ze),R&&b<9&&(Se=!0),e.pos+=r.length;else{ze=document.createDocumentFragment();for(var Xe=0;;){ve.lastIndex=Xe;var dt=ve.exec(r),lt=dt?dt.index-Xe:r.length-Xe;if(lt){var It=document.createTextNode(pe.slice(Xe,Xe+lt));R&&b<9?ze.appendChild(m("span",[It])):ze.appendChild(It),e.map.push(e.pos,e.pos+lt,It),e.col+=lt,e.pos+=lt}if(!dt)break;Xe+=lt+1;var Mt=void 0;if(dt[0]==" "){var Pt=e.cm.options.tabSize,Ht=Pt-e.col%Pt;Mt=ze.appendChild(m("span",ae(Ht),"cm-tab")),Mt.setAttribute("role","presentation"),Mt.setAttribute("cm-text"," "),e.col+=Ht}else dt[0]=="\r"||dt[0]==`
|
|
`?(Mt=ze.appendChild(m("span",dt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Mt.setAttribute("cm-text",dt[0]),e.col+=1):(Mt=e.cm.options.specialCharPlaceholder(dt[0]),Mt.setAttribute("cm-text",dt[0]),R&&b<9?ze.appendChild(m("span",[Mt])):ze.appendChild(Mt),e.col+=1);e.map.push(e.pos,e.pos+1,Mt),e.pos++}}if(e.trailingSpace=pe.charCodeAt(r.length-1)==32,S||x||F||Se||Y||le){var Wt=S||"";x&&(Wt+=x),F&&(Wt+=F);var Qt=m("span",[ze],Wt,Y);if(le)for(var Jt in le)le.hasOwnProperty(Jt)&&Jt!="style"&&Jt!="class"&&Qt.setAttribute(Jt,le[Jt]);return e.content.appendChild(Qt)}e.content.appendChild(ze)}function nn(e,r){if(e.length>1&&!/ /.test(e))return e;for(var S=r,x="",F=0;F<e.length;F++){var Y=e.charAt(F);Y==" "&&S&&(F==e.length-1||e.charCodeAt(F+1)==32)&&(Y="\xA0"),x+=Y,S=Y==" "}return x}function Rn(e,r){return function(S,x,F,Y,le,pe,ve){F=F?F+" cm-force-border":"cm-force-border";for(var Se=S.pos,ze=Se+x.length;;){for(var Xe=void 0,dt=0;dt<r.length&&!(Xe=r[dt],Xe.to>Se&&Xe.from<=Se);dt++);if(Xe.to>=ze)return e(S,x,F,Y,le,pe,ve);e(S,x.slice(0,Xe.to-Se),F,Y,null,pe,ve),Y=null,x=x.slice(Xe.to-Se),Se=Xe.to}}}function Ir(e,r,S,x){var F=!x&&S.widgetNode;F&&e.map.push(e.pos,e.pos+r,F),!x&&e.cm.display.input.needsContentAttribute&&(F||(F=e.content.appendChild(document.createElement("span"))),F.setAttribute("cm-marker",S.id)),F&&(e.cm.display.input.setUneditable(F),e.content.appendChild(F)),e.pos+=r,e.trailingSpace=!1}function li(e,r,S){var x=e.markedSpans,F=e.text,Y=0;if(!x){for(var le=1;le<S.length;le+=2)r.addToken(r,F.slice(Y,Y=S[le]),cr(S[le+1],r.cm.options));return}for(var pe=F.length,ve=0,Se=1,ze="",Xe,dt,lt=0,It,Mt,Pt,Ht,Wt;;){if(lt==ve){It=Mt=Pt=dt="",Wt=null,Ht=null,lt=Infinity;for(var Qt=[],Jt=void 0,pr=0;pr<x.length;++pr){var ur=x[pr],Lr=ur.marker;if(Lr.type=="bookmark"&&ur.from==ve&&Lr.widgetNode)Qt.push(Lr);else if(ur.from<=ve&&(ur.to==null||ur.to>ve||Lr.collapsed&&ur.to==ve&&ur.from==ve)){if(ur.to!=null&&ur.to!=ve&<>ur.to&&(lt=ur.to,Mt=""),Lr.className&&(It+=" "+Lr.className),Lr.css&&(dt=(dt?dt+";":"")+Lr.css),Lr.startStyle&&ur.from==ve&&(Pt+=" "+Lr.startStyle),Lr.endStyle&&ur.to==lt&&(Jt||(Jt=[])).push(Lr.endStyle,ur.to),Lr.title&&((Wt||(Wt={})).title=Lr.title),Lr.attributes)for(var pn in Lr.attributes)(Wt||(Wt={}))[pn]=Lr.attributes[pn];Lr.collapsed&&(!Ht||Or(Ht.marker,Lr)<0)&&(Ht=ur)}else ur.from>ve&<>ur.from&&(lt=ur.from)}if(Jt)for(var Wn=0;Wn<Jt.length;Wn+=2)Jt[Wn+1]==lt&&(Mt+=" "+Jt[Wn]);if(!Ht||Ht.from==ve)for(var Cn=0;Cn<Qt.length;++Cn)Ir(r,0,Qt[Cn]);if(Ht&&(Ht.from||0)==ve){if(Ir(r,(Ht.to==null?pe+1:Ht.to)-ve,Ht.marker,Ht.from==null),Ht.to==null)return;Ht.to==ve&&(Ht=!1)}}if(ve>=pe)break;for(var di=Math.min(pe,lt);;){if(ze){var qn=ve+ze.length;if(!Ht){var Ln=qn>di?ze.slice(0,di-ve):ze;r.addToken(r,Ln,Xe?Xe+It:It,Pt,ve+Ln.length==lt?Mt:"",dt,Wt)}if(qn>=di){ze=ze.slice(di-ve),ve=di;break}ve=qn,Pt=""}ze=F.slice(Y,Y=S[Se++]),Xe=cr(S[Se++],r.cm.options)}}}function Fr(e,r,S){this.line=r,this.rest=xn(r),this.size=this.rest?$t(V(this.rest))-S+1:1,this.node=this.text=null,this.hidden=Bn(e,r)}function Hn(e,r,S){for(var x=[],F,Y=r;Y<S;Y=F){var le=new Fr(e.doc,Ft(e.doc,Y),Y);F=Y+le.size,x.push(le)}return x}var Qn=null;function ui(e){Qn?Qn.ops.push(e):e.ownsGroup=Qn={ops:[e],delayedCallbacks:[]}}function hs(e){var r=e.delayedCallbacks,S=0;do{for(;S<r.length;S++)r[S].call(null);for(var x=0;x<e.ops.length;x++){var F=e.ops[x];if(F.cursorActivityHandlers)for(;F.cursorActivityCalled<F.cursorActivityHandlers.length;)F.cursorActivityHandlers[F.cursorActivityCalled++].call(null,F.cm)}}while(S<r.length)}function Jr(e,r){var S=e.ownsGroup;if(!S)return;try{hs(S)}finally{Qn=null,r(S)}}var Ur=null;function Gr(e,r){var S=ot(e,r);if(!S.length)return;var x=Array.prototype.slice.call(arguments,2),F;Qn?F=Qn.delayedCallbacks:Ur?F=Ur:(F=Ur=[],setTimeout(Ai,0));for(var Y=function(pe){F.push(function(){return S[pe].apply(null,x)})},le=0;le<S.length;++le)Y(le)}function Ai(){var e=Ur;Ur=null;for(var r=0;r<e.length;++r)e[r]()}function zi(e,r,S,x){for(var F=0;F<r.changes.length;F++){var Y=r.changes[F];Y=="text"?ds(e,r):Y=="gutter"?Lo(e,r,S,x):Y=="class"?fs(e,r):Y=="widget"&&nl(e,r,x)}r.changes=null}function Vi(e){return e.node==e.text&&(e.node=m("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),R&&b<8&&(e.node.style.zIndex=2)),e.node}function Ja(e,r){var S=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(S&&(S+=" CodeMirror-linebackground"),r.background)S?r.background.className=S:(r.background.parentNode.removeChild(r.background),r.background=null);else if(S){var x=Vi(r);r.background=x.insertBefore(m("div",null,S),x.firstChild),e.display.input.setUneditable(r.background)}}function Ro(e,r){var S=e.display.externalMeasured;return S&&S.line==r.line?(e.display.externalMeasured=null,r.measure=S.measure,S.built):Tr(e,r)}function ds(e,r){var S=r.text.className,x=Ro(e,r);r.text==r.node&&(r.node=x.pre),r.text.parentNode.replaceChild(x.pre,r.text),r.text=x.pre,x.bgClass!=r.bgClass||x.textClass!=r.textClass?(r.bgClass=x.bgClass,r.textClass=x.textClass,fs(e,r)):S&&(r.text.className=S)}function fs(e,r){Ja(e,r),r.line.wrapClass?Vi(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var S=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=S||""}function Lo(e,r,S,x){if(r.gutter&&(r.node.removeChild(r.gutter),r.gutter=null),r.gutterBackground&&(r.node.removeChild(r.gutterBackground),r.gutterBackground=null),r.line.gutterClass){var F=Vi(r);r.gutterBackground=m("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?x.fixedPos:-x.gutterTotalWidth)+"px; width: "+x.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),F.insertBefore(r.gutterBackground,r.text)}var Y=r.line.gutterMarkers;if(e.options.lineNumbers||Y){var le=Vi(r),pe=r.gutter=m("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?x.fixedPos:-x.gutterTotalWidth)+"px");if(e.display.input.setUneditable(pe),le.insertBefore(pe,r.text),r.line.gutterClass&&(pe.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!Y||!Y["CodeMirror-linenumbers"])&&(r.lineNumber=pe.appendChild(m("div",Br(e.options,S),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+x.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),Y)for(var ve=0;ve<e.display.gutterSpecs.length;++ve){var Se=e.display.gutterSpecs[ve].className,ze=Y.hasOwnProperty(Se)&&Y[Se];ze&&pe.appendChild(m("div",[ze],"CodeMirror-gutter-elt","left: "+x.gutterLeft[Se]+"px; width: "+x.gutterWidth[Se]+"px"))}}}function nl(e,r,S){r.alignable&&(r.alignable=null);for(var x=w("CodeMirror-linewidget"),F=r.node.firstChild,Y=void 0;F;F=Y)Y=F.nextSibling,x.test(F.className)&&r.node.removeChild(F);Ba(e,r,S)}function il(e,r,S,x){var F=Ro(e,r);return r.text=r.node=F.pre,F.bgClass&&(r.bgClass=F.bgClass),F.textClass&&(r.textClass=F.textClass),fs(e,r),Lo(e,r,S,x),Ba(e,r,x),r.node}function Ba(e,r,S){if(ua(e,r.line,r,S,!0),r.rest)for(var x=0;x<r.rest.length;x++)ua(e,r.rest[x],r,S,!1)}function ua(e,r,S,x,F){if(!r.widgets)return;for(var Y=Vi(S),le=0,pe=r.widgets;le<pe.length;++le){var ve=pe[le],Se=m("div",[ve.node],"CodeMirror-linewidget"+(ve.className?" "+ve.className:""));ve.handleMouseEvents||Se.setAttribute("cm-ignore-events","true"),fn(ve,Se,S,x),e.display.input.setUneditable(Se),F&&ve.above?Y.insertBefore(Se,S.gutter||S.text):Y.appendChild(Se),Gr(ve,"redraw")}}function fn(e,r,S,x){if(e.noHScroll){(S.alignable||(S.alignable=[])).push(r);var F=x.wrapperWidth;r.style.left=x.fixedPos+"px",e.coverGutter||(F-=x.gutterTotalWidth,r.style.paddingLeft=x.gutterTotalWidth+"px"),r.style.width=F+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-x.gutterTotalWidth+"px"))}function $a(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!g(document.body,e.node)){var S="position: relative;";e.coverGutter&&(S+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(S+="width: "+r.display.wrapper.clientWidth+"px;"),d(r.display.measure,m("div",[e.node],null,S))}return e.height=e.node.parentNode.offsetHeight}function xi(e,r){for(var S=Pe(r);S!=e.wrapper;S=S.parentNode)if(!S||S.nodeType==1&&S.getAttribute("cm-ignore-events")=="true"||S.parentNode==e.sizer&&S!=e.mover)return!0}function Za(e){return e.lineSpace.offsetTop}function Xi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ci(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=d(e.measure,m("pre","x","CodeMirror-line-like")),S=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,x={left:parseInt(S.paddingLeft),right:parseInt(S.paddingRight)};return!isNaN(x.left)&&!isNaN(x.right)&&(e.cachedPaddingH=x),x}function Ii(e){return ue-e.display.nativeBarWidth}function ci(e){return e.display.scroller.clientWidth-Ii(e)-e.display.barWidth}function On(e){return e.display.scroller.clientHeight-Ii(e)-e.display.barHeight}function al(e,r,S){var x=e.options.lineWrapping,F=x&&ci(e);if(!r.measure.heights||x&&r.measure.width!=F){var Y=r.measure.heights=[];if(x){r.measure.width=F;for(var le=r.text.firstChild.getClientRects(),pe=0;pe<le.length-1;pe++){var ve=le[pe],Se=le[pe+1];Math.abs(ve.bottom-Se.bottom)>2&&Y.push((ve.bottom+Se.top)/2-S.top)}}Y.push(S.bottom-S.top)}}function Vn(e,r,S){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var x=0;x<e.rest.length;x++)if(e.rest[x]==r)return{map:e.measure.maps[x],cache:e.measure.caches[x]};for(var F=0;F<e.rest.length;F++)if($t(e.rest[F])>S)return{map:e.measure.maps[F],cache:e.measure.caches[F],before:!0}}function ps(e,r){r=_n(r);var S=$t(r),x=e.display.externalMeasured=new Fr(e.doc,r,S);x.lineN=S;var F=x.built=Tr(e,x);return x.text=F.pre,d(e.display.lineMeasure,F.pre),x}function Ui(e,r,S,x){return Ti(e,tn(e,r),S,x)}function Aa(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[Ji(e,r)];var S=e.display.externalMeasured;if(S&&r>=S.lineN&&r<S.lineN+S.size)return S}function tn(e,r){var S=$t(r),x=Aa(e,S);x&&!x.text?x=null:x&&x.changes&&(zi(e,x,S,bs(e)),e.curOp.forceUpdate=!0),x||(x=ps(e,r));var F=Vn(x,r,S);return{line:r,view:x,rect:null,map:F.map,cache:F.cache,before:F.before,hasHeights:!1}}function Ti(e,r,S,x,F){r.before&&(S=-1);var Y=S+(x||""),le;return r.cache.hasOwnProperty(Y)?le=r.cache[Y]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(al(e,r.view,r.rect),r.hasHeights=!0),le=Do(e,r,S,x),le.bogus||(r.cache[Y]=le)),{left:le.left,right:le.right,top:F?le.rtop:le.top,bottom:F?le.rbottom:le.bottom}}var ms={left:0,right:0,top:0,bottom:0};function gs(e,r,S){for(var x,F,Y,le,pe,ve,Se=0;Se<e.length;Se+=3)if(pe=e[Se],ve=e[Se+1],r<pe?(F=0,Y=1,le="left"):r<ve?(F=r-pe,Y=F+1):(Se==e.length-3||r==ve&&e[Se+3]>r)&&(Y=ve-pe,F=Y-1,r>=ve&&(le="right")),F!=null){if(x=e[Se+2],pe==ve&&S==(x.insertLeft?"left":"right")&&(le=S),S=="left"&&F==0)for(;Se&&e[Se-2]==e[Se-3]&&e[Se-1].insertLeft;)x=e[(Se-=3)+2],le="left";if(S=="right"&&F==ve-pe)for(;Se<e.length-3&&e[Se+3]==e[Se+4]&&!e[Se+5].insertLeft;)x=e[(Se+=3)+2],le="right";break}return{node:x,start:F,end:Y,collapse:le,coverStart:pe,coverEnd:ve}}function ol(e,r){var S=ms;if(r=="left")for(var x=0;x<e.length&&!((S=e[x]).left!=S.right);x++);else for(var F=e.length-1;F>=0&&!((S=e[F]).left!=S.right);F--);return S}function Do(e,r,S,x){var F=gs(r.map,S,x),Y=F.node,le=F.start,pe=F.end,ve=F.collapse,Se;if(Y.nodeType==3){for(var ze=0;ze<4;ze++){for(;le&&Ce(r.line.text.charAt(F.coverStart+le));)--le;for(;F.coverStart+pe<F.coverEnd&&Ce(r.line.text.charAt(F.coverStart+pe));)++pe;if(R&&b<9&&le==0&&pe==F.coverEnd-F.coverStart?Se=Y.parentNode.getBoundingClientRect():Se=ol(y(Y,le,pe).getClientRects(),x),Se.left||Se.right||le==0)break;pe=le,le=le-1,ve="right"}R&&b<11&&(Se=sl(e.display.measure,Se))}else{le>0&&(ve=x="right");var Xe;e.options.lineWrapping&&(Xe=Y.getClientRects()).length>1?Se=Xe[x=="right"?Xe.length-1:0]:Se=Y.getBoundingClientRect()}if(R&&b<9&&!le&&(!Se||!Se.left&&!Se.right)){var dt=Y.parentNode.getClientRects()[0];dt?Se={left:dt.left,right:dt.left+Ia(e.display),top:dt.top,bottom:dt.bottom}:Se=ms}for(var lt=Se.top-r.rect.top,It=Se.bottom-r.rect.top,Mt=(lt+It)/2,Pt=r.view.measure.heights,Ht=0;Ht<Pt.length-1&&!(Mt<Pt[Ht]);Ht++);var Wt=Ht?Pt[Ht-1]:0,Qt=Pt[Ht],Jt={left:(ve=="right"?Se.right:Se.left)-r.rect.left,right:(ve=="left"?Se.left:Se.right)-r.rect.left,top:Wt,bottom:Qt};return!Se.left&&!Se.right&&(Jt.bogus=!0),e.options.singleCursorHeightPerLine||(Jt.rtop=lt,Jt.rbottom=It),Jt}function sl(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ne(e))return r;var S=screen.logicalXDPI/screen.deviceXDPI,x=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*S,right:r.right*S,top:r.top*x,bottom:r.bottom*x}}function vs(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var r=0;r<e.rest.length;r++)e.measure.caches[r]={}}function fi(e){e.display.externalMeasure=null,n(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)vs(e.display.view[r])}function bi(e){fi(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Pi(){return a&&u?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function jn(){return a&&u?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ri(e){var r=0;if(e.widgets)for(var S=0;S<e.widgets.length;++S)e.widgets[S].above&&(r+=$a(e.widgets[S]));return r}function qa(e,r,S,x,F){if(!F){var Y=Ri(r);S.top+=Y,S.bottom+=Y}if(x=="line")return S;x||(x="local");var le=Mn(r);if(x=="local"?le+=Za(e.display):le-=e.display.viewOffset,x=="page"||x=="window"){var pe=e.display.lineSpace.getBoundingClientRect();le+=pe.top+(x=="window"?0:jn());var ve=pe.left+(x=="window"?0:Pi());S.left+=ve,S.right+=ve}return S.top+=le,S.bottom+=le,S}function ys(e,r,S){if(S=="div")return r;var x=r.left,F=r.top;if(S=="page")x-=Pi(),F-=jn();else if(S=="local"||!S){var Y=e.display.sizer.getBoundingClientRect();x+=Y.left,F+=Y.top}var le=e.display.lineSpace.getBoundingClientRect();return{left:x-le.left,top:F-le.top}}function eo(e,r,S,x,F){return x||(x=Ft(e.doc,r.line)),qa(e,x,Ui(e,x,r.ch,F),S)}function Ei(e,r,S,x,F,Y){x=x||Ft(e.doc,r.line),F||(F=tn(e,x));function le(It,Mt){var Pt=Ti(e,F,It,Mt?"right":"left",Y);return Mt?Pt.left=Pt.right:Pt.right=Pt.left,qa(e,x,Pt,S)}var pe=xt(x,e.doc.direction),ve=r.ch,Se=r.sticky;if(ve>=x.text.length?(ve=x.text.length,Se="before"):ve<=0&&(ve=0,Se="after"),!pe)return le(Se=="before"?ve-1:ve,Se=="before");function ze(It,Mt,Pt){var Ht=pe[Mt],Wt=Ht.level==1;return le(Pt?It-1:It,Wt!=Pt)}var Xe=ut(pe,ve,Se),dt=st,lt=ze(ve,Xe,Se=="before");return dt!=null&&(lt.other=ze(ve,dt,Se!="before")),lt}function ll(e,r){var S=0;r=bt(e.doc,r),e.options.lineWrapping||(S=Ia(e.display)*r.ch);var x=Ft(e.doc,r.line),F=Mn(x)+Za(e.display);return{left:S,right:S,top:F,bottom:F+x.height}}function ca(e,r,S,x,F){var Y=be(e,r,S);return Y.xRel=F,x&&(Y.outside=x),Y}function Si(e,r,S){var x=e.doc;if(S+=e.display.viewOffset,S<0)return ca(x.first,0,null,-1,-1);var F=Xt(x,S),Y=x.first+x.size-1;if(F>Y)return ca(x.first+x.size-1,Ft(x,Y).text.length,null,1,1);r<0&&(r=0);for(var le=Ft(x,F);;){var pe=cl(e,le,F,r,S),ve=zn(le,pe.ch+(pe.xRel>0||pe.outside>0?1:0));if(!ve)return pe;var Se=ve.find(1);if(Se.line==F)return Se;le=Ft(x,F=Se.line)}}function ul(e,r,S,x){x-=Ri(r);var F=r.text.length,Y=Ye(function(le){return Ti(e,S,le-1).bottom<=x},F,0);return F=Ye(function(le){return Ti(e,S,le).top>x},Y,F),{begin:Y,end:F}}function Al(e,r,S,x){S||(S=tn(e,r));var F=qa(e,r,Ti(e,S,x),"line").top;return ul(e,r,S,F)}function Oa(e,r,S,x){return e.bottom<=S?!1:e.top>S?!0:(x?e.left:e.right)>r}function cl(e,r,S,x,F){F-=Mn(r);var Y=tn(e,r),le=Ri(r),pe=0,ve=r.text.length,Se=!0,ze=xt(r,e.doc.direction);if(ze){var Xe=(e.options.lineWrapping?yu:vu)(e,r,S,Y,ze,x,F);Se=Xe.level!=1,pe=Se?Xe.from:Xe.to-1,ve=Se?Xe.to:Xe.from-1}var dt=null,lt=null,It=Ye(function(pr){var ur=Ti(e,Y,pr);return ur.top+=le,ur.bottom+=le,Oa(ur,x,F,!1)?(ur.top<=F&&ur.left<=x&&(dt=pr,lt=ur),!0):!1},pe,ve),Mt,Pt,Ht=!1;if(lt){var Wt=x-lt.left<lt.right-x,Qt=Wt==Se;It=dt+(Qt?0:1),Pt=Qt?"after":"before",Mt=Wt?lt.left:lt.right}else{!Se&&(It==ve||It==pe)&&It++,Pt=It==0?"after":It==r.text.length?"before":Ti(e,Y,It-(Se?1:0)).bottom+le<=F==Se?"after":"before";var Jt=Ei(e,be(S,It,Pt),"line",r,Y);Mt=Jt.left,Ht=F<Jt.top?-1:F>=Jt.bottom?1:0}return It=Me(r.text,It,1),ca(S,It,Pt,Ht,x-Mt)}function vu(e,r,S,x,F,Y,le){var pe=Ye(function(Xe){var dt=F[Xe],lt=dt.level!=1;return Oa(Ei(e,be(S,lt?dt.to:dt.from,lt?"before":"after"),"line",r,x),Y,le,!0)},0,F.length-1),ve=F[pe];if(pe>0){var Se=ve.level!=1,ze=Ei(e,be(S,Se?ve.from:ve.to,Se?"after":"before"),"line",r,x);Oa(ze,Y,le,!0)&&ze.top>le&&(ve=F[pe-1])}return ve}function yu(e,r,S,x,F,Y,le){var pe=ul(e,r,x,le),ve=pe.begin,Se=pe.end;/\s/.test(r.text.charAt(Se-1))&&Se--;for(var ze=null,Xe=null,dt=0;dt<F.length;dt++){var lt=F[dt];if(lt.from>=Se||lt.to<=ve)continue;var It=lt.level!=1,Mt=Ti(e,x,It?Math.min(Se,lt.to)-1:Math.max(ve,lt.from)).right,Pt=Mt<Y?Y-Mt+1e9:Mt-Y;(!ze||Xe>Pt)&&(ze=lt,Xe=Pt)}return ze||(ze=F[F.length-1]),ze.from<ve&&(ze={from:ve,to:ze.to,level:ze.level}),ze.to>Se&&(ze={from:ze.from,to:Se,level:ze.level}),ze}var $n;function ha(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if($n==null){$n=m("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)$n.appendChild(document.createTextNode("x")),$n.appendChild(m("br"));$n.appendChild(document.createTextNode("x"))}d(e.measure,$n);var S=$n.offsetHeight/50;return S>3&&(e.cachedTextHeight=S),n(e.measure),S||1}function Ia(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=m("span","xxxxxxxxxx"),S=m("pre",[r],"CodeMirror-line-like");d(e.measure,S);var x=r.getBoundingClientRect(),F=(x.right-x.left)/10;return F>2&&(e.cachedCharWidth=F),F||10}function bs(e){for(var r=e.display,S={},x={},F=r.gutters.clientLeft,Y=r.gutters.firstChild,le=0;Y;Y=Y.nextSibling,++le){var pe=e.display.gutterSpecs[le].className;S[pe]=Y.offsetLeft+Y.clientLeft+F,x[pe]=Y.clientWidth}return{fixedPos:Ra(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:S,gutterWidth:x,wrapperWidth:r.wrapper.clientWidth}}function Ra(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function hl(e){var r=ha(e.display),S=e.options.lineWrapping,x=S&&Math.max(5,e.display.scroller.clientWidth/Ia(e.display)-3);return function(F){if(Bn(e.doc,F))return 0;var Y=0;if(F.widgets)for(var le=0;le<F.widgets.length;le++)F.widgets[le].height&&(Y+=F.widgets[le].height);return S?Y+(Math.ceil(F.text.length/x)||1)*r:Y+r}}function Mo(e){var r=e.doc,S=hl(e);r.iter(function(x){var F=S(x);F!=x.height&&Kt(x,F)})}function Yi(e,r,S,x){var F=e.display;if(!S&&Pe(r).getAttribute("cm-not-content")=="true")return null;var Y,le,pe=F.lineSpace.getBoundingClientRect();try{Y=r.clientX-pe.left,le=r.clientY-pe.top}catch(Xe){return null}var ve=Si(e,Y,le),Se;if(x&&ve.xRel>0&&(Se=Ft(e.doc,ve.line).text).length==ve.ch){var ze=J(Se,Se.length,e.options.tabSize)-Se.length;ve=be(ve.line,Math.max(0,Math.round((Y-Ci(e.display).left)/Ia(e.display))-ze))}return ve}function Ji(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var S=e.display.view,x=0;x<S.length;x++)if(r-=S[x].size,r<0)return x}function ti(e,r,S,x){r==null&&(r=e.doc.first),S==null&&(S=e.doc.first+e.doc.size),x||(x=0);var F=e.display;if(x&&S<F.viewTo&&(F.updateLineNumbers==null||F.updateLineNumbers>r)&&(F.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=F.viewTo)Mr&&$r(e.doc,r)<F.viewTo&&Ni(e);else if(S<=F.viewFrom)Mr&&In(e.doc,S+x)>F.viewFrom?Ni(e):(F.viewFrom+=x,F.viewTo+=x);else if(r<=F.viewFrom&&S>=F.viewTo)Ni(e);else if(r<=F.viewFrom){var Y=to(e,S,S+x,1);Y?(F.view=F.view.slice(Y.index),F.viewFrom=Y.lineN,F.viewTo+=x):Ni(e)}else if(S>=F.viewTo){var le=to(e,r,r,-1);le?(F.view=F.view.slice(0,le.index),F.viewTo=le.lineN):Ni(e)}else{var pe=to(e,r,r,-1),ve=to(e,S,S+x,1);pe&&ve?(F.view=F.view.slice(0,pe.index).concat(Hn(e,pe.lineN,ve.lineN)).concat(F.view.slice(ve.index)),F.viewTo+=x):Ni(e)}var Se=F.externalMeasured;Se&&(S<Se.lineN?Se.lineN+=x:r<Se.lineN+Se.size&&(F.externalMeasured=null))}function ki(e,r,S){e.curOp.viewChanged=!0;var x=e.display,F=e.display.externalMeasured;if(F&&r>=F.lineN&&r<F.lineN+F.size&&(x.externalMeasured=null),r<x.viewFrom||r>=x.viewTo)return;var Y=x.view[Ji(e,r)];if(Y.node==null)return;var le=Y.changes||(Y.changes=[]);ne(le,S)==-1&&le.push(S)}function Ni(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function to(e,r,S,x){var F=Ji(e,r),Y,le=e.display.view;if(!Mr||S==e.doc.first+e.doc.size)return{index:F,lineN:S};for(var pe=e.display.viewFrom,ve=0;ve<F;ve++)pe+=le[ve].size;if(pe!=r){if(x>0){if(F==le.length-1)return null;Y=pe+le[F].size-r,F++}else Y=pe-r;r+=Y,S+=Y}for(;$r(e.doc,S)!=S;){if(F==(x<0?0:le.length-1))return null;S+=x*le[F-(x<0?1:0)].size,F+=x}return{index:F,lineN:S}}function dl(e,r,S){var x=e.display,F=x.view;F.length==0||r>=x.viewTo||S<=x.viewFrom?(x.view=Hn(e,r,S),x.viewFrom=r):(x.viewFrom>r?x.view=Hn(e,r,x.viewFrom).concat(x.view):x.viewFrom<r&&(x.view=x.view.slice(Ji(e,r))),x.viewFrom=r,x.viewTo<S?x.view=x.view.concat(Hn(e,x.viewTo,S)):x.viewTo>S&&(x.view=x.view.slice(0,Ji(e,S)))),x.viewTo=S}function fl(e){for(var r=e.display.view,S=0,x=0;x<r.length;x++){var F=r[x];!F.hidden&&(!F.node||F.changes)&&++S}return S}function $i(e){e.display.input.showSelection(e.display.input.prepareSelection())}function pl(e,r){r===void 0&&(r=!0);for(var S=e.doc,x={},F=x.cursors=document.createDocumentFragment(),Y=x.selection=document.createDocumentFragment(),le=0;le<S.sel.ranges.length;le++){if(!r&&le==S.sel.primIndex)continue;var pe=S.sel.ranges[le];if(pe.from().line>=e.display.viewTo||pe.to().line<e.display.viewFrom)continue;var ve=pe.empty();(ve||e.options.showCursorWhenSelecting)&&ml(e,pe.head,F),ve||bu(e,pe,Y)}return x}function ml(e,r,S){var x=Ei(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),F=S.appendChild(m("div","\xA0","CodeMirror-cursor"));if(F.style.left=x.left+"px",F.style.top=x.top+"px",F.style.height=Math.max(0,x.bottom-x.top)*e.options.cursorHeight+"px",x.other){var Y=S.appendChild(m("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Y.style.display="",Y.style.left=x.other.left+"px",Y.style.top=x.other.top+"px",Y.style.height=(x.other.bottom-x.other.top)*.85+"px"}}function La(e,r){return e.top-r.top||e.left-r.left}function bu(e,r,S){var x=e.display,F=e.doc,Y=document.createDocumentFragment(),le=Ci(e.display),pe=le.left,ve=Math.max(x.sizerWidth,ci(e)-x.sizer.offsetLeft)-le.right,Se=F.direction=="ltr";function ze(Qt,Jt,pr,ur){Jt<0&&(Jt=0),Jt=Math.round(Jt),ur=Math.round(ur),Y.appendChild(m("div",null,"CodeMirror-selected","position: absolute; left: "+Qt+`px;
|
|
top: `+Jt+"px; width: "+(pr==null?ve-Qt:pr)+`px;
|
|
height: `+(ur-Jt)+"px"))}function Xe(Qt,Jt,pr){var ur=Ft(F,Qt),Lr=ur.text.length,pn,Wn;function Cn(Ln,ei){return eo(e,be(Qt,Ln),"div",ur,ei)}function di(Ln,ei,Xn){var Nt=Al(e,ur,null,Ln),vn=ei=="ltr"==(Xn=="after")?"left":"right",yn=Xn=="after"?Nt.begin:Nt.end-(/\s/.test(ur.text.charAt(Nt.end-1))?2:1);return Cn(yn,vn)[vn]}var qn=xt(ur,F.direction);return et(qn,Jt||0,pr==null?Lr:pr,function(Ln,ei,Xn,Nt){var vn=Xn=="ltr",yn=Cn(Ln,vn?"left":"right"),bn=Cn(ei-1,vn?"right":"left"),Wa=Jt==null&&Ln==0,Qr=pr==null&&ei==Lr,Pr=Nt==0,vi=!qn||Nt==qn.length-1;if(bn.top-yn.top<=3){var Gn=(Se?Wa:Qr)&&Pr,Ga=(Se?Qr:Wa)&&vi,Gi=Gn?pe:(vn?yn:bn).left,Mi=Ga?ve:(vn?bn:yn).right;ze(Gi,yn.top,Mi-Gi,yn.bottom)}else{var xa,ii,Ca,tl;vn?(xa=Se&&Wa&&Pr?pe:yn.left,ii=Se?ve:di(Ln,Xn,"before"),Ca=Se?pe:di(ei,Xn,"after"),tl=Se&&Qr&&vi?ve:bn.right):(xa=Se?di(Ln,Xn,"before"):pe,ii=!Se&&Wa&&Pr?ve:yn.right,Ca=!Se&&Qr&&vi?pe:bn.left,tl=Se?di(ei,Xn,"after"):ve),ze(xa,yn.top,ii-xa,yn.bottom),yn.bottom<bn.top&&ze(pe,yn.bottom,null,bn.top),ze(Ca,bn.top,tl-Ca,bn.bottom)}(!pn||La(yn,pn)<0)&&(pn=yn),La(bn,pn)<0&&(pn=bn),(!Wn||La(yn,Wn)<0)&&(Wn=yn),La(bn,Wn)<0&&(Wn=bn)}),{start:pn,end:Wn}}var dt=r.from(),lt=r.to();if(dt.line==lt.line)Xe(dt.line,dt.ch,lt.ch);else{var It=Ft(F,dt.line),Mt=Ft(F,lt.line),Pt=_n(It)==_n(Mt),Ht=Xe(dt.line,dt.ch,Pt?It.text.length+1:null).end,Wt=Xe(lt.line,Pt?0:null,lt.ch).start;Pt&&(Ht.top<Wt.top-2?(ze(Ht.right,Ht.top,null,Ht.bottom),ze(pe,Wt.top,Wt.left,Wt.bottom)):ze(Ht.right,Ht.top,Wt.left-Ht.right,Ht.bottom)),Ht.bottom<Wt.top&&ze(pe,Ht.bottom,null,Wt.top)}S.appendChild(Y)}function Fo(e){if(!e.state.focused)return;var r=e.display;clearInterval(r.blinker);var S=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||Da(e),r.cursorDiv.style.visibility=(S=!S)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function gl(e){e.state.focused||(e.display.input.focus(),Es(e))}function vl(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Da(e))},100)}function Es(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(we(e,"focus",e,r),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),t&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Fo(e)}function Da(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(we(e,"blur",e,r),e.state.focused=!1,p(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Uo(e){for(var r=e.display,S=r.lineDiv.offsetTop,x=0;x<r.view.length;x++){var F=r.view[x],Y=e.options.lineWrapping,le=void 0,pe=0;if(F.hidden)continue;if(R&&b<8){var ve=F.node.offsetTop+F.node.offsetHeight;le=ve-S,S=ve}else{var Se=F.node.getBoundingClientRect();le=Se.bottom-Se.top,!Y&&F.text.firstChild&&(pe=F.text.firstChild.getBoundingClientRect().right-Se.left-1)}var ze=F.line.height-le;if((ze>.005||ze<-.005)&&(Kt(F.line,le),da(F.line),F.rest))for(var Xe=0;Xe<F.rest.length;Xe++)da(F.rest[Xe]);if(pe>e.display.sizerWidth){var dt=Math.ceil(pe/Ia(e.display));dt>e.display.maxLineLength&&(e.display.maxLineLength=dt,e.display.maxLine=F.line,e.display.maxLineChanged=!0)}}}function da(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var S=e.widgets[r],x=S.node.parentNode;x&&(S.height=x.offsetHeight)}}function Po(e,r,S){var x=S&&S.top!=null?Math.max(0,S.top):e.scroller.scrollTop;x=Math.floor(x-Za(e));var F=S&&S.bottom!=null?S.bottom:x+e.wrapper.clientHeight,Y=Xt(r,x),le=Xt(r,F);if(S&&S.ensure){var pe=S.ensure.from.line,ve=S.ensure.to.line;pe<Y?(Y=pe,le=Xt(r,Mn(Ft(r,pe))+e.wrapper.clientHeight)):Math.min(ve,r.lastLine())>=le&&(Y=Xt(r,Mn(Ft(r,ve))-e.wrapper.clientHeight),le=ve)}return{from:Y,to:Math.max(le,Y+1)}}function Eu(e,r){if(he(e,"scrollCursorIntoView"))return;var S=e.display,x=S.sizer.getBoundingClientRect(),F=null;if(r.top+x.top<0?F=!0:r.bottom+x.top>(window.innerHeight||document.documentElement.clientHeight)&&(F=!1),F!=null&&!o){var Y=m("div","\u200B",null,`position: absolute;
|
|
top: `+(r.top-S.viewOffset-Za(e.display))+`px;
|
|
height: `+(r.bottom-r.top+Ii(e)+S.barHeight)+`px;
|
|
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(Y),Y.scrollIntoView(F),e.display.lineSpace.removeChild(Y)}}function ko(e,r,S,x){x==null&&(x=0);var F;!e.options.lineWrapping&&r==S&&(r=r.ch?be(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,S=r.sticky=="before"?be(r.line,r.ch+1,"before"):r);for(var Y=0;Y<5;Y++){var le=!1,pe=Ei(e,r),ve=!S||S==r?pe:Ei(e,S);F={left:Math.min(pe.left,ve.left),top:Math.min(pe.top,ve.top)-x,right:Math.max(pe.left,ve.left),bottom:Math.max(pe.bottom,ve.bottom)+x};var Se=ws(e,F),ze=e.doc.scrollTop,Xe=e.doc.scrollLeft;if(Se.scrollTop!=null&&(ro(e,Se.scrollTop),Math.abs(e.doc.scrollTop-ze)>1&&(le=!0)),Se.scrollLeft!=null&&(fa(e,Se.scrollLeft),Math.abs(e.doc.scrollLeft-Xe)>1&&(le=!0)),!le)break}return F}function wu(e,r){var S=ws(e,r);S.scrollTop!=null&&ro(e,S.scrollTop),S.scrollLeft!=null&&fa(e,S.scrollLeft)}function ws(e,r){var S=e.display,x=ha(e.display);r.top<0&&(r.top=0);var F=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:S.scroller.scrollTop,Y=On(e),le={};r.bottom-r.top>Y&&(r.bottom=r.top+Y);var pe=e.doc.height+Xi(S),ve=r.top<x,Se=r.bottom>pe-x;if(r.top<F)le.scrollTop=ve?0:r.top;else if(r.bottom>F+Y){var ze=Math.min(r.top,(Se?pe:r.bottom)-Y);ze!=F&&(le.scrollTop=ze)}var Xe=e.options.fixedGutter?0:S.gutters.offsetWidth,dt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:S.scroller.scrollLeft-Xe,lt=ci(e)-S.gutters.offsetWidth,It=r.right-r.left>lt;return It&&(r.right=r.left+lt),r.left<10?le.scrollLeft=0:r.left<dt?le.scrollLeft=Math.max(0,r.left+Xe-(It?0:10)):r.right>lt+dt-3&&(le.scrollLeft=r.right+(It?0:10)-lt),le}function _s(e,r){if(r==null)return;No(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Ma(e){No(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Zi(e,r,S){(r!=null||S!=null)&&No(e),r!=null&&(e.curOp.scrollLeft=r),S!=null&&(e.curOp.scrollTop=S)}function _u(e,r){No(e),e.curOp.scrollToPos=r}function No(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var S=ll(e,r.from),x=ll(e,r.to);yl(e,S,x,r.margin)}}function yl(e,r,S,x){var F=ws(e,{left:Math.min(r.left,S.left),top:Math.min(r.top,S.top)-x,right:Math.max(r.right,S.right),bottom:Math.max(r.bottom,S.bottom)+x});Zi(e,F.scrollLeft,F.scrollTop)}function ro(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;O||Fa(e,{top:r}),no(e,r,!0),O&&Fa(e),va(e,100)}function no(e,r,S){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!S)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function fa(e,r,S,x){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(S?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!x)return;e.doc.scrollLeft=r,xl(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function io(e){var r=e.display,S=r.gutters.offsetWidth,x=Math.round(e.doc.height+Xi(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?S:0,docHeight:x,scrollHeight:x+Ii(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:S}}var pa=function(e,r,S){this.cm=S;var x=this.vert=m("div",[m("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),F=this.horiz=m("div",[m("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");x.tabIndex=F.tabIndex=-1,e(x),e(F),He(x,"scroll",function(){x.clientHeight&&r(x.scrollTop,"vertical")}),He(F,"scroll",function(){F.clientWidth&&r(F.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,R&&b<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,S=e.scrollHeight>e.clientHeight+1,x=e.nativeBarWidth;if(S){this.vert.style.display="block",this.vert.style.bottom=r?x+"px":"0";var F=e.viewHeight-(r?x:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+F)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=S?x+"px":"0",this.horiz.style.left=e.barLeft+"px";var Y=e.viewWidth-e.barLeft-(S?x:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+Y)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(x==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:S?x:0,bottom:r?x:0}},pa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var e=i&&!s?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new X,this.disableVert=new X},pa.prototype.enableZeroWidthBar=function(e,r,S){e.style.pointerEvents="auto";function x(){var F=e.getBoundingClientRect(),Y=S=="vert"?document.elementFromPoint(F.right-1,(F.top+F.bottom)/2):document.elementFromPoint((F.right+F.left)/2,F.bottom-1);Y!=e?e.style.pointerEvents="none":r.set(1e3,x)}r.set(1e3,x)},pa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ao=function(){};ao.prototype.update=function(){return{bottom:0,right:0}},ao.prototype.setScrollLeft=function(){},ao.prototype.setScrollTop=function(){},ao.prototype.clear=function(){};function Hi(e,r){r||(r=io(e));var S=e.display.barWidth,x=e.display.barHeight;bl(e,r);for(var F=0;F<4&&S!=e.display.barWidth||x!=e.display.barHeight;F++)S!=e.display.barWidth&&e.options.lineWrapping&&Uo(e),bl(e,io(e)),S=e.display.barWidth,x=e.display.barHeight}function bl(e,r){var S=e.display,x=S.scrollbars.update(r);S.sizer.style.paddingRight=(S.barWidth=x.right)+"px",S.sizer.style.paddingBottom=(S.barHeight=x.bottom)+"px",S.heightForcer.style.borderBottom=x.bottom+"px solid transparent",x.right&&x.bottom?(S.scrollbarFiller.style.display="block",S.scrollbarFiller.style.height=x.bottom+"px",S.scrollbarFiller.style.width=x.right+"px"):S.scrollbarFiller.style.display="",x.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(S.gutterFiller.style.display="block",S.gutterFiller.style.height=x.bottom+"px",S.gutterFiller.style.width=r.gutterWidth+"px"):S.gutterFiller.style.display=""}var El={native:pa,null:ao};function wl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&p(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new El[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),He(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,S){S=="horizontal"?fa(e,r):ro(e,r)},e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var xu=0;function ma(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:++xu},ui(e.curOp)}function ga(e){var r=e.curOp;r&&Jr(r,function(S){for(var x=0;x<S.ops.length;x++)S.ops[x].cm.curOp=null;Cu(S)})}function Cu(e){for(var r=e.ops,S=0;S<r.length;S++)Tu(r[S]);for(var x=0;x<r.length;x++)Su(r[x]);for(var F=0;F<r.length;F++)Bu(r[F]);for(var Y=0;Y<r.length;Y++)Ho(r[Y]);for(var le=0;le<r.length;le++)Ou(r[le])}function Tu(e){var r=e.cm,S=r.display;Iu(r),e.updateMaxLine&&Fn(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<S.viewFrom||e.scrollToPos.to.line>=S.viewTo)||S.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new jo(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Su(e){e.updatedDisplay=e.mustUpdate&&xs(e.cm,e.update)}function Bu(e){var r=e.cm,S=r.display;e.updatedDisplay&&Uo(r),e.barMeasure=io(r),S.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Ui(r,S.maxLine,S.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(S.scroller.clientWidth,S.sizer.offsetLeft+e.adjustWidthTo+Ii(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,S.sizer.offsetLeft+e.adjustWidthTo-ci(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=S.input.prepareSelection())}function Ho(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&fa(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var S=e.focus&&e.focus==U();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,S),(e.updatedDisplay||e.startHeight!=r.doc.height)&&Hi(r,e.barMeasure),e.updatedDisplay&&Ts(r,e.barMeasure),e.selectionChanged&&Fo(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),S&&gl(e.cm)}function Ou(e){var r=e.cm,S=r.display,x=r.doc;if(e.updatedDisplay&&_l(r,e.update),S.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(S.wheelStartX=S.wheelStartY=null),e.scrollTop!=null&&no(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&fa(r,e.scrollLeft,!0,!0),e.scrollToPos){var F=ko(r,bt(x,e.scrollToPos.from),bt(x,e.scrollToPos.to),e.scrollToPos.margin);Eu(r,F)}var Y=e.maybeHiddenMarkers,le=e.maybeUnhiddenMarkers;if(Y)for(var pe=0;pe<Y.length;++pe)Y[pe].lines.length||we(Y[pe],"hide");if(le)for(var ve=0;ve<le.length;++ve)le[ve].lines.length&&we(le[ve],"unhide");S.wrapper.offsetHeight&&(x.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&we(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function hi(e,r){if(e.curOp)return r();ma(e);try{return r()}finally{ga(e)}}function Pn(e,r){return function(){if(e.curOp)return r.apply(e,arguments);ma(e);try{return r.apply(e,arguments)}finally{ga(e)}}}function ri(e){return function(){if(this.curOp)return e.apply(this,arguments);ma(this);try{return e.apply(this,arguments)}finally{ga(this)}}}function Kn(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);ma(r);try{return e.apply(this,arguments)}finally{ga(r)}}}function va(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,K(Qo,e))}function Qo(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var S=+new Date+e.options.workTime,x=br(e,r.highlightFrontier),F=[];r.iter(x.line,Math.min(r.first+r.size,e.display.viewTo+500),function(Y){if(x.line>=e.display.viewFrom){var le=Y.styles,pe=Y.text.length>e.options.maxHighlightLength?Dt(r.mode,x.state):null,ve=gr(e,Y,x,!0);pe&&(x.state=pe),Y.styles=ve.styles;var Se=Y.styleClasses,ze=ve.classes;ze?Y.styleClasses=ze:Se&&(Y.styleClasses=null);for(var Xe=!le||le.length!=Y.styles.length||Se!=ze&&(!Se||!ze||Se.bgClass!=ze.bgClass||Se.textClass!=ze.textClass),dt=0;!Xe&&dt<le.length;++dt)Xe=le[dt]!=Y.styles[dt];Xe&&F.push(x.line),Y.stateAfter=x.save(),x.nextLine()}else Y.text.length<=e.options.maxHighlightLength&&Cr(e,Y.text,x),Y.stateAfter=x.line%5==0?x.save():null,x.nextLine();if(+new Date>S)return va(e,e.options.workDelay),!0}),r.highlightFrontier=x.line,r.modeFrontier=Math.max(r.modeFrontier,x.line),F.length&&hi(e,function(){for(var Y=0;Y<F.length;Y++)ki(e,F[Y],"text")})}var jo=function(e,r,S){var x=e.display;this.viewport=r,this.visible=Po(x,e.doc,r),this.editorIsHidden=!x.wrapper.offsetWidth,this.wrapperHeight=x.wrapper.clientHeight,this.wrapperWidth=x.wrapper.clientWidth,this.oldDisplayWidth=ci(e),this.force=S,this.dims=bs(e),this.events=[]};jo.prototype.signal=function(e,r){ge(e,r)&&this.events.push(arguments)},jo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)we.apply(null,this.events[e])};function Iu(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Ii(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Ii(e)+"px",r.scrollbarsClipped=!0)}function Ru(e){if(e.hasFocus())return null;var r=U();if(!r||!g(e.display.lineDiv,r))return null;var S={activeElt:r};if(window.getSelection){var x=window.getSelection();x.anchorNode&&x.extend&&g(e.display.lineDiv,x.anchorNode)&&(S.anchorNode=x.anchorNode,S.anchorOffset=x.anchorOffset,S.focusNode=x.focusNode,S.focusOffset=x.focusOffset)}return S}function Lu(e){if(!e||!e.activeElt||e.activeElt==U())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&g(document.body,e.anchorNode)&&g(document.body,e.focusNode)){var r=window.getSelection(),S=document.createRange();S.setEnd(e.anchorNode,e.anchorOffset),S.collapse(!1),r.removeAllRanges(),r.addRange(S),r.extend(e.focusNode,e.focusOffset)}}function xs(e,r){var S=e.display,x=e.doc;if(r.editorIsHidden)return Ni(e),!1;if(!r.force&&r.visible.from>=S.viewFrom&&r.visible.to<=S.viewTo&&(S.updateLineNumbers==null||S.updateLineNumbers>=S.viewTo)&&S.renderedView==S.view&&fl(e)==0)return!1;Cl(e)&&(Ni(e),r.dims=bs(e));var F=x.first+x.size,Y=Math.max(r.visible.from-e.options.viewportMargin,x.first),le=Math.min(F,r.visible.to+e.options.viewportMargin);S.viewFrom<Y&&Y-S.viewFrom<20&&(Y=Math.max(x.first,S.viewFrom)),S.viewTo>le&&S.viewTo-le<20&&(le=Math.min(F,S.viewTo)),Mr&&(Y=$r(e.doc,Y),le=In(e.doc,le));var pe=Y!=S.viewFrom||le!=S.viewTo||S.lastWrapHeight!=r.wrapperHeight||S.lastWrapWidth!=r.wrapperWidth;dl(e,Y,le),S.viewOffset=Mn(Ft(e.doc,S.viewFrom)),e.display.mover.style.top=S.viewOffset+"px";var ve=fl(e);if(!pe&&ve==0&&!r.force&&S.renderedView==S.view&&(S.updateLineNumbers==null||S.updateLineNumbers>=S.viewTo))return!1;var Se=Ru(e);return ve>4&&(S.lineDiv.style.display="none"),Du(e,S.updateLineNumbers,r.dims),ve>4&&(S.lineDiv.style.display=""),S.renderedView=S.view,Lu(Se),n(S.cursorDiv),n(S.selectionDiv),S.gutters.style.height=S.sizer.style.minHeight=0,pe&&(S.lastWrapHeight=r.wrapperHeight,S.lastWrapWidth=r.wrapperWidth,va(e,400)),S.updateLineNumbers=null,!0}function _l(e,r){for(var S=r.viewport,x=!0;;x=!1){if(!x||!e.options.lineWrapping||r.oldDisplayWidth==ci(e)){if(S&&S.top!=null&&(S={top:Math.min(e.doc.height+Xi(e.display)-On(e),S.top)}),r.visible=Po(e.display,e.doc,S),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else x&&(r.visible=Po(e.display,e.doc,S));if(!xs(e,r))break;Uo(e);var F=io(e);$i(e),Hi(e,F),Ts(e,F),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Fa(e,r){var S=new jo(e,r);if(xs(e,S)){Uo(e),_l(e,S);var x=io(e);$i(e),Hi(e,x),Ts(e,x),S.finish()}}function Du(e,r,S){var x=e.display,F=e.options.lineNumbers,Y=x.lineDiv,le=Y.firstChild;function pe(It){var Mt=It.nextSibling;return t&&i&&e.display.currentWheelTarget==It?It.style.display="none":It.parentNode.removeChild(It),Mt}for(var ve=x.view,Se=x.viewFrom,ze=0;ze<ve.length;ze++){var Xe=ve[ze];if(!Xe.hidden)if(!Xe.node||Xe.node.parentNode!=Y){var dt=il(e,Xe,Se,S);Y.insertBefore(dt,le)}else{for(;le!=Xe.node;)le=pe(le);var lt=F&&r!=null&&r<=Se&&Xe.lineNumber;Xe.changes&&(ne(Xe.changes,"gutter")>-1&&(lt=!1),zi(e,Xe,Se,S)),lt&&(n(Xe.lineNumber),Xe.lineNumber.appendChild(document.createTextNode(Br(e.options,Se)))),le=Xe.node.nextSibling}Se+=Xe.size}for(;le;)le=pe(le)}function Cs(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Ts(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+Ii(e)+"px"}function xl(e){var r=e.display,S=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var x=Ra(r)-r.scroller.scrollLeft+e.doc.scrollLeft,F=r.gutters.offsetWidth,Y=x+"px",le=0;le<S.length;le++)if(!S[le].hidden){e.options.fixedGutter&&(S[le].gutter&&(S[le].gutter.style.left=Y),S[le].gutterBackground&&(S[le].gutterBackground.style.left=Y));var pe=S[le].alignable;if(pe)for(var ve=0;ve<pe.length;ve++)pe[ve].style.left=Y}e.options.fixedGutter&&(r.gutters.style.left=x+F+"px")}function Cl(e){if(!e.options.lineNumbers)return!1;var r=e.doc,S=Br(e.options,r.first+r.size-1),x=e.display;if(S.length!=x.lineNumChars){var F=x.measure.appendChild(m("div",[m("div",S)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Y=F.firstChild.offsetWidth,le=F.offsetWidth-Y;return x.lineGutter.style.width="",x.lineNumInnerWidth=Math.max(Y,x.lineGutter.offsetWidth-le)+1,x.lineNumWidth=x.lineNumInnerWidth+le,x.lineNumChars=x.lineNumInnerWidth?S.length:-1,x.lineGutter.style.width=x.lineNumWidth+"px",Cs(e.display),!0}return!1}function Ss(e,r){for(var S=[],x=!1,F=0;F<e.length;F++){var Y=e[F],le=null;if(typeof Y!="string"&&(le=Y.style,Y=Y.className),Y=="CodeMirror-linenumbers")if(r)x=!0;else continue;S.push({className:Y,style:le})}return r&&!x&&S.push({className:"CodeMirror-linenumbers",style:null}),S}function Tl(e){var r=e.gutters,S=e.gutterSpecs;n(r),e.lineGutter=null;for(var x=0;x<S.length;++x){var F=S[x],Y=F.className,le=F.style,pe=r.appendChild(m("div",null,"CodeMirror-gutter "+Y));le&&(pe.style.cssText=le),Y=="CodeMirror-linenumbers"&&(e.lineGutter=pe,pe.style.width=(e.lineNumWidth||1)+"px")}r.style.display=S.length?"":"none",Cs(e)}function oo(e){Tl(e.display),ti(e),xl(e)}function Mu(e,r,S,x){var F=this;this.input=S,F.scrollbarFiller=m("div",null,"CodeMirror-scrollbar-filler"),F.scrollbarFiller.setAttribute("cm-not-content","true"),F.gutterFiller=m("div",null,"CodeMirror-gutter-filler"),F.gutterFiller.setAttribute("cm-not-content","true"),F.lineDiv=T("div",null,"CodeMirror-code"),F.selectionDiv=m("div",null,null,"position: relative; z-index: 1"),F.cursorDiv=m("div",null,"CodeMirror-cursors"),F.measure=m("div",null,"CodeMirror-measure"),F.lineMeasure=m("div",null,"CodeMirror-measure"),F.lineSpace=T("div",[F.measure,F.lineMeasure,F.selectionDiv,F.cursorDiv,F.lineDiv],null,"position: relative; outline: none");var Y=T("div",[F.lineSpace],"CodeMirror-lines");F.mover=m("div",[Y],null,"position: relative"),F.sizer=m("div",[F.mover],"CodeMirror-sizer"),F.sizerWidth=null,F.heightForcer=m("div",null,null,"position: absolute; height: "+ue+"px; width: 1px;"),F.gutters=m("div",null,"CodeMirror-gutters"),F.lineGutter=null,F.scroller=m("div",[F.sizer,F.heightForcer,F.gutters],"CodeMirror-scroll"),F.scroller.setAttribute("tabIndex","-1"),F.wrapper=m("div",[F.scrollbarFiller,F.gutterFiller,F.scroller],"CodeMirror"),R&&b<8&&(F.gutters.style.zIndex=-1,F.scroller.style.paddingRight=0),!t&&!(O&&c)&&(F.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(F.wrapper):e(F.wrapper)),F.viewFrom=F.viewTo=r.first,F.reportedViewFrom=F.reportedViewTo=r.first,F.view=[],F.renderedView=null,F.externalMeasured=null,F.viewOffset=0,F.lastWrapHeight=F.lastWrapWidth=0,F.updateLineNumbers=null,F.nativeBarWidth=F.barHeight=F.barWidth=0,F.scrollbarsClipped=!1,F.lineNumWidth=F.lineNumInnerWidth=F.lineNumChars=null,F.alignWidgets=!1,F.cachedCharWidth=F.cachedTextHeight=F.cachedPaddingH=null,F.maxLine=null,F.maxLineLength=0,F.maxLineChanged=!1,F.wheelDX=F.wheelDY=F.wheelStartX=F.wheelStartY=null,F.shift=!1,F.selForContextMenu=null,F.activeTouch=null,F.gutterSpecs=Ss(x.gutters,x.lineNumbers),Tl(F),S.init(F)}var Ko=0,pi=null;R?pi=-.53:O?pi=15:a?pi=-.7:h&&(pi=-1/3);function Sl(e){var r=e.wheelDeltaX,S=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),S==null&&e.detail&&e.axis==e.VERTICAL_AXIS?S=e.detail:S==null&&(S=e.wheelDelta),{x:r,y:S}}function Bl(e){var r=Sl(e);return r.x*=pi,r.y*=pi,r}function Ol(e,r){var S=Sl(r),x=S.x,F=S.y,Y=e.display,le=Y.scroller,pe=le.scrollWidth>le.clientWidth,ve=le.scrollHeight>le.clientHeight;if(!(x&&pe||F&&ve))return;if(F&&i&&t){e:for(var Se=r.target,ze=Y.view;Se!=le;Se=Se.parentNode)for(var Xe=0;Xe<ze.length;Xe++)if(ze[Xe].node==Se){e.display.currentWheelTarget=Se;break e}}if(x&&!O&&!A&&pi!=null){F&&ve&&ro(e,Math.max(0,le.scrollTop+F*pi)),fa(e,Math.max(0,le.scrollLeft+x*pi)),(!F||F&&ve)&&me(r),Y.wheelStartX=null;return}if(F&&pi!=null){var dt=F*pi,lt=e.doc.scrollTop,It=lt+Y.wrapper.clientHeight;dt<0?lt=Math.max(0,lt+dt-50):It=Math.min(e.doc.height,It+dt+50),Fa(e,{top:lt,bottom:It})}Ko<20&&(Y.wheelStartX==null?(Y.wheelStartX=le.scrollLeft,Y.wheelStartY=le.scrollTop,Y.wheelDX=x,Y.wheelDY=F,setTimeout(function(){if(Y.wheelStartX==null)return;var Mt=le.scrollLeft-Y.wheelStartX,Pt=le.scrollTop-Y.wheelStartY,Ht=Pt&&Y.wheelDY&&Pt/Y.wheelDY||Mt&&Y.wheelDX&&Mt/Y.wheelDX;if(Y.wheelStartX=Y.wheelStartY=null,!Ht)return;pi=(pi*Ko+Ht)/(Ko+1),++Ko},200)):(Y.wheelDX+=x,Y.wheelDY+=F))}var mi=function(e,r){this.ranges=e,this.primIndex=r};mi.prototype.primary=function(){return this.ranges[this.primIndex]},mi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var S=this.ranges[r],x=e.ranges[r];if(!ke(S.anchor,x.anchor)||!ke(S.head,x.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new Zr(Ze(this.ranges[r].anchor),Ze(this.ranges[r].head));return new mi(e,this.primIndex)},mi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},mi.prototype.contains=function(e,r){r||(r=e);for(var S=0;S<this.ranges.length;S++){var x=this.ranges[S];if(Be(r,x.from())>=0&&Be(e,x.to())<=0)return S}return-1};var Zr=function(e,r){this.anchor=e,this.head=r};Zr.prototype.from=function(){return Ot(this.anchor,this.head)},Zr.prototype.to=function(){return Je(this.anchor,this.head)},Zr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function oi(e,r,S){var x=e&&e.options.selectionsMayTouch,F=r[S];r.sort(function(dt,lt){return Be(dt.from(),lt.from())}),S=ne(r,F);for(var Y=1;Y<r.length;Y++){var le=r[Y],pe=r[Y-1],ve=Be(pe.to(),le.from());if(x&&!le.empty()?ve>0:ve>=0){var Se=Ot(pe.from(),le.from()),ze=Je(pe.to(),le.to()),Xe=pe.empty()?le.from()==le.head:pe.from()==pe.head;Y<=S&&--S,r.splice(--Y,2,new Zr(Xe?ze:Se,Xe?Se:ze))}}return new mi(r,S)}function qi(e,r){return new mi([new Zr(e,r||e)],0)}function ea(e){return e.text?be(e.from.line+e.text.length-1,V(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Bs(e,r){if(Be(e,r.from)<0)return e;if(Be(e,r.to)<=0)return ea(r);var S=e.line+r.text.length-(r.to.line-r.from.line)-1,x=e.ch;return e.line==r.to.line&&(x+=ea(r).ch-r.to.ch),be(S,x)}function Os(e,r){for(var S=[],x=0;x<e.sel.ranges.length;x++){var F=e.sel.ranges[x];S.push(new Zr(Bs(F.anchor,r),Bs(F.head,r)))}return oi(e.cm,S,e.sel.primIndex)}function Il(e,r,S){return e.line==r.line?be(S.line,e.ch-r.ch+S.ch):be(S.line+(e.line-r.line),e.ch)}function Fu(e,r,S){for(var x=[],F=be(e.first,0),Y=F,le=0;le<r.length;le++){var pe=r[le],ve=Il(pe.from,F,Y),Se=Il(ea(pe),F,Y);if(F=pe.to,Y=Se,S=="around"){var ze=e.sel.ranges[le],Xe=Be(ze.head,ze.anchor)<0;x[le]=new Zr(Xe?Se:ve,Xe?ve:Se)}else x[le]=new Zr(ve,ve)}return new mi(x,e.sel.primIndex)}function Is(e){e.doc.mode=vt(e.options,e.doc.modeOption),so(e)}function so(e){e.doc.iter(function(r){r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,va(e,100),e.state.modeGen++,e.curOp&&ti(e)}function Rl(e,r){return r.from.ch==0&&r.to.ch==0&&V(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Rs(e,r,S,x){function F(Wt){return S?S[Wt]:null}function Y(Wt,Qt,Jt){Un(Wt,Qt,Jt,x),Gr(Wt,"change",Wt,r)}function le(Wt,Qt){for(var Jt=[],pr=Wt;pr<Qt;++pr)Jt.push(new dn(Se[pr],F(pr),x));return Jt}var pe=r.from,ve=r.to,Se=r.text,ze=Ft(e,pe.line),Xe=Ft(e,ve.line),dt=V(Se),lt=F(Se.length-1),It=ve.line-pe.line;if(r.full)e.insert(0,le(0,Se.length)),e.remove(Se.length,e.size-Se.length);else if(Rl(e,r)){var Mt=le(0,Se.length-1);Y(Xe,Xe.text,lt),It&&e.remove(pe.line,It),Mt.length&&e.insert(pe.line,Mt)}else if(ze==Xe)if(Se.length==1)Y(ze,ze.text.slice(0,pe.ch)+dt+ze.text.slice(ve.ch),lt);else{var Pt=le(1,Se.length-1);Pt.push(new dn(dt+ze.text.slice(ve.ch),lt,x)),Y(ze,ze.text.slice(0,pe.ch)+Se[0],F(0)),e.insert(pe.line+1,Pt)}else if(Se.length==1)Y(ze,ze.text.slice(0,pe.ch)+Se[0]+Xe.text.slice(ve.ch),F(0)),e.remove(pe.line+1,It);else{Y(ze,ze.text.slice(0,pe.ch)+Se[0],F(0)),Y(Xe,dt+Xe.text.slice(ve.ch),lt);var Ht=le(1,Se.length-1);It>1&&e.remove(pe.line+1,It-1),e.insert(pe.line+1,Ht)}Gr(e,"change",e,r)}function ta(e,r,S){function x(F,Y,le){if(F.linked)for(var pe=0;pe<F.linked.length;++pe){var ve=F.linked[pe];if(ve.doc==Y)continue;var Se=le&&ve.sharedHist;if(S&&!Se)continue;r(ve.doc,Se),x(ve.doc,F,Se)}}x(e,null,!0)}function kn(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,Mo(e),Is(e),Ll(e),e.options.lineWrapping||Fn(e),e.options.mode=r.modeOption,ti(e)}function Ll(e){(e.doc.direction=="rtl"?P:p)(e.display.lineDiv,"CodeMirror-rtl")}function Uu(e){hi(e,function(){Ll(e),ti(e)})}function Wo(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 Ls(e,r){var S={from:Ze(r.from),to:ea(r),text:er(e,r.from,r.to)};return Ul(e,S,r.from.line,r.to.line+1),ta(e,function(x){return Ul(x,S,r.from.line,r.to.line+1)},!0),S}function Dl(e){for(;e.length;){var r=V(e);if(r.ranges)e.pop();else break}}function Ml(e,r){if(r)return Dl(e.done),V(e.done);if(e.done.length&&!V(e.done).ranges)return V(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),V(e.done)}function Fl(e,r,S,x){var F=e.history;F.undone.length=0;var Y=+new Date,le,pe;if((F.lastOp==x||F.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&F.lastModTime>Y-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(le=Ml(F,F.lastOp==x)))pe=V(le.changes),Be(r.from,r.to)==0&&Be(r.from,pe.to)==0?pe.to=ea(r):le.changes.push(Ls(e,r));else{var ve=V(F.done);for((!ve||!ve.ranges)&&Go(e.sel,F.done),le={changes:[Ls(e,r)],generation:F.generation},F.done.push(le);F.done.length>F.undoDepth;)F.done.shift(),F.done[0].ranges||F.done.shift()}F.done.push(S),F.generation=++F.maxGeneration,F.lastModTime=F.lastSelTime=Y,F.lastOp=F.lastSelOp=x,F.lastOrigin=F.lastSelOrigin=r.origin,pe||we(e,"historyAdded")}function Pu(e,r,S,x){var F=r.charAt(0);return F=="*"||F=="+"&&S.ranges.length==x.ranges.length&&S.somethingSelected()==x.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ku(e,r,S,x){var F=e.history,Y=x&&x.origin;S==F.lastSelOp||Y&&F.lastSelOrigin==Y&&(F.lastModTime==F.lastSelTime&&F.lastOrigin==Y||Pu(e,Y,V(F.done),r))?F.done[F.done.length-1]=r:Go(r,F.done),F.lastSelTime=+new Date,F.lastSelOrigin=Y,F.lastSelOp=S,x&&x.clearRedo!==!1&&Dl(F.undone)}function Go(e,r){var S=V(r);S&&S.ranges&&S.equals(e)||r.push(e)}function Ul(e,r,S,x){var F=r["spans_"+e.id],Y=0;e.iter(Math.max(e.first,S),Math.min(e.first+e.size,x),function(le){le.markedSpans&&((F||(F=r["spans_"+e.id]={}))[Y]=le.markedSpans),++Y})}function Nu(e){if(!e)return null;for(var r,S=0;S<e.length;++S)e[S].marker.explicitlyCleared?r||(r=e.slice(0,S)):r&&r.push(e[S]);return r?r.length?r:null:e}function Pl(e,r){var S=r["spans_"+e.id];if(!S)return null;for(var x=[],F=0;F<r.text.length;++F)x.push(Nu(S[F]));return x}function Zt(e,r){var S=Pl(e,r),x=wn(e,r);if(!S)return x;if(!x)return S;for(var F=0;F<S.length;++F){var Y=S[F],le=x[F];if(Y&&le){e:for(var pe=0;pe<le.length;++pe){for(var ve=le[pe],Se=0;Se<Y.length;++Se)if(Y[Se].marker==ve.marker)continue e;Y.push(ve)}}else le&&(S[F]=le)}return S}function Ua(e,r,S){for(var x=[],F=0;F<e.length;++F){var Y=e[F];if(Y.ranges){x.push(S?mi.prototype.deepCopy.call(Y):Y);continue}var le=Y.changes,pe=[];x.push({changes:pe});for(var ve=0;ve<le.length;++ve){var Se=le[ve],ze=void 0;if(pe.push({from:Se.from,to:Se.to,text:Se.text}),r)for(var Xe in Se)(ze=Xe.match(/^spans_(\d+)$/))&&(ne(r,Number(ze[1]))>-1&&(V(pe)[Xe]=Se[Xe],delete Se[Xe]))}}return x}function Ds(e,r,S,x){if(x){var F=e.anchor;if(S){var Y=Be(r,F)<0;Y!=Be(S,F)<0?(F=r,r=S):Y!=Be(r,S)<0&&(r=S)}return new Zr(F,r)}else return new Zr(S||r,r)}function Pa(e,r,S,x,F){F==null&&(F=e.cm&&(e.cm.display.shift||e.extend)),Zn(e,new mi([Ds(e.sel.primary(),r,S,F)],0),x)}function Bi(e,r,S){for(var x=[],F=e.cm&&(e.cm.display.shift||e.extend),Y=0;Y<e.sel.ranges.length;Y++)x[Y]=Ds(e.sel.ranges[Y],r[Y],null,F);var le=oi(e.cm,x,e.sel.primIndex);Zn(e,le,S)}function Ms(e,r,S,x){var F=e.sel.ranges.slice(0);F[r]=S,Zn(e,oi(e.cm,F,e.sel.primIndex),x)}function Fs(e,r,S,x){Zn(e,qi(r,S),x)}function lo(e,r,S){var x={ranges:r.ranges,update:function(F){this.ranges=[];for(var Y=0;Y<F.length;Y++)this.ranges[Y]=new Zr(bt(e,F[Y].anchor),bt(e,F[Y].head))},origin:S&&S.origin};return we(e,"beforeSelectionChange",e,x),e.cm&&we(e.cm,"beforeSelectionChange",e.cm,x),x.ranges!=r.ranges?oi(e.cm,x.ranges,x.ranges.length-1):r}function uo(e,r,S){var x=e.history.done,F=V(x);F&&F.ranges?(x[x.length-1]=r,zo(e,r,S)):Zn(e,r,S)}function Zn(e,r,S){zo(e,r,S),ku(e,e.sel,e.cm?e.cm.curOp.id:NaN,S)}function zo(e,r,S){(ge(e,"beforeSelectionChange")||e.cm&&ge(e.cm,"beforeSelectionChange"))&&(r=lo(e,r,S));var x=S&&S.bias||(Be(r.primary().head,e.sel.primary().head)<0?-1:1);kl(e,Vo(e,r,x,!0)),!(S&&S.scroll===!1)&&e.cm&&Ma(e.cm)}function kl(e,r){if(r.equals(e.sel))return;e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,fe(e.cm)),Gr(e,"cursorActivity",e)}function ra(e){kl(e,Vo(e,e.sel,null,!1))}function Vo(e,r,S,x){for(var F,Y=0;Y<r.ranges.length;Y++){var le=r.ranges[Y],pe=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[Y],ve=Xo(e,le.anchor,pe&&pe.anchor,S,x),Se=Xo(e,le.head,pe&&pe.head,S,x);(F||ve!=le.anchor||Se!=le.head)&&(F||(F=r.ranges.slice(0,Y)),F[Y]=new Zr(ve,Se))}return F?oi(e.cm,F,r.primIndex):r}function na(e,r,S,x,F){var Y=Ft(e,r.line);if(Y.markedSpans)for(var le=0;le<Y.markedSpans.length;++le){var pe=Y.markedSpans[le],ve=pe.marker,Se="selectLeft"in ve?!ve.selectLeft:ve.inclusiveLeft,ze="selectRight"in ve?!ve.selectRight:ve.inclusiveRight;if((pe.from==null||(Se?pe.from<=r.ch:pe.from<r.ch))&&(pe.to==null||(ze?pe.to>=r.ch:pe.to>r.ch))){if(F&&(we(ve,"beforeCursorEnter"),ve.explicitlyCleared))if(Y.markedSpans){--le;continue}else break;if(!ve.atomic)continue;if(S){var Xe=ve.find(x<0?1:-1),dt=void 0;if((x<0?ze:Se)&&(Xe=Us(e,Xe,-x,Xe&&Xe.line==r.line?Y:null)),Xe&&Xe.line==r.line&&(dt=Be(Xe,S))&&(x<0?dt<0:dt>0))return na(e,Xe,r,x,F)}var lt=ve.find(x<0?-1:1);return(x<0?Se:ze)&&(lt=Us(e,lt,x,lt.line==r.line?Y:null)),lt?na(e,lt,r,x,F):null}}return r}function Xo(e,r,S,x,F){var Y=x||1,le=na(e,r,S,Y,F)||!F&&na(e,r,S,Y,!0)||na(e,r,S,-Y,F)||!F&&na(e,r,S,-Y,!0);return le||(e.cantEdit=!0,be(e.first,0))}function Us(e,r,S,x){return S<0&&r.ch==0?r.line>e.first?bt(e,be(r.line-1)):null:S>0&&r.ch==(x||Ft(e,r.line)).text.length?r.line<e.first+e.size-1?be(r.line+1,0):null:new be(r.line,r.ch+S)}function Nl(e){e.setSelection(be(e.firstLine(),0),be(e.lastLine()),_e)}function Yo(e,r,S){var x={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return x.canceled=!0}};return S&&(x.update=function(F,Y,le,pe){F&&(x.from=bt(e,F)),Y&&(x.to=bt(e,Y)),le&&(x.text=le),pe!==void 0&&(x.origin=pe)}),we(e,"beforeChange",e,x),e.cm&&we(e.cm,"beforeChange",e.cm,x),x.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:x.from,to:x.to,text:x.text,origin:x.origin}}function ka(e,r,S){if(e.cm){if(!e.cm.curOp)return Pn(e.cm,ka)(e,r,S);if(e.cm.state.suppressEdits)return}if((ge(e,"beforeChange")||e.cm&&ge(e.cm,"beforeChange"))&&(r=Yo(e,r,!0),!r))return;var x=or&&!S&&Er(e,r.from,r.to);if(x)for(var F=x.length-1;F>=0;--F)Hl(e,{from:x[F].from,to:x[F].to,text:F?[""]:r.text,origin:r.origin});else Hl(e,r)}function Hl(e,r){if(r.text.length==1&&r.text[0]==""&&Be(r.from,r.to)==0)return;var S=Os(e,r);Fl(e,r,S,e.cm?e.cm.curOp.id:NaN),Ao(e,r,S,wn(e,r));var x=[];ta(e,function(F,Y){!Y&&ne(x,F.history)==-1&&(Kl(F.history,r),x.push(F.history)),Ao(F,r,null,wn(F,r))})}function Jo(e,r,S){var x=e.cm&&e.cm.state.suppressEdits;if(x&&!S)return;for(var F=e.history,Y,le=e.sel,pe=r=="undo"?F.done:F.undone,ve=r=="undo"?F.undone:F.done,Se=0;Se<pe.length&&!(Y=pe[Se],S?Y.ranges&&!Y.equals(e.sel):!Y.ranges);Se++);if(Se==pe.length)return;for(F.lastOrigin=F.lastSelOrigin=null;;)if(Y=pe.pop(),Y.ranges){if(Go(Y,ve),S&&!Y.equals(e.sel)){Zn(e,Y,{clearRedo:!1});return}le=Y}else if(x){pe.push(Y);return}else break;var ze=[];Go(le,ve),ve.push({changes:ze,generation:F.generation}),F.generation=Y.generation||++F.maxGeneration;for(var Xe=ge(e,"beforeChange")||e.cm&&ge(e.cm,"beforeChange"),dt=function(Mt){var Pt=Y.changes[Mt];if(Pt.origin=r,Xe&&!Yo(e,Pt,!1))return pe.length=0,{};ze.push(Ls(e,Pt));var Ht=Mt?Os(e,Pt):V(pe);Ao(e,Pt,Ht,Zt(e,Pt)),!Mt&&e.cm&&e.cm.scrollIntoView({from:Pt.from,to:ea(Pt)});var Wt=[];ta(e,function(Qt,Jt){!Jt&&ne(Wt,Qt.history)==-1&&(Kl(Qt.history,Pt),Wt.push(Qt.history)),Ao(Qt,Pt,null,Zt(Qt,Pt))})},lt=Y.changes.length-1;lt>=0;--lt){var It=dt(lt);if(It)return It.v}}function Ql(e,r){if(r==0)return;if(e.first+=r,e.sel=new mi($(e.sel.ranges,function(F){return new Zr(be(F.anchor.line+r,F.anchor.ch),be(F.head.line+r,F.head.ch))}),e.sel.primIndex),e.cm){ti(e.cm,e.first,e.first-r,r);for(var S=e.cm.display,x=S.viewFrom;x<S.viewTo;x++)ki(e.cm,x,"gutter")}}function Ao(e,r,S,x){if(e.cm&&!e.cm.curOp)return Pn(e.cm,Ao)(e,r,S,x);if(r.to.line<e.first){Ql(e,r.text.length-1-(r.to.line-r.from.line));return}if(r.from.line>e.lastLine())return;if(r.from.line<e.first){var F=r.text.length-1-(e.first-r.from.line);Ql(e,F),r={from:be(e.first,0),to:be(r.to.line+F,r.to.ch),text:[V(r.text)],origin:r.origin}}var Y=e.lastLine();r.to.line>Y&&(r={from:r.from,to:be(Y,Ft(e,Y).text.length),text:[r.text[0]],origin:r.origin}),r.removed=er(e,r.from,r.to),S||(S=Os(e,r)),e.cm?Hu(e.cm,r,x):Rs(e,r,x),zo(e,S,_e),e.cantEdit&&Xo(e,be(e.firstLine(),0))&&(e.cantEdit=!1)}function Hu(e,r,S){var x=e.doc,F=e.display,Y=r.from,le=r.to,pe=!1,ve=Y.line;e.options.lineWrapping||(ve=$t(_n(Ft(x,Y.line))),x.iter(ve,le.line+1,function(lt){if(lt==F.maxLine)return pe=!0,!0})),x.sel.contains(r.from,r.to)>-1&&fe(e),Rs(x,r,S,hl(e)),e.options.lineWrapping||(x.iter(ve,Y.line+r.text.length,function(lt){var It=si(lt);It>F.maxLineLength&&(F.maxLine=lt,F.maxLineLength=It,F.maxLineChanged=!0,pe=!1)}),pe&&(e.curOp.updateMaxLine=!0)),jr(x,Y.line),va(e,400);var Se=r.text.length-(le.line-Y.line)-1;r.full?ti(e):Y.line==le.line&&r.text.length==1&&!Rl(e.doc,r)?ki(e,Y.line,"text"):ti(e,Y.line,le.line+1,Se);var ze=ge(e,"changes"),Xe=ge(e,"change");if(Xe||ze){var dt={from:Y,to:le,text:r.text,removed:r.removed,origin:r.origin};Xe&&Gr(e,"change",e,dt),ze&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(dt)}e.display.selForContextMenu=null}function Na(e,r,S,x,F){var Y;x||(x=S),Be(x,S)<0&&(Y=[x,S],S=Y[0],x=Y[1]),typeof r=="string"&&(r=e.splitLines(r)),ka(e,{from:S,to:x,text:r,origin:F})}function jl(e,r,S,x){S<e.line?e.line+=x:r<e.line&&(e.line=r,e.ch=0)}function Ps(e,r,S,x){for(var F=0;F<e.length;++F){var Y=e[F],le=!0;if(Y.ranges){Y.copied||(Y=e[F]=Y.deepCopy(),Y.copied=!0);for(var pe=0;pe<Y.ranges.length;pe++)jl(Y.ranges[pe].anchor,r,S,x),jl(Y.ranges[pe].head,r,S,x);continue}for(var ve=0;ve<Y.changes.length;++ve){var Se=Y.changes[ve];if(S<Se.from.line)Se.from=be(Se.from.line+x,Se.from.ch),Se.to=be(Se.to.line+x,Se.to.ch);else if(r<=Se.to.line){le=!1;break}}le||(e.splice(0,F+1),F=0)}}function Kl(e,r){var S=r.from.line,x=r.to.line,F=r.text.length-(x-S)-1;Ps(e.done,S,x,F),Ps(e.undone,S,x,F)}function co(e,r,S,x){var F=r,Y=r;return typeof r=="number"?Y=Ft(e,Lt(e,r)):F=$t(r),F==null?null:(x(Y,F)&&e.cm&&ki(e.cm,F,S),Y)}function ho(e){this.lines=e,this.parent=null;for(var r=0,S=0;S<e.length;++S)e[S].parent=this,r+=e[S].height;this.height=r}ho.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var S=e,x=e+r;S<x;++S){var F=this.lines[S];this.height-=F.height,zt(F),Gr(F,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,S){this.height+=S,this.lines=this.lines.slice(0,e).concat(r).concat(this.lines.slice(e));for(var x=0;x<r.length;++x)r[x].parent=this},iterN:function(e,r,S){for(var x=e+r;e<x;++e)if(S(this.lines[e]))return!0}};function Ha(e){this.children=e;for(var r=0,S=0,x=0;x<e.length;++x){var F=e[x];r+=F.chunkSize(),S+=F.height,F.parent=this}this.size=r,this.height=S,this.parent=null}Ha.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var S=0;S<this.children.length;++S){var x=this.children[S],F=x.chunkSize();if(e<F){var Y=Math.min(r,F-e),le=x.height;if(x.removeInner(e,Y),this.height-=le-x.height,F==Y&&(this.children.splice(S--,1),x.parent=null),(r-=Y)==0)break;e=0}else e-=F}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof ho))){var pe=[];this.collapse(pe),this.children=[new ho(pe)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r<this.children.length;++r)this.children[r].collapse(e)},insertInner:function(e,r,S){this.size+=r.length,this.height+=S;for(var x=0;x<this.children.length;++x){var F=this.children[x],Y=F.chunkSize();if(e<=Y){if(F.insertInner(e,r,S),F.lines&&F.lines.length>50){for(var le=F.lines.length%25+25,pe=le;pe<F.lines.length;){var ve=new ho(F.lines.slice(pe,pe+=25));F.height-=ve.height,this.children.splice(++x,0,ve),ve.parent=this}F.lines=F.lines.slice(0,le),this.maybeSpill()}break}e-=Y}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),S=new Ha(r);if(e.parent){e.size-=S.size,e.height-=S.height;var F=ne(e.parent.children,e);e.parent.children.splice(F+1,0,S)}else{var x=new Ha(e.children);x.parent=e,e.children=[x,S],e=x}S.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,r,S){for(var x=0;x<this.children.length;++x){var F=this.children[x],Y=F.chunkSize();if(e<Y){var le=Math.min(r,Y-e);if(F.iterN(e,le,S))return!0;if((r-=le)==0)break;e=0}else e-=Y}}};var fo=function(e,r,S){if(S)for(var x in S)S.hasOwnProperty(x)&&(this[x]=S[x]);this.doc=e,this.node=r};fo.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,S=this.line,x=$t(S);if(x==null||!r)return;for(var F=0;F<r.length;++F)r[F]==this&&r.splice(F--,1);r.length||(S.widgets=null);var Y=$a(this);Kt(S,Math.max(0,S.height-Y)),e&&(hi(e,function(){po(e,S,-Y),ki(e,x,"widget")}),Gr(e,"lineWidgetCleared",e,this,x))},fo.prototype.changed=function(){var e=this,r=this.height,S=this.doc.cm,x=this.line;this.height=null;var F=$a(this)-r;if(!F)return;Bn(this.doc,x)||Kt(x,x.height+F),S&&hi(S,function(){S.curOp.forceUpdate=!0,po(S,x,F),Gr(S,"lineWidgetChanged",S,e,$t(x))})},Te(fo);function po(e,r,S){Mn(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&_s(e,S)}function Qu(e,r,S,x){var F=new fo(e,S,x),Y=e.cm;return Y&&F.noHScroll&&(Y.display.alignWidgets=!0),co(e,r,"widget",function(le){var pe=le.widgets||(le.widgets=[]);if(F.insertAt==null?pe.push(F):pe.splice(Math.min(pe.length-1,Math.max(0,F.insertAt)),0,F),F.line=le,Y&&!Bn(e,le)){var ve=Mn(le)<e.scrollTop;Kt(le,le.height+$a(F)),ve&&_s(Y,F.height),Y.curOp.forceUpdate=!0}return!0}),Y&&Gr(Y,"lineWidgetAdded",Y,F,typeof r=="number"?r:$t(r)),F}var $o=0,Li=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++$o};Li.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&ma(e),ge(this,"clear")){var S=this.find();S&&Gr(this,"clear",S.from,S.to)}for(var x=null,F=null,Y=0;Y<this.lines.length;++Y){var le=this.lines[Y],pe=en(le.markedSpans,this);e&&!this.collapsed?ki(e,$t(le),"text"):e&&(pe.to!=null&&(F=$t(le)),pe.from!=null&&(x=$t(le))),le.markedSpans=En(le.markedSpans,pe),pe.from==null&&this.collapsed&&!Bn(this.doc,le)&&e&&Kt(le,ha(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ve=0;ve<this.lines.length;++ve){var Se=_n(this.lines[ve]),ze=si(Se);ze>e.display.maxLineLength&&(e.display.maxLine=Se,e.display.maxLineLength=ze,e.display.maxLineChanged=!0)}x!=null&&e&&this.collapsed&&ti(e,x,F+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ra(e.doc)),e&&Gr(e,"markerCleared",e,this,x,F),r&&ga(e),this.parent&&this.parent.clear()},Li.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var S,x,F=0;F<this.lines.length;++F){var Y=this.lines[F],le=en(Y.markedSpans,this);if(le.from!=null&&(S=be(r?Y:$t(Y),le.from),e==-1))return S;if(le.to!=null&&(x=be(r?Y:$t(Y),le.to),e==1))return x}return S&&{from:S,to:x}},Li.prototype.changed=function(){var e=this,r=this.find(-1,!0),S=this,x=this.doc.cm;if(!r||!x)return;hi(x,function(){var F=r.line,Y=$t(r.line),le=Aa(x,Y);if(le&&(vs(le),x.curOp.selectionChanged=x.curOp.forceUpdate=!0),x.curOp.updateMaxLine=!0,!Bn(S.doc,F)&&S.height!=null){var pe=S.height;S.height=null;var ve=$a(S)-pe;ve&&Kt(F,F.height+ve)}Gr(x,"markerChanged",x,e)})},Li.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||ne(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Li.prototype.detachLine=function(e){if(this.lines.splice(ne(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Te(Li);function ya(e,r,S,x,F){if(x&&x.shared)return ju(e,r,S,x,F);if(e.cm&&!e.cm.curOp)return Pn(e.cm,ya)(e,r,S,x,F);var Y=new Li(e,F),le=Be(r,S);if(x&&D(x,Y,!1),le>0||le==0&&Y.clearWhenEmpty!==!1)return Y;if(Y.replacedWith&&(Y.collapsed=!0,Y.widgetNode=T("span",[Y.replacedWith],"CodeMirror-widget"),x.handleMouseEvents||Y.widgetNode.setAttribute("cm-ignore-events","true"),x.insertLeft&&(Y.widgetNode.insertLeft=!0)),Y.collapsed){if(Sn(e,r.line,r,S,Y)||r.line!=S.line&&Sn(e,S.line,r,S,Y))throw new Error("Inserting collapsed marker partially overlapping an existing one");Tn()}Y.addToHistory&&Fl(e,{from:r,to:S,origin:"markText"},e.sel,NaN);var pe=r.line,ve=e.cm,Se;if(e.iter(pe,S.line+1,function(Xe){ve&&Y.collapsed&&!ve.options.lineWrapping&&_n(Xe)==ve.display.maxLine&&(Se=!0),Y.collapsed&&pe!=r.line&&Kt(Xe,0),cn(Xe,new Vr(Y,pe==r.line?r.ch:null,pe==S.line?S.ch:null)),++pe}),Y.collapsed&&e.iter(r.line,S.line+1,function(Xe){Bn(e,Xe)&&Kt(Xe,0)}),Y.clearOnEnter&&He(Y,"beforeCursorEnter",function(){return Y.clear()}),Y.readOnly&&(zr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),Y.collapsed&&(Y.id=++$o,Y.atomic=!0),ve){if(Se&&(ve.curOp.updateMaxLine=!0),Y.collapsed)ti(ve,r.line,S.line+1);else if(Y.className||Y.startStyle||Y.endStyle||Y.css||Y.attributes||Y.title)for(var ze=r.line;ze<=S.line;ze++)ki(ve,ze,"text");Y.atomic&&ra(ve.doc),Gr(ve,"markerAdded",ve,Y)}return Y}var Qa=function(e,r){this.markers=e,this.primary=r;for(var S=0;S<e.length;++S)e[S].parent=this};Qa.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Gr(this,"clear")},Qa.prototype.find=function(e,r){return this.primary.find(e,r)},Te(Qa);function ju(e,r,S,x,F){x=D(x),x.shared=!1;var Y=[ya(e,r,S,x,F)],le=Y[0],pe=x.widgetNode;return ta(e,function(ve){pe&&(x.widgetNode=pe.cloneNode(!0)),Y.push(ya(ve,bt(ve,r),bt(ve,S),x,F));for(var Se=0;Se<ve.linked.length;++Se)if(ve.linked[Se].isParent)return;le=V(Y)}),new Qa(Y,le)}function ks(e){return e.findMarks(be(e.first,0),e.clipPos(be(e.lastLine())),function(r){return r.parent})}function Ns(e,r){for(var S=0;S<r.length;S++){var x=r[S],F=x.find(),Y=e.clipPos(F.from),le=e.clipPos(F.to);if(Be(Y,le)){var pe=ya(e,Y,le,x.primary,x.primary.type);x.markers.push(pe),pe.parent=x}}}function Hs(e){for(var r=function(x){var F=e[x],Y=[F.primary.doc];ta(F.primary.doc,function(ve){return Y.push(ve)});for(var le=0;le<F.markers.length;le++){var pe=F.markers[le];ne(Y,pe.doc)==-1&&(pe.parent=null,F.markers.splice(le--,1))}},S=0;S<e.length;S++)r(S)}var Wl=0,ni=function(e,r,S,x,F){if(!(this instanceof ni))return new ni(e,r,S,x,F);S==null&&(S=0),Ha.call(this,[new ho([new dn("",null)])]),this.first=S,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=S;var Y=be(S,0);this.sel=qi(Y),this.history=new Wo(null),this.id=++Wl,this.modeOption=r,this.lineSep=x,this.direction=F=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Rs(this,{from:Y,to:Y,text:e}),Zn(this,qi(Y),_e)};ni.prototype=te(Ha.prototype,{constructor:ni,iter:function(e,r,S){S?this.iterN(e-this.first,r-e,S):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var S=0,x=0;x<r.length;++x)S+=r[x].height;this.insertInner(e-this.first,r,S)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=ir(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:Kn(function(e){var r=be(this.first,0),S=this.first+this.size-1;ka(this,{from:r,to:be(S,Ft(this,S).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Zi(this.cm,0,0),Zn(this,qi(r),_e)}),replaceRange:function(e,r,S,x){r=bt(this,r),S=S?bt(this,S):r,Na(this,e,r,S,x)},getRange:function(e,r,S){var x=er(this,bt(this,e),bt(this,r));return S===!1?x:x.join(S||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(Xr(this,e))return Ft(this,e)},getLineNumber:function(e){return $t(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Ft(this,e)),_n(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return bt(this,e)},getCursor:function(e){var r=this.sel.primary(),S;return e==null||e=="head"?S=r.head:e=="anchor"?S=r.anchor:e=="end"||e=="to"||e===!1?S=r.to():S=r.from(),S},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Kn(function(e,r,S){Fs(this,bt(this,typeof e=="number"?be(e,r||0):e),null,S)}),setSelection:Kn(function(e,r,S){Fs(this,bt(this,e),bt(this,r||e),S)}),extendSelection:Kn(function(e,r,S){Pa(this,bt(this,e),r&&bt(this,r),S)}),extendSelections:Kn(function(e,r){Bi(this,At(this,e),r)}),extendSelectionsBy:Kn(function(e,r){var S=$(this.sel.ranges,e);Bi(this,At(this,S),r)}),setSelections:Kn(function(e,r,S){if(!e.length)return;for(var x=[],F=0;F<e.length;F++)x[F]=new Zr(bt(this,e[F].anchor),bt(this,e[F].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),Zn(this,oi(this.cm,x,r),S)}),addSelection:Kn(function(e,r,S){var x=this.sel.ranges.slice(0);x.push(new Zr(bt(this,e),bt(this,r||e))),Zn(this,oi(this.cm,x,x.length-1),S)}),getSelection:function(e){for(var r=this.sel.ranges,S,x=0;x<r.length;x++){var F=er(this,r[x].from(),r[x].to());S=S?S.concat(F):F}return e===!1?S:S.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],S=this.sel.ranges,x=0;x<S.length;x++){var F=er(this,S[x].from(),S[x].to());e!==!1&&(F=F.join(e||this.lineSeparator())),r[x]=F}return r},replaceSelection:function(e,r,S){for(var x=[],F=0;F<this.sel.ranges.length;F++)x[F]=e;this.replaceSelections(x,r,S||"+input")},replaceSelections:Kn(function(e,r,S){for(var x=[],F=this.sel,Y=0;Y<F.ranges.length;Y++){var le=F.ranges[Y];x[Y]={from:le.from(),to:le.to(),text:this.splitLines(e[Y]),origin:S}}for(var pe=r&&r!="end"&&Fu(this,x,r),ve=x.length-1;ve>=0;ve--)ka(this,x[ve]);pe?uo(this,pe):this.cm&&Ma(this.cm)}),undo:Kn(function(){Jo(this,"undo")}),redo:Kn(function(){Jo(this,"redo")}),undoSelection:Kn(function(){Jo(this,"undo",!0)}),redoSelection:Kn(function(){Jo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,S=0,x=0;x<e.done.length;x++)e.done[x].ranges||++r;for(var F=0;F<e.undone.length;F++)e.undone[F].ranges||++S;return{undo:r,redo:S}},clearHistory:function(){var e=this;this.history=new Wo(this.history.maxGeneration),ta(this,function(r){return r.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:Ua(this.history.done),undone:Ua(this.history.undone)}},setHistory:function(e){var r=this.history=new Wo(this.history.maxGeneration);r.done=Ua(e.done.slice(0),null,!0),r.undone=Ua(e.undone.slice(0),null,!0)},setGutterMarker:Kn(function(e,r,S){return co(this,e,"gutter",function(x){var F=x.gutterMarkers||(x.gutterMarkers={});return F[r]=S,!S&&ee(F)&&(x.gutterMarkers=null),!0})}),clearGutter:Kn(function(e){var r=this;this.iter(function(S){S.gutterMarkers&&S.gutterMarkers[e]&&co(r,S,"gutter",function(){return S.gutterMarkers[e]=null,ee(S.gutterMarkers)&&(S.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!Xr(this,e))return null;if(r=e,e=Ft(this,e),!e)return null}else if(r=$t(e),r==null)return null;return{line:r,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Kn(function(e,r,S){return co(this,e,r=="gutter"?"gutter":"class",function(x){var F=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!x[F])x[F]=S;else{if(w(S).test(x[F]))return!1;x[F]+=" "+S}return!0})}),removeLineClass:Kn(function(e,r,S){return co(this,e,r=="gutter"?"gutter":"class",function(x){var F=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",Y=x[F];if(Y)if(S==null)x[F]=null;else{var le=Y.match(w(S));if(!le)return!1;var pe=le.index+le[0].length;x[F]=Y.slice(0,le.index)+(!le.index||pe==Y.length?"":" ")+Y.slice(pe)||null}else return!1;return!0})}),addLineWidget:Kn(function(e,r,S){return Qu(this,e,r,S)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,S){return ya(this,bt(this,e),bt(this,r),S,S&&S.type||"range")},setBookmark:function(e,r){var S={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=bt(this,e),ya(this,e,e,S,"bookmark")},findMarksAt:function(e){e=bt(this,e);var r=[],S=Ft(this,e.line).markedSpans;if(S)for(var x=0;x<S.length;++x){var F=S[x];(F.from==null||F.from<=e.ch)&&(F.to==null||F.to>=e.ch)&&r.push(F.marker.parent||F.marker)}return r},findMarks:function(e,r,S){e=bt(this,e),r=bt(this,r);var x=[],F=e.line;return this.iter(e.line,r.line+1,function(Y){var le=Y.markedSpans;if(le)for(var pe=0;pe<le.length;pe++){var ve=le[pe];!(ve.to!=null&&F==e.line&&e.ch>=ve.to||ve.from==null&&F!=e.line||ve.from!=null&&F==r.line&&ve.from>=r.ch)&&(!S||S(ve.marker))&&x.push(ve.marker.parent||ve.marker)}++F}),x},getAllMarks:function(){var e=[];return this.iter(function(r){var S=r.markedSpans;if(S)for(var x=0;x<S.length;++x)S[x].from!=null&&e.push(S[x].marker)}),e},posFromIndex:function(e){var r,S=this.first,x=this.lineSeparator().length;return this.iter(function(F){var Y=F.text.length+x;if(Y>e)return r=e,!0;e-=Y,++S}),bt(this,be(S,r))},indexFromPos:function(e){e=bt(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var S=this.lineSeparator().length;return this.iter(this.first,e.line,function(x){r+=x.text.length+S}),r},copy:function(e){var r=new ni(ir(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return r.scrollTop=this.scrollTop,r.scrollLeft=this.scrollLeft,r.sel=this.sel,r.extend=!1,e&&(r.history.undoDepth=this.history.undoDepth,r.setHistory(this.getHistory())),r},linkedDoc:function(e){e||(e={});var r=this.first,S=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<S&&(S=e.to);var x=new ni(ir(this,r,S),e.mode||this.modeOption,r,this.lineSep,this.direction);return e.sharedHist&&(x.history=this.history),(this.linked||(this.linked=[])).push({doc:x,sharedHist:e.sharedHist}),x.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Ns(x,ks(this)),x},unlinkDoc:function(e){if(e instanceof mn&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var S=this.linked[r];if(S.doc!=e)continue;this.linked.splice(r,1),e.unlinkDoc(this),Hs(ks(this));break}if(e.history==this.history){var x=[e.id];ta(e,function(F){return x.push(F.id)},!0),e.history=new Wo(null),e.history.done=Ua(this.history.done,x),e.history.undone=Ua(this.history.undone,x)}},iterLinkedDocs:function(e){ta(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):nt(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Kn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&Uu(this.cm)})}),ni.prototype.eachLine=ni.prototype.iter;var Qs=0;function Gl(e){var r=this;if(zl(r),he(r,e)||xi(r.display,e))return;me(e),R&&(Qs=+new Date);var S=Yi(r,e,!0),x=e.dataTransfer.files;if(!S||r.isReadOnly())return;if(x&&x.length&&window.FileReader&&window.File)for(var F=x.length,Y=Array(F),le=0,pe=function(){++le==F&&Pn(r,function(){S=bt(r.doc,S);var lt={from:S,to:S,text:r.doc.splitLines(Y.filter(function(It){return It!=null}).join(r.doc.lineSeparator())),origin:"paste"};ka(r.doc,lt),uo(r.doc,qi(bt(r.doc,S),bt(r.doc,ea(lt))))})()},ve=function(lt,It){if(r.options.allowDropFileTypes&&ne(r.options.allowDropFileTypes,lt.type)==-1){pe();return}var Mt=new FileReader;Mt.onerror=function(){return pe()},Mt.onload=function(){var Pt=Mt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Pt)){pe();return}Y[It]=Pt,pe()},Mt.readAsText(lt)},Se=0;Se<x.length;Se++)ve(x[Se],Se);else{if(r.state.draggingText&&r.doc.sel.contains(S)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var ze=e.dataTransfer.getData("Text");if(ze){var Xe;if(r.state.draggingText&&!r.state.draggingText.copy&&(Xe=r.listSelections()),zo(r.doc,qi(S,S)),Xe)for(var dt=0;dt<Xe.length;++dt)Na(r.doc,"",Xe[dt].anchor,Xe[dt].head,"drag");r.replaceSelection(ze,"around","paste"),r.display.input.focus()}}catch(lt){}}}function js(e,r){if(R&&(!e.state.draggingText||+new Date-Qs<100)){Ie(r);return}if(he(e,r)||xi(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!h){var S=m("img",null,null,"position: fixed; left: 0; top: 0;");S.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",A&&(S.width=S.height=1,e.display.wrapper.appendChild(S),S._top=S.offsetTop),r.dataTransfer.setDragImage(S,0,0),A&&S.parentNode.removeChild(S)}}function Ku(e,r){var S=Yi(e,r);if(!S)return;var x=document.createDocumentFragment();ml(e,S,x),e.display.dragCursor||(e.display.dragCursor=m("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),d(e.display.dragCursor,x)}function zl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Vl(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),S=[],x=0;x<r.length;x++){var F=r[x].CodeMirror;F&&S.push(F)}S.length&&S[0].operation(function(){for(var Y=0;Y<S.length;Y++)e(S[Y])})}var gi=!1;function Ks(){if(gi)return;Wu(),gi=!0}function Wu(){var e;He(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Vl(Gu)},100))}),He(window,"blur",function(){return Vl(Da)})}function Gu(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var ia={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"},mo=0;mo<10;mo++)ia[mo+48]=ia[mo+96]=String(mo);for(var Zo=65;Zo<=90;Zo++)ia[Zo]=String.fromCharCode(Zo);for(var go=1;go<=12;go++)ia[go+111]=ia[go+63235]="F"+go;var Qi={};Qi.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"},Qi.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"},Qi.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"},Qi.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"]},Qi.default=i?Qi.macDefault:Qi.pcDefault;function zu(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var S,x,F,Y,le=0;le<r.length-1;le++){var pe=r[le];if(/^(cmd|meta|m)$/i.test(pe))Y=!0;else if(/^a(lt)?$/i.test(pe))S=!0;else if(/^(c|ctrl|control)$/i.test(pe))x=!0;else if(/^s(hift)?$/i.test(pe))F=!0;else throw new Error("Unrecognized modifier name: "+pe)}return S&&(e="Alt-"+e),x&&(e="Ctrl-"+e),Y&&(e="Cmd-"+e),F&&(e="Shift-"+e),e}function Vu(e){var r={};for(var S in e)if(e.hasOwnProperty(S)){var x=e[S];if(/^(name|fallthrough|(de|at)tach)$/.test(S))continue;if(x=="..."){delete e[S];continue}for(var F=$(S.split(" "),zu),Y=0;Y<F.length;Y++){var le=void 0,pe=void 0;Y==F.length-1?(pe=F.join(" "),le=x):(pe=F.slice(0,Y+1).join(" "),le="...");var ve=r[pe];if(!ve)r[pe]=le;else if(ve!=le)throw new Error("Inconsistent bindings for "+pe)}delete e[S]}for(var Se in r)e[Se]=r[Se];return e}function ba(e,r,S,x){r=Nn(r);var F=r.call?r.call(e,x):r[e];if(F===!1)return"nothing";if(F==="...")return"multi";if(F!=null&&S(F))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return ba(e,r.fallthrough,S,x);for(var Y=0;Y<r.fallthrough.length;Y++){var le=ba(e,r.fallthrough[Y],S,x);if(le)return le}}}function Xl(e){var r=typeof e=="string"?e:ia[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function qo(e,r,S){var x=e;return r.altKey&&x!="Alt"&&(e="Alt-"+e),(C?r.metaKey:r.ctrlKey)&&x!="Ctrl"&&(e="Ctrl-"+e),(C?r.ctrlKey:r.metaKey)&&x!="Mod"&&(e="Cmd-"+e),!S&&r.shiftKey&&x!="Shift"&&(e="Shift-"+e),e}function Ws(e,r){if(A&&e.keyCode==34&&e.char)return!1;var S=ia[e.keyCode];return S==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(S=e.code),qo(S,e,r))}function Nn(e){return typeof e=="string"?Qi[e]:e}function Di(e,r){for(var S=e.doc.sel.ranges,x=[],F=0;F<S.length;F++){for(var Y=r(S[F]);x.length&&Be(Y.from,V(x).to)<=0;){var le=x.pop();if(Be(le.from,Y.from)<0){Y.from=le.from;break}}x.push(Y)}hi(e,function(){for(var pe=x.length-1;pe>=0;pe--)Na(e.doc,"",x[pe].from,x[pe].to,"+delete");Ma(e)})}function Gs(e,r,S){var x=Me(e.text,r+S,S);return x<0||x>e.text.length?null:x}function zs(e,r,S){var x=Gs(e,r.ch,S);return x==null?null:new be(r.line,x,S<0?"after":"before")}function es(e,r,S,x,F){if(e){r.doc.direction=="rtl"&&(F=-F);var Y=xt(S,r.doc.direction);if(Y){var le=F<0?V(Y):Y[0],pe=F<0==(le.level==1),ve=pe?"after":"before",Se;if(le.level>0||r.doc.direction=="rtl"){var ze=tn(r,S);Se=F<0?S.text.length-1:0;var Xe=Ti(r,ze,Se).top;Se=Ye(function(dt){return Ti(r,ze,dt).top==Xe},F<0==(le.level==1)?le.from:le.to-1,Se),ve=="before"&&(Se=Gs(S,Se,1))}else Se=F<0?le.to:le.from;return new be(x,Se,ve)}}return new be(x,F<0?S.text.length:0,F<0?"before":"after")}function Vs(e,r,S,x){var F=xt(r,e.doc.direction);if(!F)return zs(r,S,x);S.ch>=r.text.length?(S.ch=r.text.length,S.sticky="before"):S.ch<=0&&(S.ch=0,S.sticky="after");var Y=ut(F,S.ch,S.sticky),le=F[Y];if(e.doc.direction=="ltr"&&le.level%2==0&&(x>0?le.to>S.ch:le.from<S.ch))return zs(r,S,x);var pe=function(Ht,Wt){return Gs(r,Ht instanceof be?Ht.ch:Ht,Wt)},ve,Se=function(Ht){return e.options.lineWrapping?(ve=ve||tn(e,r),Al(e,r,ve,Ht)):{begin:0,end:r.text.length}},ze=Se(S.sticky=="before"?pe(S,-1):S.ch);if(e.doc.direction=="rtl"||le.level==1){var Xe=le.level==1==x<0,dt=pe(S,Xe?1:-1);if(dt!=null&&(Xe?dt<=le.to&&dt<=ze.end:dt>=le.from&&dt>=ze.begin)){var lt=Xe?"before":"after";return new be(S.line,dt,lt)}}var It=function(Ht,Wt,Qt){for(var Jt=function(pn,Wn){return Wn?new be(S.line,pe(pn,1),"before"):new be(S.line,pn,"after")};Ht>=0&&Ht<F.length;Ht+=Wt){var pr=F[Ht],ur=Wt>0==(pr.level!=1),Lr=ur?Qt.begin:pe(Qt.end,-1);if(pr.from<=Lr&&Lr<pr.to)return Jt(Lr,ur);if(Lr=ur?pr.from:pe(pr.to,-1),Qt.begin<=Lr&&Lr<Qt.end)return Jt(Lr,ur)}},Mt=It(Y+x,x,ze);if(Mt)return Mt;var Pt=x>0?ze.end:pe(ze.begin,-1);return Pt!=null&&!(x>0&&Pt==r.text.length)&&(Mt=It(x>0?0:F.length-1,x,Se(Pt)),Mt)?Mt:null}var vo={selectAll:Nl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),_e)},killLine:function(e){return Di(e,function(r){if(r.empty()){var S=Ft(e.doc,r.head.line).text.length;return r.head.ch==S&&r.head.line<e.lastLine()?{from:r.head,to:be(r.head.line+1,0)}:{from:r.head,to:be(r.head.line,S)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return Di(e,function(r){return{from:be(r.from().line,0),to:bt(e.doc,be(r.to().line+1,0))}})},delLineLeft:function(e){return Di(e,function(r){return{from:be(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return Di(e,function(r){var S=e.charCoords(r.head,"div").top+5,x=e.coordsChar({left:0,top:S},"div");return{from:x,to:r.from()}})},delWrappedLineRight:function(e){return Di(e,function(r){var S=e.charCoords(r.head,"div").top+5,x=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:S},"div");return{from:r.from(),to:x}})},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(be(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(be(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return Yl(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return Jl(e,r.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(r){return Xu(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var S=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:S},"div")},Ue)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var S=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:S},"div")},Ue)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var S=e.cursorCoords(r.head,"div").top+5,x=e.coordsChar({left:0,top:S},"div");return x.ch<e.getLine(x.line).search(/\S/)?Jl(e,r.head):x},Ue)},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 r=[],S=e.listSelections(),x=e.options.tabSize,F=0;F<S.length;F++){var Y=S[F].from(),le=J(e.getLine(Y.line),Y.ch,x);r.push(ae(x-le%x))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return hi(e,function(){for(var r=e.listSelections(),S=[],x=0;x<r.length;x++){if(!r[x].empty())continue;var F=r[x].head,Y=Ft(e.doc,F.line).text;if(Y){if(F.ch==Y.length&&(F=new be(F.line,F.ch-1)),F.ch>0)F=new be(F.line,F.ch+1),e.replaceRange(Y.charAt(F.ch-1)+Y.charAt(F.ch-2),be(F.line,F.ch-2),F,"+transpose");else if(F.line>e.doc.first){var le=Ft(e.doc,F.line-1).text;le&&(F=new be(F.line,1),e.replaceRange(Y.charAt(0)+e.doc.lineSeparator()+le.charAt(le.length-1),be(F.line-1,le.length-1),F,"+transpose"))}}S.push(new Zr(F,F))}e.setSelections(S)})},newlineAndIndent:function(e){return hi(e,function(){for(var r=e.listSelections(),S=r.length-1;S>=0;S--)e.replaceRange(e.doc.lineSeparator(),r[S].anchor,r[S].head,"+input");r=e.listSelections();for(var x=0;x<r.length;x++)e.indentLine(r[x].from().line,null,!0);Ma(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yl(e,r){var S=Ft(e.doc,r),x=_n(S);return x!=S&&(r=$t(x)),es(!0,e,x,r,1)}function Xu(e,r){var S=Ft(e.doc,r),x=Yn(S);return x!=S&&(r=$t(x)),es(!0,e,S,r,-1)}function Jl(e,r){var S=Yl(e,r.line),x=Ft(e.doc,S.line),F=xt(x,e.doc.direction);if(!F||F[0].level==0){var Y=Math.max(S.ch,x.text.search(/\S/)),le=r.line==S.line&&r.ch<=Y&&r.ch;return be(S.line,le?0:Y,S.sticky)}return S}function ts(e,r,S){if(typeof r=="string"&&(r=vo[r],!r))return!1;e.display.input.ensurePolled();var x=e.display.shift,F=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),S&&(e.display.shift=!1),F=r(e)!=Oe}finally{e.display.shift=x,e.state.suppressEdits=!1}return F}function Yu(e,r,S){for(var x=0;x<e.state.keyMaps.length;x++){var F=ba(r,e.state.keyMaps[x],S,e);if(F)return F}return e.options.extraKeys&&ba(r,e.options.extraKeys,S,e)||ba(r,e.options.keyMap,S,e)}var Ju=new X;function yo(e,r,S,x){var F=e.state.keySeq;if(F){if(Xl(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:Ju.set(50,function(){e.state.keySeq==F&&(e.state.keySeq=null,e.display.input.reset())}),Xs(e,F+" "+r,S,x))return!0}return Xs(e,r,S,x)}function Xs(e,r,S,x){var F=Yu(e,r,x);return F=="multi"&&(e.state.keySeq=r),F=="handled"&&Gr(e,"keyHandled",e,r,S),(F=="handled"||F=="multi")&&(me(S),Fo(e)),!!F}function Ys(e,r){var S=Ws(r,!0);return S?r.shiftKey&&!e.state.keySeq?yo(e,"Shift-"+S,r,function(x){return ts(e,x,!0)})||yo(e,S,r,function(x){if(typeof x=="string"?/^go[A-Z]/.test(x):x.motion)return ts(e,x)}):yo(e,S,r,function(x){return ts(e,x)}):!1}function $l(e,r,S){return yo(e,"'"+S+"'",r,function(x){return ts(e,x,!0)})}var rs=null;function ns(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=U(),he(r,e))return;R&&b<11&&e.keyCode==27&&(e.returnValue=!1);var S=e.keyCode;r.display.shift=S==16||e.shiftKey;var x=Ys(r,e);A&&(rs=x?S:null,!x&&S==88&&!$e&&(i?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),O&&!i&&!x&&S==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),S==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&$u(r)}function $u(e){var r=e.display.lineDiv;P(r,"CodeMirror-crosshair");function S(x){(x.keyCode==18||!x.altKey)&&(p(r,"CodeMirror-crosshair"),ht(document,"keyup",S),ht(document,"mouseover",S))}He(document,"keyup",S),He(document,"mouseover",S)}function Zl(e){e.keyCode==16&&(this.doc.sel.shift=!1),he(this,e)}function ql(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(xi(r.display,e)||he(r,e)||e.ctrlKey&&!e.altKey||i&&e.metaKey)return;var S=e.keyCode,x=e.charCode;if(A&&S==rs){rs=null,me(e);return}if(A&&(!e.which||e.which<10)&&Ys(r,e))return;var F=String.fromCharCode(x==null?S:x);if(F=="\b")return;if($l(r,e,F))return;r.display.input.onKeyPress(e)}var Zu=400,ja=function(e,r,S){this.time=e,this.pos=r,this.button=S};ja.prototype.compare=function(e,r,S){return this.time+Zu>e&&Be(r,this.pos)==0&&S==this.button};var aa,bo;function eu(e,r){var S=+new Date;return bo&&bo.compare(S,e,r)?(aa=bo=null,"triple"):aa&&aa.compare(S,e,r)?(bo=new ja(S,e,r),aa=null,"double"):(aa=new ja(S,e,r),bo=null,"single")}function is(e){var r=this,S=r.display;if(he(r,e)||S.activeTouch&&S.input.supportsTouch())return;if(S.input.ensurePolled(),S.shift=e.shiftKey,xi(S,e)){t||(S.scroller.draggable=!1,setTimeout(function(){return S.scroller.draggable=!0},100));return}if(Js(r,e))return;var x=Yi(r,e),F=Qe(e),Y=x?eu(x,F):"single";if(window.focus(),F==1&&r.state.selectingText&&r.state.selectingText(e),x&&tu(r,F,x,Y,e))return;F==1?x?nu(r,x,Y,e):Pe(e)==S.scroller&&me(e):F==2?(x&&Pa(r.doc,x),setTimeout(function(){return S.input.focus()},20)):F==3&&(L?r.display.input.onContextMenu(e):vl(r))}function tu(e,r,S,x,F){var Y="Click";return x=="double"?Y="Double"+Y:x=="triple"&&(Y="Triple"+Y),Y=(r==1?"Left":r==2?"Middle":"Right")+Y,yo(e,qo(Y,F),F,function(le){if(typeof le=="string"&&(le=vo[le]),!le)return!1;var pe=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),pe=le(e,S)!=Oe}finally{e.state.suppressEdits=!1}return pe})}function ru(e,r,S){var x=e.getOption("configureMouse"),F=x?x(e,r,S):{};if(F.unit==null){var Y=l?S.shiftKey&&S.metaKey:S.altKey;F.unit=Y?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(F.extend==null||e.doc.extend)&&(F.extend=e.doc.extend||S.shiftKey),F.addNew==null&&(F.addNew=i?S.metaKey:S.ctrlKey),F.moveOnDrag==null&&(F.moveOnDrag=!(i?S.altKey:S.ctrlKey)),F}function nu(e,r,S,x){R?setTimeout(K(gl,e),0):e.curOp.focus=U();var F=ru(e,S,x),Y=e.doc.sel,le;e.options.dragDrop&&tt&&!e.isReadOnly()&&S=="single"&&(le=Y.contains(r))>-1&&(Be((le=Y.ranges[le]).from(),r)<0||r.xRel>0)&&(Be(le.to(),r)>0||r.xRel<0)?qu(e,x,r,F):iu(e,x,r,F)}function qu(e,r,S,x){var F=e.display,Y=!1,le=Pn(e,function(Se){t&&(F.scroller.draggable=!1),e.state.draggingText=!1,ht(F.wrapper.ownerDocument,"mouseup",le),ht(F.wrapper.ownerDocument,"mousemove",pe),ht(F.scroller,"dragstart",ve),ht(F.scroller,"drop",le),Y||(me(Se),x.addNew||Pa(e.doc,S,null,null,x.extend),t&&!h||R&&b==9?setTimeout(function(){F.wrapper.ownerDocument.body.focus({preventScroll:!0}),F.input.focus()},20):F.input.focus())}),pe=function(Se){Y=Y||Math.abs(r.clientX-Se.clientX)+Math.abs(r.clientY-Se.clientY)>=10},ve=function(){return Y=!0};t&&(F.scroller.draggable=!0),e.state.draggingText=le,le.copy=!x.moveOnDrag,F.scroller.dragDrop&&F.scroller.dragDrop(),He(F.wrapper.ownerDocument,"mouseup",le),He(F.wrapper.ownerDocument,"mousemove",pe),He(F.scroller,"dragstart",ve),He(F.scroller,"drop",le),vl(e),setTimeout(function(){return F.input.focus()},20)}function Eo(e,r,S){if(S=="char")return new Zr(r,r);if(S=="word")return e.findWordAt(r);if(S=="line")return new Zr(be(r.line,0),bt(e.doc,be(r.line+1,0)));var x=S(e,r);return new Zr(x.from,x.to)}function iu(e,r,S,x){var F=e.display,Y=e.doc;me(r);var le,pe,ve=Y.sel,Se=ve.ranges;if(x.addNew&&!x.extend?(pe=Y.sel.contains(S),pe>-1?le=Se[pe]:le=new Zr(S,S)):(le=Y.sel.primary(),pe=Y.sel.primIndex),x.unit=="rectangle")x.addNew||(le=new Zr(S,S)),S=Yi(e,r,!0,!0),pe=-1;else{var ze=Eo(e,S,x.unit);x.extend?le=Ds(le,ze.anchor,ze.head,x.extend):le=ze}x.addNew?pe==-1?(pe=Se.length,Zn(Y,oi(e,Se.concat([le]),pe),{scroll:!1,origin:"*mouse"})):Se.length>1&&Se[pe].empty()&&x.unit=="char"&&!x.extend?(Zn(Y,oi(e,Se.slice(0,pe).concat(Se.slice(pe+1)),0),{scroll:!1,origin:"*mouse"}),ve=Y.sel):Ms(Y,pe,le,De):(pe=0,Zn(Y,new mi([le],0),De),ve=Y.sel);var Xe=S;function dt(Qt){if(Be(Xe,Qt)==0)return;if(Xe=Qt,x.unit=="rectangle"){for(var Jt=[],pr=e.options.tabSize,ur=J(Ft(Y,S.line).text,S.ch,pr),Lr=J(Ft(Y,Qt.line).text,Qt.ch,pr),pn=Math.min(ur,Lr),Wn=Math.max(ur,Lr),Cn=Math.min(S.line,Qt.line),di=Math.min(e.lastLine(),Math.max(S.line,Qt.line));Cn<=di;Cn++){var qn=Ft(Y,Cn).text,Ln=Ke(qn,pn,pr);pn==Wn?Jt.push(new Zr(be(Cn,Ln),be(Cn,Ln))):qn.length>Ln&&Jt.push(new Zr(be(Cn,Ln),be(Cn,Ke(qn,Wn,pr))))}Jt.length||Jt.push(new Zr(S,S)),Zn(Y,oi(e,ve.ranges.slice(0,pe).concat(Jt),pe),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Qt)}else{var ei=le,Xn=Eo(e,Qt,x.unit),Nt=ei.anchor,vn;Be(Xn.anchor,Nt)>0?(vn=Xn.head,Nt=Ot(ei.from(),Xn.anchor)):(vn=Xn.anchor,Nt=Je(ei.to(),Xn.head));var yn=ve.ranges.slice(0);yn[pe]=au(e,new Zr(bt(Y,Nt),vn)),Zn(Y,oi(e,yn,pe),De)}}var lt=F.wrapper.getBoundingClientRect(),It=0;function Mt(Qt){var Jt=++It,pr=Yi(e,Qt,!0,x.unit=="rectangle");if(!pr)return;if(Be(pr,Xe)!=0){e.curOp.focus=U(),dt(pr);var ur=Po(F,Y);(pr.line>=ur.to||pr.line<ur.from)&&setTimeout(Pn(e,function(){It==Jt&&Mt(Qt)}),150)}else{var Lr=Qt.clientY<lt.top?-20:Qt.clientY>lt.bottom?20:0;Lr&&setTimeout(Pn(e,function(){if(It!=Jt)return;F.scroller.scrollTop+=Lr,Mt(Qt)}),50)}}function Pt(Qt){e.state.selectingText=!1,It=Infinity,Qt&&(me(Qt),F.input.focus()),ht(F.wrapper.ownerDocument,"mousemove",Ht),ht(F.wrapper.ownerDocument,"mouseup",Wt),Y.history.lastSelOrigin=null}var Ht=Pn(e,function(Qt){Qt.buttons===0||!Qe(Qt)?Pt(Qt):Mt(Qt)}),Wt=Pn(e,Pt);e.state.selectingText=Wt,He(F.wrapper.ownerDocument,"mousemove",Ht),He(F.wrapper.ownerDocument,"mouseup",Wt)}function au(e,r){var S=r.anchor,x=r.head,F=Ft(e.doc,S.line);if(Be(S,x)==0&&S.sticky==x.sticky)return r;var Y=xt(F);if(!Y)return r;var le=ut(Y,S.ch,S.sticky),pe=Y[le];if(pe.from!=S.ch&&pe.to!=S.ch)return r;var ve=le+(pe.from==S.ch==(pe.level!=1)?0:1);if(ve==0||ve==Y.length)return r;var Se;if(x.line!=S.line)Se=(x.line-S.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var ze=ut(Y,x.ch,x.sticky),Xe=ze-le||(x.ch-S.ch)*(pe.level==1?-1:1);ze==ve-1||ze==ve?Se=Xe<0:Se=Xe>0}var dt=Y[ve+(Se?-1:0)],lt=Se==(dt.level==1),It=lt?dt.from:dt.to,Mt=lt?"after":"before";return S.ch==It&&S.sticky==Mt?r:new Zr(new be(S.line,It,Mt),x)}function ou(e,r,S,x){var F,Y;if(r.touches)F=r.touches[0].clientX,Y=r.touches[0].clientY;else try{F=r.clientX,Y=r.clientY}catch(dt){return!1}if(F>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;x&&me(r);var le=e.display,pe=le.lineDiv.getBoundingClientRect();if(Y>pe.bottom||!ge(e,S))return xe(r);Y-=pe.top-le.viewOffset;for(var ve=0;ve<e.display.gutterSpecs.length;++ve){var Se=le.gutters.childNodes[ve];if(Se&&Se.getBoundingClientRect().right>=F){var ze=Xt(e.doc,Y),Xe=e.display.gutterSpecs[ve];return we(e,S,e,ze,Xe.className,r),xe(r)}}}function Js(e,r){return ou(e,r,"gutterClick",!0)}function $s(e,r){if(xi(e.display,r)||Ka(e,r))return;if(he(e,r,"contextmenu"))return;L||e.display.input.onContextMenu(r)}function Ka(e,r){return ge(e,"gutterContextMenu")?ou(e,r,"gutterContextMenu",!1):!1}function as(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),bi(e)}var ji={toString:function(){return"CodeMirror.Init"}},su={},os={};function eA(e){var r=e.optionHandlers;function S(x,F,Y,le){e.defaults[x]=F,Y&&(r[x]=le?function(pe,ve,Se){Se!=ji&&Y(pe,ve,Se)}:Y)}e.defineOption=S,e.Init=ji,S("value","",function(x,F){return x.setValue(F)},!0),S("mode",null,function(x,F){x.doc.modeOption=F,Is(x)},!0),S("indentUnit",2,Is,!0),S("indentWithTabs",!1),S("smartIndent",!0),S("tabSize",4,function(x){so(x),bi(x),ti(x)},!0),S("lineSeparator",null,function(x,F){if(x.doc.lineSep=F,!F)return;var Y=[],le=x.doc.first;x.doc.iter(function(ve){for(var Se=0;;){var ze=ve.text.indexOf(F,Se);if(ze==-1)break;Se=ze+F.length,Y.push(be(le,ze))}le++});for(var pe=Y.length-1;pe>=0;pe--)Na(x.doc,F,Y[pe],be(Y[pe].line,Y[pe].ch+F.length))}),S("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(x,F,Y){x.state.specialChars=new RegExp(F.source+(F.test(" ")?"":"| "),"g"),Y!=ji&&x.refresh()}),S("specialCharPlaceholder",Wr,function(x){return x.refresh()},!0),S("electricChars",!0),S("inputStyle",c?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),S("spellcheck",!1,function(x,F){return x.getInputField().spellcheck=F},!0),S("autocorrect",!1,function(x,F){return x.getInputField().autocorrect=F},!0),S("autocapitalize",!1,function(x,F){return x.getInputField().autocapitalize=F},!0),S("rtlMoveVisually",!v),S("wholeLineUpdateBefore",!0),S("theme","default",function(x){as(x),oo(x)},!0),S("keyMap","default",function(x,F,Y){var le=Nn(F),pe=Y!=ji&&Nn(Y);pe&&pe.detach&&pe.detach(x,le),le.attach&&le.attach(x,pe||null)}),S("extraKeys",null),S("configureMouse",null),S("lineWrapping",!1,lu,!0),S("gutters",[],function(x,F){x.display.gutterSpecs=Ss(F,x.options.lineNumbers),oo(x)},!0),S("fixedGutter",!0,function(x,F){x.display.gutters.style.left=F?Ra(x.display)+"px":"0",x.refresh()},!0),S("coverGutterNextToScrollbar",!1,function(x){return Hi(x)},!0),S("scrollbarStyle","native",function(x){wl(x),Hi(x),x.display.scrollbars.setScrollTop(x.doc.scrollTop),x.display.scrollbars.setScrollLeft(x.doc.scrollLeft)},!0),S("lineNumbers",!1,function(x,F){x.display.gutterSpecs=Ss(x.options.gutters,F),oo(x)},!0),S("firstLineNumber",1,oo,!0),S("lineNumberFormatter",function(x){return x},oo,!0),S("showCursorWhenSelecting",!1,$i,!0),S("resetSelectionOnContextMenu",!0),S("lineWiseCopyCut",!0),S("pasteLinesPerSelection",!0),S("selectionsMayTouch",!1),S("readOnly",!1,function(x,F){F=="nocursor"&&(Da(x),x.display.input.blur()),x.display.input.readOnlyChanged(F)}),S("screenReaderLabel",null,function(x,F){F=F===""?null:F,x.display.input.screenReaderLabelChanged(F)}),S("disableInput",!1,function(x,F){F||x.display.input.reset()},!0),S("dragDrop",!0,tA),S("allowDropFileTypes",null),S("cursorBlinkRate",530),S("cursorScrollMargin",0),S("cursorHeight",1,$i,!0),S("singleCursorHeightPerLine",!0,$i,!0),S("workTime",100),S("workDelay",100),S("flattenSpans",!0,so,!0),S("addModeClass",!1,so,!0),S("pollInterval",100),S("undoDepth",200,function(x,F){return x.doc.history.undoDepth=F}),S("historyEventDelay",1250),S("viewportMargin",10,function(x){return x.refresh()},!0),S("maxHighlightLength",1e4,so,!0),S("moveInputWithCursor",!0,function(x,F){F||x.display.input.resetPosition()}),S("tabindex",null,function(x,F){return x.display.input.getField().tabIndex=F||""}),S("autofocus",null),S("direction","ltr",function(x,F){return x.doc.setDirection(F)},!0),S("phrases",null)}function tA(e,r,S){var x=S&&S!=ji;if(!r!=!x){var F=e.display.dragFunctions,Y=r?He:ht;Y(e.display.scroller,"dragstart",F.start),Y(e.display.scroller,"dragenter",F.enter),Y(e.display.scroller,"dragover",F.over),Y(e.display.scroller,"dragleave",F.leave),Y(e.display.scroller,"drop",F.drop)}}function lu(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(p(e.display.wrapper,"CodeMirror-wrap"),Fn(e)),Mo(e),ti(e),bi(e),setTimeout(function(){return Hi(e)},100)}function mn(e,r){var S=this;if(!(this instanceof mn))return new mn(e,r);this.options=r=r?D(r):{},D(su,r,!1);var x=r.value;typeof x=="string"?x=new ni(x,r.mode,null,r.lineSeparator,r.direction):r.mode&&(x.modeOption=r.mode),this.doc=x;var F=new mn.inputStyles[r.inputStyle](this),Y=this.display=new Mu(e,x,F,r);Y.wrapper.CodeMirror=this,as(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wl(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 X,keySeq:null,specialChars:null},r.autofocus&&!c&&Y.input.focus(),R&&b<11&&setTimeout(function(){return S.display.input.reset(!0)},20),uu(this),Ks(),ma(this),this.curOp.forceUpdate=!0,kn(this,x),r.autofocus&&!c||this.hasFocus()?setTimeout(function(){S.hasFocus()&&!S.state.focused&&Es(S)},20):Da(this);for(var le in os)os.hasOwnProperty(le)&&os[le](this,r[le],ji);Cl(this),r.finishInit&&r.finishInit(this);for(var pe=0;pe<ss.length;++pe)ss[pe](this);ga(this),t&&r.lineWrapping&&getComputedStyle(Y.lineDiv).textRendering=="optimizelegibility"&&(Y.lineDiv.style.textRendering="auto")}mn.defaults=su,mn.optionHandlers=os;function uu(e){var r=e.display;He(r.scroller,"mousedown",Pn(e,is)),R&&b<11?He(r.scroller,"dblclick",Pn(e,function(ve){if(he(e,ve))return;var Se=Yi(e,ve);if(!Se||Js(e,ve)||xi(e.display,ve))return;me(ve);var ze=e.findWordAt(Se);Pa(e.doc,ze.anchor,ze.head)})):He(r.scroller,"dblclick",function(ve){return he(e,ve)||me(ve)}),He(r.scroller,"contextmenu",function(ve){return $s(e,ve)}),He(r.input.getField(),"contextmenu",function(ve){r.scroller.contains(ve.target)||$s(e,ve)});var S,x={end:0};function F(){r.activeTouch&&(S=setTimeout(function(){return r.activeTouch=null},1e3),x=r.activeTouch,x.end=+new Date)}function Y(ve){if(ve.touches.length!=1)return!1;var Se=ve.touches[0];return Se.radiusX<=1&&Se.radiusY<=1}function le(ve,Se){if(Se.left==null)return!0;var ze=Se.left-ve.left,Xe=Se.top-ve.top;return ze*ze+Xe*Xe>20*20}He(r.scroller,"touchstart",function(ve){if(!he(e,ve)&&!Y(ve)&&!Js(e,ve)){r.input.ensurePolled(),clearTimeout(S);var Se=+new Date;r.activeTouch={start:Se,moved:!1,prev:Se-x.end<=300?x:null},ve.touches.length==1&&(r.activeTouch.left=ve.touches[0].pageX,r.activeTouch.top=ve.touches[0].pageY)}}),He(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),He(r.scroller,"touchend",function(ve){var Se=r.activeTouch;if(Se&&!xi(r,ve)&&Se.left!=null&&!Se.moved&&new Date-Se.start<300){var ze=e.coordsChar(r.activeTouch,"page"),Xe;!Se.prev||le(Se,Se.prev)?Xe=new Zr(ze,ze):!Se.prev.prev||le(Se,Se.prev.prev)?Xe=e.findWordAt(ze):Xe=new Zr(be(ze.line,0),bt(e.doc,be(ze.line+1,0))),e.setSelection(Xe.anchor,Xe.head),e.focus(),me(ve)}F()}),He(r.scroller,"touchcancel",F),He(r.scroller,"scroll",function(){r.scroller.clientHeight&&(ro(e,r.scroller.scrollTop),fa(e,r.scroller.scrollLeft,!0),we(e,"scroll",e))}),He(r.scroller,"mousewheel",function(ve){return Ol(e,ve)}),He(r.scroller,"DOMMouseScroll",function(ve){return Ol(e,ve)}),He(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(ve){he(e,ve)||Ie(ve)},over:function(ve){he(e,ve)||(Ku(e,ve),Ie(ve))},start:function(ve){return js(e,ve)},drop:Pn(e,Gl),leave:function(ve){he(e,ve)||zl(e)}};var pe=r.input.getField();He(pe,"keyup",function(ve){return Zl.call(e,ve)}),He(pe,"keydown",Pn(e,ns)),He(pe,"keypress",Pn(e,ql)),He(pe,"focus",function(ve){return Es(e,ve)}),He(pe,"blur",function(ve){return Da(e,ve)})}var ss=[];mn.defineInitHook=function(e){return ss.push(e)};function Ea(e,r,S,x){var F=e.doc,Y;S==null&&(S="add"),S=="smart"&&(F.mode.indent?Y=br(e,r).state:S="prev");var le=e.options.tabSize,pe=Ft(F,r),ve=J(pe.text,null,le);pe.stateAfter&&(pe.stateAfter=null);var Se=pe.text.match(/^\s*/)[0],ze;if(!x&&!/\S/.test(pe.text))ze=0,S="not";else if(S=="smart"&&(ze=F.mode.indent(Y,pe.text.slice(Se.length),pe.text),ze==Oe||ze>150)){if(!x)return;S="prev"}S=="prev"?r>F.first?ze=J(Ft(F,r-1).text,null,le):ze=0:S=="add"?ze=ve+e.options.indentUnit:S=="subtract"?ze=ve-e.options.indentUnit:typeof S=="number"&&(ze=ve+S),ze=Math.max(0,ze);var Xe="",dt=0;if(e.options.indentWithTabs)for(var lt=Math.floor(ze/le);lt;--lt)dt+=le,Xe+=" ";if(dt<ze&&(Xe+=ae(ze-dt)),Xe!=Se)return Na(F,Xe,be(r,0),be(r,Se.length),"+input"),pe.stateAfter=null,!0;for(var It=0;It<F.sel.ranges.length;It++){var Mt=F.sel.ranges[It];if(Mt.head.line==r&&Mt.head.ch<Se.length){var Pt=be(r,Se.length);Ms(F,It,new Zr(Pt,Pt));break}}}var wi=null;function wo(e){wi=e}function Zs(e,r,S,x,F){var Y=e.doc;e.display.shift=!1,x||(x=Y.sel);var le=+new Date-200,pe=F=="paste"||e.state.pasteIncoming>le,ve=nt(r),Se=null;if(pe&&x.ranges.length>1)if(wi&&wi.text.join(`
|
|
`)==r){if(x.ranges.length%wi.text.length==0){Se=[];for(var ze=0;ze<wi.text.length;ze++)Se.push(Y.splitLines(wi.text[ze]))}}else ve.length==x.ranges.length&&e.options.pasteLinesPerSelection&&(Se=$(ve,function(Ht){return[Ht]}));for(var Xe=e.curOp.updateInput,dt=x.ranges.length-1;dt>=0;dt--){var lt=x.ranges[dt],It=lt.from(),Mt=lt.to();lt.empty()&&(S&&S>0?It=be(It.line,It.ch-S):e.state.overwrite&&!pe?Mt=be(Mt.line,Math.min(Ft(Y,Mt.line).text.length,Mt.ch+V(ve).length)):pe&&wi&&wi.lineWise&&wi.text.join(`
|
|
`)==ve.join(`
|
|
`)&&(It=Mt=be(It.line,0)));var Pt={from:It,to:Mt,text:Se?Se[dt%Se.length]:ve,origin:F||(pe?"paste":e.state.cutIncoming>le?"cut":"+input")};ka(e.doc,Pt),Gr(e,"inputRead",e,Pt)}r&&!pe&&xo(e,r),Ma(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Xe),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function _o(e,r){var S=e.clipboardData&&e.clipboardData.getData("Text");if(S)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&hi(r,function(){return Zs(r,S,0,null,"paste")}),!0}function xo(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var S=e.doc.sel,x=S.ranges.length-1;x>=0;x--){var F=S.ranges[x];if(F.head.ch>100||x&&S.ranges[x-1].head.line==F.head.line)continue;var Y=e.getModeAt(F.head),le=!1;if(Y.electricChars){for(var pe=0;pe<Y.electricChars.length;pe++)if(r.indexOf(Y.electricChars.charAt(pe))>-1){le=Ea(e,F.head.line,"smart");break}}else Y.electricInput&&(Y.electricInput.test(Ft(e.doc,F.head.line).text.slice(0,F.head.ch))&&(le=Ea(e,F.head.line,"smart")));le&&Gr(e,"electricInput",e,F.head.line)}}function qs(e){for(var r=[],S=[],x=0;x<e.doc.sel.ranges.length;x++){var F=e.doc.sel.ranges[x].head.line,Y={anchor:be(F,0),head:be(F+1,0)};S.push(Y),r.push(e.getRange(Y.anchor,Y.head))}return{text:r,ranges:S}}function el(e,r,S,x){e.setAttribute("autocorrect",S?"":"off"),e.setAttribute("autocapitalize",x?"":"off"),e.setAttribute("spellcheck",!!r)}function Au(){var e=m("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=m("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return t?e.style.width="1000px":e.setAttribute("wrap","off"),f&&(e.style.border="1px solid black"),el(e),r}function cu(e){var r=e.optionHandlers,S=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(x,F){var Y=this.options,le=Y[x];if(Y[x]==F&&x!="mode")return;Y[x]=F,r.hasOwnProperty(x)&&Pn(this,r[x])(this,F,le),we(this,"optionChange",this,x)},getOption:function(x){return this.options[x]},getDoc:function(){return this.doc},addKeyMap:function(x,F){this.state.keyMaps[F?"push":"unshift"](Nn(x))},removeKeyMap:function(x){for(var F=this.state.keyMaps,Y=0;Y<F.length;++Y)if(F[Y]==x||F[Y].name==x)return F.splice(Y,1),!0},addOverlay:ri(function(x,F){var Y=x.token?x:e.getMode(this.options,x);if(Y.startState)throw new Error("Overlays may not be stateful.");q(this.state.overlays,{mode:Y,modeSpec:x,opaque:F&&F.opaque,priority:F&&F.priority||0},function(le){return le.priority}),this.state.modeGen++,ti(this)}),removeOverlay:ri(function(x){for(var F=this.state.overlays,Y=0;Y<F.length;++Y){var le=F[Y].modeSpec;if(le==x||typeof x=="string"&&le.name==x){F.splice(Y,1),this.state.modeGen++,ti(this);return}}}),indentLine:ri(function(x,F,Y){typeof F!="string"&&typeof F!="number"&&(F==null?F=this.options.smartIndent?"smart":"prev":F=F?"add":"subtract"),Xr(this.doc,x)&&Ea(this,x,F,Y)}),indentSelection:ri(function(x){for(var F=this.doc.sel.ranges,Y=-1,le=0;le<F.length;le++){var pe=F[le];if(pe.empty())pe.head.line>Y&&(Ea(this,pe.head.line,x,!0),Y=pe.head.line,le==this.doc.sel.primIndex&&Ma(this));else{var ve=pe.from(),Se=pe.to(),ze=Math.max(Y,ve.line);Y=Math.min(this.lastLine(),Se.line-(Se.ch?0:1))+1;for(var Xe=ze;Xe<Y;++Xe)Ea(this,Xe,x);var dt=this.doc.sel.ranges;ve.ch==0&&F.length==dt.length&&dt[le].from().ch>0&&Ms(this.doc,le,new Zr(ve,dt[le].to()),_e)}}}),getTokenAt:function(x,F){return yr(this,x,F)},getLineTokens:function(x,F){return yr(this,be(x),F,!0)},getTokenTypeAt:function(x){x=bt(this.doc,x);var F=fr(this,Ft(this.doc,x.line)),Y=0,le=(F.length-1)/2,pe=x.ch,ve;if(pe==0)ve=F[2];else for(;;){var Se=Y+le>>1;if((Se?F[Se*2-1]:0)>=pe)le=Se;else if(F[Se*2+1]<pe)Y=Se+1;else{ve=F[Se*2+2];break}}var ze=ve?ve.indexOf("overlay "):-1;return ze<0?ve:ze==0?null:ve.slice(0,ze-1)},getModeAt:function(x){var F=this.doc.mode;return F.innerMode?e.innerMode(F,this.getTokenAt(x).state).mode:F},getHelper:function(x,F){return this.getHelpers(x,F)[0]},getHelpers:function(x,F){var Y=[];if(!S.hasOwnProperty(F))return Y;var le=S[F],pe=this.getModeAt(x);if(typeof pe[F]=="string")le[pe[F]]&&Y.push(le[pe[F]]);else if(pe[F])for(var ve=0;ve<pe[F].length;ve++){var Se=le[pe[F][ve]];Se&&Y.push(Se)}else pe.helperType&&le[pe.helperType]?Y.push(le[pe.helperType]):le[pe.name]&&Y.push(le[pe.name]);for(var ze=0;ze<le._global.length;ze++){var Xe=le._global[ze];Xe.pred(pe,this)&&ne(Y,Xe.val)==-1&&Y.push(Xe.val)}return Y},getStateAfter:function(x,F){var Y=this.doc;return x=Lt(Y,x==null?Y.first+Y.size-1:x),br(this,x+1,F).state},cursorCoords:function(x,F){var Y,le=this.doc.sel.primary();return x==null?Y=le.head:typeof x=="object"?Y=bt(this.doc,x):Y=x?le.from():le.to(),Ei(this,Y,F||"page")},charCoords:function(x,F){return eo(this,bt(this.doc,x),F||"page")},coordsChar:function(x,F){return x=ys(this,x,F||"page"),Si(this,x.left,x.top)},lineAtHeight:function(x,F){return x=ys(this,{top:x,left:0},F||"page").top,Xt(this.doc,x+this.display.viewOffset)},heightAtLine:function(x,F,Y){var le=!1,pe;if(typeof x=="number"){var ve=this.doc.first+this.doc.size-1;x<this.doc.first?x=this.doc.first:x>ve&&(x=ve,le=!0),pe=Ft(this.doc,x)}else pe=x;return qa(this,pe,{top:0,left:0},F||"page",Y||le).top+(le?this.doc.height-Mn(pe):0)},defaultTextHeight:function(){return ha(this.display)},defaultCharWidth:function(){return Ia(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(x,F,Y,le,pe){var ve=this.display;x=Ei(this,bt(this.doc,x));var Se=x.bottom,ze=x.left;if(F.style.position="absolute",F.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(F),ve.sizer.appendChild(F),le=="over")Se=x.top;else if(le=="above"||le=="near"){var Xe=Math.max(ve.wrapper.clientHeight,this.doc.height),dt=Math.max(ve.sizer.clientWidth,ve.lineSpace.clientWidth);(le=="above"||x.bottom+F.offsetHeight>Xe)&&x.top>F.offsetHeight?Se=x.top-F.offsetHeight:x.bottom+F.offsetHeight<=Xe&&(Se=x.bottom),ze+F.offsetWidth>dt&&(ze=dt-F.offsetWidth)}F.style.top=Se+"px",F.style.left=F.style.right="",pe=="right"?(ze=ve.sizer.clientWidth-F.offsetWidth,F.style.right="0px"):(pe=="left"?ze=0:pe=="middle"&&(ze=(ve.sizer.clientWidth-F.offsetWidth)/2),F.style.left=ze+"px"),Y&&wu(this,{left:ze,top:Se,right:ze+F.offsetWidth,bottom:Se+F.offsetHeight})},triggerOnKeyDown:ri(ns),triggerOnKeyPress:ri(ql),triggerOnKeyUp:Zl,triggerOnMouseDown:ri(is),execCommand:function(x){if(vo.hasOwnProperty(x))return vo[x].call(null,this)},triggerElectric:ri(function(x){xo(this,x)}),findPosH:function(x,F,Y,le){var pe=1;F<0&&(pe=-1,F=-F);for(var ve=bt(this.doc,x),Se=0;Se<F&&!(ve=ls(this.doc,ve,pe,Y,le),ve.hitSide);++Se);return ve},moveH:ri(function(x,F){var Y=this;this.extendSelectionsBy(function(le){return Y.display.shift||Y.doc.extend||le.empty()?ls(Y.doc,le.head,x,F,Y.options.rtlMoveVisually):x<0?le.from():le.to()},Ue)}),deleteH:ri(function(x,F){var Y=this.doc.sel,le=this.doc;Y.somethingSelected()?le.replaceSelection("",null,"+delete"):Di(this,function(pe){var ve=ls(le,pe.head,x,F,!1);return x<0?{from:ve,to:pe.head}:{from:pe.head,to:ve}})}),findPosV:function(x,F,Y,le){var pe=1,ve=le;F<0&&(pe=-1,F=-F);for(var Se=bt(this.doc,x),ze=0;ze<F;++ze){var Xe=Ei(this,Se,"div");if(ve==null?ve=Xe.left:Xe.left=ve,Se=hu(this,Xe,pe,Y),Se.hitSide)break}return Se},moveV:ri(function(x,F){var Y=this,le=this.doc,pe=[],ve=!this.display.shift&&!le.extend&&le.sel.somethingSelected();if(le.extendSelectionsBy(function(ze){if(ve)return x<0?ze.from():ze.to();var Xe=Ei(Y,ze.head,"div");ze.goalColumn!=null&&(Xe.left=ze.goalColumn),pe.push(Xe.left);var dt=hu(Y,Xe,x,F);return F=="page"&&ze==le.sel.primary()&&_s(Y,eo(Y,dt,"div").top-Xe.top),dt},Ue),pe.length)for(var Se=0;Se<le.sel.ranges.length;Se++)le.sel.ranges[Se].goalColumn=pe[Se]}),findWordAt:function(x){var F=this.doc,Y=Ft(F,x.line).text,le=x.ch,pe=x.ch;if(Y){var ve=this.getHelper(x,"wordChars");(x.sticky=="before"||pe==Y.length)&&le?--le:++pe;for(var Se=Y.charAt(le),ze=ie(Se,ve)?function(Xe){return ie(Xe,ve)}:/\s/.test(Se)?function(Xe){return/\s/.test(Xe)}:function(Xe){return!/\s/.test(Xe)&&!ie(Xe)};le>0&&ze(Y.charAt(le-1));)--le;for(;pe<Y.length&&ze(Y.charAt(pe));)++pe}return new Zr(be(x.line,le),be(x.line,pe))},toggleOverwrite:function(x){if(x!=null&&x==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?P(this.display.cursorDiv,"CodeMirror-overwrite"):p(this.display.cursorDiv,"CodeMirror-overwrite"),we(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==U()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ri(function(x,F){Zi(this,x,F)}),getScrollInfo:function(){var x=this.display.scroller;return{left:x.scrollLeft,top:x.scrollTop,height:x.scrollHeight-Ii(this)-this.display.barHeight,width:x.scrollWidth-Ii(this)-this.display.barWidth,clientHeight:On(this),clientWidth:ci(this)}},scrollIntoView:ri(function(x,F){x==null?(x={from:this.doc.sel.primary().head,to:null},F==null&&(F=this.options.cursorScrollMargin)):typeof x=="number"?x={from:be(x,0),to:null}:x.from==null&&(x={from:x,to:null}),x.to||(x.to=x.from),x.margin=F||0,x.from.line!=null?_u(this,x):yl(this,x.from,x.to,x.margin)}),setSize:ri(function(x,F){var Y=this,le=function(ve){return typeof ve=="number"||/^\d+$/.test(String(ve))?ve+"px":ve};x!=null&&(this.display.wrapper.style.width=le(x)),F!=null&&(this.display.wrapper.style.height=le(F)),this.options.lineWrapping&&fi(this);var pe=this.display.viewFrom;this.doc.iter(pe,this.display.viewTo,function(ve){if(ve.widgets){for(var Se=0;Se<ve.widgets.length;Se++)if(ve.widgets[Se].noHScroll){ki(Y,pe,"widget");break}}++pe}),this.curOp.forceUpdate=!0,we(this,"refresh",this)}),operation:function(x){return hi(this,x)},startOperation:function(){return ma(this)},endOperation:function(){return ga(this)},refresh:ri(function(){var x=this.display.cachedTextHeight;ti(this),this.curOp.forceUpdate=!0,bi(this),Zi(this,this.doc.scrollLeft,this.doc.scrollTop),Cs(this.display),(x==null||Math.abs(x-ha(this.display))>.5||this.options.lineWrapping)&&Mo(this),we(this,"refresh",this)}),swapDoc:ri(function(x){var F=this.doc;return F.cm=null,this.state.selectingText&&this.state.selectingText(),kn(this,x),bi(this),this.display.input.reset(),Zi(this,x.scrollLeft,x.scrollTop),this.curOp.forceScroll=!0,Gr(this,"swapDoc",this,F),F}),phrase:function(x){var F=this.options.phrases;return F&&Object.prototype.hasOwnProperty.call(F,x)?F[x]:x},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}},Te(e),e.registerHelper=function(x,F,Y){S.hasOwnProperty(x)||(S[x]=e[x]={_global:[]}),S[x][F]=Y},e.registerGlobalHelper=function(x,F,Y,le){e.registerHelper(x,F,le),S[x]._global.push({pred:Y,val:le})}}function ls(e,r,S,x,F){var Y=r,le=S,pe=Ft(e,r.line),ve=F&&e.direction=="rtl"?-S:S;function Se(){var Wt=r.line+ve;return Wt<e.first||Wt>=e.first+e.size?!1:(r=new be(Wt,r.ch,r.sticky),pe=Ft(e,Wt))}function ze(Wt){var Qt;if(x=="codepoint"){var Jt=pe.text.charCodeAt(r.ch+(x>0?0:-1));isNaN(Jt)?Qt=null:Qt=new be(r.line,Math.max(0,Math.min(pe.text.length,r.ch+S*(Jt>=55296&&Jt<56320?2:1))),-S)}else F?Qt=Vs(e.cm,pe,r,S):Qt=zs(pe,r,S);if(Qt==null)if(!Wt&&Se())r=es(F,e.cm,pe,r.line,ve);else return!1;else r=Qt;return!0}if(x=="char"||x=="codepoint")ze();else if(x=="column")ze(!0);else if(x=="word"||x=="group")for(var Xe=null,dt=x=="group",lt=e.cm&&e.cm.getHelper(r,"wordChars"),It=!0;!(S<0&&!ze(!It));It=!1){var Mt=pe.text.charAt(r.ch)||`
|
|
`,Pt=ie(Mt,lt)?"w":dt&&Mt==`
|
|
`?"n":!dt||/\s/.test(Mt)?null:"p";if(dt&&!It&&!Pt&&(Pt="s"),Xe&&Xe!=Pt){S<0&&(S=1,ze(),r.sticky="after");break}if(Pt&&(Xe=Pt),S>0&&!ze(!It))break}var Ht=Xo(e,r,Y,le,!0);return ke(Y,Ht)&&(Ht.hitSide=!0),Ht}function hu(e,r,S,x){var F=e.doc,Y=r.left,le;if(x=="page"){var pe=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ve=Math.max(pe-.5*ha(e.display),3);le=(S>0?r.bottom:r.top)+S*ve}else x=="line"&&(le=S>0?r.bottom+3:r.top-3);for(var Se;!(Se=Si(e,Y,le),!Se.outside);){if(S<0?le<=0:le>=F.height){Se.hitSide=!0;break}le+=S*5}return Se}var an=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new X,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};an.prototype.init=function(e){var r=this,S=this,x=S.cm,F=S.div=e.lineDiv;el(F,x.options.spellcheck,x.options.autocorrect,x.options.autocapitalize);function Y(pe){for(var ve=pe.target;ve;ve=ve.parentNode){if(ve==F)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ve.className))break}return!1}He(F,"paste",function(pe){if(!Y(pe)||he(x,pe)||_o(pe,x))return;b<=11&&setTimeout(Pn(x,function(){return r.updateFromDOM()}),20)}),He(F,"compositionstart",function(pe){r.composing={data:pe.data,done:!1}}),He(F,"compositionupdate",function(pe){r.composing||(r.composing={data:pe.data,done:!1})}),He(F,"compositionend",function(pe){r.composing&&(pe.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),He(F,"touchstart",function(){return S.forceCompositionEnd()}),He(F,"input",function(){r.composing||r.readFromDOMSoon()});function le(pe){if(!Y(pe)||he(x,pe))return;if(x.somethingSelected())wo({lineWise:!1,text:x.getSelections()}),pe.type=="cut"&&x.replaceSelection("",null,"cut");else if(x.options.lineWiseCopyCut){var ve=qs(x);wo({lineWise:!0,text:ve.text}),pe.type=="cut"&&x.operation(function(){x.setSelections(ve.ranges,0,_e),x.replaceSelection("",null,"cut")})}else return;if(pe.clipboardData){pe.clipboardData.clearData();var Se=wi.text.join(`
|
|
`);if(pe.clipboardData.setData("Text",Se),pe.clipboardData.getData("Text")==Se){pe.preventDefault();return}}var ze=Au(),Xe=ze.firstChild;x.display.lineSpace.insertBefore(ze,x.display.lineSpace.firstChild),Xe.value=wi.text.join(`
|
|
`);var dt=document.activeElement;G(Xe),setTimeout(function(){x.display.lineSpace.removeChild(ze),dt.focus(),dt==F&&S.showPrimarySelection()},50)}He(F,"copy",le),He(F,"cut",le)},an.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},an.prototype.prepareSelection=function(){var e=pl(this.cm,!1);return e.focus=document.activeElement==this.div,e},an.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},an.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},an.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,S=r.doc.sel.primary(),x=S.from(),F=S.to();if(r.display.viewTo==r.display.viewFrom||x.line>=r.display.viewTo||F.line<r.display.viewFrom){e.removeAllRanges();return}var Y=Ki(r,e.anchorNode,e.anchorOffset),le=Ki(r,e.focusNode,e.focusOffset);if(Y&&!Y.bad&&le&&!le.bad&&Be(Ot(Y,le),x)==0&&Be(Je(Y,le),F)==0)return;var pe=r.display.view,ve=x.line>=r.display.viewFrom&&wa(r,x)||{node:pe[0].measure.map[2],offset:0},Se=F.line<r.display.viewTo&&wa(r,F);if(!Se){var ze=pe[pe.length-1].measure,Xe=ze.maps?ze.maps[ze.maps.length-1]:ze.map;Se={node:Xe[Xe.length-1],offset:Xe[Xe.length-2]-Xe[Xe.length-3]}}if(!ve||!Se){e.removeAllRanges();return}var dt=e.rangeCount&&e.getRangeAt(0),lt;try{lt=y(ve.node,ve.offset,Se.offset,Se.node)}catch(It){}lt&&(!O&&r.state.focused?(e.collapse(ve.node,ve.offset),lt.collapsed||(e.removeAllRanges(),e.addRange(lt))):(e.removeAllRanges(),e.addRange(lt)),dt&&e.anchorNode==null?e.addRange(dt):O&&this.startGracePeriod()),this.rememberSelection()},an.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)},an.prototype.showMultipleSelections=function(e){d(this.cm.display.cursorDiv,e.cursors),d(this.cm.display.selectionDiv,e.selection)},an.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},an.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return g(this.div,r)},an.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},an.prototype.blur=function(){this.div.blur()},an.prototype.getField=function(){return this.div},an.prototype.supportsTouch=function(){return!0},an.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():hi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function r(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,r))}this.polling.set(this.cm.options.pollInterval,r)},an.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},an.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(u&&a&&this.cm.display.gutterSpecs.length&&du(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var S=Ki(r,e.anchorNode,e.anchorOffset),x=Ki(r,e.focusNode,e.focusOffset);S&&x&&hi(r,function(){Zn(r.doc,qi(S,x),_e),(S.bad||x.bad)&&(r.curOp.selectionChanged=!0)})},an.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,S=e.doc.sel.primary(),x=S.from(),F=S.to();if(x.ch==0&&x.line>e.firstLine()&&(x=be(x.line-1,Ft(e.doc,x.line-1).length)),F.ch==Ft(e.doc,F.line).text.length&&F.line<e.lastLine()&&(F=be(F.line+1,0)),x.line<r.viewFrom||F.line>r.viewTo-1)return!1;var Y,le,pe;x.line==r.viewFrom||(Y=Ji(e,x.line))==0?(le=$t(r.view[0].line),pe=r.view[0].node):(le=$t(r.view[Y].line),pe=r.view[Y-1].node.nextSibling);var ve=Ji(e,F.line),Se,ze;if(ve==r.view.length-1?(Se=r.viewTo-1,ze=r.lineDiv.lastChild):(Se=$t(r.view[ve+1].line)-1,ze=r.view[ve+1].node.previousSibling),!pe)return!1;for(var Xe=e.doc.splitLines(_a(e,pe,ze,le,Se)),dt=er(e.doc,be(le,0),be(Se,Ft(e.doc,Se).text.length));Xe.length>1&&dt.length>1;)if(V(Xe)==V(dt))Xe.pop(),dt.pop(),Se--;else if(Xe[0]==dt[0])Xe.shift(),dt.shift(),le++;else break;for(var lt=0,It=0,Mt=Xe[0],Pt=dt[0],Ht=Math.min(Mt.length,Pt.length);lt<Ht&&Mt.charCodeAt(lt)==Pt.charCodeAt(lt);)++lt;for(var Wt=V(Xe),Qt=V(dt),Jt=Math.min(Wt.length-(Xe.length==1?lt:0),Qt.length-(dt.length==1?lt:0));It<Jt&&Wt.charCodeAt(Wt.length-It-1)==Qt.charCodeAt(Qt.length-It-1);)++It;if(Xe.length==1&&dt.length==1&&le==x.line)for(;lt&<>x.ch&&Wt.charCodeAt(Wt.length-It-1)==Qt.charCodeAt(Qt.length-It-1);)lt--,It++;Xe[Xe.length-1]=Wt.slice(0,Wt.length-It).replace(/^\u200b+/,""),Xe[0]=Xe[0].slice(lt).replace(/\u200b+$/,"");var pr=be(le,lt),ur=be(Se,dt.length?V(dt).length-It:0);if(Xe.length>1||Xe[0]||Be(pr,ur))return Na(e.doc,Xe,pr,ur,"+input"),!0},an.prototype.ensurePolled=function(){this.forceCompositionEnd()},an.prototype.reset=function(){this.forceCompositionEnd()},an.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},an.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)},an.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&hi(this.cm,function(){return ti(e.cm)})},an.prototype.setUneditable=function(e){e.contentEditable="false"},an.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Pn(this.cm,Zs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},an.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},an.prototype.onContextMenu=function(){},an.prototype.resetPosition=function(){},an.prototype.needsContentAttribute=!0;function wa(e,r){var S=Aa(e,r.line);if(!S||S.hidden)return null;var x=Ft(e.doc,r.line),F=Vn(S,x,r.line),Y=xt(x,e.doc.direction),le="left";if(Y){var pe=ut(Y,r.ch);le=pe%2?"right":"left"}var ve=gs(F.map,r.ch,le);return ve.offset=ve.collapse=="right"?ve.end:ve.start,ve}function du(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function gn(e,r){return r&&(e.bad=!0),e}function _a(e,r,S,x,F){var Y="",le=!1,pe=e.doc.lineSeparator(),ve=!1;function Se(lt){return function(It){return It.id==lt}}function ze(){le&&(Y+=pe,ve&&(Y+=pe),le=ve=!1)}function Xe(lt){lt&&(ze(),Y+=lt)}function dt(lt){if(lt.nodeType==1){var It=lt.getAttribute("cm-text");if(It){Xe(It);return}var Mt=lt.getAttribute("cm-marker"),Pt;if(Mt){var Ht=e.findMarks(be(x,0),be(F+1,0),Se(+Mt));Ht.length&&(Pt=Ht[0].find(0))&&Xe(er(e.doc,Pt.from,Pt.to).join(pe));return}if(lt.getAttribute("contenteditable")=="false")return;var Wt=/^(pre|div|p|li|table|br)$/i.test(lt.nodeName);if(!/^br$/i.test(lt.nodeName)&<.textContent.length==0)return;Wt&&ze();for(var Qt=0;Qt<lt.childNodes.length;Qt++)dt(lt.childNodes[Qt]);/^(pre|p)$/i.test(lt.nodeName)&&(ve=!0),Wt&&(le=!0)}else lt.nodeType==3&&Xe(lt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(dt(r),r==S);)r=r.nextSibling,ve=!1;return Y}function Ki(e,r,S){var x;if(r==e.display.lineDiv){if(x=e.display.lineDiv.childNodes[S],!x)return gn(e.clipPos(be(e.display.viewTo-1)),!0);r=null,S=0}else for(x=r;;x=x.parentNode){if(!x||x==e.display.lineDiv)return null;if(x.parentNode&&x.parentNode==e.display.lineDiv)break}for(var F=0;F<e.display.view.length;F++){var Y=e.display.view[F];if(Y.node==x)return oa(Y,r,S)}}function oa(e,r,S){var x=e.text.firstChild,F=!1;if(!r||!g(x,r))return gn(be($t(e.line),0),!0);if(r==x&&(F=!0,r=x.childNodes[S],S=0,!r)){var Y=e.rest?V(e.rest):e.line;return gn(be($t(Y),Y.text.length),F)}var le=r.nodeType==3?r:null,pe=r;for(!le&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(le=r.firstChild,S&&(S=le.nodeValue.length));pe.parentNode!=x;)pe=pe.parentNode;var ve=e.measure,Se=ve.maps;function ze(Pt,Ht,Wt){for(var Qt=-1;Qt<(Se?Se.length:0);Qt++)for(var Jt=Qt<0?ve.map:Se[Qt],pr=0;pr<Jt.length;pr+=3){var ur=Jt[pr+2];if(ur==Pt||ur==Ht){var Lr=$t(Qt<0?e.line:e.rest[Qt]),pn=Jt[pr]+Wt;return(Wt<0||ur!=Pt)&&(pn=Jt[pr+(Wt?1:0)]),be(Lr,pn)}}}var Xe=ze(le,pe,S);if(Xe)return gn(Xe,F);for(var dt=pe.nextSibling,lt=le?le.nodeValue.length-S:0;dt;dt=dt.nextSibling){if(Xe=ze(dt,dt.firstChild,0),Xe)return gn(be(Xe.line,Xe.ch-lt),F);lt+=dt.textContent.length}for(var It=pe.previousSibling,Mt=S;It;It=It.previousSibling){if(Xe=ze(It,It.firstChild,-1),Xe)return gn(be(Xe.line,Xe.ch+Mt),F);Mt+=It.textContent.length}}var ln=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new X,this.hasSelection=!1,this.composing=null};ln.prototype.init=function(e){var r=this,S=this,x=this.cm;this.createField(e);var F=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),f&&(F.style.width="0px"),He(F,"input",function(){R&&b>=9&&r.hasSelection&&(r.hasSelection=null),S.poll()}),He(F,"paste",function(le){if(he(x,le)||_o(le,x))return;x.state.pasteIncoming=+new Date,S.fastPoll()});function Y(le){if(he(x,le))return;if(x.somethingSelected())wo({lineWise:!1,text:x.getSelections()});else if(x.options.lineWiseCopyCut){var pe=qs(x);wo({lineWise:!0,text:pe.text}),le.type=="cut"?x.setSelections(pe.ranges,null,_e):(S.prevInput="",F.value=pe.text.join(`
|
|
`),G(F))}else return;le.type=="cut"&&(x.state.cutIncoming=+new Date)}He(F,"cut",Y),He(F,"copy",Y),He(e.scroller,"paste",function(le){if(xi(e,le)||he(x,le))return;if(!F.dispatchEvent){x.state.pasteIncoming=+new Date,S.focus();return}var pe=new Event("paste");pe.clipboardData=le.clipboardData,F.dispatchEvent(pe)}),He(e.lineSpace,"selectstart",function(le){xi(e,le)||me(le)}),He(F,"compositionstart",function(){var le=x.getCursor("from");S.composing&&S.composing.range.clear(),S.composing={start:le,range:x.markText(le,x.getCursor("to"),{className:"CodeMirror-composing"})}}),He(F,"compositionend",function(){S.composing&&(S.poll(),S.composing.range.clear(),S.composing=null)})},ln.prototype.createField=function(e){this.wrapper=Au(),this.textarea=this.wrapper.firstChild},ln.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ln.prototype.prepareSelection=function(){var e=this.cm,r=e.display,S=e.doc,x=pl(e);if(e.options.moveInputWithCursor){var F=Ei(e,S.sel.primary().head,"div"),Y=r.wrapper.getBoundingClientRect(),le=r.lineDiv.getBoundingClientRect();x.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,F.top+le.top-Y.top)),x.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,F.left+le.left-Y.left))}return x},ln.prototype.showSelection=function(e){var r=this.cm,S=r.display;d(S.cursorDiv,e.cursors),d(S.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ln.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var S=r.getSelection();this.textarea.value=S,r.state.focused&&G(this.textarea),R&&b>=9&&(this.hasSelection=S)}else e||(this.prevInput=this.textarea.value="",R&&b>=9&&(this.hasSelection=null))},ln.prototype.getField=function(){return this.textarea},ln.prototype.supportsTouch=function(){return!1},ln.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!c||U()!=this.textarea))try{this.textarea.focus()}catch(e){}},ln.prototype.blur=function(){this.textarea.blur()},ln.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ln.prototype.receivedFocus=function(){this.slowPoll()},ln.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()})},ln.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function S(){var x=r.poll();!x&&!e?(e=!0,r.polling.set(60,S)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,S)},ln.prototype.poll=function(){var e=this,r=this.cm,S=this.textarea,x=this.prevInput;if(this.contextMenuPending||!r.state.focused||qe(S)&&!x&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var F=S.value;if(F==x&&!r.somethingSelected())return!1;if(R&&b>=9&&this.hasSelection===F||i&&/[\uf700-\uf7ff]/.test(F))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var Y=F.charCodeAt(0);if(Y==8203&&!x&&(x="\u200B"),Y==8666)return this.reset(),this.cm.execCommand("undo")}for(var le=0,pe=Math.min(x.length,F.length);le<pe&&x.charCodeAt(le)==F.charCodeAt(le);)++le;return hi(r,function(){Zs(r,F.slice(le),x.length-le,null,e.composing?"*compose":null),F.length>1e3||F.indexOf(`
|
|
`)>-1?S.value=e.prevInput="":e.prevInput=F,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ln.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ln.prototype.onKeyPress=function(){R&&b>=9&&(this.hasSelection=null),this.fastPoll()},ln.prototype.onContextMenu=function(e){var r=this,S=r.cm,x=S.display,F=r.textarea;r.contextMenuPending&&r.contextMenuPending();var Y=Yi(S,e),le=x.scroller.scrollTop;if(!Y||A)return;var pe=S.options.resetSelectionOnContextMenu;pe&&S.doc.sel.contains(Y)==-1&&Pn(S,Zn)(S.doc,qi(Y),_e);var ve=F.style.cssText,Se=r.wrapper.style.cssText,ze=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",F.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-ze.top-5)+"px; left: "+(e.clientX-ze.left-5)+`px;
|
|
z-index: 1000; background: `+(R?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Xe;t&&(Xe=window.scrollY),x.input.focus(),t&&window.scrollTo(null,Xe),x.input.reset(),S.somethingSelected()||(F.value=r.prevInput=" "),r.contextMenuPending=lt,x.selForContextMenu=S.doc.sel,clearTimeout(x.detectingSelectAll);function dt(){if(F.selectionStart!=null){var Mt=S.somethingSelected(),Pt="\u200B"+(Mt?F.value:"");F.value="\u21DA",F.value=Pt,r.prevInput=Mt?"":"\u200B",F.selectionStart=1,F.selectionEnd=Pt.length,x.selForContextMenu=S.doc.sel}}function lt(){if(r.contextMenuPending!=lt)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=Se,F.style.cssText=ve,R&&b<9&&x.scrollbars.setScrollTop(x.scroller.scrollTop=le),F.selectionStart!=null){(!R||R&&b<9)&&dt();var Mt=0,Pt=function(){x.selForContextMenu==S.doc.sel&&F.selectionStart==0&&F.selectionEnd>0&&r.prevInput=="\u200B"?Pn(S,Nl)(S):Mt++<10?x.detectingSelectAll=setTimeout(Pt,500):(x.selForContextMenu=null,x.input.reset())};x.detectingSelectAll=setTimeout(Pt,200)}}if(R&&b>=9&&dt(),L){Ie(e);var It=function(){ht(window,"mouseup",It),setTimeout(lt,20)};He(window,"mouseup",It)}else setTimeout(lt,50)},ln.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},ln.prototype.setUneditable=function(){},ln.prototype.needsContentAttribute=!1;function Co(e,r){if(r=r?D(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var S=U();r.autofocus=S==e||e.getAttribute("autofocus")!=null&&S==document.body}function x(){e.value=pe.getValue()}var F;if(e.form&&(He(e.form,"submit",x),!r.leaveSubmitMethodAlone)){var Y=e.form;F=Y.submit;try{var le=Y.submit=function(){x(),Y.submit=F,Y.submit(),Y.submit=le}}catch(ve){}}r.finishInit=function(ve){ve.save=x,ve.getTextArea=function(){return e},ve.toTextArea=function(){ve.toTextArea=isNaN,x(),e.parentNode.removeChild(ve.getWrapperElement()),e.style.display="",e.form&&(ht(e.form,"submit",x),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=F))}},e.style.display="none";var pe=mn(function(ve){return e.parentNode.insertBefore(ve,e.nextSibling)},r);return pe}function Wi(e){e.off=ht,e.on=He,e.wheelEventPixels=Bl,e.Doc=ni,e.splitLines=nt,e.countColumn=J,e.findColumn=Ke,e.isWordChar=re,e.Pass=Oe,e.signal=we,e.Line=dn,e.changeEnd=ea,e.scrollbarModel=El,e.Pos=be,e.cmpPos=Be,e.modes=ct,e.mimeModes=rt,e.resolveMode=at,e.getMode=vt,e.modeExtensions=St,e.extendMode=wt,e.copyState=Dt,e.startState=xr,e.innerMode=Ar,e.commands=vo,e.keyMap=Qi,e.keyName=Ws,e.isModifierKey=Xl,e.lookupKey=ba,e.normalizeKeyMap=Vu,e.StringStream=_r,e.SharedTextMarker=Qa,e.TextMarker=Li,e.LineWidget=fo,e.e_preventDefault=me,e.e_stopPropagation=Ee,e.e_stop=Ie,e.addClass=P,e.contains=g,e.rmClass=p,e.keyNames=ia}eA(mn),cu(mn);var fu="iter insert remove copy getEditor constructor".split(" ");for(var To in ni.prototype)ni.prototype.hasOwnProperty(To)&&ne(fu,To)<0&&(mn.prototype[To]=function(e){return function(){return e.apply(this.doc,arguments)}}(ni.prototype[To]));return Te(ni),mn.inputStyles={textarea:ln,contenteditable:an},mn.defineMode=function(e){!mn.defaults.mode&&e!="null"&&(mn.defaults.mode=e),gt.apply(this,arguments)},mn.defineMIME=pt,mn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),mn.defineMIME("text/plain","null"),mn.defineExtension=function(e,r){mn.prototype[e]=r},mn.defineDocExtension=function(e,r){ni.prototype[e]=r},mn.fromTextArea=Co,Wi(mn),mn.version="5.58.2",mn})},WaYH:function(Ve,Ae,N){"use strict";var Z=N("rePB"),H=N("Ff2n"),O=N("VTBJ"),Q=N("1OyB"),M=N("vuIU"),_=N("JX7q"),R=N("Ji7U"),b=N("LK+K"),t=N("q1tI"),E=N("TSYQ"),a=N.n(E),A=N("sboe"),h=N("OZM5"),s=function(L){var w=L.prefixCls,p=L.level,n=L.isStart,d=L.isEnd;if(!p)return null;for(var m="".concat(w,"-indent-unit"),T=[],y=0;y<p;y+=1){var g;T.push(t.createElement("span",{key:y,className:a()(m,(g={},Object(Z.a)(g,"".concat(m,"-start"),n[y+1]),Object(Z.a)(g,"".concat(m,"-end"),d[y+1]),Object(Z.a)(g,"".concat(m,"-end-first-level"),!y&&d[0]),g))}))}return t.createElement("span",{"aria-hidden":"true",className:"".concat(w,"-indent")},T)},o=s,f=N("815F"),u="open",c="close",i="---",l=function(C){Object(R.a)(w,C);var L=Object(b.a)(w);function w(){var p;return Object(Q.a)(this,w),p=L.apply(this,arguments),p.state={dragNodeHighlight:!1},p.onSelectorClick=function(n){var d=p.props.context.onNodeClick;d(n,Object(f.b)(p.props)),p.isSelectable()?p.onSelect(n):p.onCheck(n)},p.onSelectorDoubleClick=function(n){var d=p.props.context.onNodeDoubleClick;d(n,Object(f.b)(p.props))},p.onSelect=function(n){if(p.isDisabled())return;var d=p.props.context.onNodeSelect;n.preventDefault(),d(n,Object(f.b)(p.props))},p.onCheck=function(n){if(p.isDisabled())return;var d=p.props,m=d.disableCheckbox,T=d.checked,y=p.props.context.onNodeCheck;if(!p.isCheckable()||m)return;n.preventDefault();var g=!T;y(n,Object(f.b)(p.props),g)},p.onMouseEnter=function(n){var d=p.props.context.onNodeMouseEnter;d(n,Object(f.b)(p.props))},p.onMouseLeave=function(n){var d=p.props.context.onNodeMouseLeave;d(n,Object(f.b)(p.props))},p.onContextMenu=function(n){var d=p.props.context.onNodeContextMenu;d(n,Object(f.b)(p.props))},p.onDragStart=function(n){var d=p.props.context.onNodeDragStart;n.stopPropagation(),p.setState({dragNodeHighlight:!0}),d(n,Object(_.a)(p));try{n.dataTransfer.setData("text/plain","")}catch(m){}},p.onDragEnter=function(n){var d=p.props.context.onNodeDragEnter;n.preventDefault(),n.stopPropagation(),d(n,Object(_.a)(p))},p.onDragOver=function(n){var d=p.props.context.onNodeDragOver;n.preventDefault(),n.stopPropagation(),d(n,Object(_.a)(p))},p.onDragLeave=function(n){var d=p.props.context.onNodeDragLeave;n.stopPropagation(),d(n,Object(_.a)(p))},p.onDragEnd=function(n){var d=p.props.context.onNodeDragEnd;n.stopPropagation(),p.setState({dragNodeHighlight:!1}),d(n,Object(_.a)(p))},p.onDrop=function(n){var d=p.props.context.onNodeDrop;n.preventDefault(),n.stopPropagation(),p.setState({dragNodeHighlight:!1}),d(n,Object(_.a)(p))},p.onExpand=function(n){var d=p.props.context.onNodeExpand;d(n,Object(f.b)(p.props))},p.setSelectHandle=function(n){p.selectHandle=n},p.getNodeState=function(){var n=p.props.expanded;return p.isLeaf()?null:n?u:c},p.hasChildren=function(){var n=p.props.eventKey,d=p.props.context.keyEntities,m=d[n]||{},T=m.children;return!!(T||[]).length},p.isLeaf=function(){var n=p.props,d=n.isLeaf,m=n.loaded,T=p.props.context.loadData,y=p.hasChildren();return d===!1?!1:d||!T&&!y||T&&m&&!y},p.isDisabled=function(){var n=p.props.disabled,d=p.props.context.disabled;return!!(d||n)},p.isCheckable=function(){var n=p.props.checkable,d=p.props.context.checkable;return!d||n===!1?!1:d},p.syncLoadData=function(n){var d=n.expanded,m=n.loading,T=n.loaded,y=p.props.context,g=y.loadData,U=y.onNodeLoad;if(m)return;g&&d&&!p.isLeaf()&&(!p.hasChildren()&&!T&&U(Object(f.b)(p.props)))},p.renderSwitcher=function(){var n=p.props,d=n.expanded,m=n.switcherIcon,T=p.props.context,y=T.prefixCls,g=T.switcherIcon,U=m||g;if(p.isLeaf())return t.createElement("span",{className:a()("".concat(y,"-switcher"),"".concat(y,"-switcher-noop"))},typeof U=="function"?U(Object(O.a)(Object(O.a)({},p.props),{},{isLeaf:!0})):U);var P=a()("".concat(y,"-switcher"),"".concat(y,"-switcher_").concat(d?u:c));return t.createElement("span",{onClick:p.onExpand,className:P},typeof U=="function"?U(Object(O.a)(Object(O.a)({},p.props),{},{isLeaf:!1})):U)},p.renderCheckbox=function(){var n=p.props,d=n.checked,m=n.halfChecked,T=n.disableCheckbox,y=p.props.context.prefixCls,g=p.isDisabled(),U=p.isCheckable();if(!U)return null;var P=typeof U!="boolean"?U:null;return t.createElement("span",{className:a()("".concat(y,"-checkbox"),d&&"".concat(y,"-checkbox-checked"),!d&&m&&"".concat(y,"-checkbox-indeterminate"),(g||T)&&"".concat(y,"-checkbox-disabled")),onClick:p.onCheck},P)},p.renderIcon=function(){var n=p.props.loading,d=p.props.context.prefixCls;return t.createElement("span",{className:a()("".concat(d,"-iconEle"),"".concat(d,"-icon__").concat(p.getNodeState()||"docu"),n&&"".concat(d,"-icon_loading"))})},p.renderSelector=function(){var n=p.state.dragNodeHighlight,d=p.props,m=d.title,T=d.selected,y=d.icon,g=d.loading,U=d.data,P=p.props.context,I=P.prefixCls,G=P.showIcon,K=P.icon,D=P.draggable,J=P.loadData,X=P.titleRender,ne=p.isDisabled(),ue="".concat(I,"-node-content-wrapper"),Oe;if(G){var _e=y||K;Oe=_e?t.createElement("span",{className:a()("".concat(I,"-iconEle"),"".concat(I,"-icon__customize"))},typeof _e=="function"?_e(p.props):_e):p.renderIcon()}else J&&g&&(Oe=p.renderIcon());var De;typeof m=="function"?De=m(U):X?De=X(U):De=m;var Ue=t.createElement("span",{className:"".concat(I,"-title")},De);return t.createElement("span",{ref:p.setSelectHandle,title:typeof m=="string"?m:"",className:a()("".concat(ue),"".concat(ue,"-").concat(p.getNodeState()||"normal"),!ne&&(T||n)&&"".concat(I,"-node-selected"),!ne&&D&&"draggable"),draggable:!ne&&D||void 0,"aria-grabbed":!ne&&D||void 0,onMouseEnter:p.onMouseEnter,onMouseLeave:p.onMouseLeave,onContextMenu:p.onContextMenu,onClick:p.onSelectorClick,onDoubleClick:p.onSelectorDoubleClick,onDragStart:D?p.onDragStart:void 0},Oe,Ue)},p}return Object(M.a)(w,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var n=this.props.selectable,d=this.props.context.selectable;return typeof n=="boolean"?n:d}},{key:"render",value:function(){var n,d=this.props,m=d.eventKey,T=d.className,y=d.style,g=d.dragOver,U=d.dragOverGapTop,P=d.dragOverGapBottom,I=d.isLeaf,G=d.isStart,K=d.isEnd,D=d.expanded,J=d.selected,X=d.checked,ne=d.halfChecked,ue=d.loading,Oe=d.domRef,_e=d.active,De=d.onMouseMove,Ue=Object(H.a)(d,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ke=this.props.context,Le=Ke.prefixCls,ae=Ke.filterTreeNode,V=Ke.draggable,$=Ke.keyEntities,q=this.isDisabled(),se=Object(h.f)(Ue),te=$[m]||{},oe=te.level,re=K[K.length-1];return t.createElement("div",Object.assign({ref:Oe,className:a()(T,"".concat(Le,"-treenode"),(n={},Object(Z.a)(n,"".concat(Le,"-treenode-disabled"),q),Object(Z.a)(n,"".concat(Le,"-treenode-switcher-").concat(D?"open":"close"),!I),Object(Z.a)(n,"".concat(Le,"-treenode-checkbox-checked"),X),Object(Z.a)(n,"".concat(Le,"-treenode-checkbox-indeterminate"),ne),Object(Z.a)(n,"".concat(Le,"-treenode-selected"),J),Object(Z.a)(n,"".concat(Le,"-treenode-loading"),ue),Object(Z.a)(n,"".concat(Le,"-treenode-active"),_e),Object(Z.a)(n,"".concat(Le,"-treenode-leaf-last"),re),Object(Z.a)(n,"drag-over",!q&&g),Object(Z.a)(n,"drag-over-gap-top",!q&&U),Object(Z.a)(n,"drag-over-gap-bottom",!q&&P),Object(Z.a)(n,"filter-node",ae&&ae(Object(f.b)(this.props))),n)),style:y,onDragEnter:V?this.onDragEnter:void 0,onDragOver:V?this.onDragOver:void 0,onDragLeave:V?this.onDragLeave:void 0,onDrop:V?this.onDrop:void 0,onDragEnd:V?this.onDragEnd:void 0,onMouseMove:De},se),t.createElement(o,{prefixCls:Le,level:oe,isStart:G,isEnd:K}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),w}(t.Component),v=function(L){return t.createElement(A.a.Consumer,null,function(w){return t.createElement(l,Object.assign({},L,{context:w}))})};v.displayName="TreeNode",v.defaultProps={title:i},v.isTreeNode=1;var B=Ae.a=v},Xm8N:function(Ve,Ae,N){"use strict";var Z=N("2qtc"),H=N("kLXV"),O=N("miYZ"),Q=N("tsqr"),M=N("9og8"),_=N("WmNS"),R=N.n(_),b=N("q1tI"),t=N.n(b),E=N("ErOA"),a=N("Ty5D"),A=N("9kvl"),h=function(o){var f=o.shixunHomeworks,u=o.dispatch,c=Object(a.i)();return t.a.createElement(H.a,{centered:!0,title:"\u63D0\u793A",visible:f.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(M.a)(R.a.mark(function i(){var l,v,B,C;return R.a.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,Object(E.a)("/api/myshixuns/".concat(f.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:c.coursesId}});case 2:l=w.sent,l.shixun_identifier&&(Q.b.success("\u64CD\u4F5C\u6210\u529F"),u({type:"shixunHomeworks/setActionTabs",payload:{}}),C=l==null||((v=l.new_works)===null||v===void 0||((B=v.find(function(p){return"".concat(p.homework_common_id)===c.categoryId}))===null||B===void 0))?void 0:B.id,A.d.replace("/classrooms/".concat(c.coursesId,"/shixun_homework/").concat(c.categoryId,"/").concat(C,"/comment")));case 4:case"end":return w.stop()}},i)})),onCancel:function(){u({type:"shixunHomeworks/setActionTabs",payload:{}})}},t.a.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),t.a.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};Ae.a=Object(A.a)(function(s){var o=s.shixunHomeworks;return{shixunHomeworks:o}})(h)},Xmg4:function(Ve,Ae,N){var Z=N("bYtY"),H=N("LPTA"),O=H.devicePixelRatio,Q=N("K2GJ"),M=N("3C/r");function _(){return!1}function R(E,a,A){var h=Z.createCanvas(),s=a.getWidth(),o=a.getHeight(),f=h.style;return f&&(f.position="absolute",f.left=0,f.top=0,f.width=s+"px",f.height=o+"px",h.setAttribute("data-zr-dom-id",E)),h.width=s*A,h.height=o*A,h}var b=function(E,a,A){var h;A=A||O,typeof E=="string"?h=R(E,a,A):Z.isObject(E)&&(h=E,E=h.id),this.id=E,this.dom=h;var s=h.style;s&&(h.onselectstart=_,s["-webkit-user-select"]="none",s["user-select"]="none",s["-webkit-touch-callout"]="none",s["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",s.padding=0,s.margin=0,s["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=a,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=A};b.prototype={constructor:b,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var E=this.dpr;this.domBack=R("back-"+this.id,this.painter,E),this.ctxBack=this.domBack.getContext("2d"),E!==1&&this.ctxBack.scale(E,E)},resize:function(E,a){var A=this.dpr,h=this.dom,s=h.style,o=this.domBack;s&&(s.width=E+"px",s.height=a+"px"),h.width=E*A,h.height=a*A,o&&(o.width=E*A,o.height=a*A,A!==1&&this.ctxBack.scale(A,A))},clear:function(E,a){var A=this.dom,h=this.ctx,s=A.width,o=A.height,a=a||this.clearColor,f=this.motionBlur&&!E,u=this.lastFrameAlpha,c=this.dpr;if(f&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(A,0,0,s/c,o/c)),h.clearRect(0,0,s,o),a&&a!=="transparent"){var i;a.colorStops?(i=a.__canvasGradient||Q.getGradient(h,a,{x:0,y:0,width:s,height:o}),a.__canvasGradient=i):a.image&&(i=M.prototype.getCanvasPattern.call(a,h)),h.save(),h.fillStyle=i||a,h.fillRect(0,0,s,o),h.restore()}if(f){var l=this.domBack;h.save(),h.globalAlpha=u,h.drawImage(l,0,0,s,o),h.restore()}}};var t=b;Ve.exports=t},Xnb7:function(Ve,Ae,N){var Z=N("1RvN"),H=new Z(50);function O(R){if(typeof R=="string"){var b=H.get(R);return b&&b.image}else return R}function Q(R,b,t,E,a){if(R)if(typeof R=="string"){if(b&&b.__zrImageSrc===R||!t)return b;var A=H.get(R),h={hostEl:t,cb:E,cbPayload:a};return A?(b=A.image,!_(b)&&A.pending.push(h)):(b=new Image,b.onload=b.onerror=M,H.put(R,b.__cachedImgObj={image:b,pending:[h]}),b.src=b.__zrImageSrc=R),b}else return R;else return b}function M(){var R=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var b=0;b<R.pending.length;b++){var t=R.pending[b],E=t.cb;E&&E(this,t.cbPayload),t.hostEl.dirty()}R.pending.length=0}function _(R){return R&&R.width&&R.height}Ae.findExistImage=O,Ae.createOrUpdateImage=Q,Ae.isImageReady=_},Y1PL:function(Ve,Ae,N){"use strict";N.r(Ae),N.d(Ae,"ResizableTextArea",function(){return ne});var Z=N("wx14"),H=N("1OyB"),O=N("vuIU"),Q=N("Ji7U"),M=N("LK+K"),_=N("q1tI"),R=N("VTBJ"),b=N("rePB"),t=N("Zm9Q"),E=N("Kwbf"),a=N("c+Xe"),A=N("m+aA"),h=N("bdgK"),s=new Map;function o(_e){_e.forEach(function(De){var Ue,Ke=De.target;(Ue=s.get(Ke))===null||Ue===void 0||Ue.forEach(function(Le){return Le(Ke)})})}var f=new h.default(o),u=null,c=null;function i(_e,De){s.has(_e)||(s.set(_e,new Set),f.observe(_e)),s.get(_e).add(De)}function l(_e,De){s.has(_e)&&(s.get(_e).delete(De),s.get(_e).size||(f.unobserve(_e),s.delete(_e)))}var v=function(_e){Object(Q.a)(Ue,_e);var De=Object(M.a)(Ue);function Ue(){return Object(H.a)(this,Ue),De.apply(this,arguments)}return Object(O.a)(Ue,[{key:"render",value:function(){return this.props.children}}]),Ue}(_.Component),B=_.createContext(null);function C(_e){var De=_e.children,Ue=_e.onBatchResize,Ke=_.useRef(0),Le=_.useRef([]),ae=_.useContext(B),V=_.useCallback(function($,q,se){Ke.current+=1;var te=Ke.current;Le.current.push({size:$,element:q,data:se}),Promise.resolve().then(function(){te===Ke.current&&(Ue==null||Ue(Le.current),Le.current=[])}),ae==null||ae($,q,se)},[Ue,ae]);return _.createElement(B.Provider,{value:V},De)}function L(_e){var De=_e.children,Ue=_e.disabled,Ke=_.useRef(null),Le=_.useRef(null),ae=_.useContext(B),V=_.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),$=_.isValidElement(De)&&Object(a.c)(De),q=$?De.ref:null,se=_.useMemo(function(){return Object(a.a)(q,Ke)},[q,Ke]),te=_.useRef(_e);te.current=_e;var oe=_.useCallback(function(re){var ie=te.current,ee=ie.onResize,de=ie.data,Ce=re.getBoundingClientRect(),Me=Ce.width,Ye=Ce.height,et=re.offsetWidth,st=re.offsetHeight,ut=Math.floor(Me),yt=Math.floor(Ye);if(V.current.width!==ut||V.current.height!==yt||V.current.offsetWidth!==et||V.current.offsetHeight!==st){var xt={width:ut,height:yt,offsetWidth:et,offsetHeight:st};V.current=xt;var je=et===Math.round(Me)?Me:et,He=st===Math.round(Ye)?Ye:st,ot=Object(R.a)(Object(R.a)({},xt),{},{offsetWidth:je,offsetHeight:He});ae==null||ae(ot,re,de),ee&&Promise.resolve().then(function(){ee(ot,re)})}},[]);return _.useEffect(function(){var re=Object(A.a)(Ke.current)||Object(A.a)(Le.current);return re&&!Ue&&i(re,oe),function(){return l(re,oe)}},[Ke.current,Ue]),_.createElement(v,{ref:Le},$?_.cloneElement(De,{ref:se}):De)}var w="rc-observer-key";function p(_e){var De=_e.children,Ue=Object(t.a)(De);return Ue.map(function(Ke,Le){var ae=(Ke==null?void 0:Ke.key)||"".concat(w,"-").concat(Le);return _.createElement(L,Object(Z.a)({},_e,{key:ae}),Ke)})}p.Collection=C;var n=p,d=N("bT9E"),m=N("TSYQ"),T=N.n(m),y=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important
|
|
`,g=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],U={},P;function I(_e){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=_e.getAttribute("id")||_e.getAttribute("data-reactid")||_e.getAttribute("name");if(De&&U[Ue])return U[Ue];var Ke=window.getComputedStyle(_e),Le=Ke.getPropertyValue("box-sizing")||Ke.getPropertyValue("-moz-box-sizing")||Ke.getPropertyValue("-webkit-box-sizing"),ae=parseFloat(Ke.getPropertyValue("padding-bottom"))+parseFloat(Ke.getPropertyValue("padding-top")),V=parseFloat(Ke.getPropertyValue("border-bottom-width"))+parseFloat(Ke.getPropertyValue("border-top-width")),$=g.map(function(se){return"".concat(se,":").concat(Ke.getPropertyValue(se))}).join(";"),q={sizingStyle:$,paddingSize:ae,borderSize:V,boxSizing:Le};return De&&Ue&&(U[Ue]=q),q}function G(_e){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;P||(P=document.createElement("textarea"),P.setAttribute("tab-index","-1"),P.setAttribute("aria-hidden","true"),document.body.appendChild(P)),_e.getAttribute("wrap")?P.setAttribute("wrap",_e.getAttribute("wrap")):P.removeAttribute("wrap");var Le=I(_e,De),ae=Le.paddingSize,V=Le.borderSize,$=Le.boxSizing,q=Le.sizingStyle;P.setAttribute("style","".concat(q,";").concat(y)),P.value=_e.value||_e.placeholder||"";var se=Number.MIN_SAFE_INTEGER,te=Number.MAX_SAFE_INTEGER,oe=P.scrollHeight,re;if($==="border-box"?oe+=V:$==="content-box"&&(oe-=ae),Ue!==null||Ke!==null){P.value=" ";var ie=P.scrollHeight-ae;Ue!==null&&(se=ie*Ue,$==="border-box"&&(se=se+ae+V),oe=Math.max(se,oe)),Ke!==null&&(te=ie*Ke,$==="border-box"&&(te=te+ae+V),re=oe>te?"":"hidden",oe=Math.min(te,oe))}return{height:oe,minHeight:se,maxHeight:te,overflowY:re,resize:"none"}}var K=N("Gytx"),D=N.n(K),J;(function(_e){_e[_e.NONE=0]="NONE",_e[_e.RESIZING=1]="RESIZING",_e[_e.RESIZED=2]="RESIZED"})(J||(J={}));var X=function(_e){Object(Q.a)(Ue,_e);var De=Object(M.a)(Ue);function Ue(Ke){var Le;return Object(H.a)(this,Ue),Le=De.call(this,Ke),Le.nextFrameActionId=void 0,Le.resizeFrameId=void 0,Le.textArea=void 0,Le.saveTextArea=function(ae){Le.textArea=ae},Le.handleResize=function(ae){var V=Le.state.resizeStatus,$=Le.props,q=$.autoSize,se=$.onResize;if(V!==J.NONE)return;typeof se=="function"&&se(ae),q&&Le.resizeOnNextFrame()},Le.resizeOnNextFrame=function(){cancelAnimationFrame(Le.nextFrameActionId),Le.nextFrameActionId=requestAnimationFrame(Le.resizeTextarea)},Le.resizeTextarea=function(){var ae=Le.props.autoSize;if(!ae||!Le.textArea)return;var V=ae.minRows,$=ae.maxRows,q=G(Le.textArea,!1,V,$);Le.setState({textareaStyles:q,resizeStatus:J.RESIZING},function(){cancelAnimationFrame(Le.resizeFrameId),Le.resizeFrameId=requestAnimationFrame(function(){Le.setState({resizeStatus:J.RESIZED},function(){Le.resizeFrameId=requestAnimationFrame(function(){Le.setState({resizeStatus:J.NONE}),Le.fixFirefoxAutoScroll()})})})})},Le.renderTextArea=function(){var ae=Le.props,V=ae.prefixCls,$=V===void 0?"rc-textarea":V,q=ae.autoSize,se=ae.onResize,te=ae.className,oe=ae.disabled,re=Le.state,ie=re.textareaStyles,ee=re.resizeStatus,de=Object(d.a)(Le.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Ce=T()($,te,Object(b.a)({},"".concat($,"-disabled"),oe));"value"in de&&(de.value=de.value||"");var Me=Object(R.a)(Object(R.a)(Object(R.a)({},Le.props.style),ie),ee===J.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return _.createElement(n,{onResize:Le.handleResize,disabled:!(q||se)},_.createElement("textarea",Object(Z.a)({},de,{className:Ce,style:Me,ref:Le.saveTextArea})))},Le.state={textareaStyles:{},resizeStatus:J.NONE},Le}return Object(O.a)(Ue,[{key:"componentDidUpdate",value:function(Le){(Le.value!==this.props.value||!D()(Le.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 Le=this.textArea.selectionStart,ae=this.textArea.selectionEnd;this.textArea.setSelectionRange(Le,ae)}}catch(V){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ue}(_.Component),ne=X,ue=function(_e){Object(Q.a)(Ue,_e);var De=Object(M.a)(Ue);function Ue(Ke){var Le;Object(H.a)(this,Ue),Le=De.call(this,Ke),Le.resizableTextArea=void 0,Le.focus=function(){Le.resizableTextArea.textArea.focus()},Le.saveTextArea=function(V){Le.resizableTextArea=V},Le.handleChange=function(V){var $=Le.props.onChange;Le.setValue(V.target.value,function(){Le.resizableTextArea.resizeTextarea()}),$&&$(V)},Le.handleKeyDown=function(V){var $=Le.props,q=$.onPressEnter,se=$.onKeyDown;V.keyCode===13&&q&&q(V),se&&se(V)};var ae=typeof Ke.value=="undefined"||Ke.value===null?Ke.defaultValue:Ke.value;return Le.state={value:ae},Le}return Object(O.a)(Ue,[{key:"setValue",value:function(Le,ae){"value"in this.props||this.setState({value:Le},ae)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return _.createElement(ne,Object(Z.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(Le){return"value"in Le?{value:Le.value}:null}}]),Ue}(_.Component),Oe=Ae.default=ue},YH21:function(Ve,Ae,N){var Z=N("H6uX");Ae.Dispatcher=Z;var H=N("ItGF"),O=N("Ze12"),Q=O.isCanvasEl,M=O.transformCoordWithViewport,_=typeof window!="undefined"&&!!window.addEventListener,R=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,b=[];function t(c,i,l,v){return l=l||{},v||!H.canvasSupported?E(c,i,l):H.browser.firefox&&i.layerX!=null&&i.layerX!==i.offsetX?(l.zrX=i.layerX,l.zrY=i.layerY):i.offsetX!=null?(l.zrX=i.offsetX,l.zrY=i.offsetY):E(c,i,l),l}function E(c,i,l){if(H.domSupported&&c.getBoundingClientRect){var v=i.clientX,B=i.clientY;if(Q(c)){var C=c.getBoundingClientRect();l.zrX=v-C.left,l.zrY=B-C.top;return}else if(M(b,c,v,B)){l.zrX=b[0],l.zrY=b[1];return}}l.zrX=l.zrY=0}function a(c){return c||window.event}function A(c,i,l){if(i=a(i),i.zrX!=null)return i;var v=i.type,B=v&&v.indexOf("touch")>=0;if(!B)t(c,i,i,l),i.zrDelta=i.wheelDelta?i.wheelDelta/120:-(i.detail||0)/3;else{var C=v!=="touchend"?i.targetTouches[0]:i.changedTouches[0];C&&t(c,C,i,l)}var L=i.button;return i.which==null&&L!==void 0&&R.test(i.type)&&(i.which=L&1?1:L&2?3:L&4?2:0),i}function h(c,i,l,v){_?c.addEventListener(i,l,v):c.attachEvent("on"+i,l)}function s(c,i,l,v){_?c.removeEventListener(i,l,v):c.detachEvent("on"+i,l)}var o=_?function(c){c.preventDefault(),c.stopPropagation(),c.cancelBubble=!0}:function(c){c.returnValue=!1,c.cancelBubble=!0};function f(c){return c.which===2||c.which===3}function u(c){return c.which>1}Ae.clientToLocal=t,Ae.getNativeEvent=a,Ae.normalizeEvent=A,Ae.addEventListener=h,Ae.removeEventListener=s,Ae.stop=o,Ae.isMiddleOrRightButtonOnMouseUpDown=f,Ae.notLeftMouse=u},YgsL:function(Ve,Ae,N){var Z=N("QBsz"),H=Z.distance;function O(M,_,R,b,t,E,a){var A=(R-M)*.5,h=(b-_)*.5;return(2*(_-R)+A+h)*a+(-3*(_-R)-2*A-h)*E+A*t+_}function Q(M,_){for(var R=M.length,b=[],t=0,E=1;E<R;E++)t+=H(M[E-1],M[E]);var a=t/2;a=a<R?R:a;for(var E=0;E<a;E++){var A=E/(a-1)*(_?R:R-1),h=Math.floor(A),s=A-h,o,f=M[h%R],u,c;_?(o=M[(h-1+R)%R],u=M[(h+1)%R],c=M[(h+2)%R]):(o=M[h===0?h:h-1],u=M[h>R-2?R-1:h+1],c=M[h>R-3?R-1:h+2]);var i=s*s,l=s*i;b.push([O(o[0],f[0],u[0],c[0],s,i,l),O(o[1],f[1],u[1],c[1],s,i,l)])}return b}Ve.exports=Q},ZW9T:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return K});var Z=N("k1fw"),H=N("oBTY"),O=N("miYZ"),Q=N("tsqr"),M=N("rAM+"),_=N("tJVT"),R=N("PpiC"),b=N("q1tI"),t=N.n(b),E=N("bdgK"),a=N("9og8"),A=N("WmNS"),h=N.n(A),s={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},o={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},f={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(`
|
|
`)}]},u={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(`
|
|
`)}]},c=N("5VLF"),i=N.n(c),l={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"]}},v=function(J,X){return X.map(function(ne){return{label:ne,kind:J.languages.CompletionItemKind.Keyword,insertText:ne}})},B=function(J){return Object.keys(l.tables).map(function(X){return{label:X,kind:J.languages.CompletionItemKind.Variable,insertText:X}})},C=function(J,X){var ne=l.tables[J];return ne?ne.map(function(ue){return{label:ue,kind:X.languages.CompletionItemKind.Field,insertText:ue}}):[]};function L(D,J,X,ne,ue){var Oe=J.getWordUntilPosition(X),_e={startLineNumber:X.lineNumber,endLineNumber:X.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},De=ne.map(function(Ue){return{label:Ue,kind:D.languages.CompletionItemKind.Keyword,insertText:Ue,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}});return ue.map(function(Ue){De.push(Object(Z.a)(Object(Z.a)({},Ue),{},{range:_e}))}),De}var w=function(D){l.languages.map(function(ue){return D.languages.registerDocumentFormattingEditProvider(ue,{provideDocumentFormattingEdits:function(_e,De,Ue){return Object(a.a)(h.a.mark(function Ke(){var Le;return h.a.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return Le=i()(_e.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}),V.abrupt("return",[{range:_e.getFullModelRange(),text:Le}]);case 2:case"end":return V.stop()}},Ke)}))()}}),ue});var J=f.quickKey.map(function(ue){return{label:ue.label,kind:D.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),X=u.quickKey.map(function(ue){return{label:ue.label,kind:D.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ne=o.quickKey.map(function(ue){return{label:ue.label,kind:D.languages.CompletionItemKind.Method,insertText:ue.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet}});D.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Oe,_e){var De=Oe.getWordUntilPosition(_e),Ue={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:De.startColumn,endColumn:De.endColumn},Ke=Oe.getLineContent(_e.lineNumber).substring(De.startColumn-2,De.endColumn);return{suggestions:[].concat(Object(H.a)(f.keywords.map(function(Le){return{label:Le,kind:D.languages.CompletionItemKind.Function,documentation:Le,insertText:Le,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})),Object(H.a)(f.quickKey.map(function(Le){return{label:Le.label,kind:D.languages.CompletionItemKind.Function,documentation:Le.content,insertText:Ke.startsWith("#")?Le.content.replace(/#/,""):Le.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})))}}}),D.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Oe,_e){var De=Oe.getWordUntilPosition(_e),Ue={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:De.startColumn,endColumn:De.endColumn};return{suggestions:Object(H.a)(s.keywords.map(function(Ke){return{label:Ke,kind:D.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}}))}}}),D.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Oe,_e){var De=Oe.getWordUntilPosition(_e),Ue={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:De.startColumn,endColumn:De.endColumn},Ke=Oe.getLineContent(_e.lineNumber).substring(De.startColumn-2,De.endColumn);return{suggestions:[].concat(Object(H.a)(o.keywords.map(function(Le){return{label:Le,kind:D.languages.CompletionItemKind.Function,documentation:Le,insertText:Le,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})),Object(H.a)(o.quickKey.map(function(Le){return{label:Le.label,kind:D.languages.CompletionItemKind.Function,documentation:Le.content,insertText:Ke.startsWith("#")?Le.content.replace(/#/,""):Le.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})))}}}),D.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Oe,_e){var De=Oe.getWordUntilPosition(_e),Ue={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:De.startColumn,endColumn:De.endColumn},Ke=Oe.getLineContent(_e.lineNumber).substring(De.startColumn-2,De.endColumn);return{suggestions:[].concat(Object(H.a)(u.keywords.map(function(Le){return{label:Le,kind:D.languages.CompletionItemKind.Function,documentation:Le,insertText:Le,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})),Object(H.a)(u.quickKey.map(function(Le){return{label:Le.label,kind:D.languages.CompletionItemKind.Function,documentation:Le.content,insertText:Ke.startsWith("#")?Le.content.replace(/#/,""):Le.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})))}}})},p="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",n=N("fjLI"),d=N("LvDl"),m=N("+ua5");function T(D){return/^\d+$/.test(D)?"".concat(D,"px"):D}function y(){}var g=!1,U={"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 P(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],J=D;if(Array.isArray(D)){for(var X=0;X<D.length;X++){var ne=U[D[X]];if(ne)return ne}return J[0]}return U[J]||J}var I=null,G=Ae.b=function(D){var J=D.width,X=J===void 0?"100%":J,ne=D.height,ue=ne===void 0?"100%":ne,Oe=D.value,_e=D.language,De=_e===void 0?"javascript":_e,Ue=D.style,Ke=Ue===void 0?{}:Ue,Le=D.options,ae=Le===void 0?{}:Le,V=D.overrideServices,$=V===void 0?{}:V,q=D.theme,se=q===void 0?"vs-dark":q,te=D.onEditBlur,oe=D.onSave,re=D.autoHeight,ie=re===void 0?!1:re,ee=D.forbidCopy,de=ee===void 0?!1:ee,Ce=D.onChange,Me=Ce===void 0?y:Ce,Ye=D.editorDidMount,et=Ye===void 0?y:Ye,st=D.onFocus,ut=st===void 0?y:st,yt=D.filename,xt=yt===void 0?"educoder.txt":yt,je=D.errorLine,He=D.errorContent,ot=He===void 0?"":He,ht=Object(R.a)(D,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),we=Object(b.useRef)(),he=Object(b.useRef)({}),fe=Object(b.useRef)(),ge=Object(b.useRef)(),Te=Object(b.useRef)(!1),me=Object(b.useRef)(),Ee=Object(b.useState)(!1),xe=Object(_.a)(Ee,2),Ie=xe[0],Pe=xe[1];function Qe(){var St;return we.current&&(St=new E.default(function(wt){var Dt=Object(M.a)(wt),Ar;try{for(Dt.s();!(Ar=Dt.n()).done;){var xr=Ar.value;(xr.target.offsetHeight>0||xr.target.offsetWidth>0)&&he.current.instance.layout()}}catch(_r){Dt.e(_r)}finally{Dt.f()}}),St.observe(we.current)),St}function tt(){Q.b.warn(decodeURIComponent(p))}var mt=function(){var wt=he.current.instance;if(Oe!=null&&wt&&Ie){var Dt=wt.getModel();Dt&&Oe!==Dt.getValue()&&(g=!0,Dt.setValue(Oe),wt.layout(),g=!1)}};Object(b.useEffect)(function(){ge.current&&clearTimeout(ge.current),ge.current=setTimeout(function(){mt()},500)},[Oe,Ie,he.current]),Object(b.useEffect)(function(){if(je&&he.current&&he.current.instance){var St=he.current.instance;St.changeViewZones(function(Dt){var Ar=document.createElement("div");Ar.style.padding="10px 20px",Ar.style.width="calc(100% - 20px)",Ar.className="my-error-line-wrp",Ar.innerHTML=ot,Dt.addZone({afterLineNumber:je||11,heightInLines:3,domNode:Ar})});var wt={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}};St.addOverlayWidget(wt),St.revealPositionInCenter({lineNumber:20,column:1})}},[je,he.current,Ie]);function Bt(){var St=he.current.instance;if(St){var wt=St.getSelection(),Dt=he.current.pastePos||{},Ar=new I.Range(Dt.startLineNumber||wt.endLineNumber,Dt.startColumn||wt.endColumn,Dt.endLineNumber||wt.endLineNumber,Dt.endColumn||wt.endColumn);setTimeout(function(){St.executeEdits("",[{range:Ar,text:""}])},300)}}function Et(St){(window.navigator.platform.match("Mac")?St.metaKey:St.ctrlKey)&&St.keyCode==83&&(St.preventDefault(),oe())}var Ct=function(){if(ie&&he.current.instance){var wt=he.current.instance.getContentHeight();at(wt<ue?ue:wt)}else at(ue)};function nt(St){var wt=document.createEvent("MouseEvents");wt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),St.dispatchEvent(wt)}function qe(St,wt){var Dt=window.URL||window.webkitURL||window,Ar=new Blob([wt]),xr=document.createElementNS("http://www.w3.org/1999/xhtml","a");xr.href=Dt.createObjectURL(Ar),xr.download=St,nt(xr)}Object(b.useEffect)(function(){Ct()},[Ct]),Object(b.useEffect)(function(){we.current&&!Ie&&Promise.all([N.e(18),N.e(29)]).then(N.t.bind(null,"M/lh",7)).then(function(St){try{I=St,he.current.instance=I.editor.create(we.current,{value:Oe,language:P(De),theme:se,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},$);var wt=he.current.instance,Dt=n.d._menuItems,Ar=Object(H.a)(Dt).find(function(ir){return ir[0]._debugName=="EditorContext"}),xr=Ar[1],_r=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ft=function(Kt,$t){var Xt=Kt._first;do{var Xr,Br,be=$t.includes((Xr=Xt.element)===null||Xr===void 0||((Br=Xr.command)===null||Br===void 0)?void 0:Br.id);be&&Kt._remove(Xt)}while(Xt=Xt.next)};if(et(wt,I),setTimeout(function(){Ct(),he.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){qe(xt||"educoder.txt",wt.getValue())}}),wt.getDomNode().addEventListener("input",function(){fe.current.autoFormat&&wt.getAction("editor.action.formatDocument").run()})},500),he.current.subscription=wt.onDidChangeModelContent(function(ir){Te.current?clearTimeout(me.current):(Ct(),Me(wt.getValue(),ir)),me.current=setTimeout(function(){Te.current=!1},500)}),window.Monaco||w(I,P(De)),de&&(Ft(xr,_r),we.current.classList.add("noCopyPaste"),wt.onKeyDown(function(ir){var Kt=ir.keyCode,$t=ir.ctrlKey,Xt=ir.metaKey;(Kt===33||Kt===52)&&(Xt||$t)&&(tt(),ir.preventDefault())})),window.Monaco=I,te&&wt.onDidBlurEditorWidget(function(){te(wt.getValue())}),ut&&wt.onDidFocusEditorText(function(){ut(wt.getValue())}),de){wt.addCommand(I.KeyMod.CtrlCmd|I.KeyCode.KEY_V,function(){return tt(),null}),wt.onDidPaste(function(ir){he.current.pastePos=ir});try{window.addEventListener("paste",Bt)}catch(ir){}}var er=Qe();return Pe(!0),function(){var ir=he.current.instance;ir.dispose();var Kt=ir.getModel();Kt&&Kt.dispose(),he.current.subscription&&he.current.subscription.dispose(),de&&window.removeEventListener("paste",Bt),er.unobserve(we.current)}}catch(ir){}})},[]),Object(b.useEffect)(function(){var St=he.current.instance;if(St&&Ie)return document.addEventListener("keydown",Et,!1),function(){document.removeEventListener("keydown",Et)}},[oe,Ie]),Object(b.useEffect)(function(){var St=he.current.instance;if(St&&Ie){var wt=P(De);I.editor.setModelLanguage(St.getModel(),wt),console.log("language:",De,St.getModel(),wt)}},[De,Ie]),Object(b.useEffect)(function(){var St=he.current.instance;St&&Ie&&I.editor.setTheme(se)},[se,Ie]),Object(b.useEffect)(function(){var St=he.current.instance;fe.current=ae,St&&Ie&&(St.updateOptions(Object(Z.a)({},ae)),setTimeout(function(){St.getModel().updateOptions(Object(Z.a)({},ae))},200))},[JSON.stringify(ae),Ie]),Object(b.useEffect)(function(){var St=he.current.instance;St&&Ie&&St.layout()},[X,ue,Ie]);var $e=Object(b.useState)(T(X)),Re=Object(_.a)($e,2),Ne=Re[0],ct=Re[1],rt=Object(b.useState)(T(ue)),gt=Object(_.a)(rt,2),pt=gt[0],at=gt[1],vt=Object(Z.a)(Object(Z.a)({},Ke),{},{width:Ne,height:pt});return t.a.createElement("div",{className:"my-monaco-editor",ref:we,style:vt})};function K(D){var J=D.width,X=J===void 0?"100%":J,ne=D.height,ue=ne===void 0?"100%":ne,Oe=D.original,_e=D.modified,De=D.language,Ue=D.options,Ke=Ue===void 0?{}:Ue,Le=Object(b.useRef)(),ae=Object(b.useState)(null),V=Object(_.a)(ae,2),$=V[0],q=V[1];function se(ie){var ee;return Le.current&&(ee=new E.default(function(de){var Ce=Object(M.a)(de),Me;try{for(Ce.s();!(Me=Ce.n()).done;){var Ye=Me.value;(Ye.target.offsetHeight>0||Ye.target.offsetWidth>0)&&ie.layout()}}catch(et){Ce.e(et)}finally{Ce.f()}}),ee.observe(Le.current)),ee}Object(b.useEffect)(function(){Le.current&&Promise.all([N.e(18),N.e(29)]).then(N.t.bind(null,"M/lh",7)).then(function(ie){I=ie;var ee=I.editor.createDiffEditor(Le.current,Object(Z.a)(Object(Z.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},Ke),{},{wordWrap:!0}));q(ee);var de=se(ee);return function(){ee.dispose();var Ce=ee.getModel();Ce&&Ce.dispose(),de.unobserve(Le.current)}})},[]),Object(b.useEffect)(function(){$&&$.setModel({original:I.editor.createModel(Oe,De),modified:I.editor.createModel(_e,De)})},[Oe,_e,De,$]);var te=T(X),oe=T(ue),re={width:te,height:oe};return t.a.createElement("div",{className:"my-diff-editor",ref:Le,style:re})}},Ze12:function(Ve,Ae,N){var Z=N("ItGF"),H=N("hOwI"),O=H.buildTransformer,Q="___zrEVENTSAVED",M=[];function _(a,A,h,s,o){return R(M,A,s,o,!0)&&R(a,h,M[0],M[1])}function R(a,A,h,s,o){if(A.getBoundingClientRect&&Z.domSupported&&!E(A)){var f=A[Q]||(A[Q]={}),u=b(A,f),c=t(u,f,o);if(c)return c(a,h,s),!0}return!1}function b(a,A){var h=A.markers;if(h)return h;h=A.markers=[];for(var s=["left","right"],o=["top","bottom"],f=0;f<4;f++){var u=document.createElement("div"),c=u.style,i=f%2,l=(f>>1)%2;c.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",s[i]+":0",o[l]+":0",s[1-i]+":auto",o[1-l]+":auto",""].join("!important;"),a.appendChild(u),h.push(u)}return h}function t(a,A,h){for(var s=h?"invTrans":"trans",o=A[s],f=A.srcCoords,u=!0,c=[],i=[],l=0;l<4;l++){var v=a[l].getBoundingClientRect(),B=2*l,C=v.left,L=v.top;c.push(C,L),u=u&&f&&C===f[B]&&L===f[B+1],i.push(a[l].offsetLeft,a[l].offsetTop)}return u&&o?o:(A.srcCoords=c,A[s]=h?O(i,c):O(c,i))}function E(a){return a.nodeName.toUpperCase()==="CANVAS"}Ae.transformLocalCoord=_,Ae.transformCoordWithViewport=R,Ae.isCanvasEl=E},aKvl:function(Ve,Ae,N){var Z=N("Sj9i"),H=Z.quadraticProjectPoint;function O(Q,M,_,R,b,t,E,a,A){if(E===0)return!1;var h=E;if(A>M+h&&A>R+h&&A>t+h||A<M-h&&A<R-h&&A<t-h||a>Q+h&&a>_+h&&a>b+h||a<Q-h&&a<_-h&&a<b-h)return!1;var s=H(Q,M,_,R,b,t,a,A,null);return s<=h/2}Ae.containStroke=O},aX58:function(Ve,Ae,N){var Z=N("3gBT"),H=N("ItGF"),O=N("bYtY"),Q=N("0s+r"),M=N("r6Bn"),_=N("7SHv"),R=N("MKOG"),b=N("zarK");/*!
|
|
* ZRender, a high performance 2d drawing library.
|
|
*
|
|
* Copyright (c) 2013, Baidu Inc.
|
|
* All rights reserved.
|
|
*
|
|
* LICENSE
|
|
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
*/var t=!H.canvasSupported,E={canvas:_},a={},A="4.3.1";function h(i,l){var v=new c(Z(),i,l);return a[v.id]=v,v}function s(i){if(i)i.dispose();else{for(var l in a)a.hasOwnProperty(l)&&a[l].dispose();a={}}return this}function o(i){return a[i]}function f(i,l){E[i]=l}function u(i){delete a[i]}var c=function(i,l,v){v=v||{},this.dom=l,this.id=i;var B=this,C=new M,L=v.renderer;if(t){if(!E.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");L="vml"}else(!L||!E[L])&&(L="canvas");var w=new E[L](l,C,v,i);this.storage=C,this.painter=w;var p=!H.node&&!H.worker?new b(w.getViewportRoot(),w.root):null;this.handler=new Q(C,w,p,w.root),this.animation=new R({stage:{update:O.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var n=C.delFromStorage,d=C.addToStorage;C.delFromStorage=function(m){n.call(C,m),m&&m.removeSelfFromZr(B)},C.addToStorage=function(m){d.call(C,m),m.addSelfToZr(B)}};c.prototype={constructor:c,getId:function(){return this.id},add:function(i){this.storage.addRoot(i),this._needsRefresh=!0},remove:function(i){this.storage.delRoot(i),this._needsRefresh=!0},configLayer:function(i,l){this.painter.configLayer&&this.painter.configLayer(i,l),this._needsRefresh=!0},setBackgroundColor:function(i){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(i),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var i;this._needsRefresh&&(i=!0,this.refreshImmediately()),this._needsRefreshHover&&(i=!0,this.refreshHoverImmediately()),i&&this.trigger("rendered")},addHover:function(i,l){if(this.painter.addHover){var v=this.painter.addHover(i,l);return this.refreshHover(),v}},removeHover:function(i){this.painter.removeHover&&(this.painter.removeHover(i),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(i){i=i||{},this.painter.resize(i.width,i.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(i,l){return this.painter.pathToImage(i,l)},setCursorStyle:function(i){this.handler.setCursorStyle(i)},findHover:function(i,l){return this.handler.findHover(i,l)},on:function(i,l,v){this.handler.on(i,l,v)},off:function(i,l){this.handler.off(i,l)},trigger:function(i,l){this.handler.trigger(i,l)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,u(this.id)}},Ae.version=A,Ae.init=h,Ae.dispose=s,Ae.getInstance=o,Ae.registerPainter=f},bT9E:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return H});var Z=N("VTBJ");function H(O,Q){var M=Object(Z.a)({},O);return Array.isArray(Q)&&Q.forEach(function(_){delete M[_]}),M}},bYtY:function(Ve,Ae){var N={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Z={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},H=Object.prototype.toString,O=Array.prototype,Q=O.forEach,M=O.filter,_=O.slice,R=O.map,b=O.reduce,t={};function E(q,se){q==="createCanvas"&&(u=null),t[q]=se}function a(q){if(q==null||typeof q!="object")return q;var se=q,te=H.call(q);if(te==="[object Array]"){if(!Ke(q)){se=[];for(var oe=0,re=q.length;oe<re;oe++)se[oe]=a(q[oe])}}else if(Z[te]){if(!Ke(q)){var ie=q.constructor;if(q.constructor.from)se=ie.from(q);else{se=new ie(q.length);for(var oe=0,re=q.length;oe<re;oe++)se[oe]=a(q[oe])}}}else if(!N[te]&&!Ke(q)&&!G(q)){se={};for(var ee in q)q.hasOwnProperty(ee)&&(se[ee]=a(q[ee]))}return se}function A(q,se,te){if(!U(se)||!U(q))return te?a(se):q;for(var oe in se)if(se.hasOwnProperty(oe)){var re=q[oe],ie=se[oe];U(ie)&&U(re)&&!T(ie)&&!T(re)&&!G(ie)&&!G(re)&&!P(ie)&&!P(re)&&!Ke(ie)&&!Ke(re)?A(re,ie,te):(te||!(oe in q))&&(q[oe]=a(se[oe],!0))}return q}function h(q,se){for(var te=q[0],oe=1,re=q.length;oe<re;oe++)te=A(te,q[oe],se);return te}function s(q,se){for(var te in se)se.hasOwnProperty(te)&&(q[te]=se[te]);return q}function o(q,se,te){for(var oe in se)se.hasOwnProperty(oe)&&(te?se[oe]!=null:q[oe]==null)&&(q[oe]=se[oe]);return q}var f=function(){return t.createCanvas()};t.createCanvas=function(){return document.createElement("canvas")};var u;function c(){return u||(u=f().getContext("2d")),u}function i(q,se){if(q){if(q.indexOf)return q.indexOf(se);for(var te=0,oe=q.length;te<oe;te++)if(q[te]===se)return te}return-1}function l(q,se){var te=q.prototype;function oe(){}oe.prototype=se.prototype,q.prototype=new oe;for(var re in te)te.hasOwnProperty(re)&&(q.prototype[re]=te[re]);q.prototype.constructor=q,q.superClass=se}function v(q,se,te){q="prototype"in q?q.prototype:q,se="prototype"in se?se.prototype:se,o(q,se,te)}function B(q){return q?typeof q=="string"?!1:typeof q.length=="number":void 0}function C(q,se,te){if(!(q&&se))return;if(q.forEach&&q.forEach===Q)q.forEach(se,te);else if(q.length===+q.length)for(var oe=0,re=q.length;oe<re;oe++)se.call(te,q[oe],oe,q);else for(var ie in q)q.hasOwnProperty(ie)&&se.call(te,q[ie],ie,q)}function L(q,se,te){if(!(q&&se))return;if(q.map&&q.map===R)return q.map(se,te);for(var oe=[],re=0,ie=q.length;re<ie;re++)oe.push(se.call(te,q[re],re,q));return oe}function w(q,se,te,oe){if(!(q&&se))return;if(q.reduce&&q.reduce===b)return q.reduce(se,te,oe);for(var re=0,ie=q.length;re<ie;re++)te=se.call(oe,te,q[re],re,q);return te}function p(q,se,te){if(!(q&&se))return;if(q.filter&&q.filter===M)return q.filter(se,te);for(var oe=[],re=0,ie=q.length;re<ie;re++)se.call(te,q[re],re,q)&&oe.push(q[re]);return oe}function n(q,se,te){if(!(q&&se))return;for(var oe=0,re=q.length;oe<re;oe++)if(se.call(te,q[oe],oe,q))return q[oe]}function d(q,se){var te=_.call(arguments,2);return function(){return q.apply(se,te.concat(_.call(arguments)))}}function m(q){var se=_.call(arguments,1);return function(){return q.apply(this,se.concat(_.call(arguments)))}}function T(q){return H.call(q)==="[object Array]"}function y(q){return typeof q=="function"}function g(q){return H.call(q)==="[object String]"}function U(q){var se=typeof q;return se==="function"||!!q&&se==="object"}function P(q){return!!N[H.call(q)]}function I(q){return!!Z[H.call(q)]}function G(q){return typeof q=="object"&&typeof q.nodeType=="number"&&typeof q.ownerDocument=="object"}function K(q){return q!==q}function D(q){for(var se=0,te=arguments.length;se<te;se++)if(arguments[se]!=null)return arguments[se]}function J(q,se){return q!=null?q:se}function X(q,se,te){return q!=null?q:se!=null?se:te}function ne(){return Function.call.apply(_,arguments)}function ue(q){if(typeof q=="number")return[q,q,q,q];var se=q.length;return se===2?[q[0],q[1],q[0],q[1]]:se===3?[q[0],q[1],q[2],q[1]]:q}function Oe(q,se){if(!q)throw new Error(se)}function _e(q){return q==null?null:typeof q.trim=="function"?q.trim():q.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var De="__ec_primitive__";function Ue(q){q[De]=!0}function Ke(q){return q[De]}function Le(q){var se=T(q);this.data={};var te=this;q instanceof Le?q.each(oe):q&&C(q,oe);function oe(re,ie){se?te.set(re,ie):te.set(ie,re)}}Le.prototype={constructor:Le,get:function(q){return this.data.hasOwnProperty(q)?this.data[q]:null},set:function(q,se){return this.data[q]=se},each:function(q,se){se!==void 0&&(q=d(q,se));for(var te in this.data)this.data.hasOwnProperty(te)&&q(this.data[te],te)},removeKey:function(q){delete this.data[q]}};function ae(q){return new Le(q)}function V(q,se){for(var te=new q.constructor(q.length+se.length),oe=0;oe<q.length;oe++)te[oe]=q[oe];var re=q.length;for(oe=0;oe<se.length;oe++)te[oe+re]=se[oe];return te}function $(){}Ae.$override=E,Ae.clone=a,Ae.merge=A,Ae.mergeAll=h,Ae.extend=s,Ae.defaults=o,Ae.createCanvas=f,Ae.getContext=c,Ae.indexOf=i,Ae.inherits=l,Ae.mixin=v,Ae.isArrayLike=B,Ae.each=C,Ae.map=L,Ae.reduce=w,Ae.filter=p,Ae.find=n,Ae.bind=d,Ae.curry=m,Ae.isArray=T,Ae.isFunction=y,Ae.isString=g,Ae.isObject=U,Ae.isBuiltInObject=P,Ae.isTypedArray=I,Ae.isDom=G,Ae.eqNaN=K,Ae.retrieve=D,Ae.retrieve2=J,Ae.retrieve3=X,Ae.slice=ne,Ae.normalizeCssArray=ue,Ae.assert=Oe,Ae.trim=_e,Ae.setAsPrimitive=Ue,Ae.isPrimitive=Ke,Ae.createHashMap=ae,Ae.concatArray=V,Ae.noop=$},biw7:function(Ve,Ae,N){"use strict";var Z=N("q1tI"),H=N.n(Z),O=Z.createContext(null);Ae.a=O},c5Ni:function(Ve,Ae,N){},chpo:function(Ve,Ae,N){"use strict";Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.default=void 0;var Z=1,H=function(){return"".concat(Z++)};Ae.default=H},crp1:function(Ve,Ae,N){"use strict";N.d(Ae,"b",function(){return Ne}),N.d(Ae,"a",function(){return pt});var Z={},H=function(be,Be,ke,Ze,Je){var Ot=Z[Be]||(Z[Be]=URL.createObjectURL(new Blob([be],{type:"text/javascript"}))),Lt=new Worker(Ot);return Lt.onerror=function(bt){return Je(bt.error,null)},Lt.onmessage=function(bt){return Je(null,bt.data)},Lt.postMessage(ke,Ze),Lt},O=Uint8Array,Q=Uint16Array,M=Uint32Array,_=new O([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),R=new O([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),b=new O([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),t=function(be,Be){for(var ke=new Q(31),Ze=0;Ze<31;++Ze)ke[Ze]=Be+=1<<be[Ze-1];for(var Je=new M(ke[30]),Ze=1;Ze<30;++Ze)for(var Ot=ke[Ze];Ot<ke[Ze+1];++Ot)Je[Ot]=Ot-ke[Ze]<<5|Ze;return[ke,Je]},E=t(_,2),a=E[0],A=E[1];a[28]=258,A[258]=28;for(var h=t(R,0),s=h[0],o=h[1],f=new Q(32768),u=0;u<32768;++u){var c=(u&43690)>>>1|(u&21845)<<1;c=(c&52428)>>>2|(c&13107)<<2,c=(c&61680)>>>4|(c&3855)<<4,f[u]=((c&65280)>>>8|(c&255)<<8)>>>1}for(var i=function(be,Be,ke){for(var Ze=be.length,Je=0,Ot=new Q(Be);Je<Ze;++Je)++Ot[be[Je]-1];var Lt=new Q(Be);for(Je=0;Je<Be;++Je)Lt[Je]=Lt[Je-1]+Ot[Je-1]<<1;var bt;if(ke){bt=new Q(1<<Be);var Rt=15-Be;for(Je=0;Je<Ze;++Je)if(be[Je])for(var At=Je<<4|be[Je],Ut=Be-be[Je],Gt=Lt[be[Je]-1]++<<Ut,gr=Gt|(1<<Ut)-1;Gt<=gr;++Gt)bt[f[Gt]>>>Rt]=At}else for(bt=new Q(Ze),Je=0;Je<Ze;++Je)bt[Je]=f[Lt[be[Je]-1]++]>>>15-be[Je];return bt},l=new O(288),u=0;u<144;++u)l[u]=8;for(var u=144;u<256;++u)l[u]=9;for(var u=256;u<280;++u)l[u]=7;for(var u=280;u<288;++u)l[u]=8;for(var v=new O(32),u=0;u<32;++u)v[u]=5;var B=i(l,9,0),C=i(l,9,1),L=i(v,5,0),w=i(v,5,1),p=function(be){for(var Be=be[0],ke=1;ke<be.length;++ke)be[ke]>Be&&(Be=be[ke]);return Be},n=function(be,Be,ke){var Ze=Be/8>>0;return(be[Ze]|be[Ze+1]<<8)>>>(Be&7)&ke},d=function(be,Be){var ke=Be/8>>0;return(be[ke]|be[ke+1]<<8|be[ke+2]<<16)>>>(Be&7)},m=function(be){return(be/8>>0)+(be&7&&1)},T=function(be,Be,ke){(Be==null||Be<0)&&(Be=0),(ke==null||ke>be.length)&&(ke=be.length);var Ze=new(be instanceof Q?Q:be instanceof M?M:O)(ke-Be);return Ze.set(be.subarray(Be,ke)),Ze},y=function(be,Be,ke){var Ze=be.length,Je=!Be||ke,Ot=!ke||ke.i;ke||(ke={}),Be||(Be=new O(Ze*3));var Lt=function(sn){var Kr=Be.length;if(sn>Kr){var Yr=new O(Math.max(Kr*2,sn));Yr.set(Be),Be=Yr}},bt=ke.f||0,Rt=ke.p||0,At=ke.b||0,Ut=ke.l,Gt=ke.d,gr=ke.m,fr=ke.n,br=Ze*8;do{if(!Ut){ke.f=bt=n(be,Rt,1);var Cr=n(be,Rt+1,3);if(Rt+=3,Cr)if(Cr==1)Ut=C,Gt=w,gr=9,fr=5;else if(Cr==2){var yr=n(be,Rt,31)+257,mr=n(be,Rt+10,15)+4,Dr=yr+n(be,Rt+5,31)+1;Rt+=14;for(var Rr=new O(Dr),jr=new O(19),or=0;or<mr;++or)jr[b[or]]=n(be,Rt+or*3,7);Rt+=mr*3;var Mr=p(jr),zr=(1<<Mr)-1;if(!Ot&&Rt+Dr*(Mr+7)>br)break;for(var Tn=i(jr,Mr,1),or=0;or<Dr;){var Vr=Tn[n(be,Rt,zr)];Rt+=Vr&15;var ar=Vr>>>4;if(ar<16)Rr[or++]=ar;else{var en=0,En=0;for(ar==16?(En=3+n(be,Rt,3),Rt+=2,en=Rr[or-1]):ar==17?(En=3+n(be,Rt,7),Rt+=3):ar==18&&(En=11+n(be,Rt,127),Rt+=7);En--;)Rr[or++]=en}}var cn=Rr.subarray(0,yr),rn=Rr.subarray(yr);gr=p(cn),fr=p(rn),Ut=i(cn,gr,1),Gt=i(rn,fr,1)}else throw"invalid block type";else{var ar=m(Rt)+4,Hr=be[ar-4]|be[ar-3]<<8,hr=ar+Hr;if(hr>Ze){if(Ot)throw"unexpected EOF";break}Je&&Lt(At+Hr),Be.set(be.subarray(ar,hr),At),ke.b=At+=Hr,ke.p=Rt=hr*8;continue}if(Rt>br)throw"unexpected EOF"}Je&&Lt(At+131072);for(var hn=(1<<gr)-1,wn=(1<<fr)-1,Dn=gr+fr+18;Ot||Rt+Dn<br;){var en=Ut[d(be,Rt)&hn],Er=en>>>4;if(Rt+=en&15,Rt>br)throw"unexpected EOF";if(!en)throw"invalid length/literal";if(Er<256)Be[At++]=Er;else if(Er==256){Ut=null;break}else{var sr=Er-254;if(Er>264){var or=Er-257,Yt=_[or];sr=n(be,Rt,(1<<Yt)-1)+a[or],Rt+=Yt}var dr=Gt[d(be,Rt)&wn],wr=dr>>>4;if(!dr)throw"invalid distance";Rt+=dr&15;var rn=s[wr];if(wr>3){var Yt=R[wr];rn+=d(be,Rt)&(1<<Yt)-1,Rt+=Yt}if(Rt>br)throw"unexpected EOF";Je&&Lt(At+131072);for(var Or=At+sr;At<Or;At+=4)Be[At]=Be[At-rn],Be[At+1]=Be[At+1-rn],Be[At+2]=Be[At+2-rn],Be[At+3]=Be[At+3-rn];At=Or}}ke.l=Ut,ke.p=Rt,ke.b=At,Ut&&(bt=1,ke.m=gr,ke.d=Gt,ke.n=fr)}while(!bt);return At==Be.length?Be:T(Be,0,At)},g=function(be,Be,ke){ke<<=Be&7;var Ze=Be/8>>0;be[Ze]|=ke,be[Ze+1]|=ke>>>8},U=function(be,Be,ke){ke<<=Be&7;var Ze=Be/8>>0;be[Ze]|=ke,be[Ze+1]|=ke>>>8,be[Ze+2]|=ke>>>16},P=function(be,Be){for(var ke=[],Ze=0;Ze<be.length;++Ze)be[Ze]&&ke.push({s:Ze,f:be[Ze]});var Je=ke.length,Ot=ke.slice();if(!Je)return[new O(0),0];if(Je==1){var Lt=new O(ke[0].s+1);return Lt[ke[0].s]=1,[Lt,1]}ke.sort(function(Dr,Rr){return Dr.f-Rr.f}),ke.push({s:-1,f:25001});var bt=ke[0],Rt=ke[1],At=0,Ut=1,Gt=2;for(ke[0]={s:-1,f:bt.f+Rt.f,l:bt,r:Rt};Ut!=Je-1;)bt=ke[ke[At].f<ke[Gt].f?At++:Gt++],Rt=ke[At!=Ut&&ke[At].f<ke[Gt].f?At++:Gt++],ke[Ut++]={s:-1,f:bt.f+Rt.f,l:bt,r:Rt};for(var gr=Ot[0].s,Ze=1;Ze<Je;++Ze)Ot[Ze].s>gr&&(gr=Ot[Ze].s);var fr=new Q(gr+1),br=I(ke[Ut-1],fr,0);if(br>Be){var Ze=0,Cr=0,ar=br-Be,Hr=1<<ar;for(Ot.sort(function(Rr,jr){return fr[jr.s]-fr[Rr.s]||Rr.f-jr.f});Ze<Je;++Ze){var hr=Ot[Ze].s;if(fr[hr]>Be)Cr+=Hr-(1<<br-fr[hr]),fr[hr]=Be;else break}for(Cr>>>=ar;Cr>0;){var yr=Ot[Ze].s;fr[yr]<Be?Cr-=1<<Be-fr[yr]++-1:++Ze}for(;Ze>=0&&Cr;--Ze){var mr=Ot[Ze].s;fr[mr]==Be&&(--fr[mr],++Cr)}br=Be}return[new O(fr),br]},I=function(be,Be,ke){return be.s==-1?Math.max(I(be.l,Be,ke+1),I(be.r,Be,ke+1)):Be[be.s]=ke},G=function(be){for(var Be=be.length;Be&&!be[--Be];);for(var ke=new Q(++Be),Ze=0,Je=be[0],Ot=1,Lt=function(Rt){ke[Ze++]=Rt},bt=1;bt<=Be;++bt)if(be[bt]==Je&&bt!=Be)++Ot;else{if(!Je&&Ot>2){for(;Ot>138;Ot-=138)Lt(32754);Ot>2&&(Lt(Ot>10?Ot-11<<5|28690:Ot-3<<5|12305),Ot=0)}else if(Ot>3){for(Lt(Je),--Ot;Ot>6;Ot-=6)Lt(8304);Ot>2&&(Lt(Ot-3<<5|8208),Ot=0)}for(;Ot--;)Lt(Je);Ot=1,Je=be[bt]}return[ke.subarray(0,Ze),Be]},K=function(be,Be){for(var ke=0,Ze=0;Ze<Be.length;++Ze)ke+=be[Ze]*Be[Ze];return ke},D=function(be,Be,ke){var Ze=ke.length,Je=m(Be+2);be[Je]=Ze&255,be[Je+1]=Ze>>>8,be[Je+2]=be[Je]^255,be[Je+3]=be[Je+1]^255;for(var Ot=0;Ot<Ze;++Ot)be[Je+Ot+4]=ke[Ot];return(Je+4+Ze)*8},J=function(be,Be,ke,Ze,Je,Ot,Lt,bt,Rt,At,Ut){g(Be,Ut++,ke),++Je[256];for(var Gt=P(Je,15),gr=Gt[0],fr=Gt[1],br=P(Ot,15),Cr=br[0],ar=br[1],Hr=G(gr),hr=Hr[0],yr=Hr[1],mr=G(Cr),Dr=mr[0],Rr=mr[1],jr=new Q(19),or=0;or<hr.length;++or)jr[hr[or]&31]++;for(var or=0;or<Dr.length;++or)jr[Dr[or]&31]++;for(var Mr=P(jr,7),zr=Mr[0],Tn=Mr[1],Vr=19;Vr>4&&!zr[b[Vr-1]];--Vr);var en=At+5<<3,En=K(Je,l)+K(Ot,v)+Lt,cn=K(Je,gr)+K(Ot,Cr)+Lt+14+3*Vr+K(jr,zr)+(2*jr[16]+3*jr[17]+7*jr[18]);if(en<=En&&en<=cn)return D(Be,Ut,be.subarray(Rt,Rt+At));var rn,hn,wn,Dn;if(g(Be,Ut,1+(cn<En)),Ut+=2,cn<En){rn=i(gr,fr,0),hn=gr,wn=i(Cr,ar,0),Dn=Cr;var Er=i(zr,Tn,0);g(Be,Ut,yr-257),g(Be,Ut+5,Rr-1),g(Be,Ut+10,Vr-4),Ut+=14;for(var or=0;or<Vr;++or)g(Be,Ut+3*or,zr[b[or]]);Ut+=3*Vr;for(var sr=[hr,Dr],Yt=0;Yt<2;++Yt)for(var dr=sr[Yt],or=0;or<dr.length;++or){var wr=dr[or]&31;g(Be,Ut,Er[wr]),Ut+=zr[wr],wr>15&&(g(Be,Ut,dr[or]>>>5&127),Ut+=dr[or]>>>12)}}else rn=B,hn=l,wn=L,Dn=v;for(var or=0;or<bt;++or)if(Ze[or]>255){var wr=Ze[or]>>>18&31;U(Be,Ut,rn[wr+257]),Ut+=hn[wr+257],wr>7&&(g(Be,Ut,Ze[or]>>>23&31),Ut+=_[wr]);var Or=Ze[or]&31;U(Be,Ut,wn[Or]),Ut+=Dn[Or],Or>3&&(U(Be,Ut,Ze[or]>>>5&8191),Ut+=R[Or])}else U(Be,Ut,rn[Ze[or]]),Ut+=hn[Ze[or]];return U(Be,Ut,rn[256]),Ut+hn[256]},X=new M([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ne=new O(0),ue=function(be,Be,ke,Ze,Je,Ot){var Lt=be.length,bt=new O(Ze+Lt+5*(1+Math.floor(Lt/7e3))+Je),Rt=bt.subarray(Ze,bt.length-Je),At=0;if(!Be||Lt<8)for(var Ut=0;Ut<=Lt;Ut+=65535){var Gt=Ut+65535;Gt<Lt?At=D(Rt,At,be.subarray(Ut,Gt)):(Rt[Ut]=Ot,At=D(Rt,At,be.subarray(Ut,Lt)))}else{for(var gr=X[Be-1],fr=gr>>>13,br=gr&8191,Cr=(1<<ke)-1,ar=new Q(32768),Hr=new Q(Cr+1),hr=Math.ceil(ke/3),yr=2*hr,mr=function($r){return(be[$r]^be[$r+1]<<hr^be[$r+2]<<yr)&Cr},Dr=new M(25e3),Rr=new Q(288),jr=new Q(32),or=0,Mr=0,Ut=0,zr=0,Tn=0,Vr=0;Ut<Lt;++Ut){var en=mr(Ut),En=Ut&32767,cn=Hr[en];if(ar[En]=cn,Hr[en]=En,Tn<=Ut){var rn=Lt-Ut;if((or>7e3||zr>24576)&&rn>423){At=J(be,Rt,0,Dr,Rr,jr,Mr,zr,Vr,Ut-Vr,At),zr=or=Mr=0,Vr=Ut;for(var hn=0;hn<286;++hn)Rr[hn]=0;for(var hn=0;hn<30;++hn)jr[hn]=0}var wn=2,Dn=0,Er=br,sr=En-cn&32767;if(rn>2&&en==mr(Ut-sr))for(var Yt=Math.min(fr,rn)-1,dr=Math.min(32767,Ut),wr=Math.min(258,rn);sr<=dr&&--Er&&En!=cn;){if(be[Ut+wn]==be[Ut+wn-sr]){for(var Or=0;Or<wr&&be[Ut+Or]==be[Ut+Or-sr];++Or);if(Or>wn){if(wn=Or,Dn=sr,Or>Yt)break;for(var sn=Math.min(sr,Or-2),Kr=0,hn=0;hn<sn;++hn){var Yr=Ut-sr+hn+32768&32767,zn=ar[Yr],Sn=Yr-zn+32768&32767;Sn>Kr&&(Kr=Sn,cn=Yr)}}}En=cn,cn=ar[En],sr+=En-cn+32768&32767}if(Dn){Dr[zr++]=268435456|A[wn]<<18|o[Dn];var _n=A[wn]&31,Yn=o[Dn]&31;Mr+=_[_n]+R[Yn],++Rr[257+_n],++jr[Yn],Tn=Ut+wn,++or}else Dr[zr++]=be[Ut],++Rr[be[Ut]]}}At=J(be,Rt,Ot,Dr,Rr,jr,Mr,zr,Vr,Ut-Vr,At),Ot||(At=D(Rt,At,ne))}return T(bt,0,Ze+m(At)+Je)},Oe=function(){for(var be=new M(256),Be=0;Be<256;++Be){for(var ke=Be,Ze=9;--Ze;)ke=(ke&1&&3988292384)^ke>>>1;be[Be]=ke}return be}(),_e=function(){var be=4294967295;return{p:function(Be){for(var ke=be,Ze=0;Ze<Be.length;++Ze)ke=Oe[ke&255^Be[Ze]]^ke>>>8;be=ke},d:function(){return be^4294967295}}},De=function(){var be=1,Be=0;return{p:function(ke){for(var Ze=be,Je=Be,Ot=ke.length,Lt=0;Lt!=Ot;){for(var bt=Math.min(Lt+5552,Ot);Lt<bt;++Lt)Ze+=ke[Lt],Je+=Ze;Ze%=65521,Je%=65521}be=Ze,Be=Je},d:function(){return(be>>>8<<16|(Be&255)<<8|Be>>>8)+((be&255)<<23)*2}}},Ue=function(be,Be,ke,Ze,Je){return ue(be,Be.level==null?6:Be.level,Be.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(be.length)))*1.5):12+Be.mem,ke,Ze,!Je)},Ke=function(be,Be){var ke={};for(var Ze in be)ke[Ze]=be[Ze];for(var Ze in Be)ke[Ze]=Be[Ze];return ke},Le=function(be,Be,ke){for(var Ze=be(),Je=be.toString(),Ot=Je.slice(Je.indexOf("[")+1,Je.lastIndexOf("]")).replace(/ /g,"").split(","),Lt=0;Lt<Ze.length;++Lt){var bt=Ze[Lt],Rt=Ot[Lt];if(typeof bt=="function"){Be+=";"+Rt+"=";var At=bt.toString();if(bt.prototype)if(At.indexOf("[native code]")!=-1){var Ut=At.indexOf(" ",8)+1;Be+=At.slice(Ut,At.indexOf("(",Ut))}else{Be+=At;for(var Gt in bt.prototype)Be+=";"+Rt+".prototype."+Gt+"="+bt.prototype[Gt].toString()}else Be+=At}else ke[Rt]=bt}return[Be,ke]},ae=[],V=function(be){var Be=[];for(var ke in be)(be[ke]instanceof O||be[ke]instanceof Q||be[ke]instanceof M)&&Be.push((be[ke]=new be[ke].constructor(be[ke])).buffer);return Be},$=function(be,Be,ke,Ze){var Je;if(!ae[ke]){for(var Ot="",Lt={},bt=be.length-1,Rt=0;Rt<bt;++Rt)Je=Le(be[Rt],Ot,Lt),Ot=Je[0],Lt=Je[1];ae[ke]=Le(be[bt],Ot,Lt)}var At=Ke({},ae[ke][1]);return H(ae[ke][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+Be.toString()+"}",ke,At,V(At),Ze)},q=function(){return[O,Q,M,_,R,b,a,s,C,w,f,i,p,n,d,m,T,y,Ie,ee,de]},se=function(){return[O,Q,M,_,R,b,A,o,B,l,L,v,f,X,ne,i,g,U,P,I,G,K,D,J,m,T,ue,Ue,Te,ee]},te=function(){return[yt,He,ut,_e,Oe]},oe=function(){return[xt,je]},re=function(){return[ot,ut,De]},ie=function(){return[ht]},ee=function(be){return postMessage(be,[be.buffer])},de=function(be){return be&&be.size&&new O(be.size)},Ce=function(be,Be,ke,Ze,Je,Ot){var Lt=$(ke,Ze,Je,function(bt,Rt){Lt.terminate(),Ot(bt,Rt)});return Be.consume||(be=new O(be)),Lt.postMessage([be,Be],[be.buffer]),function(){Lt.terminate()}},Me=function(be){return be.ondata=function(Be,ke){return postMessage([Be,ke],[Be.buffer])},function(Be){return be.push(Be.data[0],Be.data[1])}},Ye=function(be,Be,ke,Ze,Je){var Ot,Lt=$(be,Ze,Je,function(bt,Rt){bt?(Lt.terminate(),Be.ondata.call(Be,bt)):(Rt[1]&&Lt.terminate(),Be.ondata.call(Be,bt,Rt[0],Rt[1]))});Lt.postMessage(ke),Be.push=function(bt,Rt){if(Ot)throw"stream finished";if(!Be.ondata)throw"no stream handler";Lt.postMessage([bt,Ot=Rt],[bt.buffer])},Be.terminate=function(){Lt.terminate()}},et=function(be,Be){return be[Be]|be[Be+1]<<8},st=function(be,Be){return(be[Be]|be[Be+1]<<8|be[Be+2]<<16)+(be[Be+3]<<23)*2},ut=function(be,Be,ke){for(;ke;++Be)be[Be]=ke,ke>>>=8},yt=function(be,Be){var ke=Be.filename;if(be[0]=31,be[1]=139,be[2]=8,be[8]=Be.level<2?4:Be.level==9?2:0,be[9]=3,Be.mtime!=0&&ut(be,4,Math.floor(new Date(Be.mtime||Date.now())/1e3)),ke){be[3]=8;for(var Ze=0;Ze<=ke.length;++Ze)be[Ze+10]=ke.charCodeAt(Ze)}},xt=function(be){if(be[0]!=31||be[1]!=139||be[2]!=8)throw"invalid gzip data";var Be=be[3],ke=10;Be&4&&(ke+=be[10]|(be[11]<<8)+2);for(var Ze=(Be>>3&1)+(Be>>4&1);Ze>0;Ze-=!be[ke++]);return ke+(Be&2)},je=function(be){var Be=be.length;return(be[Be-4]|be[Be-3]<<8|be[Be-2]<<16)+2*(be[Be-1]<<23)},He=function(be){return 10+(be.filename&&be.filename.length+1||0)},ot=function(be,Be){var ke=Be.level,Ze=ke==0?0:ke<6?1:ke==9?3:2;be[0]=120,be[1]=Ze<<6|(Ze?32-2*Ze:1)},ht=function(be){if((be[0]&15)!=8||be[0]>>>4>7||(be[0]<<8|be[1])%31)throw"invalid zlib data";if(be[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function we(be,Be){return!Be&&typeof be=="function"&&(Be=be,be={}),this.ondata=Be,be}var he=function(){function be(Be,ke){!ke&&typeof Be=="function"&&(ke=Be,Be={}),this.ondata=ke,this.o=Be||{}}return be.prototype.p=function(Be,ke){this.ondata(Ue(Be,this.o,0,0,!ke),ke)},be.prototype.push=function(Be,ke){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=ke,this.p(Be,ke||!1)},be}(),fe=function(){function be(Be,ke){Ye([se,function(){return[Me,he]}],this,we.call(this,Be,ke),function(Ze){var Je=new he(Ze.data);onmessage=Me(Je)},6)}return be}();function ge(be,Be,ke){if(ke||(ke=Be,Be={}),typeof ke!="function")throw"no callback";return Ce(be,Be,[se],function(Ze){return ee(Te(Ze.data[0],Ze.data[1]))},0,ke)}function Te(be,Be){return Be===void 0&&(Be={}),Ue(be,Be,0,0)}var me=function(){function be(Be){this.s={},this.p=new O(0),this.ondata=Be}return be.prototype.e=function(Be){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var ke=this.p.length,Ze=new O(ke+Be.length);Ze.set(this.p),Ze.set(Be,ke),this.p=Ze},be.prototype.c=function(Be){this.d=this.s.i=Be||!1;var ke=this.s.b,Ze=y(this.p,this.o,this.s);this.ondata(T(Ze,ke,this.s.b),this.d),this.o=T(Ze,this.s.b-32768),this.s.b=this.o.length,this.p=T(this.p,this.s.p/8>>0),this.s.p&=7},be.prototype.push=function(Be,ke){this.e(Be),this.c(ke)},be}(),Ee=function(){function be(Be){this.ondata=Be,Ye([q,function(){return[Me,me]}],this,0,function(){var ke=new me;onmessage=Me(ke)},7)}return be}();function xe(be,Be,ke){if(ke||(ke=Be,Be={}),typeof ke!="function")throw"no callback";return Ce(be,Be,[q],function(Ze){return ee(Ie(Ze.data[0],de(Ze.data[1])))},1,ke)}function Ie(be,Be){return y(be,Be)}var Pe=function(){function be(Be,ke){this.c=_e(),this.l=0,this.v=1,he.call(this,Be,ke)}return be.prototype.push=function(Be,ke){he.prototype.push.call(this,Be,ke)},be.prototype.p=function(Be,ke){this.c.p(Be),this.l+=Be.length;var Ze=Ue(Be,this.o,this.v&&He(this.o),ke&&8,!ke);this.v&&(yt(Ze,this.o),this.v=0),ke&&(ut(Ze,Ze.length-8,this.c.d()),ut(Ze,Ze.length-4,this.l)),this.ondata(Ze,ke)},be}(),Qe=function(){function be(Be,ke){Ye([se,te,function(){return[Me,he,Pe]}],this,we.call(this,Be,ke),function(Ze){var Je=new Pe(Ze.data);onmessage=Me(Je)},8)}return be}();function tt(be,Be,ke){if(ke||(ke=Be,Be={}),typeof ke!="function")throw"no callback";return Ce(be,Be,[se,te,function(){return[mt]}],function(Ze){return ee(mt(Ze.data[0],Ze.data[1]))},2,ke)}function mt(be,Be){Be===void 0&&(Be={});var ke=_e(),Ze=be.length;ke.p(be);var Je=Ue(be,Be,He(Be),8),Ot=Je.length;return yt(Je,Be),ut(Je,Ot-8,ke.d()),ut(Je,Ot-4,Ze),Je}var Bt=function(){function be(Be){this.v=1,me.call(this,Be)}return be.prototype.push=function(Be,ke){if(me.prototype.e.call(this,Be),this.v){var Ze=xt(this.p);if(Ze>=this.p.length&&!ke)return;this.p=this.p.subarray(Ze),this.v=0}if(ke){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}me.prototype.c.call(this,ke)},be}(),Et=function(){function be(Be){this.ondata=Be,Ye([q,oe,function(){return[Me,me,Bt]}],this,0,function(){var ke=new Bt;onmessage=Me(ke)},9)}return be}();function Ct(be,Be,ke){if(ke||(ke=Be,Be={}),typeof ke!="function")throw"no callback";return Ce(be,Be,[q,oe,function(){return[nt]}],function(Ze){return ee(nt(Ze.data[0]))},3,ke)}function nt(be,Be){return y(be.subarray(xt(be),-8),Be||new O(je(be)))}var qe=function(){function be(Be,ke){this.c=De(),this.v=1,he.call(this,Be,ke)}return be.prototype.push=function(Be,ke){he.prototype.push.call(this,Be,ke)},be.prototype.p=function(Be,ke){this.c.p(Be);var Ze=Ue(Be,this.o,this.v&&2,ke&&4,!ke);this.v&&(ot(Ze,this.o),this.v=0),ke&&ut(Ze,Ze.length-4,this.c.d()),this.ondata(Ze,ke)},be}(),$e=function(){function be(Be,ke){Ye([se,re,function(){return[Me,he,qe]}],this,we.call(this,Be,ke),function(Ze){var Je=new qe(Ze.data);onmessage=Me(Je)},10)}return be}();function Re(be,Be,ke){if(ke||(ke=Be,Be={}),typeof ke!="function")throw"no callback";return Ce(be,Be,[se,re,function(){return[Ne]}],function(Ze){return ee(Ne(Ze.data[0],Ze.data[1]))},4,ke)}function Ne(be,Be){Be===void 0&&(Be={});var ke=De();ke.p(be);var Ze=Ue(be,Be,2,4);return ot(Ze,Be),ut(Ze,Ze.length-4,ke.d()),Ze}var ct=function(){function be(Be){this.v=1,me.call(this,Be)}return be.prototype.push=function(Be,ke){if(me.prototype.e.call(this,Be),this.v){if(this.p.length<2&&!ke)return;this.p=this.p.subarray(2),this.v=0}if(ke){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}me.prototype.c.call(this,ke)},be}(),rt=function(){function be(Be){this.ondata=Be,Ye([q,ie,function(){return[Me,me,ct]}],this,0,function(){var ke=new ct;onmessage=Me(ke)},11)}return be}();function gt(be,Be,ke){if(ke||(ke=Be,Be={}),typeof ke!="function")throw"no callback";return Ce(be,Be,[q,ie,function(){return[pt]}],function(Ze){return ee(pt(Ze.data[0],de(Ze.data[1])))},5,ke)}function pt(be,Be){return y((ht(be),be.subarray(2,-4)),Be)}var at=function(){function be(Be){this.G=Bt,this.I=me,this.Z=ct,this.ondata=Be}return be.prototype.push=function(Be,ke){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(Be,ke);else{if(this.p&&this.p.length){var Ze=new O(this.p.length+Be.length);Ze.set(this.p),Ze.set(Be,this.p.length)}else this.p=Be;if(this.p.length>2){var Je=this,Ot=function(){Je.ondata.apply(Je,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(Ot):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(Ot):new this.Z(Ot),this.s.push(this.p,ke),this.p=null}}},be}(),vt=function(){function be(Be){this.G=Et,this.I=Ee,this.Z=rt,this.ondata=Be}return be.prototype.push=function(Be,ke){at.prototype.push.call(this,Be,ke)},be}();function St(be,Be,ke){if(ke||(ke=Be,Be={}),typeof ke!="function")throw"no callback";return be[0]==31&&be[1]==139&&be[2]==8?Ct(be,Be,ke):(be[0]&15)!=8||be[0]>>4>7||(be[0]<<8|be[1])%31?xe(be,Be,ke):gt(be,Be,ke)}function wt(be,Be){return be[0]==31&&be[1]==139&&be[2]==8?nt(be,Be):(be[0]&15)!=8||be[0]>>4>7||(be[0]<<8|be[1])%31?Ie(be,Be):pt(be,Be)}var Dt=function(be,Be,ke,Ze){for(var Je in be){var Ot=be[Je],Lt=Be+Je;Ot instanceof O?ke[Lt]=[Ot,Ze]:Array.isArray(Ot)?ke[Lt]=[Ot[0],Ke(Ze,Ot[1])]:Dt(Ot,Lt+"/",ke,Ze)}};function Ar(be,Be){var ke=be.length;if(!Be&&typeof TextEncoder!="undefined")return new TextEncoder().encode(be);for(var Ze=new O(be.length+(be.length>>>1)),Je=0,Ot=function(At){Ze[Je++]=At},Lt=0;Lt<ke;++Lt){if(Je+5>Ze.length){var bt=new O(Je+8+(ke-Lt<<1));bt.set(Ze),Ze=bt}var Rt=be.charCodeAt(Lt);Rt<128||Be?Ot(Rt):Rt<2048?(Ot(192|Rt>>>6),Ot(128|Rt&63)):Rt>55295&&Rt<57344?(Rt=65536+(Rt&1023<<10)|be.charCodeAt(++Lt)&1023,Ot(240|Rt>>>18),Ot(128|Rt>>>12&63),Ot(128|Rt>>>6&63),Ot(128|Rt&63)):(Ot(224|Rt>>>12),Ot(128|Rt>>>6&63),Ot(128|Rt&63))}return T(Ze,0,Je)}function xr(be,Be){var ke="";if(!Be&&typeof TextDecoder!="undefined")return new TextDecoder().decode(be);for(var Ze=0;Ze<be.length;){var Je=be[Ze++];Je<128||Be?ke+=String.fromCharCode(Je):Je<224?ke+=String.fromCharCode((Je&31)<<6|be[Ze++]&63):Je<240?ke+=String.fromCharCode((Je&15)<<12|(be[Ze++]&63)<<6|be[Ze++]&63):(Je=((Je&15)<<18|(be[Ze++]&63)<<12|(be[Ze++]&63)<<6|be[Ze++]&63)-65536,ke+=String.fromCharCode(55296|Je>>10,56320|Je&1023))}return ke}var _r=function(be,Be){return Be+30+et(be,Be+26)+et(be,Be+28)},Ft=function(be,Be,ke){var Ze=et(be,Be+28),Je=xr(be.subarray(Be+46,Be+46+Ze),!(et(be,Be+8)&2048)),Ot=Be+46+Ze,Lt=ke?er(be,Ot):[st(be,Be+20),st(be,Be+24),st(be,Be+42)],bt=Lt[0],Rt=Lt[1],At=Lt[2];return[et(be,Be+10),bt,Rt,Je,Ot+et(be,Be+30)+et(be,Be+32),At]},er=function(be,Be){for(;et(be,Be)!=1;Be+=4+et(be,Be+2));return[st(be,Be+12),st(be,Be+4),st(be,Be+20)]},ir=function(be,Be,ke,Ze,Je,Ot,Lt,bt,Rt,At){var Ut=Ot.length,Gt=Ze.length;ut(be,Be,Rt!=null?33639248:67324752),Be+=4,Rt!=null&&(be[Be]=20,Be+=2),be[Be]=20,Be+=2,be[Be++]=At==8&&(bt.level==1?6:bt.level<6?4:bt.level==9?2:0),be[Be++]=Lt&&8,be[Be]=At,Be+=2;var gr=new Date(bt.mtime||Date.now()),fr=gr.getFullYear()-1980;if(fr<0||fr>119)throw"date not in range 1980-2099";ut(be,Be,(fr<<24)*2|gr.getMonth()+1<<21|gr.getDate()<<16|gr.getHours()<<11|gr.getMinutes()<<5|gr.getSeconds()>>>1),Be+=4,ut(be,Be,ke),ut(be,Be+4,Gt),ut(be,Be+8,Je),ut(be,Be+12,Ut),Be+=16,Rt!=null&&(ut(be,Be+=10,Rt),Be+=4),be.set(Ot,Be),Be+=Ut,Rt==null&&be.set(Ze,Be)},Kt=function(be,Be,ke,Ze,Je){ut(be,Be,101010256),ut(be,Be+8,ke),ut(be,Be+10,ke),ut(be,Be+12,Ze),ut(be,Be+16,Je)};function $t(be,Be,ke){if(ke||(ke=Be,Be={}),typeof ke!="function")throw"no callback";var Ze={};Dt(be,"",Ze,Be);var Je=Object.keys(Ze),Ot=Je.length,Lt=0,bt=0,Rt=Ot,At=new Array(Ot),Ut=[],Gt=function(){for(var Cr=0;Cr<Ut.length;++Cr)Ut[Cr]()},gr=function(){var Cr=new O(bt+22),ar=Lt,Hr=bt-Lt;bt=0;for(var hr=0;hr<Rt;++hr){var yr=At[hr];try{ir(Cr,bt,yr.c,yr.d,yr.m,yr.n,yr.u,yr.p,null,yr.t),ir(Cr,Lt,yr.c,yr.d,yr.m,yr.n,yr.u,yr.p,bt,yr.t),Lt+=46+yr.n.length,bt+=30+yr.n.length+yr.d.length}catch(mr){return ke(mr,null)}}Kt(Cr,Lt,At.length,Hr,ar),ke(null,Cr)};Ot||gr();for(var fr=function(Cr){var ar=Je[Cr],Hr=Ze[ar],hr=Hr[0],yr=Hr[1],mr=_e(),Dr=hr.length;mr.p(hr);var Rr=Ar(ar),jr=Rr.length,or=yr.level==0?0:8,Mr=function(zr,Tn){if(zr)Gt(),ke(zr,null);else{var Vr=Tn.length;At[Cr]={t:or,d:Tn,m:Dr,c:mr.d(),u:ar.length!=Vr,n:Rr,p:yr},Lt+=30+jr+Vr,bt+=76+2*jr+Vr,--Ot||gr()}};if(Rr.length>65535&&Mr("filename too long",null),!or)Mr(null,hr);else if(Dr<16e4)try{Mr(null,Te(hr,yr))}catch(zr){Mr(zr,null)}else Ut.push(ge(hr,yr,Mr))},br=0;br<Rt;++br)fr(br);return Gt}function Xt(be,Be){Be===void 0&&(Be={});var ke={},Ze=[];Dt(be,"",ke,Be);var Je=0,Ot=0;for(var Lt in ke){var bt=ke[Lt],Rt=bt[0],At=bt[1],Ut=At.level==0?0:8,Gt=Ar(Lt),gr=Gt.length;if(Gt.length>65535)throw"filename too long";var fr=Ut?Te(Rt,At):Rt,br=fr.length,Cr=_e();Cr.p(Rt),Ze.push({t:Ut,d:fr,m:Rt.length,c:Cr.d(),u:Lt.length!=gr,n:Gt,o:Je,p:At}),Je+=30+gr+br,Ot+=76+2*gr+br}for(var ar=new O(Ot+22),Hr=Je,hr=Ot-Je,yr=0;yr<Ze.length;++yr){var mr=Ze[yr];ir(ar,mr.o,mr.c,mr.d,mr.m,mr.n,mr.u,mr.p,null,mr.t),ir(ar,Je,mr.c,mr.d,mr.m,mr.n,mr.u,mr.p,mr.o,mr.t),Je+=46+mr.n.length}return Kt(ar,Je,Ze.length,hr,Hr),ar}function Xr(be,Be){if(typeof Be!="function")throw"no callback";for(var ke=[],Ze=function(){for(var gr=0;gr<ke.length;++gr)ke[gr]()},Je={},Ot=be.length-22;st(be,Ot)!=101010256;--Ot)if(!Ot||be.length-Ot>65558){Be("invalid zip file",null);return}var Lt=et(be,Ot+8);Lt||Be(null,{});var bt=Lt,Rt=st(be,Ot+16),At=Rt==4294967295;if(At){if(Ot=st(be,Ot-12),st(be,Ot)!=101075792)throw"invalid zip file";bt=Lt=st(be,Ot+32),Rt=st(be,Ot+48)}for(var Ut=function(gr){var fr=Ft(be,Rt,At),br=fr[0],Cr=fr[1],ar=fr[2],Hr=fr[3],hr=fr[4],yr=fr[5],mr=_r(be,yr);Rt=hr;var Dr=function(jr,or){jr?(Ze(),Be(jr,null)):(Je[Hr]=or,--Lt||Be(null,Je))};if(!br)Dr(null,T(be,mr,mr+Cr));else if(br==8){var Rr=be.subarray(mr,mr+Cr);if(Cr<32e4)try{Dr(null,Ie(Rr,new O(ar)))}catch(jr){Dr(jr,null)}else ke.push(xe(Rr,{size:ar},Dr))}else Dr("unknown compression type "+br,null)},Gt=0;Gt<bt;++Gt)Ut(Gt);return Ze}function Br(be){for(var Be={},ke=be.length-22;st(be,ke)!=101010256;--ke)if(!ke||be.length-ke>65558)throw"invalid zip file";var Ze=et(be,ke+8);if(!Ze)return{};var Je=st(be,ke+16),Ot=Je==4294967295;if(Ot){if(ke=st(be,ke-12),st(be,ke)!=101075792)throw"invalid zip file";Ze=st(be,ke+32),Je=st(be,ke+48)}for(var Lt=0;Lt<Ze;++Lt){var bt=Ft(be,Je,Ot),Rt=bt[0],At=bt[1],Ut=bt[2],Gt=bt[3],gr=bt[4],fr=bt[5],br=_r(be,fr);if(Je=gr,!Rt)Be[Gt]=T(be,br,br+At);else if(Rt==8)Be[Gt]=Ie(be.subarray(br,br+At),new O(Ut));else throw"unknown compression type "+Rt}return Be}},dMvE:function(Ve,Ae){var N={linear:function(H){return H},quadraticIn:function(H){return H*H},quadraticOut:function(H){return H*(2-H)},quadraticInOut:function(H){return(H*=2)<1?.5*H*H:-.5*(--H*(H-2)-1)},cubicIn:function(H){return H*H*H},cubicOut:function(H){return--H*H*H+1},cubicInOut:function(H){return(H*=2)<1?.5*H*H*H:.5*((H-=2)*H*H+2)},quarticIn:function(H){return H*H*H*H},quarticOut:function(H){return 1- --H*H*H*H},quarticInOut:function(H){return(H*=2)<1?.5*H*H*H*H:-.5*((H-=2)*H*H*H-2)},quinticIn:function(H){return H*H*H*H*H},quinticOut:function(H){return--H*H*H*H*H+1},quinticInOut:function(H){return(H*=2)<1?.5*H*H*H*H*H:.5*((H-=2)*H*H*H*H+2)},sinusoidalIn:function(H){return 1-Math.cos(H*Math.PI/2)},sinusoidalOut:function(H){return Math.sin(H*Math.PI/2)},sinusoidalInOut:function(H){return .5*(1-Math.cos(Math.PI*H))},exponentialIn:function(H){return H===0?0:Math.pow(1024,H-1)},exponentialOut:function(H){return H===1?1:1-Math.pow(2,-10*H)},exponentialInOut:function(H){return H===0?0:H===1?1:(H*=2)<1?.5*Math.pow(1024,H-1):.5*(-Math.pow(2,-10*(H-1))+2)},circularIn:function(H){return 1-Math.sqrt(1-H*H)},circularOut:function(H){return Math.sqrt(1- --H*H)},circularInOut:function(H){return(H*=2)<1?-.5*(Math.sqrt(1-H*H)-1):.5*(Math.sqrt(1-(H-=2)*H)+1)},elasticIn:function(H){var O,Q=.1,M=.4;return H===0?0:H===1?1:(!Q||Q<1?(Q=1,O=M/4):O=M*Math.asin(1/Q)/(2*Math.PI),-(Q*Math.pow(2,10*(H-=1))*Math.sin((H-O)*(2*Math.PI)/M)))},elasticOut:function(H){var O,Q=.1,M=.4;return H===0?0:H===1?1:(!Q||Q<1?(Q=1,O=M/4):O=M*Math.asin(1/Q)/(2*Math.PI),Q*Math.pow(2,-10*H)*Math.sin((H-O)*(2*Math.PI)/M)+1)},elasticInOut:function(H){var O,Q=.1,M=.4;return H===0?0:H===1?1:(!Q||Q<1?(Q=1,O=M/4):O=M*Math.asin(1/Q)/(2*Math.PI),(H*=2)<1?-.5*(Q*Math.pow(2,10*(H-=1))*Math.sin((H-O)*(2*Math.PI)/M)):Q*Math.pow(2,-10*(H-=1))*Math.sin((H-O)*(2*Math.PI)/M)*.5+1)},backIn:function(H){var O=1.70158;return H*H*((O+1)*H-O)},backOut:function(H){var O=1.70158;return--H*H*((O+1)*H+O)+1},backInOut:function(H){var O=1.70158*1.525;return(H*=2)<1?.5*(H*H*((O+1)*H-O)):.5*((H-=2)*H*((O+1)*H+O)+2)},bounceIn:function(H){return 1-N.bounceOut(1-H)},bounceOut:function(H){return H<1/2.75?7.5625*H*H:H<2/2.75?7.5625*(H-=1.5/2.75)*H+.75:H<2.5/2.75?7.5625*(H-=2.25/2.75)*H+.9375:7.5625*(H-=2.625/2.75)*H+.984375},bounceInOut:function(H){return H<.5?N.bounceIn(H*2)*.5:N.bounceOut(H*2-1)*.5+.5}},Z=N;Ve.exports=Z},dejd:function(Ve,Ae,N){},dmUQ:function(Ve,Ae,N){"use strict";var Z=N("Ff2n"),H=N("rePB"),O=N("1OyB"),Q=N("vuIU"),M=N("Ji7U"),_=N("md7G"),R=N("foSv"),b=N("q1tI"),t=N.n(b),E=N("TSYQ"),a=N.n(E),A=N("4IlW");function h(d,m){var T=Object.keys(d);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(d);m&&(y=y.filter(function(g){return Object.getOwnPropertyDescriptor(d,g).enumerable})),T.push.apply(T,y)}return T}function s(d){for(var m=1;m<arguments.length;m++){var T=arguments[m]!=null?arguments[m]:{};m%2?h(Object(T),!0).forEach(function(y){Object(H.a)(d,y,T[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(T)):h(Object(T)).forEach(function(y){Object.defineProperty(d,y,Object.getOwnPropertyDescriptor(T,y))})}return d}function o(d){var m=f();return function(){var y=Object(R.a)(d),g;if(m){var U=Object(R.a)(this).constructor;g=Reflect.construct(y,arguments,U)}else g=y.apply(this,arguments);return Object(_.a)(this,g)}}function f(){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(d){return!1}}function u(){}function c(d){d.preventDefault()}var i=function(m){return m.replace(/[^\w.-]+/g,"")},l=200,v=600,B=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,C=function(m){return m!=null},L=function(m,T){return T===m||typeof T=="number"&&typeof m=="number"&&isNaN(T)&&isNaN(m)},w=function(d){Object(M.a)(T,d);var m=o(T);function T(y){var g;Object(O.a)(this,T),g=m.call(this,y),g.onKeyDown=function(I){var G=g.props,K=G.onKeyDown,D=G.onPressEnter;if(I.keyCode===A.a.UP){var J=g.getRatio(I);g.up(I,J,null),g.stop()}else if(I.keyCode===A.a.DOWN){var X=g.getRatio(I);g.down(I,X,null),g.stop()}else I.keyCode===A.a.ENTER&&D&&D(I);if(g.recordCursorPosition(),g.lastKeyCode=I.keyCode,K){for(var ne=arguments.length,ue=new Array(ne>1?ne-1:0),Oe=1;Oe<ne;Oe++)ue[Oe-1]=arguments[Oe];K.apply(void 0,[I].concat(ue))}},g.onKeyUp=function(I){var G=g.props.onKeyUp;if(g.stop(),g.recordCursorPosition(),G){for(var K=arguments.length,D=new Array(K>1?K-1:0),J=1;J<K;J++)D[J-1]=arguments[J];G.apply(void 0,[I].concat(D))}},g.onChange=function(I){var G=g.props.onChange;g.state.focused&&(g.inputting=!0),g.rawInput=g.props.parser(g.getValueFromEvent(I)),g.setState({inputValue:g.rawInput}),G(g.toNumber(g.rawInput))},g.onMouseUp=function(){var I=g.props.onMouseUp;g.recordCursorPosition(),I&&I.apply(void 0,arguments)},g.onFocus=function(){var I;g.setState({focused:!0}),(I=g.props).onFocus.apply(I,arguments)},g.onBlur=function(){var I=g.props.onBlur;g.inputting=!1,g.setState({focused:!1});var G=g.getCurrentValidValue(g.state.inputValue),K=g.setValue(G,u);if(I){var D=g.input.value,J=g.getInputDisplayValue({focus:!1,value:K});g.input.value=J&&Number(J),I.apply(void 0,arguments),g.input.value=D}},g.getRatio=function(I){var G=1;return I.metaKey||I.ctrlKey?G=.1:I.shiftKey&&(G=10),G},g.getFullNum=function(I){return isNaN(I)?I:/e/i.test(String(I))?Number(I).toFixed(18).replace(/\.?0+$/,""):I},g.getPrecision=function(I){if(C(g.props.precision))return g.props.precision;var G=String(I);if(G.indexOf("e-")>=0)return parseInt(G.slice(G.indexOf("e-")+2),10);var K=0;return G.indexOf(".")>=0&&(K=G.length-G.indexOf(".")-1),K},g.getInputDisplayValue=function(I){var G=I||g.state,K=G.focused,D=G.inputValue,J=G.value,X;K?X=D:X=g.toPrecisionAsStep(J),X==null&&(X="");var ne=g.formatWrapper(X);return C(g.props.decimalSeparator)&&(ne=ne.toString().replace(".",g.props.decimalSeparator)),ne},g.recordCursorPosition=function(){try{g.cursorStart=g.input.selectionStart,g.cursorEnd=g.input.selectionEnd,g.currentValue=g.input.value,g.cursorBefore=g.input.value.substring(0,g.cursorStart),g.cursorAfter=g.input.value.substring(g.cursorEnd)}catch(I){}},g.restoreByAfter=function(I){if(I===void 0)return!1;var G=g.input.value,K=G.lastIndexOf(I);if(K===-1)return!1;var D=g.cursorBefore.length;return g.lastKeyCode===A.a.DELETE&&g.cursorBefore.charAt(D-1)===I[0]?(g.fixCaret(D,D),!0):K+I.length===G.length?(g.fixCaret(K,K),!0):!1},g.partRestoreByAfter=function(I){return I===void 0?!1:Array.prototype.some.call(I,function(G,K){var D=I.substring(K);return g.restoreByAfter(D)})},g.isNotCompleteNumber=function(I){return isNaN(I)||I===""||I===null||I&&I.toString().indexOf(".")===I.toString().length-1},g.stop=function(){g.autoStepTimer&&clearTimeout(g.autoStepTimer)},g.down=function(I,G,K){g.pressingUpOrDown=!0,g.step("down",I,G,K)},g.up=function(I,G,K){g.pressingUpOrDown=!0,g.step("up",I,G,K)},g.saveInput=function(I){g.input=I};var U=y.value;U===void 0&&(U=y.defaultValue),g.state={focused:y.autoFocus};var P=g.getValidValue(g.toNumber(U));return g.state=s(s({},g.state),{},{inputValue:g.toPrecisionAsStep(P),value:P}),g}return Object(Q.a)(T,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(g){var U=this.props,P=U.value,I=U.onChange,G=U.max,K=U.min,D=this.state.focused;if(g){if(!L(g.value,P)||!L(g.max,G)||!L(g.min,K)){var J=D?P:this.getValidValue(P),X;this.pressingUpOrDown?X=J:this.inputting?X=this.rawInput:X=this.toPrecisionAsStep(J),this.setState({value:J,inputValue:X})}var ne="value"in this.props?P:this.state.value;"max"in this.props&&g.max!==G&&typeof ne=="number"&&ne>G&&I&&I(G),"min"in this.props&&g.min!==K&&typeof ne=="number"&&ne<K&&I&&I(K)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ue=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===A.a.BACKSPACE?ue=this.cursorStart-1:this.lastKeyCode===A.a.DELETE&&(ue=this.cursorStart):ue=this.input.value.length,this.fixCaret(ue,ue)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case A.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case A.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Oe){}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(g){var U=g;return U===""?U="":this.isNotCompleteNumber(parseFloat(U))?U=this.state.value:U=this.getValidValue(U),this.toNumber(U)}},{key:"getValueFromEvent",value:function(g){var U=g.target.value.trim().replace(/。/g,".");return C(this.props.decimalSeparator)&&(U=U.replace(this.props.decimalSeparator,".")),U}},{key:"getValidValue",value:function(g){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,I=parseFloat(g);return isNaN(I)?g:(I<U&&(I=U),I>P&&(I=P),I)}},{key:"setValue",value:function(g,U){var P=this.props.precision,I=this.isNotCompleteNumber(parseFloat(g))?null:parseFloat(g),G=this.state.value,K=G===void 0?null:G,D=this.state.inputValue,J=D===void 0?null:D,X=typeof I=="number"?I.toFixed(P):"".concat(I),ne=I!==K||X!=="".concat(J);return"value"in this.props?(J=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:J},U)):this.setState({value:I,inputValue:this.toPrecisionAsStep(g)},U),ne&&this.props.onChange(I),I}},{key:"getMaxPrecision",value:function(g){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.props,I=P.precision,G=P.step;if(C(I))return I;var K=this.getPrecision(U),D=this.getPrecision(G),J=this.getPrecision(g);return g?Math.max(J,K+D):K+D}},{key:"getPrecisionFactor",value:function(g){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.getMaxPrecision(g,U);return Math.pow(10,P)}},{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(g){return this.props.formatter?this.props.formatter(g):g}},{key:"toPrecisionAsStep",value:function(g){if(this.isNotCompleteNumber(g)||g==="")return g;var U=Math.abs(this.getMaxPrecision(g));return isNaN(U)?g.toString():Number(g).toFixed(U)}},{key:"toNumber",value:function(g){var U=this.props.precision,P=this.state.focused,I=g&&g.length>16&&P;return this.isNotCompleteNumber(g)||I?g:C(U)?Math.round(g*Math.pow(10,U))/Math.pow(10,U):Number(g)}},{key:"upStep",value:function(g,U){var P=this.props.step,I=this.getPrecisionFactor(g,U),G=Math.abs(this.getMaxPrecision(g,U)),K=((I*g+I*P*U)/I).toFixed(G);return this.toNumber(K)}},{key:"downStep",value:function(g,U){var P=this.props.step,I=this.getPrecisionFactor(g,U),G=Math.abs(this.getMaxPrecision(g,U)),K=((I*g-I*P*U)/I).toFixed(G);return this.toNumber(K)}},{key:"step",value:function(g,U){var P=this,I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,G=arguments.length>3?arguments[3]:void 0;this.stop(),U&&(U.persist(),U.preventDefault());var K=this.props;if(K.disabled)return;var D=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(D))return;var J=this["".concat(g,"Step")](D,I),X=J>K.max||J<K.min;if(J>K.max?J=K.max:J<K.min&&(J=K.min),this.setValue(J,null),this.setState({focused:!0},function(){P.pressingUpOrDown=!1}),X)return;this.autoStepTimer=setTimeout(function(){P[g](U,I,!0)},G?l:v)}},{key:"fixCaret",value:function(g,U){if(g===void 0||U===void 0||!this.input||!this.input.value)return;try{var P=this.input.selectionStart,I=this.input.selectionEnd;(g!==P||U!==I)&&this.input.setSelectionRange(g,U)}catch(G){}}},{key:"render",value:function(){var g,U=this.props,P=U.prefixCls,I=U.disabled,G=U.readOnly,K=U.useTouch,D=U.autoComplete,J=U.upHandler,X=U.downHandler,ne=U.className,ue=U.max,Oe=U.min,_e=U.style,De=U.title,Ue=U.onMouseEnter,Ke=U.onMouseLeave,Le=U.onMouseOver,ae=U.onMouseOut,V=U.required,$=U.onClick,q=U.tabIndex,se=U.type,te=U.placeholder,oe=U.id,re=U.inputMode,ie=U.pattern,ee=U.step,de=U.maxLength,Ce=U.autoFocus,Me=U.name,Ye=U.onPaste,et=U.onInput,st=Object(Z.a)(U,["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,yt=ut.value,xt=ut.focused,je=a()(P,(g={},Object(H.a)(g,ne,!!ne),Object(H.a)(g,"".concat(P,"-disabled"),I),Object(H.a)(g,"".concat(P,"-focused"),xt),g)),He={};Object.keys(st).forEach(function(Ie){(Ie.substr(0,5)==="data-"||Ie.substr(0,5)==="aria-"||Ie==="role")&&(He[Ie]=st[Ie])});var ot=!G&&!I,ht=this.getInputDisplayValue(null),we=(yt||yt===0)&&(isNaN(yt)||Number(yt)>=ue),he=(yt||yt===0)&&(isNaN(yt)||Number(yt)<=Oe),fe=we||I||G,ge=he||I||G,Te=a()("".concat(P,"-handler"),"".concat(P,"-handler-up"),Object(H.a)({},"".concat(P,"-handler-up-disabled"),fe)),me=a()("".concat(P,"-handler"),"".concat(P,"-handler-down"),Object(H.a)({},"".concat(P,"-handler-down-disabled"),ge)),Ee=K?{onTouchStart:fe?u:this.up,onTouchEnd:this.stop}:{onMouseDown:fe?u:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},xe=K?{onTouchStart:ge?u:this.down,onTouchEnd:this.stop}:{onMouseDown:ge?u:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return t.a.createElement("div",{className:je,style:_e,title:De,onMouseEnter:Ue,onMouseLeave:Ke,onMouseOver:Le,onMouseOut:ae,onFocus:function(){return null},onBlur:function(){return null}},t.a.createElement("div",{className:"".concat(P,"-handler-wrap")},t.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Increase Value","aria-disabled":fe,className:Te}),J||t.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-up-inner"),onClick:c})),t.a.createElement("span",Object.assign({unselectable:"on"},xe,{role:"button","aria-label":"Decrease Value","aria-disabled":ge,className:me}),X||t.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-down-inner"),onClick:c}))),t.a.createElement("div",{className:"".concat(P,"-input-wrap")},t.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Oe,"aria-valuemax":ue,"aria-valuenow":yt,required:V,type:se,placeholder:te,onPaste:Ye,onClick:$,onMouseUp:this.onMouseUp,className:"".concat(P,"-input"),tabIndex:q,autoComplete:D,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:ot?this.onKeyDown:u,onKeyUp:ot?this.onKeyUp:u,autoFocus:Ce,maxLength:de,readOnly:G,disabled:I,max:ue,min:Oe,step:ee,name:Me,title:De,id:oe,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ht),pattern:ie,inputMode:re,onInput:et},He))))}}]),T}(t.a.Component);w.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:B,min:-B,step:1,style:{},onChange:u,onKeyDown:u,onPressEnter:u,onFocus:u,onBlur:u,parser:i,required:!1,autoComplete:"off"};var p=w,n=Ae.a=p},dqUG:function(Ve,Ae,N){var Z=N("Gev7"),H=N("bYtY"),O=N("6GrX"),Q=N("pzxd"),M=N("gut8"),_=M.ContextCachedBy,R=function(t){Z.call(this,t)};R.prototype={constructor:R,type:"text",brush:function(t,E){var a=this.style;this.__dirty&&Q.normalizeTextStyle(a,!0),a.fill=a.stroke=a.shadowBlur=a.shadowColor=a.shadowOffsetX=a.shadowOffsetY=null;var A=a.text;if(A!=null&&(A+=""),!Q.needDrawText(A,a)){t.__attrCachedBy=_.NONE;return}this.setTransform(t),Q.renderText(this,t,A,a,null,E),this.restoreTransform(t)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&Q.normalizeTextStyle(t,!0),!this._rect){var E=t.text;E!=null?E+="":E="";var a=O.getBoundingRect(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(a.x+=t.x||0,a.y+=t.y||0,Q.getStroke(t.textStroke,t.textStrokeWidth)){var A=t.textStrokeWidth;a.x-=A/2,a.y-=A/2,a.width+=A,a.height+=A}this._rect=a}return this._rect}},H.inherits(R,Z);var b=R;Ve.exports=b},fW2E:function(Ve,Ae){var N={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function Z(H,O,Q){return N.hasOwnProperty(O)?Q*=H.dpr:Q}Ve.exports=Z},fjLI:function(Ve,Ae,N){"use strict";N.d(Ae,"f",function(){return h}),N.d(Ae,"b",function(){return s}),N.d(Ae,"a",function(){return o}),N.d(Ae,"d",function(){return f}),N.d(Ae,"e",function(){return u}),N.d(Ae,"c",function(){return c});var Z=N("8HAY"),H=N("Vhoy"),O=N("MI8n"),Q=N("JYp7"),M=N("pmY6"),_=N("24hK"),R=N("nnTU"),b=N("T8No"),t=N("Cg/j"),E=N("t9D7"),a=function(i,l,v,B){var C=arguments.length,L=C<3?l:B===null?B=Object.getOwnPropertyDescriptor(l,v):B,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(i,l,v,B);else for(var p=i.length-1;p>=0;p--)(w=i[p])&&(L=(C<3?w(L):C>3?w(l,v,L):w(l,v))||L);return C>3&&L&&Object.defineProperty(l,v,L),L},A=function(i,l){return function(v,B){l(v,B,i)}};function h(i){return i.command!==void 0}class s{constructor(i){this.id=s._idPool++,this._debugName=i}}s._idPool=0,s.CommandPalette=new s("CommandPalette"),s.EditorContext=new s("EditorContext"),s.SimpleEditorContext=new s("SimpleEditorContext"),s.EditorContextCopy=new s("EditorContextCopy"),s.EditorContextPeek=new s("EditorContextPeek"),s.MenubarEditMenu=new s("MenubarEditMenu"),s.MenubarCopy=new s("MenubarCopy"),s.MenubarGoMenu=new s("MenubarGoMenu"),s.MenubarSelectionMenu=new s("MenubarSelectionMenu"),s.InlineCompletionsActions=new s("InlineCompletionsActions");const o=Object(t.c)("menuService"),f=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new O.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:i=>i===s.CommandPalette}}addCommand(i){return this.addCommands(Q.a.single(i))}addCommands(i){for(const l of i)this._commands.set(l.id,l);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(M.i)(()=>{let l=!1;for(const v of i)l=this._commands.delete(v.id)||l;l&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(i){return this._commands.get(i)}getCommands(){const i=new Map;return this._commands.forEach((l,v)=>i.set(v,l)),i}appendMenuItem(i,l){return this.appendMenuItems(Q.a.single({id:i,item:l}))}appendMenuItems(i){const l=new Set,v=new _.a;for(const{id:B,item:C}of i){let L=this._menuItems.get(B);L||(L=new _.a,this._menuItems.set(B,L)),v.push(L.push(C)),l.add(B)}return this._onDidChangeMenu.fire(l),Object(M.i)(()=>{if(v.size>0){for(let B of v)B();this._onDidChangeMenu.fire(l),v.clear()}})}getMenuItems(i){let l;return this._menuItems.has(i)?l=[...this._menuItems.get(i)]:l=[],i===s.CommandPalette&&this._appendImplicitItems(l),l}_appendImplicitItems(i){const l=new Set;for(const v of i)h(v)&&(l.add(v.command.id),v.alt&&l.add(v.alt.id));this._commands.forEach((v,B)=>{l.has(B)||i.push({command:v})})}};class u extends Z.e{constructor(i,l,v,B){super(`submenuitem.${i.submenu.id}`,typeof i.title=="string"?i.title:i.title.value,[],"submenu");this.item=i,this._menuService=l,this._contextKeyService=v,this._options=B}get actions(){const i=[],l=this._menuService.createMenu(this.item.submenu,this._contextKeyService),v=l.getActions(this._options);l.dispose();for(const[,B]of v)B.length>0&&(i.push(...B),i.push(new Z.d));return i.length&&i.pop(),i}}let c=class i{constructor(l,v,B,C,L){var w,p;if(this._commandService=L,this.id=l.id,this.label=(B==null?void 0:B.renderShortTitle)&&l.shortTitle?typeof l.shortTitle=="string"?l.shortTitle:l.shortTitle.value:typeof l.title=="string"?l.title:l.title.value,this.tooltip=(p=typeof l.tooltip=="string"?l.tooltip:(w=l.tooltip)===null||w===void 0?void 0:w.value)!==null&&p!==void 0?p:"",this.enabled=!l.precondition||C.contextMatchesRules(l.precondition),this.checked=void 0,l.toggled){const n=l.toggled.condition?l.toggled:{condition:l.toggled};this.checked=C.contextMatchesRules(n.condition),this.checked&&n.tooltip&&(this.tooltip=typeof n.tooltip=="string"?n.tooltip:n.tooltip.value),n.title&&(this.label=typeof n.title=="string"?n.title:n.title.value)}this.item=l,this.alt=v?new i(v,void 0,B,C,L):void 0,this._options=B,E.d.isThemeIcon(l.icon)&&(this.class=H.a.asClassName(l.icon))}dispose(){}run(...l){var v,B;let C=[];return((v=this._options)===null||v===void 0?void 0:v.arg)&&(C=[...C,this._options.arg]),((B=this._options)===null||B===void 0?void 0:B.shouldForwardArgs)&&(C=[...C,...l]),this._commandService.executeCommand(this.id,...C)}};c=a([A(3,b.b),A(4,R.b)],c)},fyJ8:function(Ve,Ae,N){"use strict";var Z=N("rePB"),H=N("VTBJ"),O=N("Ff2n"),Q=N("U8pU"),M=N("q1tI"),_=N.n(M),R=N("TSYQ"),b=N.n(R),t=N("c+Xe"),E=N("sR1s");function a(f){return f&&Object(Q.a)(f)==="object"&&!Array.isArray(f)&&!M.isValidElement(f)}function A(f){return typeof f=="string"?!0:Object(t.c)(f)}function h(f,u){var c,i=f.prefixCls,l=f.className,v=f.record,B=f.index,C=f.dataIndex,L=f.render,w=f.children,p=f.component,n=p===void 0?"td":p,d=f.colSpan,m=f.rowSpan,T=f.fixLeft,y=f.fixRight,g=f.firstFixLeft,U=f.lastFixLeft,P=f.firstFixRight,I=f.lastFixRight,G=f.appendNode,K=f.additionalProps,D=K===void 0?{}:K,J=f.ellipsis,X=f.align,ne=f.rowType,ue=f.isSticky,Oe="".concat(i,"-cell"),_e,De;if(w)De=w;else{var Ue=Object(E.b)(v,C);if(De=Ue,L){var Ke=L(Ue,v,B);a(Ke)?(De=Ke.children,_e=Ke.props):De=Ke}}Object(Q.a)(De)==="object"&&!Array.isArray(De)&&!M.isValidElement(De)&&(De=null),J&&(U||P)&&(De=M.createElement("span",{className:"".concat(Oe,"-content")},De));var Le=_e||{},ae=Le.colSpan,V=Le.rowSpan,$=Le.style,q=Le.className,se=Object(O.a)(Le,["colSpan","rowSpan","style","className"]),te=ae!==void 0?ae:d,oe=V!==void 0?V:m;if(te===0||oe===0)return null;var re={},ie=typeof T=="number",ee=typeof y=="number";ie&&(re.position="sticky",re.left=T),ee&&(re.position="sticky",re.right=y);var de={};X&&(de.textAlign=X);var Ce,Me=J===!0?{showTitle:!0}:J;Me&&(Me.showTitle||ne==="header")&&(typeof De=="string"||typeof De=="number"?Ce=De.toString():M.isValidElement(De)&&typeof De.props.children=="string"&&(Ce=De.props.children));var Ye=Object(H.a)(Object(H.a)(Object(H.a)({title:Ce},se),D),{},{colSpan:te&&te!==1?te:null,rowSpan:oe&&oe!==1?oe:null,className:b()(Oe,l,(c={},Object(Z.a)(c,"".concat(Oe,"-fix-left"),ie),Object(Z.a)(c,"".concat(Oe,"-fix-left-first"),g),Object(Z.a)(c,"".concat(Oe,"-fix-left-last"),U),Object(Z.a)(c,"".concat(Oe,"-fix-right"),ee),Object(Z.a)(c,"".concat(Oe,"-fix-right-first"),P),Object(Z.a)(c,"".concat(Oe,"-fix-right-last"),I),Object(Z.a)(c,"".concat(Oe,"-ellipsis"),J),Object(Z.a)(c,"".concat(Oe,"-with-append"),G),Object(Z.a)(c,"".concat(Oe,"-fix-sticky"),(ie||ee)&&ue),c),D.className,q),style:Object(H.a)(Object(H.a)(Object(H.a)(Object(H.a)({},D.style),de),re),$),ref:A(n)?u:null});return M.createElement(n,Object.assign({},Ye),G,De)}var s=M.forwardRef(h);s.displayName="Cell";var o=M.memo(s,function(f,u){return u.shouldCellUpdate?!u.shouldCellUpdate(u.record,f.record):!1});Ae.a=o},gut8:function(Ve,Ae){var N={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Z=9;Ae.ContextCachedBy=N,Ae.WILL_BE_RESTORED=Z},h7HQ:function(Ve,Ae,N){var Z=N("y+Vt"),H=N("T6xi"),O=Z.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(Q,M){H.buildPath(Q,M,!0)}});Ve.exports=O},hOwI:function(Ve,Ae){var N=Math.log(2);function Z(O,Q,M,_,R,b){var t=_+"-"+R,E=O.length;if(b.hasOwnProperty(t))return b[t];if(Q===1){var a=Math.round(Math.log((1<<E)-1&~R)/N);return O[M][a]}for(var A=_|1<<M,h=M+1;_&1<<h;)h++;for(var s=0,o=0,f=0;o<E;o++){var u=1<<o;u&R||(s+=(f%2?-1:1)*O[M][o]*Z(O,Q-1,h,A,R|u,b),f++)}return b[t]=s,s}function H(O,Q){var M=[[O[0],O[1],1,0,0,0,-Q[0]*O[0],-Q[0]*O[1]],[0,0,0,O[0],O[1],1,-Q[1]*O[0],-Q[1]*O[1]],[O[2],O[3],1,0,0,0,-Q[2]*O[2],-Q[2]*O[3]],[0,0,0,O[2],O[3],1,-Q[3]*O[2],-Q[3]*O[3]],[O[4],O[5],1,0,0,0,-Q[4]*O[4],-Q[4]*O[5]],[0,0,0,O[4],O[5],1,-Q[5]*O[4],-Q[5]*O[5]],[O[6],O[7],1,0,0,0,-Q[6]*O[6],-Q[6]*O[7]],[0,0,0,O[6],O[7],1,-Q[7]*O[6],-Q[7]*O[7]]],_={},R=Z(M,8,0,0,0,_);if(R===0)return;for(var b=[],t=0;t<8;t++)for(var E=0;E<8;E++)b[E]==null&&(b[E]=0),b[E]+=((t+E)%2?-1:1)*Z(M,7,t===0?1:0,1<<t,1<<E,_)/R*Q[t];return function(a,A,h){var s=A*b[6]+h*b[7]+1;a[0]=(A*b[0]+h*b[1]+b[2])/s,a[1]=(A*b[3]+h*b[4]+b[5])/s}}Ae.buildTransformer=H},hW8S:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return Q}),N.d(Ae,"c",function(){return M}),N.d(Ae,"b",function(){return _});var Z=N("VTBJ"),H=N("Ff2n"),O=N("Kwbf"),Q="RC_TABLE_INTERNAL_COL_DEFINE";function M(R){var b=R.expandable,t=Object(H.a)(R,["expandable"]);return"expandable"in R?Object(Z.a)(Object(Z.a)({},t),b):t}function _(R){return Object.keys(R).reduce(function(b,t){return(t.substr(0,5)==="data-"||t.substr(0,5)==="aria-")&&(b[t]=R[t]),b},{})}},hX1E:function(Ve,Ae){var N=Math.PI*2;function Z(H){return H%=N,H<0&&(H+=N),H}Ae.normalizeRadian=Z},hydK:function(Ve,Ae){var N="http://www.w3.org/2000/svg";function Z(H){return document.createElementNS(N,H)}Ae.createElement=Z},hyiK:function(Ve,Ae){function N(Z,H,O,Q,M,_){if(_>H&&_>Q||_<H&&_<Q)return 0;if(Q===H)return 0;var R=Q<H?1:-1,b=(_-H)/(Q-H);(b===1||b===0)&&(R=Q<H?.5:-.5);var t=b*(O-Z)+Z;return t===M?Infinity:t>M?R:0}Ve.exports=N},iXp4:function(Ve,Ae,N){var Z=N("ItGF"),H=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function O(Q){return Z.browser.ie&&Z.browser.version>=11?function(){var M=this.__clipPaths,_=this.style,R;if(M)for(var b=0;b<M.length;b++){var t=M[b],E=t&&t.shape,a=t&&t.type;if(E&&(a==="sector"&&E.startAngle===E.endAngle||a==="rect"&&(!E.width||!E.height))){for(var A=0;A<H.length;A++)H[A][2]=_[H[A][0]],_[H[A][0]]=H[A][1];R=!0;break}}if(Q.apply(this,arguments),R)for(var A=0;A<H.length;A++)_[H[A][0]]=H[A][2]}:Q}Ve.exports=O},ic2d:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return Q});var Z=N("FWmy"),H=N("746U");class O{constructor(){this.data=new Map}add(M,_){Z.a(H.l(M)),Z.a(H.k(_)),Z.a(!this.data.has(M),"There is already an extension with this id"),this.data.set(M,_)}as(M){return this.data.get(M)||null}}const Q=new O},j5sG:function(Ve,Ae,N){"use strict";Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.createSensor=void 0;var Z=H(N("NohK"));function H(Q){return Q&&Q.__esModule?Q:{default:Q}}var O=function(M){var _=void 0,R=[],b=(0,Z.default)(function(){R.forEach(function(h){h(M)})}),t=function(){var s=new ResizeObserver(b);return s.observe(M),b(),s},E=function(s){_||(_=t()),R.indexOf(s)===-1&&R.push(s)},a=function(){_.disconnect(),R=[],_=void 0},A=function(s){var o=R.indexOf(s);o!==-1&&R.splice(o,1),R.length===0&&_&&a()};return{element:M,bind:E,destroy:a,unbind:A}};Ae.createSensor=O},jTL6:function(Ve,Ae,N){var Z=N("y+Vt"),H=Z.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(O,Q){var M=Q.cx,_=Q.cy,R=Math.max(Q.r,0),b=Q.startAngle,t=Q.endAngle,E=Q.clockwise,a=Math.cos(b),A=Math.sin(b);O.moveTo(a*R+M,A*R+_),O.arc(M,_,R,b,t,!E)}});Ve.exports=H},juDX:function(Ve,Ae,N){N("P47w");var Z=N("aX58"),H=Z.registerPainter,O=N("3CBa");H("svg",O)},kSUc:function(Ve,Ae,N){},"kVK+":function(Ve,Ae){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ae.read=function(N,Z,H,O,Q){var M,_,R=Q*8-O-1,b=(1<<R)-1,t=b>>1,E=-7,a=H?Q-1:0,A=H?-1:1,h=N[Z+a];for(a+=A,M=h&(1<<-E)-1,h>>=-E,E+=R;E>0;M=M*256+N[Z+a],a+=A,E-=8);for(_=M&(1<<-E)-1,M>>=-E,E+=O;E>0;_=_*256+N[Z+a],a+=A,E-=8);if(M===0)M=1-t;else{if(M===b)return _?NaN:(h?-1:1)*Infinity;_=_+Math.pow(2,O),M=M-t}return(h?-1:1)*_*Math.pow(2,M-O)},Ae.write=function(N,Z,H,O,Q,M){var _,R,b,t=M*8-Q-1,E=(1<<t)-1,a=E>>1,A=Q===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=O?0:M-1,s=O?1:-1,o=Z<0||Z===0&&1/Z<0?1:0;for(Z=Math.abs(Z),isNaN(Z)||Z===Infinity?(R=isNaN(Z)?1:0,_=E):(_=Math.floor(Math.log(Z)/Math.LN2),Z*(b=Math.pow(2,-_))<1&&(_--,b*=2),_+a>=1?Z+=A/b:Z+=A*Math.pow(2,1-a),Z*b>=2&&(_++,b/=2),_+a>=E?(R=0,_=E):_+a>=1?(R=(Z*b-1)*Math.pow(2,Q),_=_+a):(R=Z*Math.pow(2,a-1)*Math.pow(2,Q),_=0));Q>=8;N[H+h]=R&255,h+=s,R/=256,Q-=8);for(_=_<<Q|R,t+=Q;t>0;N[H+h]=_&255,h+=s,_/=256,t-=8);N[H+h-s]|=o*128}},lZu9:function(Ve,Ae,N){(function(Z){Z(N("VrN/"),N("1eCo"),N("8EBN"))})(function(Z){"use strict";Z.defineMode("markdown",function(H,O){var Q=Z.getMode(H,"text/html"),M=Q.name=="null";function _(K){if(Z.findModeByName){var D=Z.findModeByName(K);D&&(K=D.mime||D.mimes[0])}var J=Z.getMode(H,K);return J.name=="null"?null:J}O.highlightFormatting===void 0&&(O.highlightFormatting=!1),O.maxBlockquoteDepth===void 0&&(O.maxBlockquoteDepth=0),O.taskLists===void 0&&(O.taskLists=!1),O.strikethrough===void 0&&(O.strikethrough=!1),O.emoji===void 0&&(O.emoji=!1),O.fencedCodeBlockHighlighting===void 0&&(O.fencedCodeBlockHighlighting=!0),O.fencedCodeBlockDefaultMode===void 0&&(O.fencedCodeBlockDefaultMode="text/plain"),O.xml===void 0&&(O.xml=!0),O.tokenTypeOverrides===void 0&&(O.tokenTypeOverrides={});var R={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 b in R)R.hasOwnProperty(b)&&O.tokenTypeOverrides[b]&&(R[b]=O.tokenTypeOverrides[b]);var t=/^([*\-_])(?:\s*\1){2,}\s*$/,E=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,a=/^\[(x| )\](?=\s)/i,A=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,s=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,u=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,c=" ";function i(K,D,J){return D.f=D.inline=J,J(K,D)}function l(K,D,J){return D.f=D.block=J,J(K,D)}function v(K){return!K||!/\S/.test(K.string)}function B(K){if(K.linkTitle=!1,K.linkHref=!1,K.linkText=!1,K.em=!1,K.strong=!1,K.strikethrough=!1,K.quote=0,K.indentedCode=!1,K.f==L){var D=M;if(!D){var J=Z.innerMode(Q,K.htmlState);D=J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText}D&&(K.f=d,K.block=C,K.htmlState=null)}return K.trailingSpace=0,K.trailingSpaceNewLine=!1,K.prevLine=K.thisLine,K.thisLine={stream:null},null}function C(K,D){var J=K.column()===D.indentation,X=v(D.prevLine.stream),ne=D.indentedCode,ue=D.prevLine.hr,Oe=D.list!==!1,_e=(D.listStack[D.listStack.length-1]||0)+3;D.indentedCode=!1;var De=D.indentation;if(D.indentationDiff===null&&(D.indentationDiff=D.indentation,Oe)){for(D.list=null;De<D.listStack[D.listStack.length-1];)D.listStack.pop(),D.listStack.length?D.indentation=D.listStack[D.listStack.length-1]:D.list=!1;D.list!==!1&&(D.indentationDiff=De-D.listStack[D.listStack.length-1])}var Ue=!X&&!ue&&!D.prevLine.header&&(!Oe||!ne)&&!D.prevLine.fencedCodeEnd,Ke=(D.list===!1||ue||X)&&D.indentation<=_e&&K.match(t),Le=null;if(D.indentationDiff>=4&&(ne||D.prevLine.fencedCodeEnd||D.prevLine.header||X))return K.skipToEnd(),D.indentedCode=!0,R.code;if(K.eatSpace())return null;if(J&&D.indentation<=_e&&(Le=K.match(A))&&Le[1].length<=6)return D.quote=0,D.header=Le[1].length,D.thisLine.header=!0,O.highlightFormatting&&(D.formatting="header"),D.f=D.inline,p(D);if(D.indentation<=_e&&K.eat(">"))return D.quote=J?1:D.quote+1,O.highlightFormatting&&(D.formatting="quote"),K.eatSpace(),p(D);if(!Ke&&!D.setext&&J&&D.indentation<=_e&&(Le=K.match(E))){var ae=Le[1]?"ol":"ul";return D.indentation=De+K.current().length,D.list=!0,D.quote=0,D.listStack.push(D.indentation),D.em=!1,D.strong=!1,D.code=!1,D.strikethrough=!1,O.taskLists&&K.match(a,!1)&&(D.taskList=!0),D.f=D.inline,O.highlightFormatting&&(D.formatting=["list","list-"+ae]),p(D)}else{if(J&&D.indentation<=_e&&(Le=K.match(o,!0)))return D.quote=0,D.fencedEndRE=new RegExp(Le[1]+"+ *$"),D.localMode=O.fencedCodeBlockHighlighting&&_(Le[2]||O.fencedCodeBlockDefaultMode),D.localMode&&(D.localState=Z.startState(D.localMode)),D.f=D.block=w,O.highlightFormatting&&(D.formatting="code-block"),D.code=-1,p(D);if(D.setext||(!Ue||!Oe)&&!D.quote&&D.list===!1&&!D.code&&!Ke&&!f.test(K.string)&&(Le=K.lookAhead(1))&&(Le=Le.match(h)))return D.setext?(D.header=D.setext,D.setext=0,K.skipToEnd(),O.highlightFormatting&&(D.formatting="header")):(D.header=Le[0].charAt(0)=="="?1:2,D.setext=D.header),D.thisLine.header=!0,D.f=D.inline,p(D);if(Ke)return K.skipToEnd(),D.hr=!0,D.thisLine.hr=!0,R.hr;if(K.peek()==="[")return i(K,D,U)}return i(K,D,D.inline)}function L(K,D){var J=Q.token(K,D.htmlState);if(!M){var X=Z.innerMode(Q,D.htmlState);(X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText||D.md_inside&&K.current().indexOf(">")>-1)&&(D.f=d,D.block=C,D.htmlState=null)}return J}function w(K,D){var J=D.listStack[D.listStack.length-1]||0,X=D.indentation<J,ne=J+3;if(D.fencedEndRE&&D.indentation<=ne&&(X||K.match(D.fencedEndRE))){O.highlightFormatting&&(D.formatting="code-block");var ue;return X||(ue=p(D)),D.localMode=D.localState=null,D.block=C,D.f=d,D.fencedEndRE=null,D.code=0,D.thisLine.fencedCodeEnd=!0,X?l(K,D,D.block):ue}else return D.localMode?D.localMode.token(K,D.localState):(K.skipToEnd(),R.code)}function p(K){var D=[];if(K.formatting){D.push(R.formatting),typeof K.formatting=="string"&&(K.formatting=[K.formatting]);for(var J=0;J<K.formatting.length;J++)D.push(R.formatting+"-"+K.formatting[J]),K.formatting[J]==="header"&&D.push(R.formatting+"-"+K.formatting[J]+"-"+K.header),K.formatting[J]==="quote"&&(!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=K.quote?D.push(R.formatting+"-"+K.formatting[J]+"-"+K.quote):D.push("error"))}if(K.taskOpen)return D.push("meta"),D.length?D.join(" "):null;if(K.taskClosed)return D.push("property"),D.length?D.join(" "):null;if(K.linkHref?D.push(R.linkHref,"url"):(K.strong&&D.push(R.strong),K.em&&D.push(R.em),K.strikethrough&&D.push(R.strikethrough),K.emoji&&D.push(R.emoji),K.linkText&&D.push(R.linkText),K.code&&D.push(R.code),K.image&&D.push(R.image),K.imageAltText&&D.push(R.imageAltText,"link"),K.imageMarker&&D.push(R.imageMarker)),K.header&&D.push(R.header,R.header+"-"+K.header),K.quote&&(D.push(R.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=K.quote?D.push(R.quote+"-"+K.quote):D.push(R.quote+"-"+O.maxBlockquoteDepth)),K.list!==!1){var X=(K.listStack.length-1)%3;X?X===1?D.push(R.list2):D.push(R.list3):D.push(R.list1)}return K.trailingSpaceNewLine?D.push("trailing-space-new-line"):K.trailingSpace&&D.push("trailing-space-"+(K.trailingSpace%2?"a":"b")),D.length?D.join(" "):null}function n(K,D){return K.match(s,!0)?p(D):void 0}function d(K,D){var J=D.text(K,D);if(typeof J!="undefined")return J;if(D.list)return D.list=null,p(D);if(D.taskList){var X=K.match(a,!0)[1]===" ";return X?D.taskOpen=!0:D.taskClosed=!0,O.highlightFormatting&&(D.formatting="task"),D.taskList=!1,p(D)}if(D.taskOpen=!1,D.taskClosed=!1,D.header&&K.match(/^#+$/,!0))return O.highlightFormatting&&(D.formatting="header"),p(D);var ne=K.next();if(D.linkTitle){D.linkTitle=!1;var ue=ne;ne==="("&&(ue=")"),ue=(ue+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Oe="^\\s*(?:[^"+ue+"\\\\]+|\\\\\\\\|\\\\.)"+ue;if(K.match(new RegExp(Oe),!0))return R.linkHref}if(ne==="`"){var _e=D.formatting;O.highlightFormatting&&(D.formatting="code"),K.eatWhile("`");var De=K.current().length;if(D.code==0&&(!D.quote||De==1))return D.code=De,p(D);if(De==D.code){var Ue=p(D);return D.code=0,Ue}else return D.formatting=_e,p(D)}else if(D.code)return p(D);if(ne==="\\"&&(K.next(),O.highlightFormatting)){var Ke=p(D),Le=R.formatting+"-escape";return Ke?Ke+" "+Le:Le}if(ne==="!"&&K.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return D.imageMarker=!0,D.image=!0,O.highlightFormatting&&(D.formatting="image"),p(D);if(ne==="["&&D.imageMarker&&K.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return D.imageMarker=!1,D.imageAltText=!0,O.highlightFormatting&&(D.formatting="image"),p(D);if(ne==="]"&&D.imageAltText){O.highlightFormatting&&(D.formatting="image");var Ke=p(D);return D.imageAltText=!1,D.image=!1,D.inline=D.f=T,Ke}if(ne==="["&&!D.image)return D.linkText&&K.match(/^.*?\]/)||(D.linkText=!0,O.highlightFormatting&&(D.formatting="link")),p(D);if(ne==="]"&&D.linkText){O.highlightFormatting&&(D.formatting="link");var Ke=p(D);return D.linkText=!1,D.inline=D.f=K.match(/\(.*?\)| ?\[.*?\]/,!1)?T:d,Ke}if(ne==="<"&&K.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){D.f=D.inline=m,O.highlightFormatting&&(D.formatting="link");var Ke=p(D);return Ke?Ke+=" ":Ke="",Ke+R.linkInline}if(ne==="<"&&K.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){D.f=D.inline=m,O.highlightFormatting&&(D.formatting="link");var Ke=p(D);return Ke?Ke+=" ":Ke="",Ke+R.linkEmail}if(O.xml&&ne==="<"&&K.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ae=K.string.indexOf(">",K.pos);if(ae!=-1){var V=K.string.substring(K.start,ae);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(V)&&(D.md_inside=!0)}return K.backUp(1),D.htmlState=Z.startState(Q),l(K,D,L)}if(O.xml&&ne==="<"&&K.match(/^\/\w*?>/))return D.md_inside=!1,"tag";if(ne==="*"||ne==="_"){for(var $=1,q=K.pos==1?" ":K.string.charAt(K.pos-2);$<3&&K.eat(ne);)$++;var se=K.peek()||" ",te=!/\s/.test(se)&&(!u.test(se)||/\s/.test(q)||u.test(q)),oe=!/\s/.test(q)&&(!u.test(q)||/\s/.test(se)||u.test(se)),re=null,ie=null;if($%2&&(!D.em&&te&&(ne==="*"||!oe||u.test(q))?re=!0:D.em==ne&&oe&&(ne==="*"||!te||u.test(se))&&(re=!1)),$>1&&(!D.strong&&te&&(ne==="*"||!oe||u.test(q))?ie=!0:D.strong==ne&&oe&&(ne==="*"||!te||u.test(se))&&(ie=!1)),ie!=null||re!=null){O.highlightFormatting&&(D.formatting=re==null?"strong":ie==null?"em":"strong em"),re===!0&&(D.em=ne),ie===!0&&(D.strong=ne);var Ue=p(D);return re===!1&&(D.em=!1),ie===!1&&(D.strong=!1),Ue}}else if(ne===" "&&(K.eat("*")||K.eat("_"))){if(K.peek()===" ")return p(D);K.backUp(1)}if(O.strikethrough){if(ne==="~"&&K.eatWhile(ne)){if(D.strikethrough){O.highlightFormatting&&(D.formatting="strikethrough");var Ue=p(D);return D.strikethrough=!1,Ue}else if(K.match(/^[^\s]/,!1))return D.strikethrough=!0,O.highlightFormatting&&(D.formatting="strikethrough"),p(D)}else if(ne===" "&&K.match(/^~~/,!0)){if(K.peek()===" ")return p(D);K.backUp(2)}}if(O.emoji&&ne===":"&&K.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){D.emoji=!0,O.highlightFormatting&&(D.formatting="emoji");var ee=p(D);return D.emoji=!1,ee}return ne===" "&&(K.match(/^ +$/,!1)?D.trailingSpace++:D.trailingSpace&&(D.trailingSpaceNewLine=!0)),p(D)}function m(K,D){var J=K.next();if(J===">"){D.f=D.inline=d,O.highlightFormatting&&(D.formatting="link");var X=p(D);return X?X+=" ":X="",X+R.linkInline}return K.match(/^[^>]+/,!0),R.linkInline}function T(K,D){if(K.eatSpace())return null;var J=K.next();return J==="("||J==="["?(D.f=D.inline=g(J==="("?")":"]"),O.highlightFormatting&&(D.formatting="link-string"),D.linkHref=!0,p(D)):"error"}var y={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function g(K){return function(D,J){var X=D.next();if(X===K){J.f=J.inline=d,O.highlightFormatting&&(J.formatting="link-string");var ne=p(J);return J.linkHref=!1,ne}return D.match(y[K]),J.linkHref=!0,p(J)}}function U(K,D){return K.match(/^([^\]\\]|\\.)*\]:/,!1)?(D.f=P,K.next(),O.highlightFormatting&&(D.formatting="link"),D.linkText=!0,p(D)):i(K,D,d)}function P(K,D){if(K.match(/^\]:/,!0)){D.f=D.inline=I,O.highlightFormatting&&(D.formatting="link");var J=p(D);return D.linkText=!1,J}return K.match(/^([^\]\\]|\\.)+/,!0),R.linkText}function I(K,D){return K.eatSpace()?null:(K.match(/^[^\s]+/,!0),K.peek()===void 0?D.linkTitle=!0:K.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),D.f=D.inline=d,R.linkHref+" url")}var G={startState:function(){return{f:C,prevLine:{stream:null},thisLine:{stream:null},block:C,htmlState:null,indentation:0,inline:d,text:n,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(K){return{f:K.f,prevLine:K.prevLine,thisLine:K.thisLine,block:K.block,htmlState:K.htmlState&&Z.copyState(Q,K.htmlState),indentation:K.indentation,localMode:K.localMode,localState:K.localMode?Z.copyState(K.localMode,K.localState):null,inline:K.inline,text:K.text,formatting:!1,linkText:K.linkText,linkTitle:K.linkTitle,linkHref:K.linkHref,code:K.code,em:K.em,strong:K.strong,strikethrough:K.strikethrough,emoji:K.emoji,header:K.header,setext:K.setext,hr:K.hr,taskList:K.taskList,list:K.list,listStack:K.listStack.slice(0),quote:K.quote,indentedCode:K.indentedCode,trailingSpace:K.trailingSpace,trailingSpaceNewLine:K.trailingSpaceNewLine,md_inside:K.md_inside,fencedEndRE:K.fencedEndRE}},token:function(K,D){if(D.formatting=!1,K!=D.thisLine.stream){if(D.header=0,D.hr=!1,K.match(/^\s*$/,!0))return B(D),null;if(D.prevLine=D.thisLine,D.thisLine={stream:K},D.taskList=!1,D.trailingSpace=0,D.trailingSpaceNewLine=!1,!D.localState&&(D.f=D.block,D.f!=L)){var J=K.match(/^\s*/,!0)[0].replace(/\t/g,c).length;if(D.indentation=J,D.indentationDiff=null,J>0)return null}}return D.f(K,D)},innerMode:function(K){return K.block==L?{state:K.htmlState,mode:Q}:K.localState?{state:K.localState,mode:K.localMode}:{state:K,mode:G}},indent:function(K,D,J){return K.block==L&&Q.indent?Q.indent(K.htmlState,D,J):K.localState&&K.localMode.indent?K.localMode.indent(K.localState,D,J):Z.Pass},blankLine:B,getType:p,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return G},"xml"),Z.defineMIME("text/markdown","markdown"),Z.defineMIME("text/x-markdown","markdown")})},loD1:function(Ve,Ae){function N(Z,H,O,Q,M,_,R){if(M===0)return!1;var b=M,t=0,E=Z;if(R>H+b&&R>Q+b||R<H-b&&R<Q-b||_>Z+b&&_>O+b||_<Z-b&&_<O-b)return!1;if(Z!==O)t=(H-Q)/(Z-O),E=(Z*Q-O*H)/(Z-O);else return Math.abs(_-Z)<=b/2;var a=t*_-R+E,A=a*a/(t*t+1);return A<=b/2*b/2}Ae.containStroke=N},mFDi:function(Ve,Ae,N){var Z=N("QBsz"),H=N("Fofx"),O=Z.applyTransform,Q=Math.min,M=Math.max;function _(b,t,E,a){E<0&&(b=b+E,E=-E),a<0&&(t=t+a,a=-a),this.x=b,this.y=t,this.width=E,this.height=a}_.prototype={constructor:_,union:function(b){var t=Q(b.x,this.x),E=Q(b.y,this.y);this.width=M(b.x+b.width,this.x+this.width)-t,this.height=M(b.y+b.height,this.y+this.height)-E,this.x=t,this.y=E},applyTransform:function(){var b=[],t=[],E=[],a=[];return function(A){if(!A)return;b[0]=E[0]=this.x,b[1]=a[1]=this.y,t[0]=a[0]=this.x+this.width,t[1]=E[1]=this.y+this.height,O(b,b,A),O(t,t,A),O(E,E,A),O(a,a,A),this.x=Q(b[0],t[0],E[0],a[0]),this.y=Q(b[1],t[1],E[1],a[1]);var h=M(b[0],t[0],E[0],a[0]),s=M(b[1],t[1],E[1],a[1]);this.width=h-this.x,this.height=s-this.y}}(),calculateTransform:function(b){var t=this,E=b.width/t.width,a=b.height/t.height,A=H.create();return H.translate(A,A,[-t.x,-t.y]),H.scale(A,A,[E,a]),H.translate(A,A,[b.x,b.y]),A},intersect:function(b){if(!b)return!1;b instanceof _||(b=_.create(b));var t=this,E=t.x,a=t.x+t.width,A=t.y,h=t.y+t.height,s=b.x,o=b.x+b.width,f=b.y,u=b.y+b.height;return!(a<s||o<E||h<f||u<A)},contain:function(b,t){var E=this;return b>=E.x&&b<=E.x+E.width&&t>=E.y&&t<=E.y+E.height},clone:function(){return new _(this.x,this.y,this.width,this.height)},copy:function(b){this.x=b.x,this.y=b.y,this.width=b.width,this.height=b.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},_.create=function(b){return new _(b.x,b.y,b.width,b.height)};var R=_;Ve.exports=R},mLcG:function(Ve,Ae){var N=typeof window!="undefined"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(Z){setTimeout(Z,16)};Ve.exports=N},n1HI:function(Ve,Ae,N){var Z=N("hX1E"),H=Z.normalizeRadian,O=Math.PI*2;function Q(M,_,R,b,t,E,a,A,h){if(a===0)return!1;var s=a;A-=M,h-=_;var o=Math.sqrt(A*A+h*h);if(o-s>R||o+s<R)return!1;if(Math.abs(b-t)%O<1e-4)return!0;if(E){var f=b;b=H(t),t=H(f)}else b=H(b),t=H(t);b>t&&(t+=O);var u=Math.atan2(h,A);return u<0&&(u+=O),u>=b&&u<=t||u+O>=b&&u+O<=t}Ae.containStroke=Q},n6Mw:function(Ve,Ae,N){var Z=N("SrGk"),H=N("bYtY"),O=N("Fofx");function Q(_,R){Z.call(this,_,R,"clipPath","__clippath_in_use__")}H.inherits(Q,Z),Q.prototype.update=function(_){var R=this.getSvgElement(_);R&&this.updateDom(R,_.__clipPaths,!1);var b=this.getTextSvgElement(_);b&&this.updateDom(b,_.__clipPaths,!0),this.markUsed(_)},Q.prototype.updateDom=function(_,R,b){if(R&&R.length>0){var t=this.getDefs(!0),E=R[0],a,A,h=b?"_textDom":"_dom";E[h]?(A=E[h].getAttribute("id"),a=E[h],t.contains(a)||t.appendChild(a)):(A="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,a=this.createElement("clipPath"),a.setAttribute("id",A),t.appendChild(a),E[h]=a);var s=this.getSvgProxy(E);if(E.transform&&E.parent.invTransform&&!b){var o=Array.prototype.slice.call(E.transform);O.mul(E.transform,E.parent.invTransform,E.transform),s.brush(E),E.transform=o}else s.brush(E);var f=this.getSvgElement(E);a.innerHTML="",a.appendChild(f.cloneNode()),_.setAttribute("clip-path","url(#"+A+")"),R.length>1&&this.updateDom(a,R.slice(1),b)}else _&&_.setAttribute("clip-path","none")},Q.prototype.markUsed=function(_){var R=this;_.__clipPaths&&H.each(_.__clipPaths,function(b){b._dom&&Z.prototype.markUsed.call(R,b._dom),b._textDom&&Z.prototype.markUsed.call(R,b._textDom)})};var M=Q;Ve.exports=M},n6Qo:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return b});var Z=N("q1tI"),H=N("biw7"),O=N("fyJ8");function Q(t){var E=t.className,a=t.index,A=t.children,h=t.colSpan,s=t.rowSpan,o=Z.useContext(H.a),f=o.prefixCls,u=o.fixedInfoList,c=u[a];return Z.createElement(O.a,Object.assign({className:E,index:a,component:"td",prefixCls:f,record:null,dataIndex:null,render:function(){return{children:A,props:{colSpan:h,rowSpan:s}}}},c))}function M(t){return Z.createElement("tr",Object.assign({},t))}function _(t){var E=t.children,a=Z.useContext(H.a),A=a.prefixCls;return Z.createElement("tfoot",{className:"".concat(A,"-summary")},E)}var R=Ae.b=_,b={Cell:Q,Row:M}},nCxF:function(Ve,Ae,N){var Z=N("QBsz"),H=Z.min,O=Z.max,Q=Z.scale,M=Z.distance,_=Z.add,R=Z.clone,b=Z.sub;function t(E,a,A,h){var s=[],o=[],f=[],u=[],c,i,l,v;if(h){l=[Infinity,Infinity],v=[-Infinity,-Infinity];for(var B=0,C=E.length;B<C;B++)H(l,l,E[B]),O(v,v,E[B]);H(l,l,h[0]),O(v,v,h[1])}for(var B=0,C=E.length;B<C;B++){var L=E[B];if(A)c=E[B?B-1:C-1],i=E[(B+1)%C];else if(B===0||B===C-1){s.push(R(E[B]));continue}else c=E[B-1],i=E[B+1];b(o,i,c),Q(o,o,a);var w=M(L,c),p=M(L,i),n=w+p;n!==0&&(w/=n,p/=n),Q(f,o,-w),Q(u,o,p);var d=_([],L,f),m=_([],L,u);h&&(O(d,d,l),H(d,d,v),O(m,m,l),H(m,m,v)),s.push(d),s.push(m)}return A&&s.push(s.shift()),s}Ve.exports=t},nEHx:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return Z});var Z;(function(H){H.DARK="dark",H.LIGHT="light",H.HIGH_CONTRAST="hc"})(Z||(Z={}))},nPnh:function(Ve,Ae){var N=Math.round;function Z(Q,M,_){if(!M)return;var R=M.x1,b=M.x2,t=M.y1,E=M.y2;Q.x1=R,Q.x2=b,Q.y1=t,Q.y2=E;var a=_&&_.lineWidth;if(!a)return;N(R*2)===N(b*2)&&(Q.x1=Q.x2=O(R,a,!0)),N(t*2)===N(E*2)&&(Q.y1=Q.y2=O(t,a,!0))}function H(Q,M,_){if(!M)return;var R=M.x,b=M.y,t=M.width,E=M.height;Q.x=R,Q.y=b,Q.width=t,Q.height=E;var a=_&&_.lineWidth;if(!a)return;Q.x=O(R,a,!0),Q.y=O(b,a,!0),Q.width=Math.max(O(R+t,a,!1)-Q.x,t===0?0:1),Q.height=Math.max(O(b+E,a,!1)-Q.y,E===0?0:1)}function O(Q,M,_){if(!M)return Q;var R=N(Q*2);return(R+N(M))%2===0?R/2:(R+(_?1:-1))/2}Ae.subPixelOptimizeLine=Z,Ae.subPixelOptimizeRect=H,Ae.subPixelOptimize=O},ni6a:function(Ve,Ae,N){var Z=N("pzxd"),H=N("mFDi"),O=N("gut8"),Q=O.WILL_BE_RESTORED,M=new H,_=function(){};_.prototype={constructor:_,drawRectText:function(b,t){var E=this.style;t=E.textRect||t,this.__dirty&&Z.normalizeTextStyle(E,!0);var a=E.text;if(a!=null&&(a+=""),!Z.needDrawText(a,E))return;b.save();var A=this.transform;E.transformText?this.setTransform(b):A&&(M.copy(t),M.applyTransform(A),t=M),Z.renderText(this,b,a,E,t,Q),b.restore()}};var R=_;Ve.exports=R},nnTU:function(Ve,Ae,N){"use strict";N.d(Ae,"b",function(){return R}),N.d(Ae,"a",function(){return b});var Z=N("MI8n"),H=N("JYp7"),O=N("pmY6"),Q=N("24hK"),M=N("746U"),_=N("Cg/j");const R=Object(_.c)("commandService"),b=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Z.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(t,E){if(!t)throw new Error("invalid command");if(typeof t=="string"){if(!E)throw new Error("invalid command");return this.registerCommand({id:t,handler:E})}if(t.description){const o=[];for(let u of t.description.args)o.push(u.constraint);const f=t.handler;t.handler=function(u,...c){return Object(M.o)(c,o),f(u,...c)}}const{id:a}=t;let A=this._commands.get(a);A||(A=new Q.a,this._commands.set(a,A));let h=A.unshift(t),s=Object(O.i)(()=>{h();const o=this._commands.get(a);(o==null?void 0:o.isEmpty())&&this._commands.delete(a)});return this._onDidRegisterCommand.fire(a),s}registerCommandAlias(t,E){return b.registerCommand(t,(a,...A)=>a.get(R).executeCommand(E,...A))}getCommand(t){const E=this._commands.get(t);return!E||E.isEmpty()?void 0:H.a.first(E)}getCommands(){const t=new Map;for(const E of this._commands.keys()){const a=this.getCommand(E);a&&t.set(E,a)}return t}};b.registerCommand("noop",()=>{})},osHv:function(Ve,Ae,N){(function(Z){Z(N("VrN/"))})(function(Z){"use strict";var H=Z.Pos;function O(u,c){return u.line-c.line||u.ch-c.ch}var Q="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",M=Q+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",_=new RegExp("<(/?)(["+Q+"]["+M+"]*)","g");function R(u,c,i,l){this.line=c,this.ch=i,this.cm=u,this.text=u.getLine(c),this.min=l?Math.max(l.from,u.firstLine()):u.firstLine(),this.max=l?Math.min(l.to-1,u.lastLine()):u.lastLine()}function b(u,c){var i=u.cm.getTokenTypeAt(H(u.line,c));return i&&/\btag\b/.test(i)}function t(u){return u.line>=u.max?void 0:(u.ch=0,u.text=u.cm.getLine(++u.line),!0)}function E(u){return u.line<=u.min?void 0:(u.text=u.cm.getLine(--u.line),u.ch=u.text.length,!0)}function a(u){for(;;){var c=u.text.indexOf(">",u.ch);if(c==-1){if(t(u))continue;return}if(!b(u,c+1)){u.ch=c+1;continue}var i=u.text.lastIndexOf("/",c),l=i>-1&&!/\S/.test(u.text.slice(i+1,c));return u.ch=c+1,l?"selfClose":"regular"}}function A(u){for(;;){var c=u.ch?u.text.lastIndexOf("<",u.ch-1):-1;if(c==-1){if(E(u))continue;return}if(!b(u,c+1)){u.ch=c;continue}_.lastIndex=c,u.ch=c;var i=_.exec(u.text);if(i&&i.index==c)return i}}function h(u){for(;;){_.lastIndex=u.ch;var c=_.exec(u.text);if(!c){if(t(u))continue;return}if(!b(u,c.index+1)){u.ch=c.index+1;continue}return u.ch=c.index+c[0].length,c}}function s(u){for(;;){var c=u.ch?u.text.lastIndexOf(">",u.ch-1):-1;if(c==-1){if(E(u))continue;return}if(!b(u,c+1)){u.ch=c;continue}var i=u.text.lastIndexOf("/",c),l=i>-1&&!/\S/.test(u.text.slice(i+1,c));return u.ch=c+1,l?"selfClose":"regular"}}function o(u,c){for(var i=[];;){var l=h(u),v,B=u.line,C=u.ch-(l?l[0].length:0);if(!l||!(v=a(u)))return;if(v=="selfClose")continue;if(l[1]){for(var L=i.length-1;L>=0;--L)if(i[L]==l[2]){i.length=L;break}if(L<0&&(!c||c==l[2]))return{tag:l[2],from:H(B,C),to:H(u.line,u.ch)}}else i.push(l[2])}}function f(u,c){for(var i=[];;){var l=s(u);if(!l)return;if(l=="selfClose"){A(u);continue}var v=u.line,B=u.ch,C=A(u);if(!C)return;if(C[1])i.push(C[2]);else{for(var L=i.length-1;L>=0;--L)if(i[L]==C[2]){i.length=L;break}if(L<0&&(!c||c==C[2]))return{tag:C[2],from:H(u.line,u.ch),to:H(v,B)}}}}Z.registerHelper("fold","xml",function(u,c){for(var i=new R(u,c.line,0);;){var l=h(i);if(!l||i.line!=c.line)return;var v=a(i);if(!v)return;if(!l[1]&&v!="selfClose"){var B=H(i.line,i.ch),C=o(i,l[2]);return C&&O(C.from,B)>0?{from:B,to:C.from}:null}}}),Z.findMatchingTag=function(u,c,i){var l=new R(u,c.line,c.ch,i);if(l.text.indexOf(">")==-1&&l.text.indexOf("<")==-1)return;var v=a(l),B=v&&H(l.line,l.ch),C=v&&A(l);if(!v||!C||O(l,c)>0)return;var L={from:H(l.line,l.ch),to:B,tag:C[2]};return v=="selfClose"?{open:L,close:null,at:"open"}:C[1]?{open:f(l,C[2]),close:L,at:"close"}:(l=new R(u,B.line,B.ch,i),{open:L,close:o(l,C[2]),at:"open"})},Z.findEnclosingTag=function(u,c,i,l){for(var v=new R(u,c.line,c.ch,i);;){var B=f(v,l);if(!B)break;var C=new R(u,c.line,c.ch,i),L=o(C,B.tag);if(L)return{open:B,close:L}}},Z.scanForClosingTag=function(u,c,i,l){var v=new R(u,c.line,c.ch,l?{from:0,to:l}:null);return o(v,i)}})},p5ED:function(Ve,Ae,N){"use strict";var Z=N("+L6B"),H=N("2/Rp"),O=N("5Dmo"),Q=N("3S7+"),M=N("k1fw"),_=N("9og8"),R=N("tJVT"),b=N("WmNS"),t=N.n(b),E=N("q1tI"),a=N.n(E),A=N("vHTk"),h=N.n(A),s=N("yEEn"),o=N("ZW9T"),f=N("1vsH"),u=N("V0Rq"),c=N("m3rI");Ae.a=function(i){var l,v,B,C,L,w,p,n=i.editOffice,d=n===void 0?"view":n,m=i.data,T=i.theme,y=i.type,g=i.filename,U=i.monacoEditor,P=i.className,I=i.style,G=i.close,K=i.onClose,D=i.hasMask,J=i.disabledDownload,X=Object(E.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ne=Object(R.a)(X,2),ue=ne[0],Oe=ne[1],_e=Object(E.useState)(""),De=Object(R.a)(_e,2),Ue=De[0],Ke=De[1],Le=Object(E.useState)(),ae=Object(R.a)(Le,2),V=ae[0],$=ae[1],q=window.ENV==="build"?"/react/build":"",se=c.a.PROXY_SERVER||location.origin,te,oe=1024*1024,re=10*oe,ie=Object(E.useRef)();(l=m)!==null&&l!==void 0&&l.startsWith("/api")&&y!=="txt"&&(m=(c.a.API_SERVER||location.origin)+m),y==="office"&&(te=Object(f.T)(m).filesize,te>re&&(y="other")),g&&U&&(U.filename=g),Object(E.useEffect)(function(){var Me,Ye,et=(Me=document.cookie)===null||Me===void 0||((Ye=Me.replace(/\s/g,""))===null||Ye===void 0)?void 0:Ye.split(";");et==null||et.map(function(st){var ut=st.split("=");ut[0]==="_educoder_session"&&Ke(ut[1])})},[]),Object(E.useEffect)(function(){y==="office"&&ee()},[y,m]);var ee=function(){var Me=Object(_.a)(t.a.mark(function Ye(){var et,st,ut;return t.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return console.log("data:",m),et=m,m.startsWith("http")||(et=location.origin+et),st=new URL(et).pathname.split("/").pop(),xt.next=6,Object(u.V)({attachment_id:st});case 6:ut=xt.sent,$(ut);case 8:case"end":return xt.stop()}},Ye)}));return function(){return Me.apply(this,arguments)}}(),de=function(){if(m.startsWith("http")||m.startsWith("blob:")){Ce();return}Object(f.z)(g||"educoder",m,g)},Ce=function(){Object(f.x)(g||"educoder",decodeURIComponent(m))};return a.a.createElement("div",{style:Object(M.a)({},I||{}),className:"".concat(D&&h.a.bgBlack," ").concat(y?h.a.wrp:"hide")},G&&a.a.createElement("div",{className:h.a.close,ref:ie},!J&&a.a.createElement(Q.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return ie.current}},a.a.createElement("span",{onClick:Ce},a.a.createElement("i",{className:"icon-quxiaozhiding"}))),a.a.createElement(Q.a,{title:"\u5173\u95ED",getPopupContainer:function(){return ie.current}},a.a.createElement("span",{className:"",onClick:K},a.a.createElement("i",{className:"icon-guanbi1"})))),a.a.createElement("div",{className:"".concat(h.a[P]," ").concat(P," ").concat(h.a.monaco," ").concat(y==="txt"?"show":"hide")},y==="txt"&&a.a.createElement(o.b,U)),y==="audio"&&a.a.createElement("audio",{src:"".concat(((v=m)===null||v===void 0?void 0:v.indexOf("http://"))>-1||((B=m)===null||B===void 0?void 0:B.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(m),autoPlay:!0}),y==="video"&&a.a.createElement(a.a.Fragment,null,((C=m)===null||C===void 0?void 0:C.indexOf("http"))>-1?a.a.createElement("video",{controls:!0,src:"".concat(m),autoPlay:!0}):a.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(m),autoPlay:!0})),y==="office"&&V&&a.a.createElement("iframe",{src:"".concat(q,"/office.html?key=").concat(V.key,"&url=").concat(se+V.url,"&callbackUrl=").concat(se+V.callbackUrl,"&fileType=").concat(V.fileType,"&title=").concat(V.title,"&model=").concat(d,"&officeServer=").concat(c.a.OFFICE_SERVER,"&disabledDownload=").concat(!!J)}),y==="html"&&a.a.createElement("iframe",{src:m+"&disposition=inline"}),y==="pdf"&&a.a.createElement("iframe",{src:"".concat(q,"/js/pdfview/index.html?url=").concat(m,"&disabledDownload=").concat(!!J)}),y==="image"&&a.a.createElement("img",{src:"".concat(((L=m)===null||L===void 0?void 0:L.indexOf("http://"))>-1||((w=m)===null||w===void 0?void 0:w.indexOf("https://"))>-1||(p=m)!==null&&p!==void 0&&p.startsWith("/api")?"":"data:image/png;base64,").concat(m)}),y==="other"&&a.a.createElement("div",null,a.a.createElement(H.a,{type:"primary",size:"large",onClick:de},a.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),y==="download"&&a.a.createElement(H.a,{type:"primary",size:"large",onClick:de},a.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Ve,Ae,N){},pmY6:function(Ve,Ae,N){"use strict";N.d(Ae,"h",function(){return E}),N.d(Ae,"g",function(){return A}),N.d(Ae,"f",function(){return h}),N.d(Ae,"e",function(){return s}),N.d(Ae,"i",function(){return o}),N.d(Ae,"b",function(){return f}),N.d(Ae,"a",function(){return u}),N.d(Ae,"d",function(){return c}),N.d(Ae,"c",function(){return i});var Z=N("C/vA"),H=N("JYp7");const O=!1;let Q=null;function M(l){Q=l}if(O){const l="__is_disposable_tracked__";M(new class{trackDisposable(v){const B=new Error("Potentially leaked disposable").stack;setTimeout(()=>{v[l]||console.log(B)},3e3)}setParent(v,B){if(v&&v!==u.None)try{v[l]=!0}catch(C){}}markAsDisposed(v){if(v&&v!==u.None)try{v[l]=!0}catch(B){}}markAsSingleton(v){}})}function _(l){return Q==null||Q.trackDisposable(l),l}function R(l){Q==null||Q.markAsDisposed(l)}function b(l,v){Q==null||Q.setParent(l,v)}function t(l,v){if(!Q)return;for(const B of l)Q.setParent(B,v)}function E(l){return Q==null||Q.markAsSingleton(l),l}class a extends Error{constructor(l){super(`Encountered errors while disposing of store. Errors: [${l.join(", ")}]`);this.errors=l}}function A(l){return typeof l.dispose=="function"&&l.dispose.length===0}function h(l){if(H.a.is(l)){let v=[];for(const B of l)if(B)try{B.dispose()}catch(C){v.push(C)}if(v.length===1)throw v[0];if(v.length>1)throw new a(v);return Array.isArray(l)?[]:l}else if(l)return l.dispose(),l}function s(...l){const v=o(()=>h(l));return t(l,v),v}function o(l){const v=_({dispose:Object(Z.a)(()=>{R(v),l()})});return v}class f{constructor(){this._toDispose=new Set,this._isDisposed=!1,_(this)}dispose(){if(this._isDisposed)return;R(this),this._isDisposed=!0,this.clear()}clear(){try{h(this._toDispose.values())}finally{this._toDispose.clear()}}add(l){if(!l)return l;if(l===this)throw new Error("Cannot register a disposable on itself!");return b(l,this),this._isDisposed?f.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(l),l}}f.DISABLE_DISPOSED_WARNING=!1;class u{constructor(){this._store=new f,_(this),b(this._store,this)}dispose(){R(this),this._store.dispose()}_register(l){if(l===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(l)}}u.None=Object.freeze({dispose(){}});class c{constructor(){this._isDisposed=!1,_(this)}get value(){return this._isDisposed?void 0:this._value}set value(l){var v;if(this._isDisposed||l===this._value)return;(v=this._value)===null||v===void 0||v.dispose(),l&&b(l,this),this._value=l}clear(){this.value=void 0}dispose(){var l;this._isDisposed=!0,R(this),(l=this._value)===null||l===void 0||l.dispose(),this._value=void 0}clearAndLeak(){const l=this._value;return this._value=void 0,l&&b(l,null),l}}class i{constructor(l){this.object=l}dispose(){}}},psGv:function(Ve,Ae,N){var Z,H;(function(){var O;(function(){"use strict";var R=[,,function(a){function A(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}A.prototype.clone_empty=function(){var o=new A(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},A.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},A.prototype.has_match=function(o){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(o))return!0;return!1},A.prototype.set_indent=function(o,f){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=f||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},A.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)},A.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},A.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.prototype.push=function(o){this.__items.push(o);var f=o.lastIndexOf(`
|
|
`);f!==-1?this.__character_count=o.length-f:this.__character_count+=o.length},A.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function h(o,f){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),f=f||"",o.indent_level>0&&(f=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=f,this.__base_string_length=f.length}h.prototype.get_indent_size=function(o,f){var u=this.__base_string_length;return f=f||0,o<0&&(u=0),u+=o*this.__indent_size,u+=f,u},h.prototype.get_indent_string=function(o,f){var u=this.__base_string;return f=f||0,o<0&&(o=0,u=""),f+=o*this.__indent_size,this.__ensure_cache(f),u+=this.__cache[f],u},h.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},h.prototype.__add_column=function(){var o=this.__cache.length,f=0,u="";this.__indent_size&&o>=this.__indent_size&&(f=Math.floor(o/this.__indent_size),o-=f*this.__indent_size,u=new Array(f+1).join(this.__indent_string)),o&&(u+=new Array(o+1).join(" ")),this.__cache.push(u)};function s(o,f){this.__indent_cache=new h(o,f),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new A(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(o,f){return this.__indent_cache.get_indent_string(o,f)},s.prototype.get_indent_size=function(o,f){return this.__indent_cache.get_indent_size(o,f)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(o){this.trim(!0);var f=this.current_line.pop();f&&(f[f.length-1]===`
|
|
`&&(f=f.replace(/\n+$/g,"")),this.current_line.push(f)),this._end_with_newline&&this.__add_outputline();var u=this.__lines.join(`
|
|
`);return o!==`
|
|
`&&(u=u.replace(/[\n]/g,o)),u},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(o,f){return o=o||0,f=f||0,this.next_line.set_indent(o,f),this.__lines.length>1?(this.current_line.set_indent(o,f),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(o){for(var f=0;f<o.newlines;f++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.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(" "))},s.prototype.remove_indent=function(o){for(var f=this.__lines.length;o<f;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(o,f){for(var u=this.__lines.length-2;u>=0;){var c=this.__lines[u];if(c.is_empty())break;if(c.item(0).indexOf(o)!==0&&c.item(-1)!==f){this.__lines.splice(u+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}u--}},a.exports.Output=s},function(a){function A(h,s,o,f){this.type=h,this.text=s,this.comments_before=null,this.newlines=o||0,this.whitespace_before=f||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}a.exports.Token=A},,,function(a){function A(o,f){this.raw_options=h(o,f),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"])}A.prototype._get_array=function(o,f){var u=this.raw_options[o],c=f||[];return typeof u=="object"?u!==null&&typeof u.concat=="function"&&(c=u.concat()):typeof u=="string"&&(c=u.split(/[^a-zA-Z0-9_\/\-]+/)),c},A.prototype._get_boolean=function(o,f){var u=this.raw_options[o],c=u===void 0?!!f:!!u;return c},A.prototype._get_characters=function(o,f){var u=this.raw_options[o],c=f||"";return typeof u=="string"&&(c=u.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),c},A.prototype._get_number=function(o,f){var u=this.raw_options[o];f=parseInt(f,10),isNaN(f)&&(f=0);var c=parseInt(u,10);return isNaN(c)&&(c=f),c},A.prototype._get_selection=function(o,f,u){var c=this._get_selection_list(o,f,u);if(c.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
|
|
`+f+`
|
|
You passed in: '`+this.raw_options[o]+"'");return c[0]},A.prototype._get_selection_list=function(o,f,u){if(!f||f.length===0)throw new Error("Selection list cannot be empty.");if(u=u||[f[0]],!this._is_valid_selection(u,f))throw new Error("Invalid Default Value!");var c=this._get_array(o,u);if(!this._is_valid_selection(c,f))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
|
|
`+f+`
|
|
You passed in: '`+this.raw_options[o]+"'");return c},A.prototype._is_valid_selection=function(o,f){return o.length&&f.length&&!o.some(function(u){return f.indexOf(u)===-1})};function h(o,f){var u={};o=s(o);var c;for(c in o)c!==f&&(u[c]=o[c]);if(f&&o[f])for(c in o[f])u[c]=o[f][c];return u}function s(o){var f={},u;for(u in o){var c=u.replace(/-/g,"_");f[c]=o[u]}return f}a.exports.Options=A,a.exports.normalizeOpts=s,a.exports.mergeOpts=h},,function(a){var A=RegExp.prototype.hasOwnProperty("sticky");function h(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}h.prototype.restart=function(){this.__position=0},h.prototype.back=function(){this.__position>0&&(this.__position-=1)},h.prototype.hasNext=function(){return this.__position<this.__input_length},h.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},h.prototype.peek=function(s){var o=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(o=this.__input.charAt(s)),o},h.prototype.__match=function(s,o){s.lastIndex=o;var f=s.exec(this.__input);return f&&!(A&&s.sticky)&&(f.index!==o&&(f=null)),f},h.prototype.test=function(s,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(s,o):!1},h.prototype.testChar=function(s,o){var f=this.peek(o);return s.lastIndex=0,f!==null&&s.test(f)},h.prototype.match=function(s){var o=this.__match(s,this.__position);return o?this.__position+=o[0].length:o=null,o},h.prototype.read=function(s,o,f){var u="",c;return s&&(c=this.match(s),c&&(u+=c[0])),o&&(c||!s)&&(u+=this.readUntil(o,f)),u},h.prototype.readUntil=function(s,o){var f="",u=this.__position;s.lastIndex=this.__position;var c=s.exec(this.__input);return c?(u=c.index,o&&(u+=c[0].length)):u=this.__input_length,f=this.__input.substring(this.__position,u),this.__position=u,f},h.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},h.prototype.get_regexp=function(s,o){var f=null,u="g";return o&&A&&(u="y"),typeof s=="string"&&s!==""?f=new RegExp(s,u):s&&(f=new RegExp(s.source,u)),f},h.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},h.prototype.peekUntilAfter=function(s){var o=this.__position,f=this.readUntilAfter(s);return this.__position=o,f},h.prototype.lookBack=function(s){var o=this.__position-1;return o>=s.length&&this.__input.substring(o-s.length,o).toLowerCase()===s},a.exports.InputScanner=h},function(a,A,h){var s=h(8).InputScanner,o=h(3).Token,f=h(10).TokenStream,u=h(11).WhitespacePattern,c={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},i=function(l,v){this._input=new s(l),this._options=v||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new u(this._input)};i.prototype.tokenize=function(){this._input.restart(),this.__tokens=new f,this._reset();for(var l,v=new o(c.START,""),B=null,C=[],L=new f;v.type!==c.EOF;){for(l=this._get_next_token(v,B);this._is_comment(l);)L.add(l),l=this._get_next_token(v,B);L.isEmpty()||(l.comments_before=L,L=new f),l.parent=B,this._is_opening(l)?(C.push(B),B=l):B&&this._is_closing(l,B)&&(l.opened=B,B.closed=l,B=C.pop(),l.parent=B),l.previous=v,v.next=l,this.__tokens.add(l),v=l}return this.__tokens},i.prototype._is_first_token=function(){return this.__tokens.isEmpty()},i.prototype._reset=function(){},i.prototype._get_next_token=function(l,v){this._readWhitespace();var B=this._input.read(/.+/g);return B?this._create_token(c.RAW,B):this._create_token(c.EOF,"")},i.prototype._is_comment=function(l){return!1},i.prototype._is_opening=function(l){return!1},i.prototype._is_closing=function(l,v){return!1},i.prototype._create_token=function(l,v){var B=new o(l,v,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return B},i.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},a.exports.Tokenizer=i,a.exports.TOKEN=c},function(a){function A(h){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=h}A.prototype.restart=function(){this.__position=0},A.prototype.isEmpty=function(){return this.__tokens_length===0},A.prototype.hasNext=function(){return this.__position<this.__tokens_length},A.prototype.next=function(){var h=null;return this.hasNext()&&(h=this.__tokens[this.__position],this.__position+=1),h},A.prototype.peek=function(h){var s=null;return h=h||0,h+=this.__position,h>=0&&h<this.__tokens_length&&(s=this.__tokens[h]),s},A.prototype.add=function(h){this.__parent_token&&(h.parent=this.__parent_token),this.__tokens.push(h),this.__tokens_length+=1},a.exports.TokenStream=A},function(a,A,h){var s=h(12).Pattern;function o(f,u){s.call(this,f,u),u?this._line_regexp=this._input.get_regexp(u._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new s,o.prototype.__set_whitespace_patterns=function(f,u){f+="\\t ",u+="\\n\\r",this._match_pattern=this._input.get_regexp("["+f+u+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+u+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var f=this._input.read(this._match_pattern);if(f===" ")this.whitespace_before_token=" ";else if(f){var u=this.__split(this._newline_regexp,f);this.newline_count=u.length-1,this.whitespace_before_token=u[this.newline_count]}return f},o.prototype.matching=function(f,u){var c=this._create();return c.__set_whitespace_patterns(f,u),c._update(),c},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(f,u){f.lastIndex=0;for(var c=0,i=[],l=f.exec(u);l;)i.push(u.substring(c,l.index)),c=l.index+l[0].length,l=f.exec(u);return c<u.length?i.push(u.substring(c,u.length)):i.push(""),i},a.exports.WhitespacePattern=o},function(a){function A(h,s){this._input=h,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,s&&(this._starting_pattern=this._input.get_regexp(s._starting_pattern,!0),this._match_pattern=this._input.get_regexp(s._match_pattern,!0),this._until_pattern=this._input.get_regexp(s._until_pattern),this._until_after=s._until_after)}A.prototype.read=function(){var h=this._input.read(this._starting_pattern);return(!this._starting_pattern||h)&&(h+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),h},A.prototype.read_match=function(){return this._input.match(this._match_pattern)},A.prototype.until_after=function(h){var s=this._create();return s._until_after=!0,s._until_pattern=this._input.get_regexp(h),s._update(),s},A.prototype.until=function(h){var s=this._create();return s._until_after=!1,s._until_pattern=this._input.get_regexp(h),s._update(),s},A.prototype.starting_with=function(h){var s=this._create();return s._starting_pattern=this._input.get_regexp(h,!0),s._update(),s},A.prototype.matching=function(h){var s=this._create();return s._match_pattern=this._input.get_regexp(h,!0),s._update(),s},A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){},a.exports.Pattern=A},function(a){function A(h,s){h=typeof h=="string"?h:h.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(h+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(h+/\sbeautify\signore:end\s/.source+s,"g")}A.prototype.get_directives=function(h){if(!h.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(h);o;)s[o[1]]=o[2],o=this.__directive_pattern.exec(h);return s},A.prototype.readIgnored=function(h){return h.readUntilAfter(this.__directives_end_ignore_pattern)},a.exports.Directives=A},function(a,A,h){var s=h(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function f(u,c){s.call(this,u,c),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),c&&(this.__template_pattern=this._input.get_regexp(c.__template_pattern),this._excluded=Object.assign(this._excluded,c._excluded),this._disabled=Object.assign(this._disabled,c._disabled));var i=new s(u);this.__patterns={handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:i.starting_with(/{{{/).until_after(/}}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),php:i.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}f.prototype=new s,f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){this.__set_templated_pattern()},f.prototype.disable=function(u){var c=this._create();return c._disabled[u]=!0,c._update(),c},f.prototype.read_options=function(u){var c=this._create();for(var i in o)c._disabled[i]=u.templating.indexOf(i)===-1;return c._update(),c},f.prototype.exclude=function(u){var c=this._create();return c._excluded[u]=!0,c._update(),c},f.prototype.read=function(){var u="";this._match_pattern?u=this._input.read(this._starting_pattern):u=this._input.read(this._starting_pattern,this.__template_pattern);for(var c=this._read_template();c;)this._match_pattern?c+=this._input.read(this._match_pattern):c+=this._input.readUntil(this.__template_pattern),u+=c,c=this._read_template();return this._until_after&&(u+=this._input.readUntilAfter(this._until_pattern)),u},f.prototype.__set_templated_pattern=function(){var u=[];this._disabled.php||u.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||u.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||u.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(u.push(this.__patterns.django._starting_pattern.source),u.push(this.__patterns.django_value._starting_pattern.source),u.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||u.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&u.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+u.join("|")+")")},f.prototype._read_template=function(){var u="",c=this._input.peek();if(c==="<"){var i=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&i==="?"&&(u=u||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&i==="%"&&(u=u||this.__patterns.erb.read())}else c==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(u=u||this.__patterns.handlebars_comment.read(),u=u||this.__patterns.handlebars_unescaped.read(),u=u||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(u=u||this.__patterns.django_value.read()),this._excluded.django||(u=u||this.__patterns.django_comment.read(),u=u||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(u=u||this.__patterns.smarty_comment.read(),u=u||this.__patterns.smarty_literal.read(),u=u||this.__patterns.smarty.read()));return u},a.exports.TemplatablePattern=f},,,,function(a,A,h){var s=h(19).Beautifier,o=h(20).Options;function f(u,c,i,l){var v=new s(u,c,i,l);return v.beautify()}a.exports=f,a.exports.defaultOptions=function(){return new o}},function(a,A,h){var s=h(20).Options,o=h(2).Output,f=h(21).Tokenizer,u=h(21).TOKEN,c=/\r\n|[\r\n]/,i=/\r\n|[\r\n]/g,l=function(T,y){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=T.max_preserve_newlines,this.preserve_newlines=T.preserve_newlines,this._output=new o(T,y)};l.prototype.current_line_has_match=function(T){return this._output.current_line.has_match(T)},l.prototype.set_space_before_token=function(T,y){this._output.space_before_token=T,this._output.non_breaking_space=y},l.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},l.prototype.add_raw_token=function(T){this._output.add_raw_token(T)},l.prototype.print_preserved_newlines=function(T){var y=0;T.type!==u.TEXT&&T.previous.type!==u.TEXT&&(y=T.newlines?1:0),this.preserve_newlines&&(y=T.newlines<this.max_preserve_newlines+1?T.newlines:this.max_preserve_newlines+1);for(var g=0;g<y;g++)this.print_newline(g>0);return y!==0},l.prototype.traverse_whitespace=function(T){return T.whitespace_before||T.newlines?(this.print_preserved_newlines(T)||(this._output.space_before_token=!0),!0):!1},l.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},l.prototype.print_newline=function(T){this._output.add_new_line(T)},l.prototype.print_token=function(T){T.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(T.text))},l.prototype.indent=function(){this.indent_level++},l.prototype.get_full_indent=function(T){return T=this.indent_level+(T||0),T<1?"":this._output.get_indent_string(T)};var v=function(T){for(var y=null,g=T.next;g.type!==u.EOF&&T.closed!==g;){if(g.type===u.ATTRIBUTE&&g.text==="type"){g.next&&g.next.type===u.EQUALS&&g.next.next&&g.next.next.type===u.VALUE&&(y=g.next.next.text);break}g=g.next}return y},B=function(T,y){var g=null,U=null;return y.closed?(T==="script"?g="text/javascript":T==="style"&&(g="text/css"),g=v(y)||g,g.search("text/css")>-1?U="css":g.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?U="javascript":g.search(/(text|application|dojo)\/(x-)?(html)/)>-1?U="html":g.search(/test\/null/)>-1&&(U="null"),U):null};function C(T,y){return y.indexOf(T)!==-1}function L(T,y,g){this.parent=T||null,this.tag=y?y.tag_name:"",this.indent_level=g||0,this.parser_token=y||null}function w(T){this._printer=T,this._current_frame=null}w.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},w.prototype.record_tag=function(T){var y=new L(this._current_frame,T,this._printer.indent_level);this._current_frame=y},w.prototype._try_pop_frame=function(T){var y=null;return T&&(y=T.parser_token,this._printer.indent_level=T.indent_level,this._current_frame=T.parent),y},w.prototype._get_frame=function(T,y){for(var g=this._current_frame;g&&!(T.indexOf(g.tag)!==-1);){if(y&&y.indexOf(g.tag)!==-1){g=null;break}g=g.parent}return g},w.prototype.try_pop=function(T,y){var g=this._get_frame([T],y);return this._try_pop_frame(g)},w.prototype.indent_to_tag=function(T){var y=this._get_frame(T);y&&(this._printer.indent_level=y.indent_level)};function p(T,y,g,U){this._source_text=T||"",y=y||{},this._js_beautify=g,this._css_beautify=U,this._tag_stack=null;var P=new s(y,"html");this._options=P,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"}p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var T=this._source_text,y=this._options.eol;this._options.eol==="auto"&&(y=`
|
|
`,T&&c.test(T)&&(y=T.match(c)[0])),T=T.replace(i,`
|
|
`);var g=T.match(/^[\t ]*/)[0],U={text:"",type:""},P=new n,I=new l(this._options,g),G=new f(T,this._options).tokenize();this._tag_stack=new w(I);for(var K=null,D=G.next();D.type!==u.EOF;)D.type===u.TAG_OPEN||D.type===u.COMMENT?(K=this._handle_tag_open(I,D,P,U),P=K):D.type===u.ATTRIBUTE||D.type===u.EQUALS||D.type===u.VALUE||D.type===u.TEXT&&!P.tag_complete?K=this._handle_inside_tag(I,D,P,G):D.type===u.TAG_CLOSE?K=this._handle_tag_close(I,D,P):D.type===u.TEXT?K=this._handle_text(I,D,P):I.add_raw_token(D),U=K,D=G.next();var J=I._output.get_code(y);return J},p.prototype._handle_tag_close=function(T,y,g){var U={text:y.text,type:y.type};return T.alignment_size=0,g.tag_complete=!0,T.set_space_before_token(y.newlines||y.whitespace_before!=="",!0),g.is_unformatted?T.add_raw_token(y):(g.tag_start_char==="<"&&(T.set_space_before_token(y.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&g.has_wrapped_attrs&&T.print_newline(!1)),T.print_token(y)),g.indent_content&&!(g.is_unformatted||g.is_content_unformatted)&&(T.indent(),g.indent_content=!1),!g.is_inline_element&&!(g.is_unformatted||g.is_content_unformatted)&&T.set_wrap_point(),U},p.prototype._handle_inside_tag=function(T,y,g,U){var P=g.has_wrapped_attrs,I={text:y.text,type:y.type};if(T.set_space_before_token(y.newlines||y.whitespace_before!=="",!0),g.is_unformatted)T.add_raw_token(y);else if(g.tag_start_char==="{"&&y.type===u.TEXT)T.print_preserved_newlines(y)?(y.newlines=0,T.add_raw_token(y)):T.print_token(y);else{if(y.type===u.ATTRIBUTE?(T.set_space_before_token(!0),g.attr_count+=1):(y.type===u.EQUALS||y.type===u.VALUE&&y.previous.type===u.EQUALS)&&T.set_space_before_token(!1),y.type===u.ATTRIBUTE&&g.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(T.traverse_whitespace(y),P=P||y.newlines!==0),this._is_wrap_attributes_force)){var G=g.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&g.attr_count===1){var K=!0,D=0,J;do{if(J=U.peek(D),J.type===u.ATTRIBUTE){K=!1;break}D+=1}while(D<4&&J.type!==u.EOF&&J.type!==u.TAG_CLOSE);G=!K}G&&(T.print_newline(!1),P=!0)}T.print_token(y),P=P||T.previous_token_wrapped(),g.has_wrapped_attrs=P}return I},p.prototype._handle_text=function(T,y,g){var U={text:y.text,type:"TK_CONTENT"};return g.custom_beautifier_name?this._print_custom_beatifier_text(T,y,g):g.is_unformatted||g.is_content_unformatted?T.add_raw_token(y):(T.traverse_whitespace(y),T.print_token(y)),U},p.prototype._print_custom_beatifier_text=function(T,y,g){var U=this;if(y.text!==""){var P=y.text,I,G=1,K="",D="";g.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?I=this._js_beautify:g.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?I=this._css_beautify:g.custom_beautifier_name==="html"&&(I=function(_e,De){var Ue=new p(_e,De,U._js_beautify,U._css_beautify);return Ue.beautify()}),this._options.indent_scripts==="keep"?G=0:this._options.indent_scripts==="separate"&&(G=-T.indent_level);var J=T.get_full_indent(G);if(P=P.replace(/\n[ \t]*$/,""),g.custom_beautifier_name!=="html"&&P[0]==="<"&&P.match(/^(<!--|<!\[CDATA\[)/)){var X=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(P);if(!X){T.add_raw_token(y);return}K=J+X[1]+`
|
|
`,P=X[4],X[5]&&(D=J+X[5]),P=P.replace(/\n[ \t]*$/,""),(X[2]||X[3].indexOf(`
|
|
`)!==-1)&&(X=X[3].match(/[ \t]+$/),X&&(y.whitespace_before=X[0]))}if(P)if(I){var ne=function(){this.eol=`
|
|
`};ne.prototype=this._options.raw_options;var ue=new ne;P=I(J+P,ue)}else{var Oe=y.whitespace_before;Oe&&(P=P.replace(new RegExp(`
|
|
(`+Oe+")?","g"),`
|
|
`)),P=J+P.replace(/\n/g,`
|
|
`+J)}K&&(P?P=K+P+`
|
|
`+D:P=K+D),T.print_newline(!1),P&&(y.text=P,y.whitespace_before="",y.newlines=0,T.add_raw_token(y),T.print_newline(!0))}},p.prototype._handle_tag_open=function(T,y,g,U){var P=this._get_tag_open_token(y);return(g.is_unformatted||g.is_content_unformatted)&&!g.is_empty_element&&y.type===u.TAG_OPEN&&y.text.indexOf("</")===0?(T.add_raw_token(y),P.start_tag_token=this._tag_stack.try_pop(P.tag_name)):(T.traverse_whitespace(y),this._set_tag_position(T,y,P,g,U),P.is_inline_element||T.set_wrap_point(),T.print_token(y)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(P.alignment_size=y.text.length+1),!P.tag_complete&&!P.is_unformatted&&(T.alignment_size=P.alignment_size),P};var n=function(T,y){if(this.parent=T||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="",!y)this.tag_complete=!0;else{var g;this.tag_start_char=y.text[0],this.text=y.text,this.tag_start_char==="<"?(g=y.text.match(/^<([^\s>]*)/),this.tag_check=g?g[1]:""):(g=y.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=g?g[1]:"",(y.text.startsWith("{{#>")||y.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&y.next!==null?this.tag_check=y.next.text.split(" ")[0]:this.tag_check=y.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),y.type===u.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||y.closed&&y.closed.text==="/>";var U=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(U=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(U)))}};p.prototype._get_tag_open_token=function(T){var y=new n(this._tag_stack.get_parser_token(),T);return y.alignment_size=this._options.wrap_attributes_indent_size,y.is_end_tag=y.is_end_tag||C(y.tag_check,this._options.void_elements),y.is_empty_element=y.tag_complete||y.is_start_tag&&y.is_end_tag,y.is_unformatted=!y.tag_complete&&C(y.tag_check,this._options.unformatted),y.is_content_unformatted=!y.is_empty_element&&C(y.tag_check,this._options.content_unformatted),y.is_inline_element=C(y.tag_name,this._options.inline)||y.tag_name.includes("-")||y.tag_start_char==="{",y},p.prototype._set_tag_position=function(T,y,g,U,P){if(g.is_empty_element||(g.is_end_tag?g.start_tag_token=this._tag_stack.try_pop(g.tag_name):(this._do_optional_end_element(g)&&(g.is_inline_element||T.print_newline(!1)),this._tag_stack.record_tag(g),(g.tag_name==="script"||g.tag_name==="style")&&!(g.is_unformatted||g.is_content_unformatted)&&(g.custom_beautifier_name=B(g.tag_check,y)))),C(g.tag_check,this._options.extra_liners)&&(T.print_newline(!1),T._output.just_added_blankline()||T.print_newline(!0)),g.is_empty_element){if(g.tag_start_char==="{"&&g.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),g.indent_content=!0;var I=T.current_line_has_match(/{{#if/);I||T.print_newline(!1)}g.tag_name==="!--"&&P.type===u.TAG_CLOSE&&U.is_end_tag&&g.text.indexOf(`
|
|
`)===-1||(g.is_inline_element||g.is_unformatted||T.print_newline(!1),this._calcluate_parent_multiline(T,g))}else if(g.is_end_tag){var G=!1;G=g.start_tag_token&&g.start_tag_token.multiline_content,G=G||!g.is_inline_element&&!(U.is_inline_element||U.is_unformatted)&&!(P.type===u.TAG_CLOSE&&g.start_tag_token===U)&&P.type!=="TK_CONTENT",(g.is_content_unformatted||g.is_unformatted)&&(G=!1),G&&T.print_newline(!1)}else g.indent_content=!g.custom_beautifier_name,g.tag_start_char==="<"&&(g.tag_name==="html"?g.indent_content=this._options.indent_inner_html:g.tag_name==="head"?g.indent_content=this._options.indent_head_inner_html:g.tag_name==="body"&&(g.indent_content=this._options.indent_body_inner_html)),!(g.is_inline_element||g.is_unformatted)&&(P.type!=="TK_CONTENT"||g.is_content_unformatted)&&T.print_newline(!1),this._calcluate_parent_multiline(T,g)},p.prototype._calcluate_parent_multiline=function(T,y){y.parent&&T._output.just_added_newline()&&!((y.is_inline_element||y.is_unformatted)&&y.parent.is_inline_element)&&(y.parent.multiline_content=!0)};var d=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],m=["a","audio","del","ins","map","noscript","video"];p.prototype._do_optional_end_element=function(T){var y=null;if(T.is_empty_element||!T.is_start_tag||!T.parent)return;if(T.tag_name==="body")y=y||this._tag_stack.try_pop("head");else if(T.tag_name==="li")y=y||this._tag_stack.try_pop("li",["ol","ul"]);else if(T.tag_name==="dd"||T.tag_name==="dt")y=y||this._tag_stack.try_pop("dt",["dl"]),y=y||this._tag_stack.try_pop("dd",["dl"]);else if(T.parent.tag_name==="p"&&d.indexOf(T.tag_name)!==-1){var g=T.parent.parent;(!g||m.indexOf(g.tag_name)===-1)&&(y=y||this._tag_stack.try_pop("p"))}else T.tag_name==="rp"||T.tag_name==="rt"?(y=y||this._tag_stack.try_pop("rt",["ruby","rtc"]),y=y||this._tag_stack.try_pop("rp",["ruby","rtc"])):T.tag_name==="optgroup"?y=y||this._tag_stack.try_pop("optgroup",["select"]):T.tag_name==="option"?y=y||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):T.tag_name==="colgroup"?y=y||this._tag_stack.try_pop("caption",["table"]):T.tag_name==="thead"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"])):T.tag_name==="tbody"||T.tag_name==="tfoot"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"]),y=y||this._tag_stack.try_pop("thead",["table"]),y=y||this._tag_stack.try_pop("tbody",["table"])):T.tag_name==="tr"?(y=y||this._tag_stack.try_pop("caption",["table"]),y=y||this._tag_stack.try_pop("colgroup",["table"]),y=y||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(T.tag_name==="th"||T.tag_name==="td")&&(y=y||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),y=y||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return T.parent=this._tag_stack.get_parser_token(),y},a.exports.Beautifier=p},function(a,A,h){var s=h(6).Options;function o(f){s.call(this,f,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}o.prototype=new s,a.exports.Options=o},function(a,A,h){var s=h(9).Tokenizer,o=h(9).TOKEN,f=h(13).Directives,u=h(14).TemplatablePattern,c=h(12).Pattern,i={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},l=new f(/<\!--/,/-->/),v=function(B,C){s.call(this,B,C),this._current_tag_name="";var L=new u(this._input).read_options(this._options),w=new c(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:w.starting_with(/{{!--/).until_after(/--}}/),handlebars:w.starting_with(/{{/).until_after(/}}/),handlebars_open:w.until(/[\n\r\t }]/),handlebars_raw_close:w.until(/}}/),comment:w.starting_with(/<!--/).until_after(/-->/),cdata:w.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:w.starting_with(/<!\[/).until_after(/]>/),processing:w.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 p=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=w.matching(p).until_after(p)}};v.prototype=new s,v.prototype._is_comment=function(B){return!1},v.prototype._is_opening=function(B){return B.type===i.TAG_OPEN},v.prototype._is_closing=function(B,C){return B.type===i.TAG_CLOSE&&C&&((B.text===">"||B.text==="/>")&&C.text[0]==="<"||B.text==="}}"&&C.text[0]==="{"&&C.text[1]==="{")},v.prototype._reset=function(){this._current_tag_name=""},v.prototype._get_next_token=function(B,C){var L=null;this._readWhitespace();var w=this._input.peek();return w===null?this._create_token(i.EOF,""):(L=L||this._read_open_handlebars(w,C),L=L||this._read_attribute(w,B,C),L=L||this._read_close(w,C),L=L||this._read_raw_content(w,B,C),L=L||this._read_content_word(w),L=L||this._read_comment_or_cdata(w),L=L||this._read_processing(w),L=L||this._read_open(w,C),L=L||this._create_token(i.UNKNOWN,this._input.next()),L)},v.prototype._read_comment_or_cdata=function(B){var C=null,L=null,w=null;if(B==="<"){var p=this._input.peek(1);p==="!"&&(L=this.__patterns.comment.read(),L?(w=l.get_directives(L),w&&w.ignore==="start"&&(L+=l.readIgnored(this._input))):L=this.__patterns.cdata.read()),L&&(C=this._create_token(i.COMMENT,L),C.directives=w)}return C},v.prototype._read_processing=function(B){var C=null,L=null,w=null;if(B==="<"){var p=this._input.peek(1);(p==="!"||p==="?")&&(L=this.__patterns.conditional_comment.read(),L=L||this.__patterns.processing.read()),L&&(C=this._create_token(i.COMMENT,L),C.directives=w)}return C},v.prototype._read_open=function(B,C){var L=null,w=null;return C||B==="<"&&(L=this._input.next(),this._input.peek()==="/"&&(L+=this._input.next()),L+=this.__patterns.element_name.read(),w=this._create_token(i.TAG_OPEN,L)),w},v.prototype._read_open_handlebars=function(B,C){var L=null,w=null;return C||this._options.indent_handlebars&&B==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(L=this.__patterns.handlebars_comment.read(),L=L||this.__patterns.handlebars.read(),w=this._create_token(i.COMMENT,L)):(L=this.__patterns.handlebars_open.read(),w=this._create_token(i.TAG_OPEN,L))),w},v.prototype._read_close=function(B,C){var L=null,w=null;return C&&(C.text[0]==="<"&&(B===">"||B==="/"&&this._input.peek(1)===">")?(L=this._input.next(),B==="/"&&(L+=this._input.next()),w=this._create_token(i.TAG_CLOSE,L)):C.text[0]==="{"&&B==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),w=this._create_token(i.TAG_CLOSE,"}}"))),w},v.prototype._read_attribute=function(B,C,L){var w=null,p="";if(L&&L.text[0]==="<")if(B==="=")w=this._create_token(i.EQUALS,this._input.next());else if(B==='"'||B==="'"){var n=this._input.next();B==='"'?n+=this.__patterns.double_quote.read():n+=this.__patterns.single_quote.read(),w=this._create_token(i.VALUE,n)}else p=this.__patterns.attribute.read(),p&&(C.type===i.EQUALS?w=this._create_token(i.VALUE,p):w=this._create_token(i.ATTRIBUTE,p));return w},v.prototype._is_content_unformatted=function(B){return this._options.void_elements.indexOf(B)===-1&&(this._options.content_unformatted.indexOf(B)!==-1||this._options.unformatted.indexOf(B)!==-1)},v.prototype._read_raw_content=function(B,C,L){var w="";if(L&&L.text[0]==="{")w=this.__patterns.handlebars_raw_close.read();else if(C.type===i.TAG_CLOSE&&C.opened.text[0]==="<"&&C.text[0]!=="/"){var p=C.opened.text.substr(1).toLowerCase();if(p==="script"||p==="style"){var n=this._read_comment_or_cdata(B);if(n)return n.type=i.TEXT,n;w=this._input.readUntil(new RegExp("</"+p+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(p)&&(w=this._input.readUntil(new RegExp("</"+p+"[\\n\\r\\t ]*?>","ig")))}return w?this._create_token(i.TEXT,w):null},v.prototype._read_content_word=function(B){var C="";if(this._options.unformatted_content_delimiter&&(B===this._options.unformatted_content_delimiter[0]&&(C=this.__patterns.unformatted_content_delimiter.read())),C||(C=this.__patterns.word.read()),C)return this._create_token(i.TEXT,C)},a.exports.Tokenizer=v,a.exports.TOKEN=i}],b={};function t(a){var A=b[a];if(A!==void 0)return A.exports;var h=b[a]={exports:{}};return R[a](h,h.exports,t),h.exports}var E=t(18);O=E})();var Q=O;if(!0)!(Z=[N,N("6UM0"),N("TXwP")],H=function(R){var b=N("6UM0"),t=N("TXwP");return{html_beautify:function(E,a){return Q(E,a,b.js_beautify,t.css_beautify)}}}.apply(Ae,Z),H!==void 0&&(Ve.exports=H));else var M,_})()},pzxd:function(Ve,Ae,N){var Z=N("bYtY"),H=Z.retrieve2,O=Z.retrieve3,Q=Z.each,M=Z.normalizeCssArray,_=Z.isString,R=Z.isObject,b=N("6GrX"),t=N("VpOo"),E=N("Xnb7"),a=N("fW2E"),A=N("gut8"),h=A.ContextCachedBy,s=A.WILL_BE_RESTORED,o=b.DEFAULT_FONT,f={left:1,right:1,center:1},u={top:1,bottom:1,middle:1},c=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],i={},l={};function v(J){return B(J),Q(J.rich,B),J}function B(J){if(J){J.font=b.makeFont(J);var X=J.textAlign;X==="middle"&&(X="center"),J.textAlign=X==null||f[X]?X:"left";var ne=J.textVerticalAlign||J.textBaseline;ne==="center"&&(ne="middle"),J.textVerticalAlign=ne==null||u[ne]?ne:"top";var ue=J.textPadding;ue&&(J.textPadding=M(J.textPadding))}}function C(J,X,ne,ue,Oe,_e){ue.rich?w(J,X,ne,ue,Oe,_e):L(J,X,ne,ue,Oe,_e)}function L(J,X,ne,ue,Oe,_e){"use strict";var De=m(ue),Ue,Ke=!1,Le=X.__attrCachedBy===h.PLAIN_TEXT;_e!==s?(_e&&(Ue=_e.style,Ke=!De&&Le&&Ue),X.__attrCachedBy=De?h.NONE:h.PLAIN_TEXT):Le&&(X.__attrCachedBy=h.NONE);var ae=ue.font||o;(!Ke||ae!==(Ue.font||o))&&(X.font=ae);var V=J.__computedFont;J.__styleFont!==ae&&(J.__styleFont=ae,V=J.__computedFont=X.font);var $=ue.textPadding,q=ue.textLineHeight,se=J.__textCotentBlock;(!se||J.__dirtyText)&&(se=J.__textCotentBlock=b.parsePlainText(ne,V,$,q,ue.truncate));var te=se.outerHeight,oe=se.lines,re=se.lineHeight,ie=g(l,J,ue,Oe),ee=ie.baseX,de=ie.baseY,Ce=ie.textAlign||"left",Me=ie.textVerticalAlign;n(X,ue,Oe,ee,de);var Ye=b.adjustTextY(de,te,Me),et=ee,st=Ye;if(De||$){var ut=b.getWidth(ne,V),yt=ut;$&&(yt+=$[1]+$[3]);var xt=b.adjustTextX(ee,yt,Ce);De&&T(J,X,ue,xt,Ye,yt,te),$&&(et=K(ee,Ce,$),st+=$[0])}X.textAlign=Ce,X.textBaseline="middle",X.globalAlpha=ue.opacity||1;for(var je=0;je<c.length;je++){var He=c[je],ot=He[0],ht=He[1],we=ue[ot];(!Ke||we!==Ue[ot])&&(X[ht]=a(X,ht,we||He[2]))}st+=re/2;var he=ue.textStrokeWidth,fe=Ke?Ue.textStrokeWidth:null,ge=!Ke||he!==fe,Te=!Ke||ge||ue.textStroke!==Ue.textStroke,me=P(ue.textStroke,he),Ee=I(ue.textFill);if(me&&(ge&&(X.lineWidth=he),Te&&(X.strokeStyle=me)),Ee&&((!Ke||ue.textFill!==Ue.textFill)&&(X.fillStyle=Ee)),oe.length===1)me&&X.strokeText(oe[0],et,st),Ee&&X.fillText(oe[0],et,st);else for(var je=0;je<oe.length;je++)me&&X.strokeText(oe[je],et,st),Ee&&X.fillText(oe[je],et,st),st+=re}function w(J,X,ne,ue,Oe,_e){_e!==s&&(X.__attrCachedBy=h.NONE);var De=J.__textCotentBlock;(!De||J.__dirtyText)&&(De=J.__textCotentBlock=b.parseRichText(ne,ue)),p(J,X,De,ue,Oe)}function p(J,X,ne,ue,Oe){var _e=ne.width,De=ne.outerWidth,Ue=ne.outerHeight,Ke=ue.textPadding,Le=g(l,J,ue,Oe),ae=Le.baseX,V=Le.baseY,$=Le.textAlign,q=Le.textVerticalAlign;n(X,ue,Oe,ae,V);var se=b.adjustTextX(ae,De,$),te=b.adjustTextY(V,Ue,q),oe=se,re=te;Ke&&(oe+=Ke[3],re+=Ke[0]);var ie=oe+_e;m(ue)&&T(J,X,ue,se,te,De,Ue);for(var ee=0;ee<ne.lines.length;ee++){for(var de=ne.lines[ee],Ce=de.tokens,Me=Ce.length,Ye=de.lineHeight,et=de.width,st=0,ut=oe,yt=ie,xt=Me-1,je;st<Me&&(je=Ce[st],!je.textAlign||je.textAlign==="left");)d(J,X,je,ue,Ye,re,ut,"left"),et-=je.width,ut+=je.width,st++;for(;xt>=0&&(je=Ce[xt],je.textAlign==="right");)d(J,X,je,ue,Ye,re,yt,"right"),et-=je.width,yt-=je.width,xt--;for(ut+=(_e-(ut-oe)-(ie-yt)-et)/2;st<=xt;)je=Ce[st],d(J,X,je,ue,Ye,re,ut+je.width/2,"center"),ut+=je.width,st++;re+=Ye}}function n(J,X,ne,ue,Oe){if(ne&&X.textRotation){var _e=X.textOrigin;_e==="center"?(ue=ne.width/2+ne.x,Oe=ne.height/2+ne.y):_e&&(ue=_e[0]+ne.x,Oe=_e[1]+ne.y),J.translate(ue,Oe),J.rotate(-X.textRotation),J.translate(-ue,-Oe)}}function d(J,X,ne,ue,Oe,_e,De,Ue){var Ke=ue.rich[ne.styleName]||{};Ke.text=ne.text;var Le=ne.textVerticalAlign,ae=_e+Oe/2;Le==="top"?ae=_e+ne.height/2:Le==="bottom"&&(ae=_e+Oe-ne.height/2),!ne.isLineHolder&&m(Ke)&&T(J,X,Ke,Ue==="right"?De-ne.width:Ue==="center"?De-ne.width/2:De,ae-ne.height/2,ne.width,ne.height);var V=ne.textPadding;V&&(De=K(De,Ue,V),ae-=ne.height/2-V[2]-ne.textHeight/2),U(X,"shadowBlur",O(Ke.textShadowBlur,ue.textShadowBlur,0)),U(X,"shadowColor",Ke.textShadowColor||ue.textShadowColor||"transparent"),U(X,"shadowOffsetX",O(Ke.textShadowOffsetX,ue.textShadowOffsetX,0)),U(X,"shadowOffsetY",O(Ke.textShadowOffsetY,ue.textShadowOffsetY,0)),U(X,"textAlign",Ue),U(X,"textBaseline","middle"),U(X,"font",ne.font||o);var $=P(Ke.textStroke||ue.textStroke,se),q=I(Ke.textFill||ue.textFill),se=H(Ke.textStrokeWidth,ue.textStrokeWidth);$&&(U(X,"lineWidth",se),U(X,"strokeStyle",$),X.strokeText(ne.text,De,ae)),q&&(U(X,"fillStyle",q),X.fillText(ne.text,De,ae))}function m(J){return!!(J.textBackgroundColor||J.textBorderWidth&&J.textBorderColor)}function T(J,X,ne,ue,Oe,_e,De){var Ue=ne.textBackgroundColor,Ke=ne.textBorderWidth,Le=ne.textBorderColor,ae=_(Ue);if(U(X,"shadowBlur",ne.textBoxShadowBlur||0),U(X,"shadowColor",ne.textBoxShadowColor||"transparent"),U(X,"shadowOffsetX",ne.textBoxShadowOffsetX||0),U(X,"shadowOffsetY",ne.textBoxShadowOffsetY||0),ae||Ke&&Le){X.beginPath();var V=ne.textBorderRadius;V?t.buildPath(X,{x:ue,y:Oe,width:_e,height:De,r:V}):X.rect(ue,Oe,_e,De),X.closePath()}if(ae)if(U(X,"fillStyle",Ue),ne.fillOpacity!=null){var $=X.globalAlpha;X.globalAlpha=ne.fillOpacity*ne.opacity,X.fill(),X.globalAlpha=$}else X.fill();else if(R(Ue)){var q=Ue.image;q=E.createOrUpdateImage(q,null,J,y,Ue),q&&E.isImageReady(q)&&X.drawImage(q,ue,Oe,_e,De)}if(Ke&&Le)if(U(X,"lineWidth",Ke),U(X,"strokeStyle",Le),ne.strokeOpacity!=null){var $=X.globalAlpha;X.globalAlpha=ne.strokeOpacity*ne.opacity,X.stroke(),X.globalAlpha=$}else X.stroke()}function y(J,X){X.image=J}function g(J,X,ne,ue){var Oe=ne.x||0,_e=ne.y||0,De=ne.textAlign,Ue=ne.textVerticalAlign;if(ue){var Ke=ne.textPosition;if(Ke instanceof Array)Oe=ue.x+G(Ke[0],ue.width),_e=ue.y+G(Ke[1],ue.height);else{var Le=X&&X.calculateTextPosition?X.calculateTextPosition(i,ne,ue):b.calculateTextPosition(i,ne,ue);Oe=Le.x,_e=Le.y,De=De||Le.textAlign,Ue=Ue||Le.textVerticalAlign}var ae=ne.textOffset;ae&&(Oe+=ae[0],_e+=ae[1])}return J=J||{},J.baseX=Oe,J.baseY=_e,J.textAlign=De,J.textVerticalAlign=Ue,J}function U(J,X,ne){return J[X]=a(J,X,ne),J[X]}function P(J,X){return J==null||X<=0||J==="transparent"||J==="none"?null:J.image||J.colorStops?"#000":J}function I(J){return J==null||J==="none"?null:J.image||J.colorStops?"#000":J}function G(J,X){return typeof J=="string"?J.lastIndexOf("%")>=0?parseFloat(J)/100*X:parseFloat(J):J}function K(J,X,ne){return X==="right"?J-ne[1]:X==="center"?J+ne[3]/2-ne[1]/2:J+ne[3]}function D(J,X){return J!=null&&(J||X.textBackgroundColor||X.textBorderWidth&&X.textBorderColor||X.textPadding)}Ae.normalizeTextStyle=v,Ae.renderText=C,Ae.getBoxPosition=g,Ae.getStroke=P,Ae.getFill=I,Ae.parsePercent=G,Ae.needDrawText=D},qH13:function(Ve,Ae,N){var Z=N("ItGF"),H=N("QBsz"),O=H.applyTransform,Q=N("mFDi"),M=N("Qe9p"),_=N("6GrX"),R=N("pzxd"),b=N("ni6a"),t=N("Gev7"),E=N("Dagg"),a=N("dqUG"),A=N("y+Vt"),h=N("IMiH"),s=N("QuXc"),o=N("06Qe"),f=h.CMD,u=Math.round,c=Math.sqrt,i=Math.abs,l=Math.cos,v=Math.sin,B=Math.max;if(!Z.canvasSupported){var C=",",L="progid:DXImageTransform.Microsoft",w=21600,p=w/2,n=1e5,d=1e3,m=function(ee){ee.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",ee.coordsize=w+","+w,ee.coordorigin="0,0"},T=function(ee){return String(ee).replace(/&/g,"&").replace(/"/g,""")},y=function(ee,de,Ce){return"rgb("+[ee,de,Ce].join(",")+")"},g=function(ee,de){de&&ee&&de.parentNode!==ee&&ee.appendChild(de)},U=function(ee,de){de&&ee&&de.parentNode===ee&&ee.removeChild(de)},P=function(ee,de,Ce){return(parseFloat(ee)||0)*n+(parseFloat(de)||0)*d+Ce},I=R.parsePercent,G=function(ee,de,Ce){var Me=M.parse(de);Ce=+Ce,isNaN(Ce)&&(Ce=1),Me&&(ee.color=y(Me[0],Me[1],Me[2]),ee.opacity=Ce*Me[3])},K=function(ee){var de=M.parse(ee);return[y(de[0],de[1],de[2]),de[3]]},D=function(ee,de,Ce){var Me=de.fill;if(Me!=null)if(Me instanceof s){var Ye,et=0,st=[0,0],ut=0,yt=1,xt=Ce.getBoundingRect(),je=xt.width,He=xt.height;if(Me.type==="linear"){Ye="gradient";var ot=Ce.transform,ht=[Me.x*je,Me.y*He],we=[Me.x2*je,Me.y2*He];ot&&(O(ht,ht,ot),O(we,we,ot));var he=we[0]-ht[0],fe=we[1]-ht[1];et=Math.atan2(he,fe)*180/Math.PI,et<0&&(et+=360),et<1e-6&&(et=0)}else{Ye="gradientradial";var ht=[Me.x*je,Me.y*He],ot=Ce.transform,ge=Ce.scale,Te=je,me=He;st=[(ht[0]-xt.x)/Te,(ht[1]-xt.y)/me],ot&&O(ht,ht,ot),Te/=ge[0]*w,me/=ge[1]*w;var Ee=B(Te,me);ut=2*0/Ee,yt=2*Me.r/Ee-ut}var xe=Me.colorStops.slice();xe.sort(function($e,Re){return $e.offset-Re.offset});for(var Ie=xe.length,Pe=[],Qe=[],tt=0;tt<Ie;tt++){var mt=xe[tt],Bt=K(mt.color);Qe.push(mt.offset*yt+ut+" "+Bt[0]),(tt===0||tt===Ie-1)&&Pe.push(Bt)}if(Ie>=2){var Et=Pe[0][0],Ct=Pe[1][0],nt=Pe[0][1]*de.opacity,qe=Pe[1][1]*de.opacity;ee.type=Ye,ee.method="none",ee.focus="100%",ee.angle=et,ee.color=Et,ee.color2=Ct,ee.colors=Qe.join(","),ee.opacity=qe,ee.opacity2=nt}Ye==="radial"&&(ee.focusposition=st.join(","))}else G(ee,Me,de.opacity)},J=function(ee,de){de.lineDash&&(ee.dashstyle=de.lineDash.join(" ")),de.stroke!=null&&!(de.stroke instanceof s)&&G(ee,de.stroke,de.opacity)},X=function(ee,de,Ce,Me){var Ye=de==="fill",et=ee.getElementsByTagName(de)[0];Ce[de]!=null&&Ce[de]!=="none"&&(Ye||!Ye&&Ce.lineWidth)?(ee[Ye?"filled":"stroked"]="true",Ce[de]instanceof s&&U(ee,et),et||(et=o.createNode(de)),Ye?D(et,Ce,Me):J(et,Ce),g(ee,et)):(ee[Ye?"filled":"stroked"]="false",U(ee,et))},ne=[[],[],[]],ue=function(ee,de){var Ce=f.M,Me=f.C,Ye=f.L,et=f.A,st=f.Q,ut=[],yt,xt,je,He,ot,ht,we=ee.data,he=ee.len();for(He=0;He<he;){je=we[He++],xt="",yt=0;switch(je){case Ce:xt=" m ",yt=1,ot=we[He++],ht=we[He++],ne[0][0]=ot,ne[0][1]=ht;break;case Ye:xt=" l ",yt=1,ot=we[He++],ht=we[He++],ne[0][0]=ot,ne[0][1]=ht;break;case st:case Me:xt=" c ",yt=3;var fe=we[He++],ge=we[He++],Te=we[He++],me=we[He++],Ee,xe;je===st?(Ee=Te,xe=me,Te=(Te+2*fe)/3,me=(me+2*ge)/3,fe=(ot+2*fe)/3,ge=(ht+2*ge)/3):(Ee=we[He++],xe=we[He++]),ne[0][0]=fe,ne[0][1]=ge,ne[1][0]=Te,ne[1][1]=me,ne[2][0]=Ee,ne[2][1]=xe,ot=Ee,ht=xe;break;case et:var Ie=0,Pe=0,Qe=1,tt=1,mt=0;de&&(Ie=de[4],Pe=de[5],Qe=c(de[0]*de[0]+de[1]*de[1]),tt=c(de[2]*de[2]+de[3]*de[3]),mt=Math.atan2(-de[1]/tt,de[0]/Qe));var Bt=we[He++],Et=we[He++],Ct=we[He++],nt=we[He++],qe=we[He++]+mt,$e=we[He++]+qe+mt;He++;var Re=we[He++],Ne=Bt+l(qe)*Ct,ct=Et+v(qe)*nt,fe=Bt+l($e)*Ct,ge=Et+v($e)*nt,rt=Re?" wa ":" at ";Math.abs(Ne-fe)<1e-4&&(Math.abs($e-qe)>.01?Re&&(Ne+=270/w):Math.abs(ct-Et)<1e-4?Re&&Ne<Bt||!Re&&Ne>Bt?ge-=270/w:ge+=270/w:Re&&ct<Et||!Re&&ct>Et?fe+=270/w:fe-=270/w),ut.push(rt,u(((Bt-Ct)*Qe+Ie)*w-p),C,u(((Et-nt)*tt+Pe)*w-p),C,u(((Bt+Ct)*Qe+Ie)*w-p),C,u(((Et+nt)*tt+Pe)*w-p),C,u((Ne*Qe+Ie)*w-p),C,u((ct*tt+Pe)*w-p),C,u((fe*Qe+Ie)*w-p),C,u((ge*tt+Pe)*w-p)),ot=fe,ht=ge;break;case f.R:var gt=ne[0],pt=ne[1];gt[0]=we[He++],gt[1]=we[He++],pt[0]=gt[0]+we[He++],pt[1]=gt[1]+we[He++],de&&(O(gt,gt,de),O(pt,pt,de)),gt[0]=u(gt[0]*w-p),pt[0]=u(pt[0]*w-p),gt[1]=u(gt[1]*w-p),pt[1]=u(pt[1]*w-p),ut.push(" m ",gt[0],C,gt[1]," l ",pt[0],C,gt[1]," l ",pt[0],C,pt[1]," l ",gt[0],C,pt[1]);break;case f.Z:ut.push(" x ")}if(yt>0){ut.push(xt);for(var at=0;at<yt;at++){var vt=ne[at];de&&O(vt,vt,de),ut.push(u(vt[0]*w-p),C,u(vt[1]*w-p),at<yt-1?C:"")}}}return ut.join("")};A.prototype.brushVML=function(ee){var de=this.style,Ce=this._vmlEl;Ce||(Ce=o.createNode("shape"),m(Ce),this._vmlEl=Ce),X(Ce,"fill",de,this),X(Ce,"stroke",de,this);var Me=this.transform,Ye=Me!=null,et=Ce.getElementsByTagName("stroke")[0];if(et){var st=de.lineWidth;if(Ye&&!de.strokeNoScale){var ut=Me[0]*Me[3]-Me[1]*Me[2];st*=c(i(ut))}et.weight=st+"px"}var yt=this.path||(this.path=new h);this.__dirtyPath&&(yt.beginPath(),yt.subPixelOptimize=!1,this.buildPath(yt,this.shape),yt.toStatic(),this.__dirtyPath=!1),Ce.path=ue(yt,this.transform),Ce.style.zIndex=P(this.zlevel,this.z,this.z2),g(ee,Ce),de.text!=null?this.drawRectText(ee,this.getBoundingRect()):this.removeRectText(ee)},A.prototype.onRemove=function(ee){U(ee,this._vmlEl),this.removeRectText(ee)},A.prototype.onAdd=function(ee){g(ee,this._vmlEl),this.appendRectText(ee)};var Oe=function(ee){return typeof ee=="object"&&ee.tagName&&ee.tagName.toUpperCase()==="IMG"};E.prototype.brushVML=function(ee){var de=this.style,Ce=de.image,Me,Ye;if(Oe(Ce)){var et=Ce.src;if(et===this._imageSrc)Me=this._imageWidth,Ye=this._imageHeight;else{var st=Ce.runtimeStyle,ut=st.width,yt=st.height;st.width="auto",st.height="auto",Me=Ce.width,Ye=Ce.height,st.width=ut,st.height=yt,this._imageSrc=et,this._imageWidth=Me,this._imageHeight=Ye}Ce=et}else Ce===this._imageSrc&&(Me=this._imageWidth,Ye=this._imageHeight);if(!Ce)return;var xt=de.x||0,je=de.y||0,He=de.width,ot=de.height,ht=de.sWidth,we=de.sHeight,he=de.sx||0,fe=de.sy||0,ge=ht&&we,Te=this._vmlEl;Te||(Te=o.doc.createElement("div"),m(Te),this._vmlEl=Te);var me=Te.style,Ee=!1,xe,Ie=1,Pe=1;if(this.transform&&(xe=this.transform,Ie=c(xe[0]*xe[0]+xe[1]*xe[1]),Pe=c(xe[2]*xe[2]+xe[3]*xe[3]),Ee=xe[1]||xe[2]),Ee){var Qe=[xt,je],tt=[xt+He,je],mt=[xt,je+ot],Bt=[xt+He,je+ot];O(Qe,Qe,xe),O(tt,tt,xe),O(mt,mt,xe),O(Bt,Bt,xe);var Et=B(Qe[0],tt[0],mt[0],Bt[0]),Ct=B(Qe[1],tt[1],mt[1],Bt[1]),nt=[];nt.push("M11=",xe[0]/Ie,C,"M12=",xe[2]/Pe,C,"M21=",xe[1]/Ie,C,"M22=",xe[3]/Pe,C,"Dx=",u(xt*Ie+xe[4]),C,"Dy=",u(je*Pe+xe[5])),me.padding="0 "+u(Et)+"px "+u(Ct)+"px 0",me.filter=L+".Matrix("+nt.join("")+", SizingMethod=clip)"}else xe&&(xt=xt*Ie+xe[4],je=je*Pe+xe[5]),me.filter="",me.left=u(xt)+"px",me.top=u(je)+"px";var qe=this._imageEl,$e=this._cropEl;qe||(qe=o.doc.createElement("div"),this._imageEl=qe);var Re=qe.style;if(ge){if(Me&&Ye)Re.width=u(Ie*Me*He/ht)+"px",Re.height=u(Pe*Ye*ot/we)+"px";else{var Ne=new Image,ct=this;Ne.onload=function(){Ne.onload=null,Me=Ne.width,Ye=Ne.height,Re.width=u(Ie*Me*He/ht)+"px",Re.height=u(Pe*Ye*ot/we)+"px",ct._imageWidth=Me,ct._imageHeight=Ye,ct._imageSrc=Ce},Ne.src=Ce}$e||($e=o.doc.createElement("div"),$e.style.overflow="hidden",this._cropEl=$e);var rt=$e.style;rt.width=u((He+he*He/ht)*Ie),rt.height=u((ot+fe*ot/we)*Pe),rt.filter=L+".Matrix(Dx="+-he*He/ht*Ie+",Dy="+-fe*ot/we*Pe+")",$e.parentNode||Te.appendChild($e),qe.parentNode!==$e&&$e.appendChild(qe)}else Re.width=u(Ie*He)+"px",Re.height=u(Pe*ot)+"px",Te.appendChild(qe),$e&&$e.parentNode&&(Te.removeChild($e),this._cropEl=null);var gt="",pt=de.opacity;pt<1&&(gt+=".Alpha(opacity="+u(pt*100)+") "),gt+=L+".AlphaImageLoader(src="+Ce+", SizingMethod=scale)",Re.filter=gt,Te.style.zIndex=P(this.zlevel,this.z,this.z2),g(ee,Te),de.text!=null&&this.drawRectText(ee,this.getBoundingRect())},E.prototype.onRemove=function(ee){U(ee,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(ee)},E.prototype.onAdd=function(ee){g(ee,this._vmlEl),this.appendRectText(ee)};var _e="normal",De={},Ue=0,Ke=100,Le=document.createElement("div"),ae=function(ee){var de=De[ee];if(!de){Ue>Ke&&(Ue=0,De={});var Ce=Le.style,Me;try{Ce.font=ee,Me=Ce.fontFamily.split(",")[0]}catch(Ye){}de={style:Ce.fontStyle||_e,variant:Ce.fontVariant||_e,weight:Ce.fontWeight||_e,size:parseFloat(Ce.fontSize||12)|0,family:Me||"Microsoft YaHei"},De[ee]=de,Ue++}return de},V;_.$override("measureText",function(ee,de){var Ce=o.doc;V||(V=Ce.createElement("div"),V.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",o.doc.body.appendChild(V));try{V.style.font=de}catch(Me){}return V.innerHTML="",V.appendChild(Ce.createTextNode(ee)),{width:V.offsetWidth}});for(var $=new Q,q=function(ee,de,Ce,Me){var Ye=this.style;this.__dirty&&R.normalizeTextStyle(Ye,!0);var et=Ye.text;if(et!=null&&(et+=""),!et)return;if(Ye.rich){var st=_.parseRichText(et,Ye);et=[];for(var ut=0;ut<st.lines.length;ut++){for(var yt=st.lines[ut].tokens,xt=[],je=0;je<yt.length;je++)xt.push(yt[je].text);et.push(xt.join(""))}et=et.join(`
|
|
`)}var He,ot,ht=Ye.textAlign,we=Ye.textVerticalAlign,he=ae(Ye.font),fe=he.style+" "+he.variant+" "+he.weight+" "+he.size+'px "'+he.family+'"';Ce=Ce||_.getBoundingRect(et,fe,ht,we,Ye.textPadding,Ye.textLineHeight);var ge=this.transform;if(ge&&!Me&&($.copy(de),$.applyTransform(ge),de=$),Me)He=de.x,ot=de.y;else{var Te=Ye.textPosition;if(Te instanceof Array)He=de.x+I(Te[0],de.width),ot=de.y+I(Te[1],de.height),ht=ht||"left";else{var me=this.calculateTextPosition?this.calculateTextPosition({},Ye,de):_.calculateTextPosition({},Ye,de);He=me.x,ot=me.y,ht=ht||me.textAlign,we=we||me.textVerticalAlign}}He=_.adjustTextX(He,Ce.width,ht),ot=_.adjustTextY(ot,Ce.height,we),ot+=Ce.height/2;var Ee=o.createNode,xe=this._textVmlEl,Ie,Pe,Qe;xe?(Qe=xe.firstChild,Ie=Qe.nextSibling,Pe=Ie.nextSibling):(xe=Ee("line"),Ie=Ee("path"),Pe=Ee("textpath"),Qe=Ee("skew"),Pe.style["v-text-align"]="left",m(xe),Ie.textpathok=!0,Pe.on=!0,xe.from="0 0",xe.to="1000 0.05",g(xe,Qe),g(xe,Ie),g(xe,Pe),this._textVmlEl=xe);var tt=[He,ot],mt=xe.style;ge&&Me?(O(tt,tt,ge),Qe.on=!0,Qe.matrix=ge[0].toFixed(3)+C+ge[2].toFixed(3)+C+ge[1].toFixed(3)+C+ge[3].toFixed(3)+",0,0",Qe.offset=(u(tt[0])||0)+","+(u(tt[1])||0),Qe.origin="0 0",mt.left="0px",mt.top="0px"):(Qe.on=!1,mt.left=u(He)+"px",mt.top=u(ot)+"px"),Pe.string=T(et);try{Pe.style.font=fe}catch(Bt){}X(xe,"fill",{fill:Ye.textFill,opacity:Ye.opacity},this),X(xe,"stroke",{stroke:Ye.textStroke,opacity:Ye.opacity,lineDash:Ye.lineDash||null},this),xe.style.zIndex=P(this.zlevel,this.z,this.z2),g(ee,xe)},se=function(ee){U(ee,this._textVmlEl),this._textVmlEl=null},te=function(ee){g(ee,this._textVmlEl)},oe=[b,t,E,A,a],re=0;re<oe.length;re++){var ie=oe[re].prototype;ie.drawRectText=q,ie.removeRectText=se,ie.appendRectText=te}a.prototype.brushVML=function(ee){var de=this.style;de.text!=null?this.drawRectText(ee,{x:de.x||0,y:de.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(ee)},a.prototype.onRemove=function(ee){this.removeRectText(ee)},a.prototype.onAdd=function(ee){this.appendRectText(ee)}}},r6Bn:function(Ve,Ae,N){var Z=N("bYtY"),H=N("ItGF"),O=N("4fz+"),Q=N("BPZU");function M(b,t){return b.zlevel===t.zlevel?b.z===t.z?b.z2-t.z2:b.z-t.z:b.zlevel-t.zlevel}var _=function(){this._roots=[],this._displayList=[],this._displayListLen=0};_.prototype={constructor:_,traverse:function(b,t){for(var E=0;E<this._roots.length;E++)this._roots[E].traverse(b,t)},getDisplayList:function(b,t){return t=t||!1,b&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(b){this._displayListLen=0;for(var t=this._roots,E=this._displayList,a=0,A=t.length;a<A;a++)this._updateAndAddDisplayable(t[a],null,b);E.length=this._displayListLen,H.canvasSupported&&Q(E,M)},_updateAndAddDisplayable:function(b,t,E){if(b.ignore&&!E)return;b.beforeUpdate(),b.__dirty&&b.update(),b.afterUpdate();var a=b.clipPath;if(a){t?t=t.slice():t=[];for(var A=a,h=b;A;)A.parent=h,A.updateTransform(),t.push(A),h=A,A=A.clipPath}if(b.isGroup){for(var s=b._children,o=0;o<s.length;o++){var f=s[o];b.__dirty&&(f.__dirty=!0),this._updateAndAddDisplayable(f,t,E)}b.__dirty=!1}else b.__clipPaths=t,this._displayList[this._displayListLen++]=b},addRoot:function(b){if(b.__storage===this)return;b instanceof O&&b.addChildrenToStorage(this),this.addToStorage(b),this._roots.push(b)},delRoot:function(b){if(b==null){for(var t=0;t<this._roots.length;t++){var E=this._roots[t];E instanceof O&&E.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(b instanceof Array){for(var t=0,a=b.length;t<a;t++)this.delRoot(b[t]);return}var A=Z.indexOf(this._roots,b);A>=0&&(this.delFromStorage(b),this._roots.splice(A,1),b instanceof O&&b.delChildrenFromStorage(this))},addToStorage:function(b){return b&&(b.__storage=this,b.dirty(!1)),this},delFromStorage:function(b){return b&&(b.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:M};var R=_;Ve.exports=R},rA99:function(Ve,Ae,N){var Z=N("y+Vt"),H=N("QBsz"),O=N("Sj9i"),Q=O.quadraticSubdivide,M=O.cubicSubdivide,_=O.quadraticAt,R=O.cubicAt,b=O.quadraticDerivativeAt,t=O.cubicDerivativeAt,E=[];function a(h,s,o){var f=h.cpx2,u=h.cpy2;return f===null||u===null?[(o?t:R)(h.x1,h.cpx1,h.cpx2,h.x2,s),(o?t:R)(h.y1,h.cpy1,h.cpy2,h.y2,s)]:[(o?b:_)(h.x1,h.cpx1,h.x2,s),(o?b:_)(h.y1,h.cpy1,h.y2,s)]}var A=Z.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(h,s){var o=s.x1,f=s.y1,u=s.x2,c=s.y2,i=s.cpx1,l=s.cpy1,v=s.cpx2,B=s.cpy2,C=s.percent;if(C===0)return;h.moveTo(o,f),v==null||B==null?(C<1&&(Q(o,i,u,C,E),i=E[1],u=E[2],Q(f,l,c,C,E),l=E[1],c=E[2]),h.quadraticCurveTo(i,l,u,c)):(C<1&&(M(o,i,v,u,C,E),i=E[1],v=E[2],u=E[3],M(f,l,B,c,C,E),l=E[1],B=E[2],c=E[3]),h.bezierCurveTo(i,l,v,B,u,c))},pointAt:function(h){return a(this.shape,h,!1)},tangentAt:function(h){var s=a(this.shape,h,!0);return H.normalize(s,s)}});Ve.exports=A},"rAM+":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return H});var Z=N("Qw5x");function H(O,Q){var M;if(typeof Symbol=="undefined"||O[Symbol.iterator]==null){if(Array.isArray(O)||(M=Object(Z.a)(O))||Q&&O&&typeof O.length=="number"){M&&(O=M);var _=0,R=function(){};return{s:R,n:function(){return _>=O.length?{done:!0}:{done:!1,value:O[_++]}},e:function(A){throw A},f:R}}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 b=!0,t=!1,E;return{s:function(){M=O[Symbol.iterator]()},n:function(){var A=M.next();return b=A.done,A},e:function(A){t=!0,E=A},f:function(){try{!b&&M.return!=null&&M.return()}finally{if(t)throw E}}}}},rUJ1:function(Ve,Ae){const N=/[&<>"']/,Z=/[&<>"']/g,H=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,Q={"&":"&","<":"<",">":">",'"':""","'":"'"},M=w=>Q[w];function _(w,p){if(p){if(N.test(w))return w.replace(Z,M)}else if(H.test(w))return w.replace(O,M);return w}const R=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b(w){return w.replace(R,(p,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const t=/(^|[^\[])\^/g;function E(w,p){w=w.source||w,p=p||"";const n={replace:(d,m)=>(m=m.source||m,m=m.replace(t,"$1"),w=w.replace(d,m),n),getRegex:()=>new RegExp(w,p)};return n}const a=/[^\w:]/g,A=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function h(w,p,n){if(w){let d;try{d=decodeURIComponent(b(n)).replace(a,"").toLowerCase()}catch(m){return null}if(d.indexOf("javascript:")===0||d.indexOf("vbscript:")===0||d.indexOf("data:")===0)return null}p&&!A.test(n)&&(n=c(p,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(d){return null}return n}const s={},o=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(w,p){s[" "+w]||(o.test(w)?s[" "+w]=w+"/":s[" "+w]=B(w,"/",!0)),w=s[" "+w];const n=w.indexOf(":")===-1;return p.substring(0,2)==="//"?n?p:w.replace(f,"$1")+p:p.charAt(0)==="/"?n?p:w.replace(u,"$1")+p:w+p}const i={exec:function(){}};function l(w){let p=1,n,d;for(;p<arguments.length;p++){n=arguments[p];for(d in n)Object.prototype.hasOwnProperty.call(n,d)&&(w[d]=n[d])}return w}function v(w,p){const n=w.replace(/\|/g,(T,y,g)=>{let U=!1,P=y;for(;--P>=0&&g[P]==="\\";)U=!U;return U?"|":" |"}),d=n.split(/ \|/);let m=0;if(d.length>p)d.splice(p);else for(;d.length<p;)d.push("");for(;m<d.length;m++)d[m]=d[m].trim().replace(/\\\|/g,"|");return d}function B(w,p,n){const d=w.length;if(d===0)return"";let m=0;for(;m<d;){const T=w.charAt(d-m-1);if(T===p&&!n)m++;else if(T!==p&&n)m++;else break}return w.substr(0,d-m)}function C(w,p){if(w.indexOf(p[1])===-1)return-1;const n=w.length;let d=0,m=0;for(;m<n;m++)if(w[m]==="\\")m++;else if(w[m]===p[0])d++;else if(w[m]===p[1]&&(d--,d<0))return m;return-1}function L(w){w&&w.sanitize&&!w.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")}Ve.exports={escape:_,unescape:b,edit:E,cleanUrl:h,resolveUrl:c,noopTest:i,merge:l,splitCells:v,rtrim:B,findClosingBracket:C,checkSanitizeDeprecation:L}},rmlV:function(Ve,Ae,N){var Z=N("y+Vt"),H=Z.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(O,Q){var M=.5522848,_=Q.cx,R=Q.cy,b=Q.rx,t=Q.ry,E=b*M,a=t*M;O.moveTo(_-b,R),O.bezierCurveTo(_-b,R-a,_-E,R-t,_,R-t),O.bezierCurveTo(_+E,R-t,_+b,R-a,_+b,R),O.bezierCurveTo(_+b,R+a,_+E,R+t,_,R+t),O.bezierCurveTo(_-E,R+t,_-b,R+a,_-b,R),O.closePath()}});Ve.exports=H},sR1s:function(Ve,Ae,N){"use strict";N.d(Ae,"b",function(){return Q}),N.d(Ae,"a",function(){return M}),N.d(Ae,"c",function(){return _}),N.d(Ae,"d",function(){return R});var Z=N("U8pU"),H="RC_TABLE_KEY";function O(b){return b==null?[]:Array.isArray(b)?b:[b]}function Q(b,t){if(!t&&typeof t!="number")return b;for(var E=O(t),a=b,A=0;A<E.length;A+=1){if(!a)return null;var h=E[A];a=a[h]}return a}function M(b){var t=[],E={};return b.forEach(function(a){for(var A=a||{},h=A.key,s=A.dataIndex,o=h||O(s).join("-")||H;E[o];)o="".concat(o,"_next");E[o]=!0,t.push(o)}),t}function _(){var b={};function t(h,s){s&&Object.keys(s).forEach(function(o){var f=s[o];f&&Object(Z.a)(f)==="object"?(h[o]=h[o]||{},t(h[o],f)):h[o]=f})}for(var E=arguments.length,a=new Array(E),A=0;A<E;A++)a[A]=arguments[A];return a.forEach(function(h){t(b,h)}),b}function R(b){return b!=null}},"sW+o":function(Ve,Ae,N){var Z=N("SrGk"),H=N("bYtY"),O=N("SUKs"),Q=N("Qe9p");function M(R,b){Z.call(this,R,b,["linearGradient","radialGradient"],"__gradient_in_use__")}H.inherits(M,Z),M.prototype.addWithoutUpdate=function(R,b){if(b&&b.style){var t=this;H.each(["fill","stroke"],function(E){if(b.style[E]&&(b.style[E].type==="linear"||b.style[E].type==="radial")){var a=b.style[E],A=t.getDefs(!0),h;a._dom?(h=a._dom,A.contains(a._dom)||t.addDom(h)):h=t.add(a),t.markUsed(b);var s=h.getAttribute("id");R.setAttribute(E,"url(#"+s+")")}})}},M.prototype.add=function(R){var b;if(R.type==="linear")b=this.createElement("linearGradient");else if(R.type==="radial")b=this.createElement("radialGradient");else return O("Illegal gradient type."),null;return R.id=R.id||this.nextId++,b.setAttribute("id","zr"+this._zrId+"-gradient-"+R.id),this.updateDom(R,b),this.addDom(b),b},M.prototype.update=function(R){var b=this;Z.prototype.update.call(this,R,function(){var t=R.type,E=R._dom.tagName;t==="linear"&&E==="linearGradient"||t==="radial"&&E==="radialGradient"?b.updateDom(R,R._dom):(b.removeDom(R),b.add(R))})},M.prototype.updateDom=function(R,b){if(R.type==="linear")b.setAttribute("x1",R.x),b.setAttribute("y1",R.y),b.setAttribute("x2",R.x2),b.setAttribute("y2",R.y2);else if(R.type==="radial")b.setAttribute("cx",R.x),b.setAttribute("cy",R.y),b.setAttribute("r",R.r);else{O("Illegal gradient type.");return}R.global?b.setAttribute("gradientUnits","userSpaceOnUse"):b.setAttribute("gradientUnits","objectBoundingBox"),b.innerHTML="";for(var t=R.colorStops,E=0,a=t.length;E<a;++E){var A=this.createElement("stop");A.setAttribute("offset",t[E].offset*100+"%");var h=t[E].color;if(h.indexOf("rgba">-1)){var s=Q.parse(h)[3],o=Q.toHex(h);A.setAttribute("stop-color","#"+o),A.setAttribute("stop-opacity",s)}else A.setAttribute("stop-color",t[E].color);b.appendChild(A)}R._dom=b},M.prototype.markUsed=function(R){if(R.style){var b=R.style.fill;b&&b._dom&&Z.prototype.markUsed.call(this,b._dom),b=R.style.stroke,b&&b._dom&&Z.prototype.markUsed.call(this,b._dom)}};var _=M;Ve.exports=_},sboe:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return O});var Z=N("q1tI"),H=N.n(Z),O=Z.createContext(null)},t23M:function(Ve,Ae,N){"use strict";var Z=N("VTBJ"),H=N("1OyB"),O=N("vuIU"),Q=N("Ji7U"),M=N("LK+K"),_=N("q1tI"),R=N.n(_),b=N("m+aA"),t=N("Zm9Q"),E=N("Kwbf"),a=N("c+Xe"),A=N("bdgK"),h="rc-observer-key",s=function(o){Object(Q.a)(u,o);var f=Object(M.a)(u);function u(){var c;return Object(H.a)(this,u),c=f.apply(this,arguments),c.resizeObserver=null,c.childNode=null,c.currentElement=null,c.state={width:0,height:0,offsetHeight:0,offsetWidth:0},c.onResize=function(i){var l=c.props.onResize,v=i[0].target,B=v.getBoundingClientRect(),C=B.width,L=B.height,w=v.offsetWidth,p=v.offsetHeight,n=Math.floor(C),d=Math.floor(L);if(c.state.width!==n||c.state.height!==d||c.state.offsetWidth!==w||c.state.offsetHeight!==p){var m={width:n,height:d,offsetWidth:w,offsetHeight:p};c.setState(m),l&&Promise.resolve().then(function(){l(Object(Z.a)(Object(Z.a)({},m),{},{offsetWidth:w,offsetHeight:p}))})}},c.setChildNode=function(i){c.childNode=i},c}return Object(O.a)(u,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var i=this.props.disabled;if(i){this.destroyObserver();return}var l=Object(b.a)(this.childNode||this),v=l!==this.currentElement;v&&(this.destroyObserver(),this.currentElement=l),!this.resizeObserver&&l&&(this.resizeObserver=new A.default(this.onResize),this.resizeObserver.observe(l))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var i=this.props.children,l=Object(t.a)(i);if(l.length>1)Object(E.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(l.length===0)return Object(E.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var v=l[0];if(_.isValidElement(v)&&Object(a.c)(v)){var B=v.ref;l[0]=_.cloneElement(v,{ref:Object(a.a)(B,this.setChildNode)})}return l.length===1?l[0]:l.map(function(C,L){return!_.isValidElement(C)||"key"in C&&C.key!==null?C:_.cloneElement(C,{key:"".concat(h,"-").concat(L)})})}}]),u}(_.Component);s.displayName="ResizeObserver",Ae.a=s},t9D7:function(Ve,Ae,N){"use strict";N.d(Ae,"b",function(){return R}),N.d(Ae,"g",function(){return t}),N.d(Ae,"d",function(){return E}),N.d(Ae,"e",function(){return a}),N.d(Ae,"a",function(){return A}),N.d(Ae,"f",function(){return o}),N.d(Ae,"c",function(){return f});var Z=N("Vhoy"),H=N("MI8n"),O=N("pmY6"),Q=N("Cg/j"),M=N("ic2d"),_=N("nEHx");const R=Object(Q.c)("themeService");var b;(function(u){function c(i){return i&&typeof i=="object"&&typeof i.id=="string"}u.isThemeColor=c})(b||(b={}));function t(u){return{id:u}}var E;(function(u){function c(L){return L&&typeof L=="object"&&typeof L.id=="string"&&(typeof L.color=="undefined"||b.isThemeColor(L.color))}u.isThemeIcon=c;const i=new RegExp(`^\\$\\((${Z.a.iconNameExpression}(?:${Z.a.iconModifierExpression})?)\\)$`);function l(L){const w=i.exec(L);if(!w)return;let[,p]=w;return{id:p}}u.fromString=l;function v(L,w){let p=L.id;const n=p.lastIndexOf("~");return n!==-1&&(p=p.substring(0,n)),w&&(p=`${p}~${w}`),{id:p}}u.modify=v;function B(L,w){var p,n;return L.id===w.id&&((p=L.color)===null||p===void 0?void 0:p.id)===((n=w.color)===null||n===void 0?void 0:n.id)}u.isEqual=B;function C(L,w){return{id:L.id,color:w?t(w):void 0}}u.asThemeIcon=C,u.asClassNameArray=Z.a.asClassNameArray,u.asClassName=Z.a.asClassName,u.asCSSSelector=Z.a.asCSSSelector})(E||(E={}));function a(u){switch(u){case _.a.DARK:return"vs-dark";case _.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const A={ThemingContribution:"base.contributions.theming"};class h{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new H.b}onColorThemeChange(u){return this.themingParticipants.push(u),this.onThemingParticipantAddedEmitter.fire(u),Object(O.i)(()=>{const c=this.themingParticipants.indexOf(u);this.themingParticipants.splice(c,1)})}getThemingParticipants(){return this.themingParticipants}}let s=new h;M.a.add(A.ThemingContribution,s);function o(u){return s.onColorThemeChange(u)}class f extends O.a{constructor(u){super();this.themeService=u,this.theme=u.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(c=>this.onThemeChange(c)))}onThemeChange(u){this.theme=u,this.updateStyles()}updateStyles(){}}},u3os:function(Ve,Ae,N){"use strict";Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.ver=Ae.clear=Ae.bind=void 0;var Z=N("P4Qj"),H=function(_,R){var b=(0,Z.getSensor)(_);return b.bind(R),function(){b.unbind(R)}};Ae.bind=H;var O=function(_){var R=(0,Z.getSensor)(_);(0,Z.removeSensor)(R)};Ae.clear=O;var Q="1.0.1";Ae.ver=Q},ulZh:function(Ve,Ae,N){typeof window!="undefined"&&function(H,O){Ve.exports=O()}(this,function(){return function(Z){var H={};function O(Q){if(H[Q])return H[Q].exports;var M=H[Q]={i:Q,l:!1,exports:{}};return Z[Q].call(M.exports,M,M.exports,O),M.l=!0,M.exports}return O.m=Z,O.c=H,O.d=function(Q,M,_){O.o(Q,M)||Object.defineProperty(Q,M,{enumerable:!0,get:_})},O.r=function(Q){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Q,"__esModule",{value:!0})},O.t=function(Q,M){if(M&1&&(Q=O(Q)),M&8)return Q;if(M&4&&typeof Q=="object"&&Q&&Q.__esModule)return Q;var _=Object.create(null);if(O.r(_),Object.defineProperty(_,"default",{enumerable:!0,value:Q}),M&2&&typeof Q!="string")for(var R in Q)O.d(_,R,function(b){return Q[b]}.bind(null,R));return _},O.n=function(Q){var M=Q&&Q.__esModule?function(){return Q.default}:function(){return Q};return O.d(M,"a",M),M},O.o=function(Q,M){return Object.prototype.hasOwnProperty.call(Q,M)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(Z,H,O){"use strict";var Q=Object.prototype.hasOwnProperty,M="~";function _(){}Object.create&&(_.prototype=Object.create(null),new _().__proto__||(M=!1));function R(a,A,h){this.fn=a,this.context=A,this.once=h||!1}function b(a,A,h,s,o){if(typeof h!="function")throw new TypeError("The listener must be a function");var f=new R(h,s||a,o),u=M?M+A:A;return a._events[u]?a._events[u].fn?a._events[u]=[a._events[u],f]:a._events[u].push(f):(a._events[u]=f,a._eventsCount++),a}function t(a,A){--a._eventsCount===0?a._events=new _:delete a._events[A]}function E(){this._events=new _,this._eventsCount=0}E.prototype.eventNames=function(){var A=[],h,s;if(this._eventsCount===0)return A;for(s in h=this._events)Q.call(h,s)&&A.push(M?s.slice(1):s);return Object.getOwnPropertySymbols?A.concat(Object.getOwnPropertySymbols(h)):A},E.prototype.listeners=function(A){var h=M?M+A:A,s=this._events[h];if(!s)return[];if(s.fn)return[s.fn];for(var o=0,f=s.length,u=new Array(f);o<f;o++)u[o]=s[o].fn;return u},E.prototype.listenerCount=function(A){var h=M?M+A:A,s=this._events[h];return s?s.fn?1:s.length:0},E.prototype.emit=function(A,h,s,o,f,u){var c=M?M+A:A;if(!this._events[c])return!1;var i=this._events[c],l=arguments.length,v,B;if(i.fn){i.once&&this.removeListener(A,i.fn,void 0,!0);switch(l){case 1:return i.fn.call(i.context),!0;case 2:return i.fn.call(i.context,h),!0;case 3:return i.fn.call(i.context,h,s),!0;case 4:return i.fn.call(i.context,h,s,o),!0;case 5:return i.fn.call(i.context,h,s,o,f),!0;case 6:return i.fn.call(i.context,h,s,o,f,u),!0}for(B=1,v=new Array(l-1);B<l;B++)v[B-1]=arguments[B];i.fn.apply(i.context,v)}else{var C=i.length,L;for(B=0;B<C;B++){i[B].once&&this.removeListener(A,i[B].fn,void 0,!0);switch(l){case 1:i[B].fn.call(i[B].context);break;case 2:i[B].fn.call(i[B].context,h);break;case 3:i[B].fn.call(i[B].context,h,s);break;case 4:i[B].fn.call(i[B].context,h,s,o);break;default:if(!v)for(L=1,v=new Array(l-1);L<l;L++)v[L-1]=arguments[L];i[B].fn.apply(i[B].context,v)}}}return!0},E.prototype.on=function(A,h,s){return b(this,A,h,s,!1)},E.prototype.once=function(A,h,s){return b(this,A,h,s,!0)},E.prototype.removeListener=function(A,h,s,o){var f=M?M+A:A;if(!this._events[f])return this;if(!h)return t(this,f),this;var u=this._events[f];if(u.fn)u.fn===h&&(!o||u.once)&&(!s||u.context===s)&&t(this,f);else{for(var c=0,i=[],l=u.length;c<l;c++)(u[c].fn!==h||o&&!u[c].once||s&&u[c].context!==s)&&i.push(u[c]);i.length?this._events[f]=i.length===1?i[0]:i:t(this,f)}return this},E.prototype.removeAllListeners=function(A){var h;return A?(h=M?M+A:A,this._events[h]&&t(this,h)):(this._events=new _,this._eventsCount=0),this},E.prototype.off=E.prototype.removeListener,E.prototype.addListener=E.prototype.on,E.prefixed=M,E.EventEmitter=E,Z.exports=E},"./node_modules/url-toolkit/src/url-toolkit.js":function(Z,H,O){(function(Q){var M=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,_=/^([^\/?#]*)([^]*)$/,R=/(?:\/|^)\.(?=\/)/g,b=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,t={buildAbsoluteURL:function(E,a,A){if(A=A||{},E=E.trim(),a=a.trim(),!a){if(!A.alwaysNormalize)return E;var h=t.parseURL(E);if(!h)throw new Error("Error trying to parse base URL.");return h.path=t.normalizePath(h.path),t.buildURLFromParts(h)}var s=t.parseURL(a);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return A.alwaysNormalize?(s.path=t.normalizePath(s.path),t.buildURLFromParts(s)):a;var o=t.parseURL(E);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&o.path[0]!=="/"){var f=_.exec(o.path);o.netLoc=f[1],o.path=f[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(u.netLoc=o.netLoc,s.path[0]!=="/"))if(!s.path)u.path=o.path,s.params||(u.params=o.params,s.query||(u.query=o.query));else{var c=o.path,i=c.substring(0,c.lastIndexOf("/")+1)+s.path;u.path=t.normalizePath(i)}return u.path===null&&(u.path=A.alwaysNormalize?t.normalizePath(s.path):s.path),t.buildURLFromParts(u)},parseURL:function(E){var a=M.exec(E);return a?{scheme:a[1]||"",netLoc:a[2]||"",path:a[3]||"",params:a[4]||"",query:a[5]||"",fragment:a[6]||""}:null},normalizePath:function(E){for(E=E.split("").reverse().join("").replace(R,"");E.length!==(E=E.replace(b,"")).length;);return E.split("").reverse().join("")},buildURLFromParts:function(E){return E.scheme+E.netLoc+E.path+E.params+E.query+E.fragment}};Z.exports=t})(this)},"./node_modules/webworkify-webpack/index.js":function(Z,H,O){function Q(A){var h={};function s(f){if(h[f])return h[f].exports;var u=h[f]={i:f,l:!1,exports:{}};return A[f].call(u.exports,u,u.exports,s),u.l=!0,u.exports}s.m=A,s.c=h,s.i=function(f){return f},s.d=function(f,u,c){s.o(f,u)||Object.defineProperty(f,u,{configurable:!1,enumerable:!0,get:c})},s.r=function(f){Object.defineProperty(f,"__esModule",{value:!0})},s.n=function(f){var u=f&&f.__esModule?function(){return f.default}:function(){return f};return s.d(u,"a",u),u},s.o=function(f,u){return Object.prototype.hasOwnProperty.call(f,u)},s.p="/",s.oe=function(f){throw console.error(f),f};var o=s(s.s=ENTRY_MODULE);return o.default||o}var M="[\\.|\\-|\\+|\\w|/|@]+",_="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+M+").*?\\)";function R(A){return(A+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function b(A){return!isNaN(1*A)}function t(A,h,s){var o={};o[s]=[];var f=h.toString(),u=f.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!u)return o;for(var c=u[1],i=new RegExp("(\\\\n|\\W)"+R(c)+_,"g"),l;l=i.exec(f);){if(l[3]==="dll-reference")continue;o[s].push(l[3])}for(i=new RegExp("\\("+R(c)+'\\("(dll-reference\\s('+M+'))"\\)\\)'+_,"g");l=i.exec(f);)A[l[2]]||(o[s].push(l[1]),A[l[2]]=O(l[1]).m),o[l[2]]=o[l[2]]||[],o[l[2]].push(l[4]);for(var v=Object.keys(o),B=0;B<v.length;B++)for(var C=0;C<o[v[B]].length;C++)b(o[v[B]][C])&&(o[v[B]][C]=1*o[v[B]][C]);return o}function E(A){var h=Object.keys(A);return h.reduce(function(s,o){return s||A[o].length>0},!1)}function a(A,h){for(var s={main:[h]},o={main:[]},f={main:{}};E(s);)for(var u=Object.keys(s),c=0;c<u.length;c++){var i=u[c],l=s[i],v=l.pop();if(f[i]=f[i]||{},f[i][v]||!A[i][v])continue;f[i][v]=!0,o[i]=o[i]||[],o[i].push(v);for(var B=t(A,A[i][v],i),C=Object.keys(B),L=0;L<C.length;L++)s[C[L]]=s[C[L]]||[],s[C[L]]=s[C[L]].concat(B[C[L]])}return o}Z.exports=function(A,h){h=h||{};var s={main:O.m},o=h.all?{main:Object.keys(s.main)}:a(s,A),f="";Object.keys(o).filter(function(v){return v!=="main"}).forEach(function(v){for(var B=0;o[v][B];)B++;o[v].push(B),s[v][B]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",f=f+"var "+v+" = ("+Q.toString().replace("ENTRY_MODULE",JSON.stringify(B))+")({"+o[v].map(function(C){return""+JSON.stringify(C)+": "+s[v][C].toString()}).join(",")+`});
|
|
`}),f=f+"new (("+Q.toString().replace("ENTRY_MODULE",JSON.stringify(A))+")({"+o.main.map(function(v){return""+JSON.stringify(v)+": "+s.main[v].toString()}).join(",")+"}))(self);";var u=new window.Blob([f],{type:"text/javascript"});if(h.bare)return u;var c=window.URL||window.webkitURL||window.mozURL||window.msURL,i=c.createObjectURL(u),l=new window.Worker(i);return l.objectURL=i,l}},"./src/config.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"hlsDefaultConfig",function(){return L}),O.d(H,"mergeConfig",function(){return p}),O.d(H,"enableStreamingMode",function(){return n});var Q=O("./src/controller/abr-controller.ts"),M=O("./src/controller/audio-stream-controller.ts"),_=O("./src/controller/audio-track-controller.ts"),R=O("./src/controller/subtitle-stream-controller.ts"),b=O("./src/controller/subtitle-track-controller.ts"),t=O("./src/controller/buffer-controller.ts"),E=O("./src/controller/timeline-controller.ts"),a=O("./src/controller/cap-level-controller.ts"),A=O("./src/controller/fps-controller.ts"),h=O("./src/controller/eme-controller.ts"),s=O("./src/controller/cmcd-controller.ts"),o=O("./src/utils/xhr-loader.ts"),f=O("./src/utils/fetch-loader.ts"),u=O("./src/utils/cues.ts"),c=O("./src/utils/mediakeys-helper.ts"),i=O("./src/utils/logger.ts");function l(){return l=Object.assign||function(d){for(var m=1;m<arguments.length;m++){var T=arguments[m];for(var y in T)Object.prototype.hasOwnProperty.call(T,y)&&(d[y]=T[y])}return d},l.apply(this,arguments)}function v(d,m){var T=Object.keys(d);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(d);m&&(y=y.filter(function(g){return Object.getOwnPropertyDescriptor(d,g).enumerable})),T.push.apply(T,y)}return T}function B(d){for(var m=1;m<arguments.length;m++){var T=arguments[m]!=null?arguments[m]:{};m%2?v(Object(T),!0).forEach(function(y){C(d,y,T[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(T)):v(Object(T)).forEach(function(y){Object.defineProperty(d,y,Object.getOwnPropertyDescriptor(T,y))})}return d}function C(d,m,T){return m in d?Object.defineProperty(d,m,{value:T,enumerable:!0,configurable:!0,writable:!0}):d[m]=T,d}var L=B(B({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:o.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Q.default,bufferController:t.default,capLevelController:a.default,fpsController:A.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:c.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},w()),{},{subtitleStreamController:R.SubtitleStreamController,subtitleTrackController:b.default,timelineController:E.TimelineController,audioStreamController:M.default,audioTrackController:_.default,emeController:h.default,cmcdController:s.default});function w(){return{cueHandler:u.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 p(d,m){if((m.liveSyncDurationCount||m.liveMaxLatencyDurationCount)&&(m.liveSyncDuration||m.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(m.liveMaxLatencyDurationCount!==void 0&&(m.liveSyncDurationCount===void 0||m.liveMaxLatencyDurationCount<=m.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(m.liveMaxLatencyDuration!==void 0&&(m.liveSyncDuration===void 0||m.liveMaxLatencyDuration<=m.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return l({},d,m)}function n(d){var m=d.loader;if(m!==f.default&&m!==o.default)i.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),d.progressive=!1;else{var T=Object(f.fetchSupported)();T&&(d.loader=f.default,d.progressive=!0,d.enableSoftwareAES=!0,i.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/polyfills/number.ts"),M=O("./src/utils/ewma-bandwidth-estimator.ts"),_=O("./src/events.ts"),R=O("./src/utils/buffer-helper.ts"),b=O("./src/errors.ts"),t=O("./src/types/loader.ts"),E=O("./src/utils/logger.ts");function a(s,o){for(var f=0;f<o.length;f++){var u=o[f];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,u.key,u)}}function A(s,o,f){return o&&a(s.prototype,o),f&&a(s,f),s}var h=function(){function s(f){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=f;var u=f.config;this.bwEstimator=new M.default(u.abrEwmaSlowVoD,u.abrEwmaFastVoD,u.abrEwmaDefaultEstimate),this.registerListeners()}var o=s.prototype;return o.registerListeners=function(){var u=this.hls;u.on(_.Events.FRAG_LOADING,this.onFragLoading,this),u.on(_.Events.FRAG_LOADED,this.onFragLoaded,this),u.on(_.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.on(_.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var u=this.hls;u.off(_.Events.FRAG_LOADING,this.onFragLoading,this),u.off(_.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(_.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.off(_.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},o.onFragLoading=function(u,c){var i=c.frag;if(i.type===t.PlaylistLevelType.MAIN&&!this.timer){var l;this.fragCurrent=i,this.partCurrent=(l=c.part)!=null?l:null,this.timer=self.setInterval(this.onCheck,100)}},o.onLevelLoaded=function(u,c){var i=this.hls.config;c.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)},o._abandonRulesCheck=function(){var u=this.fragCurrent,c=this.partCurrent,i=this.hls,l=i.autoLevelEnabled,v=i.config,B=i.media;if(!u||!B)return;var C=c?c.stats:u.stats,L=c?c.duration:u.duration;if(C.aborted){E.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!l||B.paused||!B.playbackRate||!B.readyState)return;var w=performance.now()-C.loading.start,p=Math.abs(B.playbackRate);if(w<=500*L/p)return;var n=i.levels,d=i.minAutoLevel,m=n[u.level],T=C.total||Math.max(C.loaded,Math.round(L*m.maxBitrate/8)),y=Math.max(1,C.bwEstimate?C.bwEstimate/8:C.loaded*1e3/w),g=(T-C.loaded)/y,U=B.currentTime,P=(R.BufferHelper.bufferInfo(B,U,v.maxBufferHole).end-U)/p;if(P>=2*L/p||g<=P)return;var I=Number.POSITIVE_INFINITY,G;for(G=u.level-1;G>d;G--){var K=n[G].maxBitrate;if(I=L*K/(8*.8*y),I<P)break}if(I>=g)return;var D=this.bwEstimator.getEstimate();E.logger.warn("Fragment "+u.sn+(c?" part "+c.index:"")+" of level "+u.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+G+`
|
|
Current BW estimate: `+(Object(Q.isFiniteNumber)(D)?(D/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+g.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+I.toFixed(3)+` s
|
|
Time to underbuffer: `+P.toFixed(3)+" s"),i.nextLoadLevel=G,this.bwEstimator.sample(w,C.loaded),this.clearTimer(),u.loader&&(this.fragCurrent=this.partCurrent=null,u.loader.abort()),i.trigger(_.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:u,part:c,stats:C})},o.onFragLoaded=function(u,c){var i=c.frag,l=c.part;if(i.type===t.PlaylistLevelType.MAIN&&Object(Q.isFiniteNumber)(i.sn)){var v=l?l.stats:i.stats,B=l?l.duration:i.duration;if(this.clearTimer(),this.lastLoadedFragLevel=i.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var C=this.hls.levels[i.level],L=(C.loaded?C.loaded.bytes:0)+v.loaded,w=(C.loaded?C.loaded.duration:0)+B;C.loaded={bytes:L,duration:w},C.realBitrate=Math.round(8*L/w)}if(i.bitrateTest){var p={stats:v,frag:i,part:l,id:i.type};this.onFragBuffered(_.Events.FRAG_BUFFERED,p),i.bitrateTest=!1}}},o.onFragBuffered=function(u,c){var i=c.frag,l=c.part,v=l?l.stats:i.stats;if(v.aborted)return;if(i.type!==t.PlaylistLevelType.MAIN||i.sn==="initSegment")return;var B=v.parsing.end-v.loading.start;this.bwEstimator.sample(B,v.loaded),v.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=B/1e3:this.bitrateTestDelay=0},o.onError=function(u,c){switch(c.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var u=this.fragCurrent,c=this.partCurrent,i=this.hls,l=i.maxAutoLevel,v=i.config,B=i.minAutoLevel,C=i.media,L=c?c.duration:u?u.duration:0,w=C?C.currentTime:0,p=C&&C.playbackRate!==0?Math.abs(C.playbackRate):1,n=this.bwEstimator?this.bwEstimator.getEstimate():v.abrEwmaDefaultEstimate,d=(R.BufferHelper.bufferInfo(C,w,v.maxBufferHole).end-w)/p,m=this.findBestLevel(n,B,l,d,v.abrBandWidthFactor,v.abrBandWidthUpFactor);if(m>=0)return m;E.logger.trace((d?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var T=L?Math.min(L,v.maxStarvationDelay):v.maxStarvationDelay,y=v.abrBandWidthFactor,g=v.abrBandWidthUpFactor;if(!d){var U=this.bitrateTestDelay;if(U){var P=L?Math.min(L,v.maxLoadingDelay):v.maxLoadingDelay;T=P-U,E.logger.trace("bitrate test took "+Math.round(1e3*U)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*T)+" ms"),y=g=1}}return m=this.findBestLevel(n,B,l,d+T,y,g),Math.max(m,0)},o.findBestLevel=function(u,c,i,l,v,B){for(var C,L=this.fragCurrent,w=this.partCurrent,p=this.lastLoadedFragLevel,n=this.hls.levels,d=n[p],m=!!(d!=null&&(C=d.details)!==null&&C!==void 0&&C.live),T=d==null?void 0:d.codecSet,y=w?w.duration:L?L.duration:0,g=i;g>=c;g--){var U=n[g];if(!U||T&&U.codecSet!==T)continue;var P=U.details,I=(w?P==null?void 0:P.partTarget:P==null?void 0:P.averagetargetduration)||y,G=void 0;g<=p?G=v*u:G=B*u;var K=n[g].maxBitrate,D=K*I/G;if(E.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(G)+"/"+K+"/"+I+"/"+l+"/"+D),G>K&&(!D||m&&!this.bitrateTestDelay||D<l))return g}return-1},A(s,[{key:"nextAutoLevel",get:function(){var u=this._nextAutoLevel,c=this.bwEstimator;if(u!==-1&&(!c||!c.canEstimate()))return u;var i=this.getNextABRAutoLevel();return u!==-1&&(i=Math.min(u,i)),i},set:function(u){this._nextAutoLevel=u}}]),s}();H.default=h},"./src/controller/audio-stream-controller.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/polyfills/number.ts"),M=O("./src/controller/base-stream-controller.ts"),_=O("./src/events.ts"),R=O("./src/utils/buffer-helper.ts"),b=O("./src/controller/fragment-tracker.ts"),t=O("./src/types/level.ts"),E=O("./src/types/loader.ts"),a=O("./src/loader/fragment.ts"),A=O("./src/demux/chunk-cache.ts"),h=O("./src/demux/transmuxer-interface.ts"),s=O("./src/types/transmuxer.ts"),o=O("./src/controller/fragment-finders.ts"),f=O("./src/utils/discontinuities.ts"),u=O("./src/errors.ts"),c=O("./src/utils/logger.ts");function i(){return i=Object.assign||function(L){for(var w=1;w<arguments.length;w++){var p=arguments[w];for(var n in p)Object.prototype.hasOwnProperty.call(p,n)&&(L[n]=p[n])}return L},i.apply(this,arguments)}function l(L,w){L.prototype=Object.create(w.prototype),L.prototype.constructor=L,v(L,w)}function v(L,w){return v=Object.setPrototypeOf||function(n,d){return n.__proto__=d,n},v(L,w)}var B=100,C=function(L){l(w,L);function w(n,d){var m;return m=L.call(this,n,d,"[audio-stream-controller]")||this,m.videoBuffer=null,m.videoTrackCC=-1,m.waitingVideoCC=-1,m.audioSwitch=!1,m.trackId=-1,m.waitingData=null,m.mainDetails=null,m.bufferFlushed=!1,m._registerListeners(),m}var p=w.prototype;return p.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},p._registerListeners=function(){var d=this.hls;d.on(_.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.on(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.on(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(_.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),d.on(_.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.on(_.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.on(_.Events.ERROR,this.onError,this),d.on(_.Events.BUFFER_RESET,this.onBufferReset,this),d.on(_.Events.BUFFER_CREATED,this.onBufferCreated,this),d.on(_.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.on(_.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),d.on(_.Events.FRAG_BUFFERED,this.onFragBuffered,this)},p._unregisterListeners=function(){var d=this.hls;d.off(_.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.off(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(_.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),d.off(_.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.off(_.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.off(_.Events.ERROR,this.onError,this),d.off(_.Events.BUFFER_RESET,this.onBufferReset,this),d.off(_.Events.BUFFER_CREATED,this.onBufferCreated,this),d.off(_.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.off(_.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),d.off(_.Events.FRAG_BUFFERED,this.onFragBuffered,this)},p.onInitPtsFound=function(d,m){var T=m.frag,y=m.id,g=m.initPTS;if(y==="main"){var U=T.cc;this.initPTS[T.cc]=g,this.log("InitPTS for cc: "+U+" found from main: "+g),this.videoTrackCC=U,this.state===M.State.WAITING_INIT_PTS&&this.tick()}},p.startLoad=function(d){if(!this.levels){this.startPosition=d,this.state=M.State.STOPPED;return}var m=this.lastCurrentTime;this.stopLoad(),this.setInterval(B),this.fragLoadError=0,m>0&&d===-1?(this.log("Override startPosition with lastCurrentTime @"+m.toFixed(3)),this.state=M.State.IDLE):(this.loadedmetadata=!1,this.state=M.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=d,this.tick()},p.doTick=function(){switch(this.state){case M.State.IDLE:this.doTickIdle();break;case M.State.WAITING_TRACK:{var d,m=this.levels,T=this.trackId,y=m==null||((d=m[T])===null||d===void 0)?void 0:d.details;if(y){if(this.waitForCdnTuneIn(y))break;this.state=M.State.WAITING_INIT_PTS}break}case M.State.FRAG_LOADING_WAITING_RETRY:{var g,U=performance.now(),P=this.retryDate;(!P||U>=P||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=M.State.IDLE);break}case M.State.WAITING_INIT_PTS:{var I=this.waitingData;if(I){var G=I.frag,K=I.part,D=I.cache,J=I.complete;if(this.initPTS[G.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=M.State.FRAG_LOADING;var X=D.flush(),ne={frag:G,part:K,payload:X,networkDetails:null};this._handleFragmentLoadProgress(ne),J&&L.prototype._handleFragmentLoadComplete.call(this,ne)}else if(this.videoTrackCC!==this.waitingVideoCC)c.logger.log("Waiting fragment cc ("+G.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ue=this.getLoadPosition(),Oe=R.BufferHelper.bufferInfo(this.mediaBuffer,ue,this.config.maxBufferHole),_e=Object(o.fragmentWithinToleranceTest)(Oe.end,this.config.maxFragLookUpTolerance,G);_e<0&&(c.logger.log("Waiting fragment cc ("+G.cc+") @ "+G.start+" cancelled because another fragment at "+Oe.end+" is needed"),this.clearWaitingFragment())}}else this.state=M.State.IDLE}}this.onTickEnd()},p.clearWaitingFragment=function(){var d=this.waitingData;d&&(this.fragmentTracker.removeFragment(d.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=M.State.IDLE)},p.onTickEnd=function(){var d=this.media;if(!d||!d.readyState)return;var m=this.mediaBuffer?this.mediaBuffer:d,T=m.buffered;!this.loadedmetadata&&T.length&&(this.loadedmetadata=!0),this.lastCurrentTime=d.currentTime},p.doTickIdle=function(){var d,m,T=this.hls,y=this.levels,g=this.media,U=this.trackId,P=T.config;if(!y||!y[U])return;if(!g&&(this.startFragRequested||!P.startFragPrefetch))return;var I=y[U],G=I.details;if(!G||G.live&&this.levelLastLoaded!==U||this.waitForCdnTuneIn(G)){this.state=M.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,a.ElementaryStreamTypes.AUDIO,E.PlaylistLevelType.AUDIO));var K=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,E.PlaylistLevelType.AUDIO);if(K===null)return;var D=K.len,J=this.getMaxBufferLength(),X=this.audioSwitch;if(D>=J&&!X)return;if(!X&&this._streamEnded(K,G)){T.trigger(_.Events.BUFFER_EOS,{type:"audio"}),this.state=M.State.ENDED;return}var ne=G.fragments,ue=ne[0].start,Oe=K.end;if(X){var _e=this.getLoadPosition();Oe=_e,G.PTSKnown&&_e<ue&&((K.end>ue||K.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),g.currentTime=ue+.05))}var De=this.getNextFragment(Oe,G);if(!De){this.bufferFlushed=!0;return}((d=De.decryptdata)===null||d===void 0?void 0:d.keyFormat)==="identity"&&!((m=De.decryptdata)!==null&&m!==void 0&&m.key)?this.loadKey(De,G):this.loadFragment(De,G,Oe)},p.getMaxBufferLength=function(){var d=L.prototype.getMaxBufferLength.call(this),m=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,E.PlaylistLevelType.MAIN);return m===null?d:Math.max(d,m.len)},p.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},p.onAudioTracksUpdated=function(d,m){var T=m.audioTracks;this.resetTransmuxer(),this.levels=T.map(function(y){return new t.Level(y)})},p.onAudioTrackSwitching=function(d,m){var T=!!m.url;this.trackId=m.id;var y=this.fragCurrent;y!=null&&y.loader&&y.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),T?this.setInterval(B):this.resetTransmuxer(),T?(this.audioSwitch=!0,this.state=M.State.IDLE):this.state=M.State.STOPPED,this.tick()},p.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},p.onLevelLoaded=function(d,m){this.mainDetails=m.details},p.onAudioTrackLoaded=function(d,m){var T,y=this.levels,g=m.details,U=m.id;if(!y){this.warn("Audio tracks were reset while loading level "+U);return}this.log("Track "+U+" loaded ["+g.startSN+","+g.endSN+"],duration:"+g.totalduration);var P=y[U],I=0;if(g.live||(T=P.details)!==null&&T!==void 0&&T.live){var G=this.mainDetails;if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed||!G)return;!P.details&&g.hasProgramDateTime&&G.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(g,G),I=g.fragments[0].start):I=this.alignPlaylists(g,P.details)}P.details=g,this.levelLastLoaded=U,!this.startFragRequested&&(this.mainDetails||!g.live)&&this.setStartPosition(P.details,I),this.state===M.State.WAITING_TRACK&&!this.waitForCdnTuneIn(g)&&(this.state=M.State.IDLE),this.tick()},p._handleFragmentLoadProgress=function(d){var m,T=d.frag,y=d.part,g=d.payload,U=this.config,P=this.trackId,I=this.levels;if(!I){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var G=I[P];console.assert(G,"Audio track is defined on fragment load progress");var K=G.details;console.assert(K,"Audio track details are defined on fragment load progress");var D=U.defaultAudioCodec||G.audioCodec||"mp4a.40.2",J=this.transmuxer;J||(J=this.transmuxer=new h.default(this.hls,E.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var X=this.initPTS[T.cc],ne=(m=T.initSegment)===null||m===void 0?void 0:m.data;if(X!==void 0){var ue=!1,Oe=y?y.index:-1,_e=Oe!==-1,De=new s.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,g.byteLength,Oe,_e);J.push(g,ne,D,"",T,y,K.totalduration,ue,De,X)}else{c.logger.log("Unknown video PTS for cc "+T.cc+", waiting for video PTS before demuxing audio frag "+T.sn+" of ["+K.startSN+" ,"+K.endSN+"],track "+P);var Ue=this.waitingData=this.waitingData||{frag:T,part:y,cache:new A.default,complete:!1},Ke=Ue.cache;Ke.push(new Uint8Array(g)),this.waitingVideoCC=this.videoTrackCC,this.state=M.State.WAITING_INIT_PTS}},p._handleFragmentLoadComplete=function(d){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,d)},p.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},p.onBufferCreated=function(d,m){var T=m.tracks.audio;T&&(this.mediaBuffer=T.buffer),m.tracks.video&&(this.videoBuffer=m.tracks.video.buffer)},p.onFragBuffered=function(d,m){var T=m.frag,y=m.part;if(T.type!==E.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(y?" p: "+y.index:"")+" of level "+T.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}T.sn!=="initSegment"&&(this.fragPrevious=T,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(_.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(T,y)},p.onError=function(d,m){switch(m.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(E.PlaylistLevelType.AUDIO,m);break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==M.State.ERROR&&this.state!==M.State.STOPPED&&(this.state=m.fatal?M.State.ERROR:M.State.IDLE,this.warn(m.details+" while loading frag, switching to "+this.state+" state"));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(m.parent==="audio"&&(this.state===M.State.PARSING||this.state===M.State.PARSED)){var T=!0,y=this.getFwdBufferInfo(this.mediaBuffer,E.PlaylistLevelType.AUDIO);y&&y.len>.5&&(T=!this.reduceMaxBufferLength(y.len)),T&&(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}},p.onBufferFlushed=function(d,m){var T=m.type;T===a.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},p._handleTransmuxComplete=function(d){var m,T="audio",y=this.hls,g=d.remuxResult,U=d.chunkMeta,P=this.getCurrentContext(U);if(!P){this.warn("The loading context changed while buffering fragment "+U.sn+" of level "+U.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(U.level);return}var I=P.frag,G=P.part,K=g.audio,D=g.text,J=g.id3,X=g.initSegment;if(this.fragContextChanged(I))return;if(this.state=M.State.PARSING,this.audioSwitch&&K&&this.completeAudioSwitch(),X!=null&&X.tracks&&(this._bufferInitSegment(X.tracks,I,U),y.trigger(_.Events.FRAG_PARSING_INIT_SEGMENT,{frag:I,id:T,tracks:X.tracks})),K){var ne=K.startPTS,ue=K.endPTS,Oe=K.startDTS,_e=K.endDTS;G&&(G.elementaryStreams[a.ElementaryStreamTypes.AUDIO]={startPTS:ne,endPTS:ue,startDTS:Oe,endDTS:_e}),I.setElementaryStreamInfo(a.ElementaryStreamTypes.AUDIO,ne,ue,Oe,_e),this.bufferFragmentData(K,I,G,U)}if(J!=null&&(m=J.samples)!==null&&m!==void 0&&m.length){var De=i({frag:I,id:T},J);y.trigger(_.Events.FRAG_PARSING_METADATA,De)}if(D){var Ue=i({frag:I,id:T},D);y.trigger(_.Events.FRAG_PARSING_USERDATA,Ue)}},p._bufferInitSegment=function(d,m,T){if(this.state!==M.State.PARSING)return;d.video&&delete d.video;var y=d.audio;if(!y)return;y.levelCodec=y.codec,y.id="audio",this.log("Init audio buffer, container:"+y.container+", codecs[parsed]=["+y.codec+"]"),this.hls.trigger(_.Events.BUFFER_CODECS,d);var g=y.initSegment;if(g!=null&&g.byteLength){var U={type:"audio",frag:m,part:null,chunkMeta:T,parent:m.type,data:g};this.hls.trigger(_.Events.BUFFER_APPENDING,U)}this.tick()},p.loadFragment=function(d,m,T){var y=this.fragmentTracker.getState(d);this.fragCurrent=d,(this.audioSwitch||y===b.FragmentState.NOT_LOADED||y===b.FragmentState.PARTIAL)&&(d.sn==="initSegment"?this._loadInitSegment(d):m.live&&!Object(Q.isFiniteNumber)(this.initPTS[d.cc])?(this.log("Waiting for video PTS in continuity counter "+d.cc+" of live stream before loading audio fragment "+d.sn+" of level "+this.trackId),this.state=M.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,d,m,T)))},p.completeAudioSwitch=function(){var d=this.hls,m=this.media,T=this.trackId;m&&(this.log("Switching audio track : flushing all audio"),L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,d.trigger(_.Events.AUDIO_TRACK_SWITCHED,{id:T})},w}(M.default);H.default=C},"./src/controller/audio-track-controller.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/events.ts"),M=O("./src/errors.ts"),_=O("./src/controller/base-playlist-controller.ts"),R=O("./src/types/loader.ts");function b(h,s){for(var o=0;o<s.length;o++){var f=s[o];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(h,f.key,f)}}function t(h,s,o){return s&&b(h.prototype,s),o&&b(h,o),h}function E(h,s){h.prototype=Object.create(s.prototype),h.prototype.constructor=h,a(h,s)}function a(h,s){return a=Object.setPrototypeOf||function(f,u){return f.__proto__=u,f},a(h,s)}var A=function(h){E(s,h);function s(f){var u;return u=h.call(this,f,"[audio-track-controller]")||this,u.tracks=[],u.groupId=null,u.tracksInGroup=[],u.trackId=-1,u.trackName="",u.selectDefaultTrack=!0,u.registerListeners(),u}var o=s.prototype;return o.registerListeners=function(){var u=this.hls;u.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.on(Q.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.on(Q.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var u=this.hls;u.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.off(Q.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.off(Q.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,h.prototype.destroy.call(this)},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},o.onManifestParsed=function(u,c){this.tracks=c.audioTracks||[]},o.onAudioTrackLoaded=function(u,c){var i=c.id,l=c.details,v=this.tracksInGroup[i];if(!v){this.warn("Invalid audio track id "+i);return}var B=v.details;v.details=c.details,this.log("audioTrack "+i+" loaded ["+l.startSN+"-"+l.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,c,B))},o.onLevelLoading=function(u,c){this.switchLevel(c.level)},o.onLevelSwitching=function(u,c){this.switchLevel(c.level)},o.switchLevel=function(u){var c=this.hls.levels[u];if(!(c!=null&&c.audioGroupIds))return;var i=c.audioGroupIds[c.urlId];if(this.groupId!==i){this.groupId=i;var l=this.tracks.filter(function(B){return!i||B.groupId===i});this.selectDefaultTrack&&!l.some(function(B){return B.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=l;var v={audioTracks:l};this.log("Updating audio tracks, "+l.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(Q.Events.AUDIO_TRACKS_UPDATED,v),this.selectInitialTrack()}},o.onError=function(u,c){if(h.prototype.onError.call(this,u,c),c.fatal||!c.context)return;c.context.type===R.PlaylistContextType.AUDIO_TRACK&&c.context.id===this.trackId&&c.context.groupId===this.groupId&&this.retryLoadingOrFail(c)},o.setAudioTrack=function(u){var c=this.tracksInGroup;if(u<0||u>=c.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var i=c[this.trackId];this.log("Now switching to audio-track index "+u);var l=c[u],v=l.id,B=l.groupId,C=B===void 0?"":B,L=l.name,w=l.type,p=l.url;if(this.trackId=u,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(Q.Events.AUDIO_TRACK_SWITCHING,{id:v,groupId:C,name:L,type:w,url:p}),l.details&&!l.details.live)return;var n=this.switchParams(l.url,i==null?void 0:i.details);this.loadPlaylist(n)},o.selectInitialTrack=function(){var u=this.tracksInGroup;console.assert(u.length,"Initial audio track should be selected when tracks are known");var c=this.trackName,i=this.findTrackId(c)||this.findTrackId();i!==-1?this.setAudioTrack(i):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(u){for(var c=this.tracksInGroup,i=0;i<c.length;i++){var l=c[i];if((!this.selectDefaultTrack||l.default)&&(!u||u===l.name))return l.id}return-1},o.loadPlaylist=function(u){var c=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(c)){var i=c.id,l=c.groupId,v=c.url;if(u)try{v=u.addDirectives(v)}catch(B){this.warn("Could not construct new URL with HLS Delivery Directives: "+B)}this.log("loading audio-track playlist for id: "+i),this.clearTimer(),this.hls.trigger(Q.Events.AUDIO_TRACK_LOADING,{url:v,id:i,groupId:l,deliveryDirectives:u||null})}},t(s,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(u){this.selectDefaultTrack=!1,this.setAudioTrack(u)}}]),s}(_.default);H.default=A},"./src/controller/base-playlist-controller.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return t});var Q=O("./src/polyfills/number.ts"),M=O("./src/types/level.ts"),_=O("./src/controller/level-helper.ts"),R=O("./src/utils/logger.ts"),b=O("./src/errors.ts"),t=function(){function E(A,h){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=R.logger.log.bind(R.logger,h+":"),this.warn=R.logger.warn.bind(R.logger,h+":"),this.hls=A}var a=E.prototype;return a.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},a.onError=function(h,s){s.fatal&&s.type===b.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},a.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},a.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},a.stopLoad=function(){this.canLoad=!1,this.clearTimer()},a.switchParams=function(h,s){var o=s==null?void 0:s.renditionReports;if(o)for(var f=0;f<o.length;f++){var u=o[f],c=""+u.URI;if(c===h.substr(-c.length)){var i=parseInt(u["LAST-MSN"]),l=parseInt(u["LAST-PART"]);if(s&&this.hls.config.lowLatencyMode){var v=Math.min(s.age-s.partTarget,s.targetduration);l!==void 0&&v>s.partTarget&&(l+=1)}if(Object(Q.isFiniteNumber)(i))return new M.HlsUrlParameters(i,Object(Q.isFiniteNumber)(l)?l:void 0,M.HlsSkip.No)}}},a.loadPlaylist=function(h){},a.shouldLoadTrack=function(h){return this.canLoad&&h&&!!h.url&&(!h.details||h.details.live)},a.playlistLoaded=function(h,s,o){var f=this,u=s.details,c=s.stats,i=c.loading.end?Math.max(0,self.performance.now()-c.loading.end):0;if(u.advancedDateTime=Date.now()-i,u.live||o!=null&&o.live){if(u.reloaded(o),o&&this.log("live playlist "+h+" "+(u.advanced?"REFRESHED "+u.lastPartSn+"-"+u.lastPartIndex:"MISSED")),o&&u.fragments.length>0&&Object(_.mergeDetails)(o,u),!this.canLoad||!u.live)return;var l,v=void 0,B=void 0;if(u.canBlockReload&&u.endSN&&u.advanced){var C=this.hls.config.lowLatencyMode,L=u.lastPartSn,w=u.endSN,p=u.lastPartIndex,n=p!==-1,d=L===w,m=C?0:p;n?(v=d?w+1:L,B=d?m:p+1):v=w+1;var T=u.age,y=T+u.ageHeader,g=Math.min(y-u.partTarget,u.targetduration*1.5);if(g>0){if(o&&g>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+g+" with playlist age: "+u.age),g=0;else{var U=Math.floor(g/u.targetduration);if(v+=U,B!==void 0){var P=Math.round(g%u.targetduration/u.partTarget);B+=P}this.log("CDN Tune-in age: "+u.ageHeader+"s last advanced "+T.toFixed(2)+"s goal: "+g+" skip sn "+U+" to part "+B)}u.tuneInGoal=g}if(l=this.getDeliveryDirectives(u,s.deliveryDirectives,v,B),C||!d){this.loadPlaylist(l);return}}else l=this.getDeliveryDirectives(u,s.deliveryDirectives,v,B);var I=Object(_.computeReloadInterval)(u,c);v!==void 0&&u.canBlockReload&&(I-=u.partTarget||1),this.log("reload live playlist "+h+" in "+Math.round(I)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(l)},I)}else this.clearTimer()},a.getDeliveryDirectives=function(h,s,o,f){var u=Object(M.getSkipValue)(h,o);return s!=null&&s.skip&&h.deltaUpdateFailed&&(o=s.msn,f=s.part,u=M.HlsSkip.No),new M.HlsUrlParameters(o,f,u)},a.retryLoadingOrFail=function(h){var s=this,o=this.hls.config,f=this.retryCount<o.levelLoadingMaxRetry;if(f){var u;if(this.retryCount++,h.details.indexOf("LoadTimeOut")>-1&&(u=h.context)!==null&&u!==void 0&&u.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+h.details+'"'),this.loadPlaylist();else{var c=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return s.loadPlaylist()},c),this.warn("retry playlist loading #"+this.retryCount+" in "+c+' ms after "'+h.details+'"')}}else this.warn('cannot recover from error "'+h.details+'"'),this.clearTimer(),h.fatal=!0;return f},E}()},"./src/controller/base-stream-controller.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"State",function(){return w}),O.d(H,"default",function(){return p});var Q=O("./src/polyfills/number.ts"),M=O("./src/task-loop.ts"),_=O("./src/controller/fragment-tracker.ts"),R=O("./src/utils/buffer-helper.ts"),b=O("./src/utils/logger.ts"),t=O("./src/events.ts"),E=O("./src/errors.ts"),a=O("./src/types/transmuxer.ts"),A=O("./src/utils/mp4-tools.ts"),h=O("./src/utils/discontinuities.ts"),s=O("./src/controller/fragment-finders.ts"),o=O("./src/controller/level-helper.ts"),f=O("./src/loader/fragment-loader.ts"),u=O("./src/crypt/decrypter.ts"),c=O("./src/utils/time-ranges.ts"),i=O("./src/types/loader.ts");function l(n,d){for(var m=0;m<d.length;m++){var T=d[m];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(n,T.key,T)}}function v(n,d,m){return d&&l(n.prototype,d),m&&l(n,m),n}function B(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function C(n,d){n.prototype=Object.create(d.prototype),n.prototype.constructor=n,L(n,d)}function L(n,d){return L=Object.setPrototypeOf||function(T,y){return T.__proto__=y,T},L(n,d)}var w={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},p=function(n){C(d,n);function d(T,y,g){var U;return U=n.call(this)||this,U.hls=void 0,U.fragPrevious=null,U.fragCurrent=null,U.fragmentTracker=void 0,U.transmuxer=null,U._state=w.STOPPED,U.media=void 0,U.mediaBuffer=void 0,U.config=void 0,U.bitrateTest=!1,U.lastCurrentTime=0,U.nextLoadPosition=0,U.startPosition=0,U.loadedmetadata=!1,U.fragLoadError=0,U.retryDate=0,U.levels=null,U.fragmentLoader=void 0,U.levelLastLoaded=null,U.startFragRequested=!1,U.decrypter=void 0,U.initPTS=[],U.onvseeking=null,U.onvended=null,U.logPrefix="",U.log=void 0,U.warn=void 0,U.logPrefix=g,U.log=b.logger.log.bind(b.logger,g+":"),U.warn=b.logger.warn.bind(b.logger,g+":"),U.hls=T,U.fragmentLoader=new f.default(T.config),U.fragmentTracker=y,U.config=T.config,U.decrypter=new u.default(T,T.config),T.on(t.Events.KEY_LOADED,U.onKeyLoaded,B(U)),U}var m=d.prototype;return m.doTick=function(){this.onTickEnd()},m.onTickEnd=function(){},m.startLoad=function(y){},m.stopLoad=function(){this.fragmentLoader.abort();var y=this.fragCurrent;y&&this.fragmentTracker.removeFragment(y),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=w.STOPPED},m._streamEnded=function(y,g){var U=this.fragCurrent,P=this.fragmentTracker;if(!g.live&&U&&U.sn===g.endSN&&!y.nextStart){var I=P.getState(U);return I===_.FragmentState.PARTIAL||I===_.FragmentState.OK}return!1},m.onMediaAttached=function(y,g){var U=this.media=this.mediaBuffer=g.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),U.addEventListener("seeking",this.onvseeking),U.addEventListener("ended",this.onvended);var P=this.config;this.levels&&P.autoStartLoad&&this.state===w.STOPPED&&this.startLoad(P.startPosition)},m.onMediaDetaching=function(){var y=this.media;y!=null&&y.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),y&&(y.removeEventListener("seeking",this.onvseeking),y.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},m.onMediaSeeking=function(){var y=this.config,g=this.fragCurrent,U=this.media,P=this.mediaBuffer,I=this.state,G=U?U.currentTime:0,K=R.BufferHelper.bufferInfo(P||U,G,y.maxBufferHole);if(this.log("media seeking to "+(Object(Q.isFiniteNumber)(G)?G.toFixed(3):G)+", state: "+I),I===w.ENDED)this.resetLoadingState();else if(g&&!K.len){var D=y.maxFragLookUpTolerance,J=g.start-D,X=g.start+g.duration+D,ne=G>X;(G<J||ne)&&(ne&&g.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),g.loader.abort()),this.resetLoadingState())}U&&(this.lastCurrentTime=G),!this.loadedmetadata&&!K.len&&(this.nextLoadPosition=this.startPosition=G),this.tickImmediate()},m.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},m.onKeyLoaded=function(y,g){if(this.state!==w.KEY_LOADING||g.frag!==this.fragCurrent||!this.levels)return;this.state=w.IDLE;var U=this.levels[g.frag.level].details;U&&this.loadFragment(g.frag,U,g.frag.start)},m.onHandlerDestroying=function(){this.stopLoad(),n.prototype.onHandlerDestroying.call(this)},m.onHandlerDestroyed=function(){this.state=w.STOPPED,this.hls.off(t.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,n.prototype.onHandlerDestroyed.call(this)},m.loadKey=function(y,g){this.log("Loading key for "+y.sn+" of ["+g.startSN+"-"+g.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+y.level),this.state=w.KEY_LOADING,this.fragCurrent=y,this.hls.trigger(t.Events.KEY_LOADING,{frag:y})},m.loadFragment=function(y,g,U){this._loadFragForPlayback(y,g,U)},m._loadFragForPlayback=function(y,g,U){var P=this,I=function(K){if(P.fragContextChanged(y)){P.warn("Fragment "+y.sn+(K.part?" p: "+K.part.index:"")+" of level "+y.level+" was dropped during download."),P.fragmentTracker.removeFragment(y);return}y.stats.chunkCount++,P._handleFragmentLoadProgress(K)};this._doFragLoad(y,g,U,I).then(function(G){if(!G)return;P.fragLoadError=0;var K=P.state;if(P.fragContextChanged(y)){(K===w.FRAG_LOADING||K===w.BACKTRACKING||!P.fragCurrent&&K===w.PARSING)&&(P.fragmentTracker.removeFragment(y),P.state=w.IDLE);return}if("payload"in G&&(P.log("Loaded fragment "+y.sn+" of level "+y.level),P.hls.trigger(t.Events.FRAG_LOADED,G),P.state===w.BACKTRACKING)){P.fragmentTracker.backtrack(y,G),P.resetFragmentLoading(y);return}P._handleFragmentLoadComplete(G)}).catch(function(G){P.warn(G),P.resetFragmentLoading(y)})},m.flushMainBuffer=function(y,g,U){if(U===void 0&&(U=null),!(y-g))return;var P={startOffset:y,endOffset:g,type:U};this.fragLoadError=0,this.hls.trigger(t.Events.BUFFER_FLUSHING,P)},m._loadInitSegment=function(y){var g=this;this._doFragLoad(y).then(function(U){if(!U||g.fragContextChanged(y)||!g.levels)throw new Error("init load aborted");return U}).then(function(U){var P=g.hls,I=U.payload,G=y.decryptdata;if(I&&I.byteLength>0&&G&&G.key&&G.iv&&G.method==="AES-128"){var K=self.performance.now();return g.decrypter.webCryptoDecrypt(new Uint8Array(I),G.key.buffer,G.iv.buffer).then(function(D){var J=self.performance.now();return P.trigger(t.Events.FRAG_DECRYPTED,{frag:y,payload:D,stats:{tstart:K,tdecrypt:J}}),U.payload=D,U})}return U}).then(function(U){var P=g.fragCurrent,I=g.hls,G=g.levels;if(!G)throw new Error("init load aborted, missing levels");var K=G[y.level].details;console.assert(K,"Level details are defined when init segment is loaded");var D=y.stats;g.state=w.IDLE,g.fragLoadError=0,y.data=new Uint8Array(U.payload),D.parsing.start=D.buffering.start=self.performance.now(),D.parsing.end=D.buffering.end=self.performance.now(),U.frag===P&&I.trigger(t.Events.FRAG_BUFFERED,{stats:D,frag:P,part:null,id:y.type}),g.tick()}).catch(function(U){g.warn(U),g.resetFragmentLoading(y)})},m.fragContextChanged=function(y){var g=this.fragCurrent;return!y||!g||y.level!==g.level||y.sn!==g.sn||y.urlId!==g.urlId},m.fragBufferedComplete=function(y,g){var U=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+y.type+" sn: "+y.sn+(g?" part: "+g.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+y.level+" "+c.default.toString(R.BufferHelper.getBuffered(U))),this.state=w.IDLE,this.tick()},m._handleFragmentLoadComplete=function(y){var g=this.transmuxer;if(!g)return;var U=y.frag,P=y.part,I=y.partsLoaded,G=!I||I.length===0||I.some(function(D){return!D}),K=new a.ChunkMetadata(U.level,U.sn,U.stats.chunkCount+1,0,P?P.index:-1,!G);g.flush(K)},m._handleFragmentLoadProgress=function(y){},m._doFragLoad=function(y,g,U,P){var I=this;if(U===void 0&&(U=null),!this.levels)throw new Error("frag load aborted, missing levels");if(U=Math.max(y.start,U||0),this.config.lowLatencyMode&&g){var G=g.partList;if(G&&P){U>y.end&&g.fragmentHint&&(y=g.fragmentHint);var K=this.getNextPart(G,y,U);if(K>-1){var D=G[K];return this.log("Loading part sn: "+y.sn+" p: "+D.index+" cc: "+y.cc+" of playlist ["+g.startSN+"-"+g.endSN+"] parts [0-"+K+"-"+(G.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(U.toFixed(3))),this.nextLoadPosition=D.start+D.duration,this.state=w.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:y,part:G[K],targetBufferTime:U}),this.doFragPartsLoad(y,G,K,P).catch(function(J){return I.handleFragLoadError(J)})}else if(!y.url||this.loadedEndOfParts(G,U))return Promise.resolve(null)}}return this.log("Loading fragment "+y.sn+" cc: "+y.cc+" "+(g?"of ["+g.startSN+"-"+g.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+y.level+", target: "+parseFloat(U.toFixed(3))),Object(Q.isFiniteNumber)(y.sn)&&!this.bitrateTest&&(this.nextLoadPosition=y.start+y.duration),this.state=w.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:y,targetBufferTime:U}),this.fragmentLoader.load(y,P).catch(function(J){return I.handleFragLoadError(J)})},m.doFragPartsLoad=function(y,g,U,P){var I=this;return new Promise(function(G,K){var D=[],J=function X(ne){var ue=g[ne];I.fragmentLoader.loadPart(y,ue,P).then(function(Oe){D[ue.index]=Oe;var _e=Oe.part;I.hls.trigger(t.Events.FRAG_LOADED,Oe);var De=g[ne+1];if(De&&De.fragment===y)X(ne+1);else return G({frag:y,part:_e,partsLoaded:D})}).catch(K)};J(U)})},m.handleFragLoadError=function(y){var g=y.data;return g&&g.details===E.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(g.frag,g.part):this.hls.trigger(t.Events.ERROR,g),null},m._handleTransmuxerFlush=function(y){var g=this.getCurrentContext(y);if(!g||this.state!==w.PARSING){this.fragCurrent||(this.state=w.IDLE);return}var U=g.frag,P=g.part,I=g.level,G=self.performance.now();U.stats.parsing.end=G,P&&(P.stats.parsing.end=G),this.updateLevelTiming(U,P,I,y.partial)},m.getCurrentContext=function(y){var g=this.levels,U=y.level,P=y.sn,I=y.part;if(!g||!g[U])return this.warn("Levels object was unset while buffering fragment "+P+" of level "+U+". The current chunk will not be buffered."),null;var G=g[U],K=I>-1?Object(o.getPartWith)(G,P,I):null,D=K?K.fragment:Object(o.getFragmentWithSN)(G,P,this.fragCurrent);return D?{frag:D,part:K,level:G}:null},m.bufferFragmentData=function(y,g,U,P){if(!y||this.state!==w.PARSING)return;var I=y.data1,G=y.data2,K=I;if(I&&G&&(K=Object(A.appendUint8Array)(I,G)),!K||!K.length)return;var D={type:y.type,frag:g,part:U,chunkMeta:P,parent:g.type,data:K};this.hls.trigger(t.Events.BUFFER_APPENDING,D),y.dropped&&y.independent&&!U&&this.flushBufferGap(g)},m.flushBufferGap=function(y){var g=this.media;if(!g)return;if(!R.BufferHelper.isBuffered(g,g.currentTime)){this.flushMainBuffer(0,y.start);return}var U=g.currentTime,P=R.BufferHelper.bufferInfo(g,U,0),I=y.duration,G=Math.min(this.config.maxFragLookUpTolerance*2,I*.25),K=Math.max(Math.min(y.start-G,P.end-G),U+G);y.start-K>G&&this.flushMainBuffer(K,y.start)},m.getFwdBufferInfo=function(y,g){var U=this.config,P=this.getLoadPosition();if(!Object(Q.isFiniteNumber)(P))return null;var I=R.BufferHelper.bufferInfo(y,P,U.maxBufferHole);if(I.len===0&&I.nextStart!==void 0){var G=this.fragmentTracker.getBufferedFrag(P,g);if(G&&I.nextStart<G.end)return R.BufferHelper.bufferInfo(y,P,Math.max(I.nextStart,U.maxBufferHole))}return I},m.getMaxBufferLength=function(y){var g=this.config,U;return y?U=Math.max(8*g.maxBufferSize/y,g.maxBufferLength):U=g.maxBufferLength,Math.min(U,g.maxMaxBufferLength)},m.reduceMaxBufferLength=function(y){var g=this.config,U=y||g.maxBufferLength;return g.maxMaxBufferLength>=U?(g.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+g.maxMaxBufferLength+"s"),!0):!1},m.getNextFragment=function(y,g){var U,P,I=g.fragments,G=I.length;if(!G)return null;var K=this.config,D=I[0].start,J;if(g.live){var X=K.initialLiveManifestSize;if(G<X)return this.warn("Not enough fragments to start playback (have: "+G+", need: "+X+")"),null;!g.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(J=this.getInitialLiveFragment(g,I),this.startPosition=J?this.hls.liveSyncPosition||J.start:y)}else y<=D&&(J=I[0]);if(!J){var ne=K.lowLatencyMode?g.partEnd:g.fragmentEnd;J=this.getFragmentAtPosition(y,ne,g)}return(U=J)!==null&&U!==void 0&&U.initSegment&&!((P=J)!==null&&P!==void 0&&P.initSegment.data)&&!this.bitrateTest&&(J=J.initSegment),J},m.getNextPart=function(y,g,U){for(var P=-1,I=!1,G=!0,K=0,D=y.length;K<D;K++){var J=y[K];if(G=G&&!J.independent,P>-1&&U<J.start)break;var X=J.loaded;!X&&(I||J.independent||G)&&J.fragment===g&&(P=K),I=X}return P},m.loadedEndOfParts=function(y,g){var U=y[y.length-1];return U&&g>U.start&&U.loaded},m.getInitialLiveFragment=function(y,g){var U=this.fragPrevious,P=null;if(U){if(y.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+U.programDateTime),P=Object(s.findFragmentByPDT)(g,U.endProgramDateTime,this.config.maxFragLookUpTolerance)),!P){var I=U.sn+1;if(I>=y.startSN&&I<=y.endSN){var G=g[I-y.startSN];U.cc===G.cc&&(P=G,this.log("Live playlist, switching playlist, load frag with next SN: "+P.sn))}P||(P=Object(s.findFragWithCC)(g,U.cc),P&&this.log("Live playlist, switching playlist, load frag with same CC: "+P.sn))}}else{var K=this.hls.liveSyncPosition;K!==null&&(P=this.getFragmentAtPosition(K,this.bitrateTest?y.fragmentEnd:y.edge,y))}return P},m.getFragmentAtPosition=function(y,g,U){var P=this.config,I=this.fragPrevious,G=U.fragments,K=U.endSN,D=U.fragmentHint,J=P.maxFragLookUpTolerance,X=!!(P.lowLatencyMode&&U.partList&&D);X&&D&&!this.bitrateTest&&(G=G.concat(D),K=D.sn);var ne;if(y<g){var ue=y>g-J?0:J;ne=Object(s.findFragmentByPTS)(I,G,y,ue)}else ne=G[G.length-1];if(ne){var Oe=ne.sn-U.startSN,_e=I&&ne.level===I.level,De=G[Oe+1],Ue=this.fragmentTracker.getState(ne);if(Ue===_.FragmentState.BACKTRACKED){ne=null;for(var Ke=Oe;G[Ke]&&this.fragmentTracker.getState(G[Ke])===_.FragmentState.BACKTRACKED;)I?ne=G[Ke--]:ne=G[--Ke];ne||(ne=De)}else I&&ne.sn===I.sn&&!X&&(_e&&(ne.sn<K&&this.fragmentTracker.getState(De)!==_.FragmentState.OK?(this.log("SN "+ne.sn+" just loaded, load next one: "+De.sn),ne=De):ne=null))}return ne},m.synchronizeToLiveEdge=function(y){var g=this.config,U=this.media;if(!U)return;var P=this.hls.liveSyncPosition,I=U.currentTime,G=y.fragments[0].start,K=y.edge,D=I>=G-g.maxFragLookUpTolerance&&I<=K;if(P!==null&&U.duration>P&&(I<P||!D)){var J=g.liveMaxLatencyDuration!==void 0?g.liveMaxLatencyDuration:g.liveMaxLatencyDurationCount*y.targetduration;(!D&&U.readyState<4||I<K-J)&&(this.loadedmetadata||(this.nextLoadPosition=P),U.readyState&&(this.warn("Playback: "+I.toFixed(3)+" is located too far from the end of live sliding playlist: "+K+", reset currentTime to : "+P.toFixed(3)),U.currentTime=P))}},m.alignPlaylists=function(y,g){var U=this.levels,P=this.levelLastLoaded,I=this.fragPrevious,G=P!==null?U[P]:null,K=y.fragments.length;if(!K)return this.warn("No fragments in live playlist"),0;var D=y.fragments[0].start,J=!g,X=y.alignedSliding&&Object(Q.isFiniteNumber)(D);if(J||!X&&!D){Object(h.alignStream)(I,G,y);var ne=y.fragments[0].start;return this.log("Live playlist sliding: "+ne.toFixed(2)+" start-sn: "+(g?g.startSN:"na")+"->"+y.startSN+" prev-sn: "+(I?I.sn:"na")+" fragments: "+K),ne}return D},m.waitForCdnTuneIn=function(y){var g=3;return y.live&&y.canBlockReload&&y.tuneInGoal>Math.max(y.partHoldBack,y.partTarget*g)},m.setStartPosition=function(y,g){var U=this.startPosition;if(U<g&&(U=-1),U===-1||this.lastCurrentTime===-1){var P=y.startTimeOffset;Object(Q.isFiniteNumber)(P)?(U=g+P,P<0&&(U+=y.totalduration),U=Math.min(Math.max(g,U),g+y.totalduration),this.log("Start time offset "+P+" found in playlist, adjust startPosition to "+U),this.startPosition=U):y.live?U=this.hls.liveSyncPosition||g:this.startPosition=U=0,this.lastCurrentTime=U}this.nextLoadPosition=U},m.getLoadPosition=function(){var y=this.media,g=0;return this.loadedmetadata&&y?g=y.currentTime:this.nextLoadPosition&&(g=this.nextLoadPosition),g},m.handleFragLoadAborted=function(y,g){this.transmuxer&&y.sn!=="initSegment"&&y.stats.aborted&&(this.warn("Fragment "+y.sn+(g?" part"+g.index:"")+" of level "+y.level+" was aborted"),this.resetFragmentLoading(y))},m.resetFragmentLoading=function(y){(!this.fragCurrent||!this.fragContextChanged(y))&&(this.state=w.IDLE)},m.onFragmentOrKeyLoadError=function(y,g){if(g.fatal)return;var U=g.frag;if(!U||U.type!==y)return;var P=this.fragCurrent;console.assert(P&&U.sn===P.sn&&U.level===P.level&&U.urlId===P.urlId,"Frag load error must match current frag to retry");var I=this.config;if(this.fragLoadError+1<=I.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(U.level))return;var G=Math.min(Math.pow(2,this.fragLoadError)*I.fragLoadingRetryDelay,I.fragLoadingMaxRetryTimeout);this.warn("Fragment "+U.sn+" of "+y+" "+U.level+" failed to load, retrying in "+G+"ms"),this.retryDate=self.performance.now()+G,this.fragLoadError++,this.state=w.FRAG_LOADING_WAITING_RETRY}else g.levelRetry?(y===i.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=w.IDLE):(b.logger.error(g.details+" reaches max retry, redispatch as fatal ..."),g.fatal=!0,this.hls.stopLoad(),this.state=w.ERROR)},m.afterBufferFlushed=function(y,g,U){if(!y)return;var P=R.BufferHelper.getBuffered(y);this.fragmentTracker.detectEvictedFragments(g,P,U),this.state===w.ENDED&&this.resetLoadingState()},m.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=w.IDLE},m.resetLiveStartWhenNotLoaded=function(y){if(!this.loadedmetadata){this.startFragRequested=!1;var g=this.levels?this.levels[y].details:null;if(g!=null&&g.live)return this.startPosition=-1,this.setStartPosition(g,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},m.updateLevelTiming=function(y,g,U,P){var I=this,G=U.details;console.assert(!!G,"level.details must be defined");var K=Object.keys(y.elementaryStreams).reduce(function(D,J){var X=y.elementaryStreams[J];if(X){var ne=X.endPTS-X.startPTS;if(ne<=0)return I.warn("Could not parse fragment "+y.sn+" "+J+" duration reliably ("+ne+") resetting transmuxer to fallback to playlist timing"),I.resetTransmuxer(),D||!1;var ue=P?0:Object(o.updateFragPTSDTS)(G,y,X.startPTS,X.endPTS,X.startDTS,X.endDTS);return I.hls.trigger(t.Events.LEVEL_PTS_UPDATED,{details:G,level:U,drift:ue,type:J,frag:y,start:X.startPTS,end:X.endPTS}),!0}return D},!1);K?(this.state=w.PARSED,this.hls.trigger(t.Events.FRAG_PARSED,{frag:y,part:g})):this.resetLoadingState()},m.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},v(d,[{key:"state",get:function(){return this._state},set:function(y){var g=this._state;g!==y&&(this._state=y,this.log(g+"->"+y))}}]),d}(M.default)},"./src/controller/buffer-controller.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return s});var Q=O("./src/polyfills/number.ts"),M=O("./src/events.ts"),_=O("./src/utils/logger.ts"),R=O("./src/errors.ts"),b=O("./src/utils/buffer-helper.ts"),t=O("./src/utils/mediasource-helper.ts"),E=O("./src/loader/fragment.ts"),a=O("./src/controller/buffer-operation-queue.ts"),A=Object(t.getMediaSource)(),h=/([ha]vc.)(?:\.[^.,]+)+/,s=function(){function o(u){var c=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 i=c.hls,l=c.media,v=c.mediaSource;_.logger.log("[buffer-controller]: Media source opened"),l&&(c.updateMediaElementDuration(),i.trigger(M.Events.MEDIA_ATTACHED,{media:l})),v&&v.removeEventListener("sourceopen",c._onMediaSourceOpen),c.checkPendingTracks()},this._onMediaSourceClose=function(){_.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){_.logger.log("[buffer-controller]: Media source ended")},this.hls=u,this._initSourceBuffer(),this.registerListeners()}var f=o.prototype;return f.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},f.destroy=function(){this.unregisterListeners(),this.details=null},f.registerListeners=function(){var c=this.hls;c.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),c.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(M.Events.BUFFER_RESET,this.onBufferReset,this),c.on(M.Events.BUFFER_APPENDING,this.onBufferAppending,this),c.on(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),c.on(M.Events.BUFFER_EOS,this.onBufferEos,this),c.on(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),c.on(M.Events.LEVEL_UPDATED,this.onLevelUpdated,this),c.on(M.Events.FRAG_PARSED,this.onFragParsed,this),c.on(M.Events.FRAG_CHANGED,this.onFragChanged,this)},f.unregisterListeners=function(){var c=this.hls;c.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),c.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(M.Events.BUFFER_RESET,this.onBufferReset,this),c.off(M.Events.BUFFER_APPENDING,this.onBufferAppending,this),c.off(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),c.off(M.Events.BUFFER_EOS,this.onBufferEos,this),c.off(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),c.off(M.Events.LEVEL_UPDATED,this.onLevelUpdated,this),c.off(M.Events.FRAG_PARSED,this.onFragParsed,this),c.off(M.Events.FRAG_CHANGED,this.onFragChanged,this)},f._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new a.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},f.onManifestParsed=function(c,i){var l=2;(i.audio&&!i.video||!i.altAudio)&&(l=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=l,this.details=null,_.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(c,i){var l=this.media=i.media;if(l&&A){var v=this.mediaSource=new A;v.addEventListener("sourceopen",this._onMediaSourceOpen),v.addEventListener("sourceended",this._onMediaSourceEnded),v.addEventListener("sourceclose",this._onMediaSourceClose),l.src=self.URL.createObjectURL(v),this._objectUrl=l.src}},f.onMediaDetaching=function(){var c=this.media,i=this.mediaSource,l=this._objectUrl;if(i){if(_.logger.log("[buffer-controller]: media source detaching"),i.readyState==="open")try{i.endOfStream()}catch(v){_.logger.warn("[buffer-controller]: onMediaDetaching: "+v.message+" while calling endOfStream")}this.onBufferReset(),i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),c&&(l&&self.URL.revokeObjectURL(l),c.src===l?(c.removeAttribute("src"),c.load()):_.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(M.Events.MEDIA_DETACHED,void 0)},f.onBufferReset=function(){var c=this;this.getSourceBufferTypes().forEach(function(i){var l=c.sourceBuffer[i];try{l&&(c.removeBufferListeners(i),c.mediaSource&&c.mediaSource.removeSourceBuffer(l),c.sourceBuffer[i]=void 0)}catch(v){_.logger.warn("[buffer-controller]: Failed to reset the "+i+" buffer",v)}}),this._initSourceBuffer()},f.onBufferCodecs=function(c,i){var l=this,v=this.getSourceBufferTypes().length;if(Object.keys(i).forEach(function(B){if(v){var C=l.tracks[B];if(C&&typeof C.buffer.changeType=="function"){var L=i[B],w=L.codec,p=L.levelCodec,n=L.container,d=(C.levelCodec||C.codec).replace(h,"$1"),m=(p||w).replace(h,"$1");if(d!==m){var T=n+";codecs="+(p||w);l.appendChangeType(B,T)}}}else l.pendingTracks[B]=i[B]}),v)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(c,i){var l=this,v=this.operationQueue,B={execute:function(){var L=l.sourceBuffer[c];L&&(_.logger.log("[buffer-controller]: changing "+c+" sourceBuffer type to "+i),L.changeType(i)),v.shiftAndExecuteNext(c)},onStart:function(){},onComplete:function(){},onError:function(L){_.logger.warn("[buffer-controller]: Failed to change "+c+" SourceBuffer type",L)}};v.append(B,c)},f.onBufferAppending=function(c,i){var l=this,v=this.hls,B=this.operationQueue,C=this.tracks,L=i.data,w=i.type,p=i.frag,n=i.part,d=i.chunkMeta,m=d.buffering[w],T=self.performance.now();m.start=T;var y=p.stats.buffering,g=n?n.stats.buffering:null;y.start===0&&(y.start=T),g&&g.start===0&&(g.start=T);var U=C.audio,P=w==="audio"&&d.id===1&&(U==null?void 0:U.container)==="audio/mpeg",I={execute:function(){if(m.executeStart=self.performance.now(),P){var K=l.sourceBuffer[w];if(K){var D=p.start-K.timestampOffset;Math.abs(D)>=.1&&(_.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+p.start+" (delta: "+D+") sn: "+p.sn+")"),K.timestampOffset=p.start)}}l.appendExecutor(L,w)},onStart:function(){},onComplete:function(){var K=self.performance.now();m.executeEnd=m.end=K,y.first===0&&(y.first=K),g&&g.first===0&&(g.first=K);var D=l.sourceBuffer,J={};for(var X in D)J[X]=b.BufferHelper.getBuffered(D[X]);l.appendError=0,l.hls.trigger(M.Events.BUFFER_APPENDED,{type:w,frag:p,part:n,chunkMeta:d,parent:p.type,timeRanges:J})},onError:function(K){_.logger.error("[buffer-controller]: Error encountered while trying to append to the "+w+" SourceBuffer",K);var D={type:R.ErrorTypes.MEDIA_ERROR,parent:p.type,details:R.ErrorDetails.BUFFER_APPEND_ERROR,err:K,fatal:!1};K.code===DOMException.QUOTA_EXCEEDED_ERR?D.details=R.ErrorDetails.BUFFER_FULL_ERROR:(l.appendError++,D.details=R.ErrorDetails.BUFFER_APPEND_ERROR,l.appendError>v.config.appendErrorMaxRetry&&(_.logger.error("[buffer-controller]: Failed "+v.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),D.fatal=!0)),v.trigger(M.Events.ERROR,D)}};B.append(I,w)},f.onBufferFlushing=function(c,i){var l=this,v=this.operationQueue,B=function(L){return{execute:l.removeExecutor.bind(l,L,i.startOffset,i.endOffset),onStart:function(){},onComplete:function(){l.hls.trigger(M.Events.BUFFER_FLUSHED,{type:L})},onError:function(p){_.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",p)}}};i.type?v.append(B(i.type),i.type):this.getSourceBufferTypes().forEach(function(C){v.append(B(C),C)})},f.onFragParsed=function(c,i){var l=this,v=i.frag,B=i.part,C=[],L=B?B.elementaryStreams:v.elementaryStreams;L[E.ElementaryStreamTypes.AUDIOVIDEO]?C.push("audiovideo"):(L[E.ElementaryStreamTypes.AUDIO]&&C.push("audio"),L[E.ElementaryStreamTypes.VIDEO]&&C.push("video"));var w=function(){var n=self.performance.now();v.stats.buffering.end=n,B&&(B.stats.buffering.end=n);var d=B?B.stats:v.stats;l.hls.trigger(M.Events.FRAG_BUFFERED,{frag:v,part:B,stats:d,id:v.type})};C.length===0&&_.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+v.type+" level: "+v.level+" sn: "+v.sn),this.blockBuffers(w,C)},f.onFragChanged=function(c,i){this.flushBackBuffer()},f.onBufferEos=function(c,i){var l=this,v=this.getSourceBufferTypes().reduce(function(B,C){var L=l.sourceBuffer[C];return(!i.type||i.type===C)&&(L&&!L.ended&&(L.ended=!0,_.logger.log("[buffer-controller]: "+C+" sourceBuffer now EOS"))),B&&!!(!L||L.ended)},!0);v&&this.blockBuffers(function(){var B=l.mediaSource;if(!B||B.readyState!=="open")return;B.endOfStream()})},f.onLevelUpdated=function(c,i){var l=i.details;if(!l.fragments.length)return;this.details=l,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var c=this.hls,i=this.details,l=this.media,v=this.sourceBuffer;if(!l||i===null)return;var B=this.getSourceBufferTypes();if(!B.length)return;var C=i.live&&c.config.liveBackBufferLength!==null?c.config.liveBackBufferLength:c.config.backBufferLength;if(!Object(Q.isFiniteNumber)(C)||C<0)return;var L=l.currentTime,w=i.levelTargetDuration,p=Math.max(C,w),n=Math.floor(L/w)*w-p;B.forEach(function(d){var m=v[d];if(m){var T=b.BufferHelper.getBuffered(m);T.length>0&&n>T.start(0)&&(c.trigger(M.Events.BACK_BUFFER_REACHED,{bufferEnd:n}),i.live&&c.trigger(M.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n}),c.trigger(M.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:d}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var c=this.details,i=this.hls,l=this.media,v=this.mediaSource,B=c.fragments[0].start+c.totalduration,C=l.duration,L=Object(Q.isFiniteNumber)(v.duration)?v.duration:0;c.live&&i.config.liveDurationInfinity?(_.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),v.duration=Infinity,this.updateSeekableRange(c)):(B>L&&B>C||!Object(Q.isFiniteNumber)(C))&&(_.logger.log("[buffer-controller]: Updating Media Source duration to "+B.toFixed(3)),v.duration=B)},f.updateSeekableRange=function(c){var i=this.mediaSource,l=c.fragments,v=l.length;if(v&&c.live&&i!==null&&i!==void 0&&i.setLiveSeekableRange){var B=Math.max(0,l[0].start),C=Math.max(B,B+c.totalduration);i.setLiveSeekableRange(B,C)}},f.checkPendingTracks=function(){var c=this.bufferCodecEventsExpected,i=this.operationQueue,l=this.pendingTracks,v=Object.keys(l).length;if(v&&!c||v===2){this.createSourceBuffers(l),this.pendingTracks={};var B=this.getSourceBufferTypes();if(B.length===0){this.hls.trigger(M.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}B.forEach(function(C){i.executeNext(C)})}},f.createSourceBuffers=function(c){var i=this.sourceBuffer,l=this.mediaSource;if(!l)throw Error("createSourceBuffers called when mediaSource was null");var v=0;for(var B in c)if(!i[B]){var C=c[B];if(!C)throw Error("source buffer exists for track "+B+", however track does not");var L=C.levelCodec||C.codec,w=C.container+";codecs="+L;_.logger.log("[buffer-controller]: creating sourceBuffer("+w+")");try{var p=i[B]=l.addSourceBuffer(w),n=B;this.addBufferListener(n,"updatestart",this._onSBUpdateStart),this.addBufferListener(n,"updateend",this._onSBUpdateEnd),this.addBufferListener(n,"error",this._onSBUpdateError),this.tracks[B]={buffer:p,codec:L,container:C.container,levelCodec:C.levelCodec,id:C.id},v++}catch(d){_.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+d.message),this.hls.trigger(M.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:d,mimeType:w})}}v&&this.hls.trigger(M.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(c){var i=this.operationQueue,l=i.current(c);l.onStart()},f._onSBUpdateEnd=function(c){var i=this.operationQueue,l=i.current(c);l.onComplete(),i.shiftAndExecuteNext(c)},f._onSBUpdateError=function(c,i){_.logger.error("[buffer-controller]: "+c+" SourceBuffer error",i),this.hls.trigger(M.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var l=this.operationQueue.current(c);l&&l.onError(i)},f.removeExecutor=function(c,i,l){var v=this.media,B=this.mediaSource,C=this.operationQueue,L=this.sourceBuffer,w=L[c];if(!v||!B||!w){_.logger.warn("[buffer-controller]: Attempting to remove from the "+c+" SourceBuffer, but it does not exist"),C.shiftAndExecuteNext(c);return}var p=Object(Q.isFiniteNumber)(v.duration)?v.duration:Infinity,n=Object(Q.isFiniteNumber)(B.duration)?B.duration:Infinity,d=Math.max(0,i),m=Math.min(l,p,n);m>d?(_.logger.log("[buffer-controller]: Removing ["+d+","+m+"] from the "+c+" SourceBuffer"),console.assert(!w.updating,c+" sourceBuffer must not be updating"),w.remove(d,m)):C.shiftAndExecuteNext(c)},f.appendExecutor=function(c,i){var l=this.operationQueue,v=this.sourceBuffer,B=v[i];if(!B){_.logger.warn("[buffer-controller]: Attempting to append to the "+i+" SourceBuffer, but it does not exist"),l.shiftAndExecuteNext(i);return}B.ended=!1,console.assert(!B.updating,i+" sourceBuffer must not be updating"),B.appendBuffer(c)},f.blockBuffers=function(c,i){var l=this;if(i===void 0&&(i=this.getSourceBufferTypes()),!i.length){_.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(c);return}var v=this.operationQueue,B=i.map(function(C){return v.appendBlocker(C)});Promise.all(B).then(function(){c(),i.forEach(function(C){var L=l.sourceBuffer[C];(!L||!L.updating)&&v.shiftAndExecuteNext(C)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(c,i,l){var v=this.sourceBuffer[c];if(!v)return;var B=l.bind(this,c);this.listeners[c].push({event:i,listener:B}),v.addEventListener(i,B)},f.removeBufferListeners=function(c){var i=this.sourceBuffer[c];if(!i)return;this.listeners[c].forEach(function(l){i.removeEventListener(l.event,l.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return M});var Q=O("./src/utils/logger.ts"),M=function(){function _(b){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=b}var R=_.prototype;return R.append=function(t,E){var a=this.queues[E];a.push(t),a.length===1&&this.buffers[E]&&this.executeNext(E)},R.insertAbort=function(t,E){var a=this.queues[E];a.unshift(t),this.executeNext(E)},R.appendBlocker=function(t){var E,a=new Promise(function(h){E=h}),A={execute:E,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(A,t),a},R.executeNext=function(t){var E=this.buffers,a=this.queues,A=E[t],h=a[t];if(h.length){var s=h[0];try{s.execute()}catch(o){Q.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),s.onError(o),(!A||!A.updating)&&(h.shift(),this.executeNext(t))}}},R.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},R.current=function(t){return this.queues[t][0]},_}()},"./src/controller/cap-level-controller.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/events.ts");function M(b,t){for(var E=0;E<t.length;E++){var a=t[E];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(b,a.key,a)}}function _(b,t,E){return t&&M(b.prototype,t),E&&M(b,E),b}var R=function(){function b(E){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=E,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t=b.prototype;return t.setStreamController=function(a){this.streamController=a},t.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},t.registerListeners=function(){var a=this.hls;a.on(Q.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),a.on(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(Q.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var a=this.hls;a.off(Q.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),a.off(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(Q.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(a,A){b.isLevelAllowed(A.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(A.droppedLevel)},t.onMediaAttaching=function(a,A){this.media=A.media instanceof HTMLVideoElement?A.media:null},t.onManifestParsed=function(a,A){var h=this.hls;this.restrictedLevels=[],this.firstLevel=A.firstLevel,h.config.capLevelToPlayerSize&&A.video&&this.startCapping()},t.onBufferCodecs=function(a,A){var h=this.hls;h.config.capLevelToPlayerSize&&A.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var a=this.hls.levels;if(a.length){var A=this.hls;A.autoLevelCapping=this.getMaxLevel(a.length-1),A.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=A.autoLevelCapping}}},t.getMaxLevel=function(a){var A=this,h=this.hls.levels;if(!h.length)return-1;var s=h.filter(function(o,f){return b.isLevelAllowed(f,A.restrictedLevels)&&f<=a});return this.clientRect=null,b.getMaxLevelByMediaSize(s,this.mediaWidth,this.mediaHeight)},t.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()},t.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},t.getDimensions=function(){if(this.clientRect)return this.clientRect;var a=this.media,A={width:0,height:0};if(a){var h=a.getBoundingClientRect();A.width=h.width,A.height=h.height,!A.width&&!A.height&&(A.width=h.right-h.left||a.width||0,A.height=h.bottom-h.top||a.height||0)}return this.clientRect=A,A},b.isLevelAllowed=function(a,A){return A===void 0&&(A=[]),A.indexOf(a)===-1},b.getMaxLevelByMediaSize=function(a,A,h){if(!a||!a.length)return-1;for(var s=function(i,l){return l?i.width!==l.width||i.height!==l.height:!0},o=a.length-1,f=0;f<a.length;f+=1){var u=a[f];if((u.width>=A||u.height>=h)&&s(u,a[f+1])){o=f;break}}return o},_(b,[{key:"mediaWidth",get:function(){return this.getDimensions().width*b.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*b.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var a=1;try{a=self.devicePixelRatio}catch(A){}return a}}]),b}();H.default=R},"./src/controller/cmcd-controller.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return s});var Q=O("./src/events.ts"),M=O("./src/types/cmcd.ts"),_=O("./src/utils/buffer-helper.ts"),R=O("./src/utils/logger.ts");function b(o,f){for(var u=0;u<f.length;u++){var c=f[u];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(o,c.key,c)}}function t(o,f,u){return f&&b(o.prototype,f),u&&b(o,u),o}function E(o,f){var u=typeof Symbol!="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(u)return(u=u.call(o)).next.bind(u);if(Array.isArray(o)||(u=a(o))||f&&o&&typeof o.length=="number"){u&&(o=u);var c=0;return function(){return c>=o.length?{done:!0}:{done:!1,value:o[c++]}}}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 a(o,f){if(!o)return;if(typeof o=="string")return A(o,f);var u=Object.prototype.toString.call(o).slice(8,-1);if(u==="Object"&&o.constructor&&(u=o.constructor.name),u==="Map"||u==="Set")return Array.from(o);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return A(o,f)}function A(o,f){(f==null||f>o.length)&&(f=o.length);for(var u=0,c=new Array(f);u<f;u++)c[u]=o[u];return c}function h(){return h=Object.assign||function(o){for(var f=1;f<arguments.length;f++){var u=arguments[f];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(o[c]=u[c])}return o},h.apply(this,arguments)}var s=function(){function o(u){var c=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(){c.initialized&&(c.starved=!0),c.buffering=!0},this.onPlaying=function(){c.initialized||(c.initialized=!0),c.buffering=!1},this.applyPlaylistData=function(v){try{c.apply(v,{ot:M.CMCDObjectType.MANIFEST,su:!c.initialized})}catch(B){R.logger.warn("Could not generate manifest CMCD data.",B)}},this.applyFragmentData=function(v){try{var B=v.frag,C=c.hls.levels[B.level],L=c.getObjectType(B),w={d:B.duration*1e3,ot:L};(L===M.CMCDObjectType.VIDEO||L===M.CMCDObjectType.AUDIO||L==M.CMCDObjectType.MUXED)&&(w.br=C.bitrate/1e3,w.tb=c.getTopBandwidth(L),w.bl=c.getBufferLength(L)),c.apply(v,w)}catch(p){R.logger.warn("Could not generate segment CMCD data.",p)}},this.hls=u;var i=this.config=u.config,l=i.cmcd;l!=null&&(i.pLoader=this.createPlaylistLoader(),i.fLoader=this.createFragmentLoader(),this.sid=l.sessionId||o.uuid(),this.cid=l.contentId,this.useHeaders=l.useHeaders===!0,this.registerListeners())}var f=o.prototype;return f.registerListeners=function(){var c=this.hls;c.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),c.on(Q.Events.BUFFER_CREATED,this.onBufferCreated,this)},f.unregisterListeners=function(){var c=this.hls;c.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),c.off(Q.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},f.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},f.onMediaAttached=function(c,i){this.media=i.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},f.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},f.onBufferCreated=function(c,i){var l,v;this.audioBuffer=(l=i.tracks.audio)===null||l===void 0?void 0:l.buffer,this.videoBuffer=(v=i.tracks.video)===null||v===void 0?void 0:v.buffer},f.createData=function(){var c;return{v:M.CMCDVersion,sf:M.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(c=this.media)===null||c===void 0?void 0:c.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},f.apply=function(c,i){i===void 0&&(i={}),h(i,this.createData());var l=i.ot===M.CMCDObjectType.INIT||i.ot===M.CMCDObjectType.VIDEO||i.ot===M.CMCDObjectType.MUXED;if(this.starved&&l&&(i.bs=!0,i.su=!0,this.starved=!1),i.su==null&&(i.su=this.buffering),this.useHeaders){var v=o.toHeaders(i);if(!Object.keys(v).length)return;c.headers||(c.headers={}),h(c.headers,v)}else{var B=o.toQuery(i);if(!B)return;c.url=o.appendQueryToUri(c.url,B)}},f.getObjectType=function(c){var i=c.type;return i==="subtitle"?M.CMCDObjectType.TIMED_TEXT:c.sn==="initSegment"?M.CMCDObjectType.INIT:i==="audio"?M.CMCDObjectType.AUDIO:i==="main"?this.hls.audioTracks.length?M.CMCDObjectType.VIDEO:M.CMCDObjectType.MUXED:void 0},f.getTopBandwidth=function(c){for(var i=0,l=c===M.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,v=E(l),B;!(B=v()).done;){var C=B.value;C.bitrate>i&&(i=C.bitrate)}return i>0?i:NaN},f.getBufferLength=function(c){var i=this.hls.media,l=c===M.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!l||!i)return NaN;var v=_.BufferHelper.bufferInfo(l,i.currentTime,this.config.maxBufferHole);return v.len*1e3},f.createPlaylistLoader=function(){var c=this.config.pLoader,i=this.applyPlaylistData,l=c||this.config.loader;return function(){function v(C){this.loader=void 0,this.loader=new l(C)}var B=v.prototype;return B.destroy=function(){this.loader.destroy()},B.abort=function(){this.loader.abort()},B.load=function(L,w,p){i(L),this.loader.load(L,w,p)},t(v,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),v}()},f.createFragmentLoader=function(){var c=this.config.fLoader,i=this.applyFragmentData,l=c||this.config.loader;return function(){function v(C){this.loader=void 0,this.loader=new l(C)}var B=v.prototype;return B.destroy=function(){this.loader.destroy()},B.abort=function(){this.loader.abort()},B.load=function(L,w,p){i(L),this.loader.load(L,w,p)},t(v,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),v}()},o.uuid=function(){var c=URL.createObjectURL(new Blob),i=c.toString();return URL.revokeObjectURL(c),i.substr(i.lastIndexOf("/")+1)},o.serialize=function(c){for(var i=[],l=function(P){return!Number.isNaN(P)&&P!=null&&P!==""&&P!==!1},v=function(P){return Math.round(P)},B=function(P){return v(P/100)*100},C=function(P){return encodeURIComponent(P)},L={br:v,d:v,bl:B,dl:B,mtp:B,nor:C,rtp:B,tb:v},w=Object.keys(c||{}).sort(),p=E(w),n;!(n=p()).done;){var d=n.value,m=c[d];if(!l(m))continue;if(d==="v"&&m===1)continue;if(d=="pr"&&m===1)continue;var T=L[d];T&&(m=T(m));var y=typeof m,g=void 0;d==="ot"||d==="sf"||d==="st"?g=d+"="+m:y==="boolean"?g=d:y==="number"?g=d+"="+m:g=d+"="+JSON.stringify(m),i.push(g)}return i.join(",")},o.toHeaders=function(c){for(var i=Object.keys(c),l={},v=["Object","Request","Session","Status"],B=[{},{},{},{}],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,w=i;L<w.length;L++){var p=w[L],n=C[p]!=null?C[p]:1;B[n][p]=c[p]}for(var d=0;d<B.length;d++){var m=o.serialize(B[d]);m&&(l["CMCD-"+v[d]]=m)}return l},o.toQuery=function(c){return"CMCD="+encodeURIComponent(o.serialize(c))},o.appendQueryToUri=function(c,i){if(!i)return c;var l=c.includes("?")?"&":"?";return""+c+l+i},o}()},"./src/controller/eme-controller.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/events.ts"),M=O("./src/errors.ts"),_=O("./src/utils/logger.ts"),R=O("./src/utils/mediakeys-helper.ts");function b(s,o){for(var f=0;f<o.length;f++){var u=o[f];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,u.key,u)}}function t(s,o,f){return o&&b(s.prototype,o),f&&b(s,f),s}var E=3,a=function(o,f,u){var c={audioCapabilities:[],videoCapabilities:[]};return o.forEach(function(i){c.audioCapabilities.push({contentType:'audio/mp4; codecs="'+i+'"',robustness:u.audioRobustness||""})}),f.forEach(function(i){c.videoCapabilities.push({contentType:'video/mp4; codecs="'+i+'"',robustness:u.videoRobustness||""})}),[c]},A=function(o,f,u,c){switch(o){case R.KeySystems.WIDEVINE:return a(f,u,c);default:throw new Error("Unknown key-system: "+o)}},h=function(){function s(f){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=f,this._config=f.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 o=s.prototype;return o.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},o._registerListeners=function(){this.hls.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o._unregisterListeners=function(){this.hls.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o.getLicenseServerUrl=function(u){switch(u){case R.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+u+'"')},o._attemptKeySystemAccess=function(u,c,i){var l=this,v=A(u,c,i,this._drmSystemOptions);_.logger.log("Requesting encrypted media key-system access");var B=this.requestMediaKeySystemAccess(u,v);this.mediaKeysPromise=B.then(function(C){return l._onMediaKeySystemAccessObtained(u,C)}),B.catch(function(C){_.logger.error('Failed to obtain key-system "'+u+'" access:',C)})},o._onMediaKeySystemAccessObtained=function(u,c){var i=this;_.logger.log('Access for key-system "'+u+'" obtained');var l={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:c,mediaKeySystemDomain:u};this._mediaKeysList.push(l);var v=Promise.resolve().then(function(){return c.createMediaKeys()}).then(function(B){return l.mediaKeys=B,_.logger.log('Media-keys created for key-system "'+u+'"'),i._onMediaKeysCreated(),B});return v.catch(function(B){_.logger.error("Failed to create media-keys:",B)}),v},o._onMediaKeysCreated=function(){var u=this;this._mediaKeysList.forEach(function(c){c.mediaKeysSession||(c.mediaKeysSession=c.mediaKeys.createSession(),u._onNewMediaKeySession(c.mediaKeysSession))})},o._onNewMediaKeySession=function(u){var c=this;_.logger.log("New key-system session "+u.sessionId),u.addEventListener("message",function(i){c._onKeySessionMessage(u,i.message)},!1)},o._onKeySessionMessage=function(u,c){_.logger.log("Got EME message event, creating license request"),this._requestLicense(c,function(i){_.logger.log("Received license data (length: "+(i&&i.byteLength)+"), updating key-session"),u.update(i)})},o.onMediaEncrypted=function(u){var c=this;if(_.logger.log('Media is encrypted using "'+u.initDataType+'" init data type'),!this.mediaKeysPromise){_.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var i=function(v){if(!c._media)return;c._attemptSetMediaKeys(v),c._generateRequestWithPreferredKeySession(u.initDataType,u.initData)};this.mediaKeysPromise.then(i).catch(i)},o._attemptSetMediaKeys=function(u){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var c=this._mediaKeysList[0];if(!c||!c.mediaKeys){_.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}_.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(c.mediaKeys),this._hasSetMediaKeys=!0}},o._generateRequestWithPreferredKeySession=function(u,c){var i=this,l=this._mediaKeysList[0];if(!l){_.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(l.mediaKeysSessionInitialized){_.logger.warn("Key-Session already initialized but requested again");return}var v=l.mediaKeysSession;if(!v){_.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!c){_.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}_.logger.log('Generating key-session request for "'+u+'" init data type'),l.mediaKeysSessionInitialized=!0,v.generateRequest(u,c).then(function(){_.logger.debug("Key-session generation succeeded")}).catch(function(B){_.logger.error("Error generating key-session request:",B),i.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},o._createLicenseXhr=function(u,c,i){var l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,l,u,c,i);var v=this._licenseXhrSetup;if(v)try{v.call(this.hls,l,u),v=void 0}catch(B){_.logger.error(B)}try{l.readyState||l.open("POST",u,!0),v&&v.call(this.hls,l,u)}catch(B){throw new Error("issue setting up KeySystem license XHR "+B)}return l},o._onLicenseRequestReadyStageChange=function(u,c,i,l){switch(u.readyState){case 4:if(u.status===200){this._requestLicenseFailureCount=0,_.logger.log("License request succeeded");var v=u.response,B=this._licenseResponseCallback;if(B)try{v=B.call(this.hls,u,c)}catch(L){_.logger.error(L)}l(v)}else{if(_.logger.error("License Request XHR failed ("+c+"). Status: "+u.status+" ("+u.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>E){this.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var C=E-this._requestLicenseFailureCount+1;_.logger.warn("Retrying license request, "+C+" attempts left"),this._requestLicense(i,l)}break}},o._generateLicenseRequestChallenge=function(u,c){switch(u.mediaKeySystemDomain){case R.KeySystems.WIDEVINE:return c}throw new Error("unsupported key-system: "+u.mediaKeySystemDomain)},o._requestLicense=function(u,c){_.logger.log("Requesting content license for key-system");var i=this._mediaKeysList[0];if(!i){_.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var l=this.getLicenseServerUrl(i.mediaKeySystemDomain),v=this._createLicenseXhr(l,u,c);_.logger.log("Sending license request to URL: "+l);var B=this._generateLicenseRequestChallenge(i,u);v.send(B)}catch(C){_.logger.error("Failure requesting DRM license: "+C),this.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.KEY_SYSTEM_ERROR,details:M.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(u,c){if(!this._emeEnabled)return;var i=c.media;this._media=i,i.addEventListener("encrypted",this._onMediaEncrypted)},o.onMediaDetached=function(){var u=this._media,c=this._mediaKeysList;if(!u)return;u.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(c.map(function(i){if(i.mediaKeysSession)return i.mediaKeysSession.close().catch(function(){})})).then(function(){return u.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(u,c){if(!this._emeEnabled)return;var i=c.levels.map(function(v){return v.audioCodec}).filter(function(v){return!!v}),l=c.levels.map(function(v){return v.videoCodec}).filter(function(v){return!!v});this._attemptKeySystemAccess(R.KeySystems.WIDEVINE,i,l)},t(s,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),s}();H.default=h},"./src/controller/fps-controller.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/events.ts"),M=O("./src/utils/logger.ts"),_=function(){function R(t){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=t,this.registerListeners()}var b=R.prototype;return b.setStreamController=function(E){this.streamController=E},b.registerListeners=function(){this.hls.on(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},b.unregisterListeners=function(){this.hls.off(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching)},b.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},b.onMediaAttaching=function(E,a){var A=this.hls.config;if(A.capLevelOnFPSDrop){var h=a.media instanceof self.HTMLVideoElement?a.media:null;this.media=h,h&&typeof h.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),A.fpsDroppedMonitoringPeriod)}},b.checkFPS=function(E,a,A){var h=performance.now();if(a){if(this.lastTime){var s=h-this.lastTime,o=A-this.lastDroppedFrames,f=a-this.lastDecodedFrames,u=1e3*o/s,c=this.hls;if(c.trigger(Q.Events.FPS_DROP,{currentDropped:o,currentDecoded:f,totalDroppedFrames:A}),u>0&&o>c.config.fpsDroppedMonitoringThreshold*f){var i=c.currentLevel;M.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+i),i>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=i)&&(i=i-1,c.trigger(Q.Events.FPS_DROP_LEVEL_CAPPING,{level:i,droppedLevel:c.currentLevel}),c.autoLevelCapping=i,this.streamController.nextLevelSwitch())}}this.lastTime=h,this.lastDroppedFrames=A,this.lastDecodedFrames=a}},b.checkFPSInterval=function(){var E=this.media;if(E)if(this.isVideoPlaybackQualityAvailable){var a=E.getVideoPlaybackQuality();this.checkFPS(E,a.totalVideoFrames,a.droppedVideoFrames)}else this.checkFPS(E,E.webkitDecodedFrameCount,E.webkitDroppedFrameCount)},R}();H.default=_},"./src/controller/fragment-finders.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"findFragmentByPDT",function(){return _}),O.d(H,"findFragmentByPTS",function(){return R}),O.d(H,"fragmentWithinToleranceTest",function(){return b}),O.d(H,"pdtWithinToleranceTest",function(){return t}),O.d(H,"findFragWithCC",function(){return E});var Q=O("./src/polyfills/number.ts"),M=O("./src/utils/binary-search.ts");function _(a,A,h){if(A===null||!Array.isArray(a)||!a.length||!Object(Q.isFiniteNumber)(A))return null;var s=a[0].programDateTime;if(A<(s||0))return null;var o=a[a.length-1].endProgramDateTime;if(A>=(o||0))return null;h=h||0;for(var f=0;f<a.length;++f){var u=a[f];if(t(A,h,u))return u}return null}function R(a,A,h,s){h===void 0&&(h=0),s===void 0&&(s=0);var o=null;if(a?o=A[a.sn-A[0].sn+1]||null:h===0&&A[0].start===0&&(o=A[0]),o&&b(h,s,o)===0)return o;var f=M.default.search(A,b.bind(null,h,s));return f||o}function b(a,A,h){a===void 0&&(a=0),A===void 0&&(A=0);var s=Math.min(A,h.duration+(h.deltaPTS?h.deltaPTS:0));return h.start+h.duration-s<=a?1:h.start-s>a&&h.start?-1:0}function t(a,A,h){var s=Math.min(A,h.duration+(h.deltaPTS?h.deltaPTS:0))*1e3,o=h.endProgramDateTime||0;return o-s>a}function E(a,A){return M.default.search(a,function(h){return h.cc<A?1:h.cc>A?-1:0})}},"./src/controller/fragment-tracker.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"FragmentState",function(){return _}),O.d(H,"FragmentTracker",function(){return R});var Q=O("./src/events.ts"),M=O("./src/types/loader.ts"),_;(function(E){E.NOT_LOADED="NOT_LOADED",E.BACKTRACKED="BACKTRACKED",E.APPENDING="APPENDING",E.PARTIAL="PARTIAL",E.OK="OK"})(_||(_={}));var R=function(){function E(A){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=A,this._registerListeners()}var a=E.prototype;return a._registerListeners=function(){var h=this.hls;h.on(Q.Events.BUFFER_APPENDED,this.onBufferAppended,this),h.on(Q.Events.FRAG_BUFFERED,this.onFragBuffered,this),h.on(Q.Events.FRAG_LOADED,this.onFragLoaded,this)},a._unregisterListeners=function(){var h=this.hls;h.off(Q.Events.BUFFER_APPENDED,this.onBufferAppended,this),h.off(Q.Events.FRAG_BUFFERED,this.onFragBuffered,this),h.off(Q.Events.FRAG_LOADED,this.onFragLoaded,this)},a.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},a.getAppendedFrag=function(h,s){if(s===M.PlaylistLevelType.MAIN){var o=this.activeFragment,f=this.activeParts;if(!o)return null;if(f)for(var u=f.length;u--;){var c=f[u],i=c?c.end:o.appendedPTS;if(c.start<=h&&i!==void 0&&h<=i)return u>9&&(this.activeParts=f.slice(u-9)),c}else if(o.start<=h&&o.appendedPTS!==void 0&&h<=o.appendedPTS)return o}return this.getBufferedFrag(h,s)},a.getBufferedFrag=function(h,s){for(var o=this.fragments,f=Object.keys(o),u=f.length;u--;){var c=o[f[u]];if((c==null?void 0:c.body.type)===s&&c.buffered){var i=c.body;if(i.start<=h&&h<=i.end)return i}}return null},a.detectEvictedFragments=function(h,s,o){var f=this;Object.keys(this.fragments).forEach(function(u){var c=f.fragments[u];if(!c)return;if(!c.buffered){c.body.type===o&&f.removeFragment(c.body);return}var i=c.range[h];if(!i)return;i.time.some(function(l){var v=!f.isTimeBuffered(l.startPTS,l.endPTS,s);return v&&f.removeFragment(c.body),v})})},a.detectPartialFragments=function(h){var s=this,o=this.timeRanges,f=h.frag,u=h.part;if(!o||f.sn==="initSegment")return;var c=t(f),i=this.fragments[c];if(!i)return;Object.keys(o).forEach(function(l){var v=f.elementaryStreams[l];if(!v)return;var B=o[l],C=u!==null||v.partial===!0;i.range[l]=s.getBufferedTimes(f,u,C,B)}),i.backtrack=i.loaded=null,Object.keys(i.range).length?i.buffered=!0:this.removeFragment(i.body)},a.fragBuffered=function(h){var s=t(h),o=this.fragments[s];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},a.getBufferedTimes=function(h,s,o,f){for(var u={time:[],partial:o},c=s?s.start:h.start,i=s?s.end:h.end,l=h.minEndPTS||i,v=h.maxStartPTS||c,B=0;B<f.length;B++){var C=f.start(B)-this.bufferPadding,L=f.end(B)+this.bufferPadding;if(v>=C&&l<=L){u.time.push({startPTS:Math.max(c,f.start(B)),endPTS:Math.min(i,f.end(B))});break}else if(c<L&&i>C)u.partial=!0,u.time.push({startPTS:Math.max(c,f.start(B)),endPTS:Math.min(i,f.end(B))});else if(i<=C)break}return u},a.getPartialFragment=function(h){var s=null,o,f,u,c=0,i=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach(function(v){var B=l[v];if(!B)return;b(B)&&(f=B.body.start-i,u=B.body.end+i,h>=f&&h<=u&&(o=Math.min(h-f,u-h),c<=o&&(s=B.body,c=o)))}),s},a.getState=function(h){var s=t(h),o=this.fragments[s];return o?o.buffered?b(o)?_.PARTIAL:_.OK:o.backtrack?_.BACKTRACKED:_.APPENDING:_.NOT_LOADED},a.backtrack=function(h,s){var o=t(h),f=this.fragments[o];if(!f||f.backtrack)return null;var u=f.backtrack=s||f.loaded;return f.loaded=null,u},a.getBacktrackData=function(h){var s=t(h),o=this.fragments[s];if(o){var f,u=o.backtrack;if(u!=null&&(f=u.payload)!==null&&f!==void 0&&f.byteLength)return u;this.removeFragment(h)}return null},a.isTimeBuffered=function(h,s,o){for(var f,u,c=0;c<o.length;c++){if(f=o.start(c)-this.bufferPadding,u=o.end(c)+this.bufferPadding,h>=f&&s<=u)return!0;if(s<=f)return!1}return!1},a.onFragLoaded=function(h,s){var o=s.frag,f=s.part;if(o.sn==="initSegment"||o.bitrateTest||f)return;var u=t(o);this.fragments[u]={body:o,loaded:s,backtrack:null,buffered:!1,range:Object.create(null)}},a.onBufferAppended=function(h,s){var o=this,f=s.frag,u=s.part,c=s.timeRanges;if(f.type===M.PlaylistLevelType.MAIN)if(this.activeFragment=f,u){var i=this.activeParts;i||(this.activeParts=i=[]),i.push(u)}else this.activeParts=null;this.timeRanges=c,Object.keys(c).forEach(function(l){var v=c[l];if(o.detectEvictedFragments(l,v),!u)for(var B=0;B<v.length;B++)f.appendedPTS=Math.max(v.end(B),f.appendedPTS||0)})},a.onFragBuffered=function(h,s){this.detectPartialFragments(s)},a.hasFragment=function(h){var s=t(h);return!!this.fragments[s]},a.removeFragmentsInRange=function(h,s,o){var f=this;Object.keys(this.fragments).forEach(function(u){var c=f.fragments[u];if(!c)return;if(c.buffered){var i=c.body;i.type===o&&i.start<s&&i.end>h&&f.removeFragment(i)}})},a.removeFragment=function(h){var s=t(h);h.stats.loaded=0,h.clearElementaryStreamInfo(),delete this.fragments[s]},a.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},E}();function b(E){var a,A;return E.buffered&&(((a=E.range.video)===null||a===void 0?void 0:a.partial)||((A=E.range.audio)===null||A===void 0?void 0:A.partial))}function t(E){return E.type+"_"+E.level+"_"+E.urlId+"_"+E.sn}},"./src/controller/gap-controller.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"STALL_MINIMUM_DURATION_MS",function(){return b}),O.d(H,"MAX_START_GAP_JUMP",function(){return t}),O.d(H,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return E}),O.d(H,"SKIP_BUFFER_RANGE_START",function(){return a}),O.d(H,"default",function(){return A});var Q=O("./src/utils/buffer-helper.ts"),M=O("./src/errors.ts"),_=O("./src/events.ts"),R=O("./src/utils/logger.ts"),b=250,t=2,E=.1,a=.05,A=function(){function h(o,f,u,c){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=o,this.media=f,this.fragmentTracker=u,this.hls=c}var s=h.prototype;return s.destroy=function(){this.hls=this.fragmentTracker=this.media=null},s.poll=function(f){var u=this.config,c=this.media,i=this.stalled,l=c.currentTime,v=c.seeking,B=this.seeking&&!v,C=!this.seeking&&v;if(this.seeking=v,l!==f){if(this.moved=!0,i!==null){if(this.stallReported){var L=self.performance.now()-i;R.logger.warn("playback not stuck anymore @"+l+", after "+Math.round(L)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((C||B)&&(this.stalled=null),c.paused||c.ended||c.playbackRate===0||!Q.BufferHelper.getBuffered(c).length)return;var w=Q.BufferHelper.bufferInfo(c,l,0),p=w.len>0,n=w.nextStart||0;if(!p&&!n)return;if(v){var d=w.len>t,m=!n||n-l>t&&!this.fragmentTracker.getPartialFragment(l);if(d||m)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var T,y=Math.max(n,w.start||0)-l,g=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,U=g==null||((T=g.details)===null||T===void 0)?void 0:T.live,P=U?g.details.targetduration*2:t;if(y>0&&y<=P){this._trySkipBufferHole(null);return}}var I=self.performance.now();if(i===null){this.stalled=I;return}var G=I-i;!v&&G>=b&&this._reportStall(w.len);var K=Q.BufferHelper.bufferInfo(c,l,u.maxBufferHole);this._tryFixBufferStall(K,G)},s._tryFixBufferStall=function(f,u){var c=this.config,i=this.fragmentTracker,l=this.media,v=l.currentTime,B=i.getPartialFragment(v);if(B){var C=this._trySkipBufferHole(B);if(C)return}f.len>c.maxBufferHole&&u>c.highBufferWatchdogPeriod*1e3&&(R.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},s._reportStall=function(f){var u=this.hls,c=this.media,i=this.stallReported;i||(this.stallReported=!0,R.logger.warn("Playback stalling at @"+c.currentTime+" due to low buffer (buffer="+f+")"),u.trigger(_.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:f}))},s._trySkipBufferHole=function(f){for(var u=this.config,c=this.hls,i=this.media,l=i.currentTime,v=0,B=Q.BufferHelper.getBuffered(i),C=0;C<B.length;C++){var L=B.start(C);if(l+u.maxBufferHole>=v&&l<L){var w=Math.max(L+a,i.currentTime+E);return R.logger.warn("skipping hole, adjusting currentTime from "+l+" to "+w),this.moved=!0,this.stalled=null,i.currentTime=w,f&&c.trigger(_.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+l+" to "+w,frag:f}),w}v=B.end(C)}return 0},s._tryNudgeBuffer=function(){var f=this.config,u=this.hls,c=this.media,i=c.currentTime,l=(this.nudgeRetry||0)+1;if(this.nudgeRetry=l,l<f.nudgeMaxRetry){var v=i+l*f.nudgeOffset;R.logger.warn("Nudging 'currentTime' from "+i+" to "+v),c.currentTime=v,u.trigger(_.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else R.logger.error("Playhead still not moving while enough data buffered @"+i+" after "+f.nudgeMaxRetry+" nudges"),u.trigger(_.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},h}()},"./src/controller/id3-track-controller.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/events.ts"),M=O("./src/utils/texttrack-utils.ts"),_=O("./src/demux/id3.ts"),R=.25,b=function(){function t(a){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=a,this._registerListeners()}var E=t.prototype;return E.destroy=function(){this._unregisterListeners()},E._registerListeners=function(){var A=this.hls;A.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.on(Q.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),A.on(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E._unregisterListeners=function(){var A=this.hls;A.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.off(Q.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),A.off(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E.onMediaAttached=function(A,h){this.media=h.media},E.onMediaDetaching=function(){if(!this.id3Track)return;Object(M.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},E.getID3Track=function(A){if(!this.media)return;for(var h=0;h<A.length;h++){var s=A[h];if(s.kind==="metadata"&&s.label==="id3")return Object(M.sendAddTrackEvent)(s,this.media),s}return this.media.addTextTrack("metadata","id3")},E.onFragParsingMetadata=function(A,h){if(!this.media)return;var s=h.frag,o=h.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var f=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,u=0;u<o.length;u++){var c=_.getID3Frames(o[u].data);if(c){var i=o[u].pts,l=u<o.length-1?o[u+1].pts:s.end,v=l-i;v<=0&&(l=i+R);for(var B=0;B<c.length;B++){var C=c[B];if(!_.isTimeStampFrame(C)){var L=new f(i,l,"");L.value=C,this.id3Track.addCue(L)}}}}},E.onBufferFlushing=function(A,h){var s=h.startOffset,o=h.endOffset,f=h.type;if(!f||f==="audio"){var u=this.id3Track;u&&Object(M.removeCuesInRange)(u,s,o)}},t}();H.default=b},"./src/controller/latency-controller.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return t});var Q=O("./src/errors.ts"),M=O("./src/events.ts"),_=O("./src/utils/logger.ts");function R(E,a){for(var A=0;A<a.length;A++){var h=a[A];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(E,h.key,h)}}function b(E,a,A){return a&&R(E.prototype,a),A&&R(E,A),E}var t=function(){function E(A){var h=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 h.timeupdate()},this.hls=A,this.config=A.config,this.registerListeners()}var a=E.prototype;return a.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},a.registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(M.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(M.Events.ERROR,this.onError,this)},a.unregisterListeners=function(){this.hls.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(M.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(M.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(M.Events.ERROR,this.onError)},a.onMediaAttached=function(h,s){this.media=s.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},a.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},a.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},a.onLevelUpdated=function(h,s){var o=s.details;this.levelDetails=o,o.advanced&&this.timeupdate(),!o.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},a.onError=function(h,s){if(s.details!==Q.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,_.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},a.timeupdate=function(){var h=this.media,s=this.levelDetails;if(!h||!s)return;this.currentTime=h.currentTime;var o=this.computeLatency();if(o===null)return;this._latency=o;var f=this.config,u=f.lowLatencyMode,c=f.maxLiveSyncPlaybackRate;if(!u||c===1)return;var i=this.targetLatency;if(i===null)return;var l=o-i,v=Math.min(this.maxLatency,i+s.targetduration),B=l<v;if(s.live&&B&&l>.05&&this.forwardBufferLength>1){var C=Math.min(2,Math.max(1,c)),L=Math.round(2/(1+Math.exp(-.75*l-this.edgeStalled))*20)/20;h.playbackRate=Math.min(C,Math.max(1,L))}else h.playbackRate!==1&&h.playbackRate!==0&&(h.playbackRate=1)},a.estimateLiveEdge=function(){var h=this.levelDetails;return h===null?null:h.edge+h.age},a.computeLatency=function(){var h=this.estimateLiveEdge();return h===null?null:h-this.currentTime},b(E,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var h=this.config,s=this.levelDetails;return h.liveMaxLatencyDuration!==void 0?h.liveMaxLatencyDuration:s?h.liveMaxLatencyDurationCount*s.targetduration:0}},{key:"targetLatency",get:function(){var h=this.levelDetails;if(h===null)return null;var s=h.holdBack,o=h.partHoldBack,f=h.targetduration,u=this.config,c=u.liveSyncDuration,i=u.liveSyncDurationCount,l=u.lowLatencyMode,v=this.hls.userConfig,B=l&&o||s;(v.liveSyncDuration||v.liveSyncDurationCount||B===0)&&(B=c!==void 0?c:i*f);var C=f,L=1;return B+Math.min(this.stallCount*L,C)}},{key:"liveSyncPosition",get:function(){var h=this.estimateLiveEdge(),s=this.targetLatency,o=this.levelDetails;if(h===null||s===null||o===null)return null;var f=o.edge,u=h-s-this.edgeStalled,c=f-o.totalduration,i=f-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(c,u),i)}},{key:"drift",get:function(){var h=this.levelDetails;return h===null?1:h.drift}},{key:"edgeStalled",get:function(){var h=this.levelDetails;if(h===null)return 0;var s=(this.config.lowLatencyMode&&h.partTarget||h.targetduration)*3;return Math.max(h.age-s,0)}},{key:"forwardBufferLength",get:function(){var h=this.media,s=this.levelDetails;if(!h||!s)return 0;var o=h.buffered.length;return o?h.buffered.end(o-1):s.edge-this.currentTime}}]),E}()},"./src/controller/level-controller.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return u});var Q=O("./src/types/level.ts"),M=O("./src/events.ts"),_=O("./src/errors.ts"),R=O("./src/utils/codecs.ts"),b=O("./src/controller/level-helper.ts"),t=O("./src/controller/base-playlist-controller.ts"),E=O("./src/types/loader.ts");function a(){return a=Object.assign||function(c){for(var i=1;i<arguments.length;i++){var l=arguments[i];for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(c[v]=l[v])}return c},a.apply(this,arguments)}function A(c,i){for(var l=0;l<i.length;l++){var v=i[l];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(c,v.key,v)}}function h(c,i,l){return i&&A(c.prototype,i),l&&A(c,l),c}function s(c,i){c.prototype=Object.create(i.prototype),c.prototype.constructor=c,o(c,i)}function o(c,i){return o=Object.setPrototypeOf||function(v,B){return v.__proto__=B,v},o(c,i)}var f=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),u=function(c){s(i,c);function i(v){var B;return B=c.call(this,v,"[level-controller]")||this,B._levels=[],B._firstLevel=-1,B._startLevel=void 0,B.currentLevelIndex=-1,B.manualLevelIndex=-1,B.onParsedComplete=void 0,B._registerListeners(),B}var l=i.prototype;return l._registerListeners=function(){var B=this.hls;B.on(M.Events.MANIFEST_LOADED,this.onManifestLoaded,this),B.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),B.on(M.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),B.on(M.Events.FRAG_LOADED,this.onFragLoaded,this),B.on(M.Events.ERROR,this.onError,this)},l._unregisterListeners=function(){var B=this.hls;B.off(M.Events.MANIFEST_LOADED,this.onManifestLoaded,this),B.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),B.off(M.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),B.off(M.Events.FRAG_LOADED,this.onFragLoaded,this),B.off(M.Events.ERROR,this.onError,this)},l.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,c.prototype.destroy.call(this)},l.startLoad=function(){var B=this._levels;B.forEach(function(C){C.loadError=0}),c.prototype.startLoad.call(this)},l.onManifestLoaded=function(B,C){var L=[],w=[],p=[],n,d={},m,T=!1,y=!1,g=!1;if(C.levels.forEach(function(G){var K=G.attrs;T=T||!!(G.width&&G.height),y=y||!!G.videoCodec,g=g||!!G.audioCodec,f&&G.audioCodec&&G.audioCodec.indexOf("mp4a.40.34")!==-1&&(G.audioCodec=void 0);var D=G.bitrate+"-"+G.attrs.RESOLUTION+"-"+G.attrs.CODECS;m=d[D],m?m.url.push(G.url):(m=new Q.Level(G),d[D]=m,L.push(m)),K&&(K.AUDIO&&Object(b.addGroupId)(m,"audio",K.AUDIO),K.SUBTITLES&&Object(b.addGroupId)(m,"text",K.SUBTITLES))}),(T||y)&&g&&(L=L.filter(function(G){var K=G.videoCodec,D=G.width,J=G.height;return!!K||!!(D&&J)})),L=L.filter(function(G){var K=G.audioCodec,D=G.videoCodec;return(!K||Object(R.isCodecSupportedInMp4)(K,"audio"))&&(!D||Object(R.isCodecSupportedInMp4)(D,"video"))}),C.audioTracks&&(w=C.audioTracks.filter(function(G){return!G.audioCodec||Object(R.isCodecSupportedInMp4)(G.audioCodec,"audio")}),Object(b.assignTrackIdsByGroup)(w)),C.subtitles&&(p=C.subtitles,Object(b.assignTrackIdsByGroup)(p)),L.length>0){n=L[0].bitrate,L.sort(function(G,K){return G.bitrate-K.bitrate}),this._levels=L;for(var U=0;U<L.length;U++)if(L[U].bitrate===n){this._firstLevel=U,this.log("manifest loaded, "+L.length+" level(s) found, first bitrate: "+n);break}var P=g&&!y,I={levels:L,audioTracks:w,subtitleTracks:p,firstLevel:this._firstLevel,stats:C.stats,audio:g,video:y,altAudio:!P&&w.some(function(G){return!!G.url})};this.hls.trigger(M.Events.MANIFEST_PARSED,I),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(M.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:C.url,reason:"no level with compatible codecs found in manifest"})},l.onError=function(B,C){if(c.prototype.onError.call(this,B,C),C.fatal)return;var L=C.context,w=this._levels[this.currentLevelIndex];if(L&&(L.type===E.PlaylistContextType.AUDIO_TRACK&&w.audioGroupIds&&L.groupId===w.audioGroupIds[w.urlId]||L.type===E.PlaylistContextType.SUBTITLE_TRACK&&w.textGroupIds&&L.groupId===w.textGroupIds[w.urlId])){this.redundantFailover(this.currentLevelIndex);return}var p=!1,n=!0,d;switch(C.details){case _.ErrorDetails.FRAG_LOAD_ERROR:case _.ErrorDetails.FRAG_LOAD_TIMEOUT:case _.ErrorDetails.KEY_LOAD_ERROR:case _.ErrorDetails.KEY_LOAD_TIMEOUT:if(C.frag){var m=this._levels[C.frag.level];m?(m.fragmentError++,m.fragmentError>this.hls.config.fragLoadingMaxRetry&&(d=C.frag.level)):d=C.frag.level}break;case _.ErrorDetails.LEVEL_LOAD_ERROR:case _.ErrorDetails.LEVEL_LOAD_TIMEOUT:L&&(L.deliveryDirectives&&(n=!1),d=L.level),p=!0;break;case _.ErrorDetails.REMUX_ALLOC_ERROR:d=C.level,p=!0;break}d!==void 0&&this.recoverLevel(C,d,p,n)},l.recoverLevel=function(B,C,L,w){var p=B.details,n=this._levels[C];if(n.loadError++,L){var d=this.retryLoadingOrFail(B);if(d)B.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(w){var m=n.url.length;if(m>1&&n.loadError<m)B.levelRetry=!0,this.redundantFailover(C);else if(this.manualLevelIndex===-1){var T=C===0?this._levels.length-1:C-1;this.currentLevelIndex!==T&&this._levels[T].loadError===0&&(this.warn(p+": switch to "+T),B.levelRetry=!0,this.hls.nextAutoLevel=T)}}},l.redundantFailover=function(B){var C=this._levels[B],L=C.url.length;if(L>1){var w=(C.urlId+1)%L;this.warn("Switching to redundant URL-id "+w),this._levels.forEach(function(p){p.urlId=w}),this.level=B}},l.onFragLoaded=function(B,C){var L=C.frag;if(L!==void 0&&L.type===E.PlaylistLevelType.MAIN){var w=this._levels[L.level];w!==void 0&&(w.fragmentError=0,w.loadError=0)}},l.onLevelLoaded=function(B,C){var L,w=C.level,p=C.details,n=this._levels[w];if(!n){var d;this.warn("Invalid level index "+w),(d=C.deliveryDirectives)!==null&&d!==void 0&&d.skip&&(p.deltaUpdateFailed=!0);return}w===this.currentLevelIndex?(n.fragmentError===0&&(n.loadError=0,this.retryCount=0),this.playlistLoaded(w,C,n.details)):(L=C.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(p.deltaUpdateFailed=!0)},l.onAudioTrackSwitched=function(B,C){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var w=-1,p=this.hls.audioTracks[C.id].groupId,n=0;n<L.audioGroupIds.length;n++)if(L.audioGroupIds[n]===p){w=n;break}w!==L.urlId&&(L.urlId=w,this.startLoad())}},l.loadPlaylist=function(B){var C=this.currentLevelIndex,L=this._levels[C];if(this.canLoad&&L&&L.url.length>0){var w=L.urlId,p=L.url[w];if(B)try{p=B.addDirectives(p)}catch(n){this.warn("Could not construct new URL with HLS Delivery Directives: "+n)}this.log("Attempt loading level index "+C+(B?" at sn "+B.msn+" part "+B.part:"")+" with URL-id "+w+" "+p),this.clearTimer(),this.hls.trigger(M.Events.LEVEL_LOADING,{url:p,level:C,id:w,deliveryDirectives:B||null})}},l.removeLevel=function(B,C){var L=function(n,d){return d!==C},w=this._levels.filter(function(p,n){return n!==B?!0:p.url.length>1&&C!==void 0?(p.url=p.url.filter(L),p.audioGroupIds&&(p.audioGroupIds=p.audioGroupIds.filter(L)),p.textGroupIds&&(p.textGroupIds=p.textGroupIds.filter(L)),p.urlId=0,!0):!1}).map(function(p,n){var d=p.details;return d!=null&&d.fragments&&d.fragments.forEach(function(m){m.level=n}),p});this._levels=w,this.hls.trigger(M.Events.LEVELS_UPDATED,{levels:w})},h(i,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(B){var C,L=this._levels;if(L.length===0)return;if(this.currentLevelIndex===B&&(C=L[B])!==null&&C!==void 0&&C.details)return;if(B<0||B>=L.length){var w=B<0;if(this.hls.trigger(M.Events.ERROR,{type:_.ErrorTypes.OTHER_ERROR,details:_.ErrorDetails.LEVEL_SWITCH_ERROR,level:B,fatal:w,reason:"invalid level idx"}),w)return;B=Math.min(B,L.length-1)}this.clearTimer();var p=this.currentLevelIndex,n=L[p],d=L[B];this.log("switching to level "+B+" from "+p),this.currentLevelIndex=B;var m=a({},d,{level:B,maxBitrate:d.maxBitrate,uri:d.uri,urlId:d.urlId});delete m._urlId,this.hls.trigger(M.Events.LEVEL_SWITCHING,m);var T=d.details;if(!T||T.live){var y=this.switchParams(d.uri,n==null?void 0:n.details);this.loadPlaylist(y)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(B){this.manualLevelIndex=B,this._startLevel===void 0&&(this._startLevel=B),B!==-1&&(this.level=B)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(B){this._firstLevel=B}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var B=this.hls.config.startLevel;return B!==void 0?B:this._firstLevel}else return this._startLevel},set:function(B){this._startLevel=B}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(B){this.level=B,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=B)}}]),i}(t.default)},"./src/controller/level-helper.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"addGroupId",function(){return _}),O.d(H,"assignTrackIdsByGroup",function(){return R}),O.d(H,"updatePTS",function(){return b}),O.d(H,"updateFragPTSDTS",function(){return E}),O.d(H,"mergeDetails",function(){return a}),O.d(H,"mapPartIntersection",function(){return A}),O.d(H,"mapFragmentIntersection",function(){return h}),O.d(H,"adjustSliding",function(){return s}),O.d(H,"addSliding",function(){return o}),O.d(H,"computeReloadInterval",function(){return f}),O.d(H,"getFragmentWithSN",function(){return u}),O.d(H,"getPartWith",function(){return c});var Q=O("./src/polyfills/number.ts"),M=O("./src/utils/logger.ts");function _(i,l,v){switch(l){case"audio":i.audioGroupIds||(i.audioGroupIds=[]),i.audioGroupIds.push(v);break;case"text":i.textGroupIds||(i.textGroupIds=[]),i.textGroupIds.push(v);break}}function R(i){var l={};i.forEach(function(v){var B=v.groupId||"";v.id=l[B]=l[B]||0,l[B]++})}function b(i,l,v){var B=i[l],C=i[v];t(B,C)}function t(i,l){var v=l.startPTS;if(Object(Q.isFiniteNumber)(v)){var B=0,C;l.sn>i.sn?(B=v-i.start,C=i):(B=i.start-v,C=l),C.duration!==B&&(C.duration=B)}else if(l.sn>i.sn){var L=i.cc===l.cc;L&&i.minEndPTS?l.start=i.start+(i.minEndPTS-i.start):l.start=i.start+i.duration}else l.start=Math.max(i.start-l.duration,0)}function E(i,l,v,B,C,L){var w=B-v;w<=0&&(M.logger.warn("Fragment should have a positive duration",l),B=v+l.duration,L=C+l.duration);var p=v,n=B,d=l.startPTS,m=l.endPTS;if(Object(Q.isFiniteNumber)(d)){var T=Math.abs(d-v);Object(Q.isFiniteNumber)(l.deltaPTS)?l.deltaPTS=Math.max(T,l.deltaPTS):l.deltaPTS=T,p=Math.max(v,d),v=Math.min(v,d),C=Math.min(C,l.startDTS),n=Math.min(B,m),B=Math.max(B,m),L=Math.max(L,l.endDTS)}l.duration=B-v;var y=v-l.start;l.appendedPTS=B,l.start=l.startPTS=v,l.maxStartPTS=p,l.startDTS=C,l.endPTS=B,l.minEndPTS=n,l.endDTS=L;var g=l.sn;if(!i||g<i.startSN||g>i.endSN)return 0;var U,P=g-i.startSN,I=i.fragments;for(I[P]=l,U=P;U>0;U--)t(I[U],I[U-1]);for(U=P;U<I.length-1;U++)t(I[U],I[U+1]);return i.fragmentHint&&t(I[I.length-1],i.fragmentHint),i.PTSKnown=i.alignedSliding=!0,y}function a(i,l){for(var v=null,B=i.fragments,C=B.length-1;C>=0;C--){var L=B[C].initSegment;if(L){v=L;break}}i.fragmentHint&&delete i.fragmentHint.endPTS;var w=0,p;if(h(i,l,function(U,P){U.relurl&&(w=U.cc-P.cc),Object(Q.isFiniteNumber)(U.startPTS)&&Object(Q.isFiniteNumber)(U.endPTS)&&(P.start=P.startPTS=U.startPTS,P.startDTS=U.startDTS,P.appendedPTS=U.appendedPTS,P.maxStartPTS=U.maxStartPTS,P.endPTS=U.endPTS,P.endDTS=U.endDTS,P.minEndPTS=U.minEndPTS,P.duration=U.endPTS-U.startPTS,P.duration&&(p=P),l.PTSKnown=l.alignedSliding=!0),P.elementaryStreams=U.elementaryStreams,P.loader=U.loader,P.stats=U.stats,P.urlId=U.urlId,U.initSegment&&(P.initSegment=U.initSegment,v=U.initSegment)}),v){var n=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments;n.forEach(function(U){var P;(!U.initSegment||U.initSegment.relurl===((P=v)===null||P===void 0?void 0:P.relurl))&&(U.initSegment=v)})}if(l.skippedSegments&&(l.deltaUpdateFailed=l.fragments.some(function(U){return!U}),l.deltaUpdateFailed)){M.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var d=l.skippedSegments;d--;)l.fragments.shift();l.startSN=l.fragments[0].sn,l.startCC=l.fragments[0].cc}var m=l.fragments;if(w){M.logger.warn("discontinuity sliding from playlist, take drift into account");for(var T=0;T<m.length;T++)m[T].cc+=w}l.skippedSegments&&(l.startCC=l.fragments[0].cc),A(i.partList,l.partList,function(U,P){P.elementaryStreams=U.elementaryStreams,P.stats=U.stats}),p?E(l,p,p.startPTS,p.endPTS,p.startDTS,p.endDTS):s(i,l),m.length&&(l.totalduration=l.edge-m[0].start),l.driftStartTime=i.driftStartTime,l.driftStart=i.driftStart;var y=l.advancedDateTime;if(l.advanced&&y){var g=l.edge;l.driftStart||(l.driftStartTime=y,l.driftStart=g),l.driftEndTime=y,l.driftEnd=g}else l.driftEndTime=i.driftEndTime,l.driftEnd=i.driftEnd,l.advancedDateTime=i.advancedDateTime}function A(i,l,v){if(i&&l)for(var B=0,C=0,L=i.length;C<=L;C++){var w=i[C],p=l[C+B];w&&p&&w.index===p.index&&w.fragment.sn===p.fragment.sn?v(w,p):B--}}function h(i,l,v){for(var B=l.skippedSegments,C=Math.max(i.startSN,l.startSN)-l.startSN,L=(i.fragmentHint?1:0)+(B?l.endSN:Math.min(i.endSN,l.endSN))-l.startSN,w=l.startSN-i.startSN,p=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,n=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments,d=C;d<=L;d++){var m=n[w+d],T=p[d];B&&!T&&d<B&&(T=l.fragments[d]=m),m&&T&&v(m,T)}}function s(i,l){var v=l.startSN+l.skippedSegments-i.startSN,B=i.fragments;if(v<0||v>=B.length)return;o(l,B[v].start)}function o(i,l){if(l){for(var v=i.fragments,B=i.skippedSegments;B<v.length;B++)v[B].start+=l;i.fragmentHint&&(i.fragmentHint.start+=l)}}function f(i,l){var v=1e3*i.levelTargetDuration,B=v/2,C=i.age,L=C>0&&C<v*3,w=l.loading.end-l.loading.start,p,n=i.availabilityDelay;if(i.updated===!1)if(L){var d=333*i.misses;p=Math.max(Math.min(B,w*2),d),i.availabilityDelay=(i.availabilityDelay||0)+p}else p=B;else L?(n=Math.min(n||v/2,C),i.availabilityDelay=n,p=n+v-C):p=v-w;return Math.round(p)}function u(i,l,v){if(!i||!i.details)return null;var B=i.details,C=B.fragments[l-B.startSN];return C||(C=B.fragmentHint,C&&C.sn===l?C:l<B.startSN&&v&&v.sn===l?v:null)}function c(i,l,v){if(!i||!i.details)return null;var B=i.details.partList;if(B)for(var C=B.length;C--;){var L=B[C];if(L.index===v&&L.fragment.sn===l)return L}return null}},"./src/controller/stream-controller.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return B});var Q=O("./src/polyfills/number.ts"),M=O("./src/controller/base-stream-controller.ts"),_=O("./src/is-supported.ts"),R=O("./src/events.ts"),b=O("./src/utils/buffer-helper.ts"),t=O("./src/controller/fragment-tracker.ts"),E=O("./src/types/loader.ts"),a=O("./src/loader/fragment.ts"),A=O("./src/demux/transmuxer-interface.ts"),h=O("./src/types/transmuxer.ts"),s=O("./src/controller/gap-controller.ts"),o=O("./src/errors.ts"),f=O("./src/utils/logger.ts");function u(C,L){for(var w=0;w<L.length;w++){var p=L[w];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(C,p.key,p)}}function c(C,L,w){return L&&u(C.prototype,L),w&&u(C,w),C}function i(C,L){C.prototype=Object.create(L.prototype),C.prototype.constructor=C,l(C,L)}function l(C,L){return l=Object.setPrototypeOf||function(p,n){return p.__proto__=n,p},l(C,L)}var v=100,B=function(C){i(L,C);function L(p,n){var d;return d=C.call(this,p,n,"[stream-controller]")||this,d.audioCodecSwap=!1,d.gapController=null,d.level=-1,d._forceStartLoad=!1,d.altAudio=!1,d.audioOnly=!1,d.fragPlaying=null,d.onvplaying=null,d.onvseeked=null,d.fragLastKbps=0,d.stalled=!1,d.couldBacktrack=!1,d.audioCodecSwitch=!1,d.videoBuffer=null,d._registerListeners(),d}var w=L.prototype;return w._registerListeners=function(){var n=this.hls;n.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(R.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.on(R.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),n.on(R.Events.ERROR,this.onError,this),n.on(R.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.on(R.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),n.on(R.Events.BUFFER_CREATED,this.onBufferCreated,this),n.on(R.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.on(R.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),n.on(R.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w._unregisterListeners=function(){var n=this.hls;n.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.off(R.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),n.off(R.Events.ERROR,this.onError,this),n.off(R.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),n.off(R.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),n.off(R.Events.BUFFER_CREATED,this.onBufferCreated,this),n.off(R.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),n.off(R.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),n.off(R.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},w.startLoad=function(n){if(this.levels){var d=this.lastCurrentTime,m=this.hls;if(this.stopLoad(),this.setInterval(v),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var T=m.startLevel;T===-1&&(m.config.testBandwidth?(T=0,this.bitrateTest=!0):T=m.nextAutoLevel),this.level=m.nextLoadLevel=T,this.loadedmetadata=!1}d>0&&n===-1&&(this.log("Override startPosition with lastCurrentTime @"+d.toFixed(3)),n=d),this.state=M.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=n,this.tick()}else this._forceStartLoad=!0,this.state=M.State.STOPPED},w.stopLoad=function(){this._forceStartLoad=!1,C.prototype.stopLoad.call(this)},w.doTick=function(){switch(this.state){case M.State.IDLE:this.doTickIdle();break;case M.State.WAITING_LEVEL:{var n,d=this.levels,m=this.level,T=d==null||((n=d[m])===null||n===void 0)?void 0:n.details;if(T&&(!T.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(T))break;this.state=M.State.IDLE;break}break}case M.State.FRAG_LOADING_WAITING_RETRY:{var y,g=self.performance.now(),U=this.retryDate;(!U||g>=U||(y=this.media)!==null&&y!==void 0&&y.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=M.State.IDLE)}break;default:break}this.onTickEnd()},w.onTickEnd=function(){C.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},w.doTickIdle=function(){var n,d,m=this.hls,T=this.levelLastLoaded,y=this.levels,g=this.media,U=m.config,P=m.nextLoadLevel;if(T===null||!g&&(this.startFragRequested||!U.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!y||!y[P])return;var I=y[P];this.level=m.nextLoadLevel=P;var G=I.details;if(!G||this.state===M.State.WAITING_LEVEL||G.live&&this.levelLastLoaded!==P){this.state=M.State.WAITING_LEVEL;return}var K=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:g,E.PlaylistLevelType.MAIN);if(K===null)return;var D=K.len,J=this.getMaxBufferLength(I.maxBitrate);if(D>=J)return;if(this._streamEnded(K,G)){var X={};this.altAudio&&(X.type="video"),this.hls.trigger(R.Events.BUFFER_EOS,X),this.state=M.State.ENDED;return}var ne=K.end,ue=this.getNextFragment(ne,G);if(this.couldBacktrack&&!this.fragPrevious&&ue&&ue.sn!=="initSegment"){var Oe=ue.sn-G.startSN;Oe>1&&(ue=G.fragments[Oe-1],this.fragmentTracker.removeFragment(ue))}if(ue&&this.fragmentTracker.getState(ue)===t.FragmentState.OK&&this.nextLoadPosition>ne){var _e=this.audioOnly&&!this.altAudio?a.ElementaryStreamTypes.AUDIO:a.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(g,_e,E.PlaylistLevelType.MAIN),ue=this.getNextFragment(this.nextLoadPosition,G)}if(!ue)return;ue.initSegment&&!ue.initSegment.data&&!this.bitrateTest&&(ue=ue.initSegment),((n=ue.decryptdata)===null||n===void 0?void 0:n.keyFormat)==="identity"&&!((d=ue.decryptdata)!==null&&d!==void 0&&d.key)?this.loadKey(ue,G):this.loadFragment(ue,G,ne)},w.loadFragment=function(n,d,m){var T,y=this.fragmentTracker.getState(n);if(this.fragCurrent=n,y===t.FragmentState.BACKTRACKED){var g=this.fragmentTracker.getBacktrackData(n);if(g){this._handleFragmentLoadProgress(g),this._handleFragmentLoadComplete(g);return}else y=t.FragmentState.NOT_LOADED}y===t.FragmentState.NOT_LOADED||y===t.FragmentState.PARTIAL?n.sn==="initSegment"?this._loadInitSegment(n):this.bitrateTest?(n.bitrateTest=!0,this.log("Fragment "+n.sn+" of level "+n.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(n)):(this.startFragRequested=!0,C.prototype.loadFragment.call(this,n,d,m)):y===t.FragmentState.APPENDING?this.reduceMaxBufferLength(n.duration)&&this.fragmentTracker.removeFragment(n):((T=this.media)===null||T===void 0?void 0:T.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},w.getAppendedFrag=function(n){var d=this.fragmentTracker.getAppendedFrag(n,E.PlaylistLevelType.MAIN);return d&&"fragment"in d?d.fragment:d},w.getBufferedFrag=function(n){return this.fragmentTracker.getBufferedFrag(n,E.PlaylistLevelType.MAIN)},w.followingBufferedFrag=function(n){return n?this.getBufferedFrag(n.end+.5):null},w.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},w.nextLevelSwitch=function(){var n=this.levels,d=this.media;if(d!=null&&d.readyState){var m,T=this.getAppendedFrag(d.currentTime);if(T&&T.start>1&&this.flushMainBuffer(0,T.start-1),!d.paused&&n){var y=this.hls.nextLoadLevel,g=n[y],U=this.fragLastKbps;U&&this.fragCurrent?m=this.fragCurrent.duration*g.maxBitrate/(1e3*U)+1:m=0}else m=0;var P=this.getBufferedFrag(d.currentTime+m);if(P){var I=this.followingBufferedFrag(P);if(I){this.abortCurrentFrag();var G=I.maxStartPTS?I.maxStartPTS:I.start,K=I.duration,D=Math.max(P.end,G+Math.min(Math.max(K-this.config.maxFragLookUpTolerance,K*.5),K*.75));this.flushMainBuffer(D,Number.POSITIVE_INFINITY)}}}},w.abortCurrentFrag=function(){var n=this.fragCurrent;this.fragCurrent=null,n!=null&&n.loader&&n.loader.abort(),this.state===M.State.KEY_LOADING&&(this.state=M.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},w.flushMainBuffer=function(n,d){C.prototype.flushMainBuffer.call(this,n,d,this.altAudio?"video":null)},w.onMediaAttached=function(n,d){C.prototype.onMediaAttached.call(this,n,d);var m=d.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),m.addEventListener("playing",this.onvplaying),m.addEventListener("seeked",this.onvseeked),this.gapController=new s.default(this.config,m,this.fragmentTracker,this.hls)},w.onMediaDetaching=function(){var n=this.media;n&&(n.removeEventListener("playing",this.onvplaying),n.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)},w.onMediaPlaying=function(){this.tick()},w.onMediaSeeked=function(){var n=this.media,d=n?n.currentTime:null;Object(Q.isFiniteNumber)(d)&&this.log("Media seeked to "+d.toFixed(3)),this.tick()},w.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(R.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},w.onManifestParsed=function(n,d){var m=!1,T=!1,y;d.levels.forEach(function(g){y=g.audioCodec,y&&(y.indexOf("mp4a.40.2")!==-1&&(m=!0),y.indexOf("mp4a.40.5")!==-1&&(T=!0))}),this.audioCodecSwitch=m&&T&&!Object(_.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=d.levels,this.startFragRequested=!1},w.onLevelLoading=function(n,d){var m=this.levels;if(!m||this.state!==M.State.IDLE)return;var T=m[d.level];(!T.details||T.details.live&&this.levelLastLoaded!==d.level||this.waitForCdnTuneIn(T.details))&&(this.state=M.State.WAITING_LEVEL)},w.onLevelLoaded=function(n,d){var m,T=this.levels,y=d.level,g=d.details,U=g.totalduration;if(!T){this.warn("Levels were reset while loading level "+y);return}this.log("Level "+y+" loaded ["+g.startSN+","+g.endSN+"], cc ["+g.startCC+", "+g.endCC+"] duration:"+U);var P=this.fragCurrent;P&&(this.state===M.State.FRAG_LOADING||this.state===M.State.FRAG_LOADING_WAITING_RETRY)&&(P.level!==d.level&&P.loader&&(this.state=M.State.IDLE,P.loader.abort()));var I=T[y],G=0;if(g.live||(m=I.details)!==null&&m!==void 0&&m.live){if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed)return;G=this.alignPlaylists(g,I.details)}if(I.details=g,this.levelLastLoaded=y,this.hls.trigger(R.Events.LEVEL_UPDATED,{details:g,level:y}),this.state===M.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(g))return;this.state=M.State.IDLE}this.startFragRequested?g.live&&this.synchronizeToLiveEdge(g):this.setStartPosition(g,G),this.tick()},w._handleFragmentLoadProgress=function(n){var d,m=n.frag,T=n.part,y=n.payload,g=this.levels;if(!g){this.warn("Levels were reset while fragment load was in progress. Fragment "+m.sn+" of level "+m.level+" will not be buffered");return}var U=g[m.level],P=U.details;if(!P){this.warn("Dropping fragment "+m.sn+" of level "+m.level+" after level details were reset");return}var I=U.videoCodec,G=P.PTSKnown||!P.live,K=(d=m.initSegment)===null||d===void 0?void 0:d.data,D=this._getAudioCodec(U),J=this.transmuxer=this.transmuxer||new A.default(this.hls,E.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),X=T?T.index:-1,ne=X!==-1,ue=new h.ChunkMetadata(m.level,m.sn,m.stats.chunkCount,y.byteLength,X,ne),Oe=this.initPTS[m.cc];J.push(y,K,D,I,m,T,P.totalduration,G,ue,Oe)},w.onAudioTrackSwitching=function(n,d){var m=this.altAudio,T=!!d.url,y=d.id;if(!T){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var g=this.fragCurrent;g!=null&&g.loader&&(this.log("Switching to main audio track, cancel main fragment load"),g.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var U=this.hls;m&&U.trigger(R.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),U.trigger(R.Events.AUDIO_TRACK_SWITCHED,{id:y})}},w.onAudioTrackSwitched=function(n,d){var m=d.id,T=!!this.hls.audioTracks[m].url;if(T){var y=this.videoBuffer;y&&this.mediaBuffer!==y&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=y)}this.altAudio=T,this.tick()},w.onBufferCreated=function(n,d){var m=d.tracks,T,y,g=!1;for(var U in m){var P=m[U];if(P.id==="main"){if(y=U,T=P,U==="video"){var I=m[U];I&&(this.videoBuffer=I.buffer)}}else g=!0}g&&T?(this.log("Alternate track found, use "+y+".buffered to schedule main fragment loading"),this.mediaBuffer=T.buffer):this.mediaBuffer=this.media},w.onFragBuffered=function(n,d){var m=d.frag,T=d.part;if(m&&m.type!==E.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(m)){this.warn("Fragment "+m.sn+(T?" p: "+T.index:"")+" of level "+m.level+" finished buffering, but was aborted. state: "+this.state),this.state===M.State.PARSED&&(this.state=M.State.IDLE);return}var y=T?T.stats:m.stats;this.fragLastKbps=Math.round(8*y.total/(y.buffering.end-y.loading.first)),m.sn!=="initSegment"&&(this.fragPrevious=m),this.fragBufferedComplete(m,T)},w.onError=function(n,d){switch(d.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(E.PlaylistLevelType.MAIN,d);break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==M.State.ERROR&&(d.fatal?(this.warn(""+d.details),this.state=M.State.ERROR):!d.levelRetry&&this.state===M.State.WAITING_LEVEL&&(this.state=M.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(d.parent==="main"&&(this.state===M.State.PARSING||this.state===M.State.PARSED)){var m=!0,T=this.getFwdBufferInfo(this.media,E.PlaylistLevelType.MAIN);T&&T.len>.5&&(m=!this.reduceMaxBufferLength(T.len)),m&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},w.checkBuffer=function(){var n=this.media,d=this.gapController;if(!n||!d||!n.readyState)return;var m=b.BufferHelper.getBuffered(n);!this.loadedmetadata&&m.length?(this.loadedmetadata=!0,this.seekToStartPos()):d.poll(this.lastCurrentTime),this.lastCurrentTime=n.currentTime},w.onFragLoadEmergencyAborted=function(){this.state=M.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},w.onBufferFlushed=function(n,d){var m=d.type;if(m!==a.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var T=(m===a.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(T,m,E.PlaylistLevelType.MAIN)}},w.onLevelsUpdated=function(n,d){this.levels=d.levels},w.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},w.seekToStartPos=function(){var n=this.media,d=n.currentTime,m=this.startPosition;if(m>=0&&d<m){if(n.seeking){f.logger.log("could not seek to "+m+", already seeking at "+d);return}var T=b.BufferHelper.getBuffered(n),y=T.length?T.start(0):0,g=y-m;g>0&&(g<this.config.maxBufferHole||g<this.config.maxFragLookUpTolerance)&&(f.logger.log("adjusting start position by "+g+" to match buffer start"),m+=g,this.startPosition=m),this.log("seek to target start position "+m+" from current time "+d),n.currentTime=m}},w._getAudioCodec=function(n){var d=this.config.defaultAudioCodec||n.audioCodec;return this.audioCodecSwap&&d&&(this.log("Swapping audio codec"),d.indexOf("mp4a.40.5")!==-1?d="mp4a.40.2":d="mp4a.40.5"),d},w._loadBitrateTestFrag=function(n){var d=this;this._doFragLoad(n).then(function(m){var T=d.hls;if(!m||T.nextLoadLevel||d.fragContextChanged(n))return;d.fragLoadError=0,d.state=M.State.IDLE,d.startFragRequested=!1,d.bitrateTest=!1;var y=n.stats;y.parsing.start=y.parsing.end=y.buffering.start=y.buffering.end=self.performance.now(),T.trigger(R.Events.FRAG_LOADED,m)})},w._handleTransmuxComplete=function(n){var d,m="main",T=this.hls,y=n.remuxResult,g=n.chunkMeta,U=this.getCurrentContext(g);if(!U){this.warn("The loading context changed while buffering fragment "+g.sn+" of level "+g.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(g.level);return}var P=U.frag,I=U.part,G=U.level,K=y.video,D=y.text,J=y.id3,X=y.initSegment,ne=this.altAudio?void 0:y.audio;if(this.fragContextChanged(P))return;if(this.state=M.State.PARSING,X){X.tracks&&(this._bufferInitSegment(G,X.tracks,P,g),T.trigger(R.Events.FRAG_PARSING_INIT_SEGMENT,{frag:P,id:m,tracks:X.tracks}));var ue=X.initPTS,Oe=X.timescale;Object(Q.isFiniteNumber)(ue)&&(this.initPTS[P.cc]=ue,T.trigger(R.Events.INIT_PTS_FOUND,{frag:P,id:m,initPTS:ue,timescale:Oe}))}if(K&&y.independent!==!1){if(G.details){var _e=K.startPTS,De=K.endPTS,Ue=K.startDTS,Ke=K.endDTS;if(I)I.elementaryStreams[K.type]={startPTS:_e,endPTS:De,startDTS:Ue,endDTS:Ke};else if(K.firstKeyFrame&&K.independent&&(this.couldBacktrack=!0),K.dropped&&K.independent){var Le=this.getLoadPosition()+this.config.maxBufferHole;if(Le<_e){this.backtrack(P);return}P.setElementaryStreamInfo(K.type,P.start,De,P.start,Ke,!0)}P.setElementaryStreamInfo(K.type,_e,De,Ue,Ke),this.bufferFragmentData(K,P,I,g)}}else if(y.independent===!1){this.backtrack(P);return}if(ne){var ae=ne.startPTS,V=ne.endPTS,$=ne.startDTS,q=ne.endDTS;I&&(I.elementaryStreams[a.ElementaryStreamTypes.AUDIO]={startPTS:ae,endPTS:V,startDTS:$,endDTS:q}),P.setElementaryStreamInfo(a.ElementaryStreamTypes.AUDIO,ae,V,$,q),this.bufferFragmentData(ne,P,I,g)}if(J!=null&&(d=J.samples)!==null&&d!==void 0&&d.length){var se={frag:P,id:m,samples:J.samples};T.trigger(R.Events.FRAG_PARSING_METADATA,se)}if(D){var te={frag:P,id:m,samples:D.samples};T.trigger(R.Events.FRAG_PARSING_USERDATA,te)}},w._bufferInitSegment=function(n,d,m,T){var y=this;if(this.state!==M.State.PARSING)return;this.audioOnly=!!d.audio&&!d.video,this.altAudio&&!this.audioOnly&&delete d.audio;var g=d.audio,U=d.video,P=d.audiovideo;if(g){var I=n.audioCodec,G=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(I&&(I.indexOf("mp4a.40.5")!==-1?I="mp4a.40.2":I="mp4a.40.5"),g.metadata.channelCount!==1&&G.indexOf("firefox")===-1&&(I="mp4a.40.5")),G.indexOf("android")!==-1&&g.container!=="audio/mpeg"&&(I="mp4a.40.2",this.log("Android: force audio codec to "+I)),n.audioCodec&&n.audioCodec!==I&&this.log('Swapping manifest audio codec "'+n.audioCodec+'" for "'+I+'"'),g.levelCodec=I,g.id="main",this.log("Init audio buffer, container:"+g.container+", codecs[selected/level/parsed]=["+(I||"")+"/"+(n.audioCodec||"")+"/"+g.codec+"]")}U&&(U.levelCodec=n.videoCodec,U.id="main",this.log("Init video buffer, container:"+U.container+", codecs[level/parsed]=["+(n.videoCodec||"")+"/"+U.codec+"]")),P&&this.log("Init audiovideo buffer, container:"+P.container+", codecs[level/parsed]=["+(n.attrs.CODECS||"")+"/"+P.codec+"]"),this.hls.trigger(R.Events.BUFFER_CODECS,d),Object.keys(d).forEach(function(K){var D=d[K],J=D.initSegment;J!=null&&J.byteLength&&y.hls.trigger(R.Events.BUFFER_APPENDING,{type:K,data:J,frag:m,part:null,chunkMeta:T,parent:m.type})}),this.tick()},w.backtrack=function(n){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(n);var d=this.fragmentTracker.backtrack(n);this.fragPrevious=null,this.nextLoadPosition=n.start,d?this.resetFragmentLoading(n):this.state=M.State.BACKTRACKING},w.checkFragmentChanged=function(){var n=this.media,d=null;if(n&&n.readyState>1&&n.seeking===!1){var m=n.currentTime;if(b.BufferHelper.isBuffered(n,m)?d=this.getAppendedFrag(m):b.BufferHelper.isBuffered(n,m+.1)&&(d=this.getAppendedFrag(m+.1)),d){var T=this.fragPlaying,y=d.level;(!T||d.sn!==T.sn||T.level!==y||d.urlId!==T.urlId)&&(this.hls.trigger(R.Events.FRAG_CHANGED,{frag:d}),(!T||T.level!==y)&&this.hls.trigger(R.Events.LEVEL_SWITCHED,{level:y}),this.fragPlaying=d)}}},c(L,[{key:"nextLevel",get:function(){var n=this.nextBufferedFrag;return n?n.level:-1}},{key:"currentLevel",get:function(){var n=this.media;if(n){var d=this.getAppendedFrag(n.currentTime);if(d)return d.level}return-1}},{key:"nextBufferedFrag",get:function(){var n=this.media;if(n){var d=this.getAppendedFrag(n.currentTime);return this.followingBufferedFrag(d)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),L}(M.default)},"./src/controller/subtitle-stream-controller.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"SubtitleStreamController",function(){return i});var Q=O("./src/events.ts"),M=O("./src/utils/logger.ts"),_=O("./src/utils/buffer-helper.ts"),R=O("./src/controller/fragment-finders.ts"),b=O("./src/utils/discontinuities.ts"),t=O("./src/controller/level-helper.ts"),E=O("./src/controller/fragment-tracker.ts"),a=O("./src/controller/base-stream-controller.ts"),A=O("./src/types/loader.ts"),h=O("./src/types/level.ts");function s(l,v){for(var B=0;B<v.length;B++){var C=v[B];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(l,C.key,C)}}function o(l,v,B){return v&&s(l.prototype,v),B&&s(l,B),l}function f(l,v){l.prototype=Object.create(v.prototype),l.prototype.constructor=l,u(l,v)}function u(l,v){return u=Object.setPrototypeOf||function(C,L){return C.__proto__=L,C},u(l,v)}var c=500,i=function(l){f(v,l);function v(C,L){var w;return w=l.call(this,C,L,"[subtitle-stream-controller]")||this,w.levels=[],w.currentTrackId=-1,w.tracksBuffered=[],w.mainDetails=null,w._registerListeners(),w}var B=v.prototype;return B.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},B._registerListeners=function(){var L=this.hls;L.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.on(Q.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.on(Q.Events.ERROR,this.onError,this),L.on(Q.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.on(Q.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.on(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.on(Q.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.on(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},B._unregisterListeners=function(){var L=this.hls;L.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.off(Q.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.off(Q.Events.ERROR,this.onError,this),L.off(Q.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.off(Q.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.off(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.off(Q.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.off(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},B.startLoad=function(){this.stopLoad(),this.state=a.State.IDLE,this.setInterval(c),this.tick()},B.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},B.onLevelLoaded=function(L,w){this.mainDetails=w.details},B.onSubtitleFragProcessed=function(L,w){var p=w.frag,n=w.success;if(this.fragPrevious=p,this.state=a.State.IDLE,!n)return;var d=this.tracksBuffered[this.currentTrackId];if(!d)return;for(var m,T=p.start,y=0;y<d.length;y++)if(T>=d[y].start&&T<=d[y].end){m=d[y];break}var g=p.start+p.duration;m?m.end=g:(m={start:T,end:g},d.push(m)),this.fragmentTracker.fragBuffered(p)},B.onBufferFlushing=function(L,w){var p=w.startOffset,n=w.endOffset;if(p===0&&n!==Number.POSITIVE_INFINITY){var d=this.currentTrackId,m=this.levels;if(!m.length||!m[d]||!m[d].details)return;var T=m[d].details,y=T.targetduration,g=n-y;if(g<=0)return;w.endOffsetSubtitles=Math.max(0,g),this.tracksBuffered.forEach(function(U){for(var P=0;P<U.length;){if(U[P].end<=g){U.shift();continue}else if(U[P].start<g)U[P].start=g;else break;P++}}),this.fragmentTracker.removeFragmentsInRange(p,g,A.PlaylistLevelType.SUBTITLE)}},B.onError=function(L,w){var p,n=w.frag;if(!n||n.type!==A.PlaylistLevelType.SUBTITLE)return;(p=this.fragCurrent)!==null&&p!==void 0&&p.loader&&this.fragCurrent.loader.abort(),this.state=a.State.IDLE},B.onSubtitleTracksUpdated=function(L,w){var p=this,n=w.subtitleTracks;this.tracksBuffered=[],this.levels=n.map(function(d){return new h.Level(d)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(d){p.tracksBuffered[d.id]=[]}),this.mediaBuffer=null},B.onSubtitleTrackSwitch=function(L,w){if(this.currentTrackId=w.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var p=this.levels[this.currentTrackId];p!=null&&p.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,p&&this.setInterval(c)},B.onSubtitleTrackLoaded=function(L,w){var p,n=w.details,d=w.id,m=this.currentTrackId,T=this.levels;if(!T.length)return;var y=T[m];if(d>=T.length||d!==m||!y)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,n.live||(p=y.details)!==null&&p!==void 0&&p.live){var g=this.mainDetails;if(n.deltaUpdateFailed||!g)return;var U=g.fragments[0];if(!y.details)n.hasProgramDateTime&&g.hasProgramDateTime?Object(b.alignMediaPlaylistByPDT)(n,g):U&&Object(t.addSliding)(n,U.start);else{var P=this.alignPlaylists(n,y.details);P===0&&U&&Object(t.addSliding)(n,U.start)}}if(y.details=n,this.levelLastLoaded=d,this.tick(),n.live&&!this.fragCurrent&&this.media&&this.state===a.State.IDLE){var I=Object(R.findFragmentByPTS)(null,n.fragments,this.media.currentTime,0);I||(this.warn("Subtitle playlist not aligned with playback"),y.details=void 0)}},B._handleFragmentLoadComplete=function(L){var w=L.frag,p=L.payload,n=w.decryptdata,d=this.hls;if(this.fragContextChanged(w))return;if(p&&p.byteLength>0&&n&&n.key&&n.iv&&n.method==="AES-128"){var m=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(p),n.key.buffer,n.iv.buffer).then(function(T){var y=performance.now();d.trigger(Q.Events.FRAG_DECRYPTED,{frag:w,payload:T,stats:{tstart:m,tdecrypt:y}})})}},B.doTick=function(){if(!this.media){this.state=a.State.IDLE;return}if(this.state===a.State.IDLE){var L,w=this.currentTrackId,p=this.levels;if(!p.length||!p[w]||!p[w].details)return;var n=p[w].details,d=n.targetduration,m=this.config,T=this.media,y=_.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,T.currentTime-d,m.maxBufferHole),g=y.end,U=y.len,P=this.getMaxBufferLength()+d;if(U>P)return;console.assert(n,"Subtitle track details are defined on idle subtitle stream controller tick");var I=n.fragments,G=I.length,K=n.edge,D,J=this.fragPrevious;if(g<K){var X=m.maxFragLookUpTolerance;J&&n.hasProgramDateTime&&(D=Object(R.findFragmentByPDT)(I,J.endProgramDateTime,X)),D||(D=Object(R.findFragmentByPTS)(J,I,g,X),!D&&J&&J.start<I[0].start&&(D=I[0]))}else D=I[G-1];(L=D)!==null&&L!==void 0&&L.encrypted?(M.logger.log("Loading key for "+D.sn),this.state=a.State.KEY_LOADING,this.hls.trigger(Q.Events.KEY_LOADING,{frag:D})):D&&this.fragmentTracker.getState(D)===E.FragmentState.NOT_LOADED&&this.loadFragment(D,n,g)}},B.loadFragment=function(L,w,p){this.fragCurrent=L,l.prototype.loadFragment.call(this,L,w,p)},o(v,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),v}(a.default)},"./src/controller/subtitle-track-controller.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/events.ts"),M=O("./src/utils/texttrack-utils.ts"),_=O("./src/controller/base-playlist-controller.ts"),R=O("./src/types/loader.ts");function b(s,o){for(var f=0;f<o.length;f++){var u=o[f];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,u.key,u)}}function t(s,o,f){return o&&b(s.prototype,o),f&&b(s,f),s}function E(s,o){s.prototype=Object.create(o.prototype),s.prototype.constructor=s,a(s,o)}function a(s,o){return a=Object.setPrototypeOf||function(u,c){return u.__proto__=c,u},a(s,o)}var A=function(s){E(o,s);function o(u){var c;return c=s.call(this,u,"[subtitle-track-controller]")||this,c.media=null,c.tracks=[],c.groupId=null,c.tracksInGroup=[],c.trackId=-1,c.selectDefaultTrack=!0,c.queuedDefaultTrack=-1,c.trackChangeListener=function(){return c.onTextTracksChanged()},c.asyncPollTrackChange=function(){return c.pollTrackChange(0)},c.useTextTrackPolling=!1,c.subtitlePollingInterval=-1,c.subtitleDisplay=!0,c.registerListeners(),c}var f=o.prototype;return f.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,s.prototype.destroy.call(this)},f.registerListeners=function(){var c=this.hls;c.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),c.on(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),c.on(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),c.on(Q.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var c=this.hls;c.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),c.off(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),c.off(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),c.off(Q.Events.ERROR,this.onError,this)},f.onMediaAttached=function(c,i){if(this.media=i.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)},f.pollTrackChange=function(c){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,c)},f.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 c=h(this.media.textTracks);c.forEach(function(i){Object(M.clearCurrentCues)(i)}),this.subtitleTrack=-1,this.media=null},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(c,i){this.tracks=i.subtitleTracks},f.onSubtitleTrackLoaded=function(c,i){var l=i.id,v=i.details,B=this.trackId,C=this.tracksInGroup[B];if(!C){this.warn("Invalid subtitle track id "+l);return}var L=C.details;C.details=i.details,this.log("subtitle track "+l+" loaded ["+v.startSN+"-"+v.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,i,L))},f.onLevelLoading=function(c,i){this.switchLevel(i.level)},f.onLevelSwitching=function(c,i){this.switchLevel(i.level)},f.switchLevel=function(c){var i=this.hls.levels[c];if(!(i!=null&&i.textGroupIds))return;var l=i.textGroupIds[i.urlId];if(this.groupId!==l){var v=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,B=this.tracks.filter(function(w){return!l||w.groupId===l});this.tracksInGroup=B;var C=this.findTrackId(v==null?void 0:v.name)||this.findTrackId();this.groupId=l;var L={subtitleTracks:B};this.log("Updating subtitle tracks, "+B.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(Q.Events.SUBTITLE_TRACKS_UPDATED,L),C!==-1&&this.setSubtitleTrack(C,v)}},f.findTrackId=function(c){for(var i=this.tracksInGroup,l=0;l<i.length;l++){var v=i[l];if((!this.selectDefaultTrack||v.default)&&(!c||c===v.name))return v.id}return-1},f.onError=function(c,i){if(s.prototype.onError.call(this,c,i),i.fatal||!i.context)return;i.context.type===R.PlaylistContextType.SUBTITLE_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},f.loadPlaylist=function(c){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var l=i.id,v=i.groupId,B=i.url;if(c)try{B=c.addDirectives(B)}catch(C){this.warn("Could not construct new URL with HLS Delivery Directives: "+C)}this.log("Loading subtitle playlist for id "+l),this.hls.trigger(Q.Events.SUBTITLE_TRACK_LOADING,{url:B,id:l,groupId:v,deliveryDirectives:c||null})}},f.toggleTrackModes=function(c){var i=this,l=this.media,v=this.subtitleDisplay,B=this.trackId;if(!l)return;var C=h(l.textTracks),L=C.filter(function(n){return n.groupId===i.groupId});if(c===-1)[].slice.call(C).forEach(function(n){n.mode="disabled"});else{var w=L[B];w&&(w.mode="disabled")}var p=L[c];p&&(p.mode=v?"showing":"hidden")},f.setSubtitleTrack=function(c,i){var l,v=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=c;return}if(this.trackId!==c&&this.toggleTrackModes(c),this.trackId===c&&(c===-1||(l=v[c])!==null&&l!==void 0&&l.details)||c<-1||c>=v.length)return;this.clearTimer();var B=v[c];if(this.log("Switching to subtitle track "+c),this.trackId=c,B){var C=B.id,L=B.groupId,w=L===void 0?"":L,p=B.name,n=B.type,d=B.url;this.hls.trigger(Q.Events.SUBTITLE_TRACK_SWITCH,{id:C,groupId:w,name:p,type:n,url:d});var m=this.switchParams(B.url,i==null?void 0:i.details);this.loadPlaylist(m)}else this.hls.trigger(Q.Events.SUBTITLE_TRACK_SWITCH,{id:c})},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var c=-1,i=h(this.media.textTracks),l=0;l<i.length;l++)if(i[l].mode==="hidden")c=l;else if(i[l].mode==="showing"){c=l;break}this.subtitleTrack!==c&&(this.subtitleTrack=c)},t(o,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(c){this.selectDefaultTrack=!1;var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(c,i)}}]),o}(_.default);function h(s){for(var o=[],f=0;f<s.length;f++){var u=s[f];u.kind==="subtitles"&&u.label&&o.push(s[f])}return o}H.default=A},"./src/controller/timeline-controller.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"TimelineController",function(){return h});var Q=O("./src/polyfills/number.ts"),M=O("./src/events.ts"),_=O("./src/utils/cea-608-parser.ts"),R=O("./src/utils/output-filter.ts"),b=O("./src/utils/webvtt-parser.ts"),t=O("./src/utils/texttrack-utils.ts"),E=O("./src/utils/imsc1-ttml-parser.ts"),a=O("./src/types/loader.ts"),A=O("./src/utils/logger.ts"),h=function(){function u(i){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=f(),this.captionsProperties=void 0,this.hls=i,this.config=i.config,this.Cues=i.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 l=new R.default(this,"textTrack1"),v=new R.default(this,"textTrack2"),B=new R.default(this,"textTrack3"),C=new R.default(this,"textTrack4");this.cea608Parser1=new _.default(1,l,v),this.cea608Parser2=new _.default(3,B,C)}i.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(M.Events.MANIFEST_LOADED,this.onManifestLoaded,this),i.on(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),i.on(M.Events.FRAG_LOADING,this.onFragLoading,this),i.on(M.Events.FRAG_LOADED,this.onFragLoaded,this),i.on(M.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),i.on(M.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),i.on(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),i.on(M.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),i.on(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var c=u.prototype;return c.destroy=function(){var l=this.hls;l.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(M.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.off(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.off(M.Events.FRAG_LOADING,this.onFragLoading,this),l.off(M.Events.FRAG_LOADED,this.onFragLoaded,this),l.off(M.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.off(M.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.off(M.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.off(M.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.off(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},c.addCues=function(l,v,B,C,L){for(var w=!1,p=L.length;p--;){var n=L[p],d=o(n[0],n[1],v,B);if(d>=0&&(n[0]=Math.min(n[0],v),n[1]=Math.max(n[1],B),w=!0,d/(B-v)>.5))return}if(w||L.push([v,B]),this.config.renderTextTracksNatively){var m=this.captionsTracks[l];this.Cues.newCue(m,v,B,C)}else{var T=this.Cues.newCue(null,v,B,C);this.hls.trigger(M.Events.CUES_PARSED,{type:"captions",cues:T,track:l})}},c.onInitPtsFound=function(l,v){var B=this,C=v.frag,L=v.id,w=v.initPTS,p=v.timescale,n=this.unparsedVttFrags;L==="main"&&(this.initPTS[C.cc]=w,this.timescale[C.cc]=p),n.length&&(this.unparsedVttFrags=[],n.forEach(function(d){B.onFragLoaded(M.Events.FRAG_LOADED,d)}))},c.getExistingTrack=function(l){var v=this.media;if(v)for(var B=0;B<v.textTracks.length;B++){var C=v.textTracks[B];if(C[l])return C}return null},c.createCaptionsTrack=function(l){this.config.renderTextTracksNatively?this.createNativeTrack(l):this.createNonNativeTrack(l)},c.createNativeTrack=function(l){if(this.captionsTracks[l])return;var v=this.captionsProperties,B=this.captionsTracks,C=this.media,L=v[l],w=L.label,p=L.languageCode,n=this.getExistingTrack(l);if(n)B[l]=n,Object(t.clearCurrentCues)(B[l]),Object(t.sendAddTrackEvent)(B[l],C);else{var d=this.createTextTrack("captions",w,p);d&&(d[l]=!0,B[l]=d)}},c.createNonNativeTrack=function(l){if(this.nonNativeCaptionsTracks[l])return;var v=this.captionsProperties[l];if(!v)return;var B=v.label,C={_id:l,label:B,kind:"captions",default:v.media?!!v.media.default:!1,closedCaptions:v.media};this.nonNativeCaptionsTracks[l]=C,this.hls.trigger(M.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[C]})},c.createTextTrack=function(l,v,B){var C=this.media;return C?C.addTextTrack(l,v,B):void 0},c.onMediaAttaching=function(l,v){this.media=v.media,this._cleanTracks()},c.onMediaDetaching=function(){var l=this.captionsTracks;Object.keys(l).forEach(function(v){Object(t.clearCurrentCues)(l[v]),delete l[v]}),this.nonNativeCaptionsTracks={}},c.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=f(),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())},c._cleanTracks=function(){var l=this.media;if(!l)return;var v=l.textTracks;if(v)for(var B=0;B<v.length;B++)Object(t.clearCurrentCues)(v[B])},c.onSubtitleTracksUpdated=function(l,v){var B=this;this.textTracks=[];var C=v.subtitleTracks||[],L=C.some(function(d){return d.textCodec===E.IMSC1_CODEC});if(this.config.enableWebVTT||L&&this.config.enableIMSC1){var w=this.tracks&&C&&this.tracks.length===C.length;if(this.tracks=C||[],this.config.renderTextTracksNatively){var p=this.media?this.media.textTracks:[];this.tracks.forEach(function(d,m){var T;if(m<p.length){for(var y=null,g=0;g<p.length;g++)if(s(p[g],d)){y=p[g];break}y&&(T=y)}T?Object(t.clearCurrentCues)(T):(T=B.createTextTrack("subtitles",d.name,d.lang),T&&(T.mode="disabled")),T&&(T.groupId=d.groupId,B.textTracks.push(T))})}else if(!w&&this.tracks&&this.tracks.length){var n=this.tracks.map(function(d){return{label:d.name,kind:d.type.toLowerCase(),default:d.default,subtitleTrack:d}});this.hls.trigger(M.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:n})}}},c.onManifestLoaded=function(l,v){var B=this;this.config.enableCEA708Captions&&v.captions&&v.captions.forEach(function(C){var L=/(?:CC|SERVICE)([1-4])/.exec(C.instreamId);if(!L)return;var w="textTrack"+L[1],p=B.captionsProperties[w];if(!p)return;p.label=C.name,C.lang&&(p.languageCode=C.lang),p.media=C})},c.onFragLoading=function(l,v){var B=this.cea608Parser1,C=this.cea608Parser2,L=this.lastSn,w=this.lastPartIndex;if(!this.enabled||!(B&&C))return;if(v.frag.type===a.PlaylistLevelType.MAIN){var p,n,d=v.frag.sn,m=(p=v==null||((n=v.part)===null||n===void 0)?void 0:n.index)!=null?p:-1;d===L+1||d===L&&m===w+1||(B.reset(),C.reset()),this.lastSn=d,this.lastPartIndex=m}},c.onFragLoaded=function(l,v){var B=v.frag,C=v.payload,L=this.initPTS,w=this.unparsedVttFrags;if(B.type===a.PlaylistLevelType.SUBTITLE)if(C.byteLength){if(!Object(Q.isFiniteNumber)(L[B.cc])){w.push(v),L.length&&this.hls.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:B,error:new Error("Missing initial subtitle PTS")});return}var p=B.decryptdata;if(p==null||p.key==null||p.method!=="AES-128"){var n=this.tracks[B.level],d=this.vttCCs;d[B.cc]||(d[B.cc]={start:B.start,prevCC:this.prevCC,new:!0},this.prevCC=B.cc),n&&n.textCodec===E.IMSC1_CODEC?this._parseIMSC1(B,C):this._parseVTTs(B,C,d)}}else this.hls.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:B,error:new Error("Empty subtitle payload")})},c._parseIMSC1=function(l,v){var B=this,C=this.hls;Object(E.parseIMSC1)(v,this.initPTS[l.cc],this.timescale[l.cc],function(L){B._appendCues(L,l.level),C.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:l})},function(L){A.logger.log("Failed to parse IMSC1: "+L),C.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:l,error:L})})},c._parseVTTs=function(l,v,B){var C=this,L=this.hls;Object(b.parseWebVTT)(v,this.initPTS[l.cc],this.timescale[l.cc],B,l.cc,l.start,function(w){C._appendCues(w,l.level),L.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:l})},function(w){C._fallbackToIMSC1(l,v),A.logger.log("Failed to parse VTT cue: "+w),L.trigger(M.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:l,error:w})})},c._fallbackToIMSC1=function(l,v){var B=this,C=this.tracks[l.level];C.textCodec||Object(E.parseIMSC1)(v,this.initPTS[l.cc],this.timescale[l.cc],function(){C.textCodec=E.IMSC1_CODEC,B._parseIMSC1(l,v)},function(){C.textCodec="wvtt"})},c._appendCues=function(l,v){var B=this.hls;if(this.config.renderTextTracksNatively){var C=this.textTracks[v];if(C.mode==="disabled")return;l.forEach(function(p){return Object(t.addCueToTrack)(C,p)})}else{var L=this.tracks[v],w=L.default?"default":"subtitles"+v;B.trigger(M.Events.CUES_PARSED,{type:"subtitles",cues:l,track:w})}},c.onFragDecrypted=function(l,v){var B=v.frag;if(B.type===a.PlaylistLevelType.SUBTITLE){if(!Object(Q.isFiniteNumber)(this.initPTS[B.cc])){this.unparsedVttFrags.push(v);return}this.onFragLoaded(M.Events.FRAG_LOADED,v)}},c.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},c.onFragParsingUserdata=function(l,v){var B=this.cea608Parser1,C=this.cea608Parser2;if(!this.enabled||!(B&&C))return;for(var L=0;L<v.samples.length;L++){var w=v.samples[L].bytes;if(w){var p=this.extractCea608Data(w);B.addData(v.samples[L].pts,p[0]),C.addData(v.samples[L].pts,p[1])}}},c.onBufferFlushing=function(l,v){var B=v.startOffset,C=v.endOffset,L=v.endOffsetSubtitles,w=v.type,p=this.media;if(!p||p.currentTime<C)return;if(!w||w==="video"){var n=this.captionsTracks;Object.keys(n).forEach(function(m){return Object(t.removeCuesInRange)(n[m],B,C)})}if(this.config.renderTextTracksNatively&&(B===0&&L!==void 0)){var d=this.textTracks;Object.keys(d).forEach(function(m){return Object(t.removeCuesInRange)(d[m],B,L)})}},c.extractCea608Data=function(l){for(var v=l[0]&31,B=2,C=[[],[]],L=0;L<v;L++){var w=l[B++],p=127&l[B++],n=127&l[B++],d=(4&w)!==0,m=3&w;if(p===0&&n===0)continue;d&&((m===0||m===1)&&(C[m].push(p),C[m].push(n)))}return C},u}();function s(u,c){return u&&u.label===c.name&&!(u.textTrack1||u.textTrack2)}function o(u,c,i,l){return Math.min(c,l)-Math.max(u,i)}function f(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return Q});var Q=function(){function M(R,b){this.subtle=void 0,this.aesIV=void 0,this.subtle=R,this.aesIV=b}var _=M.prototype;return _.decrypt=function(b,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,b)},M}()},"./src/crypt/aes-decryptor.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"removePadding",function(){return M}),O.d(H,"default",function(){return _});var Q=O("./src/utils/typed-array.ts");function M(R){var b=R.byteLength,t=b&&new DataView(R.buffer).getUint8(b-1);return t?Object(Q.sliceUint8)(R,0,b-t):R}var _=function(){function R(){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 b=R.prototype;return b.uint8ArrayToUint32Array_=function(E){for(var a=new DataView(E),A=new Uint32Array(4),h=0;h<4;h++)A[h]=a.getUint32(h*4);return A},b.initTable=function(){var E=this.sBox,a=this.invSBox,A=this.subMix,h=A[0],s=A[1],o=A[2],f=A[3],u=this.invSubMix,c=u[0],i=u[1],l=u[2],v=u[3],B=new Uint32Array(256),C=0,L=0,w=0;for(w=0;w<256;w++)w<128?B[w]=w<<1:B[w]=w<<1^283;for(w=0;w<256;w++){var p=L^L<<1^L<<2^L<<3^L<<4;p=p>>>8^p&255^99,E[C]=p,a[p]=C;var n=B[C],d=B[n],m=B[d],T=B[p]*257^p*16843008;h[C]=T<<24|T>>>8,s[C]=T<<16|T>>>16,o[C]=T<<8|T>>>24,f[C]=T,T=m*16843009^d*65537^n*257^C*16843008,c[p]=T<<24|T>>>8,i[p]=T<<16|T>>>16,l[p]=T<<8|T>>>24,v[p]=T,C?(C=n^B[B[B[m^n]]],L^=B[B[L]]):C=L=1}},b.expandKey=function(E){for(var a=this.uint8ArrayToUint32Array_(E),A=!0,h=0;h<a.length&&A;)A=a[h]===this.key[h],h++;if(A)return;this.key=a;var s=this.keySize=a.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);var o=this.ksRows=(s+6+1)*4,f,u,c=this.keySchedule=new Uint32Array(o),i=this.invKeySchedule=new Uint32Array(o),l=this.sBox,v=this.rcon,B=this.invSubMix,C=B[0],L=B[1],w=B[2],p=B[3],n,d;for(f=0;f<o;f++){if(f<s){n=c[f]=a[f];continue}d=n,f%s===0?(d=d<<8|d>>>24,d=l[d>>>24]<<24|l[d>>>16&255]<<16|l[d>>>8&255]<<8|l[d&255],d^=v[f/s|0]<<24):s>6&&f%s===4&&(d=l[d>>>24]<<24|l[d>>>16&255]<<16|l[d>>>8&255]<<8|l[d&255]),c[f]=n=(c[f-s]^d)>>>0}for(u=0;u<o;u++)f=o-u,u&3?d=c[f]:d=c[f-4],u<4||f<=4?i[u]=d:i[u]=C[l[d>>>24]]^L[l[d>>>16&255]]^w[l[d>>>8&255]]^p[l[d&255]],i[u]=i[u]>>>0},b.networkToHostOrderSwap=function(E){return E<<24|(E&65280)<<8|(E&16711680)>>8|E>>>24},b.decrypt=function(E,a,A){for(var h=this.keySize+6,s=this.invKeySchedule,o=this.invSBox,f=this.invSubMix,u=f[0],c=f[1],i=f[2],l=f[3],v=this.uint8ArrayToUint32Array_(A),B=v[0],C=v[1],L=v[2],w=v[3],p=new Int32Array(E),n=new Int32Array(p.length),d,m,T,y,g,U,P,I,G,K,D,J,X,ne,ue=this.networkToHostOrderSwap;a<p.length;){for(G=ue(p[a]),K=ue(p[a+1]),D=ue(p[a+2]),J=ue(p[a+3]),g=G^s[0],U=J^s[1],P=D^s[2],I=K^s[3],X=4,ne=1;ne<h;ne++)d=u[g>>>24]^c[U>>16&255]^i[P>>8&255]^l[I&255]^s[X],m=u[U>>>24]^c[P>>16&255]^i[I>>8&255]^l[g&255]^s[X+1],T=u[P>>>24]^c[I>>16&255]^i[g>>8&255]^l[U&255]^s[X+2],y=u[I>>>24]^c[g>>16&255]^i[U>>8&255]^l[P&255]^s[X+3],g=d,U=m,P=T,I=y,X=X+4;d=o[g>>>24]<<24^o[U>>16&255]<<16^o[P>>8&255]<<8^o[I&255]^s[X],m=o[U>>>24]<<24^o[P>>16&255]<<16^o[I>>8&255]<<8^o[g&255]^s[X+1],T=o[P>>>24]<<24^o[I>>16&255]<<16^o[g>>8&255]<<8^o[U&255]^s[X+2],y=o[I>>>24]<<24^o[g>>16&255]<<16^o[U>>8&255]<<8^o[P&255]^s[X+3],n[a]=ue(d^B),n[a+1]=ue(y^C),n[a+2]=ue(T^L),n[a+3]=ue(m^w),B=G,C=K,L=D,w=J,a=a+4}return n.buffer},R}()},"./src/crypt/decrypter.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return a});var Q=O("./src/crypt/aes-crypto.ts"),M=O("./src/crypt/fast-aes-key.ts"),_=O("./src/crypt/aes-decryptor.ts"),R=O("./src/utils/logger.ts"),b=O("./src/utils/mp4-tools.ts"),t=O("./src/utils/typed-array.ts"),E=16,a=function(){function A(s,o,f){var u=f===void 0?{}:f,c=u.removePKCS7Padding,i=c===void 0?!0:c;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=s,this.config=o,this.removePKCS7Padding=i,i)try{var l=self.crypto;l&&(this.subtle=l.subtle||l.webkitSubtle)}catch(v){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var h=A.prototype;return h.destroy=function(){this.observer=null},h.isSync=function(){return this.config.enableSoftwareAES},h.flush=function(){var o=this.currentResult;if(!o){this.reset();return}var f=new Uint8Array(o);return this.reset(),this.removePKCS7Padding?Object(_.removePadding)(f):f},h.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},h.decrypt=function(o,f,u,c){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(o),f,u);var i=this.flush();i&&c(i.buffer)}else this.webCryptoDecrypt(new Uint8Array(o),f,u).then(c)},h.softwareDecrypt=function(o,f,u){var c=this.currentIV,i=this.currentResult,l=this.remainderData;this.logOnce("JS AES decrypt"),l&&(o=Object(b.appendUint8Array)(l,o),this.remainderData=null);var v=this.getValidChunk(o);if(!v.length)return null;c&&(u=c);var B=this.softwareDecrypter;B||(B=this.softwareDecrypter=new _.default),B.expandKey(f);var C=i;return this.currentResult=B.decrypt(v.buffer,0,u),this.currentIV=Object(t.sliceUint8)(v,-16).buffer,C||null},h.webCryptoDecrypt=function(o,f,u){var c=this,i=this.subtle;return(this.key!==f||!this.fastAesKey)&&(this.key=f,this.fastAesKey=new M.default(i,f)),this.fastAesKey.expandKey().then(function(l){if(!i)return Promise.reject(new Error("web crypto not initialized"));var v=new Q.default(i,u);return v.decrypt(o.buffer,l)}).catch(function(l){return c.onWebCryptoError(l,o,f,u)})},h.onWebCryptoError=function(o,f,u,c){return R.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",o),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(f,u,c)},h.getValidChunk=function(o){var f=o,u=o.length-o.length%E;return u!==o.length&&(f=Object(t.sliceUint8)(o,0,u),this.remainderData=Object(t.sliceUint8)(o,u)),f},h.logOnce=function(o){if(!this.logEnabled)return;R.logger.log("[decrypter.ts]: "+o),this.logEnabled=!1},A}()},"./src/crypt/fast-aes-key.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return Q});var Q=function(){function M(R,b){this.subtle=void 0,this.key=void 0,this.subtle=R,this.key=b}var _=M.prototype;return _.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},M}()},"./src/demux/aacdemuxer.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/demux/base-audio-demuxer.ts"),M=O("./src/demux/adts.ts"),_=O("./src/utils/logger.ts"),R=O("./src/demux/id3.ts");function b(a,A){a.prototype=Object.create(A.prototype),a.prototype.constructor=a,t(a,A)}function t(a,A){return t=Object.setPrototypeOf||function(s,o){return s.__proto__=o,s},t(a,A)}var E=function(a){b(A,a);function A(s,o){var f;return f=a.call(this)||this,f.observer=void 0,f.config=void 0,f.observer=s,f.config=o,f}var h=A.prototype;return h.resetInitSegment=function(o,f,u){a.prototype.resetInitSegment.call(this,o,f,u),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:o,duration:u,inputTimeScale:9e4,dropped:0}},A.probe=function(o){if(!o)return!1;for(var f=R.getID3Data(o,0)||[],u=f.length,c=o.length;u<c;u++)if(M.probe(o,u))return _.logger.log("ADTS sync word found !"),!0;return!1},h.canParse=function(o,f){return M.canParse(o,f)},h.appendFrame=function(o,f,u){M.initTrackConfig(o,this.observer,f,u,o.manifestCodec);var c=M.appendFrame(o,f,u,this.initPTS,this.frameIndex);if(c&&c.missing===0)return c},A}(Q.default);E.minProbeByteLength=9,H.default=E},"./src/demux/adts.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"getAudioConfig",function(){return R}),O.d(H,"isHeaderPattern",function(){return b}),O.d(H,"getHeaderLength",function(){return t}),O.d(H,"getFullFrameLength",function(){return E}),O.d(H,"canGetFrameLength",function(){return a}),O.d(H,"isHeader",function(){return A}),O.d(H,"canParse",function(){return h}),O.d(H,"probe",function(){return s}),O.d(H,"initTrackConfig",function(){return o}),O.d(H,"getFrameDuration",function(){return f}),O.d(H,"parseFrameHeader",function(){return u}),O.d(H,"appendFrame",function(){return c});var Q=O("./src/utils/logger.ts"),M=O("./src/errors.ts"),_=O("./src/events.ts");function R(i,l,v,B){var C,L,w,p,n=navigator.userAgent.toLowerCase(),d=B,m=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];C=((l[v+2]&192)>>>6)+1;var T=(l[v+2]&60)>>>2;if(T>m.length-1){i.trigger(_.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+T});return}return w=(l[v+2]&1)<<2,w|=(l[v+3]&192)>>>6,Q.logger.log("manifest codec:"+B+", ADTS type:"+C+", samplingIndex:"+T),/firefox/i.test(n)?T>=6?(C=5,p=new Array(4),L=T-3):(C=2,p=new Array(2),L=T):n.indexOf("android")!==-1?(C=2,p=new Array(2),L=T):(C=5,p=new Array(4),B&&(B.indexOf("mp4a.40.29")!==-1||B.indexOf("mp4a.40.5")!==-1)||!B&&T>=6?L=T-3:((B&&B.indexOf("mp4a.40.2")!==-1&&(T>=6&&w===1||/vivaldi/i.test(n))||!B&&w===1)&&(C=2,p=new Array(2)),L=T)),p[0]=C<<3,p[0]|=(T&14)>>1,p[1]|=(T&1)<<7,p[1]|=w<<3,C===5&&(p[1]|=(L&14)>>1,p[2]=(L&1)<<7,p[2]|=2<<2,p[3]=0),{config:p,samplerate:m[T],channelCount:w,codec:"mp4a.40."+C,manifestCodec:d}}function b(i,l){return i[l]===255&&(i[l+1]&246)===240}function t(i,l){return i[l+1]&1?7:9}function E(i,l){return(i[l+3]&3)<<11|i[l+4]<<3|(i[l+5]&224)>>>5}function a(i,l){return l+5<i.length}function A(i,l){return l+1<i.length&&b(i,l)}function h(i,l){return a(i,l)&&b(i,l)&&E(i,l)<=i.length-l}function s(i,l){if(A(i,l)){var v=t(i,l);if(l+v>=i.length)return!1;var B=E(i,l);if(B<=v)return!1;var C=l+B;return C===i.length||A(i,C)}return!1}function o(i,l,v,B,C){if(!i.samplerate){var L=R(l,v,B,C);if(!L)return;i.config=L.config,i.samplerate=L.samplerate,i.channelCount=L.channelCount,i.codec=L.codec,i.manifestCodec=L.manifestCodec,Q.logger.log("parsed codec:"+i.codec+", rate:"+L.samplerate+", channels:"+L.channelCount)}}function f(i){return 1024*9e4/i}function u(i,l,v,B,C){var L=t(i,l),w=E(i,l);if(w-=L,w>0){var p=v+B*C;return{headerLength:L,frameLength:w,stamp:p}}}function c(i,l,v,B,C){var L=f(i.samplerate),w=u(l,v,B,C,L);if(w){var p=w.frameLength,n=w.headerLength,d=w.stamp,m=n+p,T=Math.max(0,v+m-l.length),y;T?(y=new Uint8Array(m-n),y.set(l.subarray(v+n,l.length),0)):y=l.subarray(v+n,v+m);var g={unit:y,pts:d};return T||i.samples.push(g),{sample:g,length:m,missing:T}}}},"./src/demux/base-audio-demuxer.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"initPTSFn",function(){return E});var Q=O("./src/polyfills/number.ts"),M=O("./src/demux/id3.ts"),_=O("./src/demux/dummy-demuxed-track.ts"),R=O("./src/utils/mp4-tools.ts"),b=O("./src/utils/typed-array.ts"),t=function(){function a(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var A=a.prototype;return A.resetInitSegment=function(s,o,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},A.resetTimeStamp=function(){},A.resetContiguity=function(){},A.canParse=function(s,o){return!1},A.appendFrame=function(s,o,f){},A.demux=function(s,o){this.cachedData&&(s=Object(R.appendUint8Array)(this.cachedData,s),this.cachedData=null);var f=M.getID3Data(s,0),u=f?f.length:0,c,i,l=this._audioTrack,v=this._id3Track,B=f?M.getTimeStamp(f):void 0,C=s.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=E(B,o)),f&&f.length>0&&v.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),i=this.initPTS;u<C;){if(this.canParse(s,u)){var L=this.appendFrame(l,s,u);L?(this.frameIndex++,i=L.sample.pts,u+=L.length,c=u):u=C}else M.canParse(s,u)?(f=M.getID3Data(s,u),v.samples.push({pts:i,dts:i,data:f}),u+=f.length,c=u):u++;if(u===C&&c!==C){var w=Object(b.sliceUint8)(s,c);this.cachedData?this.cachedData=Object(R.appendUint8Array)(this.cachedData,w):this.cachedData=w}}return{audioTrack:l,avcTrack:Object(_.dummyTrack)(),id3Track:v,textTrack:Object(_.dummyTrack)()}},A.demuxSampleAes=function(s,o,f){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},A.flush=function(s){var o=this.cachedData;return o&&(this.cachedData=null,this.demux(o,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(_.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(_.dummyTrack)()}},A.destroy=function(){},a}(),E=function(A,h){return Object(Q.isFiniteNumber)(A)?A*90:h*9e4};H.default=t},"./src/demux/chunk-cache.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return Q});var Q=function(){function _(){this.chunks=[],this.dataLength=0}var R=_.prototype;return R.push=function(t){this.chunks.push(t),this.dataLength+=t.length},R.flush=function(){var t=this.chunks,E=this.dataLength,a;if(t.length)t.length===1?a=t[0]:a=M(t,E);else return new Uint8Array(0);return this.reset(),a},R.reset=function(){this.chunks.length=0,this.dataLength=0},_}();function M(_,R){for(var b=new Uint8Array(R),t=0,E=0;E<_.length;E++){var a=_[E];b.set(a,t),t+=a.length}return b}},"./src/demux/dummy-demuxed-track.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"dummyTrack",function(){return Q});function Q(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/utils/logger.ts"),M=function(){function _(b){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=b,this.bytesAvailable=b.byteLength,this.word=0,this.bitsAvailable=0}var R=_.prototype;return R.loadWord=function(){var t=this.data,E=this.bytesAvailable,a=t.byteLength-E,A=new Uint8Array(4),h=Math.min(4,E);if(h===0)throw new Error("no bytes available");A.set(t.subarray(a,a+h)),this.word=new DataView(A.buffer).getUint32(0),this.bitsAvailable=h*8,this.bytesAvailable-=h},R.skipBits=function(t){var E;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,E=t>>3,t-=E>>3,this.bytesAvailable-=E,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},R.readBits=function(t){var E=Math.min(this.bitsAvailable,t),a=this.word>>>32-E;return t>32&&Q.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=E,this.bitsAvailable>0?this.word<<=E:this.bytesAvailable>0&&this.loadWord(),E=t-E,E>0&&this.bitsAvailable?a<<E|this.readBits(E):a},R.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if((this.word&2147483648>>>t)!==0)return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},R.skipUEG=function(){this.skipBits(1+this.skipLZ())},R.skipEG=function(){this.skipBits(1+this.skipLZ())},R.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},R.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},R.readBoolean=function(){return this.readBits(1)===1},R.readUByte=function(){return this.readBits(8)},R.readUShort=function(){return this.readBits(16)},R.readUInt=function(){return this.readBits(32)},R.skipScalingList=function(t){for(var E=8,a=8,A,h=0;h<t;h++)a!==0&&(A=this.readEG(),a=(E+A+256)%256),E=a===0?E:a},R.readSPS=function(){var t=0,E=0,a=0,A=0,h,s,o,f=this.readUByte.bind(this),u=this.readBits.bind(this),c=this.readUEG.bind(this),i=this.readBoolean.bind(this),l=this.skipBits.bind(this),v=this.skipEG.bind(this),B=this.skipUEG.bind(this),C=this.skipScalingList.bind(this);f();var L=f();if(u(5),l(3),f(),B(),L===100||L===110||L===122||L===244||L===44||L===83||L===86||L===118||L===128){var w=c();if(w===3&&l(1),B(),B(),l(1),i())for(s=w!==3?8:12,o=0;o<s;o++)i()&&(o<6?C(16):C(64))}B();var p=c();if(p===0)c();else if(p===1)for(l(1),v(),v(),h=c(),o=0;o<h;o++)v();B(),l(1);var n=c(),d=c(),m=u(1);m===0&&l(1),l(1),i()&&(t=c(),E=c(),a=c(),A=c());var T=[1,1];if(i()&&i()){var y=f();switch(y){case 1:T=[1,1];break;case 2:T=[12,11];break;case 3:T=[10,11];break;case 4:T=[16,11];break;case 5:T=[40,33];break;case 6:T=[24,11];break;case 7:T=[20,11];break;case 8:T=[32,11];break;case 9:T=[80,33];break;case 10:T=[18,11];break;case 11:T=[15,11];break;case 12:T=[64,33];break;case 13:T=[160,99];break;case 14:T=[4,3];break;case 15:T=[3,2];break;case 16:T=[2,1];break;case 255:{T=[f()<<8|f(),f()<<8|f()];break}}}return{width:Math.ceil((n+1)*16-t*2-E*2),height:(2-m)*(d+1)*16-(m?2:4)*(a+A),pixelRatio:T}},R.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},_}();H.default=M},"./src/demux/id3.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"isHeader",function(){return Q}),O.d(H,"isFooter",function(){return M}),O.d(H,"getID3Data",function(){return _}),O.d(H,"canParse",function(){return b}),O.d(H,"getTimeStamp",function(){return t}),O.d(H,"isTimeStampFrame",function(){return E}),O.d(H,"getID3Frames",function(){return A}),O.d(H,"decodeFrame",function(){return h}),O.d(H,"utf8ArrayToStr",function(){return c}),O.d(H,"testables",function(){return i});var Q=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)))},M=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)))},_=function(C,L){for(var w=L,p=0;Q(C,L);){p+=10;var n=R(C,L+6);p+=n,M(C,L+10)&&(p+=10),L+=p}return p>0?C.subarray(w,w+p):void 0},R=function(C,L){var w=0;return w=(C[L]&127)<<21,w|=(C[L+1]&127)<<14,w|=(C[L+2]&127)<<7,w|=C[L+3]&127,w},b=function(C,L){return Q(C,L)&&R(C,L+6)+10<=C.length-L},t=function(C){for(var L=A(C),w=0;w<L.length;w++){var p=L[w];if(E(p))return u(p)}return},E=function(C){return C&&C.key==="PRIV"&&C.info==="com.apple.streaming.transportStreamTimestamp"},a=function(C){var L=String.fromCharCode(C[0],C[1],C[2],C[3]),w=R(C,4),p=10;return{type:L,size:w,data:C.subarray(p,p+w)}},A=function(C){for(var L=0,w=[];Q(C,L);){var p=R(C,L+6);L+=10;for(var n=L+p;L+8<n;){var d=a(C.subarray(L)),m=h(d);m&&w.push(m),L+=d.size+10}M(C,L)&&(L+=10)}return w},h=function(C){return C.type==="PRIV"?s(C):C.type[0]==="W"?f(C):o(C)},s=function(C){if(C.size<2)return;var L=c(C.data,!0),w=new Uint8Array(C.data.subarray(L.length+1));return{key:C.type,info:L,data:w.buffer}},o=function(C){if(C.size<2)return;if(C.type==="TXXX"){var L=1,w=c(C.data.subarray(L),!0);L+=w.length+1;var p=c(C.data.subarray(L));return{key:C.type,info:w,data:p}}var n=c(C.data.subarray(1));return{key:C.type,data:n}},f=function(C){if(C.type==="WXXX"){if(C.size<2)return;var L=1,w=c(C.data.subarray(L),!0);L+=w.length+1;var p=c(C.data.subarray(L));return{key:C.type,info:w,data:p}}var n=c(C.data);return{key:C.type,data:n}},u=function(C){if(C.data.byteLength===8){var L=new Uint8Array(C.data),w=L[3]&1,p=(L[4]<<23)+(L[5]<<15)+(L[6]<<7)+L[7];return p/=45,w&&(p+=4772185884e-2),Math.round(p)}return},c=function(C,L){L===void 0&&(L=!1);var w=v();if(w){var p=w.decode(C);if(L){var n=p.indexOf("\0");return n!==-1?p.substring(0,n):p}return p.replace(/\0/g,"")}for(var d=C.length,m,T,y,g="",U=0;U<d;){if(m=C[U++],m===0&&L)return g;if(m===0||m===3)continue;switch(m>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:g+=String.fromCharCode(m);break;case 12:case 13:T=C[U++],g+=String.fromCharCode((m&31)<<6|T&63);break;case 14:T=C[U++],y=C[U++],g+=String.fromCharCode((m&15)<<12|(T&63)<<6|(y&63)<<0);break;default:}}return g},i={decodeTextFrame:o},l;function v(){return!l&&typeof self.TextDecoder!="undefined"&&(l=new self.TextDecoder("utf-8")),l}},"./src/demux/mp3demuxer.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/demux/base-audio-demuxer.ts"),M=O("./src/demux/id3.ts"),_=O("./src/utils/logger.ts"),R=O("./src/demux/mpegaudio.ts");function b(a,A){a.prototype=Object.create(A.prototype),a.prototype.constructor=a,t(a,A)}function t(a,A){return t=Object.setPrototypeOf||function(s,o){return s.__proto__=o,s},t(a,A)}var E=function(a){b(A,a);function A(){return a.apply(this,arguments)||this}var h=A.prototype;return h.resetInitSegment=function(o,f,u){a.prototype.resetInitSegment.call(this,o,f,u),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:u,inputTimeScale:9e4,dropped:0}},A.probe=function(o){if(!o)return!1;for(var f=M.getID3Data(o,0)||[],u=f.length,c=o.length;u<c;u++)if(R.probe(o,u))return _.logger.log("MPEG Audio sync word found !"),!0;return!1},h.canParse=function(o,f){return R.canParse(o,f)},h.appendFrame=function(o,f,u){return this.initPTS===null?void 0:R.appendFrame(o,f,u,this.initPTS,this.frameIndex)},A}(Q.default);E.minProbeByteLength=4,H.default=E},"./src/demux/mp4demuxer.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/utils/mp4-tools.ts"),M=O("./src/demux/dummy-demuxed-track.ts"),_=function(){function R(t,E){this.remainderData=null,this.config=void 0,this.config=E}var b=R.prototype;return b.resetTimeStamp=function(){},b.resetInitSegment=function(){},b.resetContiguity=function(){},R.probe=function(E){return Object(Q.findBox)({data:E,start:0,end:Math.min(E.length,16384)},["moof"]).length>0},b.demux=function(E){var a=E,A=Object(M.dummyTrack)();if(this.config.progressive){this.remainderData&&(a=Object(Q.appendUint8Array)(this.remainderData,E));var h=Object(Q.segmentValidRange)(a);this.remainderData=h.remainder,A.samples=h.valid||new Uint8Array}else A.samples=a;return{audioTrack:Object(M.dummyTrack)(),avcTrack:A,id3Track:Object(M.dummyTrack)(),textTrack:Object(M.dummyTrack)()}},b.flush=function(){var E=Object(M.dummyTrack)();return E.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(M.dummyTrack)(),avcTrack:E,id3Track:Object(M.dummyTrack)(),textTrack:Object(M.dummyTrack)()}},b.demuxSampleAes=function(E,a,A){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},b.destroy=function(){},R}();_.minProbeByteLength=1024,H.default=_},"./src/demux/mpegaudio.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"appendFrame",function(){return t}),O.d(H,"parseHeader",function(){return E}),O.d(H,"isHeaderPattern",function(){return a}),O.d(H,"isHeader",function(){return A}),O.d(H,"canParse",function(){return h}),O.d(H,"probe",function(){return s});var Q=null,M=[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],_=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],R=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],b=[0,1,1,4];function t(o,f,u,c,i){if(u+24>f.length)return;var l=E(f,u);if(l&&u+l.frameLength<=f.length){var v=l.samplesPerFrame*9e4/l.sampleRate,B=c+i*v,C={unit:f.subarray(u,u+l.frameLength),pts:B,dts:B};return o.config=[],o.channelCount=l.channelCount,o.samplerate=l.sampleRate,o.samples.push(C),{sample:C,length:l.frameLength,missing:0}}}function E(o,f){var u=o[f+1]>>3&3,c=o[f+1]>>1&3,i=o[f+2]>>4&15,l=o[f+2]>>2&3;if(u!==1&&i!==0&&i!==15&&l!==3){var v=o[f+2]>>1&1,B=o[f+3]>>6,C=u===3?3-c:c===3?3:4,L=M[C*14+i-1]*1e3,w=u===3?0:u===2?1:2,p=_[w*3+l],n=B===3?1:2,d=R[u][c],m=b[c],T=d*8*m,y=Math.floor(d*L/p+v)*m;if(Q===null){var g=navigator.userAgent||"",U=g.match(/Chrome\/(\d+)/i);Q=U?parseInt(U[1]):0}var P=!!Q&&Q<=87;return P&&c===2&&L>=224e3&&B===0&&(o[f+3]=o[f+3]|128),{sampleRate:p,channelCount:n,frameLength:y,samplesPerFrame:T}}}function a(o,f){return o[f]===255&&(o[f+1]&224)===224&&(o[f+1]&6)!==0}function A(o,f){return f+1<o.length&&a(o,f)}function h(o,f){var u=4;return a(o,f)&&u<=o.length-f}function s(o,f){if(f+1<o.length&&a(o,f)){var u=4,c=E(o,f),i=u;c!=null&&c.frameLength&&(i=c.frameLength);var l=f+i;return l===o.length||A(o,l)}return!1}},"./src/demux/sample-aes.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/crypt/decrypter.ts"),M=O("./src/demux/tsdemuxer.ts"),_=function(){function R(t,E,a){this.keyData=void 0,this.decrypter=void 0,this.keyData=a,this.decrypter=new Q.default(t,E,{removePKCS7Padding:!1})}var b=R.prototype;return b.decryptBuffer=function(E,a){this.decrypter.decrypt(E,this.keyData.key.buffer,this.keyData.iv.buffer,a)},b.decryptAacSample=function(E,a,A,h){var s=E[a].unit,o=s.subarray(16,s.length-s.length%16),f=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),u=this;this.decryptBuffer(f,function(c){var i=new Uint8Array(c);s.set(i,16),h||u.decryptAacSamples(E,a+1,A)})},b.decryptAacSamples=function(E,a,A){for(;;a++){if(a>=E.length){A();return}if(E[a].unit.length<32)continue;var h=this.decrypter.isSync();if(this.decryptAacSample(E,a,A,h),!h)return}},b.getAvcEncryptedData=function(E){for(var a=Math.floor((E.length-48)/160)*16+16,A=new Int8Array(a),h=0,s=32;s<=E.length-16;s+=160,h+=16)A.set(E.subarray(s,s+16),h);return A},b.getAvcDecryptedUnit=function(E,a){for(var A=new Uint8Array(a),h=0,s=32;s<=E.length-16;s+=160,h+=16)E.set(A.subarray(h,h+16),s);return E},b.decryptAvcSample=function(E,a,A,h,s,o){var f=Object(M.discardEPB)(s.data),u=this.getAvcEncryptedData(f),c=this;this.decryptBuffer(u.buffer,function(i){s.data=c.getAvcDecryptedUnit(f,i),o||c.decryptAvcSamples(E,a,A+1,h)})},b.decryptAvcSamples=function(E,a,A,h){if(E instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;a++,A=0){if(a>=E.length){h();return}for(var s=E[a].units;!(A>=s.length);A++){var o=s[A];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(E,a,A,h,o,f),!f)return}}},R}();H.default=_},"./src/demux/transmuxer-interface.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return s});var Q=O("./node_modules/webworkify-webpack/index.js"),M=O.n(Q),_=O("./src/events.ts"),R=O("./src/demux/transmuxer.ts"),b=O("./src/utils/logger.ts"),t=O("./src/errors.ts"),E=O("./src/utils/mediasource-helper.ts"),a=O("./node_modules/eventemitter3/index.js"),A=O.n(a),h=Object(E.getMediaSource)()||{isTypeSupported:function(){return!1}},s=function(){function o(u,c,i,l){var v=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=u,this.id=c,this.onTransmuxComplete=i,this.onFlush=l;var B=u.config,C=function(d,m){m=m||{},m.frag=v.frag,m.id=v.id,u.trigger(d,m)};this.observer=new a.EventEmitter,this.observer.on(_.Events.FRAG_DECRYPTED,C),this.observer.on(_.Events.ERROR,C);var L={mp4:h.isTypeSupported("video/mp4"),mpeg:h.isTypeSupported("audio/mpeg"),mp3:h.isTypeSupported('audio/mp4; codecs="mp3"')},w=navigator.vendor;if(B.enableWorker&&typeof Worker!="undefined"){b.logger.log("demuxing in webworker");var p;try{p=this.worker=Q("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),p.addEventListener("message",this.onwmsg),p.onerror=function(n){u.trigger(_.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(n.message+" ("+n.filename+":"+n.lineno+")")})},p.postMessage({cmd:"init",typeSupported:L,vendor:w,id:c,config:JSON.stringify(B)})}catch(n){b.logger.warn("Error in worker:",n),b.logger.error("Error while initializing DemuxerWorker, fallback to inline"),p&&self.URL.revokeObjectURL(p.objectURL),this.transmuxer=new R.default(this.observer,L,B,w,c),this.worker=null}}else this.transmuxer=new R.default(this.observer,L,B,w,c)}var f=o.prototype;return f.destroy=function(){var c=this.worker;if(c)c.removeEventListener("message",this.onwmsg),c.terminate(),this.worker=null;else{var i=this.transmuxer;i&&(i.destroy(),this.transmuxer=null)}var l=this.observer;l&&l.removeAllListeners(),this.observer=null},f.push=function(c,i,l,v,B,C,L,w,p,n){var d=this;p.transmuxing.start=self.performance.now();var m=this.transmuxer,T=this.worker,y=C?C.start:B.start,g=B.decryptdata,U=this.frag,P=!(U&&B.cc===U.cc),I=!(U&&p.level===U.level),G=U?p.sn-U.sn:-1,K=this.part?p.part-this.part.index:1,D=!I&&(G===1||G===0&&K===1),J=self.performance.now();(I||G||B.stats.parsing.start===0)&&(B.stats.parsing.start=J),C&&(K||!D)&&(C.stats.parsing.start=J);var X=new R.TransmuxState(P,D,w,I,y);if(!D||P){b.logger.log("[transmuxer-interface, "+B.type+"]: Starting new transmux session for sn: "+p.sn+" p: "+p.part+" level: "+p.level+" id: "+p.id+`
|
|
discontinuity: `+P+`
|
|
trackSwitch: `+I+`
|
|
contiguous: `+D+`
|
|
accurateTimeOffset: `+w+`
|
|
timeOffset: `+y);var ne=new R.TransmuxConfig(l,v,i,L,n);this.configureTransmuxer(ne)}if(this.frag=B,this.part=C,T)T.postMessage({cmd:"demux",data:c,decryptdata:g,chunkMeta:p,state:X},c instanceof ArrayBuffer?[c]:[]);else if(m){var ue=m.push(c,g,p,X);Object(R.isPromise)(ue)?ue.then(function(Oe){d.handleTransmuxComplete(Oe)}):this.handleTransmuxComplete(ue)}},f.flush=function(c){var i=this;c.transmuxing.start=self.performance.now();var l=this.transmuxer,v=this.worker;if(v)v.postMessage({cmd:"flush",chunkMeta:c});else if(l){var B=l.flush(c);Object(R.isPromise)(B)?B.then(function(C){i.handleFlushResult(C,c)}):this.handleFlushResult(B,c)}},f.handleFlushResult=function(c,i){var l=this;c.forEach(function(v){l.handleTransmuxComplete(v)}),this.onFlush(i)},f.onWorkerMessage=function(c){var i=c.data,l=this.hls;switch(i.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(i.data);break}case"flush":{this.onFlush(i.data);break}default:{i.data=i.data||{},i.data.frag=this.frag,i.data.id=this.id,l.trigger(i.event,i.data);break}}},f.configureTransmuxer=function(c){var i=this.worker,l=this.transmuxer;i?i.postMessage({cmd:"configure",config:c}):l&&l.configure(c)},f.handleTransmuxComplete=function(c){c.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(c)},o}()},"./src/demux/transmuxer-worker.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return t});var Q=O("./src/demux/transmuxer.ts"),M=O("./src/events.ts"),_=O("./src/utils/logger.ts"),R=O("./node_modules/eventemitter3/index.js"),b=O.n(R);function t(s){var o=new R.EventEmitter,f=function(c,i){s.postMessage({event:c,data:i})};o.on(M.Events.FRAG_DECRYPTED,f),o.on(M.Events.ERROR,f),s.addEventListener("message",function(u){var c=u.data;switch(c.cmd){case"init":{var i=JSON.parse(c.config);s.transmuxer=new Q.default(o,c.typeSupported,i,c.vendor,c.id),Object(_.enableLogs)(i.debug),f("init",null);break}case"configure":{s.transmuxer.configure(c.config);break}case"demux":{var l=s.transmuxer.push(c.data,c.decryptdata,c.chunkMeta,c.state);Object(Q.isPromise)(l)?l.then(function(C){E(s,C)}):E(s,l);break}case"flush":{var v=c.chunkMeta,B=s.transmuxer.flush(v);Object(Q.isPromise)(B)?B.then(function(C){A(s,C,v)}):A(s,B,v);break}default:break}})}function E(s,o){if(h(o.remuxResult))return;var f=[],u=o.remuxResult,c=u.audio,i=u.video;c&&a(f,c),i&&a(f,i),s.postMessage({event:"transmuxComplete",data:o},f)}function a(s,o){o.data1&&s.push(o.data1.buffer),o.data2&&s.push(o.data2.buffer)}function A(s,o,f){o.forEach(function(u){E(s,u)}),s.postMessage({event:"flush",data:f})}function h(s){return!s.audio&&!s.video&&!s.text&&!s.id3&&!s.initSegment}},"./src/demux/transmuxer.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return i}),O.d(H,"isPromise",function(){return B}),O.d(H,"TransmuxConfig",function(){return C}),O.d(H,"TransmuxState",function(){return L});var Q=O("./src/events.ts"),M=O("./src/errors.ts"),_=O("./src/crypt/decrypter.ts"),R=O("./src/demux/aacdemuxer.ts"),b=O("./src/demux/mp4demuxer.ts"),t=O("./src/demux/tsdemuxer.ts"),E=O("./src/demux/mp3demuxer.ts"),a=O("./src/remux/mp4-remuxer.ts"),A=O("./src/remux/passthrough-remuxer.ts"),h=O("./src/demux/chunk-cache.ts"),s=O("./src/utils/mp4-tools.ts"),o=O("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(w){o.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var u=[{demux:t.default,remux:a.default},{demux:b.default,remux:A.default},{demux:R.default,remux:a.default},{demux:E.default,remux:a.default}],c=1024;u.forEach(function(w){var p=w.demux;c=Math.max(c,p.minProbeByteLength)});var i=function(){function w(n,d,m,T,y){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new h.default,this.observer=n,this.typeSupported=d,this.config=m,this.vendor=T,this.id=y}var p=w.prototype;return p.configure=function(d){this.transmuxConfig=d,this.decrypter&&this.decrypter.reset()},p.push=function(d,m,T,y){var g=this,U=T.transmuxing;U.executeStart=f();var P=new Uint8Array(d),I=this.cache,G=this.config,K=this.currentTransmuxState,D=this.transmuxConfig;y&&(this.currentTransmuxState=y);var J=l(P,m);if(J&&J.method==="AES-128"){var X=this.getDecrypter();if(G.enableSoftwareAES){var ne=X.softwareDecrypt(P,J.key.buffer,J.iv.buffer);if(!ne)return U.executeEnd=f(),v(T);P=new Uint8Array(ne)}else return this.decryptionPromise=X.webCryptoDecrypt(P,J.key.buffer,J.iv.buffer).then(function(re){var ie=g.push(re,null,T);return g.decryptionPromise=null,ie}),this.decryptionPromise}var ue=y||K,Oe=ue.contiguous,_e=ue.discontinuity,De=ue.trackSwitch,Ue=ue.accurateTimeOffset,Ke=ue.timeOffset,Le=D.audioCodec,ae=D.videoCodec,V=D.defaultInitPts,$=D.duration,q=D.initSegmentData;if((_e||De)&&this.resetInitSegment(q,Le,ae,$),_e&&this.resetInitialTimestamp(V),Oe||this.resetContiguity(),this.needsProbing(P,_e,De)){if(I.dataLength){var se=I.flush();P=Object(s.appendUint8Array)(se,P)}this.configureTransmuxer(P,D)}var te=this.transmux(P,J,Ke,Ue,T),oe=this.currentTransmuxState;return oe.contiguous=!0,oe.discontinuity=!1,oe.trackSwitch=!1,U.executeEnd=f(),te},p.flush=function(d){var m=this,T=d.transmuxing;T.executeStart=f();var y=this.decrypter,g=this.cache,U=this.currentTransmuxState,P=this.decryptionPromise;if(P)return P.then(function(){return m.flush(d)});var I=[],G=U.timeOffset;if(y){var K=y.flush();K&&I.push(this.push(K,null,d))}var D=g.dataLength;g.reset();var J=this.demuxer,X=this.remuxer;if(!J||!X)return D>=c&&this.observer.emit(Q.Events.ERROR,Q.Events.ERROR,{type:M.ErrorTypes.MEDIA_ERROR,details:M.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),T.executeEnd=f(),[v(d)];var ne=J.flush(G);return B(ne)?ne.then(function(ue){return m.flushRemux(I,ue,d),I}):(this.flushRemux(I,ne,d),I)},p.flushRemux=function(d,m,T){var y=m.audioTrack,g=m.avcTrack,U=m.id3Track,P=m.textTrack,I=this.currentTransmuxState,G=I.accurateTimeOffset,K=I.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+T.sn+(T.part>-1?" p: "+T.part:"")+" of level "+T.level);var D=this.remuxer.remux(y,g,U,P,K,G,!0,this.id);d.push({remuxResult:D,chunkMeta:T}),T.transmuxing.executeEnd=f()},p.resetInitialTimestamp=function(d){var m=this.demuxer,T=this.remuxer;if(!m||!T)return;m.resetTimeStamp(d),T.resetTimeStamp(d)},p.resetContiguity=function(){var d=this.demuxer,m=this.remuxer;if(!d||!m)return;d.resetContiguity(),m.resetNextTimestamp()},p.resetInitSegment=function(d,m,T,y){var g=this.demuxer,U=this.remuxer;if(!g||!U)return;g.resetInitSegment(m,T,y),U.resetInitSegment(d,m,T)},p.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},p.transmux=function(d,m,T,y,g){var U;return m&&m.method==="SAMPLE-AES"?U=this.transmuxSampleAes(d,m,T,y,g):U=this.transmuxUnencrypted(d,T,y,g),U},p.transmuxUnencrypted=function(d,m,T,y){var g=this.demuxer.demux(d,m,!1,!this.config.progressive),U=g.audioTrack,P=g.avcTrack,I=g.id3Track,G=g.textTrack,K=this.remuxer.remux(U,P,I,G,m,T,!1,this.id);return{remuxResult:K,chunkMeta:y}},p.transmuxSampleAes=function(d,m,T,y,g){var U=this;return this.demuxer.demuxSampleAes(d,m,T).then(function(P){var I=U.remuxer.remux(P.audioTrack,P.avcTrack,P.id3Track,P.textTrack,T,y,!1,U.id);return{remuxResult:I,chunkMeta:g}})},p.configureTransmuxer=function(d,m){for(var T=this.config,y=this.observer,g=this.typeSupported,U=this.vendor,P=m.audioCodec,I=m.defaultInitPts,G=m.duration,K=m.initSegmentData,D=m.videoCodec,J,X=0,ne=u.length;X<ne;X++)if(u[X].demux.probe(d)){J=u[X];break}J||(o.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),J={demux:b.default,remux:A.default});var ue=this.demuxer,Oe=this.remuxer,_e=J.remux,De=J.demux;(!Oe||!(Oe instanceof _e))&&(this.remuxer=new _e(y,T,g,U)),(!ue||!(ue instanceof De))&&(this.demuxer=new De(y,T,g),this.probe=De.probe),this.resetInitSegment(K,P,D,G),this.resetInitialTimestamp(I)},p.needsProbing=function(d,m,T){return!this.demuxer||!this.remuxer||m||T},p.getDecrypter=function(){var d=this.decrypter;return d||(d=this.decrypter=new _.default(this.observer,this.config)),d},w}();function l(w,p){var n=null;return w.byteLength>0&&p!=null&&p.key!=null&&p.iv!==null&&p.method!=null&&(n=p),n}var v=function(p){return{remuxResult:{},chunkMeta:p}};function B(w){return"then"in w&&w.then instanceof Function}var C=function(p,n,d,m,T){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=p,this.videoCodec=n,this.initSegmentData=d,this.duration=m,this.defaultInitPts=T},L=function(p,n,d,m,T){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=p,this.contiguous=n,this.accurateTimeOffset=d,this.trackSwitch=m,this.timeOffset=T}},"./src/demux/tsdemuxer.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"discardEPB",function(){return v});var Q=O("./src/demux/adts.ts"),M=O("./src/demux/mpegaudio.ts"),_=O("./src/demux/exp-golomb.ts"),R=O("./src/demux/id3.ts"),b=O("./src/demux/sample-aes.ts"),t=O("./src/events.ts"),E=O("./src/utils/mp4-tools.ts"),a=O("./src/utils/logger.ts"),A=O("./src/errors.ts"),h={video:1,audio:2,id3:3,text:4},s=function(){function B(L,w,p){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=w,this.typeSupported=p}B.probe=function(w){var p=B.syncOffset(w);return p<0?!1:(p&&a.logger.warn("MPEG2-TS detected but first sync word found @ offset "+p+", junk ahead ?"),!0)},B.syncOffset=function(w){for(var p=Math.min(1e3,w.length-3*188),n=0;n<p;){if(w[n]===71&&w[n+188]===71&&w[n+2*188]===71)return n;n++}return-1},B.createTrack=function(w,p){return{container:w==="video"||w==="audio"?"video/mp2t":void 0,type:w,id:h[w],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:w==="audio"?p:void 0}};var C=B.prototype;return C.resetInitSegment=function(w,p,n){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=B.createTrack("video",n),this._audioTrack=B.createTrack("audio",n),this._id3Track=B.createTrack("id3",n),this._txtTrack=B.createTrack("text",n),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=w,this.videoCodec=p,this._duration=n},C.resetTimeStamp=function(){},C.resetContiguity=function(){var w=this._audioTrack,p=this._avcTrack,n=this._id3Track;w&&(w.pesData=null),p&&(p.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},C.demux=function(w,p,n,d){n===void 0&&(n=!1),d===void 0&&(d=!1),n||(this.sampleAes=null);var m,T=this._avcTrack,y=this._audioTrack,g=this._id3Track,U=T.pid,P=T.pesData,I=y.pid,G=g.pid,K=y.pesData,D=g.pesData,J=!1,X=this.pmtParsed,ne=this._pmtId,ue=w.length;if(this.remainderData&&(w=Object(E.appendUint8Array)(this.remainderData,w),ue=w.length,this.remainderData=null),ue<188&&!d)return this.remainderData=w,{audioTrack:y,avcTrack:T,id3Track:g,textTrack:this._txtTrack};var Oe=Math.max(0,B.syncOffset(w));ue-=(ue+Oe)%188,ue<w.byteLength&&!d&&(this.remainderData=new Uint8Array(w.buffer,ue,w.buffer.byteLength-ue));for(var _e=Oe;_e<ue;_e+=188)if(w[_e]===71){var De=!!(w[_e+1]&64),Ue=((w[_e+1]&31)<<8)+w[_e+2],Ke=(w[_e+3]&48)>>4,Le=void 0;if(Ke>1){if(Le=_e+5+w[_e+4],Le===_e+188)continue}else Le=_e+4;switch(Ue){case U:De&&(P&&(m=c(P))&&this.parseAVCPES(m,!1),P={data:[],size:0}),P&&(P.data.push(w.subarray(Le,_e+188)),P.size+=_e+188-Le);break;case I:De&&(K&&(m=c(K))&&(y.isAAC?this.parseAACPES(m):this.parseMPEGPES(m)),K={data:[],size:0}),K&&(K.data.push(w.subarray(Le,_e+188)),K.size+=_e+188-Le);break;case G:De&&(D&&(m=c(D))&&this.parseID3PES(m),D={data:[],size:0}),D&&(D.data.push(w.subarray(Le,_e+188)),D.size+=_e+188-Le);break;case 0:De&&(Le+=w[Le]+1),ne=this._pmtId=f(w,Le);break;case ne:{De&&(Le+=w[Le]+1);var ae=u(w,Le,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,n);U=ae.avc,U>0&&(T.pid=U),I=ae.audio,I>0&&(y.pid=I,y.isAAC=ae.isAAC),G=ae.id3,G>0&&(g.pid=G),J&&!X&&(a.logger.log("reparse from beginning"),J=!1,_e=Oe-188),X=this.pmtParsed=!0;break}case 17:case 8191:break;default:J=!0;break}}else this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});T.pesData=P,y.pesData=K,g.pesData=D;var V={audioTrack:y,avcTrack:T,id3Track:g,textTrack:this._txtTrack};return d&&this.extractRemainingSamples(V),V},C.flush=function(){var w=this.remainderData;this.remainderData=null;var p;return w?p=this.demux(w,-1,!1,!0):p={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(p),this.sampleAes?this.decrypt(p,this.sampleAes):p},C.extractRemainingSamples=function(w){var p=w.audioTrack,n=w.avcTrack,d=w.id3Track,m=n.pesData,T=p.pesData,y=d.pesData,g;m&&(g=c(m))?(this.parseAVCPES(g,!0),n.pesData=null):n.pesData=m,T&&(g=c(T))?(p.isAAC?this.parseAACPES(g):this.parseMPEGPES(g),p.pesData=null):(T!=null&&T.size&&a.logger.log("last AAC PES packet truncated,might overlap between fragments"),p.pesData=T),y&&(g=c(y))?(this.parseID3PES(g),d.pesData=null):d.pesData=y},C.demuxSampleAes=function(w,p,n){var d=this.demux(w,n,!0,!this.config.progressive),m=this.sampleAes=new b.default(this.observer,this.config,p);return this.decrypt(d,m)},C.decrypt=function(w,p){return new Promise(function(n){var d=w.audioTrack,m=w.avcTrack;d.samples&&d.isAAC?p.decryptAacSamples(d.samples,0,function(){m.samples?p.decryptAvcSamples(m.samples,0,0,function(){n(w)}):n(w)}):m.samples&&p.decryptAvcSamples(m.samples,0,0,function(){n(w)})})},C.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},C.parseAVCPES=function(w,p){var n=this,d=this._avcTrack,m=this.parseAVCNALu(w.data),T=!1,y=this.avcSample,g,U=!1;w.data=null,y&&m.length&&!d.audFound&&(i(y,d),y=this.avcSample=o(!1,w.pts,w.dts,"")),m.forEach(function(P){switch(P.type){case 1:{g=!0,y||(y=n.avcSample=o(!0,w.pts,w.dts,"")),T&&(y.debug+="NDR "),y.frame=!0;var I=P.data;if(U&&I.length>4){var G=new _.default(I).readSliceType();(G===2||G===4||G===7||G===9)&&(y.key=!0)}break}case 5:g=!0,y||(y=n.avcSample=o(!0,w.pts,w.dts,"")),T&&(y.debug+="IDR "),y.key=!0,y.frame=!0;break;case 6:{g=!0,T&&y&&(y.debug+="SEI ");var K=new _.default(v(P.data));K.readUByte();for(var D=0,J=0,X=!1,ne=0;!X&&K.bytesAvailable>1;){D=0;do ne=K.readUByte(),D+=ne;while(ne===255);J=0;do ne=K.readUByte(),J+=ne;while(ne===255);if(D===4&&K.bytesAvailable!==0){X=!0;var ue=K.readUByte();if(ue===181){var Oe=K.readUShort();if(Oe===49){var _e=K.readUInt();if(_e===1195456820){var De=K.readUByte();if(De===3){for(var Ue=K.readUByte(),Ke=K.readUByte(),Le=31&Ue,ae=[Ue,Ke],V=0;V<Le;V++)ae.push(K.readUByte()),ae.push(K.readUByte()),ae.push(K.readUByte());l(n._txtTrack.samples,{type:3,pts:w.pts,bytes:ae})}}}}}else if(D===5&&K.bytesAvailable!==0){if(X=!0,J>16){for(var $=[],q=0;q<16;q++)$.push(K.readUByte().toString(16)),(q===3||q===5||q===7||q===9)&&$.push("-");for(var se=J-16,te=new Uint8Array(se),oe=0;oe<se;oe++)te[oe]=K.readUByte();l(n._txtTrack.samples,{pts:w.pts,payloadType:D,uuid:$.join(""),userData:Object(R.utf8ArrayToStr)(te),userDataBytes:te})}}else if(J<K.bytesAvailable)for(var re=0;re<J;re++)K.readUByte()}break}case 7:if(g=!0,U=!0,T&&y&&(y.debug+="SPS "),!d.sps){var ie=new _.default(P.data),ee=ie.readSPS();d.width=ee.width,d.height=ee.height,d.pixelRatio=ee.pixelRatio,d.sps=[P.data],d.duration=n._duration;for(var de=P.data.subarray(1,4),Ce="avc1.",Me=0;Me<3;Me++){var Ye=de[Me].toString(16);Ye.length<2&&(Ye="0"+Ye),Ce+=Ye}d.codec=Ce}break;case 8:g=!0,T&&y&&(y.debug+="PPS "),d.pps||(d.pps=[P.data]);break;case 9:g=!1,d.audFound=!0,y&&i(y,d),y=n.avcSample=o(!1,w.pts,w.dts,T?"AUD ":"");break;case 12:g=!1;break;default:g=!1,y&&(y.debug+="unknown NAL "+P.type+" ");break}if(y&&g){var et=y.units;et.push(P)}}),p&&y&&(i(y,d),this.avcSample=null)},C.getLastNalUnit=function(){var w,p=this.avcSample,n;if(!p||p.units.length===0){var d=this._avcTrack.samples;p=d[d.length-1]}if((w=p)!==null&&w!==void 0&&w.units){var m=p.units;n=m[m.length-1]}return n},C.parseAVCNALu=function(w){var p=w.byteLength,n=this._avcTrack,d=n.naluState||0,m=d,T=[],y=0,g,U,P,I=-1,G=0;for(d===-1&&(I=0,G=w[0]&31,d=0,y=1);y<p;){if(g=w[y++],!d){d=g?0:1;continue}if(d===1){d=g?0:2;continue}if(!g)d=3;else if(g===1){if(I>=0){var K={data:w.subarray(I,y-d-1),type:G};T.push(K)}else{var D=this.getLastNalUnit();if(D&&(m&&y<=4-m&&(D.state&&(D.data=D.data.subarray(0,D.data.byteLength-m))),U=y-d-1,U>0)){var J=new Uint8Array(D.data.byteLength+U);J.set(D.data,0),J.set(w.subarray(0,U),D.data.byteLength),D.data=J,D.state=0}}y<p?(P=w[y]&31,I=y,G=P,d=0):d=-1}else d=0}if(I>=0&&d>=0){var X={data:w.subarray(I,p),type:G,state:d};T.push(X)}if(T.length===0){var ne=this.getLastNalUnit();if(ne){var ue=new Uint8Array(ne.data.byteLength+w.byteLength);ue.set(ne.data,0),ue.set(w,ne.data.byteLength),ne.data=ue}}return n.naluState=d,T},C.parseAACPES=function(w){var p=0,n=this._audioTrack,d=this.aacOverFlow,m=w.data;if(d){this.aacOverFlow=null;var T=d.sample.unit.byteLength,y=Math.min(d.missing,T),g=T-y;d.sample.unit.set(m.subarray(0,y),g),n.samples.push(d.sample),p=d.missing}var U,P;for(U=p,P=m.length;U<P-1&&!Q.isHeader(m,U);U++);if(U!==p){var I,G;if(U<P-1?(I="AAC PES did not start with ADTS header,offset:"+U,G=!1):(I="no ADTS header found in AAC PES",G=!0),a.logger.warn("parsing error:"+I),this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:A.ErrorTypes.MEDIA_ERROR,details:A.ErrorDetails.FRAG_PARSING_ERROR,fatal:G,reason:I}),G)return}Q.initTrackConfig(n,this.observer,m,U,this.audioCodec);var K;if(w.pts!==void 0)K=w.pts;else if(d){var D=Q.getFrameDuration(n.samplerate);K=d.sample.pts+D}else{a.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var J=0;U<P;)if(Q.isHeader(m,U)){if(U+5<P){var X=Q.appendFrame(n,m,U,K,J);if(X)if(X.missing)this.aacOverFlow=X;else{U+=X.length,J++;continue}}break}else U++},C.parseMPEGPES=function(w){var p=w.data,n=p.length,d=0,m=0,T=w.pts;if(T===void 0){a.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;m<n;)if(M.isHeader(p,m)){var y=M.appendFrame(this._audioTrack,p,m,T,d);if(y)m+=y.length,d++;else break}else m++},C.parseID3PES=function(w){if(w.pts===void 0){a.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(w)},B}();s.minProbeByteLength=188;function o(B,C,L,w){return{key:B,frame:!1,pts:C,dts:L,units:[],debug:w,length:0}}function f(B,C){return(B[C+10]&31)<<8|B[C+11]}function u(B,C,L,w){var p={audio:-1,avc:-1,id3:-1,isAAC:!0},n=(B[C+1]&15)<<8|B[C+2],d=C+3+n-4,m=(B[C+10]&15)<<8|B[C+11];for(C+=12+m;C<d;){var T=(B[C+1]&31)<<8|B[C+2];switch(B[C]){case 207:if(!w){a.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:p.audio===-1&&(p.audio=T);break;case 21:p.id3===-1&&(p.id3=T);break;case 219:if(!w){a.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:p.avc===-1&&(p.avc=T);break;case 3:case 4:L?p.audio===-1&&(p.audio=T,p.isAAC=!1):a.logger.log("MPEG audio found, not supported in this browser");break;case 36:a.logger.warn("Unsupported HEVC stream type found");break;default:break}C+=((B[C+3]&15)<<8|B[C+4])+5}return p}function c(B){var C=0,L,w,p,n,d,m=B.data;if(!B||B.size===0)return null;for(;m[0].length<19&&m.length>1;){var T=new Uint8Array(m[0].length+m[1].length);T.set(m[0]),T.set(m[1],m[0].length),m[0]=T,m.splice(1,1)}L=m[0];var y=(L[0]<<16)+(L[1]<<8)+L[2];if(y===1){if(w=(L[4]<<8)+L[5],w&&w>B.size-6)return null;var g=L[7];g&192&&(n=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,g&64?(d=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,n-d>60*9e4&&(a.logger.warn(Math.round((n-d)/9e4)+"s delta between PTS and DTS, align them"),n=d)):d=n),p=L[8];var U=p+9;if(B.size<=U)return null;B.size-=U;for(var P=new Uint8Array(B.size),I=0,G=m.length;I<G;I++){L=m[I];var K=L.byteLength;if(U)if(U>K){U-=K;continue}else L=L.subarray(U),K-=U,U=0;P.set(L,C),C+=K}return w&&(w-=p+3),{data:P,pts:n,dts:d,len:w}}return null}function i(B,C){if(B.units.length&&B.frame){if(B.pts===void 0){var L=C.samples,w=L.length;if(w){var p=L[w-1];B.pts=p.pts,B.dts=p.dts}else{C.dropped++;return}}C.samples.push(B)}B.debug.length&&a.logger.log(B.pts+"/"+B.dts+":"+B.debug)}function l(B,C){var L=B.length;if(L>0){if(C.pts>=B[L-1].pts)B.push(C);else for(var w=L-1;w>=0;w--)if(C.pts<B[w].pts){B.splice(w,0,C);break}}else B.push(C)}function v(B){for(var C=B.byteLength,L=[],w=1;w<C-2;)B[w]===0&&B[w+1]===0&&B[w+2]===3?(L.push(w+2),w+=2):w++;if(L.length===0)return B;var p=C-L.length,n=new Uint8Array(p),d=0;for(w=0;w<p;d++,w++)d===L[0]&&(d++,L.shift()),n[w]=B[d];return n}H.default=s},"./src/errors.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"ErrorTypes",function(){return Q}),O.d(H,"ErrorDetails",function(){return M});var Q;(function(_){_.NETWORK_ERROR="networkError",_.MEDIA_ERROR="mediaError",_.KEY_SYSTEM_ERROR="keySystemError",_.MUX_ERROR="muxError",_.OTHER_ERROR="otherError"})(Q||(Q={}));var M;(function(_){_.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",_.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",_.KEY_SYSTEM_NO_SESSION="keySystemNoSession",_.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",_.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",_.MANIFEST_LOAD_ERROR="manifestLoadError",_.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",_.MANIFEST_PARSING_ERROR="manifestParsingError",_.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",_.LEVEL_EMPTY_ERROR="levelEmptyError",_.LEVEL_LOAD_ERROR="levelLoadError",_.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",_.LEVEL_SWITCH_ERROR="levelSwitchError",_.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",_.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",_.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",_.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",_.FRAG_LOAD_ERROR="fragLoadError",_.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",_.FRAG_DECRYPT_ERROR="fragDecryptError",_.FRAG_PARSING_ERROR="fragParsingError",_.REMUX_ALLOC_ERROR="remuxAllocError",_.KEY_LOAD_ERROR="keyLoadError",_.KEY_LOAD_TIMEOUT="keyLoadTimeOut",_.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",_.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",_.BUFFER_APPEND_ERROR="bufferAppendError",_.BUFFER_APPENDING_ERROR="bufferAppendingError",_.BUFFER_STALLED_ERROR="bufferStalledError",_.BUFFER_FULL_ERROR="bufferFullError",_.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",_.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",_.INTERNAL_EXCEPTION="internalException",_.INTERNAL_ABORTED="aborted",_.UNKNOWN="unknown"})(M||(M={}))},"./src/events.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"Events",function(){return Q});var Q;(function(M){M.MEDIA_ATTACHING="hlsMediaAttaching",M.MEDIA_ATTACHED="hlsMediaAttached",M.MEDIA_DETACHING="hlsMediaDetaching",M.MEDIA_DETACHED="hlsMediaDetached",M.BUFFER_RESET="hlsBufferReset",M.BUFFER_CODECS="hlsBufferCodecs",M.BUFFER_CREATED="hlsBufferCreated",M.BUFFER_APPENDING="hlsBufferAppending",M.BUFFER_APPENDED="hlsBufferAppended",M.BUFFER_EOS="hlsBufferEos",M.BUFFER_FLUSHING="hlsBufferFlushing",M.BUFFER_FLUSHED="hlsBufferFlushed",M.MANIFEST_LOADING="hlsManifestLoading",M.MANIFEST_LOADED="hlsManifestLoaded",M.MANIFEST_PARSED="hlsManifestParsed",M.LEVEL_SWITCHING="hlsLevelSwitching",M.LEVEL_SWITCHED="hlsLevelSwitched",M.LEVEL_LOADING="hlsLevelLoading",M.LEVEL_LOADED="hlsLevelLoaded",M.LEVEL_UPDATED="hlsLevelUpdated",M.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",M.LEVELS_UPDATED="hlsLevelsUpdated",M.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",M.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",M.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",M.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",M.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",M.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",M.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",M.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",M.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",M.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",M.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",M.CUES_PARSED="hlsCuesParsed",M.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",M.INIT_PTS_FOUND="hlsInitPtsFound",M.FRAG_LOADING="hlsFragLoading",M.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",M.FRAG_LOADED="hlsFragLoaded",M.FRAG_DECRYPTED="hlsFragDecrypted",M.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",M.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",M.FRAG_PARSING_METADATA="hlsFragParsingMetadata",M.FRAG_PARSED="hlsFragParsed",M.FRAG_BUFFERED="hlsFragBuffered",M.FRAG_CHANGED="hlsFragChanged",M.FPS_DROP="hlsFpsDrop",M.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",M.ERROR="hlsError",M.DESTROYING="hlsDestroying",M.KEY_LOADING="hlsKeyLoading",M.KEY_LOADED="hlsKeyLoaded",M.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",M.BACK_BUFFER_REACHED="hlsBackBufferReached"})(Q||(Q={}))},"./src/hls.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return B});var Q=O("./node_modules/url-toolkit/src/url-toolkit.js"),M=O.n(Q),_=O("./src/loader/playlist-loader.ts"),R=O("./src/loader/key-loader.ts"),b=O("./src/controller/id3-track-controller.ts"),t=O("./src/controller/latency-controller.ts"),E=O("./src/controller/level-controller.ts"),a=O("./src/controller/fragment-tracker.ts"),A=O("./src/controller/stream-controller.ts"),h=O("./src/is-supported.ts"),s=O("./src/utils/logger.ts"),o=O("./src/config.ts"),f=O("./node_modules/eventemitter3/index.js"),u=O.n(f),c=O("./src/events.ts"),i=O("./src/errors.ts");function l(C,L){for(var w=0;w<L.length;w++){var p=L[w];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(C,p.key,p)}}function v(C,L,w){return L&&l(C.prototype,L),w&&l(C,w),C}var B=function(){C.isSupported=function(){return Object(h.isSupported)()};function C(w){w===void 0&&(w={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new f.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 p=this.config=Object(o.mergeConfig)(C.DefaultConfig,w);this.userConfig=w,Object(s.enableLogs)(p.debug),this._autoLevelCapping=-1,p.progressive&&Object(o.enableStreamingMode)(p);var n=p.abrController,d=p.bufferController,m=p.capLevelController,T=p.fpsController,y=this.abrController=new n(this),g=this.bufferController=new d(this),U=this.capLevelController=new m(this),P=new T(this),I=new _.default(this),G=new R.default(this),K=new b.default(this),D=this.levelController=new E.default(this),J=new a.FragmentTracker(this),X=this.streamController=new A.default(this,J);U.setStreamController(X),P.setStreamController(X);var ne=[D,X];this.networkControllers=ne;var ue=[I,G,y,g,U,P,K,J];this.audioTrackController=this.createController(p.audioTrackController,null,ne),this.createController(p.audioStreamController,J,ne),this.subtitleTrackController=this.createController(p.subtitleTrackController,null,ne),this.createController(p.subtitleStreamController,J,ne),this.createController(p.timelineController,null,ue),this.emeController=this.createController(p.emeController,null,ue),this.cmcdController=this.createController(p.cmcdController,null,ue),this.latencyController=this.createController(t.default,null,ue),this.coreComponents=ue}var L=C.prototype;return L.createController=function(p,n,d){if(p){var m=n?new p(this,n):new p(this);return d&&d.push(m),m}return null},L.on=function(p,n,d){d===void 0&&(d=this),this._emitter.on(p,n,d)},L.once=function(p,n,d){d===void 0&&(d=this),this._emitter.once(p,n,d)},L.removeAllListeners=function(p){this._emitter.removeAllListeners(p)},L.off=function(p,n,d,m){d===void 0&&(d=this),this._emitter.off(p,n,d,m)},L.listeners=function(p){return this._emitter.listeners(p)},L.emit=function(p,n,d){return this._emitter.emit(p,n,d)},L.trigger=function(p,n){if(this.config.debug)return this.emit(p,p,n);try{return this.emit(p,p,n)}catch(d){s.logger.error("An internal error happened while handling event "+p+'. Error message: "'+d.message+'". Here is a stacktrace:',d),this.trigger(c.Events.ERROR,{type:i.ErrorTypes.OTHER_ERROR,details:i.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:p,error:d})}return!1},L.listenerCount=function(p){return this._emitter.listenerCount(p)},L.destroy=function(){s.logger.log("destroy"),this.trigger(c.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(p){return p.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(p){return p.destroy()}),this.coreComponents.length=0},L.attachMedia=function(p){s.logger.log("attachMedia"),this._media=p,this.trigger(c.Events.MEDIA_ATTACHING,{media:p})},L.detachMedia=function(){s.logger.log("detachMedia"),this.trigger(c.Events.MEDIA_DETACHING,void 0),this._media=null},L.loadSource=function(p){this.stopLoad();var n=this.media,d=this.url,m=this.url=Q.buildAbsoluteURL(self.location.href,p,{alwaysNormalize:!0});s.logger.log("loadSource:"+m),n&&d&&d!==m&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(n)),this.trigger(c.Events.MANIFEST_LOADING,{url:p})},L.startLoad=function(p){p===void 0&&(p=-1),s.logger.log("startLoad("+p+")"),this.networkControllers.forEach(function(n){n.startLoad(p)})},L.stopLoad=function(){s.logger.log("stopLoad"),this.networkControllers.forEach(function(p){p.stopLoad()})},L.swapAudioCodec=function(){s.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},L.recoverMediaError=function(){s.logger.log("recoverMediaError");var p=this._media;this.detachMedia(),p&&this.attachMedia(p)},L.removeLevel=function(p,n){n===void 0&&(n=0),this.levelController.removeLevel(p,n)},v(C,[{key:"levels",get:function(){var p=this.levelController.levels;return p||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(p){s.logger.log("set currentLevel:"+p),this.loadLevel=p,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(p){s.logger.log("set nextLevel:"+p),this.levelController.manualLevel=p,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(p){s.logger.log("set loadLevel:"+p),this.levelController.manualLevel=p}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(p){this.levelController.nextLoadLevel=p}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(p){s.logger.log("set firstLevel:"+p),this.levelController.firstLevel=p}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(p){s.logger.log("set startLevel:"+p),p!==-1&&(p=Math.max(p,this.minAutoLevel)),this.levelController.startLevel=p}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(p){var n=!!p;n!==this.config.capLevelToPlayerSize&&(n?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=n)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(p){this._autoLevelCapping!==p&&(s.logger.log("set autoLevelCapping:"+p),this._autoLevelCapping=p)}},{key:"bandwidthEstimate",get:function(){var p=this.abrController.bwEstimator;return p?p.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var p=this.levels,n=this.config.minAutoBitrate;if(!p)return 0;for(var d=p.length,m=0;m<d;m++)if(p[m].maxBitrate>n)return m;return 0}},{key:"maxAutoLevel",get:function(){var p=this.levels,n=this.autoLevelCapping,d;return n===-1&&p&&p.length?d=p.length-1:d=n,d}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(p){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,p)}},{key:"audioTracks",get:function(){var p=this.audioTrackController;return p?p.audioTracks:[]}},{key:"audioTrack",get:function(){var p=this.audioTrackController;return p?p.audioTrack:-1},set:function(p){var n=this.audioTrackController;n&&(n.audioTrack=p)}},{key:"subtitleTracks",get:function(){var p=this.subtitleTrackController;return p?p.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var p=this.subtitleTrackController;return p?p.subtitleTrack:-1},set:function(p){var n=this.subtitleTrackController;n&&(n.subtitleTrack=p)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var p=this.subtitleTrackController;return p?p.subtitleDisplay:!1},set:function(p){var n=this.subtitleTrackController;n&&(n.subtitleDisplay=p)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(p){this.config.lowLatencyMode=p}},{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 c.Events}},{key:"ErrorTypes",get:function(){return i.ErrorTypes}},{key:"ErrorDetails",get:function(){return i.ErrorDetails}},{key:"DefaultConfig",get:function(){return C.defaultConfig?C.defaultConfig:o.hlsDefaultConfig},set:function(p){C.defaultConfig=p}}]),C}();B.defaultConfig=void 0},"./src/is-supported.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"isSupported",function(){return _}),O.d(H,"changeTypeSupported",function(){return R});var Q=O("./src/utils/mediasource-helper.ts");function M(){return self.SourceBuffer||self.WebKitSourceBuffer}function _(){var b=Object(Q.getMediaSource)();if(!b)return!1;var t=M(),E=b&&typeof b.isTypeSupported=="function"&&b.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!t||t.prototype&&typeof t.prototype.appendBuffer=="function"&&typeof t.prototype.remove=="function";return!!E&&!!a}function R(){var b,t=M();return typeof(t==null||((b=t.prototype)===null||b===void 0)?void 0:b.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return s}),O.d(H,"LoadError",function(){return f});var Q=O("./src/polyfills/number.ts"),M=O("./src/errors.ts");function _(u,c){u.prototype=Object.create(c.prototype),u.prototype.constructor=u,a(u,c)}function R(u){var c=typeof Map=="function"?new Map:void 0;return R=function(l){if(l===null||!E(l))return l;if(typeof l!="function")throw new TypeError("Super expression must either be null or a function");if(typeof c!="undefined"){if(c.has(l))return c.get(l);c.set(l,v)}function v(){return b(l,arguments,A(this).constructor)}return v.prototype=Object.create(l.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),a(v,l)},R(u)}function b(u,c,i){return t()?b=Reflect.construct:b=function(v,B,C){var L=[null];L.push.apply(L,B);var w=Function.bind.apply(v,L),p=new w;return C&&a(p,C.prototype),p},b.apply(null,arguments)}function t(){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(u){return!1}}function E(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function a(u,c){return a=Object.setPrototypeOf||function(l,v){return l.__proto__=v,l},a(u,c)}function A(u){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},A(u)}var h=Math.pow(2,17),s=function(){function u(i){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=i}var c=u.prototype;return c.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},c.abort=function(){this.loader&&this.loader.abort()},c.load=function(l,v){var B=this,C=l.url;if(!C)return Promise.reject(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:l,networkDetails:null},"Fragment does not have a "+(C?"part list":"url")));this.abort();var L=this.config,w=L.fLoader,p=L.loader;return new Promise(function(n,d){B.loader&&B.loader.destroy();var m=B.loader=l.loader=w?new w(L):new p(L),T=o(l),y={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:h};l.stats=m.stats,m.load(T,y,{onSuccess:function(U,P,I,G){B.resetLoader(l,m),n({frag:l,part:null,payload:U.data,networkDetails:G})},onError:function(U,P,I){B.resetLoader(l,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:l,response:U,networkDetails:I}))},onAbort:function(U,P,I){B.resetLoader(l,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:l,networkDetails:I}))},onTimeout:function(U,P,I){B.resetLoader(l,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:l,networkDetails:I}))},onProgress:function(U,P,I,G){v&&v({frag:l,part:null,payload:I,networkDetails:G})}})})},c.loadPart=function(l,v,B){var C=this;this.abort();var L=this.config,w=L.fLoader,p=L.loader;return new Promise(function(n,d){C.loader&&C.loader.destroy();var m=C.loader=l.loader=w?new w(L):new p(L),T=o(l,v),y={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:h};v.stats=m.stats,m.load(T,y,{onSuccess:function(U,P,I,G){C.resetLoader(l,m),C.updateStatsFromPart(l,v);var K={frag:l,part:v,payload:U.data,networkDetails:G};B(K),n(K)},onError:function(U,P,I){C.resetLoader(l,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:l,part:v,response:U,networkDetails:I}))},onAbort:function(U,P,I){l.stats.aborted=v.stats.aborted,C.resetLoader(l,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:l,part:v,networkDetails:I}))},onTimeout:function(U,P,I){C.resetLoader(l,m),d(new f({type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:l,part:v,networkDetails:I}))}})})},c.updateStatsFromPart=function(l,v){var B=l.stats,C=v.stats,L=C.total;if(B.loaded+=C.loaded,L){var w=Math.round(l.duration/v.duration),p=Math.min(Math.round(B.loaded/L),w),n=w-p,d=n*Math.round(B.loaded/p);B.total=B.loaded+d}else B.total=Math.max(B.loaded,B.total);var m=B.loading,T=C.loading;m.start?m.first+=T.first-T.start:(m.start=T.start,m.first=T.first),m.end=T.end},c.resetLoader=function(l,v){l.loader=null,this.loader===v&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),v.destroy()},u}();function o(u,c){c===void 0&&(c=null);var i=c||u,l={frag:u,part:c,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},v=i.byteRangeStartOffset,B=i.byteRangeEndOffset;return Object(Q.isFiniteNumber)(v)&&Object(Q.isFiniteNumber)(B)&&(l.rangeStart=v,l.rangeEnd=B),l}var f=function(u){_(c,u);function c(i){for(var l,v=arguments.length,B=new Array(v>1?v-1:0),C=1;C<v;C++)B[C-1]=arguments[C];return l=u.call.apply(u,[this].concat(B))||this,l.data=void 0,l.data=i,l}return c}(R(Error))},"./src/loader/fragment.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"ElementaryStreamTypes",function(){return s}),O.d(H,"BaseSegment",function(){return o}),O.d(H,"Fragment",function(){return f}),O.d(H,"Part",function(){return u});var Q=O("./src/polyfills/number.ts"),M=O("./node_modules/url-toolkit/src/url-toolkit.js"),_=O.n(M),R=O("./src/utils/logger.ts"),b=O("./src/loader/level-key.ts"),t=O("./src/loader/load-stats.ts");function E(c,i){c.prototype=Object.create(i.prototype),c.prototype.constructor=c,a(c,i)}function a(c,i){return a=Object.setPrototypeOf||function(v,B){return v.__proto__=B,v},a(c,i)}function A(c,i){for(var l=0;l<i.length;l++){var v=i[l];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(c,v.key,v)}}function h(c,i,l){return i&&A(c.prototype,i),l&&A(c,l),c}var s;(function(c){c.AUDIO="audio",c.VIDEO="video",c.AUDIOVIDEO="audiovideo"})(s||(s={}));var o=function(){function c(l){var v;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(v={},v[s.AUDIO]=null,v[s.VIDEO]=null,v[s.AUDIOVIDEO]=null,v),this.baseurl=l}var i=c.prototype;return i.setByteRange=function(v,B){var C=v.split("@",2),L=[];C.length===1?L[0]=B?B.byteRangeEndOffset:0:L[0]=parseInt(C[1]),L[1]=parseInt(C[0])+L[0],this._byteRange=L},h(c,[{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(M.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(v){this._url=v}}]),c}(),f=function(c){E(i,c);function i(v,B){var C;return C=c.call(this,B)||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 t.LoadStats,C.urlId=0,C.data=void 0,C.bitrateTest=!1,C.title=null,C.initSegment=null,C.type=v,C}var l=i.prototype;return l.createInitializationVector=function(B){for(var C=new Uint8Array(16),L=12;L<16;L++)C[L]=B>>8*(15-L)&255;return C},l.setDecryptDataFromLevelKey=function(B,C){var L=B;return(B==null?void 0:B.method)==="AES-128"&&B.uri&&!B.iv&&(L=b.LevelKey.fromURI(B.uri),L.method=B.method,L.iv=this.createInitializationVector(C),L.keyFormat="identity"),L},l.setElementaryStreamInfo=function(B,C,L,w,p,n){n===void 0&&(n=!1);var d=this.elementaryStreams,m=d[B];if(!m){d[B]={startPTS:C,endPTS:L,startDTS:w,endDTS:p,partial:n};return}m.startPTS=Math.min(m.startPTS,C),m.endPTS=Math.max(m.endPTS,L),m.startDTS=Math.min(m.startDTS,w),m.endDTS=Math.max(m.endDTS,p)},l.clearElementaryStreamInfo=function(){var B=this.elementaryStreams;B[s.AUDIO]=null,B[s.VIDEO]=null,B[s.AUDIOVIDEO]=null},h(i,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var B=this.sn;typeof B!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&R.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),B=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,B)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(Q.isFiniteNumber)(this.programDateTime))return null;var B=Object(Q.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+B*1e3}},{key:"encrypted",get:function(){var B;return!!((B=this.decryptdata)!==null&&B!==void 0&&B.keyFormat&&this.decryptdata.uri)}}]),i}(o),u=function(c){E(i,c);function i(l,v,B,C,L){var w;w=c.call(this,B)||this,w.fragOffset=0,w.duration=0,w.gap=!1,w.independent=!1,w.relurl=void 0,w.fragment=void 0,w.index=void 0,w.stats=new t.LoadStats,w.duration=l.decimalFloatingPoint("DURATION"),w.gap=l.bool("GAP"),w.independent=l.bool("INDEPENDENT"),w.relurl=l.enumeratedString("URI"),w.fragment=v,w.index=C;var p=l.enumeratedString("BYTERANGE");return p&&w.setByteRange(p,L),L&&(w.fragOffset=L.fragOffset+L.duration),w}return h(i,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var v=this.elementaryStreams;return!!(v.audio||v.video||v.audiovideo)}}]),i}(o)},"./src/loader/key-loader.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return R});var Q=O("./src/events.ts"),M=O("./src/errors.ts"),_=O("./src/utils/logger.ts"),R=function(){function b(E){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=E,this._registerListeners()}var t=b.prototype;return t._registerListeners=function(){this.hls.on(Q.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(Q.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){this._unregisterListeners();for(var a in this.loaders){var A=this.loaders[a];A&&A.destroy()}this.loaders={}},t.onKeyLoading=function(a,A){var h=A.frag,s=h.type,o=this.loaders[s];if(!h.decryptdata){_.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=h.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var u=this.hls.config;if(o&&(_.logger.warn("abort previous key loader for type:"+s),o.abort()),!f){_.logger.warn("key uri is falsy");return}var c=u.loader,i=h.loader=this.loaders[s]=new c(u);this.decrypturl=f,this.decryptkey=null;var l={url:f,frag:h,responseType:"arraybuffer"},v={timeout:u.fragLoadingTimeOut,maxRetry:0,retryDelay:u.fragLoadingRetryDelay,maxRetryDelay:u.fragLoadingMaxRetryTimeout,highWaterMark:0},B={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};i.load(l,v,B)}else this.decryptkey&&(h.decryptdata.key=this.decryptkey,this.hls.trigger(Q.Events.KEY_LOADED,{frag:h}))},t.loadsuccess=function(a,A,h){var s=h.frag;if(!s.decryptdata){_.logger.error("after key load, decryptdata unset");return}this.decryptkey=s.decryptdata.key=new Uint8Array(a.data),s.loader=null,delete this.loaders[s.type],this.hls.trigger(Q.Events.KEY_LOADED,{frag:s})},t.loaderror=function(a,A){var h=A.frag,s=h.loader;s&&s.abort(),delete this.loaders[h.type],this.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:h,response:a})},t.loadtimeout=function(a,A){var h=A.frag,s=h.loader;s&&s.abort(),delete this.loaders[h.type],this.hls.trigger(Q.Events.ERROR,{type:M.ErrorTypes.NETWORK_ERROR,details:M.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:h})},b}()},"./src/loader/level-details.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"LevelDetails",function(){return b});var Q=O("./src/polyfills/number.ts");function M(t,E){for(var a=0;a<E.length;a++){var A=E[a];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(t,A.key,A)}}function _(t,E,a){return E&&M(t.prototype,E),a&&M(t,a),t}var R=10,b=function(){function t(a){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=a}var E=t.prototype;return E.reloaded=function(A){if(!A){this.advanced=!0,this.updated=!0;return}var h=this.lastPartSn-A.lastPartSn,s=this.lastPartIndex-A.lastPartIndex;this.updated=this.endSN!==A.endSN||!!s||!!h,this.advanced=this.endSN>A.endSN||h>0||h===0&&s>0,this.updated||this.advanced?this.misses=Math.floor(A.misses*.6):this.misses=A.misses+1,this.availabilityDelay=A.availabilityDelay},_(t,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(Q.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||R}},{key:"drift",get:function(){var A=this.driftEndTime-this.driftStartTime;if(A>0){var h=this.driftEnd-this.driftStart;return h*1e3/A}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var A;return(A=this.partList)!==null&&A!==void 0&&A.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var A;return(A=this.fragments)!==null&&A!==void 0&&A.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 A;return(A=this.partList)!==null&&A!==void 0&&A.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var A;return(A=this.partList)!==null&&A!==void 0&&A.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),t}()},"./src/loader/level-key.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"LevelKey",function(){return b});var Q=O("./node_modules/url-toolkit/src/url-toolkit.js"),M=O.n(Q);function _(t,E){for(var a=0;a<E.length;a++){var A=E[a];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(t,A.key,A)}}function R(t,E,a){return E&&_(t.prototype,E),a&&_(t,a),t}var b=function(){t.fromURL=function(a,A){return new t(a,A)},t.fromURI=function(a){return new t(a)};function t(E,a){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,a?this._uri=Object(Q.buildAbsoluteURL)(E,a,{alwaysNormalize:!0}):this._uri=E}return R(t,[{key:"uri",get:function(){return this._uri}}]),t}()},"./src/loader/load-stats.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"LoadStats",function(){return Q});var Q=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(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return i});var Q=O("./src/polyfills/number.ts"),M=O("./node_modules/url-toolkit/src/url-toolkit.js"),_=O.n(M),R=O("./src/loader/fragment.ts"),b=O("./src/loader/level-details.ts"),t=O("./src/loader/level-key.ts"),E=O("./src/utils/attr-list.ts"),a=O("./src/utils/logger.ts"),A=O("./src/utils/codecs.ts"),h=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,s=/#EXT-X-MEDIA:(.*)/g,o=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),f=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("|")),u=/\.(mp4|m4s|m4v|m4a)$/i;function c(L){var w,p;return u.test((w=(p=M.parseURL(L))===null||p===void 0?void 0:p.path)!=null?w:"")}var i=function(){function L(){}return L.findGroup=function(p,n){for(var d=0;d<p.length;d++){var m=p[d];if(m.id===n)return m}},L.convertAVC1ToAVCOTI=function(p){var n=p.split(".");if(n.length>2){var d=n.shift()+".";return d+=parseInt(n.shift()).toString(16),d+=("000"+parseInt(n.shift()).toString(16)).substr(-4),d}return p},L.resolve=function(p,n){return M.buildAbsoluteURL(n,p,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(p,n){var d=[],m={},T=!1;h.lastIndex=0;for(var y;(y=h.exec(p))!=null;)if(y[1]){var g=new E.AttrList(y[1]),U={attrs:g,bitrate:g.decimalInteger("AVERAGE-BANDWIDTH")||g.decimalInteger("BANDWIDTH"),name:g.NAME,url:L.resolve(y[2],n)},P=g.decimalResolution("RESOLUTION");P&&(U.width=P.width,U.height=P.height),l((g.CODECS||"").split(/[ ,]+/).filter(function(G){return G}),U),U.videoCodec&&U.videoCodec.indexOf("avc1")!==-1&&(U.videoCodec=L.convertAVC1ToAVCOTI(U.videoCodec)),d.push(U)}else if(y[3]){var I=new E.AttrList(y[3]);I["DATA-ID"]&&(T=!0,m[I["DATA-ID"]]=I)}return{levels:d,sessionData:T?m:null}},L.parseMasterPlaylistMedia=function(p,n,d,m){m===void 0&&(m=[]);var T,y=[],g=0;for(s.lastIndex=0;(T=s.exec(p))!==null;){var U=new E.AttrList(T[1]);if(U.TYPE===d){var P={attrs:U,bitrate:0,id:g++,groupId:U["GROUP-ID"],instreamId:U["INSTREAM-ID"],name:U.NAME||U.LANGUAGE||"",type:d,default:U.bool("DEFAULT"),autoselect:U.bool("AUTOSELECT"),forced:U.bool("FORCED"),lang:U.LANGUAGE,url:U.URI?L.resolve(U.URI,n):""};if(m.length){var I=L.findGroup(m,P.groupId)||m[0];v(P,I,"audioCodec"),v(P,I,"textCodec")}y.push(P)}}return y},L.parseLevelPlaylist=function(p,n,d,m,T){var y=new b.LevelDetails(n),g=y.fragments,U=null,P=0,I=0,G=0,K=0,D=null,J=new R.Fragment(m,n),X,ne,ue,Oe=-1,_e=!1;for(o.lastIndex=0,y.m3u8=p;(X=o.exec(p))!==null;){_e&&(_e=!1,J=new R.Fragment(m,n),J.start=G,J.sn=P,J.cc=K,J.level=d,U&&(J.initSegment=U,J.rawProgramDateTime=U.rawProgramDateTime));var De=X[1];if(De){J.duration=parseFloat(De);var Ue=(" "+X[2]).slice(1);J.title=Ue||null,J.tagList.push(Ue?["INF",De,Ue]:["INF",De])}else if(X[3])Object(Q.isFiniteNumber)(J.duration)&&(J.start=G,ue&&(J.levelkey=ue),J.sn=P,J.level=d,J.cc=K,J.urlId=T,g.push(J),J.relurl=(" "+X[3]).slice(1),C(J,D),D=J,G+=J.duration,P++,I=0,_e=!0);else if(X[4]){var Ke=(" "+X[4]).slice(1);D?J.setByteRange(Ke,D):J.setByteRange(Ke)}else if(X[5])J.rawProgramDateTime=(" "+X[5]).slice(1),J.tagList.push(["PROGRAM-DATE-TIME",J.rawProgramDateTime]),Oe===-1&&(Oe=g.length);else{if(X=X[0].match(f),!X){a.logger.warn("No matches on slow regex match for level playlist!");continue}for(ne=1;ne<X.length&&!(typeof X[ne]!="undefined");ne++);var Le=(" "+X[ne]).slice(1),ae=(" "+X[ne+1]).slice(1),V=X[ne+2]?(" "+X[ne+2]).slice(1):"";switch(Le){case"PLAYLIST-TYPE":y.type=ae.toUpperCase();break;case"MEDIA-SEQUENCE":P=y.startSN=parseInt(ae);break;case"SKIP":{var $=new E.AttrList(ae),q=$.decimalInteger("SKIPPED-SEGMENTS");if(Object(Q.isFiniteNumber)(q)){y.skippedSegments=q;for(var se=q;se--;)g.unshift(null);P+=q}var te=$.enumeratedString("RECENTLY-REMOVED-DATERANGES");te&&(y.recentlyRemovedDateranges=te.split(" "));break}case"TARGETDURATION":y.targetduration=parseFloat(ae);break;case"VERSION":y.version=parseInt(ae);break;case"EXTM3U":break;case"ENDLIST":y.live=!1;break;case"#":(ae||V)&&J.tagList.push(V?[ae,V]:[ae]);break;case"DIS":K++;case"GAP":J.tagList.push([Le]);break;case"BITRATE":J.tagList.push([Le,ae]);break;case"DISCONTINUITY-SEQ":K=parseInt(ae);break;case"KEY":{var oe,re=new E.AttrList(ae),ie=re.enumeratedString("METHOD"),ee=re.URI,de=re.hexadecimalInteger("IV"),Ce=re.enumeratedString("KEYFORMATVERSIONS"),Me=re.enumeratedString("KEYID"),Ye=(oe=re.enumeratedString("KEYFORMAT"))!=null?oe:"identity",et=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(et.indexOf(Ye)>-1){a.logger.warn("Keyformat "+Ye+" is not supported from the manifest");continue}else if(Ye!=="identity")continue;ie&&(ue=t.LevelKey.fromURL(n,ee),ee&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(ie)>=0&&(ue.method=ie,ue.keyFormat=Ye,Me&&(ue.keyID=Me),Ce&&(ue.keyFormatVersions=Ce),ue.iv=de));break}case"START":{var st=new E.AttrList(ae),ut=st.decimalFloatingPoint("TIME-OFFSET");Object(Q.isFiniteNumber)(ut)&&(y.startTimeOffset=ut);break}case"MAP":{var yt=new E.AttrList(ae);J.relurl=yt.URI,yt.BYTERANGE&&J.setByteRange(yt.BYTERANGE),J.level=d,J.sn="initSegment",ue&&(J.levelkey=ue),J.initSegment=null,U=J,_e=!0;break}case"SERVER-CONTROL":{var xt=new E.AttrList(ae);y.canBlockReload=xt.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=xt.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&xt.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=xt.optionalFloat("PART-HOLD-BACK",0),y.holdBack=xt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var je=new E.AttrList(ae);y.partTarget=je.decimalFloatingPoint("PART-TARGET");break}case"PART":{var He=y.partList;He||(He=y.partList=[]);var ot=I>0?He[He.length-1]:void 0,ht=I++,we=new R.Part(new E.AttrList(ae),J,n,ht,ot);He.push(we),J.duration+=we.duration;break}case"PRELOAD-HINT":{var he=new E.AttrList(ae);y.preloadHint=he;break}case"RENDITION-REPORT":{var fe=new E.AttrList(ae);y.renditionReports=y.renditionReports||[],y.renditionReports.push(fe);break}default:a.logger.warn("line parsed but not handled: "+X);break}}}D&&!D.relurl?(g.pop(),G-=D.duration,y.partList&&(y.fragmentHint=D)):y.partList&&(C(J,D),J.cc=K,y.fragmentHint=J);var ge=g.length,Te=g[0],me=g[ge-1];if(G+=y.skippedSegments*y.targetduration,G>0&&ge&&me){y.averagetargetduration=G/ge;var Ee=me.sn;y.endSN=Ee!=="initSegment"?Ee:0,Te&&(y.startCC=Te.cc,Te.initSegment||y.fragments.every(function(xe){return xe.relurl&&c(xe.relurl)})&&(a.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),J=new R.Fragment(m,n),J.relurl=me.relurl,J.level=d,J.sn="initSegment",Te.initSegment=J,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(G+=y.fragmentHint.duration),y.totalduration=G,y.endCC=K,Oe>0&&B(g,Oe),y},L}();function l(L,w){["video","audio","text"].forEach(function(p){var n=L.filter(function(m){return Object(A.isCodecType)(m,p)});if(n.length){var d=n.filter(function(m){return m.lastIndexOf("avc1",0)===0||m.lastIndexOf("mp4a",0)===0});w[p+"Codec"]=d.length>0?d[0]:n[0],L=L.filter(function(m){return n.indexOf(m)===-1})}}),w.unknownCodecs=L}function v(L,w,p){var n=w[p];n&&(L[p]=n)}function B(L,w){for(var p=L[w],n=w;n--;){var d=L[n];if(!d)return;d.programDateTime=p.programDateTime-d.duration*1e3,p=d}}function C(L,w){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):w!=null&&w.programDateTime&&(L.programDateTime=w.endProgramDateTime),Object(Q.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/polyfills/number.ts"),M=O("./src/events.ts"),_=O("./src/errors.ts"),R=O("./src/utils/logger.ts"),b=O("./src/utils/mp4-tools.ts"),t=O("./src/loader/m3u8-parser.ts"),E=O("./src/types/loader.ts"),a=O("./src/utils/attr-list.ts");function A(o){var f=o.type;switch(f){case E.PlaylistContextType.AUDIO_TRACK:return E.PlaylistLevelType.AUDIO;case E.PlaylistContextType.SUBTITLE_TRACK:return E.PlaylistLevelType.SUBTITLE;default:return E.PlaylistLevelType.MAIN}}function h(o,f){var u=o.url;return(u===void 0||u.indexOf("data:")===0)&&(u=f.url),u}var s=function(){function o(u){this.hls=void 0,this.loaders=Object.create(null),this.hls=u,this.registerListeners()}var f=o.prototype;return f.registerListeners=function(){var c=this.hls;c.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(M.Events.LEVEL_LOADING,this.onLevelLoading,this),c.on(M.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),c.on(M.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var c=this.hls;c.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(M.Events.LEVEL_LOADING,this.onLevelLoading,this),c.off(M.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),c.off(M.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(c){var i=this.hls.config,l=i.pLoader,v=i.loader,B=l||v,C=new B(i);return c.loader=C,this.loaders[c.type]=C,C},f.getInternalLoader=function(c){return this.loaders[c.type]},f.resetInternalLoader=function(c){this.loaders[c]&&delete this.loaders[c]},f.destroyInternalLoaders=function(){for(var c in this.loaders){var i=this.loaders[c];i&&i.destroy(),this.resetInternalLoader(c)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(c,i){var l=i.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:E.PlaylistContextType.MANIFEST,url:l,deliveryDirectives:null})},f.onLevelLoading=function(c,i){var l=i.id,v=i.level,B=i.url,C=i.deliveryDirectives;this.load({id:l,groupId:null,level:v,responseType:"text",type:E.PlaylistContextType.LEVEL,url:B,deliveryDirectives:C})},f.onAudioTrackLoading=function(c,i){var l=i.id,v=i.groupId,B=i.url,C=i.deliveryDirectives;this.load({id:l,groupId:v,level:null,responseType:"text",type:E.PlaylistContextType.AUDIO_TRACK,url:B,deliveryDirectives:C})},f.onSubtitleTrackLoading=function(c,i){var l=i.id,v=i.groupId,B=i.url,C=i.deliveryDirectives;this.load({id:l,groupId:v,level:null,responseType:"text",type:E.PlaylistContextType.SUBTITLE_TRACK,url:B,deliveryDirectives:C})},f.load=function(c){var i,l=this.hls.config,v=this.getInternalLoader(c);if(v){var B=v.context;if(B&&B.url===c.url){R.logger.trace("[playlist-loader]: playlist request ongoing");return}R.logger.log("[playlist-loader]: aborting previous loader for type: "+c.type),v.abort()}var C,L,w,p;switch(c.type){case E.PlaylistContextType.MANIFEST:C=l.manifestLoadingMaxRetry,L=l.manifestLoadingTimeOut,w=l.manifestLoadingRetryDelay,p=l.manifestLoadingMaxRetryTimeout;break;case E.PlaylistContextType.LEVEL:case E.PlaylistContextType.AUDIO_TRACK:case E.PlaylistContextType.SUBTITLE_TRACK:C=0,L=l.levelLoadingTimeOut;break;default:C=l.levelLoadingMaxRetry,L=l.levelLoadingTimeOut,w=l.levelLoadingRetryDelay,p=l.levelLoadingMaxRetryTimeout;break}if(v=this.createInternalLoader(c),(i=c.deliveryDirectives)!==null&&i!==void 0&&i.part){var n;if(c.type===E.PlaylistContextType.LEVEL&&c.level!==null?n=this.hls.levels[c.level].details:c.type===E.PlaylistContextType.AUDIO_TRACK&&c.id!==null?n=this.hls.audioTracks[c.id].details:c.type===E.PlaylistContextType.SUBTITLE_TRACK&&c.id!==null&&(n=this.hls.subtitleTracks[c.id].details),n){var d=n.partTarget,m=n.targetduration;d&&m&&(L=Math.min(Math.max(d*3,m*.8)*1e3,L))}}var T={timeout:L,maxRetry:C,retryDelay:w,maxRetryDelay:p,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};v.load(c,T,y)},f.loadsuccess=function(c,i,l,v){if(v===void 0&&(v=null),l.isSidxRequest){this.handleSidxRequest(c,l),this.handlePlaylistLoaded(c,i,l,v);return}this.resetInternalLoader(l.type);var B=c.data;if(B.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(c,l,"no EXTM3U delimiter",v);return}i.parsing.start=performance.now(),B.indexOf("#EXTINF:")>0||B.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(c,i,l,v):this.handleMasterPlaylist(c,i,l,v)},f.loaderror=function(c,i,l){l===void 0&&(l=null),this.handleNetworkError(i,l,!1,c)},f.loadtimeout=function(c,i,l){l===void 0&&(l=null),this.handleNetworkError(i,l,!0)},f.handleMasterPlaylist=function(c,i,l,v){var B=this.hls,C=c.data,L=h(c,l),w=t.default.parseMasterPlaylist(C,L),p=w.levels,n=w.sessionData;if(!p.length){this.handleManifestParsingError(c,l,"no level found in manifest",v);return}var d=p.map(function(P){return{id:P.attrs.AUDIO,audioCodec:P.audioCodec}}),m=p.map(function(P){return{id:P.attrs.SUBTITLES,textCodec:P.textCodec}}),T=t.default.parseMasterPlaylistMedia(C,L,"AUDIO",d),y=t.default.parseMasterPlaylistMedia(C,L,"SUBTITLES",m),g=t.default.parseMasterPlaylistMedia(C,L,"CLOSED-CAPTIONS");if(T.length){var U=T.some(function(P){return!P.url});!U&&p[0].audioCodec&&!p[0].attrs.AUDIO&&(R.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),T.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new a.AttrList({}),bitrate:0,url:""}))}B.trigger(M.Events.MANIFEST_LOADED,{levels:p,audioTracks:T,subtitles:y,captions:g,url:L,stats:i,networkDetails:v,sessionData:n})},f.handleTrackOrLevelPlaylist=function(c,i,l,v){var B=this.hls,C=l.id,L=l.level,w=l.type,p=h(c,l),n=Object(Q.isFiniteNumber)(C)?C:0,d=Object(Q.isFiniteNumber)(L)?L:n,m=A(l),T=t.default.parseLevelPlaylist(c.data,p,d,m,n);if(!T.fragments.length){B.trigger(M.Events.ERROR,{type:_.ErrorTypes.NETWORK_ERROR,details:_.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:p,reason:"no fragments found in level",level:typeof l.level=="number"?l.level:void 0});return}if(w===E.PlaylistContextType.MANIFEST){var y={attrs:new a.AttrList({}),bitrate:0,details:T,name:"",url:p};B.trigger(M.Events.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:p,stats:i,networkDetails:v,sessionData:null})}if(i.parsing.end=performance.now(),T.needSidxRanges){var g,U=(g=T.fragments[0].initSegment)===null||g===void 0?void 0:g.url;this.load({url:U,isSidxRequest:!0,type:w,level:L,levelDetails:T,id:C,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}l.levelDetails=T,this.handlePlaylistLoaded(c,i,l,v)},f.handleSidxRequest=function(c,i){var l=Object(b.parseSegmentIndex)(new Uint8Array(c.data));if(!l)return;var v=l.references,B=i.levelDetails;v.forEach(function(C,L){var w=C.info,p=B.fragments[L];p.byteRange.length===0&&p.setByteRange(String(1+w.end-w.start)+"@"+String(w.start)),p.initSegment&&p.initSegment.setByteRange(String(l.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(c,i,l,v){this.hls.trigger(M.Events.ERROR,{type:_.ErrorTypes.NETWORK_ERROR,details:_.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:i.type===E.PlaylistContextType.MANIFEST,url:c.url,reason:l,response:c,context:i,networkDetails:v})},f.handleNetworkError=function(c,i,l,v){l===void 0&&(l=!1),R.logger.warn("[playlist-loader]: A network "+(l?"timeout":"error")+" occurred while loading "+c.type+" level: "+c.level+" id: "+c.id+' group-id: "'+c.groupId+'"');var B=_.ErrorDetails.UNKNOWN,C=!1,L=this.getInternalLoader(c);switch(c.type){case E.PlaylistContextType.MANIFEST:B=l?_.ErrorDetails.MANIFEST_LOAD_TIMEOUT:_.ErrorDetails.MANIFEST_LOAD_ERROR,C=!0;break;case E.PlaylistContextType.LEVEL:B=l?_.ErrorDetails.LEVEL_LOAD_TIMEOUT:_.ErrorDetails.LEVEL_LOAD_ERROR,C=!1;break;case E.PlaylistContextType.AUDIO_TRACK:B=l?_.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:_.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,C=!1;break;case E.PlaylistContextType.SUBTITLE_TRACK:B=l?_.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:_.ErrorDetails.SUBTITLE_LOAD_ERROR,C=!1;break}L&&this.resetInternalLoader(c.type);var w={type:_.ErrorTypes.NETWORK_ERROR,details:B,fatal:C,url:c.url,loader:L,context:c,networkDetails:i};v&&(w.response=v),this.hls.trigger(M.Events.ERROR,w)},f.handlePlaylistLoaded=function(c,i,l,v){var B=l.type,C=l.level,L=l.id,w=l.groupId,p=l.loader,n=l.levelDetails,d=l.deliveryDirectives;if(!(n!=null&&n.targetduration)){this.handleManifestParsingError(c,l,"invalid target duration",v);return}if(!p)return;n.live&&(p.getCacheAge&&(n.ageHeader=p.getCacheAge()||0),(!p.getCacheAge||isNaN(n.ageHeader))&&(n.ageHeader=0));switch(B){case E.PlaylistContextType.MANIFEST:case E.PlaylistContextType.LEVEL:this.hls.trigger(M.Events.LEVEL_LOADED,{details:n,level:C||0,id:L||0,stats:i,networkDetails:v,deliveryDirectives:d});break;case E.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(M.Events.AUDIO_TRACK_LOADED,{details:n,id:L||0,groupId:w||"",stats:i,networkDetails:v,deliveryDirectives:d});break;case E.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(M.Events.SUBTITLE_TRACK_LOADED,{details:n,id:L||0,groupId:w||"",stats:i,networkDetails:v,deliveryDirectives:d});break}},o}();H.default=s},"./src/polyfills/number.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"isFiniteNumber",function(){return Q}),O.d(H,"MAX_SAFE_INTEGER",function(){return M});var Q=Number.isFinite||function(_){return typeof _=="number"&&isFinite(_)},M=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(Z,H,O){"use strict";O.r(H);var Q=function(){function M(){}return M.getSilentFrame=function(R,b){switch(R){case"mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===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(b===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(b===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(b===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(b===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},M}();H.default=Q},"./src/remux/mp4-generator.ts":function(Z,H,O){"use strict";O.r(H);var Q=Math.pow(2,32)-1,M=function(){function _(){}return _.init=function(){_.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 b;for(b in _.types)_.types.hasOwnProperty(b)&&(_.types[b]=[b.charCodeAt(0),b.charCodeAt(1),b.charCodeAt(2),b.charCodeAt(3)]);var t=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]),E=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]);_.HDLR_TYPES={video:t,audio:E};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),A=new Uint8Array([0,0,0,0,0,0,0,0]);_.STTS=_.STSC=_.STCO=A,_.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),_.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),_.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),_.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var h=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);_.FTYP=_.box(_.types.ftyp,h,o,h,s),_.DINF=_.box(_.types.dinf,_.box(_.types.dref,a))},_.box=function(b){for(var t=8,E=arguments.length,a=new Array(E>1?E-1:0),A=1;A<E;A++)a[A-1]=arguments[A];for(var h=a.length,s=h;h--;)t+=a[h].byteLength;var o=new Uint8Array(t);for(o[0]=t>>24&255,o[1]=t>>16&255,o[2]=t>>8&255,o[3]=t&255,o.set(b,4),h=0,t=8;h<s;h++)o.set(a[h],t),t+=a[h].byteLength;return o},_.hdlr=function(b){return _.box(_.types.hdlr,_.HDLR_TYPES[b])},_.mdat=function(b){return _.box(_.types.mdat,b)},_.mdhd=function(b,t){t*=b;var E=Math.floor(t/(Q+1)),a=Math.floor(t%(Q+1));return _.box(_.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,b>>24&255,b>>16&255,b>>8&255,b&255,E>>24,E>>16&255,E>>8&255,E&255,a>>24,a>>16&255,a>>8&255,a&255,85,196,0,0]))},_.mdia=function(b){return _.box(_.types.mdia,_.mdhd(b.timescale,b.duration),_.hdlr(b.type),_.minf(b))},_.mfhd=function(b){return _.box(_.types.mfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255]))},_.minf=function(b){return b.type==="audio"?_.box(_.types.minf,_.box(_.types.smhd,_.SMHD),_.DINF,_.stbl(b)):_.box(_.types.minf,_.box(_.types.vmhd,_.VMHD),_.DINF,_.stbl(b))},_.moof=function(b,t,E){return _.box(_.types.moof,_.mfhd(b),_.traf(E,t))},_.moov=function(b){for(var t=b.length,E=[];t--;)E[t]=_.trak(b[t]);return _.box.apply(null,[_.types.moov,_.mvhd(b[0].timescale,b[0].duration)].concat(E).concat(_.mvex(b)))},_.mvex=function(b){for(var t=b.length,E=[];t--;)E[t]=_.trex(b[t]);return _.box.apply(null,[_.types.mvex].concat(E))},_.mvhd=function(b,t){t*=b;var E=Math.floor(t/(Q+1)),a=Math.floor(t%(Q+1)),A=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,b>>24&255,b>>16&255,b>>8&255,b&255,E>>24,E>>16&255,E>>8&255,E&255,a>>24,a>>16&255,a>>8&255,a&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 _.box(_.types.mvhd,A)},_.sdtp=function(b){var t=b.samples||[],E=new Uint8Array(4+t.length),a,A;for(a=0;a<t.length;a++)A=t[a].flags,E[a+4]=A.dependsOn<<4|A.isDependedOn<<2|A.hasRedundancy;return _.box(_.types.sdtp,E)},_.stbl=function(b){return _.box(_.types.stbl,_.stsd(b),_.box(_.types.stts,_.STTS),_.box(_.types.stsc,_.STSC),_.box(_.types.stsz,_.STSZ),_.box(_.types.stco,_.STCO))},_.avc1=function(b){var t=[],E=[],a,A,h;for(a=0;a<b.sps.length;a++)A=b.sps[a],h=A.byteLength,t.push(h>>>8&255),t.push(h&255),t=t.concat(Array.prototype.slice.call(A));for(a=0;a<b.pps.length;a++)A=b.pps[a],h=A.byteLength,E.push(h>>>8&255),E.push(h&255),E=E.concat(Array.prototype.slice.call(A));var s=_.box(_.types.avcC,new Uint8Array([1,t[3],t[4],t[5],252|3,224|b.sps.length].concat(t).concat([b.pps.length]).concat(E))),o=b.width,f=b.height,u=b.pixelRatio[0],c=b.pixelRatio[1];return _.box(_.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,o>>8&255,o&255,f>>8&255,f&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]),s,_.box(_.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),_.box(_.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,u&255,c>>24,c>>16&255,c>>8&255,c&255])))},_.esds=function(b){var t=b.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(b.config).concat([6,1,2]))},_.mp4a=function(b){var t=b.samplerate;return _.box(_.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]),_.box(_.types.esds,_.esds(b)))},_.mp3=function(b){var t=b.samplerate;return _.box(_.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]))},_.stsd=function(b){return b.type==="audio"?!b.isAAC&&b.codec==="mp3"?_.box(_.types.stsd,_.STSD,_.mp3(b)):_.box(_.types.stsd,_.STSD,_.mp4a(b)):_.box(_.types.stsd,_.STSD,_.avc1(b))},_.tkhd=function(b){var t=b.id,E=b.duration*b.timescale,a=b.width,A=b.height,h=Math.floor(E/(Q+1)),s=Math.floor(E%(Q+1));return _.box(_.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,s>>24,s>>16&255,s>>8&255,s&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,a>>8&255,a&255,0,0,A>>8&255,A&255,0,0]))},_.traf=function(b,t){var E=_.sdtp(b),a=b.id,A=Math.floor(t/(Q+1)),h=Math.floor(t%(Q+1));return _.box(_.types.traf,_.box(_.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255])),_.box(_.types.tfdt,new Uint8Array([1,0,0,0,A>>24,A>>16&255,A>>8&255,A&255,h>>24,h>>16&255,h>>8&255,h&255])),_.trun(b,E.length+16+20+8+16+8+8),E)},_.trak=function(b){return b.duration=b.duration||4294967295,_.box(_.types.trak,_.tkhd(b),_.mdia(b))},_.trex=function(b){var t=b.id;return _.box(_.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},_.trun=function(b,t){var E=b.samples||[],a=E.length,A=12+16*a,h=new Uint8Array(A),s,o,f,u,c,i;for(t+=8+A,h.set([0,0,15,1,a>>>24&255,a>>>16&255,a>>>8&255,a&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),s=0;s<a;s++)o=E[s],f=o.duration,u=o.size,c=o.flags,i=o.cts,h.set([f>>>24&255,f>>>16&255,f>>>8&255,f&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.paddingValue<<1|c.isNonSync,c.degradPrio&240<<8,c.degradPrio&15,i>>>24&255,i>>>16&255,i>>>8&255,i&255],12+16*s);return _.box(_.types.trun,h)},_.initSegment=function(b){_.types||_.init();var t=_.moov(b),E=new Uint8Array(_.FTYP.byteLength+t.byteLength);return E.set(_.FTYP),E.set(t,_.FTYP.byteLength),E},_}();M.types=void 0,M.HDLR_TYPES=void 0,M.STTS=void 0,M.STSC=void 0,M.STCO=void 0,M.STSZ=void 0,M.VMHD=void 0,M.SMHD=void 0,M.STSD=void 0,M.FTYP=void 0,M.DINF=void 0,H.default=M},"./src/remux/mp4-remuxer.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return i}),O.d(H,"normalizePts",function(){return l});var Q=O("./src/polyfills/number.ts"),M=O("./src/remux/aac-helper.ts"),_=O("./src/remux/mp4-generator.ts"),R=O("./src/events.ts"),b=O("./src/errors.ts"),t=O("./src/utils/logger.ts"),E=O("./src/types/loader.ts"),a=O("./src/utils/timescale-conversion.ts");function A(){return A=Object.assign||function(L){for(var w=1;w<arguments.length;w++){var p=arguments[w];for(var n in p)Object.prototype.hasOwnProperty.call(p,n)&&(L[n]=p[n])}return L},A.apply(this,arguments)}var h=10*1e3,s=1024,o=1152,f=null,u=null,c=!1,i=function(){function L(p,n,d,m){if(m===void 0&&(m=""),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=p,this.config=n,this.typeSupported=d,this.ISGenerated=!1,f===null){var T=navigator.userAgent||"",y=T.match(/Chrome\/(\d+)/i);f=y?parseInt(y[1]):0}if(u===null){var g=navigator.userAgent.match(/Safari\/(\d+)/i);u=g?parseInt(g[1]):0}c=!!f&&f<75||!!u&&u<600}var w=L.prototype;return w.destroy=function(){},w.resetTimeStamp=function(n){t.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=n},w.resetNextTimestamp=function(){t.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},w.resetInitSegment=function(){t.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},w.getVideoStartPts=function(n){var d=!1,m=n.reduce(function(T,y){var g=y.pts-T;return g<-4294967296?(d=!0,l(T,y.pts)):g>0?T:y.pts},n[0].pts);return d&&t.logger.debug("PTS rollover detected"),m},w.remux=function(n,d,m,T,y,g,U,P){var I,G,K,D,J,X,ne=y,ue=y,Oe=n.pid>-1,_e=d.pid>-1,De=d.samples.length,Ue=n.samples.length>0,Ke=De>1,Le=(!Oe||Ue)&&(!_e||Ke)||this.ISGenerated||U;if(Le){this.ISGenerated||(K=this.generateIS(n,d,y));var ae=this.isVideoContiguous,V=-1;if(Ke&&(V=v(d.samples),!ae&&this.config.forceKeyFrameOnDiscontinuity))if(X=!0,V>0){t.logger.warn("[mp4-remuxer]: Dropped "+V+" out of "+De+" video samples due to a missing keyframe");var $=this.getVideoStartPts(d.samples);d.samples=d.samples.slice(V),d.dropped+=V,ue+=(d.samples[0].pts-$)/(d.timescale||9e4)}else V===-1&&(t.logger.warn("[mp4-remuxer]: No keyframe found out of "+De+" video samples"),X=!1);if(this.ISGenerated){if(Ue&&Ke){var q=this.getVideoStartPts(d.samples),se=l(n.samples[0].pts,q)-q,te=se/d.inputTimeScale;ne+=Math.max(0,te),ue+=Math.max(0,-te)}if(Ue){if(n.samplerate||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),K=this.generateIS(n,d,y)),G=this.remuxAudio(n,ne,this.isAudioContiguous,g,_e||Ke||P===E.PlaylistLevelType.AUDIO?ue:void 0),Ke){var oe=G?G.endPTS-G.startPTS:0;d.inputTimeScale||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),K=this.generateIS(n,d,y)),I=this.remuxVideo(d,ue,ae,oe)}}else Ke&&(I=this.remuxVideo(d,ue,ae,0));I&&(I.firstKeyFrame=V,I.independent=V!==-1)}}return this.ISGenerated&&(m.samples.length&&(J=this.remuxID3(m,y)),T.samples.length&&(D=this.remuxText(T,y))),{audio:G,video:I,initSegment:K,independent:X,text:D,id3:J}},w.generateIS=function(n,d,m){var T=n.samples,y=d.samples,g=this.typeSupported,U={},P=!Object(Q.isFiniteNumber)(this._initPTS),I="audio/mp4",G,K,D;if(P&&(G=K=Infinity),n.config&&T.length&&(n.timescale=n.samplerate,n.isAAC||(g.mpeg?(I="audio/mpeg",n.codec=""):g.mp3&&(n.codec="mp3")),U.audio={id:"audio",container:I,codec:n.codec,initSegment:!n.isAAC&&g.mpeg?new Uint8Array(0):_.default.initSegment([n]),metadata:{channelCount:n.channelCount}},P&&(D=n.inputTimeScale,G=K=T[0].pts-Math.round(D*m))),d.sps&&d.pps&&y.length&&(d.timescale=d.inputTimeScale,U.video={id:"main",container:"video/mp4",codec:d.codec,initSegment:_.default.initSegment([d]),metadata:{width:d.width,height:d.height}},P)){D=d.inputTimeScale;var J=this.getVideoStartPts(y),X=Math.round(D*m);K=Math.min(K,l(y[0].dts,J)-X),G=Math.min(G,J-X)}if(Object.keys(U).length)return this.ISGenerated=!0,P&&(this._initPTS=G,this._initDTS=K),{tracks:U,initPTS:G,timescale:D}},w.remuxVideo=function(n,d,m,T){var y=n.inputTimeScale,g=n.samples,U=[],P=g.length,I=this._initPTS,G=this.nextAvcDts,K=8,D,J,X,ne=Number.POSITIVE_INFINITY,ue=Number.NEGATIVE_INFINITY,Oe=0,_e=!1;if(!m||G===null){var De=d*y,Ue=g[0].pts-l(g[0].dts,g[0].pts);G=De-Ue}for(var Ke=0;Ke<P;Ke++){var Le=g[Ke];if(Le.pts=l(Le.pts-I,G),Le.dts=l(Le.dts-I,G),Le.dts>Le.pts){var ae=9e4*.2;Oe=Math.max(Math.min(Oe,Le.pts-Le.dts),-1*ae)}Le.dts<g[Ke>0?Ke-1:Ke].dts&&(_e=!0)}_e&&g.sort(function(Ct,nt){var qe=Ct.dts-nt.dts,$e=Ct.pts-nt.pts;return qe||$e}),J=g[0].dts,X=g[g.length-1].dts;var V=Math.round((X-J)/(P-1));if(Oe<0){if(Oe<V*-2){t.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(a.toMsFromMpegTsClock)(-V,!0)+" ms");for(var $=Oe,q=0;q<P;q++)g[q].dts=$=Math.max($,g[q].pts-V),g[q].pts=Math.max($,g[q].pts)}else{t.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(a.toMsFromMpegTsClock)(Oe,!0)+" ms to overcome this issue");for(var se=0;se<P;se++)g[se].dts=g[se].dts+Oe}J=g[0].dts}if(m){var te=J-G,oe=te>V,re=te<-1;if(oe||re){oe?t.logger.warn("AVC: "+Object(a.toMsFromMpegTsClock)(te,!0)+" ms ("+te+"dts) hole between fragments detected, filling it"):t.logger.warn("AVC: "+Object(a.toMsFromMpegTsClock)(-te,!0)+" ms ("+te+"dts) overlapping between fragments detected"),J=G;var ie=g[0].pts-te;g[0].dts=J,g[0].pts=ie,t.logger.log("Video: First PTS/DTS adjusted: "+Object(a.toMsFromMpegTsClock)(ie,!0)+"/"+Object(a.toMsFromMpegTsClock)(J,!0)+", delta: "+Object(a.toMsFromMpegTsClock)(te,!0)+" ms")}}c&&(J=Math.max(0,J));for(var ee=0,de=0,Ce=0;Ce<P;Ce++){for(var Me=g[Ce],Ye=Me.units,et=Ye.length,st=0,ut=0;ut<et;ut++)st+=Ye[ut].data.length;de+=st,ee+=et,Me.length=st,Me.dts=Math.max(Me.dts,J),Me.pts=Math.max(Me.pts,Me.dts,0),ne=Math.min(Me.pts,ne),ue=Math.max(Me.pts,ue)}X=g[P-1].dts;var yt=de+4*ee+8,xt;try{xt=new Uint8Array(yt)}catch(Ct){this.observer.emit(R.Events.ERROR,R.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:yt,reason:"fail allocating video mdat "+yt});return}var je=new DataView(xt.buffer);je.setUint32(0,yt),xt.set(_.default.types.mdat,4);for(var He=0;He<P;He++){for(var ot=g[He],ht=ot.units,we=0,he=0,fe=ht.length;he<fe;he++){var ge=ht[he],Te=ge.data,me=ge.data.byteLength;je.setUint32(K,me),K+=4,xt.set(Te,K),K+=me,we+=4+me}if(He<P-1)D=g[He+1].dts-ot.dts;else{var Ee=this.config,xe=ot.dts-g[He>0?He-1:He].dts;if(Ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var Ie=Math.floor(Ee.maxBufferHole*y),Pe=(T?ne+T*y:this.nextAudioPts)-ot.pts;Pe>Ie?(D=Pe-xe,D<0&&(D=xe),t.logger.log("[mp4-remuxer]: It is approximately "+Pe/90+" ms to the next segment; using duration "+D/90+" ms for the last video frame.")):D=xe}else D=xe}var Qe=Math.round(ot.pts-ot.dts);U.push(new B(ot.key,D,we,Qe))}if(U.length&&f&&f<70){var tt=U[0].flags;tt.dependsOn=2,tt.isNonSync=0}console.assert(D!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=G=X+D,this.isVideoContiguous=!0;var mt=_.default.moof(n.sequenceNumber++,J,A({},n,{samples:U})),Bt="video",Et={data1:mt,data2:xt,startPTS:ne/y,endPTS:(ue+D)/y,startDTS:J/y,endDTS:G/y,type:Bt,hasAudio:!1,hasVideo:!0,nb:U.length,dropped:n.dropped};return n.samples=[],n.dropped=0,console.assert(xt.length,"MDAT length must not be zero"),Et},w.remuxAudio=function(n,d,m,T,y){var g=n.inputTimeScale,U=n.samplerate?n.samplerate:g,P=g/U,I=n.isAAC?s:o,G=I*P,K=this._initPTS,D=!n.isAAC&&this.typeSupported.mpeg,J=[],X=n.samples,ne=D?0:8,ue=this.nextAudioPts||-1,Oe=d*g;if(this.isAudioContiguous=m=m||X.length&&ue>0&&(T&&Math.abs(Oe-ue)<9e3||Math.abs(l(X[0].pts-K,Oe)-ue)<20*G),X.forEach(function(Te){Te.pts=l(Te.pts-K,Oe)}),!m||ue<0){if(X=X.filter(function(Te){return Te.pts>=0}),!X.length)return;y===0?ue=0:T?ue=Math.max(0,Oe):ue=X[0].pts}if(n.isAAC)for(var _e=y!==void 0,De=this.config.maxAudioFramesDrift,Ue=0,Ke=ue;Ue<X.length;Ue++){var Le=X[Ue],ae=Le.pts,V=ae-Ke,$=Math.abs(1e3*V/g);if(V<=-De*G&&_e)Ue===0&&(t.logger.warn("Audio frame @ "+(ae/g).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*V/g)+" ms."),this.nextAudioPts=ue=Ke=ae);else if(V>=De*G&&$<h&&_e){var q=Math.round(V/G);Ke=ae-q*G,Ke<0&&(q--,Ke+=G),Ue===0&&(this.nextAudioPts=ue=Ke),t.logger.warn("[mp4-remuxer]: Injecting "+q+" audio frame @ "+(Ke/g).toFixed(3)+"s due to "+Math.round(1e3*V/g)+" ms gap.");for(var se=0;se<q;se++){var te=Math.max(Ke,0),oe=M.default.getSilentFrame(n.manifestCodec||n.codec,n.channelCount);oe||(t.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),oe=Le.unit.subarray()),X.splice(Ue,0,{unit:oe,pts:te}),Ke+=G,Ue++}}Le.pts=Ke,Ke+=G}for(var re=null,ie=null,ee,de=0,Ce=X.length;Ce--;)de+=X[Ce].unit.byteLength;for(var Me=0,Ye=X.length;Me<Ye;Me++){var et=X[Me],st=et.unit,ut=et.pts;if(ie!==null){var yt=J[Me-1];yt.duration=Math.round((ut-ie)/P)}else if(m&&n.isAAC&&(ut=ue),re=ut,de>0){de+=ne;try{ee=new Uint8Array(de)}catch(Te){this.observer.emit(R.Events.ERROR,R.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:de,reason:"fail allocating audio mdat "+de});return}if(!D){var xt=new DataView(ee.buffer);xt.setUint32(0,de),ee.set(_.default.types.mdat,4)}}else return;ee.set(st,ne);var je=st.byteLength;ne+=je,J.push(new B(!0,I,je,0)),ie=ut}var He=J.length;if(!He)return;var ot=J[J.length-1];this.nextAudioPts=ue=ie+P*ot.duration;var ht=D?new Uint8Array(0):_.default.moof(n.sequenceNumber++,re/P,A({},n,{samples:J}));n.samples=[];var we=re/g,he=ue/g,fe="audio",ge={data1:ht,data2:ee,startPTS:we,endPTS:he,startDTS:we,endDTS:he,type:fe,hasAudio:!0,hasVideo:!1,nb:He};return this.isAudioContiguous=!0,console.assert(ee.length,"MDAT length must not be zero"),ge},w.remuxEmptyAudio=function(n,d,m,T){var y=n.inputTimeScale,g=n.samplerate?n.samplerate:y,U=y/g,P=this.nextAudioPts,I=(P!==null?P:T.startDTS*y)+this._initDTS,G=T.endDTS*y+this._initDTS,K=U*s,D=Math.ceil((G-I)/K),J=M.default.getSilentFrame(n.manifestCodec||n.codec,n.channelCount);if(t.logger.warn("[mp4-remuxer]: remux empty Audio"),!J){t.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var X=[],ne=0;ne<D;ne++){var ue=I+ne*K;X.push({unit:J,pts:ue,dts:ue})}return n.samples=X,this.remuxAudio(n,d,m,!1)},w.remuxID3=function(n,d){var m=n.samples.length;if(!m)return;for(var T=n.inputTimeScale,y=this._initPTS,g=this._initDTS,U=0;U<m;U++){var P=n.samples[U];P.pts=l(P.pts-y,d*T)/T,P.dts=l(P.dts-g,d*T)/T}var I=n.samples;return n.samples=[],{samples:I}},w.remuxText=function(n,d){var m=n.samples.length;if(!m)return;for(var T=n.inputTimeScale,y=this._initPTS,g=0;g<m;g++){var U=n.samples[g];U.pts=l(U.pts-y,d*T)/T}n.samples.sort(function(I,G){return I.pts-G.pts});var P=n.samples;return n.samples=[],{samples:P}},L}();function l(L,w){var p;if(w===null)return L;for(w<L?p=-8589934592:p=8589934592;Math.abs(L-w)>4294967296;)L+=p;return L}function v(L){for(var w=0;w<L.length;w++)if(L[w].key)return w;return-1}var B=function(w,p,n,d){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=p,this.size=n,this.cts=d,this.flags=new C(w)},C=function(w){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=w?2:1,this.isNonSync=w?0:1}},"./src/remux/passthrough-remuxer.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/polyfills/number.ts"),M=O("./src/utils/mp4-tools.ts"),_=O("./src/loader/fragment.ts"),R=O("./src/utils/logger.ts"),b=function(){function a(){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 A=a.prototype;return A.destroy=function(){},A.resetTimeStamp=function(s){this.initPTS=s,this.lastEndDTS=null},A.resetNextTimestamp=function(){this.lastEndDTS=null},A.resetInitSegment=function(s,o,f){this.audioCodec=o,this.videoCodec=f,this.generateInitSegment(s),this.emitInitSegment=!0},A.generateInitSegment=function(s){var o=this.audioCodec,f=this.videoCodec;if(!s||!s.byteLength){this.initTracks=void 0,this.initData=void 0;return}var u=this.initData=Object(M.parseInitSegment)(s);o||(o=E(u.audio,_.ElementaryStreamTypes.AUDIO)),f||(f=E(u.video,_.ElementaryStreamTypes.VIDEO));var c={};u.audio&&u.video?c.audiovideo={container:"video/mp4",codec:o+","+f,initSegment:s,id:"main"}:u.audio?c.audio={container:"audio/mp4",codec:o,initSegment:s,id:"audio"}:u.video?c.video={container:"video/mp4",codec:f,initSegment:s,id:"main"}:R.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=c},A.remux=function(s,o,f,u,c){var i=this.initPTS,l=this.lastEndDTS,v={audio:void 0,video:void 0,text:u,id3:f,initSegment:void 0};Object(Q.isFiniteNumber)(l)||(l=this.lastEndDTS=c||0);var B=o.samples;if(!B||!B.length)return v;var C={initPTS:void 0,timescale:1},L=this.initData;if((!L||!L.length)&&(this.generateInitSegment(B),L=this.initData),!L||!L.length)return R.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),v;this.emitInitSegment&&(C.tracks=this.initTracks,this.emitInitSegment=!1),Object(Q.isFiniteNumber)(i)||(this.initPTS=C.initPTS=i=t(L,B,l));var w=Object(M.getDuration)(B,L),p=l,n=w+p;Object(M.offsetStartDTS)(L,B,i),w>0?this.lastEndDTS=n:(R.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var d=!!L.audio,m=!!L.video,T="";d&&(T+="audio"),m&&(T+="video");var y={data1:B,startPTS:p,startDTS:p,endPTS:n,endDTS:n,type:T,hasAudio:d,hasVideo:m,nb:1,dropped:0};return v.audio=y.type==="audio"?y:void 0,v.video=y.type!=="audio"?y:void 0,v.text=u,v.id3=f,v.initSegment=C,v},a}(),t=function(A,h,s){return Object(M.getStartDTS)(A,h)-s};function E(a,A){var h=a==null?void 0:a.codec;return h&&h.length>4?h:h==="hvc1"?"hvc1.1.c.L120.90":h==="av01"?"av01.0.04M.08":h==="avc1"||A===_.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}H.default=b},"./src/task-loop.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return Q});var Q=function(){function M(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var _=M.prototype;return _.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},_.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},_.onHandlerDestroyed=function(){},_.hasInterval=function(){return!!this._tickInterval},_.hasNextTick=function(){return!!this._tickTimer},_.setInterval=function(b){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,b),!0)},_.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},_.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},_.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},_.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},_.doTick=function(){},M}()},"./src/types/cmcd.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"CMCDVersion",function(){return Q}),O.d(H,"CMCDObjectType",function(){return M}),O.d(H,"CMCDStreamingFormat",function(){return _}),O.d(H,"CMCDStreamType",function(){return R});var Q=1,M;(function(b){b.MANIFEST="m",b.AUDIO="a",b.VIDEO="v",b.MUXED="av",b.INIT="i",b.CAPTION="c",b.TIMED_TEXT="tt",b.KEY="k",b.OTHER="o"})(M||(M={}));var _;(function(b){b.DASH="d",b.HLS="h",b.SMOOTH="s",b.OTHER="o"})(_||(_={}));var R;(function(b){b.VOD="v",b.LIVE="l"})(R||(R={}))},"./src/types/level.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"HlsSkip",function(){return _}),O.d(H,"getSkipValue",function(){return R}),O.d(H,"HlsUrlParameters",function(){return b}),O.d(H,"Level",function(){return t});function Q(E,a){for(var A=0;A<a.length;A++){var h=a[A];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(E,h.key,h)}}function M(E,a,A){return a&&Q(E.prototype,a),A&&Q(E,A),E}var _;(function(E){E.No="",E.Yes="YES",E.v2="v2"})(_||(_={}));function R(E,a){var A=E.canSkipUntil,h=E.canSkipDateRanges,s=E.endSN,o=a!==void 0?a-s:0;return A&&o<A?h?_.v2:_.Yes:_.No}var b=function(){function E(A,h,s){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=A,this.part=h,this.skip=s}var a=E.prototype;return a.addDirectives=function(h){var s=new self.URL(h);return this.msn!==void 0&&s.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&s.searchParams.set("_HLS_part",this.part.toString()),this.skip&&s.searchParams.set("_HLS_skip",this.skip),s.toString()},E}(),t=function(){function E(a){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=[a.url],this.attrs=a.attrs,this.bitrate=a.bitrate,a.details&&(this.details=a.details),this.id=a.id||0,this.name=a.name,this.width=a.width||0,this.height=a.height||0,this.audioCodec=a.audioCodec,this.videoCodec=a.videoCodec,this.unknownCodecs=a.unknownCodecs,this.codecSet=[a.videoCodec,a.audioCodec].filter(function(A){return A}).join(",").replace(/\.[^.,]+/g,"")}return M(E,[{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(A){var h=A%this.url.length;this._urlId!==h&&(this.details=void 0,this._urlId=h)}}]),E}()},"./src/types/loader.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"PlaylistContextType",function(){return Q}),O.d(H,"PlaylistLevelType",function(){return M});var Q;(function(_){_.MANIFEST="manifest",_.LEVEL="level",_.AUDIO_TRACK="audioTrack",_.SUBTITLE_TRACK="subtitleTrack"})(Q||(Q={}));var M;(function(_){_.MAIN="main",_.AUDIO="audio",_.SUBTITLE="subtitle"})(M||(M={}))},"./src/types/transmuxer.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"ChunkMetadata",function(){return Q});var Q=function(R,b,t,E,a,A){E===void 0&&(E=0),a===void 0&&(a=-1),A===void 0&&(A=!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=M(),this.buffering={audio:M(),video:M(),audiovideo:M()},this.level=R,this.sn=b,this.id=t,this.size=E,this.part=a,this.partial=A};function M(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"AttrList",function(){return _});var Q=/^(\d+)x(\d+)$/,M=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,_=function(){function R(t){typeof t=="string"&&(t=R.parseAttrList(t));for(var E in t)t.hasOwnProperty(E)&&(this[E]=t[E])}var b=R.prototype;return b.decimalInteger=function(E){var a=parseInt(this[E],10);return a>Number.MAX_SAFE_INTEGER?Infinity:a},b.hexadecimalInteger=function(E){if(this[E]){var a=(this[E]||"0x").slice(2);a=(a.length&1?"0":"")+a;for(var A=new Uint8Array(a.length/2),h=0;h<a.length/2;h++)A[h]=parseInt(a.slice(h*2,h*2+2),16);return A}else return null},b.hexadecimalIntegerAsNumber=function(E){var a=parseInt(this[E],16);return a>Number.MAX_SAFE_INTEGER?Infinity:a},b.decimalFloatingPoint=function(E){return parseFloat(this[E])},b.optionalFloat=function(E,a){var A=this[E];return A?parseFloat(A):a},b.enumeratedString=function(E){return this[E]},b.bool=function(E){return this[E]==="YES"},b.decimalResolution=function(E){var a=Q.exec(this[E]);return a===null?void 0:{width:parseInt(a[1],10),height:parseInt(a[2],10)}},R.parseAttrList=function(E){var a,A={},h='"';for(M.lastIndex=0;(a=M.exec(E))!==null;){var s=a[2];s.indexOf(h)===0&&s.lastIndexOf(h)===s.length-1&&(s=s.slice(1,-1)),A[a[1]]=s}return A},R}()},"./src/utils/binary-search.ts":function(Z,H,O){"use strict";O.r(H);var Q={search:function(_,R){for(var b=0,t=_.length-1,E=null,a=null;b<=t;){E=(b+t)/2|0,a=_[E];var A=R(a);if(A>0)b=E+1;else if(A<0)t=E-1;else return a}return null}};H.default=Q},"./src/utils/buffer-helper.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"BufferHelper",function(){return _});var Q=O("./src/utils/logger.ts"),M={length:0,start:function(){return 0},end:function(){return 0}},_=function(){function R(){}return R.isBuffered=function(t,E){try{if(t){for(var a=R.getBuffered(t),A=0;A<a.length;A++)if(E>=a.start(A)&&E<=a.end(A))return!0}}catch(h){}return!1},R.bufferInfo=function(t,E,a){try{if(t){var A=R.getBuffered(t),h=[],s;for(s=0;s<A.length;s++)h.push({start:A.start(s),end:A.end(s)});return this.bufferedInfo(h,E,a)}}catch(o){}return{len:0,start:E,end:E,nextStart:void 0}},R.bufferedInfo=function(t,E,a){E=Math.max(0,E),t.sort(function(C,L){var w=C.start-L.start;return w||L.end-C.end});var A=[];if(a)for(var h=0;h<t.length;h++){var s=A.length;if(s){var o=A[s-1].end;t[h].start-o<a?t[h].end>o&&(A[s-1].end=t[h].end):A.push(t[h])}else A.push(t[h])}else A=t;for(var f=0,u,c=E,i=E,l=0;l<A.length;l++){var v=A[l].start,B=A[l].end;if(E+a>=v&&E<B)c=v,i=B,f=i-E;else if(E+a<v){u=v;break}}return{len:f,start:c||0,end:i||0,nextStart:u}},R.getBuffered=function(t){try{return t.buffered}catch(E){return Q.logger.log("failed to get media.buffered",E),M}},R}()},"./src/utils/cea-608-parser.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"Row",function(){return i}),O.d(H,"CaptionScreen",function(){return l});var Q=O("./src/utils/logger.ts"),M={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},_=function(n){var d=n;return M.hasOwnProperty(n)&&(d=M[n]),String.fromCharCode(d)},R=15,b=100,t={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},E={17:2,18:4,21:6,22:8,23:10,19:13,20:15},a={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},A={25:2,26:4,29:6,30:8,31:10,27:13,28:15},h=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],s;(function(p){p[p.ERROR=0]="ERROR",p[p.TEXT=1]="TEXT",p[p.WARNING=2]="WARNING",p[p.INFO=2]="INFO",p[p.DEBUG=3]="DEBUG",p[p.DATA=3]="DATA"})(s||(s={}));var o=function(){function p(){this.time=null,this.verboseLevel=s.ERROR}var n=p.prototype;return n.log=function(m,T){this.verboseLevel>=m&&Q.logger.log(this.time+" ["+m+"] "+T)},p}(),f=function(n){for(var d=[],m=0;m<n.length;m++)d.push(n[m].toString(16));return d},u=function(){function p(d,m,T,y,g){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=d||"white",this.underline=m||!1,this.italics=T||!1,this.background=y||"black",this.flash=g||!1}var n=p.prototype;return n.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},n.setStyles=function(m){for(var T=["foreground","underline","italics","background","flash"],y=0;y<T.length;y++){var g=T[y];m.hasOwnProperty(g)&&(this[g]=m[g])}},n.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},n.equals=function(m){return this.foreground===m.foreground&&this.underline===m.underline&&this.italics===m.italics&&this.background===m.background&&this.flash===m.flash},n.copy=function(m){this.foreground=m.foreground,this.underline=m.underline,this.italics=m.italics,this.background=m.background,this.flash=m.flash},n.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},p}(),c=function(){function p(d,m,T,y,g,U){this.uchar=void 0,this.penState=void 0,this.uchar=d||" ",this.penState=new u(m,T,y,g,U)}var n=p.prototype;return n.reset=function(){this.uchar=" ",this.penState.reset()},n.setChar=function(m,T){this.uchar=m,this.penState.copy(T)},n.setPenState=function(m){this.penState.copy(m)},n.equals=function(m){return this.uchar===m.uchar&&this.penState.equals(m.penState)},n.copy=function(m){this.uchar=m.uchar,this.penState.copy(m.penState)},n.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},p}(),i=function(){function p(d){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var m=0;m<b;m++)this.chars.push(new c);this.logger=d,this.pos=0,this.currPenState=new u}var n=p.prototype;return n.equals=function(m){for(var T=!0,y=0;y<b;y++)if(!this.chars[y].equals(m.chars[y])){T=!1;break}return T},n.copy=function(m){for(var T=0;T<b;T++)this.chars[T].copy(m.chars[T])},n.isEmpty=function(){for(var m=!0,T=0;T<b;T++)if(!this.chars[T].isEmpty()){m=!1;break}return m},n.setCursor=function(m){this.pos!==m&&(this.pos=m),this.pos<0?(this.logger.log(s.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>b&&(this.logger.log(s.DEBUG,"Too large cursor position "+this.pos),this.pos=b)},n.moveCursor=function(m){var T=this.pos+m;if(m>1)for(var y=this.pos+1;y<T+1;y++)this.chars[y].setPenState(this.currPenState);this.setCursor(T)},n.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},n.insertChar=function(m){m>=144&&this.backSpace();var T=_(m);if(this.pos>=b){this.logger.log(s.ERROR,"Cannot insert "+m.toString(16)+" ("+T+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(T,this.currPenState),this.moveCursor(1)},n.clearFromPos=function(m){var T;for(T=m;T<b;T++)this.chars[T].reset()},n.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},n.clearToEndOfRow=function(){this.clearFromPos(this.pos)},n.getTextString=function(){for(var m=[],T=!0,y=0;y<b;y++){var g=this.chars[y].uchar;g!==" "&&(T=!1),m.push(g)}return T?"":m.join("")},n.setPenStyles=function(m){this.currPenState.setStyles(m);var T=this.chars[this.pos];T.setPenState(this.currPenState)},p}(),l=function(){function p(d){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var m=0;m<R;m++)this.rows.push(new i(d));this.logger=d,this.currRow=R-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var n=p.prototype;return n.reset=function(){for(var m=0;m<R;m++)this.rows[m].clear();this.currRow=R-1},n.equals=function(m){for(var T=!0,y=0;y<R;y++)if(!this.rows[y].equals(m.rows[y])){T=!1;break}return T},n.copy=function(m){for(var T=0;T<R;T++)this.rows[T].copy(m.rows[T])},n.isEmpty=function(){for(var m=!0,T=0;T<R;T++)if(!this.rows[T].isEmpty()){m=!1;break}return m},n.backSpace=function(){var m=this.rows[this.currRow];m.backSpace()},n.clearToEndOfRow=function(){var m=this.rows[this.currRow];m.clearToEndOfRow()},n.insertChar=function(m){var T=this.rows[this.currRow];T.insertChar(m)},n.setPen=function(m){var T=this.rows[this.currRow];T.setPenStyles(m)},n.moveCursor=function(m){var T=this.rows[this.currRow];T.moveCursor(m)},n.setCursor=function(m){this.logger.log(s.INFO,"setCursor: "+m);var T=this.rows[this.currRow];T.setCursor(m)},n.setPAC=function(m){this.logger.log(s.INFO,"pacData = "+JSON.stringify(m));var T=m.row-1;if(this.nrRollUpRows&&T<this.nrRollUpRows-1&&(T=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==T){for(var y=0;y<R;y++)this.rows[y].clear();var g=this.currRow+1-this.nrRollUpRows,U=this.lastOutputScreen;if(U){var P=U.rows[g].cueStartTime,I=this.logger.time;if(P&&I!==null&&P<I)for(var G=0;G<this.nrRollUpRows;G++)this.rows[T-this.nrRollUpRows+G+1].copy(U.rows[g+G])}}this.currRow=T;var K=this.rows[this.currRow];if(m.indent!==null){var D=m.indent,J=Math.max(D-1,0);K.setCursor(m.indent),m.color=K.chars[J].penState.foreground}var X={foreground:m.color,underline:m.underline,italics:m.italics,background:"black",flash:!1};this.setPen(X)},n.setBkgData=function(m){this.logger.log(s.INFO,"bkgData = "+JSON.stringify(m)),this.backSpace(),this.setPen(m),this.insertChar(32)},n.setRollUpRows=function(m){this.nrRollUpRows=m},n.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(s.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(s.TEXT,this.getDisplayText());var m=this.currRow+1-this.nrRollUpRows,T=this.rows.splice(m,1)[0];T.clear(),this.rows.splice(this.currRow,0,T),this.logger.log(s.INFO,"Rolling up")},n.getDisplayText=function(m){m=m||!1;for(var T=[],y="",g=-1,U=0;U<R;U++){var P=this.rows[U].getTextString();P&&(g=U+1,m?T.push("Row "+g+": '"+P+"'"):T.push(P.trim()))}return T.length>0&&(m?y="["+T.join(" | ")+"]":y=T.join(`
|
|
`)),y},n.getTextAndFormat=function(){return this.rows},p}(),v=function(){function p(d,m,T){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=d,this.outputFilter=m,this.mode=null,this.verbose=0,this.displayedMemory=new l(T),this.nonDisplayedMemory=new l(T),this.lastOutputScreen=new l(T),this.currRollUpRow=this.displayedMemory.rows[R-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=T}var n=p.prototype;return n.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[R-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},n.getHandler=function(){return this.outputFilter},n.setHandler=function(m){this.outputFilter=m},n.setPAC=function(m){this.writeScreen.setPAC(m)},n.setBkgData=function(m){this.writeScreen.setBkgData(m)},n.setMode=function(m){if(m===this.mode)return;this.mode=m,this.logger.log(s.INFO,"MODE="+m),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=m},n.insertChars=function(m){for(var T=0;T<m.length;T++)this.writeScreen.insertChar(m[T]);var y=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(s.INFO,y+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(s.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},n.ccRCL=function(){this.logger.log(s.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},n.ccBS=function(){if(this.logger.log(s.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},n.ccAOF=function(){},n.ccAON=function(){},n.ccDER=function(){this.logger.log(s.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},n.ccRU=function(m){this.logger.log(s.INFO,"RU("+m+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(m)},n.ccFON=function(){this.logger.log(s.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},n.ccRDC=function(){this.logger.log(s.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},n.ccTR=function(){this.logger.log(s.INFO,"TR"),this.setMode("MODE_TEXT")},n.ccRTD=function(){this.logger.log(s.INFO,"RTD"),this.setMode("MODE_TEXT")},n.ccEDM=function(){this.logger.log(s.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},n.ccCR=function(){this.logger.log(s.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},n.ccENM=function(){this.logger.log(s.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},n.ccEOC=function(){if(this.logger.log(s.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var m=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=m,this.writeScreen=this.nonDisplayedMemory,this.logger.log(s.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},n.ccTO=function(m){this.logger.log(s.INFO,"TO("+m+") - Tab Offset"),this.writeScreen.moveCursor(m)},n.ccMIDROW=function(m){var T={flash:!1};if(T.underline=m%2===1,T.italics=m>=46,T.italics)T.foreground="white";else{var y=Math.floor(m/2)-16,g=["white","green","blue","cyan","red","yellow","magenta"];T.foreground=g[y]}this.logger.log(s.INFO,"MIDROW: "+JSON.stringify(T)),this.writeScreen.setPen(T)},n.outputDataUpdate=function(m){m===void 0&&(m=!1);var T=this.logger.time;if(T===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=T:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,T,this.lastOutputScreen),m&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:T),this.lastOutputScreen.copy(this.displayedMemory))},n.cueSplitAtTime=function(m){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,m,this.displayedMemory),this.cueStartTime=m))},p}(),B=function(){function p(d,m,T){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var y=new o;this.channels=[null,new v(d,m,y),new v(d+1,T,y)],this.cmdHistory=w(),this.logger=y}var n=p.prototype;return n.getHandler=function(m){return this.channels[m].getHandler()},n.setHandler=function(m,T){this.channels[m].setHandler(T)},n.addData=function(m,T){var y,g,U,P=!1;this.logger.time=m;for(var I=0;I<T.length;I+=2){if(g=T[I]&127,U=T[I+1]&127,g===0&&U===0)continue;if(this.logger.log(s.DATA,"["+f([T[I],T[I+1]])+"] -> ("+f([g,U])+")"),y=this.parseCmd(g,U),y||(y=this.parseMidrow(g,U)),y||(y=this.parsePAC(g,U)),y||(y=this.parseBackgroundAttributes(g,U)),!y&&(P=this.parseChars(g,U),P)){var G=this.currentChannel;if(G&&G>0){var K=this.channels[G];K.insertChars(P)}else this.logger.log(s.WARNING,"No channel found yet. TEXT-MODE?")}!y&&!P&&this.logger.log(s.WARNING,"Couldn't parse cleaned data "+f([g,U])+" orig: "+f([T[I],T[I+1]]))}},n.parseCmd=function(m,T){var y=this.cmdHistory,g=(m===20||m===28||m===21||m===29)&&T>=32&&T<=47,U=(m===23||m===31)&&T>=33&&T<=35;if(!(g||U))return!1;if(L(m,T,y))return C(null,null,y),this.logger.log(s.DEBUG,"Repeated command ("+f([m,T])+") is dropped"),!0;var P=m===20||m===21||m===23?1:2,I=this.channels[P];return m===20||m===21||m===28||m===29?T===32?I.ccRCL():T===33?I.ccBS():T===34?I.ccAOF():T===35?I.ccAON():T===36?I.ccDER():T===37?I.ccRU(2):T===38?I.ccRU(3):T===39?I.ccRU(4):T===40?I.ccFON():T===41?I.ccRDC():T===42?I.ccTR():T===43?I.ccRTD():T===44?I.ccEDM():T===45?I.ccCR():T===46?I.ccENM():T===47&&I.ccEOC():I.ccTO(T-32),C(m,T,y),this.currentChannel=P,!0},n.parseMidrow=function(m,T){var y=0;if((m===17||m===25)&&T>=32&&T<=47){if(m===17?y=1:y=2,y!==this.currentChannel)return this.logger.log(s.ERROR,"Mismatch channel in midrow parsing"),!1;var g=this.channels[y];return g?(g.ccMIDROW(T),this.logger.log(s.DEBUG,"MIDROW ("+f([m,T])+")"),!0):!1}return!1},n.parsePAC=function(m,T){var y,g=this.cmdHistory,U=(m>=17&&m<=23||m>=25&&m<=31)&&T>=64&&T<=127,P=(m===16||m===24)&&T>=64&&T<=95;if(!(U||P))return!1;if(L(m,T,g))return C(null,null,g),!0;var I=m<=23?1:2;T>=64&&T<=95?y=I===1?t[m]:a[m]:y=I===1?E[m]:A[m];var G=this.channels[I];return G?(G.setPAC(this.interpretPAC(y,T)),C(m,T,g),this.currentChannel=I,!0):!1},n.interpretPAC=function(m,T){var y,g={color:null,italics:!1,indent:null,underline:!1,row:m};return T>95?y=T-96:y=T-64,g.underline=(y&1)===1,y<=13?g.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(y/2)]:y<=15?(g.italics=!0,g.color="white"):g.indent=Math.floor((y-16)/2)*4,g},n.parseChars=function(m,T){var y,g=null,U=null;if(m>=25?(y=2,U=m-8):(y=1,U=m),U>=17&&U<=19){var P;U===17?P=T+80:U===18?P=T+112:P=T+144,this.logger.log(s.INFO,"Special char '"+_(P)+"' in channel "+y),g=[P]}else m>=32&&m<=127&&(g=T===0?[m]:[m,T]);if(g){var I=f(g);this.logger.log(s.DEBUG,"Char codes = "+I.join(",")),C(m,T,this.cmdHistory)}return g},n.parseBackgroundAttributes=function(m,T){var y=(m===16||m===24)&&T>=32&&T<=47,g=(m===23||m===31)&&T>=45&&T<=47;if(!(y||g))return!1;var U,P={};m===16||m===24?(U=Math.floor((T-32)/2),P.background=h[U],T%2===1&&(P.background=P.background+"_semi")):T===45?P.background="transparent":(P.foreground="black",T===47&&(P.underline=!0));var I=m<=23?1:2,G=this.channels[I];return G.setBkgData(P),C(m,T,this.cmdHistory),!0},n.reset=function(){for(var m=0;m<Object.keys(this.channels).length;m++){var T=this.channels[m];T&&T.reset()}this.cmdHistory=w()},n.cueSplitAtTime=function(m){for(var T=0;T<this.channels.length;T++){var y=this.channels[T];y&&y.cueSplitAtTime(m)}},p}();function C(p,n,d){d.a=p,d.b=n}function L(p,n,d){return d.a===p&&d.b===n}function w(){return{a:null,b:null}}H.default=B},"./src/utils/codecs.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"isCodecType",function(){return M}),O.d(H,"isCodecSupportedInMp4",function(){return _});var Q={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 M(R,b){var t=Q[b];return!!t&&t[R.slice(0,4)]===!0}function _(R,b){return MediaSource.isTypeSupported((b||"video")+'/mp4;codecs="'+R+'"')}},"./src/utils/cues.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/utils/vttparser.ts"),M=O("./src/utils/webvtt-parser.ts"),_=O("./src/utils/texttrack-utils.ts"),R=/\s/,b={newCue:function(E,a,A,h){for(var s=[],o,f,u,c,i,l=self.VTTCue||self.TextTrackCue,v=0;v<h.rows.length;v++)if(o=h.rows[v],u=!0,c=0,i="",!o.isEmpty()){for(var B=0;B<o.chars.length;B++)R.test(o.chars[B].uchar)&&u?c++:(i+=o.chars[B].uchar,u=!1);o.cueStartTime=a,a===A&&(A+=1e-4),c>=16?c--:c++;var C=Object(Q.fixLineBreaks)(i.trim()),L=Object(M.generateCueId)(a,A,C);(!E||!E.cues||!E.cues.getCueById(L))&&(f=new l(a,A,C),f.id=L,f.line=v+1,f.align="left",f.position=10+Math.min(80,Math.floor(c*8/32)*10),s.push(f))}return E&&s.length&&(s.sort(function(w,p){return w.line==="auto"||p.line==="auto"?0:w.line>8&&p.line>8?p.line-w.line:w.line-p.line}),s.forEach(function(w){return Object(_.addCueToTrack)(E,w)})),s}};H.default=b},"./src/utils/discontinuities.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"findFirstFragWithCC",function(){return R}),O.d(H,"shouldAlignOnDiscontinuities",function(){return b}),O.d(H,"findDiscontinuousReferenceFrag",function(){return t}),O.d(H,"adjustSlidingStart",function(){return a}),O.d(H,"alignStream",function(){return A}),O.d(H,"alignPDT",function(){return s}),O.d(H,"alignFragmentByPDTDelta",function(){return o}),O.d(H,"alignMediaPlaylistByPDT",function(){return f});var Q=O("./src/polyfills/number.ts"),M=O("./src/utils/logger.ts"),_=O("./src/controller/level-helper.ts");function R(u,c){for(var i=null,l=0,v=u.length;l<v;l++){var B=u[l];if(B&&B.cc===c){i=B;break}}return i}function b(u,c,i){return!!(c.details&&(i.endCC>i.startCC||u&&u.cc<i.startCC))}function t(u,c){var i=u.fragments,l=c.fragments;if(!l.length||!i.length){M.logger.log("No fragments to align");return}var v=R(i,l[0].cc);if(!v||v&&!v.startPTS){M.logger.log("No frag in previous level to align on");return}return v}function E(u,c){if(u){var i=u.start+c;u.start=u.startPTS=i,u.endPTS=i+u.duration}}function a(u,c){for(var i=c.fragments,l=0,v=i.length;l<v;l++)E(i[l],u);c.fragmentHint&&E(c.fragmentHint,u),c.alignedSliding=!0}function A(u,c,i){if(!c)return;h(u,i,c),!i.alignedSliding&&c.details&&s(i,c.details),!i.alignedSliding&&c.details&&!i.skippedSegments&&Object(_.adjustSliding)(c.details,i)}function h(u,c,i){if(b(u,i,c)){var l=t(i.details,c);l&&Object(Q.isFiniteNumber)(l.start)&&(M.logger.log("Adjusting PTS using last level due to CC increase within current level "+c.url),a(l.start,c))}}function s(u,c){if(!c.fragments.length||!u.hasProgramDateTime||!c.hasProgramDateTime)return;var i=c.fragments[0].programDateTime,l=u.fragments[0].programDateTime,v=(l-i)/1e3+c.fragments[0].start;v&&Object(Q.isFiniteNumber)(v)&&(M.logger.log("Adjusting PTS using programDateTime delta "+(l-i)+"ms, sliding:"+v.toFixed(3)+" "+u.url+" "),a(v,u))}function o(u,c){var i=u.programDateTime;if(!i)return;var l=(i-c)/1e3;u.start=u.startPTS=l,u.endPTS=l+u.duration}function f(u,c){if(!c.fragments.length||!u.hasProgramDateTime||!c.hasProgramDateTime)return;var i=c.fragments[0].programDateTime,l=c.fragments[0].start,v=i-l*1e3;u.fragments.forEach(function(B){o(B,v)}),u.fragmentHint&&o(u.fragmentHint,v),u.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/utils/ewma.ts"),M=function(){function _(b,t,E){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=E,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Q.default(b),this.fast_=new Q.default(t)}var R=_.prototype;return R.update=function(t,E){var a=this.slow_,A=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new Q.default(t,a.getEstimate(),a.getTotalWeight())),this.fast_.halfLife!==E&&(this.fast_=new Q.default(E,A.getEstimate(),A.getTotalWeight()))},R.sample=function(t,E){t=Math.max(t,this.minDelayMs_);var a=8*E,A=t/1e3,h=a/A;this.fast_.sample(A,h),this.slow_.sample(A,h)},R.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},R.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},R.destroy=function(){},_}();H.default=M},"./src/utils/ewma.ts":function(Z,H,O){"use strict";O.r(H);var Q=function(){function M(R,b,t){b===void 0&&(b=0),t===void 0&&(t=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=R,this.alpha_=R?Math.exp(Math.log(.5)/R):0,this.estimate_=b,this.totalWeight_=t}var _=M.prototype;return _.sample=function(b,t){var E=Math.pow(this.alpha_,b);this.estimate_=t*(1-E)+E*this.estimate_,this.totalWeight_+=b},_.getTotalWeight=function(){return this.totalWeight_},_.getEstimate=function(){if(this.alpha_){var b=1-Math.pow(this.alpha_,this.totalWeight_);if(b)return this.estimate_/b}return this.estimate_},M}();H.default=Q},"./src/utils/fetch-loader.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"fetchSupported",function(){return o});var Q=O("./src/polyfills/number.ts"),M=O("./src/loader/load-stats.ts"),_=O("./src/demux/chunk-cache.ts");function R(l,v){l.prototype=Object.create(v.prototype),l.prototype.constructor=l,A(l,v)}function b(l){var v=typeof Map=="function"?new Map:void 0;return b=function(C){if(C===null||!a(C))return C;if(typeof C!="function")throw new TypeError("Super expression must either be null or a function");if(typeof v!="undefined"){if(v.has(C))return v.get(C);v.set(C,L)}function L(){return t(C,arguments,h(this).constructor)}return L.prototype=Object.create(C.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),A(L,C)},b(l)}function t(l,v,B){return E()?t=Reflect.construct:t=function(L,w,p){var n=[null];n.push.apply(n,w);var d=Function.bind.apply(L,n),m=new d;return p&&A(m,p.prototype),m},t.apply(null,arguments)}function E(){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 a(l){return Function.toString.call(l).indexOf("[native code]")!==-1}function A(l,v){return A=Object.setPrototypeOf||function(C,L){return C.__proto__=L,C},A(l,v)}function h(l){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(B){return B.__proto__||Object.getPrototypeOf(B)},h(l)}function s(){return s=Object.assign||function(l){for(var v=1;v<arguments.length;v++){var B=arguments[v];for(var C in B)Object.prototype.hasOwnProperty.call(B,C)&&(l[C]=B[C])}return l},s.apply(this,arguments)}function o(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(l){}return!1}var f=function(){function l(B){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=B.fetchSetup||c,this.controller=new self.AbortController,this.stats=new M.LoadStats}var v=l.prototype;return v.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},v.abortInternal=function(){var C=this.response;(!C||!C.ok)&&(this.stats.aborted=!0,this.controller.abort())},v.abort=function(){var C;this.abortInternal(),(C=this.callbacks)!==null&&C!==void 0&&C.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},v.load=function(C,L,w){var p=this,n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();var d=u(C,this.controller.signal),m=w.onProgress,T=C.responseType==="arraybuffer",y=T?"byteLength":"length";this.context=C,this.config=L,this.callbacks=w,this.request=this.fetchSetup(C,d),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){p.abortInternal(),w.onTimeout(n,C,p.response)},L.timeout),self.fetch(this.request).then(function(g){if(p.response=p.loader=g,!g.ok){var U=g.status,P=g.statusText;throw new i(P||"fetch, bad network response",U,g)}return n.loading.first=Math.max(self.performance.now(),n.loading.start),n.total=parseInt(g.headers.get("Content-Length")||"0"),m&&Object(Q.isFiniteNumber)(L.highWaterMark)?p.loadProgressively(g,n,C,L.highWaterMark,m):T?g.arrayBuffer():g.text()}).then(function(g){var U=p.response;self.clearTimeout(p.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first),n.loaded=n.total=g[y];var P={url:U.url,data:g};m&&!Object(Q.isFiniteNumber)(L.highWaterMark)&&m(n,C,g,U),w.onSuccess(P,n,C,U)}).catch(function(g){if(self.clearTimeout(p.requestTimeout),n.aborted)return;var U=g.code||0;w.onError({code:U,text:g.message},C,g.details)})},v.getCacheAge=function(){var C=null;if(this.response){var L=this.response.headers.get("age");C=L?parseFloat(L):null}return C},v.loadProgressively=function(C,L,w,p,n){p===void 0&&(p=0);var d=new _.default,m=C.body.getReader(),T=function y(){return m.read().then(function(g){if(g.done)return d.dataLength&&n(L,w,d.flush(),C),Promise.resolve(new ArrayBuffer(0));var U=g.value,P=U.length;return L.loaded+=P,P<p||d.dataLength?(d.push(U),d.dataLength>=p&&n(L,w,d.flush(),C)):n(L,w,U,C),y()}).catch(function(){return Promise.reject()})};return T()},l}();function u(l,v){var B={method:"GET",mode:"cors",credentials:"same-origin",signal:v,headers:new self.Headers(s({},l.headers))};return l.rangeEnd&&B.headers.set("Range","bytes="+l.rangeStart+"-"+String(l.rangeEnd-1)),B}function c(l,v){return new self.Request(l.url,v)}var i=function(l){R(v,l);function v(B,C,L){var w;return w=l.call(this,B)||this,w.code=void 0,w.details=void 0,w.code=C,w.details=L,w}return v}(b(Error));H.default=f},"./src/utils/imsc1-ttml-parser.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"IMSC1_CODEC",function(){return a}),O.d(H,"parseIMSC1",function(){return o});var Q=O("./src/utils/mp4-tools.ts"),M=O("./src/utils/vttparser.ts"),_=O("./src/utils/vttcue.ts"),R=O("./src/demux/id3.ts"),b=O("./src/utils/timescale-conversion.ts"),t=O("./src/utils/webvtt-parser.ts");function E(){return E=Object.assign||function(p){for(var n=1;n<arguments.length;n++){var d=arguments[n];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(p[m]=d[m])}return p},E.apply(this,arguments)}var a="stpp.ttml.im1t",A=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,h=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,s={left:"start",center:"center",right:"end",start:"start",end:"end"};function o(p,n,d,m,T){var y=Object(Q.findBox)(new Uint8Array(p),["mdat"]);if(y.length===0){T(new Error("Could not parse IMSC1 mdat"));return}var g=y[0],U=Object(R.utf8ArrayToStr)(new Uint8Array(p,g.start,g.end-g.start)),P=Object(b.toTimescaleFromScale)(n,1,d);try{m(f(U,P))}catch(I){T(I)}}function f(p,n){var d=new DOMParser,m=d.parseFromString(p,"text/xml"),T=m.getElementsByTagName("tt")[0];if(!T)throw new Error("Invalid ttml");var y={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},g=Object.keys(y).reduce(function(K,D){return K[D]=T.getAttribute("ttp:"+D)||y[D],K},{}),U=T.getAttribute("xml:space")!=="preserve",P=c(u(T,"styling","style")),I=c(u(T,"layout","region")),G=u(T,"body","[begin]");return[].map.call(G,function(K){var D=i(K,U);if(!D||!K.hasAttribute("begin"))return null;var J=C(K.getAttribute("begin"),g),X=C(K.getAttribute("dur"),g),ne=C(K.getAttribute("end"),g);if(J===null)throw B(K);if(ne===null){if(X===null)throw B(K);ne=J+X}var ue=new _.default(J-n,ne-n,D);ue.id=Object(t.generateCueId)(ue.startTime,ue.endTime,ue.text);var Oe=I[K.getAttribute("region")],_e=P[K.getAttribute("style")];ue.position=10,ue.size=80;var De=l(Oe,_e),Ue=De.textAlign;if(Ue){var Ke=s[Ue];Ke&&(ue.lineAlign=Ke),ue.align=Ue}return E(ue,De),ue}).filter(function(K){return K!==null})}function u(p,n,d){var m=p.getElementsByTagName(n)[0];return m?[].slice.call(m.querySelectorAll(d)):[]}function c(p){return p.reduce(function(n,d){var m=d.getAttribute("xml:id");return m&&(n[m]=d),n},{})}function i(p,n){return[].slice.call(p.childNodes).reduce(function(d,m,T){var y;return m.nodeName==="br"&&T?d+`
|
|
`:(y=m.childNodes)!==null&&y!==void 0&&y.length?i(m,n):n?d+m.textContent.trim().replace(/\s+/g," "):d+m.textContent},"")}function l(p,n){var d="http://www.w3.org/ns/ttml#styling",m=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return m.reduce(function(T,y){var g=v(n,d,y)||v(p,d,y);return g&&(T[y]=g),T},{})}function v(p,n,d){return p.hasAttributeNS(n,d)?p.getAttributeNS(n,d):null}function B(p){return new Error("Could not parse ttml timestamp "+p)}function C(p,n){if(!p)return null;var d=Object(M.parseTimeStamp)(p);return d===null&&(A.test(p)?d=L(p,n):h.test(p)&&(d=w(p,n))),d}function L(p,n){var d=A.exec(p),m=(d[4]|0)+(d[5]|0)/n.subFrameRate;return(d[1]|0)*3600+(d[2]|0)*60+(d[3]|0)+m/n.frameRate}function w(p,n){var d=h.exec(p),m=Number(d[1]),T=d[2];switch(T){case"h":return m*3600;case"m":return m*60;case"ms":return m*1e3;case"f":return m/n.frameRate;case"t":return m/n.tickRate}return m}},"./src/utils/logger.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"enableLogs",function(){return t}),O.d(H,"logger",function(){return E});var Q=function(){},M={trace:Q,debug:Q,log:Q,warn:Q,info:Q,error:Q},_=M;function R(a){var A=self.console[a];return A?A.bind(self.console,"["+a+"] >"):Q}function b(a){for(var A=arguments.length,h=new Array(A>1?A-1:0),s=1;s<A;s++)h[s-1]=arguments[s];h.forEach(function(o){_[o]=a[o]?a[o].bind(a):R(o)})}function t(a){if(self.console&&a===!0||typeof a=="object"){b(a,"debug","log","info","warn","error");try{_.log()}catch(A){_=M}}else _=M}var E=_},"./src/utils/mediakeys-helper.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"KeySystems",function(){return Q}),O.d(H,"requestMediaKeySystemAccess",function(){return M});var Q;(function(_){_.WIDEVINE="com.widevine.alpha",_.PLAYREADY="com.microsoft.playready"})(Q||(Q={}));var M=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"getMediaSource",function(){return Q});function Q(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"bin2str",function(){return b}),O.d(H,"readUint16",function(){return t}),O.d(H,"readUint32",function(){return E}),O.d(H,"writeUint32",function(){return a}),O.d(H,"findBox",function(){return A}),O.d(H,"parseSegmentIndex",function(){return h}),O.d(H,"parseInitSegment",function(){return s}),O.d(H,"getStartDTS",function(){return o}),O.d(H,"getDuration",function(){return f}),O.d(H,"computeRawDurationFromSamples",function(){return u}),O.d(H,"offsetStartDTS",function(){return c}),O.d(H,"segmentValidRange",function(){return i}),O.d(H,"appendUint8Array",function(){return l});var Q=O("./src/utils/typed-array.ts"),M=O("./src/loader/fragment.ts"),_=Math.pow(2,32)-1,R=[].push;function b(v){return String.fromCharCode.apply(null,v)}function t(v,B){"data"in v&&(B+=v.start,v=v.data);var C=v[B]<<8|v[B+1];return C<0?65536+C:C}function E(v,B){"data"in v&&(B+=v.start,v=v.data);var C=v[B]<<24|v[B+1]<<16|v[B+2]<<8|v[B+3];return C<0?4294967296+C:C}function a(v,B,C){"data"in v&&(B+=v.start,v=v.data),v[B]=C>>24,v[B+1]=C>>16&255,v[B+2]=C>>8&255,v[B+3]=C&255}function A(v,B){var C=[];if(!B.length)return C;var L,w,p;"data"in v?(L=v.data,w=v.start,p=v.end):(L=v,w=0,p=L.byteLength);for(var n=w;n<p;){var d=E(L,n),m=b(L.subarray(n+4,n+8)),T=d>1?n+d:p;if(m===B[0])if(B.length===1)C.push({data:L,start:n+8,end:T});else{var y=A({data:L,start:n+8,end:T},B.slice(1));y.length&&R.apply(C,y)}n=T}return C}function h(v){var B=A(v,["moov"]),C=B[0],L=C?C.end:null,w=A(v,["sidx"]);if(!w||!w[0])return null;var p=[],n=w[0],d=n.data[0],m=d===0?8:16,T=E(n,m);m+=4;var y=0,g=0;d===0?m+=8:m+=16,m+=2;var U=n.end+g,P=t(n,m);m+=2;for(var I=0;I<P;I++){var G=m,K=E(n,G);G+=4;var D=K&2147483647,J=(K&2147483648)>>>31;if(J===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var X=E(n,G);G+=4,p.push({referenceSize:D,subsegmentDuration:X,info:{duration:X/T,start:U,end:U+D-1}}),U+=D,G+=4,m=G}return{earliestPresentationTime:y,timescale:T,version:d,referencesCount:P,references:p,moovEndOffset:L}}function s(v){for(var B=[],C=A(v,["moov","trak"]),L=0;L<C.length;L++){var w=C[L],p=A(w,["tkhd"])[0];if(p){var n=p.data[p.start],d=n===0?12:20,m=E(p,d),T=A(w,["mdia","mdhd"])[0];if(T){n=T.data[T.start],d=n===0?12:20;var y=E(T,d),g=A(w,["mdia","hdlr"])[0];if(g){var U=b(g.data.subarray(g.start+8,g.start+12)),P={soun:M.ElementaryStreamTypes.AUDIO,vide:M.ElementaryStreamTypes.VIDEO}[U];if(P){var I=A(w,["mdia","minf","stbl","stsd"])[0],G=void 0;I&&(G=b(I.data.subarray(I.start+12,I.start+16))),B[m]={timescale:y,type:P},B[P]={timescale:y,id:m,codec:G}}}}}}var K=A(v,["moov","mvex","trex"]);return K.forEach(function(D){var J=E(D,4),X=B[J];X&&(X.default={duration:E(D,12),flags:E(D,20)})}),B}function o(v,B){return A(B,["moof","traf"]).reduce(function(C,L){var w=A(L,["tfdt"])[0],p=w.data[w.start],n=A(L,["tfhd"]).reduce(function(d,m){var T=E(m,4),y=v[T];if(y){var g=E(w,4);p===1&&(g*=Math.pow(2,32),g+=E(w,8));var U=y.timescale||9e4,P=g/U;if(isFinite(P)&&(d===null||P<d))return P}return d},null);return n!==null&&isFinite(n)&&(C===null||n<C)?n:C},null)||0}function f(v,B){for(var C=0,L=0,w=0,p=A(v,["moof","traf"]),n=0;n<p.length;n++){var d=p[n],m=A(d,["tfhd"])[0],T=E(m,4),y=B[T];if(!y)continue;var g=y.default,U=E(m,0)|(g==null?void 0:g.flags),P=g==null?void 0:g.duration;U&8&&(U&2?P=E(m,12):P=E(m,8));for(var I=y.timescale||9e4,G=A(d,["trun"]),K=0;K<G.length;K++){if(P){var D=E(G[K],4);C=P*D}else C=u(G[K]);y.type===M.ElementaryStreamTypes.VIDEO?L+=C/I:y.type===M.ElementaryStreamTypes.AUDIO&&(w+=C/I)}}if(L===0&&w===0){var J=h(v);if(J!=null&&J.references)return J.references.reduce(function(X,ne){return X+ne.info.duration||0},0)}return L||w}function u(v){var B=E(v,0),C=8;B&1&&(C+=4),B&4&&(C+=4);for(var L=0,w=E(v,4),p=0;p<w;p++){if(B&256){var n=E(v,C);L+=n,C+=4}B&512&&(C+=4),B&1024&&(C+=4),B&2048&&(C+=4)}return L}function c(v,B,C){A(B,["moof","traf"]).forEach(function(L){A(L,["tfhd"]).forEach(function(w){var p=E(w,4),n=v[p];if(!n)return;var d=n.timescale||9e4;A(L,["tfdt"]).forEach(function(m){var T=m.data[m.start],y=E(m,4);if(T===0)a(m,4,y-C*d);else{y*=Math.pow(2,32),y+=E(m,8),y-=C*d,y=Math.max(y,0);var g=Math.floor(y/(_+1)),U=Math.floor(y%(_+1));a(m,4,g),a(m,8,U)}})})})}function i(v){var B={valid:null,remainder:null},C=A(v,["moof"]);if(C){if(C.length<2)return B.remainder=v,B}else return B;var L=C[C.length-1];return B.valid=Object(Q.sliceUint8)(v,0,L.start-8),B.remainder=Object(Q.sliceUint8)(v,L.start-8),B}function l(v,B){var C=new Uint8Array(v.length+B.length);return C.set(v),C.set(B,v.length),C}},"./src/utils/output-filter.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"default",function(){return Q});var Q=function(){function M(R,b){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=R,this.trackName=b}var _=M.prototype;return _.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},_.newCue=function(b,t,E){(this.startTime===null||this.startTime>b)&&(this.startTime=b),this.endTime=t,this.screen=E,this.timelineController.createCaptionsTrack(this.trackName)},_.reset=function(){this.cueRanges=[]},M}()},"./src/utils/texttrack-utils.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"sendAddTrackEvent",function(){return M}),O.d(H,"addCueToTrack",function(){return _}),O.d(H,"clearCurrentCues",function(){return R}),O.d(H,"removeCuesInRange",function(){return b}),O.d(H,"getCuesInRange",function(){return E});var Q=O("./src/utils/logger.ts");function M(a,A){var h;try{h=new Event("addtrack")}catch(s){h=document.createEvent("Event"),h.initEvent("addtrack",!1,!1)}h.track=a,A.dispatchEvent(h)}function _(a,A){var h=a.mode;if(h==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(A.id))try{if(a.addCue(A),!a.cues.getCueById(A.id))throw new Error("addCue is failed for: "+A)}catch(o){Q.logger.debug("[texttrack-utils]: "+o);var s=new self.TextTrackCue(A.startTime,A.endTime,A.text);s.id=A.id,a.addCue(s)}h==="disabled"&&(a.mode=h)}function R(a){var A=a.mode;if(A==="disabled"&&(a.mode="hidden"),a.cues)for(var h=a.cues.length;h--;)a.removeCue(a.cues[h]);A==="disabled"&&(a.mode=A)}function b(a,A,h){var s=a.mode;if(s==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0)for(var o=E(a.cues,A,h),f=0;f<o.length;f++)a.removeCue(o[f]);s==="disabled"&&(a.mode=s)}function t(a,A){if(A<a[0].startTime)return 0;var h=a.length-1;if(A>a[h].endTime)return-1;for(var s=0,o=h;s<=o;){var f=Math.floor((o+s)/2);if(A<a[f].startTime)o=f-1;else if(A>a[f].startTime&&s<h)s=f+1;else return f}return a[s].startTime-A<A-a[o].startTime?s:o}function E(a,A,h){var s=[],o=t(a,A);if(o>-1)for(var f=o,u=a.length;f<u;f++){var c=a[f];if(c.startTime>=A&&c.endTime<=h)s.push(c);else if(c.startTime>h)return s}return s}},"./src/utils/time-ranges.ts":function(Z,H,O){"use strict";O.r(H);var Q={toString:function(_){for(var R="",b=_.length,t=0;t<b;t++)R+="["+_.start(t).toFixed(3)+","+_.end(t).toFixed(3)+"]";return R}};H.default=Q},"./src/utils/timescale-conversion.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"toTimescaleFromBase",function(){return M}),O.d(H,"toTimescaleFromScale",function(){return _}),O.d(H,"toMsFromMpegTsClock",function(){return R}),O.d(H,"toMpegTsClockFromTimescale",function(){return b});var Q=9e4;function M(t,E,a,A){a===void 0&&(a=1),A===void 0&&(A=!1);var h=t*E*a;return A?Math.round(h):h}function _(t,E,a,A){return a===void 0&&(a=1),A===void 0&&(A=!1),M(t,E,1/a,A)}function R(t,E){return E===void 0&&(E=!1),M(t,1e3,1/Q,E)}function b(t,E){return E===void 0&&(E=1),M(t,Q,1/E)}},"./src/utils/typed-array.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"sliceUint8",function(){return Q});function Q(M,_,R){return Uint8Array.prototype.slice?M.slice(_,R):new Uint8Array(Array.prototype.slice.call(M,_,R))}},"./src/utils/vttcue.ts":function(Z,H,O){"use strict";O.r(H),H.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var Q=["","lr","rl"],M=["start","middle","end","left","right"];function _(a,A){if(typeof A!="string")return!1;if(!Array.isArray(a))return!1;var h=A.toLowerCase();return~a.indexOf(h)?h:!1}function R(a){return _(Q,a)}function b(a){return _(M,a)}function t(a){for(var A=arguments.length,h=new Array(A>1?A-1:0),s=1;s<A;s++)h[s-1]=arguments[s];for(var o=1;o<arguments.length;o++){var f=arguments[o];for(var u in f)a[u]=f[u]}return a}function E(a,A,h){var s=this,o={enumerable:!0};s.hasBeenReset=!1;var f="",u=!1,c=a,i=A,l=h,v=null,B="",C=!0,L="auto",w="start",p=50,n="middle",d=50,m="middle";Object.defineProperty(s,"id",t({},o,{get:function(){return f},set:function(y){f=""+y}})),Object.defineProperty(s,"pauseOnExit",t({},o,{get:function(){return u},set:function(y){u=!!y}})),Object.defineProperty(s,"startTime",t({},o,{get:function(){return c},set:function(y){if(typeof y!="number")throw new TypeError("Start time must be set to a number.");c=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",t({},o,{get:function(){return i},set:function(y){if(typeof y!="number")throw new TypeError("End time must be set to a number.");i=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",t({},o,{get:function(){return l},set:function(y){l=""+y,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",t({},o,{get:function(){return v},set:function(y){v=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",t({},o,{get:function(){return B},set:function(y){var g=R(y);if(g===!1)throw new SyntaxError("An invalid or illegal string was specified.");B=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",t({},o,{get:function(){return C},set:function(y){C=!!y,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",t({},o,{get:function(){return L},set:function(y){if(typeof y!="number"&&y!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");L=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",t({},o,{get:function(){return w},set:function(y){var g=b(y);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");w=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",t({},o,{get:function(){return p},set:function(y){if(y<0||y>100)throw new Error("Position must be between 0 and 100.");p=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",t({},o,{get:function(){return n},set:function(y){var g=b(y);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");n=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",t({},o,{get:function(){return d},set:function(y){if(y<0||y>100)throw new Error("Size must be between 0 and 100.");d=y,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",t({},o,{get:function(){return m},set:function(y){var g=b(y);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");m=g,this.hasBeenReset=!0}})),s.displayState=void 0}return E.prototype.getCueAsHTML=function(){var a=self.WebVTT;return a.convertCueToDOMTree(self,this.text)},E}()},"./src/utils/vttparser.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"parseTimeStamp",function(){return _}),O.d(H,"fixLineBreaks",function(){return A}),O.d(H,"VTTParser",function(){return h});var Q=O("./src/utils/vttcue.ts"),M=function(){function s(){}var o=s.prototype;return o.decode=function(u,c){if(!u)return"";if(typeof u!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(u))},s}();function _(s){function o(u,c,i,l){return(u|0)*3600+(c|0)*60+(i|0)+parseFloat(l||0)}var f=s.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?o(f[2],f[3],0,f[4]):o(f[1],f[2],f[3],f[4]):null}var R=function(){function s(){this.values=Object.create(null)}var o=s.prototype;return o.set=function(u,c){!this.get(u)&&c!==""&&(this.values[u]=c)},o.get=function(u,c,i){return i?this.has(u)?this.values[u]:c[i]:this.has(u)?this.values[u]:c},o.has=function(u){return u in this.values},o.alt=function(u,c,i){for(var l=0;l<i.length;++l)if(c===i[l]){this.set(u,c);break}},o.integer=function(u,c){/^-?\d+$/.test(c)&&this.set(u,parseInt(c,10))},o.percent=function(u,c){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(c)){var i=parseFloat(c);if(i>=0&&i<=100)return this.set(u,i),!0}return!1},s}();function b(s,o,f,u){var c=u?s.split(u):[s];for(var i in c){if(typeof c[i]!="string")continue;var l=c[i].split(f);if(l.length!==2)continue;var v=l[0],B=l[1];o(v,B)}}var t=new Q.default(0,0,""),E=t.align==="middle"?"middle":"center";function a(s,o,f){var u=s;function c(){var v=_(s);if(v===null)throw new Error("Malformed timestamp: "+u);return s=s.replace(/^[^\sa-zA-Z-]+/,""),v}function i(v,B){var C=new R;b(v,function(p,n){var d;switch(p){case"region":for(var m=f.length-1;m>=0;m--)if(f[m].id===n){C.set(p,f[m].region);break}break;case"vertical":C.alt(p,n,["rl","lr"]);break;case"line":d=n.split(","),C.integer(p,d[0]),C.percent(p,d[0])&&C.set("snapToLines",!1),C.alt(p,d[0],["auto"]),d.length===2&&C.alt("lineAlign",d[1],["start",E,"end"]);break;case"position":d=n.split(","),C.percent(p,d[0]),d.length===2&&C.alt("positionAlign",d[1],["start",E,"end","line-left","line-right","auto"]);break;case"size":C.percent(p,n);break;case"align":C.alt(p,n,["start",E,"end","left","right"]);break}},/:/,/\s/),B.region=C.get("region",null),B.vertical=C.get("vertical","");var L=C.get("line","auto");L==="auto"&&t.line===-1&&(L=-1),B.line=L,B.lineAlign=C.get("lineAlign","start"),B.snapToLines=C.get("snapToLines",!0),B.size=C.get("size",100),B.align=C.get("align",E);var w=C.get("position","auto");w==="auto"&&t.position===50&&(w=B.align==="start"||B.align==="left"?0:B.align==="end"||B.align==="right"?100:50),B.position=w}function l(){s=s.replace(/^\s+/,"")}if(l(),o.startTime=c(),l(),s.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+u);s=s.substr(3),l(),o.endTime=c(),l(),i(s,o)}function A(s){return s.replace(/<br(?: \/)?>/gi,`
|
|
`)}var h=function(){function s(){this.state="INITIAL",this.buffer="",this.decoder=new M,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var o=s.prototype;return o.parse=function(u){var c=this;u&&(c.buffer+=c.decoder.decode(u,{stream:!0}));function i(){var w=c.buffer,p=0;for(w=A(w);p<w.length&&w[p]!=="\r"&&w[p]!==`
|
|
`;)++p;var n=w.substr(0,p);return w[p]==="\r"&&++p,w[p]===`
|
|
`&&++p,c.buffer=w.substr(p),n}function l(w){b(w,function(p,n){},/:/)}try{var v="";if(c.state==="INITIAL"){if(!/\r\n|\n/.test(c.buffer))return this;v=i();var B=v.match(/^()?WEBVTT([ \t].*)?$/);if(!B||!B[0])throw new Error("Malformed WebVTT signature.");c.state="HEADER"}for(var C=!1;c.buffer;){if(!/\r\n|\n/.test(c.buffer))return this;C?C=!1:v=i();switch(c.state){case"HEADER":/:/.test(v)?l(v):v||(c.state="ID");continue;case"NOTE":v||(c.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(v)){c.state="NOTE";break}if(!v)continue;if(c.cue=new Q.default(0,0,""),c.state="CUE",v.indexOf("-->")===-1){c.cue.id=v;continue}case"CUE":if(!c.cue){c.state="BADCUE";continue}try{a(v,c.cue,c.regionList)}catch(w){c.cue=null,c.state="BADCUE";continue}c.state="CUETEXT";continue;case"CUETEXT":{var L=v.indexOf("-->")!==-1;if(!v||L&&(C=!0)){c.oncue&&c.cue&&c.oncue(c.cue),c.cue=null,c.state="ID";continue}if(c.cue===null)continue;c.cue.text&&(c.cue.text+=`
|
|
`),c.cue.text+=v}continue;case"BADCUE":v||(c.state="ID")}}}catch(w){c.state==="CUETEXT"&&c.cue&&c.oncue&&c.oncue(c.cue),c.cue=null,c.state=c.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},o.flush=function(){var u=this;try{if((u.cue||u.state==="HEADER")&&(u.buffer+=`
|
|
|
|
`,u.parse()),u.state==="INITIAL"||u.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(c){u.onparsingerror&&u.onparsingerror(c)}return u.onflush&&u.onflush(),this},s}()},"./src/utils/webvtt-parser.ts":function(Z,H,O){"use strict";O.r(H),O.d(H,"generateCueId",function(){return h}),O.d(H,"parseWebVTT",function(){return o});var Q=O("./src/polyfills/number.ts"),M=O("./src/utils/vttparser.ts"),_=O("./src/demux/id3.ts"),R=O("./src/utils/timescale-conversion.ts"),b=O("./src/remux/mp4-remuxer.ts"),t=/\r\n|\n\r|\n|\r/g,E=function(u,c,i){return i===void 0&&(i=0),u.substr(i,c.length)===c},a=function(u){var c=parseInt(u.substr(-3)),i=parseInt(u.substr(-6,2)),l=parseInt(u.substr(-9,2)),v=u.length>9?parseInt(u.substr(0,u.indexOf(":"))):0;if(!Object(Q.isFiniteNumber)(c)||!Object(Q.isFiniteNumber)(i)||!Object(Q.isFiniteNumber)(l)||!Object(Q.isFiniteNumber)(v))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+u);return c+=1e3*i,c+=60*1e3*l,c+=60*60*1e3*v,c},A=function(u){for(var c=5381,i=u.length;i;)c=c*33^u.charCodeAt(--i);return(c>>>0).toString()};function h(f,u,c){return A(f.toString())+A(u.toString())+A(c)}var s=function(u,c,i){var l=u[c],v=u[l.prevCC];if(!v||!v.new&&l.new){u.ccOffset=u.presentationOffset=l.start,l.new=!1;return}for(;(B=v)!==null&&B!==void 0&&B.new;){var B;u.ccOffset+=l.start-v.start,l.new=!1,l=v,v=u[l.prevCC]}u.presentationOffset=i};function o(f,u,c,i,l,v,B,C){var L=new M.VTTParser,w=Object(_.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(t,`
|
|
`).split(`
|
|
`),p=[],n=Object(R.toMpegTsClockFromTimescale)(u,c),d="00:00.000",m=0,T=0,y,g=!0,U=!1;L.oncue=function(P){var I=i[l],G=i.ccOffset,K=(m-n)/9e4;if(I!=null&&I.new&&(T!==void 0?G=i.ccOffset=I.start:s(i,l,K)),K&&(G=K-i.presentationOffset),U){var D=P.endTime-P.startTime,J=Object(b.normalizePts)((P.startTime+G-T)*9e4,v*9e4)/9e4;P.startTime=J,P.endTime=J+D}var X=P.text.trim();P.text=decodeURIComponent(encodeURIComponent(X)),P.id||(P.id=h(P.startTime,P.endTime,X)),P.endTime>0&&p.push(P)},L.onparsingerror=function(P){y=P},L.onflush=function(){if(y){C(y);return}B(p)},w.forEach(function(P){if(g)if(E(P,"X-TIMESTAMP-MAP=")){g=!1,U=!0,P.substr(16).split(",").forEach(function(I){E(I,"LOCAL:")?d=I.substr(6):E(I,"MPEGTS:")&&(m=parseInt(I.substr(7)))});try{T=a(d)/1e3}catch(I){U=!1,y=I}return}else P===""&&(g=!1);L.parse(P+`
|
|
`)}),L.flush()}},"./src/utils/xhr-loader.ts":function(Z,H,O){"use strict";O.r(H);var Q=O("./src/utils/logger.ts"),M=O("./src/loader/load-stats.ts"),_=/^age:\s*[\d.]+\s*$/m,R=function(){function b(E){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=E?E.xhrSetup:null,this.stats=new M.LoadStats,this.retryDelay=0}var t=b.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var a=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),a&&(a.onreadystatechange=null,a.onprogress=null,a.readyState!==4&&(this.stats.aborted=!0,a.abort()))},t.abort=function(){var a;this.abortInternal(),(a=this.callbacks)!==null&&a!==void 0&&a.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(a,A,h){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=a,this.config=A,this.callbacks=h,this.retryDelay=A.retryDelay,this.loadInternal()},t.loadInternal=function(){var a=this.config,A=this.context;if(!a)return;var h=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0;var o=this.xhrSetup;try{if(o)try{o(h,A.url)}catch(c){h.open("GET",A.url,!0),o(h,A.url)}h.readyState||h.open("GET",A.url,!0);var f=this.context.headers;if(f)for(var u in f)h.setRequestHeader(u,f[u])}catch(c){this.callbacks.onError({code:h.status,text:c.message},A,h);return}A.rangeEnd&&h.setRequestHeader("Range","bytes="+A.rangeStart+"-"+(A.rangeEnd-1)),h.onreadystatechange=this.readystatechange.bind(this),h.onprogress=this.loadprogress.bind(this),h.responseType=A.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout),h.send()},t.readystatechange=function(){var a=this.context,A=this.loader,h=this.stats;if(!a||!A)return;var s=A.readyState,o=this.config;if(h.aborted)return;if(s>=2)if(self.clearTimeout(this.requestTimeout),h.loading.first===0&&(h.loading.first=Math.max(self.performance.now(),h.loading.start)),s===4){A.onreadystatechange=null,A.onprogress=null;var f=A.status;if(f>=200&&f<300){h.loading.end=Math.max(self.performance.now(),h.loading.first);var u,c;if(a.responseType==="arraybuffer"?(u=A.response,c=u.byteLength):(u=A.responseText,c=u.length),h.loaded=h.total=c,!this.callbacks)return;var i=this.callbacks.onProgress;if(i&&i(h,a,u,A),!this.callbacks)return;var l={url:A.responseURL,data:u};this.callbacks.onSuccess(l,h,a,A)}else h.retry>=o.maxRetry||f>=400&&f<499?(Q.logger.error(f+" while loading "+a.url),this.callbacks.onError({code:f,text:A.statusText},a,A)):(Q.logger.warn(f+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),h.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)},t.loadtimeout=function(){Q.logger.warn("timeout while loading "+this.context.url);var a=this.callbacks;a&&(this.abortInternal(),a.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(a){var A=this.stats;A.loaded=a.loaded,a.lengthComputable&&(A.total=a.total)},t.getCacheAge=function(){var a=null;if(this.loader&&_.test(this.loader.getAllResponseHeaders())){var A=this.loader.getResponseHeader("age");a=A?parseFloat(A):null}return a},b}();H.default=R}}).default})},vHTk:function(Ve,Ae,N){Ve.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX:function(Ve,Ae,N){var Z=N("SrGk"),H=N("bYtY");function O(_,R){Z.call(this,_,R,["filter"],"__filter_in_use__","_shadowDom")}H.inherits(O,Z),O.prototype.addWithoutUpdate=function(_,R){if(R&&Q(R.style)){var b;if(R._shadowDom){b=R._shadowDom;var t=this.getDefs(!0);t.contains(R._shadowDom)||this.addDom(b)}else b=this.add(R);this.markUsed(R);var E=b.getAttribute("id");_.style.filter="url(#"+E+")"}},O.prototype.add=function(_){var R=this.createElement("filter");return _._shadowDomId=_._shadowDomId||this.nextId++,R.setAttribute("id","zr"+this._zrId+"-shadow-"+_._shadowDomId),this.updateDom(_,R),this.addDom(R),R},O.prototype.update=function(_,R){var b=R.style;if(Q(b)){var t=this;Z.prototype.update.call(this,R,function(){t.updateDom(R,R._shadowDom)})}else this.remove(_,R)},O.prototype.remove=function(_,R){R._shadowDomId!=null&&(this.removeDom(_),_.style.filter="")},O.prototype.updateDom=function(_,R){var b=R.getElementsByTagName("feDropShadow");b.length===0?b=this.createElement("feDropShadow"):b=b[0];var t=_.style,E=_.scale&&_.scale[0]||1,a=_.scale&&_.scale[1]||1,A,h,s,o;if(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)A=t.shadowOffsetX||0,h=t.shadowOffsetY||0,s=t.shadowBlur,o=t.shadowColor;else if(t.textShadowBlur)A=t.textShadowOffsetX||0,h=t.textShadowOffsetY||0,s=t.textShadowBlur,o=t.textShadowColor;else{this.removeDom(R,t);return}b.setAttribute("dx",A/E),b.setAttribute("dy",h/a),b.setAttribute("flood-color",o);var f=s/2/E,u=s/2/a,c=f+" "+u;b.setAttribute("stdDeviation",c),R.setAttribute("x","-100%"),R.setAttribute("y","-100%"),R.setAttribute("width",Math.ceil(s/2*200)+"%"),R.setAttribute("height",Math.ceil(s/2*200)+"%"),R.appendChild(b),_._shadowDom=R},O.prototype.markUsed=function(_){_._shadowDom&&Z.prototype.markUsed.call(this,_._shadowDom)};function Q(_){return _&&(_.shadowBlur||_.shadowOffsetX||_.shadowOffsetY||_.textShadowBlur||_.textShadowOffsetX||_.textShadowOffsetY)}var M=O;Ve.exports=M},vWvF:function(Ve,Ae,N){var Z=N("Bq2U"),H=N("SUKs"),O=N("bYtY"),Q=O.isString,M=O.isFunction,_=O.isObject,R=O.isArrayLike,b=O.indexOf,t=function(){this.animators=[]};t.prototype={constructor:t,animate:function(s,o){var f,u=!1,c=this,i=this.__zr;if(s){var l=s.split("."),v=c;u=l[0]==="shape";for(var B=0,C=l.length;B<C;B++){if(!v)continue;v=v[l[B]]}v&&(f=v)}else f=c;if(!f){H('Property "'+s+'" is not existed in element '+c.id);return}var L=c.animators,w=new Z(f,o);return w.during(function(p){c.dirty(u)}).done(function(){L.splice(b(L,w),1)}),L.push(w),i&&i.animation.addAnimator(w),w},stopAnimation:function(s){for(var o=this.animators,f=o.length,u=0;u<f;u++)o[u].stop(s);return o.length=0,this},animateTo:function(s,o,f,u,c,i){E(this,s,o,f,u,c,i)},animateFrom:function(s,o,f,u,c,i){E(this,s,o,f,u,c,i,!0)}};function E(s,o,f,u,c,i,l,v){Q(u)?(i=c,c=u,u=0):M(c)?(i=c,c="linear",u=0):M(u)?(i=u,u=0):M(f)?(i=f,f=500):f||(f=500),s.stopAnimation(),a(s,"",s,o,f,u,v);var B=s.animators.slice(),C=B.length;function L(){C--,C||i&&i()}C||i&&i();for(var w=0;w<B.length;w++)B[w].done(L).start(c,l)}function a(s,o,f,u,c,i,l){var v={},B=0;for(var C in u){if(!u.hasOwnProperty(C))continue;f[C]!=null?_(u[C])&&!R(u[C])?a(s,o?o+"."+C:C,f[C],u[C],c,i,l):(l?(v[C]=f[C],A(s,o,C,u[C])):v[C]=u[C],B++):u[C]!=null&&!l&&A(s,o,C,u[C])}B>0&&s.animate(o,!1).when(c==null?500:c,v).delay(i||0)}function A(s,o,f,u){if(!o)s.attr(f,u);else{var c={};c[o]={},c[o][f]=u,s.attr(c)}}var h=t;Ve.exports=h},wCXF:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return st});var Z=N("rePB"),H=N("VTBJ"),O=N("KQm4"),Q=N("U8pU"),M=N("ODXe"),_=N("q1tI"),R=N("TSYQ"),b=N.n(R),t=N("Gytx"),E=N.n(t),a=N("Kwbf"),A=N("t23M"),h=N("qx4F"),s=N("6eGT"),o=N("IBYe"),f=N("Ff2n"),u=N("c+Xe"),c=N("fyJ8"),i=N("biw7");function l(je,He,ot,ht,we){var he=ot[je]||{},fe=ot[He]||{},ge,Te;he.fixed==="left"?ge=ht.left[je]:fe.fixed==="right"&&(Te=ht.right[He]);var me=!1,Ee=!1,xe=!1,Ie=!1,Pe=ot[He+1],Qe=ot[je-1];if(we==="rtl"){if(ge!==void 0){var tt=Qe&&Qe.fixed==="left";Ie=!tt}else if(Te!==void 0){var mt=Pe&&Pe.fixed==="right";xe=!mt}}else if(ge!==void 0){var Bt=Pe&&Pe.fixed==="left";me=!Bt}else if(Te!==void 0){var Et=Qe&&Qe.fixed==="right";Ee=!Et}return{fixLeft:ge,fixRight:Te,lastFixLeft:me,firstFixRight:Ee,lastFixRight:xe,firstFixLeft:Ie,isSticky:ht.isSticky}}var v=N("sR1s");function B(je){var He=je.cells,ot=je.stickyOffsets,ht=je.flattenColumns,we=je.rowComponent,he=je.cellComponent,fe=je.onHeaderRow,ge=je.index,Te=_.useContext(i.a),me=Te.prefixCls,Ee=Te.direction,xe;fe&&(xe=fe(He.map(function(Pe){return Pe.column}),ge));var Ie=Object(v.a)(He.map(function(Pe){return Pe.column}));return _.createElement(we,Object.assign({},xe),He.map(function(Pe,Qe){var tt=Pe.column,mt=l(Pe.colStart,Pe.colEnd,ht,ot,Ee),Bt;return tt&&tt.onHeaderCell&&(Bt=Pe.column.onHeaderCell(tt)),_.createElement(c.a,Object.assign({},Pe,{ellipsis:tt.ellipsis,align:tt.align,component:he,prefixCls:me,key:Ie[Qe]},mt,{additionalProps:Bt,rowType:"header"}))}))}B.displayName="HeaderRow";var C=B;function L(je){var He=[];function ot(fe,ge){var Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;He[Te]=He[Te]||[];var me=ge,Ee=fe.filter(Boolean).map(function(xe){var Ie={key:xe.key,className:xe.className||"",children:xe.title,column:xe,colStart:me},Pe=1,Qe=xe.children;return Qe&&Qe.length>0&&(Pe=ot(Qe,me,Te+1).reduce(function(tt,mt){return tt+mt},0),Ie.hasSubColumns=!0),"colSpan"in xe&&(Pe=xe.colSpan),"rowSpan"in xe&&(Ie.rowSpan=xe.rowSpan),Ie.colSpan=Pe,Ie.colEnd=Ie.colStart+Pe-1,He[Te].push(Ie),me+=Pe,Pe});return Ee}ot(je,0);for(var ht=He.length,we=function(ge){He[ge].forEach(function(Te){!("rowSpan"in Te)&&!Te.hasSubColumns&&(Te.rowSpan=ht-ge)})},he=0;he<ht;he+=1)we(he);return He}function w(je){var He=je.stickyOffsets,ot=je.columns,ht=je.flattenColumns,we=je.onHeaderRow,he=_.useContext(i.a),fe=he.prefixCls,ge=he.getComponent,Te=_.useMemo(function(){return L(ot)},[ot]),me=ge(["header","wrapper"],"thead"),Ee=ge(["header","row"],"tr"),xe=ge(["header","cell"],"th");return _.createElement(me,{className:"".concat(fe,"-thead")},Te.map(function(Ie,Pe){var Qe=_.createElement(C,{key:Pe,flattenColumns:ht,cells:Ie,stickyOffsets:He,rowComponent:Ee,cellComponent:xe,onHeaderRow:we,index:Pe});return Qe}))}var p=w,n=N("hW8S");function d(je){for(var He=je.colWidths,ot=je.columns,ht=je.columCount,we=[],he=ht||ot.length,fe=!1,ge=he-1;ge>=0;ge-=1){var Te=He[ge],me=ot&&ot[ge],Ee=me&&me[n.a];(Te||Ee||fe)&&(we.unshift(_.createElement("col",Object.assign({key:ge,style:{width:Te,minWidth:Te}},Ee))),fe=!0)}return _.createElement("colgroup",null,we)}var m=d;function T(je,He){return Object(_.useMemo)(function(){for(var ot=[],ht=0;ht<He;ht+=1){var we=je[ht];if(we!==void 0)ot[ht]=we;else return null}return ot},[je.join("_"),He])}var y=_.forwardRef(function(je,He){var ot=je.noData,ht=je.columns,we=je.flattenColumns,he=je.colWidths,fe=je.columCount,ge=je.stickyOffsets,Te=je.direction,me=je.fixHeader,Ee=je.offsetHeader,xe=je.stickyClassName,Ie=je.onScroll,Pe=Object(f.a)(je,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Qe=_.useContext(i.a),tt=Qe.prefixCls,mt=Qe.scrollbarSize,Bt=Qe.isSticky,Et=Bt&&!me?0:mt,Ct=_.useRef(null),nt=_.useCallback(function(gt){Object(u.b)(He,gt),Object(u.b)(Ct,gt)},[]);_.useEffect(function(){var gt;function pt(at){var vt=at.currentTarget,St=at.deltaX;St&&(Ie({currentTarget:vt,scrollLeft:vt.scrollLeft+St}),at.preventDefault())}return(gt=Ct.current)===null||gt===void 0||gt.addEventListener("wheel",pt),function(){var at;(at=Ct.current)===null||at===void 0||at.removeEventListener("wheel",pt)}},[]);var qe=we[we.length-1],$e={fixed:qe?qe.fixed:null,onHeaderCell:function(){return{className:"".concat(tt,"-cell-scrollbar")}}},Re=Object(_.useMemo)(function(){return Et?[].concat(Object(O.a)(ht),[$e]):ht},[Et,ht]),Ne=Object(_.useMemo)(function(){return Et?[].concat(Object(O.a)(we),[$e]):we},[Et,we]),ct=Object(_.useMemo)(function(){var gt=ge.right,pt=ge.left;return Object(H.a)(Object(H.a)({},ge),{},{left:Te==="rtl"?[].concat(Object(O.a)(pt.map(function(at){return at+Et})),[0]):pt,right:Te==="rtl"?gt:[].concat(Object(O.a)(gt.map(function(at){return at+Et})),[0]),isSticky:Bt})},[Et,ge,Bt]),rt=T(he,fe);return _.createElement("div",{style:Object(H.a)({overflow:"hidden"},Bt?{top:Ee}:{}),ref:nt,className:b()("".concat(tt,"-header"),Object(Z.a)({},xe,!!xe))},_.createElement("table",{style:{tableLayout:"fixed",visibility:ot||rt?null:"hidden"}},_.createElement(m,{colWidths:rt?[].concat(Object(O.a)(rt),[Et]):[],columCount:fe+1,columns:Ne}),_.createElement(p,Object.assign({},Pe,{stickyOffsets:ct,columns:Re,flattenColumns:Ne}))))});y.displayName="FixedHeader";var g=y,U=_.createContext(null),P=U;function I(je){var He=je.prefixCls,ot=je.children,ht=je.component,we=je.cellComponent,he=je.fixHeader,fe=je.fixColumn,ge=je.horizonScroll,Te=je.className,me=je.expanded,Ee=je.componentWidth,xe=je.colSpan,Ie=_.useContext(i.a),Pe=Ie.scrollbarSize;return _.useMemo(function(){var Qe=ot;return fe&&(Qe=_.createElement("div",{style:{width:Ee-(he?Pe:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(He,"-expanded-row-fixed")},Qe)),_.createElement(ht,{className:Te,style:{display:me?null:"none"}},_.createElement(c.a,{component:we,prefixCls:He,colSpan:xe},Qe))},[ot,ht,he,ge,Te,me,Ee,xe,Pe])}var G=I;function K(je){var He=je.className,ot=je.style,ht=je.record,we=je.index,he=je.rowKey,fe=je.getRowKey,ge=je.rowExpandable,Te=je.expandedKeys,me=je.onRow,Ee=je.indent,xe=Ee===void 0?0:Ee,Ie=je.rowComponent,Pe=je.cellComponent,Qe=je.childrenColumnName,tt=_.useContext(i.a),mt=tt.prefixCls,Bt=tt.fixedInfoList,Et=_.useContext(P),Ct=Et.fixHeader,nt=Et.fixColumn,qe=Et.horizonScroll,$e=Et.componentWidth,Re=Et.flattenColumns,Ne=Et.expandableType,ct=Et.expandRowByClick,rt=Et.onTriggerExpand,gt=Et.rowClassName,pt=Et.expandedRowClassName,at=Et.indentSize,vt=Et.expandIcon,St=Et.expandedRowRender,wt=Et.expandIconColumnIndex,Dt=_.useState(!1),Ar=Object(M.a)(Dt,2),xr=Ar[0],_r=Ar[1],Ft=Te&&Te.has(je.recordKey);_.useEffect(function(){Ft&&_r(!0)},[Ft]);var er=Ne==="row"&&(!ge||ge(ht)),ir=Ne==="nest",Kt=Qe&&ht&&ht[Qe],$t=er||ir,Xt;me&&(Xt=me(ht,we));var Xr=function(bt){if(ct&&$t&&rt(ht,bt),Xt&&Xt.onClick){for(var Rt,At=arguments.length,Ut=new Array(At>1?At-1:0),Gt=1;Gt<At;Gt++)Ut[Gt-1]=arguments[Gt];(Rt=Xt).onClick.apply(Rt,[bt].concat(Ut))}},Br;typeof gt=="string"?Br=gt:typeof gt=="function"&&(Br=gt(ht,we,xe));var be=Object(v.a)(Re),Be=_.createElement(Ie,Object.assign({},Xt,{"data-row-key":he,className:b()(He,"".concat(mt,"-row"),"".concat(mt,"-row-level-").concat(xe),Br,Xt&&Xt.className),style:Object(H.a)(Object(H.a)({},ot),Xt?Xt.style:null),onClick:Xr}),Re.map(function(Lt,bt){var Rt=Lt.render,At=Lt.dataIndex,Ut=Lt.className,Gt=be[bt],gr=Bt[bt],fr;bt===(wt||0)&&ir&&(fr=_.createElement(_.Fragment,null,_.createElement("span",{style:{paddingLeft:"".concat(at*xe,"px")},className:"".concat(mt,"-row-indent indent-level-").concat(xe)}),vt({prefixCls:mt,expanded:Ft,expandable:Kt,record:ht,onExpand:rt})));var br;return Lt.onCell&&(br=Lt.onCell(ht,we)),_.createElement(c.a,Object.assign({className:Ut,ellipsis:Lt.ellipsis,align:Lt.align,component:Pe,prefixCls:mt,key:Gt,record:ht,index:we,dataIndex:At,render:Rt,shouldCellUpdate:Lt.shouldCellUpdate},gr,{appendNode:fr,additionalProps:br}))})),ke;if(er&&(xr||Ft)){var Ze=St(ht,we,xe+1,Ft),Je=pt&&pt(ht,we,xe);ke=_.createElement(G,{expanded:Ft,className:b()("".concat(mt,"-expanded-row"),"".concat(mt,"-expanded-row-level-").concat(xe+1),Je),prefixCls:mt,fixHeader:Ct,fixColumn:nt,horizonScroll:qe,component:Ie,componentWidth:$e,cellComponent:Pe,colSpan:Re.length},Ze)}var Ot;return Kt&&Ft&&(Ot=(ht[Qe]||[]).map(function(Lt,bt){var Rt=fe(Lt,bt);return _.createElement(K,Object.assign({},je,{key:Rt,rowKey:Rt,record:Lt,recordKey:Rt,index:bt,indent:xe+1}))})),_.createElement(_.Fragment,null,Be,ke,Ot)}K.displayName="BodyRow";var D=K,J=_.createContext(null),X=J;function ne(je){var He=je.columnKey,ot=je.onColumnResize,ht=_.useRef();return _.useEffect(function(){ht.current&&ot(He,ht.current.offsetWidth)},[]),_.createElement(A.a,{onResize:function(he){var fe=he.offsetWidth;ot(He,fe)}},_.createElement("td",{ref:ht,style:{padding:0,border:0,height:0}},_.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ue(je){var He=je.data,ot=je.getRowKey,ht=je.measureColumnWidth,we=je.expandedKeys,he=je.onRow,fe=je.rowExpandable,ge=je.emptyNode,Te=je.childrenColumnName,me=_.useContext(X),Ee=me.onColumnResize,xe=_.useContext(i.a),Ie=xe.prefixCls,Pe=xe.getComponent,Qe=_.useContext(P),tt=Qe.fixHeader,mt=Qe.horizonScroll,Bt=Qe.flattenColumns,Et=Qe.componentWidth;return _.useMemo(function(){var Ct=Pe(["body","wrapper"],"tbody"),nt=Pe(["body","row"],"tr"),qe=Pe(["body","cell"],"td"),$e;He.length?$e=He.map(function(Ne,ct){var rt=ot(Ne,ct);return _.createElement(D,{key:rt,rowKey:rt,record:Ne,recordKey:rt,index:ct,rowComponent:nt,cellComponent:qe,expandedKeys:we,onRow:he,getRowKey:ot,rowExpandable:fe,childrenColumnName:Te})}):$e=_.createElement(G,{expanded:!0,className:"".concat(Ie,"-placeholder"),prefixCls:Ie,fixHeader:tt,fixColumn:mt,horizonScroll:mt,component:nt,componentWidth:Et,cellComponent:qe,colSpan:Bt.length},ge);var Re=Object(v.a)(Bt);return _.createElement(Ct,{className:"".concat(Ie,"-tbody")},ht&&_.createElement("tr",{"aria-hidden":"true",className:"".concat(Ie,"-measure-row"),style:{height:0}},Re.map(function(Ne){return _.createElement(ne,{key:Ne,columnKey:Ne,onColumnResize:Ee})})),$e)},[He,Ie,he,ht,we,ot,Pe,Et,ge,Bt])}var Oe=_.memo(ue);Oe.displayName="Body";var _e=Oe,De=N("wRmb"),Ue=N("xEkU"),Ke=N.n(Ue);function Le(je){var He=Object(_.useRef)(je),ot=Object(_.useState)({}),ht=Object(M.a)(ot,2),we=ht[1],he=Object(_.useRef)(null),fe=Object(_.useRef)([]);function ge(Te){he.current===null&&(fe.current=[],he.current=Ke()(function(){fe.current.forEach(function(me){He.current=me(He.current)}),he.current=null,we({})})),fe.current.push(Te)}return Object(_.useEffect)(function(){return function(){Ke.a.cancel(he.current)}},[]),[He.current,ge]}function ae(je){var He=Object(_.useRef)(je),ot=Object(_.useRef)(null);function ht(){window.clearTimeout(ot.current)}function we(fe){He.current=fe,ht(),ot.current=window.setTimeout(function(){He.current=null,ot.current=null},100)}function he(){return He.current}return Object(_.useEffect)(function(){return ht},[]),[we,he]}function V(je,He,ot){var ht=Object(_.useMemo)(function(){for(var we=[],he=[],fe=0,ge=0,Te=0;Te<He;Te+=1)if(ot==="rtl"){he[Te]=ge,ge+=je[Te]||0;var me=He-Te-1;we[me]=fe,fe+=je[me]||0}else{we[Te]=fe,fe+=je[Te]||0;var Ee=He-Te-1;he[Ee]=ge,ge+=je[Ee]||0}return{left:we,right:he}},[je,He,ot]);return ht}var $=V;function q(je){var He=je.className,ot=je.children;return _.createElement("div",{className:He},ot)}var se=q,te=N("n6Qo");function oe(je){var He,ot=je.prefixCls,ht=je.record,we=je.onExpand,he=je.expanded,fe=je.expandable,ge="".concat(ot,"-row-expand-icon");if(!fe)return _.createElement("span",{className:b()(ge,"".concat(ot,"-row-spaced"))});var Te=function(Ee){we(ht,Ee),Ee.stopPropagation()};return _.createElement("span",{className:b()(ge,(He={},Object(Z.a)(He,"".concat(ot,"-row-expanded"),he),Object(Z.a)(He,"".concat(ot,"-row-collapsed"),!he),He)),onClick:Te})}function re(je,He,ot){var ht=[];function we(he){(he||[]).forEach(function(fe,ge){ht.push(He(fe,ge)),we(fe[ot])})}return we(je),ht}var ie=N("zT1h"),ee=N("y0+3"),de=function(He,ot){var ht,we,he=He.scrollBodyRef,fe=He.onScroll,ge=He.offsetScroll,Te=_.useContext(i.a),me=Te.prefixCls,Ee=((ht=he.current)===null||ht===void 0?void 0:ht.scrollWidth)||0,xe=((we=he.current)===null||we===void 0?void 0:we.clientWidth)||0,Ie=Ee&&xe*(xe/Ee),Pe=_.useRef(),Qe=Le({scrollLeft:0,isHiddenScrollBar:!1}),tt=Object(M.a)(Qe,2),mt=tt[0],Bt=tt[1],Et=_.useRef({delta:0,x:0}),Ct=_.useState(!1),nt=Object(M.a)(Ct,2),qe=nt[0],$e=nt[1],Re=function(){$e(!1)},Ne=function(at){at.persist(),Et.current.delta=at.pageX-mt.scrollLeft,Et.current.x=0,$e(!0),at.preventDefault()},ct=function(at){var vt,St=at||((vt=window)===null||vt===void 0?void 0:vt.event),wt=St.buttons;if(!qe||wt===0){qe&&$e(!1);return}var Dt=Et.current.x+at.pageX-Et.current.x-Et.current.delta;Dt<=0&&(Dt=0),Dt+Ie>=xe&&(Dt=xe-Ie),fe({scrollLeft:Dt/xe*(Ee+2)}),Et.current.x=at.pageX},rt=function(){var at=Object(ee.b)(he.current).top,vt=at+he.current.offsetHeight,St=document.documentElement.scrollTop+window.innerHeight;vt-Object(h.a)()<=St||at>=St-ge?Bt(function(wt){return Object(H.a)(Object(H.a)({},wt),{},{isHiddenScrollBar:!0})}):Bt(function(wt){return Object(H.a)(Object(H.a)({},wt),{},{isHiddenScrollBar:!1})})},gt=function(at){Bt(function(vt){return Object(H.a)(Object(H.a)({},vt),{},{scrollLeft:at/Ee*xe||0})})};return _.useImperativeHandle(ot,function(){return{setScrollLeft:gt}}),_.useEffect(function(){var pt=Object(ie.a)(document.body,"mouseup",Re,!1),at=Object(ie.a)(document.body,"mousemove",ct,!1);return rt(),function(){pt.remove(),at.remove()}},[Ie,qe]),_.useEffect(function(){var pt=Object(ie.a)(window,"scroll",rt,!1),at=Object(ie.a)(window,"resize",rt,!1);return function(){pt.remove(),at.remove()}},[]),_.useEffect(function(){mt.isHiddenScrollBar||Bt(function(pt){var at,vt;return Object(H.a)(Object(H.a)({},pt),{},{scrollLeft:he.current.scrollLeft/((at=he.current)===null||at===void 0?void 0:at.scrollWidth)*((vt=he.current)===null||vt===void 0?void 0:vt.clientWidth)})})},[mt.isHiddenScrollBar]),Ee<=xe||!Ie||mt.isHiddenScrollBar?null:_.createElement("div",{style:{height:Object(h.a)(),width:xe,bottom:ge},className:"".concat(me,"-sticky-scroll")},_.createElement("div",{onMouseDown:Ne,ref:Pe,className:b()("".concat(me,"-sticky-scroll-bar"),Object(Z.a)({},"".concat(me,"-sticky-scroll-bar-active"),qe)),style:{width:"".concat(Ie,"px"),transform:"translate3d(".concat(mt.scrollLeft,"px, 0, 0)")}}))},Ce=_.forwardRef(de);function Me(je,He){return _.useMemo(function(){var ot=!!je;return{isSticky:ot,stickyClassName:ot?"".concat(He,"-sticky-header"):"",offsetHeader:Object(Q.a)(je)==="object"&&je.offsetHeader||0,offsetScroll:Object(Q.a)(je)==="object"&&je.offsetScroll||0}},[je,He])}var Ye=[],et={},st="rc-table-internal-hook",ut=_.memo(function(je){var He=je.children;return He},function(je,He){return E()(je.props,He.props)?je.pingLeft!==He.pingLeft||je.pingRight!==He.pingRight:!1});function yt(je){var He,ot=je.prefixCls,ht=je.className,we=je.rowClassName,he=je.style,fe=je.data,ge=je.rowKey,Te=je.scroll,me=je.tableLayout,Ee=je.direction,xe=je.title,Ie=je.footer,Pe=je.summary,Qe=je.id,tt=je.showHeader,mt=je.components,Bt=je.emptyText,Et=je.onRow,Ct=je.onHeaderRow,nt=je.internalHooks,qe=je.transformColumns,$e=je.internalRefs,Re=je.sticky,Ne=fe||Ye,ct=!!Ne.length,rt=_.useState(0),gt=Object(M.a)(rt,2),pt=gt[0],at=gt[1];_.useEffect(function(){at(Object(h.a)())});var vt=_.useMemo(function(){return Object(v.c)(mt,{})},[mt]),St=_.useCallback(function(Jr,Ur){return Object(v.b)(vt,Jr)||Ur},[vt]),wt=_.useMemo(function(){return typeof ge=="function"?ge:function(Jr){var Ur=Jr&&Jr[ge];return Ur}},[ge]),Dt=Object(n.c)(je),Ar=Dt.expandIcon,xr=Dt.expandedRowKeys,_r=Dt.defaultExpandedRowKeys,Ft=Dt.defaultExpandAllRows,er=Dt.expandedRowRender,ir=Dt.onExpand,Kt=Dt.onExpandedRowsChange,$t=Dt.expandRowByClick,Xt=Dt.rowExpandable,Xr=Dt.expandIconColumnIndex,Br=Dt.expandedRowClassName,be=Dt.childrenColumnName,Be=Dt.indentSize,ke=Ar||oe,Ze=be||"children",Je=_.useMemo(function(){return er?"row":je.expandable&&nt===st&&je.expandable.__PARENT_RENDER_ICON__||Ne.some(function(Jr){return Jr&&Object(Q.a)(Jr)==="object"&&Jr[Ze]})?"nest":!1},[!!er,Ne]),Ot=_.useState(function(){return _r||(Ft?re(Ne,wt,Ze):[])}),Lt=Object(M.a)(Ot,2),bt=Lt[0],Rt=Lt[1],At=_.useMemo(function(){return new Set(xr||bt||[])},[xr,bt]),Ut=_.useCallback(function(Jr){var Ur=wt(Jr,Ne.indexOf(Jr)),Gr,Ai=At.has(Ur);Ai?(At.delete(Ur),Gr=Object(O.a)(At)):Gr=[].concat(Object(O.a)(At),[Ur]),Rt(Gr),ir&&ir(!Ai,Jr),Kt&&Kt(Gr)},[wt,At,Ne,ir,Kt]),Gt=_.useState(0),gr=Object(M.a)(Gt,2),fr=gr[0],br=gr[1],Cr=Object(De.b)(Object(H.a)(Object(H.a)(Object(H.a)({},je),Dt),{},{expandable:!!er,expandedKeys:At,getRowKey:wt,onTriggerExpand:Ut,expandIcon:ke,expandIconColumnIndex:Xr,direction:Ee}),nt===st?qe:null),ar=Object(M.a)(Cr,2),Hr=ar[0],hr=ar[1],yr=_.useMemo(function(){return{columns:Hr,flattenColumns:hr}},[Hr,hr]),mr=_.useRef(),Dr=_.useRef(),Rr=_.useRef(),jr=_.useState(!1),or=Object(M.a)(jr,2),Mr=or[0],zr=or[1],Tn=_.useState(!1),Vr=Object(M.a)(Tn,2),en=Vr[0],En=Vr[1],cn=Le(new Map),rn=Object(M.a)(cn,2),hn=rn[0],wn=rn[1],Dn=Object(v.a)(hr),Er=Dn.map(function(Jr){return hn.get(Jr)}),sr=_.useMemo(function(){return Er},[Er.join("_")]),Yt=$(sr,hr.length,Ee),dr=Te&&Object(v.d)(Te.y),wr=Te&&Object(v.d)(Te.x),Or=wr&&hr.some(function(Jr){var Ur=Jr.fixed;return Ur}),sn=_.useRef(),Kr=Me(Re,ot),Yr=Kr.isSticky,zn=Kr.offsetHeader,Sn=Kr.offsetScroll,_n=Kr.stickyClassName,Yn,xn,$r;dr&&(xn={overflowY:"scroll",maxHeight:Te.y}),wr&&(Yn={overflowX:"auto"},dr||(xn={overflowY:"hidden"}),$r={width:Te.x===!0?"auto":Te.x,minWidth:"100%"});var In=_.useCallback(function(Jr,Ur){wn(function(Gr){var Ai=new Map(Gr);return Ai.set(Jr,Ur),Ai})},[]),Bn=ae(null),Jn=Object(M.a)(Bn,2),Mn=Jn[0],si=Jn[1];function Fn(Jr,Ur){if(!Ur)return;typeof Ur=="function"?Ur(Jr):Ur.scrollLeft!==Jr&&(Ur.scrollLeft=Jr)}var dn=function(Ur){var Gr=Ur.currentTarget,Ai=Ur.scrollLeft,zi=typeof Ai=="number"?Ai:Gr.scrollLeft,Vi=Gr||et;if(!si()||si()===Vi){var Ja;Mn(Vi),Fn(zi,Dr.current),Fn(zi,Rr.current),Fn(zi,(Ja=sn.current)===null||Ja===void 0?void 0:Ja.setScrollLeft)}if(Gr){var Ro=Gr.scrollWidth,ds=Gr.clientWidth;zr(zi>0),En(zi<Ro-ds)}},Un=function(){Rr.current&&dn({currentTarget:Rr.current})},zt=function(Ur){var Gr=Ur.width;Un(),br(mr.current?mr.current.offsetWidth:Gr)};_.useEffect(function(){return Un},[]),_.useEffect(function(){wr&&Un()},[wr]),_.useEffect(function(){nt===st&&$e&&($e.body.current=Rr.current)});var lr=St(["table"],"table"),jt=_.useMemo(function(){return me||(Or?Te.x==="max-content"?"auto":"fixed":dr||hr.some(function(Jr){var Ur=Jr.ellipsis;return Ur})?"fixed":"auto")},[dr,Or,hr,me]),cr,Tr={colWidths:sr,columCount:hr.length,stickyOffsets:Yt,onHeaderRow:Ct,fixHeader:dr},Wr=_.useMemo(function(){return ct?null:typeof Bt=="function"?Bt():Bt},[ct,Bt]),vr=_.createElement(_e,{data:Ne,measureColumnWidth:dr||wr||Yr,expandedKeys:At,rowExpandable:Xt,getRowKey:wt,onRow:Et,emptyNode:Wr,childrenColumnName:Ze}),nn=_.createElement(m,{colWidths:hr.map(function(Jr){var Ur=Jr.width;return Ur}),columns:hr}),Rn=Pe&&_.createElement(te.b,null,Pe(Ne)),Ir=St(["body"]);if(dr||Yr){var li;typeof Ir=="function"?(li=Ir(Ne,{scrollbarSize:pt,ref:Rr,onScroll:dn}),Tr.colWidths=hr.map(function(Jr,Ur){var Gr=Jr.width,Ai=Ur===Hr.length-1?Gr-pt:Gr;return typeof Ai=="number"&&!Number.isNaN(Ai)?Ai:(Object(a.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):li=_.createElement("div",{style:Object(H.a)(Object(H.a)({},Yn),xn),onScroll:dn,ref:Rr,className:b()("".concat(ot,"-body"))},_.createElement(lr,{style:Object(H.a)(Object(H.a)({},$r),{},{tableLayout:jt})},nn,vr,Rn),Yr&&_.createElement(Ce,{ref:sn,offsetScroll:Sn,scrollBodyRef:Rr,onScroll:dn})),cr=_.createElement(_.Fragment,null,tt!==!1&&_.createElement(g,Object.assign({noData:!Ne.length},Tr,yr,{direction:Ee,offsetHeader:zn,stickyClassName:_n,ref:Dr,onScroll:dn})),li)}else cr=_.createElement("div",{style:Object(H.a)(Object(H.a)({},Yn),xn),className:b()("".concat(ot,"-content")),onScroll:dn,ref:Rr},_.createElement(lr,{style:Object(H.a)(Object(H.a)({},$r),{},{tableLayout:jt})},nn,tt!==!1&&_.createElement(p,Object.assign({},Tr,yr)),vr,Rn));var Fr=Object(n.b)(je),Hn=_.createElement("div",Object.assign({className:b()(ot,ht,(He={},Object(Z.a)(He,"".concat(ot,"-rtl"),Ee==="rtl"),Object(Z.a)(He,"".concat(ot,"-ping-left"),Mr),Object(Z.a)(He,"".concat(ot,"-ping-right"),en),Object(Z.a)(He,"".concat(ot,"-layout-fixed"),me==="fixed"),Object(Z.a)(He,"".concat(ot,"-fixed-header"),dr),Object(Z.a)(He,"".concat(ot,"-fixed-column"),Or),Object(Z.a)(He,"".concat(ot,"-scroll-horizontal"),wr),Object(Z.a)(He,"".concat(ot,"-has-fix-left"),hr[0]&&hr[0].fixed),Object(Z.a)(He,"".concat(ot,"-has-fix-right"),hr[hr.length-1]&&hr[hr.length-1].fixed==="right"),He)),style:he,id:Qe,ref:mr},Fr),_.createElement(ut,{pingLeft:Mr,pingRight:en,props:Object(H.a)(Object(H.a)({},je),{},{stickyOffsets:Yt,mergedExpandedKeys:At})},xe&&_.createElement(se,{className:"".concat(ot,"-title")},xe(Ne)),_.createElement("div",{className:"".concat(ot,"-container")},cr),Ie&&_.createElement(se,{className:"".concat(ot,"-footer")},Ie(Ne))));wr&&(Hn=_.createElement(A.a,{onResize:zt},Hn));var Qn=_.useMemo(function(){return{prefixCls:ot,getComponent:St,scrollbarSize:pt,direction:Ee,fixedInfoList:hr.map(function(Jr,Ur){return l(Ur,Ur,hr,Yt,Ee)}),isSticky:Yr}},[ot,St,pt,Ee,hr,Yt,Ee,Yr]),ui=_.useMemo(function(){return Object(H.a)(Object(H.a)({},yr),{},{tableLayout:jt,rowClassName:we,expandedRowClassName:Br,componentWidth:fr,fixHeader:dr,fixColumn:Or,horizonScroll:wr,expandIcon:ke,expandableType:Je,expandRowByClick:$t,expandedRowRender:er,onTriggerExpand:Ut,expandIconColumnIndex:Xr,indentSize:Be})},[yr,jt,we,Br,fr,dr,Or,wr,ke,Je,$t,er,Ut,Xr,Be]),hs=_.useMemo(function(){return{onColumnResize:In}},[In]);return _.createElement(i.a.Provider,{value:Qn},_.createElement(P.Provider,{value:ui},_.createElement(X.Provider,{value:hs},Hn)))}yt.Column=o.a,yt.ColumnGroup=s.a,yt.Summary=te.a,yt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var xt=Ae.b=yt},wOnQ:function(Ve,Ae,N){/*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* Released under MIT License
|
|
*/(function(Z,H){Ve.exports=H()})(this,function(){"use strict";/*! *****************************************************************************
|
|
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 Z=function(j,k){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,W){z.__proto__=W}||function(z,W){for(var ce in W)Object.prototype.hasOwnProperty.call(W,ce)&&(z[ce]=W[ce])},Z(j,k)};function H(j,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");Z(j,k);function z(){this.constructor=j}j.prototype=k===null?Object.create(k):(z.prototype=k.prototype,new z)}var O=function(){return O=Object.assign||function(k){for(var z,W=1,ce=arguments.length;W<ce;W++){z=arguments[W];for(var ye in z)Object.prototype.hasOwnProperty.call(z,ye)&&(k[ye]=z[ye])}return k},O.apply(this,arguments)};function Q(j,k,z,W){function ce(ye){return ye instanceof z?ye:new z(function(Fe){Fe(ye)})}return new(z||(z=Promise))(function(ye,Fe){function Ge(ft){try{it(W.next(ft))}catch(_t){Fe(_t)}}function We(ft){try{it(W.throw(ft))}catch(_t){Fe(_t)}}function it(ft){ft.done?ye(ft.value):ce(ft.value).then(Ge,We)}it((W=W.apply(j,k||[])).next())})}function M(j,k){var z={label:0,sent:function(){if(ye[0]&1)throw ye[1];return ye[1]},trys:[],ops:[]},W,ce,ye,Fe;return Fe={next:Ge(0),throw:Ge(1),return:Ge(2)},typeof Symbol=="function"&&(Fe[Symbol.iterator]=function(){return this}),Fe;function Ge(it){return function(ft){return We([it,ft])}}function We(it){if(W)throw new TypeError("Generator is already executing.");for(;z;)try{if(W=1,ce&&(ye=it[0]&2?ce.return:it[0]?ce.throw||((ye=ce.return)&&ye.call(ce),0):ce.next)&&!(ye=ye.call(ce,it[1])).done)return ye;(ce=0,ye)&&(it=[it[0]&2,ye.value]);switch(it[0]){case 0:case 1:ye=it;break;case 4:return z.label++,{value:it[1],done:!1};case 5:z.label++,ce=it[1],it=[0];continue;case 7:it=z.ops.pop(),z.trys.pop();continue;default:if(!(ye=z.trys,ye=ye.length>0&&ye[ye.length-1])&&(it[0]===6||it[0]===2)){z=0;continue}if(it[0]===3&&(!ye||it[1]>ye[0]&&it[1]<ye[3])){z.label=it[1];break}if(it[0]===6&&z.label<ye[1]){z.label=ye[1],ye=it;break}if(ye&&z.label<ye[2]){z.label=ye[2],z.ops.push(it);break}ye[2]&&z.ops.pop(),z.trys.pop();continue}it=k.call(j,z)}catch(ft){it=[6,ft],ce=0}finally{W=ye=0}if(it[0]&5)throw it[1];return{value:it[0]?it[1]:void 0,done:!0}}}function _(j,k,z){if(z||arguments.length===2)for(var W=0,ce=k.length,ye;W<ce;W++)(ye||!(W in k))&&(ye||(ye=Array.prototype.slice.call(k,0,W)),ye[W]=k[W]);return j.concat(ye||k)}for(var R=function(){function j(k,z,W,ce){this.left=k,this.top=z,this.width=W,this.height=ce}return j.prototype.add=function(k,z,W,ce){return new j(this.left+k,this.top+z,this.width+W,this.height+ce)},j.fromClientRect=function(k,z){return new j(z.left+k.windowBounds.left,z.top+k.windowBounds.top,z.width,z.height)},j.fromDOMRectList=function(k,z){var W=Array.from(z).find(function(ce){return ce.width!==0});return W?new j(W.left+k.windowBounds.left,W.top+k.windowBounds.top,W.width,W.height):j.EMPTY},j.EMPTY=new j(0,0,0,0),j}(),b=function(j,k){return R.fromClientRect(j,k.getBoundingClientRect())},t=function(j){var k=j.body,z=j.documentElement;if(!k||!z)throw new Error("Unable to get document size");var W=Math.max(Math.max(k.scrollWidth,z.scrollWidth),Math.max(k.offsetWidth,z.offsetWidth),Math.max(k.clientWidth,z.clientWidth)),ce=Math.max(Math.max(k.scrollHeight,z.scrollHeight),Math.max(k.offsetHeight,z.offsetHeight),Math.max(k.clientHeight,z.clientHeight));return new R(0,0,W,ce)},E=function(j){for(var k=[],z=0,W=j.length;z<W;){var ce=j.charCodeAt(z++);if(ce>=55296&&ce<=56319&&z<W){var ye=j.charCodeAt(z++);(ye&64512)===56320?k.push(((ce&1023)<<10)+(ye&1023)+65536):(k.push(ce),z--)}else k.push(ce)}return k},a=function(){for(var j=[],k=0;k<arguments.length;k++)j[k]=arguments[k];if(String.fromCodePoint)return String.fromCodePoint.apply(String,j);var z=j.length;if(!z)return"";for(var W=[],ce=-1,ye="";++ce<z;){var Fe=j[ce];Fe<=65535?W.push(Fe):(Fe-=65536,W.push((Fe>>10)+55296,Fe%1024+56320)),(ce+1===z||W.length>16384)&&(ye+=String.fromCharCode.apply(String,W),W.length=0)}return ye},A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),s=0;s<A.length;s++)h[A.charCodeAt(s)]=s;for(var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),u=0;u<o.length;u++)f[o.charCodeAt(u)]=u;for(var c=function(j){var k=j.length*.75,z=j.length,W,ce=0,ye,Fe,Ge,We;j[j.length-1]==="="&&(k--,j[j.length-2]==="="&&k--);var it=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(k):new Array(k),ft=Array.isArray(it)?it:new Uint8Array(it);for(W=0;W<z;W+=4)ye=f[j.charCodeAt(W)],Fe=f[j.charCodeAt(W+1)],Ge=f[j.charCodeAt(W+2)],We=f[j.charCodeAt(W+3)],ft[ce++]=ye<<2|Fe>>4,ft[ce++]=(Fe&15)<<4|Ge>>2,ft[ce++]=(Ge&3)<<6|We&63;return it},i=function(j){for(var k=j.length,z=[],W=0;W<k;W+=2)z.push(j[W+1]<<8|j[W]);return z},l=function(j){for(var k=j.length,z=[],W=0;W<k;W+=4)z.push(j[W+3]<<24|j[W+2]<<16|j[W+1]<<8|j[W]);return z},v=5,B=6+5,C=2,L=B-v,w=65536>>v,p=1<<v,n=p-1,d=1024>>v,m=w+d,T=m,y=2048>>6,g=T+y,U=65536>>B,P=1<<L,I=P-1,G=function(j,k,z){return j.slice?j.slice(k,z):new Uint16Array(Array.prototype.slice.call(j,k,z))},K=function(j,k,z){return j.slice?j.slice(k,z):new Uint32Array(Array.prototype.slice.call(j,k,z))},D=function(j,k){var z=c(j),W=Array.isArray(z)?l(z):new Uint32Array(z),ce=Array.isArray(z)?i(z):new Uint16Array(z),ye=24,Fe=G(ce,ye/2,W[4]/2),Ge=W[5]===2?G(ce,(ye+W[4])/2):K(W,Math.ceil((ye+W[4])/4));return new J(W[0],W[1],W[2],W[3],Fe,Ge)},J=function(){function j(k,z,W,ce,ye,Fe){this.initialValue=k,this.errorValue=z,this.highStart=W,this.highValueIndex=ce,this.index=ye,this.data=Fe}return j.prototype.get=function(k){var z;if(k>=0){if(k<55296||k>56319&&k<=65535)return z=this.index[k>>v],z=(z<<C)+(k&n),this.data[z];if(k<=65535)return z=this.index[w+(k-55296>>v)],z=(z<<C)+(k&n),this.data[z];if(k<this.highStart)return z=g-U+(k>>B),z=this.index[z],z+=k>>v&I,z=this.index[z],z=(z<<C)+(k&n),this.data[z];if(k<=1114111)return this.data[this.highValueIndex]}return this.errorValue},j}(),X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ne=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ue=0;ue<X.length;ue++)ne[X.charCodeAt(ue)]=ue;var Oe="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",_e=50,De=1,Ue=2,Ke=3,Le=4,ae=5,V=7,$=8,q=9,se=10,te=11,oe=12,re=13,ie=14,ee=15,de=16,Ce=17,Me=18,Ye=19,et=20,st=21,ut=22,yt=23,xt=24,je=25,He=26,ot=27,ht=28,we=29,he=30,fe=31,ge=32,Te=33,me=34,Ee=35,xe=36,Ie=37,Pe=38,Qe=39,tt=40,mt=41,Bt=42,Et=43,Ct=[9001,65288],nt="!",qe="\xD7",$e="\xF7",Re=D(Oe),Ne=[he,xe],ct=[De,Ue,Ke,ae],rt=[se,$],gt=[ot,He],pt=ct.concat(rt),at=[Pe,Qe,tt,me,Ee],vt=[ee,re],St=function(j,k){k===void 0&&(k="strict");var z=[],W=[],ce=[];return j.forEach(function(ye,Fe){var Ge=Re.get(ye);if(Ge>_e?(ce.push(!0),Ge-=_e):ce.push(!1),["normal","auto","loose"].indexOf(k)!==-1&&[8208,8211,12316,12448].indexOf(ye)!==-1)return W.push(Fe),z.push(de);if(Ge===Le||Ge===te){if(Fe===0)return W.push(Fe),z.push(he);var We=z[Fe-1];return pt.indexOf(We)===-1?(W.push(W[Fe-1]),z.push(We)):(W.push(Fe),z.push(he))}if(W.push(Fe),Ge===fe)return z.push(k==="strict"?st:Ie);if(Ge===Bt)return z.push(he);if(Ge===we)return z.push(he);if(Ge===Et)return ye>=131072&&ye<=196605||ye>=196608&&ye<=262141?z.push(Ie):z.push(he);z.push(Ge)}),[W,z,ce]},wt=function(j,k,z,W){var ce=W[z];if(Array.isArray(j)?j.indexOf(ce)!==-1:j===ce)for(var ye=z;ye<=W.length;){ye++;var Fe=W[ye];if(Fe===k)return!0;if(Fe!==se)break}if(ce===se)for(var ye=z;ye>0;){ye--;var Ge=W[ye];if(Array.isArray(j)?j.indexOf(Ge)!==-1:j===Ge)for(var We=z;We<=W.length;){We++;var Fe=W[We];if(Fe===k)return!0;if(Fe!==se)break}if(Ge!==se)break}return!1},Dt=function(j,k){for(var z=j;z>=0;){var W=k[z];if(W===se)z--;else return W}return 0},Ar=function(j,k,z,W,ce){if(z[W]===0)return qe;var ye=W-1;if(Array.isArray(ce)&&ce[ye]===!0)return qe;var Fe=ye-1,Ge=ye+1,We=k[ye],it=Fe>=0?k[Fe]:0,ft=k[Ge];if(We===Ue&&ft===Ke)return qe;if(ct.indexOf(We)!==-1)return nt;if(ct.indexOf(ft)!==-1)return qe;if(rt.indexOf(ft)!==-1)return qe;if(Dt(ye,k)===$)return $e;if(Re.get(j[ye])===te)return qe;if((We===ge||We===Te)&&Re.get(j[Ge])===te)return qe;if(We===V||ft===V)return qe;if(We===q)return qe;if([se,re,ee].indexOf(We)===-1&&ft===q)return qe;if([Ce,Me,Ye,xt,ht].indexOf(ft)!==-1)return qe;if(Dt(ye,k)===ut)return qe;if(wt(yt,ut,ye,k))return qe;if(wt([Ce,Me],st,ye,k))return qe;if(wt(oe,oe,ye,k))return qe;if(We===se)return $e;if(We===yt||ft===yt)return qe;if(ft===de||We===de)return $e;if([re,ee,st].indexOf(ft)!==-1||We===ie)return qe;if(it===xe&&vt.indexOf(We)!==-1)return qe;if(We===ht&&ft===xe)return qe;if(ft===et)return qe;if(Ne.indexOf(ft)!==-1&&We===je||Ne.indexOf(We)!==-1&&ft===je)return qe;if(We===ot&&[Ie,ge,Te].indexOf(ft)!==-1||[Ie,ge,Te].indexOf(We)!==-1&&ft===He)return qe;if(Ne.indexOf(We)!==-1&>.indexOf(ft)!==-1||gt.indexOf(We)!==-1&&Ne.indexOf(ft)!==-1)return qe;if([ot,He].indexOf(We)!==-1&&(ft===je||[ut,ee].indexOf(ft)!==-1&&k[Ge+1]===je)||[ut,ee].indexOf(We)!==-1&&ft===je||We===je&&[je,ht,xt].indexOf(ft)!==-1)return qe;if([je,ht,xt,Ce,Me].indexOf(ft)!==-1)for(var _t=ye;_t>=0;){var Tt=k[_t];if(Tt===je)return qe;if([ht,xt].indexOf(Tt)!==-1)_t--;else break}if([ot,He].indexOf(ft)!==-1)for(var _t=[Ce,Me].indexOf(We)!==-1?Fe:ye;_t>=0;){var Tt=k[_t];if(Tt===je)return qe;if([ht,xt].indexOf(Tt)!==-1)_t--;else break}if(Pe===We&&[Pe,Qe,me,Ee].indexOf(ft)!==-1||[Qe,me].indexOf(We)!==-1&&[Qe,tt].indexOf(ft)!==-1||[tt,Ee].indexOf(We)!==-1&&ft===tt)return qe;if(at.indexOf(We)!==-1&&[et,He].indexOf(ft)!==-1||at.indexOf(ft)!==-1&&We===ot)return qe;if(Ne.indexOf(We)!==-1&&Ne.indexOf(ft)!==-1)return qe;if(We===xt&&Ne.indexOf(ft)!==-1)return qe;if(Ne.concat(je).indexOf(We)!==-1&&ft===ut&&Ct.indexOf(j[Ge])===-1||Ne.concat(je).indexOf(ft)!==-1&&We===Me)return qe;if(We===mt&&ft===mt){for(var tr=z[ye],kt=1;tr>0&&(tr--,k[tr]===mt);)kt++;if(kt%2!==0)return qe}return We===ge&&ft===Te?qe:$e},xr=function(j,k){k||(k={lineBreak:"normal",wordBreak:"normal"});var z=St(j,k.lineBreak),W=z[0],ce=z[1],ye=z[2];(k.wordBreak==="break-all"||k.wordBreak==="break-word")&&(ce=ce.map(function(Ge){return[je,he,Bt].indexOf(Ge)!==-1?Ie:Ge}));var Fe=k.wordBreak==="keep-all"?ye.map(function(Ge,We){return Ge&&j[We]>=19968&&j[We]<=40959}):void 0;return[W,ce,Fe]},_r=function(){function j(k,z,W,ce){this.codePoints=k,this.required=z===nt,this.start=W,this.end=ce}return j.prototype.slice=function(){return a.apply(void 0,this.codePoints.slice(this.start,this.end))},j}(),Ft=function(j,k){var z=E(j),W=xr(z,k),ce=W[0],ye=W[1],Fe=W[2],Ge=z.length,We=0,it=0;return{next:function(){if(it>=Ge)return{done:!0,value:null};for(var ft=qe;it<Ge&&(ft=Ar(z,ye,ce,++it,Fe))===qe;);if(ft!==qe||it===Ge){var _t=new _r(z,ft,We,it);return We=it,{value:_t,done:!1}}return{done:!0,value:null}}}},er=1<<0,ir=1<<1,Kt=1<<2,$t=1<<3,Xt=10,Xr=47,Br=92,be=9,Be=32,ke=34,Ze=61,Je=35,Ot=36,Lt=37,bt=39,Rt=40,At=41,Ut=95,Gt=45,gr=33,fr=60,br=62,Cr=64,ar=91,Hr=93,hr=61,yr=123,mr=63,Dr=125,Rr=124,jr=126,or=128,Mr=65533,zr=42,Tn=43,Vr=44,en=58,En=59,cn=46,rn=0,hn=8,wn=11,Dn=14,Er=31,sr=127,Yt=-1,dr=48,wr=97,Or=101,sn=102,Kr=117,Yr=122,zn=65,Sn=69,_n=70,Yn=85,xn=90,$r=function(j){return j>=dr&&j<=57},In=function(j){return j>=55296&&j<=57343},Bn=function(j){return $r(j)||j>=zn&&j<=_n||j>=wr&&j<=sn},Jn=function(j){return j>=wr&&j<=Yr},Mn=function(j){return j>=zn&&j<=xn},si=function(j){return Jn(j)||Mn(j)},Fn=function(j){return j>=or},dn=function(j){return j===Xt||j===be||j===Be},Un=function(j){return si(j)||Fn(j)||j===Ut},zt=function(j){return Un(j)||$r(j)||j===Gt},lr=function(j){return j>=rn&&j<=hn||j===wn||j>=Dn&&j<=Er||j===sr},jt=function(j,k){return j!==Br?!1:k!==Xt},cr=function(j,k,z){return j===Gt?Un(k)||jt(k,z):Un(j)?!0:!!(j===Br&&jt(j,k))},Tr=function(j,k,z){return j===Tn||j===Gt?$r(k)?!0:k===cn&&$r(z):j===cn?$r(k):$r(j)},Wr=function(j){var k=0,z=1;(j[k]===Tn||j[k]===Gt)&&(j[k]===Gt&&(z=-1),k++);for(var W=[];$r(j[k]);)W.push(j[k++]);var ce=W.length?parseInt(a.apply(void 0,W),10):0;j[k]===cn&&k++;for(var ye=[];$r(j[k]);)ye.push(j[k++]);var Fe=ye.length,Ge=Fe?parseInt(a.apply(void 0,ye),10):0;(j[k]===Sn||j[k]===Or)&&k++;var We=1;(j[k]===Tn||j[k]===Gt)&&(j[k]===Gt&&(We=-1),k++);for(var it=[];$r(j[k]);)it.push(j[k++]);var ft=it.length?parseInt(a.apply(void 0,it),10):0;return z*(ce+Ge*Math.pow(10,-Fe))*Math.pow(10,We*ft)},vr={type:2},nn={type:3},Rn={type:4},Ir={type:13},li={type:8},Fr={type:21},Hn={type:9},Qn={type:10},ui={type:11},hs={type:12},Jr={type:14},Ur={type:23},Gr={type:1},Ai={type:25},zi={type:24},Vi={type:26},Ja={type:27},Ro={type:28},ds={type:29},fs={type:31},Lo={type:32},nl=function(){function j(){this._value=[]}return j.prototype.write=function(k){this._value=this._value.concat(E(k))},j.prototype.read=function(){for(var k=[],z=this.consumeToken();z!==Lo;)k.push(z),z=this.consumeToken();return k},j.prototype.consumeToken=function(){var k=this.consumeCodePoint();switch(k){case ke:return this.consumeStringToken(ke);case Je:var z=this.peekCodePoint(0),W=this.peekCodePoint(1),ce=this.peekCodePoint(2);if(zt(z)||jt(W,ce)){var ye=cr(z,W,ce)?ir:er,Fe=this.consumeName();return{type:5,value:Fe,flags:ye}}break;case Ot:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),Ir;break;case bt:return this.consumeStringToken(bt);case Rt:return vr;case At:return nn;case zr:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),Jr;break;case Tn:if(Tr(k,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(k),this.consumeNumericToken();break;case Vr:return Rn;case Gt:var Ge=k,We=this.peekCodePoint(0),it=this.peekCodePoint(1);if(Tr(Ge,We,it))return this.reconsumeCodePoint(k),this.consumeNumericToken();if(cr(Ge,We,it))return this.reconsumeCodePoint(k),this.consumeIdentLikeToken();if(We===Gt&&it===br)return this.consumeCodePoint(),this.consumeCodePoint(),zi;break;case cn:if(Tr(k,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(k),this.consumeNumericToken();break;case Xr:if(this.peekCodePoint(0)===zr)for(this.consumeCodePoint();;){var ft=this.consumeCodePoint();if(ft===zr&&(ft=this.consumeCodePoint(),ft===Xr))return this.consumeToken();if(ft===Yt)return this.consumeToken()}break;case en:return Vi;case En:return Ja;case fr:if(this.peekCodePoint(0)===gr&&this.peekCodePoint(1)===Gt&&this.peekCodePoint(2)===Gt)return this.consumeCodePoint(),this.consumeCodePoint(),Ai;break;case Cr:var _t=this.peekCodePoint(0),Tt=this.peekCodePoint(1),tr=this.peekCodePoint(2);if(cr(_t,Tt,tr)){var Fe=this.consumeName();return{type:7,value:Fe}}break;case ar:return Ro;case Br:if(jt(k,this.peekCodePoint(0)))return this.reconsumeCodePoint(k),this.consumeIdentLikeToken();break;case Hr:return ds;case hr:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),li;break;case yr:return ui;case Dr:return hs;case Kr:case Yn:var kt=this.peekCodePoint(0),Vt=this.peekCodePoint(1);return kt===Tn&&(Bn(Vt)||Vt===mr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(k),this.consumeIdentLikeToken();case Rr:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),Hn;if(this.peekCodePoint(0)===Rr)return this.consumeCodePoint(),Fr;break;case jr:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),Qn;break;case Yt:return Lo}return dn(k)?(this.consumeWhiteSpace(),fs):$r(k)?(this.reconsumeCodePoint(k),this.consumeNumericToken()):Un(k)?(this.reconsumeCodePoint(k),this.consumeIdentLikeToken()):{type:6,value:a(k)}},j.prototype.consumeCodePoint=function(){var k=this._value.shift();return typeof k=="undefined"?-1:k},j.prototype.reconsumeCodePoint=function(k){this._value.unshift(k)},j.prototype.peekCodePoint=function(k){return k>=this._value.length?-1:this._value[k]},j.prototype.consumeUnicodeRangeToken=function(){for(var k=[],z=this.consumeCodePoint();Bn(z)&&k.length<6;)k.push(z),z=this.consumeCodePoint();for(var W=!1;z===mr&&k.length<6;)k.push(z),z=this.consumeCodePoint(),W=!0;if(W){var ce=parseInt(a.apply(void 0,k.map(function(We){return We===mr?dr:We})),16),ye=parseInt(a.apply(void 0,k.map(function(We){return We===mr?_n:We})),16);return{type:30,start:ce,end:ye}}var Fe=parseInt(a.apply(void 0,k),16);if(this.peekCodePoint(0)===Gt&&Bn(this.peekCodePoint(1))){this.consumeCodePoint(),z=this.consumeCodePoint();for(var Ge=[];Bn(z)&&Ge.length<6;)Ge.push(z),z=this.consumeCodePoint();var ye=parseInt(a.apply(void 0,Ge),16);return{type:30,start:Fe,end:ye}}else return{type:30,start:Fe,end:Fe}},j.prototype.consumeIdentLikeToken=function(){var k=this.consumeName();return k.toLowerCase()==="url"&&this.peekCodePoint(0)===Rt?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Rt?(this.consumeCodePoint(),{type:19,value:k}):{type:20,value:k}},j.prototype.consumeUrlToken=function(){var k=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Yt)return{type:22,value:""};var z=this.peekCodePoint(0);if(z===bt||z===ke){var W=this.consumeStringToken(this.consumeCodePoint());return W.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Yt||this.peekCodePoint(0)===At)?(this.consumeCodePoint(),{type:22,value:W.value}):(this.consumeBadUrlRemnants(),Ur)}for(;;){var ce=this.consumeCodePoint();if(ce===Yt||ce===At)return{type:22,value:a.apply(void 0,k)};if(dn(ce))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Yt||this.peekCodePoint(0)===At?(this.consumeCodePoint(),{type:22,value:a.apply(void 0,k)}):(this.consumeBadUrlRemnants(),Ur);if(ce===ke||ce===bt||ce===Rt||lr(ce))return this.consumeBadUrlRemnants(),Ur;if(ce===Br)if(jt(ce,this.peekCodePoint(0)))k.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Ur;else k.push(ce)}},j.prototype.consumeWhiteSpace=function(){for(;dn(this.peekCodePoint(0));)this.consumeCodePoint()},j.prototype.consumeBadUrlRemnants=function(){for(;;){var k=this.consumeCodePoint();if(k===At||k===Yt)return;jt(k,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},j.prototype.consumeStringSlice=function(k){for(var z=5e4,W="";k>0;){var ce=Math.min(z,k);W+=a.apply(void 0,this._value.splice(0,ce)),k-=ce}return this._value.shift(),W},j.prototype.consumeStringToken=function(k){var z="",W=0;do{var ce=this._value[W];if(ce===Yt||ce===void 0||ce===k)return z+=this.consumeStringSlice(W),{type:0,value:z};if(ce===Xt)return this._value.splice(0,W),Gr;if(ce===Br){var ye=this._value[W+1];ye!==Yt&&ye!==void 0&&(ye===Xt?(z+=this.consumeStringSlice(W),W=-1,this._value.shift()):jt(ce,ye)&&(z+=this.consumeStringSlice(W),z+=a(this.consumeEscapedCodePoint()),W=-1))}W++}while(!0)},j.prototype.consumeNumber=function(){var k=[],z=Kt,W=this.peekCodePoint(0);for((W===Tn||W===Gt)&&k.push(this.consumeCodePoint());$r(this.peekCodePoint(0));)k.push(this.consumeCodePoint());W=this.peekCodePoint(0);var ce=this.peekCodePoint(1);if(W===cn&&$r(ce))for(k.push(this.consumeCodePoint(),this.consumeCodePoint()),z=$t;$r(this.peekCodePoint(0));)k.push(this.consumeCodePoint());W=this.peekCodePoint(0),ce=this.peekCodePoint(1);var ye=this.peekCodePoint(2);if((W===Sn||W===Or)&&((ce===Tn||ce===Gt)&&$r(ye)||$r(ce)))for(k.push(this.consumeCodePoint(),this.consumeCodePoint()),z=$t;$r(this.peekCodePoint(0));)k.push(this.consumeCodePoint());return[Wr(k),z]},j.prototype.consumeNumericToken=function(){var k=this.consumeNumber(),z=k[0],W=k[1],ce=this.peekCodePoint(0),ye=this.peekCodePoint(1),Fe=this.peekCodePoint(2);if(cr(ce,ye,Fe)){var Ge=this.consumeName();return{type:15,number:z,flags:W,unit:Ge}}return ce===Lt?(this.consumeCodePoint(),{type:16,number:z,flags:W}):{type:17,number:z,flags:W}},j.prototype.consumeEscapedCodePoint=function(){var k=this.consumeCodePoint();if(Bn(k)){for(var z=a(k);Bn(this.peekCodePoint(0))&&z.length<6;)z+=a(this.consumeCodePoint());dn(this.peekCodePoint(0))&&this.consumeCodePoint();var W=parseInt(z,16);return W===0||In(W)||W>1114111?Mr:W}return k===Yt?Mr:k},j.prototype.consumeName=function(){for(var k="";;){var z=this.consumeCodePoint();if(zt(z))k+=a(z);else if(jt(z,this.peekCodePoint(0)))k+=a(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(z),k}},j}(),il=function(){function j(k){this._tokens=k}return j.create=function(k){var z=new nl;return z.write(k),new j(z.read())},j.parseValue=function(k){return j.create(k).parseComponentValue()},j.parseValues=function(k){return j.create(k).parseComponentValues()},j.prototype.parseComponentValue=function(){for(var k=this.consumeToken();k.type===31;)k=this.consumeToken();if(k.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(k);var z=this.consumeComponentValue();do k=this.consumeToken();while(k.type===31);if(k.type===32)return z;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},j.prototype.parseComponentValues=function(){for(var k=[];;){var z=this.consumeComponentValue();if(z.type===32)return k;k.push(z),k.push()}},j.prototype.consumeComponentValue=function(){var k=this.consumeToken();switch(k.type){case 11:case 28:case 2:return this.consumeSimpleBlock(k.type);case 19:return this.consumeFunction(k)}return k},j.prototype.consumeSimpleBlock=function(k){for(var z={type:k,values:[]},W=this.consumeToken();;){if(W.type===32||Ii(W,k))return z;this.reconsumeToken(W),z.values.push(this.consumeComponentValue()),W=this.consumeToken()}},j.prototype.consumeFunction=function(k){for(var z={name:k.value,values:[],type:18};;){var W=this.consumeToken();if(W.type===32||W.type===3)return z;this.reconsumeToken(W),z.values.push(this.consumeComponentValue())}},j.prototype.consumeToken=function(){var k=this._tokens.shift();return typeof k=="undefined"?Lo:k},j.prototype.reconsumeToken=function(k){this._tokens.unshift(k)},j}(),Ba=function(j){return j.type===15},ua=function(j){return j.type===17},fn=function(j){return j.type===20},$a=function(j){return j.type===0},xi=function(j,k){return fn(j)&&j.value===k},Za=function(j){return j.type!==31},Xi=function(j){return j.type!==31&&j.type!==4},Ci=function(j){var k=[],z=[];return j.forEach(function(W){if(W.type===4){if(z.length===0)throw new Error("Error parsing function args, zero tokens for arg");k.push(z),z=[];return}W.type!==31&&z.push(W)}),z.length&&k.push(z),k},Ii=function(j,k){return k===11&&j.type===12||k===28&&j.type===29?!0:k===2&&j.type===3},ci=function(j){return j.type===17||j.type===15},On=function(j){return j.type===16||ci(j)},al=function(j){return j.length>1?[j[0],j[1]]:[j[0]]},Vn={type:17,number:0,flags:Kt},ps={type:16,number:50,flags:Kt},Ui={type:16,number:100,flags:Kt},Aa=function(j,k,z){var W=j[0],ce=j[1];return[tn(W,k),tn(typeof ce!="undefined"?ce:W,z)]},tn=function(j,k){if(j.type===16)return j.number/100*k;if(Ba(j))switch(j.unit){case"rem":case"em":return 16*j.number;case"px":default:return j.number}return j.number},Ti="deg",ms="grad",gs="rad",ol="turn",Do={name:"angle",parse:function(j,k){if(k.type===15)switch(k.unit){case Ti:return Math.PI*k.number/180;case ms:return Math.PI/200*k.number;case gs:return k.number;case ol:return Math.PI*2*k.number}throw new Error("Unsupported angle type")}},sl=function(j){return j.type===15&&(j.unit===Ti||j.unit===ms||j.unit===gs||j.unit===ol)},vs=function(j){var k=j.filter(fn).map(function(z){return z.value}).join(" ");switch(k){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Vn,Vn];case"to top":case"bottom":return fi(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Vn,Ui];case"to right":case"left":return fi(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ui,Ui];case"to bottom":case"top":return fi(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ui,Vn];case"to left":case"right":return fi(270)}return 0},fi=function(j){return Math.PI*j/180},bi={name:"color",parse:function(j,k){if(k.type===18){var z=ll[k.name];if(typeof z=="undefined")throw new Error('Attempting to parse an unsupported color function "'+k.name+'"');return z(j,k.values)}if(k.type===5){if(k.value.length===3){var W=k.value.substring(0,1),ce=k.value.substring(1,2),ye=k.value.substring(2,3);return Ri(parseInt(W+W,16),parseInt(ce+ce,16),parseInt(ye+ye,16),1)}if(k.value.length===4){var W=k.value.substring(0,1),ce=k.value.substring(1,2),ye=k.value.substring(2,3),Fe=k.value.substring(3,4);return Ri(parseInt(W+W,16),parseInt(ce+ce,16),parseInt(ye+ye,16),parseInt(Fe+Fe,16)/255)}if(k.value.length===6){var W=k.value.substring(0,2),ce=k.value.substring(2,4),ye=k.value.substring(4,6);return Ri(parseInt(W,16),parseInt(ce,16),parseInt(ye,16),1)}if(k.value.length===8){var W=k.value.substring(0,2),ce=k.value.substring(2,4),ye=k.value.substring(4,6),Fe=k.value.substring(6,8);return Ri(parseInt(W,16),parseInt(ce,16),parseInt(ye,16),parseInt(Fe,16)/255)}}if(k.type===20){var Ge=Si[k.value.toUpperCase()];if(typeof Ge!="undefined")return Ge}return Si.TRANSPARENT}},Pi=function(j){return(255&j)===0},jn=function(j){var k=255&j,z=255&j>>8,W=255&j>>16,ce=255&j>>24;return k<255?"rgba("+ce+","+W+","+z+","+k/255+")":"rgb("+ce+","+W+","+z+")"},Ri=function(j,k,z,W){return(j<<24|k<<16|z<<8|Math.round(W*255)<<0)>>>0},qa=function(j,k){if(j.type===17)return j.number;if(j.type===16){var z=k===3?1:255;return k===3?j.number/100*z:Math.round(j.number/100*z)}return 0},ys=function(j,k){var z=k.filter(Xi);if(z.length===3){var W=z.map(qa),ce=W[0],ye=W[1],Fe=W[2];return Ri(ce,ye,Fe,1)}if(z.length===4){var Ge=z.map(qa),ce=Ge[0],ye=Ge[1],Fe=Ge[2],We=Ge[3];return Ri(ce,ye,Fe,We)}return 0};function eo(j,k,z){return z<0&&(z+=1),z>=1&&(z-=1),z<1/6?(k-j)*z*6+j:z<1/2?k:z<2/3?(k-j)*6*(2/3-z)+j:j}var Ei=function(j,k){var z=k.filter(Xi),W=z[0],ce=z[1],ye=z[2],Fe=z[3],Ge=(W.type===17?fi(W.number):Do.parse(j,W))/(Math.PI*2),We=On(ce)?ce.number/100:0,it=On(ye)?ye.number/100:0,ft=typeof Fe!="undefined"&&On(Fe)?tn(Fe,1):1;if(We===0)return Ri(it*255,it*255,it*255,1);var _t=it<=.5?it*(We+1):it+We-it*We,Tt=it*2-_t,tr=eo(Tt,_t,Ge+1/3),kt=eo(Tt,_t,Ge),Vt=eo(Tt,_t,Ge-1/3);return Ri(tr*255,kt*255,Vt*255,ft)},ll={hsl:Ei,hsla:Ei,rgb:ys,rgba:ys},ca=function(j,k){return bi.parse(j,il.create(k).parseComponentValue())},Si={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},ul={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(j,k){return k.map(function(z){if(fn(z))switch(z.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Al={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Oa=function(j,k){var z=bi.parse(j,k[0]),W=k[1];return W&&On(W)?{color:z,stop:W}:{color:z,stop:null}},cl=function(j,k){var z=j[0],W=j[j.length-1];z.stop===null&&(z.stop=Vn),W.stop===null&&(W.stop=Ui);for(var ce=[],ye=0,Fe=0;Fe<j.length;Fe++){var Ge=j[Fe].stop;if(Ge!==null){var We=tn(Ge,k);We>ye?ce.push(We):ce.push(ye),ye=We}else ce.push(null)}for(var it=null,Fe=0;Fe<ce.length;Fe++){var ft=ce[Fe];if(ft===null)it===null&&(it=Fe);else if(it!==null){for(var _t=Fe-it,Tt=ce[it-1],tr=(ft-Tt)/(_t+1),kt=1;kt<=_t;kt++)ce[it+kt-1]=tr*kt;it=null}}return j.map(function(Vt,Sr){var qt=Vt.color;return{color:qt,stop:Math.max(Math.min(1,ce[Sr]/k),0)}})},vu=function(j,k,z){var W=k/2,ce=z/2,ye=tn(j[0],k)-W,Fe=ce-tn(j[1],z);return(Math.atan2(Fe,ye)+Math.PI*2)%(Math.PI*2)},yu=function(j,k,z){var W=typeof j=="number"?j:vu(j,k,z),ce=Math.abs(k*Math.sin(W))+Math.abs(z*Math.cos(W)),ye=k/2,Fe=z/2,Ge=ce/2,We=Math.sin(W-Math.PI/2)*Ge,it=Math.cos(W-Math.PI/2)*Ge;return[ce,ye-it,ye+it,Fe-We,Fe+We]},$n=function(j,k){return Math.sqrt(j*j+k*k)},ha=function(j,k,z,W,ce){var ye=[[0,0],[0,k],[j,0],[j,k]];return ye.reduce(function(Fe,Ge){var We=Ge[0],it=Ge[1],ft=$n(z-We,W-it);return(ce?ft<Fe.optimumDistance:ft>Fe.optimumDistance)?{optimumCorner:Ge,optimumDistance:ft}:Fe},{optimumDistance:ce?Infinity:-Infinity,optimumCorner:null}).optimumCorner},Ia=function(j,k,z,W,ce){var ye=0,Fe=0;switch(j.size){case 0:j.shape===0?ye=Fe=Math.min(Math.abs(k),Math.abs(k-W),Math.abs(z),Math.abs(z-ce)):j.shape===1&&(ye=Math.min(Math.abs(k),Math.abs(k-W)),Fe=Math.min(Math.abs(z),Math.abs(z-ce)));break;case 2:if(j.shape===0)ye=Fe=Math.min($n(k,z),$n(k,z-ce),$n(k-W,z),$n(k-W,z-ce));else if(j.shape===1){var Ge=Math.min(Math.abs(z),Math.abs(z-ce))/Math.min(Math.abs(k),Math.abs(k-W)),We=ha(W,ce,k,z,!0),it=We[0],ft=We[1];ye=$n(it-k,(ft-z)/Ge),Fe=Ge*ye}break;case 1:j.shape===0?ye=Fe=Math.max(Math.abs(k),Math.abs(k-W),Math.abs(z),Math.abs(z-ce)):j.shape===1&&(ye=Math.max(Math.abs(k),Math.abs(k-W)),Fe=Math.max(Math.abs(z),Math.abs(z-ce)));break;case 3:if(j.shape===0)ye=Fe=Math.max($n(k,z),$n(k,z-ce),$n(k-W,z),$n(k-W,z-ce));else if(j.shape===1){var Ge=Math.max(Math.abs(z),Math.abs(z-ce))/Math.max(Math.abs(k),Math.abs(k-W)),_t=ha(W,ce,k,z,!1),it=_t[0],ft=_t[1];ye=$n(it-k,(ft-z)/Ge),Fe=Ge*ye}break}return Array.isArray(j.size)&&(ye=tn(j.size[0],W),Fe=j.size.length===2?tn(j.size[1],ce):ye),[ye,Fe]},bs=function(j,k){var z=fi(180),W=[];return Ci(k).forEach(function(ce,ye){if(ye===0){var Fe=ce[0];if(Fe.type===20&&Fe.value==="to"){z=vs(ce);return}else if(sl(Fe)){z=Do.parse(j,Fe);return}}var Ge=Oa(j,ce);W.push(Ge)}),{angle:z,stops:W,type:1}},Ra=function(j,k){var z=fi(180),W=[];return Ci(k).forEach(function(ce,ye){if(ye===0){var Fe=ce[0];if(Fe.type===20&&["top","left","right","bottom"].indexOf(Fe.value)!==-1){z=vs(ce);return}else if(sl(Fe)){z=(Do.parse(j,Fe)+fi(270))%fi(360);return}}var Ge=Oa(j,ce);W.push(Ge)}),{angle:z,stops:W,type:1}},hl=function(j,k){var z=fi(180),W=[],ce=1,ye=0,Fe=3,Ge=[];return Ci(k).forEach(function(We,it){var ft=We[0];if(it===0){if(fn(ft)&&ft.value==="linear"){ce=1;return}else if(fn(ft)&&ft.value==="radial"){ce=2;return}}if(ft.type===18){if(ft.name==="from"){var _t=bi.parse(j,ft.values[0]);W.push({stop:Vn,color:_t})}else if(ft.name==="to"){var _t=bi.parse(j,ft.values[0]);W.push({stop:Ui,color:_t})}else if(ft.name==="color-stop"){var Tt=ft.values.filter(Xi);if(Tt.length===2){var _t=bi.parse(j,Tt[1]),tr=Tt[0];ua(tr)&&W.push({stop:{type:16,number:tr.number*100,flags:tr.flags},color:_t})}}}}),ce===1?{angle:(z+fi(180))%fi(360),stops:W,type:ce}:{size:Fe,shape:ye,stops:W,position:Ge,type:ce}},Mo="closest-side",Yi="farthest-side",Ji="closest-corner",ti="farthest-corner",ki="circle",Ni="ellipse",to="cover",dl="contain",fl=function(j,k){var z=0,W=3,ce=[],ye=[];return Ci(k).forEach(function(Fe,Ge){var We=!0;if(Ge===0){var it=!1;We=Fe.reduce(function(_t,Tt){if(it)if(fn(Tt))switch(Tt.value){case"center":return ye.push(ps),_t;case"top":case"left":return ye.push(Vn),_t;case"right":case"bottom":return ye.push(Ui),_t}else(On(Tt)||ci(Tt))&&ye.push(Tt);else if(fn(Tt))switch(Tt.value){case ki:return z=0,!1;case Ni:return z=1,!1;case"at":return it=!0,!1;case Mo:return W=0,!1;case to:case Yi:return W=1,!1;case dl:case Ji:return W=2,!1;case ti:return W=3,!1}else if(ci(Tt)||On(Tt))return Array.isArray(W)||(W=[]),W.push(Tt),!1;return _t},We)}if(We){var ft=Oa(j,Fe);ce.push(ft)}}),{size:W,shape:z,stops:ce,position:ye,type:2}},$i=function(j,k){var z=0,W=3,ce=[],ye=[];return Ci(k).forEach(function(Fe,Ge){var We=!0;if(Ge===0?We=Fe.reduce(function(ft,_t){if(fn(_t))switch(_t.value){case"center":return ye.push(ps),!1;case"top":case"left":return ye.push(Vn),!1;case"right":case"bottom":return ye.push(Ui),!1}else if(On(_t)||ci(_t))return ye.push(_t),!1;return ft},We):Ge===1&&(We=Fe.reduce(function(ft,_t){if(fn(_t))switch(_t.value){case ki:return z=0,!1;case Ni:return z=1,!1;case dl:case Mo:return W=0,!1;case Yi:return W=1,!1;case Ji:return W=2,!1;case to:case ti:return W=3,!1}else if(ci(_t)||On(_t))return Array.isArray(W)||(W=[]),W.push(_t),!1;return ft},We)),We){var it=Oa(j,Fe);ce.push(it)}}),{size:W,shape:z,stops:ce,position:ye,type:2}},pl=function(j){return j.type===1},ml=function(j){return j.type===2},La={name:"image",parse:function(j,k){if(k.type===22){var z={url:k.value,type:0};return j.cache.addImage(k.value),z}if(k.type===18){var W=Fo[k.name];if(typeof W=="undefined")throw new Error('Attempting to parse an unsupported image function "'+k.name+'"');return W(j,k.values)}throw new Error("Unsupported image type "+k.type)}};function bu(j){return!(j.type===20&&j.value==="none")&&(j.type!==18||!!Fo[j.name])}var Fo={"linear-gradient":bs,"-moz-linear-gradient":Ra,"-ms-linear-gradient":Ra,"-o-linear-gradient":Ra,"-webkit-linear-gradient":Ra,"radial-gradient":fl,"-moz-radial-gradient":$i,"-ms-radial-gradient":$i,"-o-radial-gradient":$i,"-webkit-radial-gradient":$i,"-webkit-gradient":hl},gl={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(j,k){if(k.length===0)return[];var z=k[0];return z.type===20&&z.value==="none"?[]:k.filter(function(W){return Xi(W)&&bu(W)}).map(function(W){return La.parse(j,W)})}},vl={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(j,k){return k.map(function(z){if(fn(z))switch(z.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Es={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(j,k){return Ci(k).map(function(z){return z.filter(On)}).map(al)}},Da={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(j,k){return Ci(k).map(function(z){return z.filter(fn).map(function(W){return W.value}).join(" ")}).map(Uo)}},Uo=function(j){switch(j){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},da;(function(j){j.AUTO="auto",j.CONTAIN="contain",j.COVER="cover"})(da||(da={}));var Po={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(j,k){return Ci(k).map(function(z){return z.filter(Eu)})}},Eu=function(j){return fn(j)||On(j)},ko=function(j){return{name:"border-"+j+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},wu=ko("top"),ws=ko("right"),_s=ko("bottom"),Ma=ko("left"),Zi=function(j){return{name:"border-radius-"+j,initialValue:"0 0",prefix:!1,type:1,parse:function(k,z){return al(z.filter(On))}}},_u=Zi("top-left"),No=Zi("top-right"),yl=Zi("bottom-right"),ro=Zi("bottom-left"),no=function(j){return{name:"border-"+j+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(k,z){switch(z){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},fa=no("top"),io=no("right"),pa=no("bottom"),ao=no("left"),Hi=function(j){return{name:"border-"+j+"-width",initialValue:"0",type:0,prefix:!1,parse:function(k,z){return Ba(z)?z.number:0}}},bl=Hi("top"),El=Hi("right"),wl=Hi("bottom"),xu=Hi("left"),ma={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ga={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(j,k){switch(k){case"rtl":return 1;case"ltr":default:return 0}}},Cu={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(j,k){return k.filter(fn).reduce(function(z,W){return z|Tu(W.value)},0)}},Tu=function(j){switch(j){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Su={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(j,k){switch(k){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Bu={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(j,k){return k.type===20&&k.value==="normal"?0:k.type===17||k.type===15?k.number:0}},Ho;(function(j){j.NORMAL="normal",j.STRICT="strict"})(Ho||(Ho={}));var Ou={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(j,k){switch(k){case"strict":return Ho.STRICT;case"normal":default:return Ho.NORMAL}}},hi={name:"line-height",initialValue:"normal",prefix:!1,type:4},Pn=function(j,k){return fn(j)&&j.value==="normal"?1.2*k:j.type===17?k*j.number:On(j)?tn(j,k):k},ri={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(j,k){return k.type===20&&k.value==="none"?null:La.parse(j,k)}},Kn={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(j,k){switch(k){case"inside":return 0;case"outside":default:return 1}}},va={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(j,k){switch(k){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Qo=function(j){return{name:"margin-"+j,initialValue:"0",prefix:!1,type:4}},jo=Qo("top"),Iu=Qo("right"),Ru=Qo("bottom"),Lu=Qo("left"),xs={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(j,k){return k.filter(fn).map(function(z){switch(z.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},_l={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(j,k){switch(k){case"break-word":return"break-word";case"normal":default:return"normal"}}},Fa=function(j){return{name:"padding-"+j,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Du=Fa("top"),Cs=Fa("right"),Ts=Fa("bottom"),xl=Fa("left"),Cl={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(j,k){switch(k){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Ss={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(j,k){switch(k){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Tl={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(j,k){return k.length===1&&xi(k[0],"none")?[]:Ci(k).map(function(z){for(var W={color:Si.TRANSPARENT,offsetX:Vn,offsetY:Vn,blur:Vn},ce=0,ye=0;ye<z.length;ye++){var Fe=z[ye];ci(Fe)?(ce===0?W.offsetX=Fe:ce===1?W.offsetY=Fe:W.blur=Fe,ce++):W.color=bi.parse(j,Fe)}return W})}},oo={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(j,k){switch(k){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Mu={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(j,k){if(k.type===20&&k.value==="none")return null;if(k.type===18){var z=Sl[k.name];if(typeof z=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+k.name+'"');return z(k.values)}return null}},Ko=function(j){var k=j.filter(function(z){return z.type===17}).map(function(z){return z.number});return k.length===6?k:null},pi=function(j){var k=j.filter(function(We){return We.type===17}).map(function(We){return We.number}),z=k[0],W=k[1];k[2],k[3];var ce=k[4],ye=k[5];k[6],k[7],k[8],k[9],k[10],k[11];var Fe=k[12],Ge=k[13];return k[14],k[15],k.length===16?[z,W,ce,ye,Fe,Ge]:null},Sl={matrix:Ko,matrix3d:pi},Bl={type:16,number:50,flags:Kt},Ol=[Bl,Bl],mi={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(j,k){var z=k.filter(On);return z.length!==2?Ol:[z[0],z[1]]}},Zr={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(j,k){switch(k){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},oi;(function(j){j.NORMAL="normal",j.BREAK_ALL="break-all",j.KEEP_ALL="keep-all"})(oi||(oi={}));for(var qi={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(j,k){switch(k){case"break-all":return oi.BREAK_ALL;case"keep-all":return oi.KEEP_ALL;case"normal":default:return oi.NORMAL}}},ea={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(j,k){if(k.type===20)return{auto:!0,order:0};if(ua(k))return{auto:!1,order:k.number};throw new Error("Invalid z-index number parsed")}},Bs={name:"time",parse:function(j,k){if(k.type===15)switch(k.unit.toLowerCase()){case"s":return 1e3*k.number;case"ms":return k.number}throw new Error("Unsupported time type")}},Os={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(j,k){return ua(k)?k.number:1}},Il={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Fu={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(j,k){return k.filter(fn).map(function(z){switch(z.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(z){return z!==0})}},Is={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(j,k){var z=[],W=[];return k.forEach(function(ce){switch(ce.type){case 20:case 0:z.push(ce.value);break;case 17:z.push(ce.number.toString());break;case 4:W.push(z.join(" ")),z.length=0;break}}),z.length&&W.push(z.join(" ")),W.map(function(ce){return ce.indexOf(" ")===-1?ce:"'"+ce+"'"})}},so={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Rl={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(j,k){if(ua(k))return k.number;if(fn(k))switch(k.value){case"bold":return 700;case"normal":default:return 400}return 400}},Rs={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(j,k){return k.filter(fn).map(function(z){return z.value})}},ta={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(j,k){switch(k){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},kn=function(j,k){return(j&k)!==0},Ll={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(j,k){if(k.length===0)return[];var z=k[0];return z.type===20&&z.value==="none"?[]:k}},Uu={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(j,k){if(k.length===0)return null;var z=k[0];if(z.type===20&&z.value==="none")return null;for(var W=[],ce=k.filter(Za),ye=0;ye<ce.length;ye++){var Fe=ce[ye],Ge=ce[ye+1];if(Fe.type===20){var We=Ge&&ua(Ge)?Ge.number:1;W.push({counter:Fe.value,increment:We})}}return W}},Wo={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(j,k){if(k.length===0)return[];for(var z=[],W=k.filter(Za),ce=0;ce<W.length;ce++){var ye=W[ce],Fe=W[ce+1];if(fn(ye)&&ye.value!=="none"){var Ge=Fe&&ua(Fe)?Fe.number:0;z.push({counter:ye.value,reset:Ge})}}return z}},Ls={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(j,k){return k.filter(Ba).map(function(z){return Bs.parse(j,z)})}},Dl={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(j,k){if(k.length===0)return null;var z=k[0];if(z.type===20&&z.value==="none")return null;var W=[],ce=k.filter($a);if(ce.length%2!==0)return null;for(var ye=0;ye<ce.length;ye+=2){var Fe=ce[ye].value,Ge=ce[ye+1].value;W.push({open:Fe,close:Ge})}return W}},Ml=function(j,k,z){if(!j)return"";var W=j[Math.min(k,j.length-1)];return W?z?W.open:W.close:""},Fl={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(j,k){return k.length===1&&xi(k[0],"none")?[]:Ci(k).map(function(z){for(var W={color:255,offsetX:Vn,offsetY:Vn,blur:Vn,spread:Vn,inset:!1},ce=0,ye=0;ye<z.length;ye++){var Fe=z[ye];xi(Fe,"inset")?W.inset=!0:ci(Fe)?(ce===0?W.offsetX=Fe:ce===1?W.offsetY=Fe:ce===2?W.blur=Fe:W.spread=Fe,ce++):W.color=bi.parse(j,Fe)}return W})}},Pu={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(j,k){var z=[0,1,2],W=[];return k.filter(fn).forEach(function(ce){switch(ce.value){case"stroke":W.push(1);break;case"fill":W.push(0);break;case"markers":W.push(2);break}}),z.forEach(function(ce){W.indexOf(ce)===-1&&W.push(ce)}),W}},ku={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Go={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(j,k){return Ba(k)?k.number:0}},Ul=function(){function j(k,z){var W,ce;this.animationDuration=Zt(k,Ls,z.animationDuration),this.backgroundClip=Zt(k,ul,z.backgroundClip),this.backgroundColor=Zt(k,Al,z.backgroundColor),this.backgroundImage=Zt(k,gl,z.backgroundImage),this.backgroundOrigin=Zt(k,vl,z.backgroundOrigin),this.backgroundPosition=Zt(k,Es,z.backgroundPosition),this.backgroundRepeat=Zt(k,Da,z.backgroundRepeat),this.backgroundSize=Zt(k,Po,z.backgroundSize),this.borderTopColor=Zt(k,wu,z.borderTopColor),this.borderRightColor=Zt(k,ws,z.borderRightColor),this.borderBottomColor=Zt(k,_s,z.borderBottomColor),this.borderLeftColor=Zt(k,Ma,z.borderLeftColor),this.borderTopLeftRadius=Zt(k,_u,z.borderTopLeftRadius),this.borderTopRightRadius=Zt(k,No,z.borderTopRightRadius),this.borderBottomRightRadius=Zt(k,yl,z.borderBottomRightRadius),this.borderBottomLeftRadius=Zt(k,ro,z.borderBottomLeftRadius),this.borderTopStyle=Zt(k,fa,z.borderTopStyle),this.borderRightStyle=Zt(k,io,z.borderRightStyle),this.borderBottomStyle=Zt(k,pa,z.borderBottomStyle),this.borderLeftStyle=Zt(k,ao,z.borderLeftStyle),this.borderTopWidth=Zt(k,bl,z.borderTopWidth),this.borderRightWidth=Zt(k,El,z.borderRightWidth),this.borderBottomWidth=Zt(k,wl,z.borderBottomWidth),this.borderLeftWidth=Zt(k,xu,z.borderLeftWidth),this.boxShadow=Zt(k,Fl,z.boxShadow),this.color=Zt(k,ma,z.color),this.direction=Zt(k,ga,z.direction),this.display=Zt(k,Cu,z.display),this.float=Zt(k,Su,z.cssFloat),this.fontFamily=Zt(k,Is,z.fontFamily),this.fontSize=Zt(k,so,z.fontSize),this.fontStyle=Zt(k,ta,z.fontStyle),this.fontVariant=Zt(k,Rs,z.fontVariant),this.fontWeight=Zt(k,Rl,z.fontWeight),this.letterSpacing=Zt(k,Bu,z.letterSpacing),this.lineBreak=Zt(k,Ou,z.lineBreak),this.lineHeight=Zt(k,hi,z.lineHeight),this.listStyleImage=Zt(k,ri,z.listStyleImage),this.listStylePosition=Zt(k,Kn,z.listStylePosition),this.listStyleType=Zt(k,va,z.listStyleType),this.marginTop=Zt(k,jo,z.marginTop),this.marginRight=Zt(k,Iu,z.marginRight),this.marginBottom=Zt(k,Ru,z.marginBottom),this.marginLeft=Zt(k,Lu,z.marginLeft),this.opacity=Zt(k,Os,z.opacity);var ye=Zt(k,xs,z.overflow);this.overflowX=ye[0],this.overflowY=ye[ye.length>1?1:0],this.overflowWrap=Zt(k,_l,z.overflowWrap),this.paddingTop=Zt(k,Du,z.paddingTop),this.paddingRight=Zt(k,Cs,z.paddingRight),this.paddingBottom=Zt(k,Ts,z.paddingBottom),this.paddingLeft=Zt(k,xl,z.paddingLeft),this.paintOrder=Zt(k,Pu,z.paintOrder),this.position=Zt(k,Ss,z.position),this.textAlign=Zt(k,Cl,z.textAlign),this.textDecorationColor=Zt(k,Il,(W=z.textDecorationColor)!==null&&W!==void 0?W:z.color),this.textDecorationLine=Zt(k,Fu,(ce=z.textDecorationLine)!==null&&ce!==void 0?ce:z.textDecoration),this.textShadow=Zt(k,Tl,z.textShadow),this.textTransform=Zt(k,oo,z.textTransform),this.transform=Zt(k,Mu,z.transform),this.transformOrigin=Zt(k,mi,z.transformOrigin),this.visibility=Zt(k,Zr,z.visibility),this.webkitTextStrokeColor=Zt(k,ku,z.webkitTextStrokeColor),this.webkitTextStrokeWidth=Zt(k,Go,z.webkitTextStrokeWidth),this.wordBreak=Zt(k,qi,z.wordBreak),this.zIndex=Zt(k,ea,z.zIndex)}return j.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},j.prototype.isTransparent=function(){return Pi(this.backgroundColor)},j.prototype.isTransformed=function(){return this.transform!==null},j.prototype.isPositioned=function(){return this.position!==0},j.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},j.prototype.isFloating=function(){return this.float!==0},j.prototype.isInlineLevel=function(){return kn(this.display,4)||kn(this.display,33554432)||kn(this.display,268435456)||kn(this.display,536870912)||kn(this.display,67108864)||kn(this.display,134217728)},j}(),Nu=function(){function j(k,z){this.content=Zt(k,Ll,z.content),this.quotes=Zt(k,Dl,z.quotes)}return j}(),Pl=function(){function j(k,z){this.counterIncrement=Zt(k,Uu,z.counterIncrement),this.counterReset=Zt(k,Wo,z.counterReset)}return j}(),Zt=function(j,k,z){var W=new nl,ce=z!==null&&typeof z!="undefined"?z.toString():k.initialValue;W.write(ce);var ye=new il(W.read());switch(k.type){case 2:var Fe=ye.parseComponentValue();return k.parse(j,fn(Fe)?Fe.value:k.initialValue);case 0:return k.parse(j,ye.parseComponentValue());case 1:return k.parse(j,ye.parseComponentValues());case 4:return ye.parseComponentValue();case 3:switch(k.format){case"angle":return Do.parse(j,ye.parseComponentValue());case"color":return bi.parse(j,ye.parseComponentValue());case"image":return La.parse(j,ye.parseComponentValue());case"length":var Ge=ye.parseComponentValue();return ci(Ge)?Ge:Vn;case"length-percentage":var We=ye.parseComponentValue();return On(We)?We:Vn;case"time":return Bs.parse(j,ye.parseComponentValue())}break}},Ua="data-html2canvas-debug",Ds=function(j){var k=j.getAttribute(Ua);switch(k){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Pa=function(j,k){var z=Ds(j);return z===1||k===z},Bi=function(){function j(k,z){if(this.context=k,this.textNodes=[],this.elements=[],this.flags=0,Pa(z,3))debugger;this.styles=new Ul(k,window.getComputedStyle(z,null)),as(z)&&(this.styles.animationDuration.some(function(W){return W>0})&&(z.style.animationDuration="0s"),this.styles.transform!==null&&(z.style.transform="none")),this.bounds=b(this.context,z),Pa(z,4)&&(this.flags|=16)}return j}(),Ms="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),uo=0;uo<Fs.length;uo++)lo[Fs.charCodeAt(uo)]=uo;for(var Zn=function(j){var k=j.length*.75,z=j.length,W,ce=0,ye,Fe,Ge,We;j[j.length-1]==="="&&(k--,j[j.length-2]==="="&&k--);var it=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(k):new Array(k),ft=Array.isArray(it)?it:new Uint8Array(it);for(W=0;W<z;W+=4)ye=lo[j.charCodeAt(W)],Fe=lo[j.charCodeAt(W+1)],Ge=lo[j.charCodeAt(W+2)],We=lo[j.charCodeAt(W+3)],ft[ce++]=ye<<2|Fe>>4,ft[ce++]=(Fe&15)<<4|Ge>>2,ft[ce++]=(Ge&3)<<6|We&63;return it},zo=function(j){for(var k=j.length,z=[],W=0;W<k;W+=2)z.push(j[W+1]<<8|j[W]);return z},kl=function(j){for(var k=j.length,z=[],W=0;W<k;W+=4)z.push(j[W+3]<<24|j[W+2]<<16|j[W+1]<<8|j[W]);return z},ra=5,Vo=6+5,na=2,Xo=Vo-ra,Us=65536>>ra,Nl=1<<ra,Yo=Nl-1,ka=1024>>ra,Hl=Us+ka,Jo=Hl,Ql=2048>>6,Ao=Jo+Ql,Hu=65536>>Vo,Na=1<<Xo,jl=Na-1,Ps=function(j,k,z){return j.slice?j.slice(k,z):new Uint16Array(Array.prototype.slice.call(j,k,z))},Kl=function(j,k,z){return j.slice?j.slice(k,z):new Uint32Array(Array.prototype.slice.call(j,k,z))},co=function(j,k){var z=Zn(j),W=Array.isArray(z)?kl(z):new Uint32Array(z),ce=Array.isArray(z)?zo(z):new Uint16Array(z),ye=24,Fe=Ps(ce,ye/2,W[4]/2),Ge=W[5]===2?Ps(ce,(ye+W[4])/2):Kl(W,Math.ceil((ye+W[4])/4));return new ho(W[0],W[1],W[2],W[3],Fe,Ge)},ho=function(){function j(k,z,W,ce,ye,Fe){this.initialValue=k,this.errorValue=z,this.highStart=W,this.highValueIndex=ce,this.index=ye,this.data=Fe}return j.prototype.get=function(k){var z;if(k>=0){if(k<55296||k>56319&&k<=65535)return z=this.index[k>>ra],z=(z<<na)+(k&Yo),this.data[z];if(k<=65535)return z=this.index[Us+(k-55296>>ra)],z=(z<<na)+(k&Yo),this.data[z];if(k<this.highStart)return z=Ao-Hu+(k>>Vo),z=this.index[z],z+=k>>ra&jl,z=this.index[z],z=(z<<na)+(k&Yo),this.data[z];if(k<=1114111)return this.data[this.highValueIndex]}return this.errorValue},j}(),Ha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),po=0;po<Ha.length;po++)fo[Ha.charCodeAt(po)]=po;var Qu=1,$o=2,Li=3,ya=4,Qa=5,ju=7,ks=8,Ns=9,Hs=10,Wl=11,ni=12,Qs=13,Gl=14,js=15,Ku=function(j){for(var k=[],z=0,W=j.length;z<W;){var ce=j.charCodeAt(z++);if(ce>=55296&&ce<=56319&&z<W){var ye=j.charCodeAt(z++);(ye&64512)===56320?k.push(((ce&1023)<<10)+(ye&1023)+65536):(k.push(ce),z--)}else k.push(ce)}return k},zl=function(){for(var j=[],k=0;k<arguments.length;k++)j[k]=arguments[k];if(String.fromCodePoint)return String.fromCodePoint.apply(String,j);var z=j.length;if(!z)return"";for(var W=[],ce=-1,ye="";++ce<z;){var Fe=j[ce];Fe<=65535?W.push(Fe):(Fe-=65536,W.push((Fe>>10)+55296,Fe%1024+56320)),(ce+1===z||W.length>16384)&&(ye+=String.fromCharCode.apply(String,W),W.length=0)}return ye},Vl=co(Ms),gi="\xD7",Ks="\xF7",Wu=function(j){return Vl.get(j)},Gu=function(j,k,z){var W=z-2,ce=k[W],ye=k[z-1],Fe=k[z];if(ye===$o&&Fe===Li)return gi;if(ye===$o||ye===Li||ye===ya)return Ks;if(Fe===$o||Fe===Li||Fe===ya)return Ks;if(ye===ks&&[ks,Ns,Wl,ni].indexOf(Fe)!==-1)return gi;if((ye===Wl||ye===Ns)&&(Fe===Ns||Fe===Hs))return gi;if((ye===ni||ye===Hs)&&Fe===Hs)return gi;if(Fe===Qs||Fe===Qa)return gi;if(Fe===ju)return gi;if(ye===Qu)return gi;if(ye===Qs&&Fe===Gl){for(;ce===Qa;)ce=k[--W];if(ce===Gl)return gi}if(ye===js&&Fe===js){for(var Ge=0;ce===js;)Ge++,ce=k[--W];if(Ge%2===0)return gi}return Ks},ia=function(j){var k=Ku(j),z=k.length,W=0,ce=0,ye=k.map(Wu);return{next:function(){if(W>=z)return{done:!0,value:null};for(var Fe=gi;W<z&&(Fe=Gu(k,ye,++W))===gi;);if(Fe!==gi||W===z){var Ge=zl.apply(null,k.slice(ce,W));return ce=W,{value:Ge,done:!1}}return{done:!0,value:null}}}},mo=function(j){for(var k=ia(j),z=[],W;!(W=k.next()).done;)W.value&&z.push(W.value.slice());return z},Zo=function(j){var k=123;if(j.createRange){var z=j.createRange();if(z.getBoundingClientRect){var W=j.createElement("boundtest");W.style.height=k+"px",W.style.display="block",j.body.appendChild(W),z.selectNode(W);var ce=z.getBoundingClientRect(),ye=Math.round(ce.height);if(j.body.removeChild(W),ye===k)return!0}}return!1},go=function(j){var k=j.createElement("boundtest");k.style.width="50px",k.style.display="block",k.style.fontSize="12px",k.style.letterSpacing="0px",k.style.wordSpacing="0px",j.body.appendChild(k);var z=j.createRange();k.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var W=k.firstChild,ce=E(W.data).map(function(We){return a(We)}),ye=0,Fe={},Ge=ce.every(function(We,it){z.setStart(W,ye),z.setEnd(W,ye+We.length);var ft=z.getBoundingClientRect();ye+=We.length;var _t=ft.x>Fe.x||ft.y>Fe.y;return Fe=ft,it===0?!0:_t});return j.body.removeChild(k),Ge},Qi=function(){return typeof new Image().crossOrigin!="undefined"},zu=function(){return typeof new XMLHttpRequest().responseType=="string"},Vu=function(j){var k=new Image,z=j.createElement("canvas"),W=z.getContext("2d");if(!W)return!1;k.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{W.drawImage(k,0,0),z.toDataURL()}catch(ce){return!1}return!0},ba=function(j){return j[0]===0&&j[1]===255&&j[2]===0&&j[3]===255},Xl=function(j){var k=j.createElement("canvas"),z=100;k.width=z,k.height=z;var W=k.getContext("2d");if(!W)return Promise.reject(!1);W.fillStyle="rgb(0, 255, 0)",W.fillRect(0,0,z,z);var ce=new Image,ye=k.toDataURL();ce.src=ye;var Fe=qo(z,z,0,0,ce);return W.fillStyle="red",W.fillRect(0,0,z,z),Ws(Fe).then(function(Ge){W.drawImage(Ge,0,0);var We=W.getImageData(0,0,z,z).data;W.fillStyle="red",W.fillRect(0,0,z,z);var it=j.createElement("div");return it.style.backgroundImage="url("+ye+")",it.style.height=z+"px",ba(We)?Ws(qo(z,z,0,0,it)):Promise.reject(!1)}).then(function(Ge){return W.drawImage(Ge,0,0),ba(W.getImageData(0,0,z,z).data)}).catch(function(){return!1})},qo=function(j,k,z,W,ce){var ye="http://www.w3.org/2000/svg",Fe=document.createElementNS(ye,"svg"),Ge=document.createElementNS(ye,"foreignObject");return Fe.setAttributeNS(null,"width",j.toString()),Fe.setAttributeNS(null,"height",k.toString()),Ge.setAttributeNS(null,"width","100%"),Ge.setAttributeNS(null,"height","100%"),Ge.setAttributeNS(null,"x",z.toString()),Ge.setAttributeNS(null,"y",W.toString()),Ge.setAttributeNS(null,"externalResourcesRequired","true"),Fe.appendChild(Ge),Ge.appendChild(ce),Fe},Ws=function(j){return new Promise(function(k,z){var W=new Image;W.onload=function(){return k(W)},W.onerror=z,W.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(j))})},Nn={get SUPPORT_RANGE_BOUNDS(){var j=Zo(document);return Object.defineProperty(Nn,"SUPPORT_RANGE_BOUNDS",{value:j}),j},get SUPPORT_WORD_BREAKING(){var j=Nn.SUPPORT_RANGE_BOUNDS&&go(document);return Object.defineProperty(Nn,"SUPPORT_WORD_BREAKING",{value:j}),j},get SUPPORT_SVG_DRAWING(){var j=Vu(document);return Object.defineProperty(Nn,"SUPPORT_SVG_DRAWING",{value:j}),j},get SUPPORT_FOREIGNOBJECT_DRAWING(){var j=typeof Array.from=="function"&&typeof window.fetch=="function"?Xl(document):Promise.resolve(!1);return Object.defineProperty(Nn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:j}),j},get SUPPORT_CORS_IMAGES(){var j=Qi();return Object.defineProperty(Nn,"SUPPORT_CORS_IMAGES",{value:j}),j},get SUPPORT_RESPONSE_TYPE(){var j=zu();return Object.defineProperty(Nn,"SUPPORT_RESPONSE_TYPE",{value:j}),j},get SUPPORT_CORS_XHR(){var j="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Nn,"SUPPORT_CORS_XHR",{value:j}),j},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var j=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Nn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:j}),j}},Di=function(){function j(k,z){this.text=k,this.bounds=z}return j}(),Gs=function(j,k,z,W){var ce=Yl(k,z),ye=[],Fe=0;return ce.forEach(function(Ge){if(z.textDecorationLine.length||Ge.trim().length>0)if(Nn.SUPPORT_RANGE_BOUNDS){var We=es(W,Fe,Ge.length).getClientRects();if(We.length>1){var it=Vs(Ge),ft=0;it.forEach(function(Tt){ye.push(new Di(Tt,R.fromDOMRectList(j,es(W,ft+Fe,Tt.length).getClientRects()))),ft+=Tt.length})}else ye.push(new Di(Ge,R.fromDOMRectList(j,We)))}else{var _t=W.splitText(Ge.length);ye.push(new Di(Ge,zs(j,W))),W=_t}else Nn.SUPPORT_RANGE_BOUNDS||(W=W.splitText(Ge.length));Fe+=Ge.length}),ye},zs=function(j,k){var z=k.ownerDocument;if(z){var W=z.createElement("html2canvaswrapper");W.appendChild(k.cloneNode(!0));var ce=k.parentNode;if(ce){ce.replaceChild(W,k);var ye=b(j,W);return W.firstChild&&ce.replaceChild(W.firstChild,W),ye}}return R.EMPTY},es=function(j,k,z){var W=j.ownerDocument;if(!W)throw new Error("Node has no owner document");var ce=W.createRange();return ce.setStart(j,k),ce.setEnd(j,k+z),ce},Vs=function(j){if(Nn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var k=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(k.segment(j)).map(function(z){return z.segment})}return mo(j)},vo=function(j,k){if(Nn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var z=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(z.segment(j)).map(function(W){return W.segment})}return Jl(j,k)},Yl=function(j,k){return k.letterSpacing!==0?Vs(j):vo(j,k)},Xu=[32,160,4961,65792,65793,4153,4241],Jl=function(j,k){for(var z=Ft(j,{lineBreak:k.lineBreak,wordBreak:k.overflowWrap==="break-word"?"break-word":k.wordBreak}),W=[],ce,ye=function(){if(ce.value){var Fe=ce.value.slice(),Ge=E(Fe),We="";Ge.forEach(function(it){Xu.indexOf(it)===-1?We+=a(it):(We.length&&W.push(We),W.push(a(it)),We="")}),We.length&&W.push(We)}};!(ce=z.next()).done;)ye();return W},ts=function(){function j(k,z,W){this.text=Yu(z.data,W.textTransform),this.textBounds=Gs(k,this.text,W,z)}return j}(),Yu=function(j,k){switch(k){case 1:return j.toLowerCase();case 3:return j.replace(Ju,yo);case 2:return j.toUpperCase();default:return j}},Ju=/(^|\s|:|-|\(|\))([a-z])/g,yo=function(j,k,z){return j.length>0?k+z.toUpperCase():j},Xs=function(j){H(k,j);function k(z,W){var ce=j.call(this,z,W)||this;return ce.src=W.currentSrc||W.src,ce.intrinsicWidth=W.naturalWidth,ce.intrinsicHeight=W.naturalHeight,ce.context.cache.addImage(ce.src),ce}return k}(Bi),Ys=function(j){H(k,j);function k(z,W){var ce=j.call(this,z,W)||this;return ce.canvas=W,ce.intrinsicWidth=W.width,ce.intrinsicHeight=W.height,ce}return k}(Bi),$l=function(j){H(k,j);function k(z,W){var ce=j.call(this,z,W)||this,ye=new XMLSerializer,Fe=b(z,W);return W.setAttribute("width",Fe.width+"px"),W.setAttribute("height",Fe.height+"px"),ce.svg="data:image/svg+xml,"+encodeURIComponent(ye.serializeToString(W)),ce.intrinsicWidth=W.width.baseVal.value,ce.intrinsicHeight=W.height.baseVal.value,ce.context.cache.addImage(ce.svg),ce}return k}(Bi),rs=function(j){H(k,j);function k(z,W){var ce=j.call(this,z,W)||this;return ce.value=W.value,ce}return k}(Bi),ns=function(j){H(k,j);function k(z,W){var ce=j.call(this,z,W)||this;return ce.start=W.start,ce.reversed=typeof W.reversed=="boolean"&&W.reversed===!0,ce}return k}(Bi),$u=[{type:15,flags:0,unit:"px",number:3}],Zl=[{type:16,flags:0,number:50}],ql=function(j){return j.width>j.height?new R(j.left+(j.width-j.height)/2,j.top,j.height,j.height):j.width<j.height?new R(j.left,j.top+(j.height-j.width)/2,j.width,j.width):j},Zu=function(j){var k=j.type===bo?new Array(j.value.length+1).join("\u2022"):j.value;return k.length===0?j.placeholder||"":k},ja="checkbox",aa="radio",bo="password",eu=707406591,is=function(j){H(k,j);function k(z,W){var ce=j.call(this,z,W)||this;ce.type=W.type.toLowerCase(),ce.checked=W.checked,ce.value=Zu(W),(ce.type===ja||ce.type===aa)&&(ce.styles.backgroundColor=3739148031,ce.styles.borderTopColor=ce.styles.borderRightColor=ce.styles.borderBottomColor=ce.styles.borderLeftColor=2779096575,ce.styles.borderTopWidth=ce.styles.borderRightWidth=ce.styles.borderBottomWidth=ce.styles.borderLeftWidth=1,ce.styles.borderTopStyle=ce.styles.borderRightStyle=ce.styles.borderBottomStyle=ce.styles.borderLeftStyle=1,ce.styles.backgroundClip=[0],ce.styles.backgroundOrigin=[0],ce.bounds=ql(ce.bounds));switch(ce.type){case ja:ce.styles.borderTopRightRadius=ce.styles.borderTopLeftRadius=ce.styles.borderBottomRightRadius=ce.styles.borderBottomLeftRadius=$u;break;case aa:ce.styles.borderTopRightRadius=ce.styles.borderTopLeftRadius=ce.styles.borderBottomRightRadius=ce.styles.borderBottomLeftRadius=Zl;break}return ce}return k}(Bi),tu=function(j){H(k,j);function k(z,W){var ce=j.call(this,z,W)||this,ye=W.options[W.selectedIndex||0];return ce.value=ye&&ye.text||"",ce}return k}(Bi),ru=function(j){H(k,j);function k(z,W){var ce=j.call(this,z,W)||this;return ce.value=W.value,ce}return k}(Bi),nu=function(j){H(k,j);function k(z,W){var ce=j.call(this,z,W)||this;ce.src=W.src,ce.width=parseInt(W.width,10)||0,ce.height=parseInt(W.height,10)||0,ce.backgroundColor=ce.styles.backgroundColor;try{if(W.contentWindow&&W.contentWindow.document&&W.contentWindow.document.documentElement){ce.tree=au(z,W.contentWindow.document.documentElement);var ye=W.contentWindow.document.documentElement?ca(z,getComputedStyle(W.contentWindow.document.documentElement).backgroundColor):Si.TRANSPARENT,Fe=W.contentWindow.document.body?ca(z,getComputedStyle(W.contentWindow.document.body).backgroundColor):Si.TRANSPARENT;ce.backgroundColor=Pi(ye)?Pi(Fe)?ce.styles.backgroundColor:Fe:ye}}catch(Ge){}return ce}return k}(Bi),qu=["OL","UL","MENU"],Eo=function(j,k,z,W){for(var ce=k.firstChild,ye=void 0;ce;ce=ye)if(ye=ce.nextSibling,$s(ce)&&ce.data.trim().length>0)z.textNodes.push(new ts(j,ce,z.styles));else if(Ka(ce))if(qs(ce)&&ce.assignedNodes)ce.assignedNodes().forEach(function(Ge){return Eo(j,Ge,z,W)});else{var Fe=iu(j,ce);Fe.styles.isVisible()&&(ou(ce,Fe,W)?Fe.flags|=4:Js(Fe.styles)&&(Fe.flags|=2),qu.indexOf(ce.tagName)!==-1&&(Fe.flags|=8),z.elements.push(Fe),ce.slot,ce.shadowRoot?Eo(j,ce.shadowRoot,Fe,W):!_o(ce)&&!lu(ce)&&!xo(ce)&&Eo(j,ce,Fe,W))}},iu=function(j,k){return Ea(k)?new Xs(j,k):uu(k)?new Ys(j,k):lu(k)?new $l(j,k):su(k)?new rs(j,k):os(k)?new ns(j,k):eA(k)?new is(j,k):xo(k)?new tu(j,k):_o(k)?new ru(j,k):wi(k)?new nu(j,k):new Bi(j,k)},au=function(j,k){var z=iu(j,k);return z.flags|=4,Eo(j,k,z,z),z},ou=function(j,k,z){return k.styles.isPositionedWithZIndex()||k.styles.opacity<1||k.styles.isTransformed()||mn(j)&&z.styles.isTransparent()},Js=function(j){return j.isPositioned()||j.isFloating()},$s=function(j){return j.nodeType===Node.TEXT_NODE},Ka=function(j){return j.nodeType===Node.ELEMENT_NODE},as=function(j){return Ka(j)&&typeof j.style!="undefined"&&!ji(j)},ji=function(j){return typeof j.className=="object"},su=function(j){return j.tagName==="LI"},os=function(j){return j.tagName==="OL"},eA=function(j){return j.tagName==="INPUT"},tA=function(j){return j.tagName==="HTML"},lu=function(j){return j.tagName==="svg"},mn=function(j){return j.tagName==="BODY"},uu=function(j){return j.tagName==="CANVAS"},ss=function(j){return j.tagName==="VIDEO"},Ea=function(j){return j.tagName==="IMG"},wi=function(j){return j.tagName==="IFRAME"},wo=function(j){return j.tagName==="STYLE"},Zs=function(j){return j.tagName==="SCRIPT"},_o=function(j){return j.tagName==="TEXTAREA"},xo=function(j){return j.tagName==="SELECT"},qs=function(j){return j.tagName==="SLOT"},el=function(j){return j.tagName.indexOf("-")>0},Au=function(){function j(){this.counters={}}return j.prototype.getCounterValue=function(k){var z=this.counters[k];return z&&z.length?z[z.length-1]:1},j.prototype.getCounterValues=function(k){var z=this.counters[k];return z||[]},j.prototype.pop=function(k){var z=this;k.forEach(function(W){return z.counters[W].pop()})},j.prototype.parse=function(k){var z=this,W=k.counterIncrement,ce=k.counterReset,ye=!0;W!==null&&W.forEach(function(Ge){var We=z.counters[Ge.counter];We&&Ge.increment!==0&&(ye=!1,We.length||We.push(1),We[Math.max(0,We.length-1)]+=Ge.increment)});var Fe=[];return ye&&ce.forEach(function(Ge){var We=z.counters[Ge.counter];Fe.push(Ge.counter),We||(We=z.counters[Ge.counter]=[]),We.push(Ge.reset)}),Fe},j}(),cu={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},ls={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},hu={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},an={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},wa=function(j,k,z,W,ce,ye){return j<k||j>z?S(j,ce,ye.length>0):W.integers.reduce(function(Fe,Ge,We){for(;j>=Ge;)j-=Ge,Fe+=W.values[We];return Fe},"")+ye},du=function(j,k,z,W){var ce="";do z||j--,ce=W(j)+ce,j/=k;while(j*k>=k);return ce},gn=function(j,k,z,W,ce){var ye=z-k+1;return(j<0?"-":"")+(du(Math.abs(j),ye,W,function(Fe){return a(Math.floor(Fe%ye)+k)})+ce)},_a=function(j,k,z){z===void 0&&(z=". ");var W=k.length;return du(Math.abs(j),W,!1,function(ce){return k[Math.floor(ce%W)]})+z},Ki=1<<0,oa=1<<1,ln=1<<2,Co=1<<3,Wi=function(j,k,z,W,ce,ye){if(j<-9999||j>9999)return S(j,4,ce.length>0);var Fe=Math.abs(j),Ge=ce;if(Fe===0)return k[0]+Ge;for(var We=0;Fe>0&&We<=4;We++){var it=Fe%10;it===0&&kn(ye,Ki)&&Ge!==""?Ge=k[it]+Ge:it>1||it===1&&We===0||it===1&&We===1&&kn(ye,oa)||it===1&&We===1&&kn(ye,ln)&&j>100||it===1&&We>1&&kn(ye,Co)?Ge=k[it]+(We>0?z[We-1]:"")+Ge:it===1&&We>0&&(Ge=z[We-1]+Ge),Fe=Math.floor(Fe/10)}return(j<0?W:"")+Ge},fu="\u5341\u767E\u5343\u842C",To="\u62FE\u4F70\u4EDF\u842C",e="\u30DE\u30A4\u30CA\u30B9",r="\uB9C8\uC774\uB108\uC2A4",S=function(j,k,z){var W=z?". ":"",ce=z?"\u3001":"",ye=z?", ":"",Fe=z?" ":"";switch(k){case 0:return"\u2022"+Fe;case 1:return"\u25E6"+Fe;case 2:return"\u25FE"+Fe;case 5:var Ge=gn(j,48,57,!0,W);return Ge.length<4?"0"+Ge:Ge;case 4:return _a(j,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ce);case 6:return wa(j,1,3999,cu,3,W).toLowerCase();case 7:return wa(j,1,3999,cu,3,W);case 8:return gn(j,945,969,!1,W);case 9:return gn(j,97,122,!1,W);case 10:return gn(j,65,90,!1,W);case 11:return gn(j,1632,1641,!0,W);case 12:case 49:return wa(j,1,9999,ls,3,W);case 35:return wa(j,1,9999,ls,3,W).toLowerCase();case 13:return gn(j,2534,2543,!0,W);case 14:case 30:return gn(j,6112,6121,!0,W);case 15:return _a(j,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",ce);case 16:return _a(j,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",ce);case 17:case 48:return Wi(j,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8CA0",ce,oa|ln|Co);case 47:return Wi(j,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",To,"\u8CA0",ce,Ki|oa|ln|Co);case 42:return Wi(j,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8D1F",ce,oa|ln|Co);case 41:return Wi(j,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",To,"\u8D1F",ce,Ki|oa|ln|Co);case 26:return Wi(j,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",e,ce,0);case 25:return Wi(j,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",e,ce,Ki|oa|ln);case 31:return Wi(j,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",r,ye,Ki|oa|ln);case 33:return Wi(j,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",r,ye,0);case 32:return Wi(j,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",r,ye,Ki|oa|ln);case 18:return gn(j,2406,2415,!0,W);case 20:return wa(j,1,19999,an,3,W);case 21:return gn(j,2790,2799,!0,W);case 22:return gn(j,2662,2671,!0,W);case 22:return wa(j,1,10999,hu,3,W);case 23:return _a(j,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return _a(j,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return gn(j,3302,3311,!0,W);case 28:return _a(j,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",ce);case 29:return _a(j,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",ce);case 34:return gn(j,3792,3801,!0,W);case 37:return gn(j,6160,6169,!0,W);case 38:return gn(j,4160,4169,!0,W);case 39:return gn(j,2918,2927,!0,W);case 40:return gn(j,1776,1785,!0,W);case 43:return gn(j,3046,3055,!0,W);case 44:return gn(j,3174,3183,!0,W);case 45:return gn(j,3664,3673,!0,W);case 46:return gn(j,3872,3881,!0,W);case 3:default:return gn(j,48,57,!0,W)}},x="data-html2canvas-ignore",F=function(){function j(k,z,W){if(this.context=k,this.options=W,this.scrolledElements=[],this.referenceElement=z,this.counters=new Au,this.quoteDepth=0,!z.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(z.ownerDocument.documentElement,!1)}return j.prototype.toIFrame=function(k,z){var W=this,ce=le(k,z);if(!ce.contentWindow)return Promise.reject("Unable to find iframe window");var ye=k.defaultView.pageXOffset,Fe=k.defaultView.pageYOffset,Ge=ce.contentWindow,We=Ge.document,it=Se(ce).then(function(){return Q(W,void 0,void 0,function(){var ft,_t;return M(this,function(Tt){switch(Tt.label){case 0:return this.scrolledElements.forEach(It),Ge&&(Ge.scrollTo(z.left,z.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Ge.scrollY!==z.top||Ge.scrollX!==z.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Ge.scrollX-z.left,Ge.scrollY-z.top,0,0))),ft=this.options.onclone,_t=this.clonedReferenceElement,typeof _t=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:We.fonts&&We.fonts.ready?[4,We.fonts.ready]:[3,2];case 1:Tt.sent(),Tt.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,ve(We)]:[3,4];case 3:Tt.sent(),Tt.label=4;case 4:return typeof ft=="function"?[2,Promise.resolve().then(function(){return ft(We,_t)}).then(function(){return ce})]:[2,ce]}})})});return We.open(),We.write(dt(document.doctype)+"<html></html>"),lt(this.referenceElement.ownerDocument,ye,Fe),We.replaceChild(We.adoptNode(this.documentElement),We.documentElement),We.close(),it},j.prototype.createElementClone=function(k){if(Pa(k,2))debugger;if(uu(k))return this.createCanvasClone(k);if(ss(k))return this.createVideoClone(k);if(wo(k))return this.createStyleClone(k);var z=k.cloneNode(!1);return Ea(z)&&(Ea(k)&&k.currentSrc&&k.currentSrc!==k.src&&(z.src=k.currentSrc,z.srcset=""),z.loading==="lazy"&&(z.loading="eager")),el(z)?this.createCustomElementClone(z):z},j.prototype.createCustomElementClone=function(k){var z=document.createElement("html2canvascustomelement");return Xe(k.style,z),z},j.prototype.createStyleClone=function(k){try{var z=k.sheet;if(z&&z.cssRules){var W=[].slice.call(z.cssRules,0).reduce(function(ye,Fe){return Fe&&typeof Fe.cssText=="string"?ye+Fe.cssText:ye},""),ce=k.cloneNode(!1);return ce.textContent=W,ce}}catch(ye){if(this.context.logger.error("Unable to access cssRules property",ye),ye.name!=="SecurityError")throw ye}return k.cloneNode(!1)},j.prototype.createCanvasClone=function(k){var z;if(this.options.inlineImages&&k.ownerDocument){var W=k.ownerDocument.createElement("img");try{return W.src=k.toDataURL(),W}catch(it){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",k)}}var ce=k.cloneNode(!1);try{ce.width=k.width,ce.height=k.height;var ye=k.getContext("2d"),Fe=ce.getContext("2d");if(Fe)if(!this.options.allowTaint&&ye)Fe.putImageData(ye.getImageData(0,0,k.width,k.height),0,0);else{var Ge=(z=k.getContext("webgl2"))!==null&&z!==void 0?z:k.getContext("webgl");if(Ge){var We=Ge.getContextAttributes();(We==null?void 0:We.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",k)}Fe.drawImage(k,0,0)}return ce}catch(it){this.context.logger.info("Unable to clone canvas as it is tainted",k)}return ce},j.prototype.createVideoClone=function(k){var z=k.ownerDocument.createElement("canvas");z.width=k.offsetWidth,z.height=k.offsetHeight;var W=z.getContext("2d");try{return W&&(W.drawImage(k,0,0,z.width,z.height),this.options.allowTaint||W.getImageData(0,0,z.width,z.height)),z}catch(ye){this.context.logger.info("Unable to clone video as it is tainted",k)}var ce=k.ownerDocument.createElement("canvas");return ce.width=k.offsetWidth,ce.height=k.offsetHeight,ce},j.prototype.appendChildNode=function(k,z,W){(!Ka(z)||!Zs(z)&&!z.hasAttribute(x)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(z)))&&((!this.options.copyStyles||!Ka(z)||!wo(z))&&k.appendChild(this.cloneNode(z,W)))},j.prototype.cloneChildNodes=function(k,z,W){for(var ce=this,ye=k.shadowRoot?k.shadowRoot.firstChild:k.firstChild;ye;ye=ye.nextSibling)if(Ka(ye)&&qs(ye)&&typeof ye.assignedNodes=="function"){var Fe=ye.assignedNodes();Fe.length&&Fe.forEach(function(Ge){return ce.appendChildNode(z,Ge,W)})}else this.appendChildNode(z,ye,W)},j.prototype.cloneNode=function(k,z){if($s(k))return document.createTextNode(k.data);if(!k.ownerDocument)return k.cloneNode(!1);var W=k.ownerDocument.defaultView;if(W&&Ka(k)&&(as(k)||ji(k))){var ce=this.createElementClone(k);ce.style.transitionProperty="none";var ye=W.getComputedStyle(k),Fe=W.getComputedStyle(k,":before"),Ge=W.getComputedStyle(k,":after");this.referenceElement===k&&as(ce)&&(this.clonedReferenceElement=ce),mn(ce)&&Jt(ce);var We=this.counters.parse(new Pl(this.context,ye)),it=this.resolvePseudoContent(k,ce,Fe,Y.BEFORE);el(k)&&(z=!0),ss(k)||this.cloneChildNodes(k,ce,z),it&&ce.insertBefore(it,ce.firstChild);var ft=this.resolvePseudoContent(k,ce,Ge,Y.AFTER);return ft&&ce.appendChild(ft),this.counters.pop(We),(ye&&(this.options.copyStyles||ji(k))&&!wi(k)||z)&&Xe(ye,ce),(k.scrollTop!==0||k.scrollLeft!==0)&&this.scrolledElements.push([ce,k.scrollLeft,k.scrollTop]),(_o(k)||xo(k))&&(_o(ce)||xo(ce))&&(ce.value=k.value),ce}return k.cloneNode(!1)},j.prototype.resolvePseudoContent=function(k,z,W,ce){var ye=this;if(!W)return;var Fe=W.content,Ge=z.ownerDocument;if(!Ge||!Fe||Fe==="none"||Fe==="-moz-alt-content"||W.display==="none")return;this.counters.parse(new Pl(this.context,W));var We=new Nu(this.context,W),it=Ge.createElement("html2canvaspseudoelement");Xe(W,it),We.content.forEach(function(_t){if(_t.type===0)it.appendChild(Ge.createTextNode(_t.value));else if(_t.type===22){var Tt=Ge.createElement("img");Tt.src=_t.value,Tt.style.opacity="1",it.appendChild(Tt)}else if(_t.type===18){if(_t.name==="attr"){var tr=_t.values.filter(fn);tr.length&&it.appendChild(Ge.createTextNode(k.getAttribute(tr[0].value)||""))}else if(_t.name==="counter"){var kt=_t.values.filter(Xi),Vt=kt[0],Sr=kt[1];if(Vt&&fn(Vt)){var qt=ye.counters.getCounterValue(Vt.value),nr=Sr&&fn(Sr)?va.parse(ye.context,Sr.value):3;it.appendChild(Ge.createTextNode(S(qt,nr,!1)))}}else if(_t.name==="counters"){var qr=_t.values.filter(Xi),Vt=qr[0],Nr=qr[1],Sr=qr[2];if(Vt&&fn(Vt)){var un=ye.counters.getCounterValues(Vt.value),rr=Sr&&fn(Sr)?va.parse(ye.context,Sr.value):3,on=Nr&&Nr.type===0?Nr.value:"",An=un.map(function(yi){return S(yi,rr,!1)}).join(on);it.appendChild(Ge.createTextNode(An))}}}else if(_t.type===20)switch(_t.value){case"open-quote":it.appendChild(Ge.createTextNode(Ml(We.quotes,ye.quoteDepth++,!0)));break;case"close-quote":it.appendChild(Ge.createTextNode(Ml(We.quotes,--ye.quoteDepth,!1)));break;default:it.appendChild(Ge.createTextNode(_t.value))}}),it.className=Ht+" "+Wt;var ft=ce===Y.BEFORE?" "+Ht:" "+Wt;return ji(z)?z.className.baseValue+=ft:z.className+=ft,it},j.destroy=function(k){return k.parentNode?(k.parentNode.removeChild(k),!0):!1},j}(),Y;(function(j){j[j.BEFORE=0]="BEFORE",j[j.AFTER=1]="AFTER"})(Y||(Y={}));var le=function(j,k){var z=j.createElement("iframe");return z.className="html2canvas-container",z.style.visibility="hidden",z.style.position="fixed",z.style.left="-10000px",z.style.top="0px",z.style.border="0",z.width=k.width.toString(),z.height=k.height.toString(),z.scrolling="no",z.setAttribute(x,"true"),j.body.appendChild(z),z},pe=function(j){return new Promise(function(k){if(j.complete){k();return}if(!j.src){k();return}j.onload=k,j.onerror=k})},ve=function(j){return Promise.all([].slice.call(j.images,0).map(pe))},Se=function(j){return new Promise(function(k,z){var W=j.contentWindow;if(!W)return z("No window assigned for iframe");var ce=W.document;W.onload=j.onload=function(){W.onload=j.onload=null;var ye=setInterval(function(){ce.body.childNodes.length>0&&ce.readyState==="complete"&&(clearInterval(ye),k(j))},50)}})},ze=["all","d","content"],Xe=function(j,k){for(var z=j.length-1;z>=0;z--){var W=j.item(z);ze.indexOf(W)===-1&&k.style.setProperty(W,j.getPropertyValue(W))}return k},dt=function(j){var k="";return j&&(k+="<!DOCTYPE ",j.name&&(k+=j.name),j.internalSubset&&(k+=j.internalSubset),j.publicId&&(k+='"'+j.publicId+'"'),j.systemId&&(k+='"'+j.systemId+'"'),k+=">"),k},lt=function(j,k,z){j&&j.defaultView&&(k!==j.defaultView.pageXOffset||z!==j.defaultView.pageYOffset)&&j.defaultView.scrollTo(k,z)},It=function(j){var k=j[0],z=j[1],W=j[2];k.scrollLeft=z,k.scrollTop=W},Mt=":before",Pt=":after",Ht="___html2canvas___pseudoelement_before",Wt="___html2canvas___pseudoelement_after",Qt=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,Jt=function(j){pr(j,"."+Ht+Mt+Qt+`
|
|
.`+Wt+Pt+Qt)},pr=function(j,k){var z=j.ownerDocument;if(z){var W=z.createElement("style");W.textContent=k,j.appendChild(W)}},ur=function(){function j(){}return j.getOrigin=function(k){var z=j._link;return z?(z.href=k,z.href=z.href,z.protocol+z.hostname+z.port):"about:blank"},j.isSameOrigin=function(k){return j.getOrigin(k)===j._origin},j.setContext=function(k){j._link=k.document.createElement("a"),j._origin=j.getOrigin(k.location.href)},j._origin="about:blank",j}(),Lr=function(){function j(k,z){this.context=k,this._options=z,this._cache={}}return j.prototype.addImage=function(k){var z=Promise.resolve();return this.has(k)||(ei(k)||di(k))&&(this._cache[k]=this.loadImage(k)).catch(function(){}),z},j.prototype.match=function(k){return this._cache[k]},j.prototype.loadImage=function(k){return Q(this,void 0,void 0,function(){var z,W,ce,ye,Fe=this;return M(this,function(Ge){switch(Ge.label){case 0:return z=ur.isSameOrigin(k),W=!qn(k)&&this._options.useCORS===!0&&Nn.SUPPORT_CORS_IMAGES&&!z,ce=!qn(k)&&!z&&!ei(k)&&typeof this._options.proxy=="string"&&Nn.SUPPORT_CORS_XHR&&!W,!z&&this._options.allowTaint===!1&&!qn(k)&&!ei(k)&&!ce&&!W?[2]:(ye=k,ce?[4,this.proxy(ye)]:[3,2]);case 1:ye=Ge.sent(),Ge.label=2;case 2:return this.context.logger.debug("Added image "+k.substring(0,256)),[4,new Promise(function(We,it){var ft=new Image;ft.onload=function(){return We(ft)},ft.onerror=it,(Ln(ye)||W)&&(ft.crossOrigin="anonymous"),ft.src=ye,ft.complete===!0&&setTimeout(function(){return We(ft)},500),Fe._options.imageTimeout>0&&setTimeout(function(){return it("Timed out ("+Fe._options.imageTimeout+"ms) loading image")},Fe._options.imageTimeout)})];case 3:return[2,Ge.sent()]}})})},j.prototype.has=function(k){return typeof this._cache[k]!="undefined"},j.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},j.prototype.proxy=function(k){var z=this,W=this._options.proxy;if(!W)throw new Error("No proxy defined");var ce=k.substring(0,256);return new Promise(function(ye,Fe){var Ge=Nn.SUPPORT_RESPONSE_TYPE?"blob":"text",We=new XMLHttpRequest;We.onload=function(){if(We.status===200)if(Ge==="text")ye(We.response);else{var _t=new FileReader;_t.addEventListener("load",function(){return ye(_t.result)},!1),_t.addEventListener("error",function(Tt){return Fe(Tt)},!1),_t.readAsDataURL(We.response)}else Fe("Failed to proxy resource "+ce+" with status code "+We.status)},We.onerror=Fe;var it=W.indexOf("?")>-1?"&":"?";if(We.open("GET",""+W+it+"url="+encodeURIComponent(k)+"&responseType="+Ge),Ge!=="text"&&We instanceof XMLHttpRequest&&(We.responseType=Ge),z._options.imageTimeout){var ft=z._options.imageTimeout;We.timeout=ft,We.ontimeout=function(){return Fe("Timed out ("+ft+"ms) proxying "+ce)}}We.send()})},j}(),pn=/^data:image\/svg\+xml/i,Wn=/^data:image\/.*;base64,/i,Cn=/^data:image\/.*/i,di=function(j){return Nn.SUPPORT_SVG_DRAWING||!Xn(j)},qn=function(j){return Cn.test(j)},Ln=function(j){return Wn.test(j)},ei=function(j){return j.substr(0,4)==="blob"},Xn=function(j){return j.substr(-3).toLowerCase()==="svg"||pn.test(j)},Nt=function(){function j(k,z){this.type=0,this.x=k,this.y=z}return j.prototype.add=function(k,z){return new j(this.x+k,this.y+z)},j}(),vn=function(j,k,z){return new Nt(j.x+(k.x-j.x)*z,j.y+(k.y-j.y)*z)},yn=function(){function j(k,z,W,ce){this.type=1,this.start=k,this.startControl=z,this.endControl=W,this.end=ce}return j.prototype.subdivide=function(k,z){var W=vn(this.start,this.startControl,k),ce=vn(this.startControl,this.endControl,k),ye=vn(this.endControl,this.end,k),Fe=vn(W,ce,k),Ge=vn(ce,ye,k),We=vn(Fe,Ge,k);return z?new j(this.start,W,Fe,We):new j(We,Ge,ye,this.end)},j.prototype.add=function(k,z){return new j(this.start.add(k,z),this.startControl.add(k,z),this.endControl.add(k,z),this.end.add(k,z))},j.prototype.reverse=function(){return new j(this.end,this.endControl,this.startControl,this.start)},j}(),bn=function(j){return j.type===1},Wa=function(){function j(k){var z=k.styles,W=k.bounds,ce=Aa(z.borderTopLeftRadius,W.width,W.height),ye=ce[0],Fe=ce[1],Ge=Aa(z.borderTopRightRadius,W.width,W.height),We=Ge[0],it=Ge[1],ft=Aa(z.borderBottomRightRadius,W.width,W.height),_t=ft[0],Tt=ft[1],tr=Aa(z.borderBottomLeftRadius,W.width,W.height),kt=tr[0],Vt=tr[1],Sr=[];Sr.push((ye+We)/W.width),Sr.push((kt+_t)/W.width),Sr.push((Fe+Vt)/W.height),Sr.push((it+Tt)/W.height);var qt=Math.max.apply(Math,Sr);qt>1&&(ye/=qt,Fe/=qt,We/=qt,it/=qt,_t/=qt,Tt/=qt,kt/=qt,Vt/=qt);var nr=W.width-We,qr=W.height-Tt,Nr=W.width-_t,un=W.height-Vt,rr=z.borderTopWidth,on=z.borderRightWidth,An=z.borderBottomWidth,kr=z.borderLeftWidth,_i=tn(z.paddingTop,k.bounds.width),yi=tn(z.paddingRight,k.bounds.width),Oi=tn(z.paddingBottom,k.bounds.width),ai=tn(z.paddingLeft,k.bounds.width);this.topLeftBorderDoubleOuterBox=ye>0||Fe>0?Pr(W.left+kr/3,W.top+rr/3,ye-kr/3,Fe-rr/3,Qr.TOP_LEFT):new Nt(W.left+kr/3,W.top+rr/3),this.topRightBorderDoubleOuterBox=ye>0||Fe>0?Pr(W.left+nr,W.top+rr/3,We-on/3,it-rr/3,Qr.TOP_RIGHT):new Nt(W.left+W.width-on/3,W.top+rr/3),this.bottomRightBorderDoubleOuterBox=_t>0||Tt>0?Pr(W.left+Nr,W.top+qr,_t-on/3,Tt-An/3,Qr.BOTTOM_RIGHT):new Nt(W.left+W.width-on/3,W.top+W.height-An/3),this.bottomLeftBorderDoubleOuterBox=kt>0||Vt>0?Pr(W.left+kr/3,W.top+un,kt-kr/3,Vt-An/3,Qr.BOTTOM_LEFT):new Nt(W.left+kr/3,W.top+W.height-An/3),this.topLeftBorderDoubleInnerBox=ye>0||Fe>0?Pr(W.left+kr*2/3,W.top+rr*2/3,ye-kr*2/3,Fe-rr*2/3,Qr.TOP_LEFT):new Nt(W.left+kr*2/3,W.top+rr*2/3),this.topRightBorderDoubleInnerBox=ye>0||Fe>0?Pr(W.left+nr,W.top+rr*2/3,We-on*2/3,it-rr*2/3,Qr.TOP_RIGHT):new Nt(W.left+W.width-on*2/3,W.top+rr*2/3),this.bottomRightBorderDoubleInnerBox=_t>0||Tt>0?Pr(W.left+Nr,W.top+qr,_t-on*2/3,Tt-An*2/3,Qr.BOTTOM_RIGHT):new Nt(W.left+W.width-on*2/3,W.top+W.height-An*2/3),this.bottomLeftBorderDoubleInnerBox=kt>0||Vt>0?Pr(W.left+kr*2/3,W.top+un,kt-kr*2/3,Vt-An*2/3,Qr.BOTTOM_LEFT):new Nt(W.left+kr*2/3,W.top+W.height-An*2/3),this.topLeftBorderStroke=ye>0||Fe>0?Pr(W.left+kr/2,W.top+rr/2,ye-kr/2,Fe-rr/2,Qr.TOP_LEFT):new Nt(W.left+kr/2,W.top+rr/2),this.topRightBorderStroke=ye>0||Fe>0?Pr(W.left+nr,W.top+rr/2,We-on/2,it-rr/2,Qr.TOP_RIGHT):new Nt(W.left+W.width-on/2,W.top+rr/2),this.bottomRightBorderStroke=_t>0||Tt>0?Pr(W.left+Nr,W.top+qr,_t-on/2,Tt-An/2,Qr.BOTTOM_RIGHT):new Nt(W.left+W.width-on/2,W.top+W.height-An/2),this.bottomLeftBorderStroke=kt>0||Vt>0?Pr(W.left+kr/2,W.top+un,kt-kr/2,Vt-An/2,Qr.BOTTOM_LEFT):new Nt(W.left+kr/2,W.top+W.height-An/2),this.topLeftBorderBox=ye>0||Fe>0?Pr(W.left,W.top,ye,Fe,Qr.TOP_LEFT):new Nt(W.left,W.top),this.topRightBorderBox=We>0||it>0?Pr(W.left+nr,W.top,We,it,Qr.TOP_RIGHT):new Nt(W.left+W.width,W.top),this.bottomRightBorderBox=_t>0||Tt>0?Pr(W.left+Nr,W.top+qr,_t,Tt,Qr.BOTTOM_RIGHT):new Nt(W.left+W.width,W.top+W.height),this.bottomLeftBorderBox=kt>0||Vt>0?Pr(W.left,W.top+un,kt,Vt,Qr.BOTTOM_LEFT):new Nt(W.left,W.top+W.height),this.topLeftPaddingBox=ye>0||Fe>0?Pr(W.left+kr,W.top+rr,Math.max(0,ye-kr),Math.max(0,Fe-rr),Qr.TOP_LEFT):new Nt(W.left+kr,W.top+rr),this.topRightPaddingBox=We>0||it>0?Pr(W.left+Math.min(nr,W.width-on),W.top+rr,nr>W.width+on?0:Math.max(0,We-on),Math.max(0,it-rr),Qr.TOP_RIGHT):new Nt(W.left+W.width-on,W.top+rr),this.bottomRightPaddingBox=_t>0||Tt>0?Pr(W.left+Math.min(Nr,W.width-kr),W.top+Math.min(qr,W.height-An),Math.max(0,_t-on),Math.max(0,Tt-An),Qr.BOTTOM_RIGHT):new Nt(W.left+W.width-on,W.top+W.height-An),this.bottomLeftPaddingBox=kt>0||Vt>0?Pr(W.left+kr,W.top+Math.min(un,W.height-An),Math.max(0,kt-kr),Math.max(0,Vt-An),Qr.BOTTOM_LEFT):new Nt(W.left+kr,W.top+W.height-An),this.topLeftContentBox=ye>0||Fe>0?Pr(W.left+kr+ai,W.top+rr+_i,Math.max(0,ye-(kr+ai)),Math.max(0,Fe-(rr+_i)),Qr.TOP_LEFT):new Nt(W.left+kr+ai,W.top+rr+_i),this.topRightContentBox=We>0||it>0?Pr(W.left+Math.min(nr,W.width+kr+ai),W.top+rr+_i,nr>W.width+kr+ai?0:We-kr+ai,it-(rr+_i),Qr.TOP_RIGHT):new Nt(W.left+W.width-(on+yi),W.top+rr+_i),this.bottomRightContentBox=_t>0||Tt>0?Pr(W.left+Math.min(Nr,W.width-(kr+ai)),W.top+Math.min(qr,W.height+rr+_i),Math.max(0,_t-(on+yi)),Tt-(An+Oi),Qr.BOTTOM_RIGHT):new Nt(W.left+W.width-(on+yi),W.top+W.height-(An+Oi)),this.bottomLeftContentBox=kt>0||Vt>0?Pr(W.left+kr+ai,W.top+un,Math.max(0,kt-(kr+ai)),Vt-(An+Oi),Qr.BOTTOM_LEFT):new Nt(W.left+kr+ai,W.top+W.height-(An+Oi))}return j}(),Qr;(function(j){j[j.TOP_LEFT=0]="TOP_LEFT",j[j.TOP_RIGHT=1]="TOP_RIGHT",j[j.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",j[j.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Qr||(Qr={}));var Pr=function(j,k,z,W,ce){var ye=4*((Math.sqrt(2)-1)/3),Fe=z*ye,Ge=W*ye,We=j+z,it=k+W;switch(ce){case Qr.TOP_LEFT:return new yn(new Nt(j,it),new Nt(j,it-Ge),new Nt(We-Fe,k),new Nt(We,k));case Qr.TOP_RIGHT:return new yn(new Nt(j,k),new Nt(j+Fe,k),new Nt(We,it-Ge),new Nt(We,it));case Qr.BOTTOM_RIGHT:return new yn(new Nt(We,k),new Nt(We,k+Ge),new Nt(j+Fe,it),new Nt(j,it));case Qr.BOTTOM_LEFT:default:return new yn(new Nt(We,it),new Nt(We-Fe,it),new Nt(j,k+Ge),new Nt(j,k))}},vi=function(j){return[j.topLeftBorderBox,j.topRightBorderBox,j.bottomRightBorderBox,j.bottomLeftBorderBox]},Gn=function(j){return[j.topLeftContentBox,j.topRightContentBox,j.bottomRightContentBox,j.bottomLeftContentBox]},Ga=function(j){return[j.topLeftPaddingBox,j.topRightPaddingBox,j.bottomRightPaddingBox,j.bottomLeftPaddingBox]},Gi=function(){function j(k,z,W){this.offsetX=k,this.offsetY=z,this.matrix=W,this.type=0,this.target=2|4}return j}(),Mi=function(){function j(k,z){this.path=k,this.target=z,this.type=1}return j}(),xa=function(){function j(k){this.opacity=k,this.type=2,this.target=2|4}return j}(),ii=function(j){return j.type===0},Ca=function(j){return j.type===1},tl=function(j){return j.type===2},iA=function(j,k){return j.length===k.length?j.some(function(z,W){return z===k[W]}):!1},hA=function(j,k,z,W,ce){return j.map(function(ye,Fe){switch(Fe){case 0:return ye.add(k,z);case 1:return ye.add(k+W,z);case 2:return ye.add(k+W,z+ce);case 3:return ye.add(k,z+ce)}return ye})},aA=function(){function j(k){this.element=k,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return j}(),oA=function(){function j(k,z){if(this.container=k,this.parent=z,this.effects=[],this.curves=new Wa(this.container),this.container.styles.opacity<1&&this.effects.push(new xa(this.container.styles.opacity)),this.container.styles.transform!==null){var W=this.container.bounds.left+this.container.styles.transformOrigin[0].number,ce=this.container.bounds.top+this.container.styles.transformOrigin[1].number,ye=this.container.styles.transform;this.effects.push(new Gi(W,ce,ye))}if(this.container.styles.overflowX!==0){var Fe=vi(this.curves),Ge=Ga(this.curves);iA(Fe,Ge)?this.effects.push(new Mi(Fe,2|4)):(this.effects.push(new Mi(Fe,2)),this.effects.push(new Mi(Ge,4)))}}return j.prototype.getEffects=function(k){for(var z=[2,3].indexOf(this.container.styles.position)===-1,W=this.parent,ce=this.effects.slice(0);W;){var ye=W.effects.filter(function(We){return!Ca(We)});if(z||W.container.styles.position!==0||!W.parent){if(ce.unshift.apply(ce,ye),z=[2,3].indexOf(W.container.styles.position)===-1,W.container.styles.overflowX!==0){var Fe=vi(W.curves),Ge=Ga(W.curves);iA(Fe,Ge)||ce.unshift(new Mi(Ge,2|4))}}else ce.unshift.apply(ce,ye);W=W.parent}return ce.filter(function(We){return kn(We.target,k)})},j}(),rA=function(j,k,z,W){j.container.elements.forEach(function(ce){var ye=kn(ce.flags,4),Fe=kn(ce.flags,2),Ge=new oA(ce,j);kn(ce.styles.display,2048)&&W.push(Ge);var We=kn(ce.flags,8)?[]:W;if(ye||Fe){var it=ye||ce.styles.isPositioned()?z:k,ft=new aA(Ge);if(ce.styles.isPositioned()||ce.styles.opacity<1||ce.styles.isTransformed()){var _t=ce.styles.zIndex.order;if(_t<0){var Tt=0;it.negativeZIndex.some(function(kt,Vt){return _t>kt.element.container.styles.zIndex.order?(Tt=Vt,!1):Tt>0}),it.negativeZIndex.splice(Tt,0,ft)}else if(_t>0){var tr=0;it.positiveZIndex.some(function(kt,Vt){return _t>=kt.element.container.styles.zIndex.order?(tr=Vt+1,!1):tr>0}),it.positiveZIndex.splice(tr,0,ft)}else it.zeroOrAutoZIndexOrTransformedOrOpacity.push(ft)}else ce.styles.isFloating()?it.nonPositionedFloats.push(ft):it.nonPositionedInlineLevel.push(ft);rA(Ge,ft,ye?ft:z,We)}else ce.styles.isInlineLevel()?k.inlineLevel.push(Ge):k.nonInlineLevel.push(Ge),rA(Ge,k,z,We);kn(ce.flags,8)&&sA(ce,We)})},sA=function(j,k){for(var z=j instanceof ns?j.start:1,W=j instanceof ns?j.reversed:!1,ce=0;ce<k.length;ce++){var ye=k[ce];ye.container instanceof rs&&typeof ye.container.value=="number"&&ye.container.value!==0&&(z=ye.container.value),ye.listValue=S(z,ye.container.styles.listStyleType,!0),z+=W?-1:1}},dA=function(j){var k=new oA(j,null),z=new aA(k),W=[];return rA(k,z,z,W),sA(k.container,W),z},lA=function(j,k){switch(k){case 0:return Fi(j.topLeftBorderBox,j.topLeftPaddingBox,j.topRightBorderBox,j.topRightPaddingBox);case 1:return Fi(j.topRightBorderBox,j.topRightPaddingBox,j.bottomRightBorderBox,j.bottomRightPaddingBox);case 2:return Fi(j.bottomRightBorderBox,j.bottomRightPaddingBox,j.bottomLeftBorderBox,j.bottomLeftPaddingBox);case 3:default:return Fi(j.bottomLeftBorderBox,j.bottomLeftPaddingBox,j.topLeftBorderBox,j.topLeftPaddingBox)}},fA=function(j,k){switch(k){case 0:return Fi(j.topLeftBorderBox,j.topLeftBorderDoubleOuterBox,j.topRightBorderBox,j.topRightBorderDoubleOuterBox);case 1:return Fi(j.topRightBorderBox,j.topRightBorderDoubleOuterBox,j.bottomRightBorderBox,j.bottomRightBorderDoubleOuterBox);case 2:return Fi(j.bottomRightBorderBox,j.bottomRightBorderDoubleOuterBox,j.bottomLeftBorderBox,j.bottomLeftBorderDoubleOuterBox);case 3:default:return Fi(j.bottomLeftBorderBox,j.bottomLeftBorderDoubleOuterBox,j.topLeftBorderBox,j.topLeftBorderDoubleOuterBox)}},pA=function(j,k){switch(k){case 0:return Fi(j.topLeftBorderDoubleInnerBox,j.topLeftPaddingBox,j.topRightBorderDoubleInnerBox,j.topRightPaddingBox);case 1:return Fi(j.topRightBorderDoubleInnerBox,j.topRightPaddingBox,j.bottomRightBorderDoubleInnerBox,j.bottomRightPaddingBox);case 2:return Fi(j.bottomRightBorderDoubleInnerBox,j.bottomRightPaddingBox,j.bottomLeftBorderDoubleInnerBox,j.bottomLeftPaddingBox);case 3:default:return Fi(j.bottomLeftBorderDoubleInnerBox,j.bottomLeftPaddingBox,j.topLeftBorderDoubleInnerBox,j.topLeftPaddingBox)}},mA=function(j,k){switch(k){case 0:return pu(j.topLeftBorderStroke,j.topRightBorderStroke);case 1:return pu(j.topRightBorderStroke,j.bottomRightBorderStroke);case 2:return pu(j.bottomRightBorderStroke,j.bottomLeftBorderStroke);case 3:default:return pu(j.bottomLeftBorderStroke,j.topLeftBorderStroke)}},pu=function(j,k){var z=[];return bn(j)?z.push(j.subdivide(.5,!1)):z.push(j),bn(k)?z.push(k.subdivide(.5,!0)):z.push(k),z},Fi=function(j,k,z,W){var ce=[];return bn(j)?ce.push(j.subdivide(.5,!1)):ce.push(j),bn(z)?ce.push(z.subdivide(.5,!0)):ce.push(z),bn(W)?ce.push(W.subdivide(.5,!0).reverse()):ce.push(W),bn(k)?ce.push(k.subdivide(.5,!1).reverse()):ce.push(k),ce},uA=function(j){var k=j.bounds,z=j.styles;return k.add(z.borderLeftWidth,z.borderTopWidth,-(z.borderRightWidth+z.borderLeftWidth),-(z.borderTopWidth+z.borderBottomWidth))},mu=function(j){var k=j.styles,z=j.bounds,W=tn(k.paddingLeft,z.width),ce=tn(k.paddingRight,z.width),ye=tn(k.paddingTop,z.width),Fe=tn(k.paddingBottom,z.width);return z.add(W+k.borderLeftWidth,ye+k.borderTopWidth,-(k.borderRightWidth+k.borderLeftWidth+W+ce),-(k.borderTopWidth+k.borderBottomWidth+ye+Fe))},gA=function(j,k){return j===0?k.bounds:j===2?mu(k):uA(k)},vA=function(j,k){return j===0?k.bounds:j===2?mu(k):uA(k)},nA=function(j,k,z){var W=gA(As(j.styles.backgroundOrigin,k),j),ce=vA(As(j.styles.backgroundClip,k),j),ye=yA(As(j.styles.backgroundSize,k),z,W),Fe=ye[0],Ge=ye[1],We=Aa(As(j.styles.backgroundPosition,k),W.width-Fe,W.height-Ge),it=bA(As(j.styles.backgroundRepeat,k),We,ye,W,ce),ft=Math.round(W.left+We[0]),_t=Math.round(W.top+We[1]);return[it,ft,_t,Fe,Ge]},us=function(j){return fn(j)&&j.value===da.AUTO},gu=function(j){return typeof j=="number"},yA=function(j,k,z){var W=k[0],ce=k[1],ye=k[2],Fe=j[0],Ge=j[1];if(!Fe)return[0,0];if(On(Fe)&&Ge&&On(Ge))return[tn(Fe,z.width),tn(Ge,z.height)];var We=gu(ye);if(fn(Fe)&&(Fe.value===da.CONTAIN||Fe.value===da.COVER)){if(gu(ye)){var it=z.width/z.height;return it<ye!==(Fe.value===da.COVER)?[z.width,z.width/ye]:[z.height*ye,z.height]}return[z.width,z.height]}var ft=gu(W),_t=gu(ce),Tt=ft||_t;if(us(Fe)&&(!Ge||us(Ge))){if(ft&&_t)return[W,ce];if(!We&&!Tt)return[z.width,z.height];if(Tt&&We){var tr=ft?W:ce*ye,kt=_t?ce:W/ye;return[tr,kt]}var Vt=ft?W:z.width,Sr=_t?ce:z.height;return[Vt,Sr]}if(We){var qt=0,nr=0;return On(Fe)?qt=tn(Fe,z.width):On(Ge)&&(nr=tn(Ge,z.height)),us(Fe)?qt=nr*ye:(!Ge||us(Ge))&&(nr=qt/ye),[qt,nr]}var qr=null,Nr=null;if(On(Fe)?qr=tn(Fe,z.width):Ge&&On(Ge)&&(Nr=tn(Ge,z.height)),qr!==null&&(!Ge||us(Ge))&&(Nr=ft&&_t?qr/W*ce:z.height),Nr!==null&&us(Fe)&&(qr=ft&&_t?Nr/ce*W:z.width),qr!==null&&Nr!==null)return[qr,Nr];throw new Error("Unable to calculate background-size for element")},As=function(j,k){var z=j[k];return typeof z=="undefined"?j[0]:z},bA=function(j,k,z,W,ce){var ye=k[0],Fe=k[1],Ge=z[0],We=z[1];switch(j){case 2:return[new Nt(Math.round(W.left),Math.round(W.top+Fe)),new Nt(Math.round(W.left+W.width),Math.round(W.top+Fe)),new Nt(Math.round(W.left+W.width),Math.round(We+W.top+Fe)),new Nt(Math.round(W.left),Math.round(We+W.top+Fe))];case 3:return[new Nt(Math.round(W.left+ye),Math.round(W.top)),new Nt(Math.round(W.left+ye+Ge),Math.round(W.top)),new Nt(Math.round(W.left+ye+Ge),Math.round(W.height+W.top)),new Nt(Math.round(W.left+ye),Math.round(W.height+W.top))];case 1:return[new Nt(Math.round(W.left+ye),Math.round(W.top+Fe)),new Nt(Math.round(W.left+ye+Ge),Math.round(W.top+Fe)),new Nt(Math.round(W.left+ye+Ge),Math.round(W.top+Fe+We)),new Nt(Math.round(W.left+ye),Math.round(W.top+Fe+We))];default:return[new Nt(Math.round(ce.left),Math.round(ce.top)),new Nt(Math.round(ce.left+ce.width),Math.round(ce.top)),new Nt(Math.round(ce.left+ce.width),Math.round(ce.height+ce.top)),new Nt(Math.round(ce.left),Math.round(ce.height+ce.top))]}},EA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",AA="Hidden Text",wA=function(){function j(k){this._data={},this._document=k}return j.prototype.parseMetrics=function(k,z){var W=this._document.createElement("div"),ce=this._document.createElement("img"),ye=this._document.createElement("span"),Fe=this._document.body;W.style.visibility="hidden",W.style.fontFamily=k,W.style.fontSize=z,W.style.margin="0",W.style.padding="0",W.style.whiteSpace="nowrap",Fe.appendChild(W),ce.src=EA,ce.width=1,ce.height=1,ce.style.margin="0",ce.style.padding="0",ce.style.verticalAlign="baseline",ye.style.fontFamily=k,ye.style.fontSize=z,ye.style.margin="0",ye.style.padding="0",ye.appendChild(this._document.createTextNode(AA)),W.appendChild(ye),W.appendChild(ce);var Ge=ce.offsetTop-ye.offsetTop+2;W.removeChild(ye),W.appendChild(this._document.createTextNode(AA)),W.style.lineHeight="normal",ce.style.verticalAlign="super";var We=ce.offsetTop-W.offsetTop+2;return Fe.removeChild(W),{baseline:Ge,middle:We}},j.prototype.getMetrics=function(k,z){var W=k+" "+z;return typeof this._data[W]=="undefined"&&(this._data[W]=this.parseMetrics(k,z)),this._data[W]},j}(),cA=function(){function j(k,z){this.context=k,this.options=z}return j}(),_A=1e4,xA=function(j){H(k,j);function k(z,W){var ce=j.call(this,z,W)||this;return ce._activeEffects=[],ce.canvas=W.canvas?W.canvas:document.createElement("canvas"),ce.ctx=ce.canvas.getContext("2d"),W.canvas||(ce.canvas.width=Math.floor(W.width*W.scale),ce.canvas.height=Math.floor(W.height*W.scale),ce.canvas.style.width=W.width+"px",ce.canvas.style.height=W.height+"px"),ce.fontMetrics=new wA(document),ce.ctx.scale(ce.options.scale,ce.options.scale),ce.ctx.translate(-W.x,-W.y),ce.ctx.textBaseline="bottom",ce._activeEffects=[],ce.context.logger.debug("Canvas renderer initialized ("+W.width+"x"+W.height+") with scale "+W.scale),ce}return k.prototype.applyEffects=function(z){for(var W=this;this._activeEffects.length;)this.popEffect();z.forEach(function(ce){return W.applyEffect(ce)})},k.prototype.applyEffect=function(z){this.ctx.save(),tl(z)&&(this.ctx.globalAlpha=z.opacity),ii(z)&&(this.ctx.translate(z.offsetX,z.offsetY),this.ctx.transform(z.matrix[0],z.matrix[1],z.matrix[2],z.matrix[3],z.matrix[4],z.matrix[5]),this.ctx.translate(-z.offsetX,-z.offsetY)),Ca(z)&&(this.path(z.path),this.ctx.clip()),this._activeEffects.push(z)},k.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},k.prototype.renderStack=function(z){return Q(this,void 0,void 0,function(){var W;return M(this,function(ce){switch(ce.label){case 0:return W=z.element.container.styles,W.isVisible()?[4,this.renderStackContent(z)]:[3,2];case 1:ce.sent(),ce.label=2;case 2:return[2]}})})},k.prototype.renderNode=function(z){return Q(this,void 0,void 0,function(){return M(this,function(W){switch(W.label){case 0:if(kn(z.container.flags,16))debugger;return z.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(z)]:[3,3];case 1:return W.sent(),[4,this.renderNodeContent(z)];case 2:W.sent(),W.label=3;case 3:return[2]}})})},k.prototype.renderTextWithLetterSpacing=function(z,W,ce){var ye=this;if(W===0)this.ctx.fillText(z.text,z.bounds.left,z.bounds.top+ce);else{var Fe=Vs(z.text);Fe.reduce(function(Ge,We){return ye.ctx.fillText(We,Ge,z.bounds.top+ce),Ge+ye.ctx.measureText(We).width},z.bounds.left)}},k.prototype.createFontStyle=function(z){var W=z.fontVariant.filter(function(Fe){return Fe==="normal"||Fe==="small-caps"}).join(""),ce=OA(z.fontFamily).join(", "),ye=Ba(z.fontSize)?""+z.fontSize.number+z.fontSize.unit:z.fontSize.number+"px";return[[z.fontStyle,W,z.fontWeight,ye,ce].join(" "),ce,ye]},k.prototype.renderTextNode=function(z,W){return Q(this,void 0,void 0,function(){var ce,ye,Fe,Ge,We,it,ft,_t,Tt=this;return M(this,function(tr){return ce=this.createFontStyle(W),ye=ce[0],Fe=ce[1],Ge=ce[2],this.ctx.font=ye,this.ctx.direction=W.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",We=this.fontMetrics.getMetrics(Fe,Ge),it=We.baseline,ft=We.middle,_t=W.paintOrder,z.textBounds.forEach(function(kt){_t.forEach(function(Vt){switch(Vt){case 0:Tt.ctx.fillStyle=jn(W.color),Tt.renderTextWithLetterSpacing(kt,W.letterSpacing,it);var Sr=W.textShadow;Sr.length&&kt.text.trim().length&&(Sr.slice(0).reverse().forEach(function(qt){Tt.ctx.shadowColor=jn(qt.color),Tt.ctx.shadowOffsetX=qt.offsetX.number*Tt.options.scale,Tt.ctx.shadowOffsetY=qt.offsetY.number*Tt.options.scale,Tt.ctx.shadowBlur=qt.blur.number,Tt.renderTextWithLetterSpacing(kt,W.letterSpacing,it)}),Tt.ctx.shadowColor="",Tt.ctx.shadowOffsetX=0,Tt.ctx.shadowOffsetY=0,Tt.ctx.shadowBlur=0),W.textDecorationLine.length&&(Tt.ctx.fillStyle=jn(W.textDecorationColor||W.color),W.textDecorationLine.forEach(function(qt){switch(qt){case 1:Tt.ctx.fillRect(kt.bounds.left,Math.round(kt.bounds.top+it),kt.bounds.width,1);break;case 2:Tt.ctx.fillRect(kt.bounds.left,Math.round(kt.bounds.top),kt.bounds.width,1);break;case 3:Tt.ctx.fillRect(kt.bounds.left,Math.ceil(kt.bounds.top+ft),kt.bounds.width,1);break}}));break;case 1:W.webkitTextStrokeWidth&&kt.text.trim().length&&(Tt.ctx.strokeStyle=jn(W.webkitTextStrokeColor),Tt.ctx.lineWidth=W.webkitTextStrokeWidth,Tt.ctx.lineJoin=window.chrome?"miter":"round",Tt.ctx.strokeText(kt.text,kt.bounds.left,kt.bounds.top+it)),Tt.ctx.strokeStyle="",Tt.ctx.lineWidth=0,Tt.ctx.lineJoin="miter";break}})}),[2]})})},k.prototype.renderReplacedElement=function(z,W,ce){if(ce&&z.intrinsicWidth>0&&z.intrinsicHeight>0){var ye=mu(z),Fe=Ga(W);this.path(Fe),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(ce,0,0,z.intrinsicWidth,z.intrinsicHeight,ye.left,ye.top,ye.width,ye.height),this.ctx.restore()}},k.prototype.renderNodeContent=function(z){return Q(this,void 0,void 0,function(){var W,ce,ye,Fe,Ge,We,it,it,ft,_t,Tt,tr,kt,Vt,Sr,qt,nr,qr,Nr,it,un,kt,qt;return M(this,function(rr){switch(rr.label){case 0:this.applyEffects(z.getEffects(4)),W=z.container,ce=z.curves,ye=W.styles,Fe=0,Ge=W.textNodes,rr.label=1;case 1:return Fe<Ge.length?(We=Ge[Fe],[4,this.renderTextNode(We,ye)]):[3,4];case 2:rr.sent(),rr.label=3;case 3:return Fe++,[3,1];case 4:if(!(W instanceof Xs))return[3,8];rr.label=5;case 5:return rr.trys.push([5,7,,8]),[4,this.context.cache.match(W.src)];case 6:return it=rr.sent(),this.renderReplacedElement(W,ce,it),[3,8];case 7:return rr.sent(),this.context.logger.error("Error loading image "+W.src),[3,8];case 8:if(W instanceof Ys&&this.renderReplacedElement(W,ce,W.canvas),!(W instanceof $l))return[3,12];rr.label=9;case 9:return rr.trys.push([9,11,,12]),[4,this.context.cache.match(W.svg)];case 10:return it=rr.sent(),this.renderReplacedElement(W,ce,it),[3,12];case 11:return rr.sent(),this.context.logger.error("Error loading svg "+W.svg.substring(0,255)),[3,12];case 12:return W instanceof nu&&W.tree?(ft=new k(this.context,{scale:this.options.scale,backgroundColor:W.backgroundColor,x:0,y:0,width:W.width,height:W.height}),[4,ft.render(W.tree)]):[3,14];case 13:_t=rr.sent(),W.width&&W.height&&this.ctx.drawImage(_t,0,0,W.width,W.height,W.bounds.left,W.bounds.top,W.bounds.width,W.bounds.height),rr.label=14;case 14:if(W instanceof is&&(Tt=Math.min(W.bounds.width,W.bounds.height),W.type===ja?W.checked&&(this.ctx.save(),this.path([new Nt(W.bounds.left+Tt*.39363,W.bounds.top+Tt*.79),new Nt(W.bounds.left+Tt*.16,W.bounds.top+Tt*.5549),new Nt(W.bounds.left+Tt*.27347,W.bounds.top+Tt*.44071),new Nt(W.bounds.left+Tt*.39694,W.bounds.top+Tt*.5649),new Nt(W.bounds.left+Tt*.72983,W.bounds.top+Tt*.23),new Nt(W.bounds.left+Tt*.84,W.bounds.top+Tt*.34085),new Nt(W.bounds.left+Tt*.39363,W.bounds.top+Tt*.79)]),this.ctx.fillStyle=jn(eu),this.ctx.fill(),this.ctx.restore()):W.type===aa&&(W.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(W.bounds.left+Tt/2,W.bounds.top+Tt/2,Tt/4,0,Math.PI*2,!0),this.ctx.fillStyle=jn(eu),this.ctx.fill(),this.ctx.restore()))),CA(W)&&W.value.length){tr=this.createFontStyle(ye),kt=tr[0],Vt=tr[1],Sr=this.fontMetrics.getMetrics(kt,Vt).baseline,this.ctx.font=kt,this.ctx.fillStyle=jn(ye.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=SA(W.styles.textAlign),qt=mu(W),nr=0;switch(W.styles.textAlign){case 1:nr+=qt.width/2;break;case 2:nr+=qt.width;break}qr=qt.add(nr,0,0,-qt.height/2+1),this.ctx.save(),this.path([new Nt(qt.left,qt.top),new Nt(qt.left+qt.width,qt.top),new Nt(qt.left+qt.width,qt.top+qt.height),new Nt(qt.left,qt.top+qt.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Di(W.value,qr),ye.letterSpacing,Sr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!kn(W.styles.display,2048))return[3,20];if(!(W.styles.listStyleImage!==null))return[3,19];if(Nr=W.styles.listStyleImage,!(Nr.type===0))return[3,18];it=void 0,un=Nr.url,rr.label=15;case 15:return rr.trys.push([15,17,,18]),[4,this.context.cache.match(un)];case 16:return it=rr.sent(),this.ctx.drawImage(it,W.bounds.left-(it.width+10),W.bounds.top),[3,18];case 17:return rr.sent(),this.context.logger.error("Error loading list-style-image "+un),[3,18];case 18:return[3,20];case 19:z.listValue&&W.styles.listStyleType!==-1&&(kt=this.createFontStyle(ye)[0],this.ctx.font=kt,this.ctx.fillStyle=jn(ye.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",qt=new R(W.bounds.left,W.bounds.top+tn(W.styles.paddingTop,W.bounds.width),W.bounds.width,Pn(ye.lineHeight,ye.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Di(z.listValue,qt),ye.letterSpacing,Pn(ye.lineHeight,ye.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),rr.label=20;case 20:return[2]}})})},k.prototype.renderStackContent=function(z){return Q(this,void 0,void 0,function(){var W,ce,ye,Fe,Ge,ye,We,it,ye,ft,_t,ye,Tt,tr,ye,kt,Vt,ye,Sr,qt,ye;return M(this,function(nr){switch(nr.label){case 0:if(kn(z.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(z.element)];case 1:nr.sent(),W=0,ce=z.negativeZIndex,nr.label=2;case 2:return W<ce.length?(ye=ce[W],[4,this.renderStack(ye)]):[3,5];case 3:nr.sent(),nr.label=4;case 4:return W++,[3,2];case 5:return[4,this.renderNodeContent(z.element)];case 6:nr.sent(),Fe=0,Ge=z.nonInlineLevel,nr.label=7;case 7:return Fe<Ge.length?(ye=Ge[Fe],[4,this.renderNode(ye)]):[3,10];case 8:nr.sent(),nr.label=9;case 9:return Fe++,[3,7];case 10:We=0,it=z.nonPositionedFloats,nr.label=11;case 11:return We<it.length?(ye=it[We],[4,this.renderStack(ye)]):[3,14];case 12:nr.sent(),nr.label=13;case 13:return We++,[3,11];case 14:ft=0,_t=z.nonPositionedInlineLevel,nr.label=15;case 15:return ft<_t.length?(ye=_t[ft],[4,this.renderStack(ye)]):[3,18];case 16:nr.sent(),nr.label=17;case 17:return ft++,[3,15];case 18:Tt=0,tr=z.inlineLevel,nr.label=19;case 19:return Tt<tr.length?(ye=tr[Tt],[4,this.renderNode(ye)]):[3,22];case 20:nr.sent(),nr.label=21;case 21:return Tt++,[3,19];case 22:kt=0,Vt=z.zeroOrAutoZIndexOrTransformedOrOpacity,nr.label=23;case 23:return kt<Vt.length?(ye=Vt[kt],[4,this.renderStack(ye)]):[3,26];case 24:nr.sent(),nr.label=25;case 25:return kt++,[3,23];case 26:Sr=0,qt=z.positiveZIndex,nr.label=27;case 27:return Sr<qt.length?(ye=qt[Sr],[4,this.renderStack(ye)]):[3,30];case 28:nr.sent(),nr.label=29;case 29:return Sr++,[3,27];case 30:return[2]}})})},k.prototype.mask=function(z){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(z.slice(0).reverse()),this.ctx.closePath()},k.prototype.path=function(z){this.ctx.beginPath(),this.formatPath(z),this.ctx.closePath()},k.prototype.formatPath=function(z){var W=this;z.forEach(function(ce,ye){var Fe=bn(ce)?ce.start:ce;ye===0?W.ctx.moveTo(Fe.x,Fe.y):W.ctx.lineTo(Fe.x,Fe.y),bn(ce)&&W.ctx.bezierCurveTo(ce.startControl.x,ce.startControl.y,ce.endControl.x,ce.endControl.y,ce.end.x,ce.end.y)})},k.prototype.renderRepeat=function(z,W,ce,ye){this.path(z),this.ctx.fillStyle=W,this.ctx.translate(ce,ye),this.ctx.fill(),this.ctx.translate(-ce,-ye)},k.prototype.resizeImage=function(z,W,ce){var ye;if(z.width===W&&z.height===ce)return z;var Fe=(ye=this.canvas.ownerDocument)!==null&&ye!==void 0?ye:document,Ge=Fe.createElement("canvas");Ge.width=Math.max(1,W),Ge.height=Math.max(1,ce);var We=Ge.getContext("2d");return We.drawImage(z,0,0,z.width,z.height,0,0,W,ce),Ge},k.prototype.renderBackgroundImage=function(z){return Q(this,void 0,void 0,function(){var W,ce,ye,Fe,Ge,We;return M(this,function(it){switch(it.label){case 0:W=z.styles.backgroundImage.length-1,ce=function(ft){var _t,Tt,tr,kt,Vt,Sr,qt,nr,qr,Nr,kt,Vt,Sr,qt,nr,un,rr,on,An,kr,_i,yi,Oi,ai,qr,sa,kt,za,Va,qt,nr,Xa,Vt,Sr,So,la,Ya,Bo,Oo,Ta,Io,Sa;return M(this,function(cs){switch(cs.label){case 0:if(!(ft.type===0))return[3,5];_t=void 0,Tt=ft.url,cs.label=1;case 1:return cs.trys.push([1,3,,4]),[4,ye.context.cache.match(Tt)];case 2:return _t=cs.sent(),[3,4];case 3:return cs.sent(),ye.context.logger.error("Error loading background-image "+Tt),[3,4];case 4:return _t&&(tr=nA(z,W,[_t.width,_t.height,_t.width/_t.height]),kt=tr[0],Vt=tr[1],Sr=tr[2],qt=tr[3],nr=tr[4],qr=ye.ctx.createPattern(ye.resizeImage(_t,qt,nr),"repeat"),ye.renderRepeat(kt,qr,Vt,Sr)),[3,6];case 5:pl(ft)?(Nr=nA(z,W,[null,null,null]),kt=Nr[0],Vt=Nr[1],Sr=Nr[2],qt=Nr[3],nr=Nr[4],un=yu(ft.angle,qt,nr),rr=un[0],on=un[1],An=un[2],kr=un[3],_i=un[4],yi=document.createElement("canvas"),yi.width=qt,yi.height=nr,Oi=yi.getContext("2d"),ai=Oi.createLinearGradient(on,kr,An,_i),cl(ft.stops,rr).forEach(function(rl){return ai.addColorStop(rl.stop,jn(rl.color))}),Oi.fillStyle=ai,Oi.fillRect(0,0,qt,nr),qt>0&&nr>0&&(qr=ye.ctx.createPattern(yi,"repeat"),ye.renderRepeat(kt,qr,Vt,Sr))):ml(ft)&&(sa=nA(z,W,[null,null,null]),kt=sa[0],za=sa[1],Va=sa[2],qt=sa[3],nr=sa[4],Xa=ft.position.length===0?[ps]:ft.position,Vt=tn(Xa[0],qt),Sr=tn(Xa[Xa.length-1],nr),So=Ia(ft,Vt,Sr,qt,nr),la=So[0],Ya=So[1],la>0&&Ya>0&&(Bo=ye.ctx.createRadialGradient(za+Vt,Va+Sr,0,za+Vt,Va+Sr,la),cl(ft.stops,la*2).forEach(function(rl){return Bo.addColorStop(rl.stop,jn(rl.color))}),ye.path(kt),ye.ctx.fillStyle=Bo,la!==Ya?(Oo=z.bounds.left+.5*z.bounds.width,Ta=z.bounds.top+.5*z.bounds.height,Io=Ya/la,Sa=1/Io,ye.ctx.save(),ye.ctx.translate(Oo,Ta),ye.ctx.transform(1,0,0,Io,0,0),ye.ctx.translate(-Oo,-Ta),ye.ctx.fillRect(za,Sa*(Va-Ta)+Ta,qt,nr*Sa),ye.ctx.restore()):ye.ctx.fill())),cs.label=6;case 6:return W--,[2]}})},ye=this,Fe=0,Ge=z.styles.backgroundImage.slice(0).reverse(),it.label=1;case 1:return Fe<Ge.length?(We=Ge[Fe],[5,ce(We)]):[3,4];case 2:it.sent(),it.label=3;case 3:return Fe++,[3,1];case 4:return[2]}})})},k.prototype.renderSolidBorder=function(z,W,ce){return Q(this,void 0,void 0,function(){return M(this,function(ye){return this.path(lA(ce,W)),this.ctx.fillStyle=jn(z),this.ctx.fill(),[2]})})},k.prototype.renderDoubleBorder=function(z,W,ce,ye){return Q(this,void 0,void 0,function(){var Fe,Ge;return M(this,function(We){switch(We.label){case 0:return W<3?[4,this.renderSolidBorder(z,ce,ye)]:[3,2];case 1:return We.sent(),[2];case 2:return Fe=fA(ye,ce),this.path(Fe),this.ctx.fillStyle=jn(z),this.ctx.fill(),Ge=pA(ye,ce),this.path(Ge),this.ctx.fill(),[2]}})})},k.prototype.renderNodeBackgroundAndBorders=function(z){return Q(this,void 0,void 0,function(){var W,ce,ye,Fe,Ge,We,it,ft,_t=this;return M(this,function(Tt){switch(Tt.label){case 0:return this.applyEffects(z.getEffects(2)),W=z.container.styles,ce=!Pi(W.backgroundColor)||W.backgroundImage.length,ye=[{style:W.borderTopStyle,color:W.borderTopColor,width:W.borderTopWidth},{style:W.borderRightStyle,color:W.borderRightColor,width:W.borderRightWidth},{style:W.borderBottomStyle,color:W.borderBottomColor,width:W.borderBottomWidth},{style:W.borderLeftStyle,color:W.borderLeftColor,width:W.borderLeftWidth}],Fe=TA(As(W.backgroundClip,0),z.curves),ce||W.boxShadow.length?(this.ctx.save(),this.path(Fe),this.ctx.clip(),Pi(W.backgroundColor)||(this.ctx.fillStyle=jn(W.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(z.container)]):[3,2];case 1:Tt.sent(),this.ctx.restore(),W.boxShadow.slice(0).reverse().forEach(function(tr){_t.ctx.save();var kt=vi(z.curves),Vt=tr.inset?0:_A,Sr=hA(kt,-Vt+(tr.inset?1:-1)*tr.spread.number,(tr.inset?1:-1)*tr.spread.number,tr.spread.number*(tr.inset?-2:2),tr.spread.number*(tr.inset?-2:2));tr.inset?(_t.path(kt),_t.ctx.clip(),_t.mask(Sr)):(_t.mask(kt),_t.ctx.clip(),_t.path(Sr)),_t.ctx.shadowOffsetX=tr.offsetX.number+Vt,_t.ctx.shadowOffsetY=tr.offsetY.number,_t.ctx.shadowColor=jn(tr.color),_t.ctx.shadowBlur=tr.blur.number,_t.ctx.fillStyle=tr.inset?jn(tr.color):"rgba(0,0,0,1)",_t.ctx.fill(),_t.ctx.restore()}),Tt.label=2;case 2:Ge=0,We=0,it=ye,Tt.label=3;case 3:return We<it.length?(ft=it[We],ft.style!==0&&!Pi(ft.color)&&ft.width>0?ft.style===2?[4,this.renderDashedDottedBorder(ft.color,ft.width,Ge,z.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return Tt.sent(),[3,11];case 5:return ft.style===3?[4,this.renderDashedDottedBorder(ft.color,ft.width,Ge,z.curves,3)]:[3,7];case 6:return Tt.sent(),[3,11];case 7:return ft.style===4?[4,this.renderDoubleBorder(ft.color,ft.width,Ge,z.curves)]:[3,9];case 8:return Tt.sent(),[3,11];case 9:return[4,this.renderSolidBorder(ft.color,Ge,z.curves)];case 10:Tt.sent(),Tt.label=11;case 11:Ge++,Tt.label=12;case 12:return We++,[3,3];case 13:return[2]}})})},k.prototype.renderDashedDottedBorder=function(z,W,ce,ye,Fe){return Q(this,void 0,void 0,function(){var Ge,We,it,ft,_t,Tt,tr,kt,Vt,Sr,qt,nr,qr,Nr,un,rr,un,rr;return M(this,function(on){return this.ctx.save(),Ge=mA(ye,ce),We=lA(ye,ce),Fe===2&&(this.path(We),this.ctx.clip()),bn(We[0])?(it=We[0].start.x,ft=We[0].start.y):(it=We[0].x,ft=We[0].y),bn(We[1])?(_t=We[1].end.x,Tt=We[1].end.y):(_t=We[1].x,Tt=We[1].y),ce===0||ce===2?tr=Math.abs(it-_t):tr=Math.abs(ft-Tt),this.ctx.beginPath(),Fe===3?this.formatPath(Ge):this.formatPath(We.slice(0,2)),kt=W<3?W*3:W*2,Vt=W<3?W*2:W,Fe===3&&(kt=W,Vt=W),Sr=!0,tr<=kt*2?Sr=!1:tr<=kt*2+Vt?(qt=tr/(2*kt+Vt),kt*=qt,Vt*=qt):(nr=Math.floor((tr+Vt)/(kt+Vt)),qr=(tr-nr*kt)/(nr-1),Nr=(tr-(nr+1)*kt)/nr,Vt=Nr<=0||Math.abs(Vt-qr)<Math.abs(Vt-Nr)?qr:Nr),Sr&&(Fe===3?this.ctx.setLineDash([0,kt+Vt]):this.ctx.setLineDash([kt,Vt])),Fe===3?(this.ctx.lineCap="round",this.ctx.lineWidth=W):this.ctx.lineWidth=W*2+1.1,this.ctx.strokeStyle=jn(z),this.ctx.stroke(),this.ctx.setLineDash([]),Fe===2&&(bn(We[0])&&(un=We[3],rr=We[0],this.ctx.beginPath(),this.formatPath([new Nt(un.end.x,un.end.y),new Nt(rr.start.x,rr.start.y)]),this.ctx.stroke()),bn(We[1])&&(un=We[1],rr=We[2],this.ctx.beginPath(),this.formatPath([new Nt(un.end.x,un.end.y),new Nt(rr.start.x,rr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},k.prototype.render=function(z){return Q(this,void 0,void 0,function(){var W;return M(this,function(ce){switch(ce.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=jn(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),W=dA(z),[4,this.renderStack(W)];case 1:return ce.sent(),this.applyEffects([]),[2,this.canvas]}})})},k}(cA),CA=function(j){return j instanceof ru||j instanceof tu?!0:j instanceof is&&j.type!==aa&&j.type!==ja},TA=function(j,k){switch(j){case 0:return vi(k);case 2:return Gn(k);case 1:default:return Ga(k)}},SA=function(j){switch(j){case 1:return"center";case 2:return"right";case 0:default:return"left"}},BA=["-apple-system","system-ui"],OA=function(j){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?j.filter(function(k){return BA.indexOf(k)===-1}):j},IA=function(j){H(k,j);function k(z,W){var ce=j.call(this,z,W)||this;return ce.canvas=W.canvas?W.canvas:document.createElement("canvas"),ce.ctx=ce.canvas.getContext("2d"),ce.options=W,ce.canvas.width=Math.floor(W.width*W.scale),ce.canvas.height=Math.floor(W.height*W.scale),ce.canvas.style.width=W.width+"px",ce.canvas.style.height=W.height+"px",ce.ctx.scale(ce.options.scale,ce.options.scale),ce.ctx.translate(-W.x,-W.y),ce.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+W.width+"x"+W.height+" at "+W.x+","+W.y+") with scale "+W.scale),ce}return k.prototype.render=function(z){return Q(this,void 0,void 0,function(){var W,ce;return M(this,function(ye){switch(ye.label){case 0:return W=qo(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,z),[4,RA(W)];case 1:return ce=ye.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=jn(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(ce,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},k}(cA),RA=function(j){return new Promise(function(k,z){var W=new Image;W.onload=function(){k(W)},W.onerror=z,W.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(j))})},LA=function(){function j(k){var z=k.id,W=k.enabled;this.id=z,this.enabled=W,this.start=Date.now()}return j.prototype.debug=function(){for(var k=[],z=0;z<arguments.length;z++)k[z]=arguments[z];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,_([this.id,this.getTime()+"ms"],k)):this.info.apply(this,k))},j.prototype.getTime=function(){return Date.now()-this.start},j.prototype.info=function(){for(var k=[],z=0;z<arguments.length;z++)k[z]=arguments[z];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,_([this.id,this.getTime()+"ms"],k)))},j.prototype.warn=function(){for(var k=[],z=0;z<arguments.length;z++)k[z]=arguments[z];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,_([this.id,this.getTime()+"ms"],k)):this.info.apply(this,k))},j.prototype.error=function(){for(var k=[],z=0;z<arguments.length;z++)k[z]=arguments[z];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,_([this.id,this.getTime()+"ms"],k)):this.info.apply(this,k))},j.instances={},j}(),DA=function(){function j(k,z){var W;this.windowBounds=z,this.instanceName="#"+j.instanceCount++,this.logger=new LA({id:this.instanceName,enabled:k.logging}),this.cache=(W=k.cache)!==null&&W!==void 0?W:new Lr(this,k)}return j.instanceCount=1,j}(),MA=function(j,k){return k===void 0&&(k={}),FA(j,k)};typeof window!="undefined"&&ur.setContext(window);var FA=function(j,k){return Q(void 0,void 0,void 0,function(){var z,W,ce,ye,Fe,Ge,We,it,ft,_t,Tt,tr,kt,Vt,Sr,qt,nr,qr,Nr,un,rr,on,rr,An,kr,_i,yi,Oi,ai,sa,za,Va,Xa,So,la,Ya,Bo,Oo,Ta,Io;return M(this,function(Sa){switch(Sa.label){case 0:if(!j||typeof j!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(z=j.ownerDocument,!z)throw new Error("Element is not attached to a Document");if(W=z.defaultView,!W)throw new Error("Document is not attached to a Window");return ce={allowTaint:(An=k.allowTaint)!==null&&An!==void 0?An:!1,imageTimeout:(kr=k.imageTimeout)!==null&&kr!==void 0?kr:15e3,proxy:k.proxy,useCORS:(_i=k.useCORS)!==null&&_i!==void 0?_i:!1},ye=O({logging:(yi=k.logging)!==null&&yi!==void 0?yi:!0,cache:k.cache},ce),Fe={windowWidth:(Oi=k.windowWidth)!==null&&Oi!==void 0?Oi:W.innerWidth,windowHeight:(ai=k.windowHeight)!==null&&ai!==void 0?ai:W.innerHeight,scrollX:(sa=k.scrollX)!==null&&sa!==void 0?sa:W.pageXOffset,scrollY:(za=k.scrollY)!==null&&za!==void 0?za:W.pageYOffset},Ge=new R(Fe.scrollX,Fe.scrollY,Fe.windowWidth,Fe.windowHeight),We=new DA(ye,Ge),it=(Va=k.foreignObjectRendering)!==null&&Va!==void 0?Va:!1,ft={allowTaint:(Xa=k.allowTaint)!==null&&Xa!==void 0?Xa:!1,onclone:k.onclone,ignoreElements:k.ignoreElements,inlineImages:it,copyStyles:it},We.logger.debug("Starting document clone with size "+Ge.width+"x"+Ge.height+" scrolled to "+-Ge.left+","+-Ge.top),_t=new F(We,j,ft),Tt=_t.clonedReferenceElement,Tt?[4,_t.toIFrame(z,Ge)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return tr=Sa.sent(),kt=mn(Tt)||tA(Tt)?t(Tt.ownerDocument):b(We,Tt),Vt=kt.width,Sr=kt.height,qt=kt.left,nr=kt.top,qr=UA(We,Tt,k.backgroundColor),Nr={canvas:k.canvas,backgroundColor:qr,scale:(la=(So=k.scale)!==null&&So!==void 0?So:W.devicePixelRatio)!==null&&la!==void 0?la:1,x:((Ya=k.x)!==null&&Ya!==void 0?Ya:0)+qt,y:((Bo=k.y)!==null&&Bo!==void 0?Bo:0)+nr,width:(Oo=k.width)!==null&&Oo!==void 0?Oo:Math.ceil(Vt),height:(Ta=k.height)!==null&&Ta!==void 0?Ta:Math.ceil(Sr)},it?(We.logger.debug("Document cloned, using foreign object rendering"),rr=new IA(We,Nr),[4,rr.render(Tt)]):[3,3];case 2:return un=Sa.sent(),[3,5];case 3:return We.logger.debug("Document cloned, element located at "+qt+","+nr+" with size "+Vt+"x"+Sr+" using computed rendering"),We.logger.debug("Starting DOM parsing"),on=au(We,Tt),qr===on.styles.backgroundColor&&(on.styles.backgroundColor=Si.TRANSPARENT),We.logger.debug("Starting renderer for element at "+Nr.x+","+Nr.y+" with size "+Nr.width+"x"+Nr.height),rr=new xA(We,Nr),[4,rr.render(on)];case 4:un=Sa.sent(),Sa.label=5;case 5:return((Io=k.removeContainer)!==null&&Io!==void 0?Io:!0)&&(F.destroy(tr)||We.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),We.logger.debug("Finished rendering"),[2,un]}})})},UA=function(j,k,z){var W=k.ownerDocument,ce=W.documentElement?ca(j,getComputedStyle(W.documentElement).backgroundColor):Si.TRANSPARENT,ye=W.body?ca(j,getComputedStyle(W.body).backgroundColor):Si.TRANSPARENT,Fe=typeof z=="string"?ca(j,z):z===null?Si.TRANSPARENT:4294967295;return k===W.documentElement?Pi(ce)?Pi(ye)?Fe:ye:ce:Fe};return MA})},wRmb:function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return E});var Z=N("rePB"),H=N("KQm4"),O=N("VTBJ"),Q=N("Ff2n"),M=N("q1tI"),_=N.n(M),R=N("Kwbf"),b=N("Zm9Q"),t=N("hW8S");function E(o){return Object(b.a)(o).filter(function(f){return M.isValidElement(f)}).map(function(f){var u=f.key,c=f.props,i=c.children,l=Object(Q.a)(c,["children"]),v=Object(O.a)({key:u},l);return i&&(v.children=E(i)),v})}function a(o){return o.reduce(function(f,u){var c=u.fixed,i=c===!0?"left":c,l=u.children;return l&&l.length>0?[].concat(Object(H.a)(f),Object(H.a)(a(l).map(function(v){return Object(O.a)({fixed:i},v)}))):[].concat(Object(H.a)(f),[Object(O.a)(Object(O.a)({},u),{},{fixed:i})])},[])}function A(o){for(var f=!0,u=0;u<o.length;u+=1){var c=o[u];if(f&&c.fixed!=="left")f=!1;else if(!f&&c.fixed==="left"){Object(R.a)(!1,"Index ".concat(u-1," of `columns` missing `fixed='left'` prop."));break}}for(var i=!0,l=o.length-1;l>=0;l-=1){var v=o[l];if(i&&v.fixed!=="right")i=!1;else if(!i&&v.fixed==="right"){Object(R.a)(!1,"Index ".concat(l+1," of `columns` missing `fixed='right'` prop."));break}}}function h(o){return o.map(function(f){var u=f.fixed,c=Object(Q.a)(f,["fixed"]),i=u;return u==="left"?i="right":u==="right"&&(i="left"),Object(O.a)({fixed:i},c)})}function s(o,f){var u=o.prefixCls,c=o.columns,i=o.children,l=o.expandable,v=o.expandedKeys,B=o.getRowKey,C=o.onTriggerExpand,L=o.expandIcon,w=o.rowExpandable,p=o.expandIconColumnIndex,n=o.direction,d=o.expandRowByClick,m=M.useMemo(function(){return c||E(i)},[c,i]),T=M.useMemo(function(){if(l){var U,P=p||0,I=m[P],G=(U={},Object(Z.a)(U,t.a,{className:"".concat(u,"-expand-icon-col")}),Object(Z.a)(U,"title",""),Object(Z.a)(U,"fixed",I?I.fixed:null),Object(Z.a)(U,"className","".concat(u,"-row-expand-icon-cell")),Object(Z.a)(U,"render",function(J,X,ne){var ue=B(X,ne),Oe=v.has(ue),_e=w?w(X):!0,De=L({prefixCls:u,expanded:Oe,expandable:_e,record:X,onExpand:C});return d?M.createElement("span",{onClick:function(Ke){return Ke.stopPropagation()}},De):De}),U),K=m.slice();return P>=0&&K.splice(P,0,G),K}return m},[l,m,B,v,L,n]),y=M.useMemo(function(){var U=T;return f&&(U=f(U)),U.length||(U=[{render:function(){return null}}]),U},[f,T,n]),g=M.useMemo(function(){return n==="rtl"?h(a(y)):a(y)},[y,n]);return[y,g]}Ae.b=s},x6Kt:function(Ve,Ae,N){var Z=N("y+Vt"),H=N("VpOo"),O=N("nPnh"),Q=O.subPixelOptimizeRect,M={},_=Z.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(R,b){var t,E,a,A;this.subPixelOptimize?(Q(M,b,this.style),t=M.x,E=M.y,a=M.width,A=M.height,M.r=b.r,b=M):(t=b.x,E=b.y,a=b.width,A=b.height),b.r?H.buildPath(R,b):R.rect(t,E,a,A),R.closePath();return}});Ve.exports=_},"y+Vt":function(Ve,Ae,N){var Z=N("Gev7"),H=N("bYtY"),O=N("IMiH"),Q=N("2DNl"),M=N("3C/r"),_=M.prototype.getCanvasPattern,R=Math.abs,b=new O(!0);function t(a){Z.call(this,a),this.path=null}t.prototype={constructor:t,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(a,A){var h=this.style,s=this.path||b,o=h.hasStroke(),f=h.hasFill(),u=h.fill,c=h.stroke,i=f&&!!u.colorStops,l=o&&!!c.colorStops,v=f&&!!u.image,B=o&&!!c.image;if(h.bind(a,this,A),this.setTransform(a),this.__dirty){var C;i&&(C=C||this.getBoundingRect(),this._fillGradient=h.getGradient(a,u,C)),l&&(C=C||this.getBoundingRect(),this._strokeGradient=h.getGradient(a,c,C))}i?a.fillStyle=this._fillGradient:v&&(a.fillStyle=_.call(u,a)),l?a.strokeStyle=this._strokeGradient:B&&(a.strokeStyle=_.call(c,a));var L=h.lineDash,w=h.lineDashOffset,p=!!a.setLineDash,n=this.getGlobalScale();if(s.setScale(n[0],n[1],this.segmentIgnoreThreshold),this.__dirtyPath||L&&!p&&o?(s.beginPath(a),L&&!p&&(s.setLineDash(L),s.setLineDashOffset(w)),this.buildPath(s,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(a.beginPath(),this.path.rebuildPath(a)),f)if(h.fillOpacity!=null){var d=a.globalAlpha;a.globalAlpha=h.fillOpacity*h.opacity,s.fill(a),a.globalAlpha=d}else s.fill(a);if(L&&p&&(a.setLineDash(L),a.lineDashOffset=w),o)if(h.strokeOpacity!=null){var d=a.globalAlpha;a.globalAlpha=h.strokeOpacity*h.opacity,s.stroke(a),a.globalAlpha=d}else s.stroke(a);L&&p&&a.setLineDash([]),h.text!=null&&(this.restoreTransform(a),this.drawRectText(a,this.getBoundingRect()))},buildPath:function(a,A,h){},createPathProxy:function(){this.path=new O},getBoundingRect:function(){var a=this._rect,A=this.style,h=!a;if(h){var s=this.path;s||(s=this.path=new O),this.__dirtyPath&&(s.beginPath(),this.buildPath(s,this.shape,!1)),a=s.getBoundingRect()}if(this._rect=a,A.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=a.clone());if(this.__dirty||h){o.copy(a);var f=A.lineWidth,u=A.strokeNoScale?this.getLineScale():1;A.hasFill()||(f=Math.max(f,this.strokeContainThreshold||4)),u>1e-10&&(o.width+=f/u,o.height+=f/u,o.x-=f/u/2,o.y-=f/u/2)}return o}return a},contain:function(a,A){var h=this.transformCoordToLocal(a,A),s=this.getBoundingRect(),o=this.style;if(a=h[0],A=h[1],s.contain(a,A)){var f=this.path.data;if(o.hasStroke()){var u=o.lineWidth,c=o.strokeNoScale?this.getLineScale():1;if(c>1e-10&&(o.hasFill()||(u=Math.max(u,this.strokeContainThreshold)),Q.containStroke(f,u/c,a,A)))return!0}if(o.hasFill())return Q.contain(f,a,A)}return!1},dirty:function(a){a==null&&(a=!0),a&&(this.__dirtyPath=a,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(a){return this.animate("shape",a)},attrKV:function(a,A){a==="shape"?(this.setShape(A),this.__dirtyPath=!0,this._rect=null):Z.prototype.attrKV.call(this,a,A)},setShape:function(a,A){var h=this.shape;if(h){if(H.isObject(a))for(var s in a)a.hasOwnProperty(s)&&(h[s]=a[s]);else h[a]=A;this.dirty(!0)}return this},getLineScale:function(){var a=this.transform;return a&&R(a[0]-1)>1e-10&&R(a[3]-1)>1e-10?Math.sqrt(R(a[0]*a[3]-a[2]*a[1])):1}},t.extend=function(a){var A=function(s){t.call(this,s),a.style&&this.style.extendFrom(a.style,!1);var o=a.shape;if(o){this.shape=this.shape||{};var f=this.shape;for(var u in o)!f.hasOwnProperty(u)&&o.hasOwnProperty(u)&&(f[u]=o[u])}a.init&&a.init.call(this,s)};H.inherits(A,t);for(var h in a)h!=="style"&&h!=="shape"&&(A.prototype[h]=a[h]);return A},H.inherits(t,Z);var E=t;Ve.exports=E},"y0+3":function(Ve,Ae,N){"use strict";N.d(Ae,"a",function(){return a}),N.d(Ae,"b",function(){return h});var Z=/margin|padding|width|height|max|min|offset/,H={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function Q(s){return s.nodeType===1?s.ownerDocument.defaultView.getComputedStyle(s,null):{}}function M(s,o,f){if(o=o.toLowerCase(),f==="auto"){if(o==="height")return s.offsetHeight;if(o==="width")return s.offsetWidth}return o in H||(H[o]=Z.test(o)),H[o]?parseFloat(f)||0:f}function _(s,o){var f=arguments.length,u=Q(s);return o=O[o]?"cssFloat"in s.style?"cssFloat":"styleFloat":o,f===1?u:M(s,o,u[o]||s.style[o])}function R(s,o,f){var u=arguments.length;if(o=O[o]?"cssFloat"in s.style?"cssFloat":"styleFloat":o,u===3)return typeof f=="number"&&Z.test(o)&&(f="".concat(f,"px")),s.style[o]=f,f;for(var c in o)o.hasOwnProperty(c)&&R(s,c,o[c]);return Q(s)}function b(s){return s===document.body?document.documentElement.clientWidth:s.offsetWidth}function t(s){return s===document.body?window.innerHeight||document.documentElement.clientHeight:s.offsetHeight}function E(){var s=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:s,height:o}}function a(){var s=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:s,height:o}}function A(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function h(s){var o=s.getBoundingClientRect(),f=document.documentElement;return{left:o.left+(window.pageXOffset||f.scrollLeft)-(f.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||f.scrollTop)-(f.clientTop||document.body.clientTop||0)}}},y23F:function(Ve,Ae){function N(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}N.prototype={constructor:N,_dragStart:function(O){for(var Q=O.target;Q&&!Q.draggable;)Q=Q.parent;Q&&(this._draggingTarget=Q,Q.dragging=!0,this._x=O.offsetX,this._y=O.offsetY,this.dispatchToElement(Z(Q,O),"dragstart",O.event))},_drag:function(O){var Q=this._draggingTarget;if(Q){var M=O.offsetX,_=O.offsetY,R=M-this._x,b=_-this._y;this._x=M,this._y=_,Q.drift(R,b,O),this.dispatchToElement(Z(Q,O),"drag",O.event);var t=this.findHover(M,_,Q).target,E=this._dropTarget;this._dropTarget=t,Q!==t&&(E&&t!==E&&this.dispatchToElement(Z(E,O),"dragleave",O.event),t&&t!==E&&this.dispatchToElement(Z(t,O),"dragenter",O.event))}},_dragEnd:function(O){var Q=this._draggingTarget;Q&&(Q.dragging=!1),this.dispatchToElement(Z(Q,O),"dragend",O.event),this._dropTarget&&this.dispatchToElement(Z(this._dropTarget,O),"drop",O.event),this._draggingTarget=null,this._dropTarget=null}};function Z(O,Q){return{target:O,topTarget:Q&&Q.topTarget}}var H=N;Ve.exports=H},yxFR:function(Ve,Ae,N){var Z=N("y+Vt"),H=N("nPnh"),O=H.subPixelOptimizeLine,Q={},M=Z.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(_,R){var b,t,E,a;this.subPixelOptimize?(O(Q,R,this.style),b=Q.x1,t=Q.y1,E=Q.x2,a=Q.y2):(b=R.x1,t=R.y1,E=R.x2,a=R.y2);var A=R.percent;if(A===0)return;_.moveTo(b,t),A<1&&(E=b*(1-A)+E*A,a=t*(1-A)+a*A),_.lineTo(E,a)},pointAt:function(_){var R=this.shape;return[R.x1*(1-_)+R.x2*_,R.y1*(1-_)+R.y2*_]}});Ve.exports=M},z9Ch:function(Ve,Ae,N){Ve.exports={flex_box_center:"flex_box_center___3OoGm",flex_space_between:"flex_space_between___1T26N",flex_box_vertical_center:"flex_box_vertical_center___1ToJb",flex_box_center_end:"flex_box_center_end___3yWc3",flex_box_column:"flex_box_column___2DqGp",title:"title___27RYc",export:"export___23HFM",title1_right:"title1_right___QCRrC",userPic:"userPic___1IO2N",userInfo:"userInfo___1tmSz",listItem:"listItem___j4sdw",rightInfo:"rightInfo___163Ic",shixunTitle:"shixunTitle___15lHO",shixunWrp:"shixunWrp___O2H0q",footerBar:"footerBar___NH_yZ",footerBarStatic:"footerBarStatic___2dJUI",exitComment:"exitComment___2O-uT",nextComment:"nextComment___2fkhG",modal:"modal___LOSk6"}},zarK:function(Ve,Ae,N){var Z=N("YH21"),H=Z.addEventListener,O=Z.removeEventListener,Q=Z.normalizeEvent,M=Z.getNativeEvent,_=N("bYtY"),R=N("H6uX"),b=N("ItGF"),t=300,E=b.domSupported,a=function(){var g=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],U=["touchstart","touchend","touchmove"],P={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},I=_.map(g,function(G){var K=G.replace("mouse","pointer");return P.hasOwnProperty(K)?K:G});return{mouse:g,touch:U,pointer:I}}(),A={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function h(g){return g==="mousewheel"&&b.browser.firefox?"DOMMouseScroll":g}function s(g){var U=g.pointerType;return U==="pen"||U==="touch"}function o(g){g.touching=!0,g.touchTimer!=null&&(clearTimeout(g.touchTimer),g.touchTimer=null),g.touchTimer=setTimeout(function(){g.touching=!1,g.touchTimer=null},700)}function f(g){g&&(g.zrByTouch=!0)}function u(g,U){return Q(g.dom,new i(g,U),!0)}function c(g,U){for(var P=U,I=!1;P&&P.nodeType!==9&&!(I=P.domBelongToZr||P!==U&&P===g.painterRoot);)P=P.parentNode;return I}function i(g,U){this.type=U.type,this.target=this.currentTarget=g.dom,this.pointerType=U.pointerType,this.clientX=U.clientX,this.clientY=U.clientY}var l=i.prototype;l.stopPropagation=l.stopImmediatePropagation=l.preventDefault=_.noop;var v={mousedown:function(g){g=Q(this.dom,g),this._mayPointerCapture=[g.zrX,g.zrY],this.trigger("mousedown",g)},mousemove:function(g){g=Q(this.dom,g);var U=this._mayPointerCapture;U&&(g.zrX!==U[0]||g.zrY!==U[1])&&n(this,!0),this.trigger("mousemove",g)},mouseup:function(g){g=Q(this.dom,g),n(this,!1),this.trigger("mouseup",g)},mouseout:function(g){g=Q(this.dom,g),this._pointerCapturing&&(g.zrEventControl="no_globalout");var U=g.toElement||g.relatedTarget;g.zrIsToLocalDOM=c(this,U),this.trigger("mouseout",g)},touchstart:function(g){g=Q(this.dom,g),f(g),this._lastTouchMoment=new Date,this.handler.processGesture(g,"start"),v.mousemove.call(this,g),v.mousedown.call(this,g)},touchmove:function(g){g=Q(this.dom,g),f(g),this.handler.processGesture(g,"change"),v.mousemove.call(this,g)},touchend:function(g){g=Q(this.dom,g),f(g),this.handler.processGesture(g,"end"),v.mouseup.call(this,g),+new Date-this._lastTouchMoment<t&&v.click.call(this,g)},pointerdown:function(g){v.mousedown.call(this,g)},pointermove:function(g){s(g)||v.mousemove.call(this,g)},pointerup:function(g){v.mouseup.call(this,g)},pointerout:function(g){s(g)||v.mouseout.call(this,g)}};_.each(["click","mousewheel","dblclick","contextmenu"],function(g){v[g]=function(U){U=Q(this.dom,U),this.trigger(g,U)}});var B={pointermove:function(g){s(g)||B.mousemove.call(this,g)},pointerup:function(g){B.mouseup.call(this,g)},mousemove:function(g){this.trigger("mousemove",g)},mouseup:function(g){var U=this._pointerCapturing;n(this,!1),this.trigger("mouseup",g),U&&(g.zrEventControl="only_globalout",this.trigger("mouseout",g))}};function C(g,U){var P=U.domHandlers;b.pointerEventsSupported?_.each(a.pointer,function(I){w(U,I,function(G){P[I].call(g,G)})}):(b.touchEventsSupported&&_.each(a.touch,function(I){w(U,I,function(G){P[I].call(g,G),o(U)})}),_.each(a.mouse,function(I){w(U,I,function(G){G=M(G),U.touching||P[I].call(g,G)})}))}function L(g,U){b.pointerEventsSupported?_.each(A.pointer,P):b.touchEventsSupported||_.each(A.mouse,P);function P(I){function G(K){K=M(K),c(g,K.target)||(K=u(g,K),U.domHandlers[I].call(g,K))}w(U,I,G,{capture:!0})}}function w(g,U,P,I){g.mounted[U]=P,g.listenerOpts[U]=I,H(g.domTarget,h(U),P,I)}function p(g){var U=g.mounted;for(var P in U)U.hasOwnProperty(P)&&O(g.domTarget,h(P),U[P],g.listenerOpts[P]);g.mounted={}}function n(g,U){if(g._mayPointerCapture=null,E&&g._pointerCapturing^U){g._pointerCapturing=U;var P=g._globalHandlerScope;U?L(g,P):p(P)}}function d(g,U){this.domTarget=g,this.domHandlers=U,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function m(g,U){R.call(this),this.dom=g,this.painterRoot=U,this._localHandlerScope=new d(g,v),E&&(this._globalHandlerScope=new d(document,B)),this._pointerCapturing=!1,this._mayPointerCapture=null,C(this,this._localHandlerScope)}var T=m.prototype;T.dispose=function(){p(this._localHandlerScope),E&&p(this._globalHandlerScope)},T.setCursor=function(g){this.dom.style&&(this.dom.style.cursor=g||"default")},_.mixin(m,R);var y=m;Ve.exports=y}}]);
|