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.
412 lines
1.5 MiB
412 lines
1.5 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[92,3,5,7,8,18],{"+NIl":function(qe,ue,k){(function(J){J(k("VrN/"))})(function(J){"use strict";J.defineMode("stex",function(N,O){"use strict";function Q(h,d){h.cmdState.push(d)}function R(h){return h.cmdState.length>0?h.cmdState[h.cmdState.length-1]:null}function B(h){var d=h.cmdState.pop();d&&d.closeBracket()}function D(h){for(var d=h.cmdState,E=d.length-1;E>=0;E--){var o=d[E];if(o.name=="DEFAULT")continue;return o}return{styleIdentifier:function(){return null}}}function f(h,d,E){return function(){this.name=h,this.bracketNo=0,this.style=d,this.styles=E,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var b={};b.importmodule=f("importmodule","tag",["string","builtin"]),b.documentclass=f("documentclass","tag",["","atom"]),b.usepackage=f("usepackage","tag",["atom"]),b.begin=f("begin","tag",["atom"]),b.end=f("end","tag",["atom"]),b.label=f("label","tag",["atom"]),b.ref=f("ref","tag",["atom"]),b.eqref=f("eqref","tag",["atom"]),b.cite=f("cite","tag",["atom"]),b.bibitem=f("bibitem","tag",["atom"]),b.Bibitem=f("Bibitem","tag",["atom"]),b.RBibitem=f("RBibitem","tag",["atom"]),b.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function g(h,d){h.f=d}function i(h,d){var E;if(h.match(/^\\[a-zA-Z@]+/)){var o=h.current().slice(1);return E=b.hasOwnProperty(o)?b[o]:b.DEFAULT,E=new E,Q(d,E),g(d,v),E.style}if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/\\]/))return"tag";if(h.match("\\["))return g(d,function(s,u){return l(s,u,"\\]")}),"keyword";if(h.match("\\("))return g(d,function(s,u){return l(s,u,"\\)")}),"keyword";if(h.match("$$"))return g(d,function(s,u){return l(s,u,"$$")}),"keyword";if(h.match("$"))return g(d,function(s,u){return l(s,u,"$")}),"keyword";var n=h.next();if(n=="%")return h.skipToEnd(),"comment";if(n=="}"||n=="]"){if(E=R(d),E)E.closeBracket(n),g(d,v);else return"error";return"bracket"}else return n=="{"||n=="["?(E=b.DEFAULT,E=new E,Q(d,E),"bracket"):/\d/.test(n)?(h.eatWhile(/[\w.%]/),"atom"):(h.eatWhile(/[\w\-_]/),E=D(d),E.name=="begin"&&(E.argument=h.current()),E.styleIdentifier())}function l(h,d,E){if(h.eatSpace())return null;if(E&&h.match(E))return g(d,i),"keyword";if(h.match(/^\\[a-zA-Z@]+/))return"tag";if(h.match(/^[a-zA-Z]+/))return"variable-2";if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/]/))return"tag";if(h.match(/^[\^_&]/))return"tag";if(h.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(h.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var o=h.next();return o=="{"||o=="}"||o=="["||o=="]"||o=="("||o==")"?"bracket":o=="%"?(h.skipToEnd(),"comment"):"error"}function v(h,d){var E=h.peek(),o;return E=="{"||E=="["?(o=R(d),o.openBracket(E),h.eat(E),g(d,i),"bracket"):/[ \t\r]/.test(E)?(h.eat(E),null):(g(d,i),B(d),i(h,d))}return{startState:function(){var h=O.inMathMode?function(d,E){return l(d,E)}:i;return{cmdState:[],f:h}},copyState:function(h){return{cmdState:h.cmdState.slice(),f:h.f}},token:function(h,d){return d.f(h,d)},blankLine:function(h){h.f=i,h.cmdState.length=0},lineComment:"%"}}),J.defineMIME("text/x-stex","stex"),J.defineMIME("text/x-latex","stex")})},"+ua5":function(qe,ue,k){},"/cxE":function(qe,ue,k){"use strict";k.d(ue,"e",function(){return O}),k.d(ue,"f",function(){return Q}),k.d(ue,"g",function(){return R}),k.d(ue,"d",function(){return D}),k.d(ue,"a",function(){return f}),k.d(ue,"b",function(){return b}),k.d(ue,"c",function(){return g});var J=function(){function i(){this.listeners=[],this.unexpectedErrorHandler=function(l){setTimeout(function(){throw l.stack?new Error(l.message+`
|
|
|
|
`+l.stack):l},0)}}return i.prototype.emit=function(l){this.listeners.forEach(function(v){v(l)})},i.prototype.onUnexpectedError=function(l){this.unexpectedErrorHandler(l),this.emit(l)},i.prototype.onUnexpectedExternalError=function(l){this.unexpectedErrorHandler(l)},i}(),N=new J;function O(i){D(i)||N.onUnexpectedError(i);return}function Q(i){D(i)||N.onUnexpectedExternalError(i);return}function R(i){if(i instanceof Error){var l=i.name,v=i.message,h=i.stacktrace||i.stack;return{$isError:!0,name:l,message:v,stack:h}}return i}var B="Canceled";function D(i){return i instanceof Error&&i.name===B&&i.message===B}function f(){var i=new Error(B);return i.name=i.message,i}function b(i){return i?new Error("Illegal argument: "+i):new Error("Illegal argument")}function g(i){return i?new Error("Illegal state: "+i):new Error("Illegal state")}},"06Qe":function(qe,ue,k){var J=k("ItGF"),N="urn:schemas-microsoft-com:vml",O=typeof window=="undefined"?null:window,Q=!1,R=O&&O.document;function B(b){return D(b)}var D;if(R&&!J.canvasSupported)try{!R.namespaces.zrvml&&R.namespaces.add("zrvml",N),D=function(b){return R.createElement("<zrvml:"+b+' class="zrvml">')}}catch(b){D=function(g){return R.createElement("<"+g+' xmlns="'+N+'" class="zrvml">')}}function f(){if(Q||!R)return;Q=!0;var b=R.styleSheets;b.length<31?R.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):b[0].addRule(".zrvml","behavior:url(#default#VML)")}ue.doc=R,ue.createNode=B,ue.initVML=f},"0s+r":function(qe,ue,k){var J=k("bYtY"),N=k("QBsz"),O=k("y23F"),Q=k("H6uX"),R=k("YH21"),B=k("C0SR"),D="silent";function f(E,o,n){return{type:E,event:n,target:o.target,topTarget:o.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:b}}function b(){R.stop(this.event)}function g(){}g.prototype.dispose=function(){};var i=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],l=function(E,o,n,s){Q.call(this),this.storage=E,this.painter=o,this.painterRoot=s,n=n||new g,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,O.call(this),this.setHandlerProxy(n)};l.prototype={constructor:l,setHandlerProxy:function(E){this.proxy&&this.proxy.dispose(),E&&(J.each(i,function(o){E.on&&E.on(o,this[o],this)},this),E.handler=this),this.proxy=E},mousemove:function(E){var o=E.zrX,n=E.zrY,s=h(this,o,n),u=this._hovered,p=u.target;p&&!p.__zr&&(u=this.findHover(u.x,u.y),p=u.target);var S=this._hovered=s?{x:o,y:n}:this.findHover(o,n),x=S.target,M=this.proxy;M.setCursor&&M.setCursor(x?x.cursor:"default"),p&&x!==p&&this.dispatchToElement(u,"mouseout",E),this.dispatchToElement(S,"mousemove",E),x&&x!==p&&this.dispatchToElement(S,"mouseover",E)},mouseout:function(E){var o=E.zrEventControl,n=E.zrIsToLocalDOM;o!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",E),o!=="no_globalout"&&(!n&&this.trigger("globalout",{type:"globalout",event:E}))},resize:function(E){this._hovered={}},dispatch:function(E,o){var n=this[E];n&&n.call(this,o)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(E){var o=this.proxy;o.setCursor&&o.setCursor(E)},dispatchToElement:function(E,o,n){E=E||{};var s=E.target;if(s&&s.silent)return;for(var u="on"+o,p=f(o,E,n);s&&!(s[u]&&(p.cancelBubble=s[u].call(s,p)),s.trigger(o,p),s=s.parent,p.cancelBubble););p.cancelBubble||(this.trigger(o,p),this.painter&&this.painter.eachOtherLayer(function(S){typeof S[u]=="function"&&S[u].call(S,p),S.trigger&&S.trigger(o,p)}))},findHover:function(E,o,n){for(var s=this.storage.getDisplayList(),u={x:E,y:o},p=s.length-1;p>=0;p--){var S;if(s[p]!==n&&!s[p].ignore&&(S=v(s[p],E,o))&&(!u.topTarget&&(u.topTarget=s[p]),S!==D)){u.target=s[p];break}}return u},processGesture:function(E,o){this._gestureMgr||(this._gestureMgr=new B);var n=this._gestureMgr;o==="start"&&n.clear();var s=n.recognize(E,this.findHover(E.zrX,E.zrY,null).target,this.proxy.dom);if(o==="end"&&n.clear(),s){var u=s.type;E.gestureEvent=u,this.dispatchToElement({target:s.target},u,s.event)}}},J.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(E){l.prototype[E]=function(o){var n=o.zrX,s=o.zrY,u=h(this,n,s),p,S;if((E!=="mouseup"||!u)&&(p=this.findHover(n,s),S=p.target),E==="mousedown")this._downEl=S,this._downPoint=[o.zrX,o.zrY],this._upEl=S;else if(E==="mouseup")this._upEl=S;else if(E==="click"){if(this._downEl!==this._upEl||!this._downPoint||N.dist(this._downPoint,[o.zrX,o.zrY])>4)return;this._downPoint=null}this.dispatchToElement(p,E,o)}});function v(E,o,n){if(E[E.rectHover?"rectContain":"contain"](o,n)){for(var s=E,u;s;){if(s.clipPath&&!s.clipPath.contain(o,n))return!1;s.silent&&(u=!0),s=s.parent}return u?D:!0}return!1}function h(E,o,n){var s=E.painter;return o<0||o>s.getWidth()||n<0||n>s.getHeight()}J.mixin(l,Q),J.mixin(l,O);var d=l;qe.exports=d},"19Vz":function(qe,ue,k){(function(J){J(k("VrN/"))})(function(J){J.defineOption("placeholder","",function(f,b,g){var i=g&&g!=J.Init;if(b&&!i)f.on("blur",R),f.on("change",B),f.on("swapDoc",B),J.on(f.getInputField(),"compositionupdate",f.state.placeholderCompose=function(){Q(f)}),B(f);else if(!b&&i){f.off("blur",R),f.off("change",B),f.off("swapDoc",B),J.off(f.getInputField(),"compositionupdate",f.state.placeholderCompose),N(f);var l=f.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}b&&!f.hasFocus()&&R(f)});function N(f){f.state.placeholder&&(f.state.placeholder.parentNode.removeChild(f.state.placeholder),f.state.placeholder=null)}function O(f){N(f);var b=f.state.placeholder=document.createElement("pre");b.style.cssText="height: 0; overflow: visible",b.style.direction=f.getOption("direction"),b.className="CodeMirror-placeholder CodeMirror-line-like";var g=f.getOption("placeholder");typeof g=="string"&&(g=document.createTextNode(g)),b.appendChild(g),f.display.lineSpace.insertBefore(b,f.display.lineSpace.firstChild)}function Q(f){setTimeout(function(){var b=!1,g=f.getInputField();g.nodeName=="TEXTAREA"?b=!g.value:f.lineCount()==1&&(b=!/[^\u200b]/.test(g.querySelector(".CodeMirror-line").textContent)),b?O(f):N(f)},20)}function R(f){D(f)&&O(f)}function B(f){var b=f.getWrapperElement(),g=D(f);b.className=b.className.replace(" CodeMirror-empty","")+(g?" CodeMirror-empty":""),g?O(f):N(f)}function D(f){return f.lineCount()===1&&f.getLine(0)===""}})},"1Jh7":function(qe,ue,k){var J=k("y+Vt"),N=k("T6xi"),O=J.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(Q,R){N.buildPath(Q,R,!1)}});qe.exports=O},"1MYJ":function(qe,ue,k){var J=k("y+Vt"),N=J.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var O=this.__dirtyPath,Q=this.shape.paths,R=0;R<Q.length;R++)O=O||Q[R].__dirtyPath;this.__dirtyPath=O,this.__dirty=this.__dirty||O},beforeBrush:function(){this._updatePathDirty();for(var O=this.shape.paths||[],Q=this.getGlobalScale(),R=0;R<O.length;R++)O[R].path||O[R].createPathProxy(),O[R].path.setScale(Q[0],Q[1],O[R].segmentIgnoreThreshold)},buildPath:function(O,Q){for(var R=Q.paths||[],B=0;B<R.length;B++)R[B].buildPath(O,R[B].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(),J.prototype.getBoundingRect.call(this)}});qe.exports=N},"1RvN":function(qe,ue){var k=function(){this.head=null,this.tail=null,this._len=0},J=k.prototype;J.insert=function(B){var D=new N(B);return this.insertEntry(D),D},J.insertEntry=function(B){this.head?(this.tail.next=B,B.prev=this.tail,B.next=null,this.tail=B):this.head=this.tail=B,this._len++},J.remove=function(B){var D=B.prev,f=B.next;D?D.next=f:this.head=f,f?f.prev=D:this.tail=D,B.next=B.prev=null,this._len--},J.len=function(){return this._len},J.clear=function(){this.head=this.tail=null,this._len=0};var N=function(B){this.value=B,this.next,this.prev},O=function(B){this._list=new k,this._map={},this._maxSize=B||10,this._lastRemovedEntry=null},Q=O.prototype;Q.put=function(B,D){var f=this._list,b=this._map,g=null;if(b[B]==null){var i=f.len(),l=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var v=f.head;f.remove(v),delete b[v.key],g=v.value,this._lastRemovedEntry=v}l?l.value=D:l=new N(D),l.key=B,f.insertEntry(l),b[B]=l}return g},Q.get=function(B){var D=this._map[B],f=this._list;if(D!=null)return D!==f.tail&&(f.remove(D),f.insertEntry(D)),D.value},Q.clear=function(){this._list.clear(),this._map={}};var R=O;qe.exports=R},"1bdT":function(qe,ue,k){var J=k("3gBT"),N=k("H6uX"),O=k("DN4a"),Q=k("vWvF"),R=k("bYtY"),B=function(f){O.call(this,f),N.call(this,f),Q.call(this,f),this.id=f.id||J()};B.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(f,b){switch(this.draggable){case"horizontal":b=0;break;case"vertical":f=0;break}var g=this.transform;g||(g=this.transform=[1,0,0,1,0,0]),g[4]+=f,g[5]+=b,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(f,b){},attrKV:function(f,b){if(f==="position"||f==="scale"||f==="origin"){if(b){var g=this[f];g||(g=this[f]=[]),g[0]=b[0],g[1]=b[1]}}else this[f]=b},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(f,b){if(typeof f=="string")this.attrKV(f,b);else if(R.isObject(f))for(var g in f)f.hasOwnProperty(g)&&this.attrKV(g,f[g]);return this.dirty(!1),this},setClipPath:function(f){var b=this.__zr;b&&f.addSelfToZr(b),this.clipPath&&this.clipPath!==f&&this.removeClipPath(),this.clipPath=f,f.__zr=b,f.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var f=this.clipPath;f&&(f.__zr&&f.removeSelfFromZr(f.__zr),f.__zr=null,f.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(f){this.__zr=f;var b=this.animators;if(b)for(var g=0;g<b.length;g++)f.animation.addAnimator(b[g]);this.clipPath&&this.clipPath.addSelfToZr(f)},removeSelfFromZr:function(f){this.__zr=null;var b=this.animators;if(b)for(var g=0;g<b.length;g++)f.animation.removeAnimator(b[g]);this.clipPath&&this.clipPath.removeSelfFromZr(f)}},R.mixin(B,Q),R.mixin(B,O),R.mixin(B,N);var D=B;qe.exports=D},"1eCo":function(qe,ue,k){(function(J){J(k("VrN/"))})(function(J){"use strict";var N={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};J.defineMode("xml",function(Q,R){var B=Q.indentUnit,D={},f=R.htmlMode?N:O;for(var b in f)D[b]=f[b];for(var b in R)D[b]=R[b];var g,i;function l(A,L){function T(j){return L.tokenize=j,j(A,L)}var w=A.next();if(w=="<")return A.eat("!")?A.eat("[")?A.match("CDATA[")?T(d("atom","]]>")):null:A.match("--")?T(d("comment","-->")):A.match("DOCTYPE",!0,!0)?(A.eatWhile(/[\w\._\-]/),T(E(1))):null:A.eat("?")?(A.eatWhile(/[\w\._\-]/),L.tokenize=d("meta","?>"),"meta"):(g=A.eat("/")?"closeTag":"openTag",L.tokenize=v,"tag bracket");if(w=="&"){var _;return A.eat("#")?A.eat("x")?_=A.eatWhile(/[a-fA-F\d]/)&&A.eat(";"):_=A.eatWhile(/[\d]/)&&A.eat(";"):_=A.eatWhile(/[\w\.\-:]/)&&A.eat(";"),_?"atom":"error"}else return A.eatWhile(/[^&<]/),null}l.isInText=!0;function v(A,L){var T=A.next();if(T==">"||T=="/"&&A.eat(">"))return L.tokenize=l,g=T==">"?"endTag":"selfcloseTag","tag bracket";if(T=="=")return g="equals",null;if(T=="<"){L.tokenize=l,L.state=u,L.tagName=L.tagStart=null;var w=L.tokenize(A,L);return w?w+" tag error":"tag error"}else return/[\'\"]/.test(T)?(L.tokenize=h(T),L.stringStartCol=A.column(),L.tokenize(A,L)):(A.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(A){var L=function(T,w){for(;!T.eol();)if(T.next()==A){w.tokenize=v;break}return"string"};return L.isInAttribute=!0,L}function d(A,L){return function(T,w){for(;!T.eol();){if(T.match(L)){w.tokenize=l;break}T.next()}return A}}function E(A){return function(L,T){for(var w;(w=L.next())!=null;){if(w=="<")return T.tokenize=E(A+1),T.tokenize(L,T);if(w==">")if(A==1){T.tokenize=l;break}else return T.tokenize=E(A-1),T.tokenize(L,T)}return"meta"}}function o(A,L,T){this.prev=A.context,this.tagName=L,this.indent=A.indented,this.startOfLine=T,(D.doNotIndent.hasOwnProperty(L)||A.context&&A.context.noIndent)&&(this.noIndent=!0)}function n(A){A.context&&(A.context=A.context.prev)}function s(A,L){for(var T;;){if(!A.context)return;if(T=A.context.tagName,!D.contextGrabbers.hasOwnProperty(T)||!D.contextGrabbers[T].hasOwnProperty(L))return;n(A)}}function u(A,L,T){return A=="openTag"?(T.tagStart=L.column(),p):A=="closeTag"?S:u}function p(A,L,T){return A=="word"?(T.tagName=L.current(),i="tag",C):D.allowMissingTagName&&A=="endTag"?(i="tag bracket",C(A,L,T)):(i="error",p)}function S(A,L,T){if(A=="word"){var w=L.current();return T.context&&T.context.tagName!=w&&D.implicitlyClosed.hasOwnProperty(T.context.tagName)&&n(T),T.context&&T.context.tagName==w||D.matchClosing===!1?(i="tag",x):(i="tag error",M)}else return D.allowMissingTagName&&A=="endTag"?(i="tag bracket",x(A,L,T)):(i="error",M)}function x(A,L,T){return A!="endTag"?(i="error",x):(n(T),u)}function M(A,L,T){return i="error",x(A,L,T)}function C(A,L,T){if(A=="word")return i="attribute",c;if(A=="endTag"||A=="selfcloseTag"){var w=T.tagName,_=T.tagStart;return T.tagName=T.tagStart=null,A=="selfcloseTag"||D.autoSelfClosers.hasOwnProperty(w)?s(T,w):(s(T,w),T.context=new o(T,w,_==T.indented)),u}return i="error",C}function c(A,L,T){return A=="equals"?r:(D.allowMissing||(i="error"),C(A,L,T))}function r(A,L,T){return A=="string"?a:A=="word"&&D.allowUnquoted?(i="string",C):(i="error",C(A,L,T))}function a(A,L,T){return A=="string"?a:C(A,L,T)}return{startState:function(A){var L={tokenize:l,state:u,indented:A||0,tagName:null,tagStart:null,context:null};return A!=null&&(L.baseIndent=A),L},token:function(A,L){if(!L.tagName&&A.sol()&&(L.indented=A.indentation()),A.eatSpace())return null;g=null;var T=L.tokenize(A,L);return(T||g)&&T!="comment"&&(i=null,L.state=L.state(g||T,A,L),i&&(T=i=="error"?T+" error":i)),T},indent:function(A,L,T){var w=A.context;if(A.tokenize.isInAttribute)return A.tagStart==A.indented?A.stringStartCol+1:A.indented+B;if(w&&w.noIndent)return J.Pass;if(A.tokenize!=v&&A.tokenize!=l)return T?T.match(/^(\s*)/)[0].length:0;if(A.tagName)return D.multilineTagIndentPastTag!==!1?A.tagStart+A.tagName.length+2:A.tagStart+B*(D.multilineTagIndentFactor||1);if(D.alignCDATA&&/<!\[CDATA\[/.test(L))return 0;var _=L&&/^<(\/)?([\w_:\.-]*)/.exec(L);if(_&&_[1])for(;w;)if(w.tagName==_[2]){w=w.prev;break}else if(D.implicitlyClosed.hasOwnProperty(w.tagName))w=w.prev;else break;else if(_)for(;w;){var j=D.contextGrabbers[w.tagName];if(j&&j.hasOwnProperty(_[2]))w=w.prev;else break}for(;w&&w.prev&&!w.startOfLine;)w=w.prev;return w?w.indent+B:A.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:D.htmlMode?"html":"xml",helperType:D.htmlMode?"html":"xml",skipAttribute:function(A){A.state==r&&(A.state=C)},xmlCurrentTag:function(A){return A.tagName?{name:A.tagName,close:A.type=="closeTag"}:null},xmlCurrentContext:function(A){for(var L=[],T=A.context;T;T=T.prev)T.tagName&&L.push(T.tagName);return L.reverse()}}}),J.defineMIME("text/xml","xml"),J.defineMIME("application/xml","xml"),J.mimeModes.hasOwnProperty("text/html")||J.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1eJ8":function(qe,ue,k){qe.exports={md:"md___1fRow"}},"1j5w":function(qe,ue,k){"use strict";k.d(ue,"d",function(){return ct}),k.d(ue,"b",function(){return Ye}),k.d(ue,"c",function(){return gt}),k.d(ue,"a",function(){return Pt});var J=k("VTBJ"),N=k("1OyB"),O=k("vuIU"),Q=k("JX7q"),R=k("Ji7U"),B=k("LK+K"),D=k("q1tI"),f=k("I8Z2"),b=k("BGR+"),g=k("wx14"),i=k("rePB"),l=k("4IlW"),v=k("2GS6"),h=k("Gytx"),d=k.n(h),E=k("TSYQ"),o=k.n(E),n=k("U8pU"),s=k("ODXe"),u=/iPhone/i,p=/iPod/i,S=/iPad/i,x=/\bAndroid(?:.+)Mobile\b/i,M=/Android/i,C=/\bAndroid(?:.+)SD4930UR\b/i,c=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,r=/Windows Phone/i,a=/\bWindows(?:.+)ARM\b/i,A=/BlackBerry/i,L=/BB10/i,T=/Opera Mini/i,w=/\b(CriOS|Chrome)(?:.+)Mobile/i,_=/Mobile(?:.+)Firefox\b/i;function j(Dt,dt){return Dt.test(dt)}function W(Dt){var dt=Dt||(typeof navigator!="undefined"?navigator.userAgent:""),it=dt.split("[FBAN");if(typeof it[1]!="undefined"){var nt=it,we=Object(s.a)(nt,1);dt=we[0]}if(it=dt.split("Twitter"),typeof it[1]!="undefined"){var Ne=it,ht=Object(s.a)(Ne,1);dt=ht[0]}var ot={apple:{phone:j(u,dt)&&!j(r,dt),ipod:j(p,dt),tablet:!j(u,dt)&&j(S,dt)&&!j(r,dt),device:(j(u,dt)||j(p,dt)||j(S,dt))&&!j(r,dt)},amazon:{phone:j(C,dt),tablet:!j(C,dt)&&j(c,dt),device:j(C,dt)||j(c,dt)},android:{phone:!j(r,dt)&&j(C,dt)||!j(r,dt)&&j(x,dt),tablet:!j(r,dt)&&!j(C,dt)&&!j(x,dt)&&(j(c,dt)||j(M,dt)),device:!j(r,dt)&&(j(C,dt)||j(c,dt)||j(x,dt)||j(M,dt))||j(/\bokhttp\b/i,dt)},windows:{phone:j(r,dt),tablet:j(a,dt),device:j(r,dt)||j(a,dt)},other:{blackberry:j(A,dt),blackberry10:j(L,dt),opera:j(T,dt),firefox:j(_,dt),chrome:j(w,dt),device:j(A,dt)||j(L,dt)||j(T,dt)||j(_,dt)||j(w,dt)},any:null,phone:null,tablet:null};return ot.any=ot.apple.device||ot.android.device||ot.windows.device||ot.other.device,ot.phone=ot.apple.phone||ot.android.phone||ot.windows.phone,ot.tablet=ot.apple.tablet||ot.android.tablet||ot.windows.tablet,ot}var Z=Object(J.a)(Object(J.a)({},W()),{},{isMobile:W}),X=Z;function G(){}function te(Dt,dt,it){var nt=dt||"";return Dt.key||"".concat(nt,"item_").concat(it)}function Y(Dt){return"".concat(Dt,"-menu-")}function le(Dt,dt){var it=-1;D.Children.forEach(Dt,function(nt){it+=1,nt&&nt.type&&nt.type.isMenuItemGroup?D.Children.forEach(nt.props.children,function(we){it+=1,dt(we,it)}):dt(nt,it)})}function Ae(Dt,dt,it){if(!Dt||it.find)return;D.Children.forEach(Dt,function(nt){if(nt){var we=nt.type;if(!we||!(we.isSubMenu||we.isMenuItem||we.isMenuItemGroup))return;dt.indexOf(nt.key)!==-1?it.find=!0:nt.props.children&&Ae(nt.props.children,dt,it)}})}var Be=["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"],Ce=function(dt){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nt=dt&&typeof dt.getBoundingClientRect=="function"&&dt.getBoundingClientRect().width;if(nt){if(it){var we=getComputedStyle(dt),Ne=we.marginLeft,ht=we.marginRight;nt+=+Ne.replace("px","")+ +ht.replace("px","")}nt=+nt.toFixed(6)}return nt||0},Se=function(dt,it,nt){dt&&Object(n.a)(dt.style)==="object"&&(dt.style[it]=nt)},Fe=function(){return X.any},Ve=k("KQm4"),De=k("Ff2n"),Le=k("i8i4"),tt=k("bdgK"),Et=k("uciX"),Ie=k("8XRh"),Qe={adjustX:1,adjustY:1},xe={topLeft:{points:["bl","tl"],overflow:Qe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Qe,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Qe,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Qe,offset:[4,0]}},ie={topLeft:{points:["bl","tl"],overflow:Qe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Qe,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Qe,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Qe,offset:[4,0]}},$=xe,re=0,ce={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},be=function(dt,it,nt){var we=Y(it),Ne=dt.getState();dt.setState({defaultActiveFirst:Object(J.a)(Object(J.a)({},Ne.defaultActiveFirst),{},Object(i.a)({},we,nt))})},Me=function(Dt){Object(R.a)(it,Dt);var dt=Object(B.a)(it);function it(nt){var we;Object(N.a)(this,it),we=dt.call(this,nt),we.onDestroy=function(rt){we.props.onDestroy(rt)},we.onKeyDown=function(rt){var st=rt.keyCode,St=we.menuInstance,It=we.props,Qt=It.isOpen,gr=It.store;if(st===l.a.ENTER)return we.onTitleClick(rt),be(gr,we.props.eventKey,!0),!0;if(st===l.a.RIGHT)return Qt?St.onKeyDown(rt):(we.triggerOpenChange(!0),be(gr,we.props.eventKey,!0)),!0;if(st===l.a.LEFT){var vr;if(Qt)vr=St.onKeyDown(rt);else return;return vr||(we.triggerOpenChange(!1),vr=!0),vr}return Qt&&(st===l.a.UP||st===l.a.DOWN)?St.onKeyDown(rt):void 0},we.onOpenChange=function(rt){we.props.onOpenChange(rt)},we.onPopupVisibleChange=function(rt){we.triggerOpenChange(rt,rt?"mouseenter":"mouseleave")},we.onMouseEnter=function(rt){var st=we.props,St=st.eventKey,It=st.onMouseEnter,Qt=st.store;be(Qt,we.props.eventKey,!1),It({key:St,domEvent:rt})},we.onMouseLeave=function(rt){var st=we.props,St=st.parentMenu,It=st.eventKey,Qt=st.onMouseLeave;St.subMenuInstance=Object(Q.a)(we),Qt({key:It,domEvent:rt})},we.onTitleMouseEnter=function(rt){var st=we.props,St=st.eventKey,It=st.onItemHover,Qt=st.onTitleMouseEnter;It({key:St,hover:!0}),Qt({key:St,domEvent:rt})},we.onTitleMouseLeave=function(rt){var st=we.props,St=st.parentMenu,It=st.eventKey,Qt=st.onItemHover,gr=st.onTitleMouseLeave;St.subMenuInstance=Object(Q.a)(we),Qt({key:It,hover:!1}),gr({key:It,domEvent:rt})},we.onTitleClick=function(rt){var st=Object(Q.a)(we),St=st.props;if(St.onTitleClick({key:St.eventKey,domEvent:rt}),St.triggerSubMenuAction==="hover")return;we.triggerOpenChange(!St.isOpen,"click"),be(St.store,we.props.eventKey,!1)},we.onSubMenuClick=function(rt){typeof we.props.onClick=="function"&&we.props.onClick(we.addKeyPath(rt))},we.onSelect=function(rt){we.props.onSelect(rt)},we.onDeselect=function(rt){we.props.onDeselect(rt)},we.getPrefixCls=function(){return"".concat(we.props.rootPrefixCls,"-submenu")},we.getActiveClassName=function(){return"".concat(we.getPrefixCls(),"-active")},we.getDisabledClassName=function(){return"".concat(we.getPrefixCls(),"-disabled")},we.getSelectedClassName=function(){return"".concat(we.getPrefixCls(),"-selected")},we.getOpenClassName=function(){return"".concat(we.props.rootPrefixCls,"-submenu-open")},we.saveMenuInstance=function(rt){we.menuInstance=rt},we.addKeyPath=function(rt){return Object(J.a)(Object(J.a)({},rt),{},{keyPath:(rt.keyPath||[]).concat(we.props.eventKey)})},we.triggerOpenChange=function(rt,st){var St=we.props.eventKey,It=function(){we.onOpenChange({key:St,item:Object(Q.a)(we),trigger:st,open:rt})};st==="mouseenter"?we.mouseenterTimeout=setTimeout(function(){It()},0):It()},we.isChildrenSelected=function(){var rt={find:!1};return Ae(we.props.children,we.props.selectedKeys,rt),rt.find},we.isOpen=function(){return we.props.openKeys.indexOf(we.props.eventKey)!==-1},we.adjustWidth=function(){if(!we.subMenuTitle||!we.menuInstance)return;var rt=Le.findDOMNode(we.menuInstance);if(rt.offsetWidth>=we.subMenuTitle.offsetWidth)return;rt.style.minWidth="".concat(we.subMenuTitle.offsetWidth,"px")},we.saveSubMenuTitle=function(rt){we.subMenuTitle=rt},we.getBaseProps=function(){var rt=Object(Q.a)(we),st=rt.props;return{mode:st.mode==="horizontal"?"vertical":st.mode,visible:we.props.isOpen,level:st.level+1,inlineIndent:st.inlineIndent,focusable:!1,onClick:we.onSubMenuClick,onSelect:we.onSelect,onDeselect:we.onDeselect,onDestroy:we.onDestroy,selectedKeys:st.selectedKeys,eventKey:"".concat(st.eventKey,"-menu-"),openKeys:st.openKeys,motion:st.motion,onOpenChange:we.onOpenChange,subMenuOpenDelay:st.subMenuOpenDelay,parentMenu:Object(Q.a)(we),subMenuCloseDelay:st.subMenuCloseDelay,forceSubMenuRender:st.forceSubMenuRender,triggerSubMenuAction:st.triggerSubMenuAction,builtinPlacements:st.builtinPlacements,defaultActiveFirst:st.store.getState().defaultActiveFirst[Y(st.eventKey)],multiple:st.multiple,prefixCls:st.rootPrefixCls,id:we.internalMenuId,manualRef:we.saveMenuInstance,itemIcon:st.itemIcon,expandIcon:st.expandIcon,direction:st.direction}},we.getMotion=function(rt,st){var St=Object(Q.a)(we),It=St.haveRendered,Qt=we.props,gr=Qt.motion,vr=Qt.rootPrefixCls,cr=Object(J.a)(Object(J.a)({},gr),{},{leavedClassName:"".concat(vr,"-hidden"),removeOnLeave:!1,motionAppear:It||!st||rt!=="inline"});return cr};var Ne=nt.store,ht=nt.eventKey,ot=Ne.getState(),Bt=ot.defaultActiveFirst;we.isRootMenu=!1;var wt=!1;return Bt&&(wt=Bt[ht]),be(Ne,ht,wt),we}return Object(O.a)(it,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var we=this,Ne=this.props,ht=Ne.mode,ot=Ne.parentMenu,Bt=Ne.manualRef;if(Bt&&Bt(this),ht!=="horizontal"||!ot.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return we.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var we=this.props,Ne=we.onDestroy,ht=we.eventKey;Ne&&Ne(ht),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(we){var Ne=this,ht=this.getBaseProps(),ot=this.getMotion(ht.mode,ht.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ht.visible||ht.forceSubMenuRender,!this.haveOpened)return D.createElement("div",null);var Bt=ht.direction;return D.createElement(Ie.default,Object.assign({visible:ht.visible},ot),function(wt){var rt=wt.className,st=wt.style,St=o()("".concat(ht.prefixCls,"-sub"),rt,Object(i.a)({},"".concat(ht.prefixCls,"-rtl"),Bt==="rtl"));return D.createElement(je,Object.assign({},ht,{id:Ne.internalMenuId,className:St,style:st}),we)})}},{key:"render",value:function(){var we,Ne=Object(J.a)({},this.props),ht=Ne.isOpen,ot=this.getPrefixCls(),Bt=Ne.mode==="inline",wt=o()(ot,"".concat(ot,"-").concat(Ne.mode),(we={},Object(i.a)(we,Ne.className,!!Ne.className),Object(i.a)(we,this.getOpenClassName(),ht),Object(i.a)(we,this.getActiveClassName(),Ne.active||ht&&!Bt),Object(i.a)(we,this.getDisabledClassName(),Ne.disabled),Object(i.a)(we,this.getSelectedClassName(),this.isChildrenSelected()),we));this.internalMenuId||(Ne.eventKey?this.internalMenuId="".concat(Ne.eventKey,"$Menu"):(re+=1,this.internalMenuId="$__$".concat(re,"$Menu")));var rt={},st={},St={};Ne.disabled||(rt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},st={onClick:this.onTitleClick},St={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var It={},Qt=Ne.direction;Bt&&(Qt==="rtl"?It.paddingRight=Ne.inlineIndent*Ne.level:It.paddingLeft=Ne.inlineIndent*Ne.level);var gr={};this.props.isOpen&&(gr={"aria-owns":this.internalMenuId});var vr=null;Ne.mode!=="horizontal"&&(vr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(vr=D.createElement(this.props.expandIcon,Object(J.a)({},this.props))));var cr=D.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:It,className:"".concat(ot,"-title"),role:"button"},St,st,{"aria-expanded":ht},gr,{"aria-haspopup":"true",title:typeof Ne.title=="string"?Ne.title:void 0}),Ne.title,vr||D.createElement("i",{className:"".concat(ot,"-arrow")})),jt=this.renderChildren(Ne.children),Ir=Ne.parentMenu.isRootMenu?Ne.parentMenu.props.getPopupContainer:function(Je){return Je.parentNode},kr=ce[Ne.mode],_r=Ne.popupOffset?{offset:Ne.popupOffset}:{},hr=Ne.mode==="inline"?"":Ne.popupClassName;hr+=Qt==="rtl"?" ".concat(ot,"-rtl"):"";var Sr=Ne.disabled,sn=Ne.triggerSubMenuAction,en=Ne.subMenuOpenDelay,he=Ne.forceSubMenuRender,ge=Ne.subMenuCloseDelay,Re=Ne.builtinPlacements;Be.forEach(function(Je){return delete Ne[Je]}),delete Ne.onClick;var Ze=Qt==="rtl"?Object.assign({},ie,Re):Object.assign({},xe,Re);return delete Ne.direction,D.createElement("li",Object.assign({},Ne,rt,{className:wt,role:"menuitem"}),Bt&&cr,Bt&&jt,!Bt&&D.createElement(Et.a,{prefixCls:ot,popupClassName:o()("".concat(ot,"-popup"),hr),getPopupContainer:Ir,builtinPlacements:Ze,popupPlacement:kr,popupVisible:ht,popupAlign:_r,popup:jt,action:Sr?[]:[sn],mouseEnterDelay:en,mouseLeaveDelay:ge,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:he},cr))}}]),it}(D.Component);Me.defaultProps={onMouseEnter:G,onMouseLeave:G,onTitleMouseEnter:G,onTitleMouseLeave:G,onTitleClick:G,manualRef:G,mode:"vertical",title:""};var ke=Object(f.b)(function(Dt,dt){var it=Dt.openKeys,nt=Dt.activeKey,we=Dt.selectedKeys,Ne=dt.eventKey,ht=dt.subMenuKey;return{isOpen:it.indexOf(Ne)>-1,active:nt[ht]===Ne,selectedKeys:we}})(Me);ke.isSubMenu=!0;var ct=ke,ut="menuitem-overflowed",mt=.5,pt=function(Dt){Object(R.a)(it,Dt);var dt=Object(B.a)(it);function it(){var nt;return Object(N.a)(this,it),nt=dt.apply(this,arguments),nt.resizeObserver=null,nt.mutationObserver=null,nt.originalTotalWidth=0,nt.overflowedItems=[],nt.menuItemSizes=[],nt.cancelFrameId=null,nt.state={lastVisibleIndex:void 0},nt.getMenuItemNodes=function(){var we=nt.props.prefixCls,Ne=Le.findDOMNode(Object(Q.a)(nt));return Ne?[].slice.call(Ne.children).filter(function(ht){return ht.className.split(" ").indexOf("".concat(we,"-overflowed-submenu"))<0}):[]},nt.getOverflowedSubMenuItem=function(we,Ne,ht){var ot=nt.props,Bt=ot.overflowedIndicator,wt=ot.level,rt=ot.mode,st=ot.prefixCls,St=ot.theme;if(wt!==1||rt!=="horizontal")return null;var It=nt.props.children[0],Qt=It.props,gr=Qt.children,vr=Qt.title,cr=Qt.style,jt=Object(De.a)(Qt,["children","title","style"]),Ir=Object(J.a)({},cr),kr="".concat(we,"-overflowed-indicator"),_r="".concat(we,"-overflowed-indicator");Ne.length===0&&ht!==!0?Ir=Object(J.a)(Object(J.a)({},Ir),{},{display:"none"}):ht&&(Ir=Object(J.a)(Object(J.a)({},Ir),{},{visibility:"hidden",position:"absolute"}),kr="".concat(kr,"-placeholder"),_r="".concat(_r,"-placeholder"));var hr=St?"".concat(st,"-").concat(St):"",Sr={};return Be.forEach(function(sn){jt[sn]!==void 0&&(Sr[sn]=jt[sn])}),D.createElement(ct,Object.assign({title:Bt,className:"".concat(st,"-overflowed-submenu"),popupClassName:hr},Sr,{key:kr,eventKey:_r,disabled:!1,style:Ir}),Ne)},nt.setChildrenWidthAndResize=function(){if(nt.props.mode!=="horizontal")return;var we=Le.findDOMNode(Object(Q.a)(nt));if(!we)return;var Ne=we.children;if(!Ne||Ne.length===0)return;var ht=we.children[Ne.length-1];Se(ht,"display","inline-block");var ot=nt.getMenuItemNodes(),Bt=ot.filter(function(wt){return wt.className.split(" ").indexOf(ut)>=0});Bt.forEach(function(wt){Se(wt,"display","inline-block")}),nt.menuItemSizes=ot.map(function(wt){return Ce(wt,!0)}),Bt.forEach(function(wt){Se(wt,"display","none")}),nt.overflowedIndicatorWidth=Ce(we.children[we.children.length-1],!0),nt.originalTotalWidth=nt.menuItemSizes.reduce(function(wt,rt){return wt+rt},0),nt.handleResize(),Se(ht,"display","none")},nt.handleResize=function(){if(nt.props.mode!=="horizontal")return;var we=Le.findDOMNode(Object(Q.a)(nt));if(!we)return;var Ne=Ce(we);nt.overflowedItems=[];var ht=0,ot;nt.originalTotalWidth>Ne+mt&&(ot=-1,nt.menuItemSizes.forEach(function(Bt){ht+=Bt,ht+nt.overflowedIndicatorWidth<=Ne&&(ot+=1)})),nt.setState({lastVisibleIndex:ot})},nt}return Object(O.a)(it,[{key:"componentDidMount",value:function(){var we=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ne=Le.findDOMNode(this);if(!Ne)return;this.resizeObserver=new tt.default(function(ht){ht.forEach(function(){var ot=we.cancelFrameId;cancelAnimationFrame(ot),we.cancelFrameId=requestAnimationFrame(we.setChildrenWidthAndResize)})}),[].slice.call(Ne.children).concat(Ne).forEach(function(ht){we.resizeObserver.observe(ht)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){we.resizeObserver.disconnect(),[].slice.call(Ne.children).concat(Ne).forEach(function(ht){we.resizeObserver.observe(ht)}),we.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(we){var Ne=this,ht=this.state.lastVisibleIndex;return(we||[]).reduce(function(ot,Bt,wt){var rt=Bt;if(Ne.props.mode==="horizontal"){var st=Ne.getOverflowedSubMenuItem(Bt.props.eventKey,[]);ht!==void 0&&Ne.props.className.indexOf("".concat(Ne.props.prefixCls,"-root"))!==-1&&(wt>ht&&(rt=D.cloneElement(Bt,{style:{display:"none"},eventKey:"".concat(Bt.props.eventKey,"-hidden"),className:"".concat(ut)})),wt===ht+1&&(Ne.overflowedItems=we.slice(ht+1).map(function(It){return D.cloneElement(It,{key:It.props.eventKey,mode:"vertical-left"})}),st=Ne.getOverflowedSubMenuItem(Bt.props.eventKey,Ne.overflowedItems)));var St=[].concat(Object(Ve.a)(ot),[st,rt]);return wt===we.length-1&&St.push(Ne.getOverflowedSubMenuItem(Bt.props.eventKey,[],!0)),St}return[].concat(Object(Ve.a)(ot),[rt])},[])}},{key:"render",value:function(){var we=this.props,Ne=we.visible,ht=we.prefixCls,ot=we.overflowedIndicator,Bt=we.mode,wt=we.level,rt=we.tag,st=we.children,St=we.theme,It=Object(De.a)(we,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Qt=rt;return D.createElement(Qt,Object.assign({},It),this.renderChildren(st))}}]),it}(D.Component);pt.defaultProps={tag:"div",className:""};var Ot=pt;function Ft(Dt){return Dt.length?Dt.every(function(dt){return!!dt.props.disabled}):!0}function He(Dt,dt,it){var nt=Dt.getState();Dt.setState({activeKey:Object(J.a)(Object(J.a)({},nt.activeKey),{},Object(i.a)({},dt,it))})}function Pe(Dt){return Dt.eventKey||"0-menu-"}function at(Dt,dt){var it=dt,nt=Dt.children,we=Dt.eventKey;if(it){var Ne;if(le(nt,function(ht,ot){ht&&ht.props&&!ht.props.disabled&&it===te(ht,we,ot)&&(Ne=!0)}),Ne)return it}return it=null,Dt.defaultActiveFirst&&le(nt,function(ht,ot){!it&&ht&&!ht.props.disabled&&(it=te(ht,we,ot))}),it}function vt(Dt){if(Dt){var dt=this.instanceArray.indexOf(Dt);dt!==-1?this.instanceArray[dt]=Dt:this.instanceArray.push(Dt)}}var et=function(Dt){Object(R.a)(it,Dt);var dt=Object(B.a)(it);function it(nt){var we;return Object(N.a)(this,it),we=dt.call(this,nt),we.onKeyDown=function(Ne,ht){var ot=Ne.keyCode,Bt;if(we.getFlatInstanceArray().forEach(function(rt){rt&&rt.props.active&&rt.onKeyDown&&(Bt=rt.onKeyDown(Ne))}),Bt)return 1;var wt=null;return(ot===l.a.UP||ot===l.a.DOWN)&&(wt=we.step(ot===l.a.UP?-1:1)),wt?(Ne.preventDefault(),He(we.props.store,Pe(we.props),wt.props.eventKey),typeof ht=="function"&&ht(wt),1):void 0},we.onItemHover=function(Ne){var ht=Ne.key,ot=Ne.hover;He(we.props.store,Pe(we.props),ot?ht:null)},we.onDeselect=function(Ne){we.props.onDeselect(Ne)},we.onSelect=function(Ne){we.props.onSelect(Ne)},we.onClick=function(Ne){we.props.onClick(Ne)},we.onOpenChange=function(Ne){we.props.onOpenChange(Ne)},we.onDestroy=function(Ne){we.props.onDestroy(Ne)},we.getFlatInstanceArray=function(){return we.instanceArray},we.step=function(Ne){var ht=we.getFlatInstanceArray(),ot=we.props.store.getState().activeKey[Pe(we.props)],Bt=ht.length;if(!Bt)return null;Ne<0&&(ht=ht.concat().reverse());var wt=-1;if(ht.every(function(It,Qt){return It&&It.props.eventKey===ot?(wt=Qt,!1):!0}),!we.props.defaultActiveFirst&&wt!==-1&&Ft(ht.slice(wt,Bt-1)))return;var rt=(wt+1)%Bt,st=rt;do{var St=ht[st];if(!St||St.props.disabled)st=(st+1)%Bt;else return St}while(st!==rt);return null},we.renderCommonMenuItem=function(Ne,ht,ot){var Bt=we.props.store.getState(),wt=Object(Q.a)(we),rt=wt.props,st=te(Ne,rt.eventKey,ht),St=Ne.props;if(!St||typeof Ne.type=="string")return Ne;var It=st===Bt.activeKey,Qt=Object(J.a)(Object(J.a)({mode:St.mode||rt.mode,level:rt.level,inlineIndent:rt.inlineIndent,renderMenuItem:we.renderMenuItem,rootPrefixCls:rt.prefixCls,index:ht,parentMenu:rt.parentMenu,manualRef:St.disabled?void 0:Object(v.a)(Ne.ref,vt.bind(Object(Q.a)(we))),eventKey:st,active:!St.disabled&&It,multiple:rt.multiple,onClick:function(vr){(St.onClick||G)(vr),we.onClick(vr)},onItemHover:we.onItemHover,motion:rt.motion,subMenuOpenDelay:rt.subMenuOpenDelay,subMenuCloseDelay:rt.subMenuCloseDelay,forceSubMenuRender:rt.forceSubMenuRender,onOpenChange:we.onOpenChange,onDeselect:we.onDeselect,onSelect:we.onSelect,builtinPlacements:rt.builtinPlacements,itemIcon:St.itemIcon||we.props.itemIcon,expandIcon:St.expandIcon||we.props.expandIcon},ot),{},{direction:rt.direction});return(rt.mode==="inline"||Fe())&&(Qt.triggerSubMenuAction="click"),D.cloneElement(Ne,Qt)},we.renderMenuItem=function(Ne,ht,ot){if(!Ne)return null;var Bt=we.props.store.getState(),wt={openKeys:Bt.openKeys,selectedKeys:Bt.selectedKeys,triggerSubMenuAction:we.props.triggerSubMenuAction,subMenuKey:ot};return we.renderCommonMenuItem(Ne,ht,wt)},nt.store.setState({activeKey:Object(J.a)(Object(J.a)({},nt.store.getState().activeKey),{},Object(i.a)({},nt.eventKey,at(nt,nt.activeKey)))}),we.instanceArray=[],we}return Object(O.a)(it,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(we){return this.props.visible||we.visible||this.props.className!==we.className||!d()(this.props.style,we.style)}},{key:"componentDidUpdate",value:function(we){var Ne=this.props,ht="activeKey"in Ne?Ne.activeKey:Ne.store.getState().activeKey[Pe(Ne)],ot=at(Ne,ht);if(ot!==ht)He(Ne.store,Pe(Ne),ot);else if("activeKey"in we){var Bt=at(we,we.activeKey);ot!==Bt&&He(Ne.store,Pe(Ne),ot)}}},{key:"render",value:function(){var we=this,Ne=Object(g.a)({},this.props);this.instanceArray=[];var ht=o()(Ne.prefixCls,Ne.className,"".concat(Ne.prefixCls,"-").concat(Ne.mode)),ot={className:ht,role:Ne.role||"menu"};Ne.id&&(ot.id=Ne.id),Ne.focusable&&(ot.tabIndex=0,ot.onKeyDown=this.onKeyDown);var Bt=Ne.prefixCls,wt=Ne.eventKey,rt=Ne.visible,st=Ne.level,St=Ne.mode,It=Ne.overflowedIndicator,Qt=Ne.theme;return Be.forEach(function(gr){return delete Ne[gr]}),delete Ne.onClick,D.createElement(Ot,Object.assign({},Ne,{prefixCls:Bt,mode:St,tag:"ul",level:st,theme:Qt,visible:rt,overflowedIndicator:It},ot),D.Children.map(Ne.children,function(gr,vr){return we.renderMenuItem(gr,vr,wt||"0-menu-")}))}}]),it}(D.Component);et.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:G};var At=Object(f.b)()(et),je=At,_e=k("Kwbf");function Ue(Dt,dt,it){var nt=Dt.prefixCls,we=Dt.motion,Ne=Dt.defaultMotions,ht=Ne===void 0?{}:Ne,ot=Dt.openAnimation,Bt=Dt.openTransitionName,wt=dt.switchingModeFromInline;if(we)return we;if(Object(n.a)(ot)==="object"&&ot)Object(_e.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ot=="string")return{motionName:"".concat(nt,"-open-").concat(ot)};if(Bt)return{motionName:Bt};var rt=ht[it];return rt||(wt?null:ht.other)}var me=function(Dt){Object(R.a)(it,Dt);var dt=Object(B.a)(it);function it(nt){var we;Object(N.a)(this,it),we=dt.call(this,nt),we.inlineOpenKeys=[],we.onSelect=function(ot){var Bt=Object(Q.a)(we),wt=Bt.props;if(wt.selectable){var rt=we.store.getState(),st=rt.selectedKeys,St=ot.key;wt.multiple?st=st.concat([St]):st=[St],"selectedKeys"in wt||we.store.setState({selectedKeys:st}),wt.onSelect(Object(J.a)(Object(J.a)({},ot),{},{selectedKeys:st}))}},we.onClick=function(ot){var Bt=we.getRealMenuMode(),wt=Object(Q.a)(we),rt=wt.store,st=wt.props.onOpenChange;Bt!=="inline"&&!("openKeys"in we.props)&&(rt.setState({openKeys:[]}),st([])),we.props.onClick(ot)},we.onKeyDown=function(ot,Bt){we.innerMenu.getWrappedInstance().onKeyDown(ot,Bt)},we.onOpenChange=function(ot){var Bt=Object(Q.a)(we),wt=Bt.props,rt=we.store.getState().openKeys.concat(),st=!1,St=function(Qt){var gr=!1;if(Qt.open)gr=rt.indexOf(Qt.key)===-1,gr&&rt.push(Qt.key);else{var vr=rt.indexOf(Qt.key);gr=vr!==-1,gr&&rt.splice(vr,1)}st=st||gr};Array.isArray(ot)?ot.forEach(St):St(ot),st&&("openKeys"in we.props||we.store.setState({openKeys:rt}),wt.onOpenChange(rt))},we.onDeselect=function(ot){var Bt=Object(Q.a)(we),wt=Bt.props;if(wt.selectable){var rt=we.store.getState().selectedKeys.concat(),st=ot.key,St=rt.indexOf(st);St!==-1&&rt.splice(St,1),"selectedKeys"in wt||we.store.setState({selectedKeys:rt}),wt.onDeselect(Object(J.a)(Object(J.a)({},ot),{},{selectedKeys:rt}))}},we.onMouseEnter=function(ot){we.restoreModeVerticalFromInline();var Bt=we.props.onMouseEnter;Bt&&Bt(ot)},we.onTransitionEnd=function(ot){var Bt=ot.propertyName==="width"&&ot.target===ot.currentTarget,wt=ot.target.className,rt=Object.prototype.toString.call(wt)==="[object SVGAnimatedString]"?wt.animVal:wt,st=ot.propertyName==="font-size"&&rt.indexOf("anticon")>=0;(Bt||st)&&we.restoreModeVerticalFromInline()},we.setInnerMenu=function(ot){we.innerMenu=ot},we.isRootMenu=!0;var Ne=nt.defaultSelectedKeys,ht=nt.defaultOpenKeys;return"selectedKeys"in nt&&(Ne=nt.selectedKeys||[]),"openKeys"in nt&&(ht=nt.openKeys||[]),we.store=Object(f.c)({selectedKeys:Ne,openKeys:ht,activeKey:{"0-menu-":at(nt,nt.activeKey)}}),we.state={switchingModeFromInline:!1},we}return Object(O.a)(it,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(we){this.updateOpentKeysWhenSwitchMode(we),this.updateMiniStore();var Ne=this.props,ht=Ne.siderCollapsed,ot=Ne.inlineCollapsed,Bt=Ne.onOpenChange;(!we.inlineCollapsed&&ot||!we.siderCollapsed&&ht)&&Bt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(we){var Ne=this.props,ht=this.store,ot=this.inlineOpenKeys,Bt=ht.getState(),wt={};we.mode==="inline"&&Ne.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Ne||((Ne.inlineCollapsed&&!we.inlineCollapsed||Ne.siderCollapsed&&!we.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Bt.openKeys.concat(),wt.openKeys=[]),(!Ne.inlineCollapsed&&we.inlineCollapsed||!Ne.siderCollapsed&&we.siderCollapsed)&&(wt.openKeys=ot,this.inlineOpenKeys=[])),Object.keys(wt).length&&ht.setState(wt)}},{key:"updateMenuDisplay",value:function(){var we=this.props.collapsedWidth,Ne=this.store,ht=this.prevOpenKeys,ot=this.getInlineCollapsed()&&(we===0||we==="0"||we==="0px");ot?(this.prevOpenKeys=Ne.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ht&&(this.store.setState({openKeys:ht}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var we=this.props.mode,Ne=this.state.switchingModeFromInline,ht=this.getInlineCollapsed();return Ne&&ht?"inline":ht?"vertical":we}},{key:"getInlineCollapsed",value:function(){var we=this.props,Ne=we.inlineCollapsed,ht=we.siderCollapsed;return ht!==void 0?ht:Ne}},{key:"restoreModeVerticalFromInline",value:function(){var we=this.state.switchingModeFromInline;we&&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 we=Object(J.a)({},Object(b.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ne=this.getRealMenuMode();return we.className+=" ".concat(we.prefixCls,"-root"),we.direction==="rtl"&&(we.className+=" ".concat(we.prefixCls,"-rtl")),we=Object(J.a)(Object(J.a)({},we),{},{mode:Ne,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ue(this.props,this.state,Ne)}),delete we.openAnimation,delete we.openTransitionName,D.createElement(f.a,{store:this.store},D.createElement(je,Object.assign({},we,{ref:this.setInnerMenu}),this.props.children))}}]),it}(D.Component);me.defaultProps={selectable:!0,onClick:G,onSelect:G,onOpenChange:G,onDeselect:G,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:D.createElement("span",null,"\xB7\xB7\xB7")};var ve=me,Ee=function(Dt){Object(R.a)(it,Dt);var dt=Object(B.a)(it);function it(){var nt;return Object(N.a)(this,it),nt=dt.apply(this,arguments),nt.onKeyDown=function(we){var Ne=we.keyCode;return Ne===l.a.ENTER?(nt.onClick(we),!0):void 0},nt.onMouseLeave=function(we){var Ne=nt.props,ht=Ne.eventKey,ot=Ne.onItemHover,Bt=Ne.onMouseLeave;ot({key:ht,hover:!1}),Bt({key:ht,domEvent:we})},nt.onMouseEnter=function(we){var Ne=nt.props,ht=Ne.eventKey,ot=Ne.onItemHover,Bt=Ne.onMouseEnter;ot({key:ht,hover:!0}),Bt({key:ht,domEvent:we})},nt.onClick=function(we){var Ne=nt.props,ht=Ne.eventKey,ot=Ne.multiple,Bt=Ne.onClick,wt=Ne.onSelect,rt=Ne.onDeselect,st=Ne.isSelected,St={key:ht,keyPath:[ht],item:Object(Q.a)(nt),domEvent:we};Bt(St),ot?st?rt(St):wt(St):st||wt(St)},nt.saveNode=function(we){nt.node=we},nt}return Object(O.a)(it,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var we=this.props;we.onDestroy&&we.onDestroy(we.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 we,Ne=Object(J.a)({},this.props),ht=o()(this.getPrefixCls(),Ne.className,(we={},Object(i.a)(we,this.getActiveClassName(),!Ne.disabled&&Ne.active),Object(i.a)(we,this.getSelectedClassName(),Ne.isSelected),Object(i.a)(we,this.getDisabledClassName(),Ne.disabled),we)),ot=Object(J.a)(Object(J.a)({},Ne.attribute),{},{title:typeof Ne.title=="string"?Ne.title:void 0,className:ht,role:Ne.role||"menuitem","aria-disabled":Ne.disabled});Ne.role==="option"?ot=Object(J.a)(Object(J.a)({},ot),{},{role:"option","aria-selected":Ne.isSelected}):(Ne.role===null||Ne.role==="none")&&(ot.role="none");var Bt={onClick:Ne.disabled?null:this.onClick,onMouseLeave:Ne.disabled?null:this.onMouseLeave,onMouseEnter:Ne.disabled?null:this.onMouseEnter},wt=Object(J.a)({},Ne.style);Ne.mode==="inline"&&(Ne.direction==="rtl"?wt.paddingRight=Ne.inlineIndent*Ne.level:wt.paddingLeft=Ne.inlineIndent*Ne.level),Be.forEach(function(st){return delete Ne[st]}),delete Ne.direction;var rt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(rt=D.createElement(this.props.itemIcon,this.props)),D.createElement("li",Object.assign({},Object(b.default)(Ne,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ot,Bt,{style:wt,ref:this.saveNode}),Ne.children,rt)}}]),it}(D.Component);Ee.isMenuItem=!0,Ee.defaultProps={onSelect:G,onMouseEnter:G,onMouseLeave:G,manualRef:G};var Oe=Object(f.b)(function(Dt,dt){var it=Dt.activeKey,nt=Dt.selectedKeys,we=dt.eventKey,Ne=dt.subMenuKey;return{active:it[Ne]===we,isSelected:nt.indexOf(we)!==-1}})(Ee),Ye=Oe,ze=function(Dt){Object(R.a)(it,Dt);var dt=Object(B.a)(it);function it(){var nt;return Object(N.a)(this,it),nt=dt.apply(this,arguments),nt.renderInnerMenuItem=function(we){var Ne=nt.props,ht=Ne.renderMenuItem,ot=Ne.index;return ht(we,ot,nt.props.subMenuKey)},nt}return Object(O.a)(it,[{key:"render",value:function(){var we=Object(g.a)({},this.props),Ne=we.className,ht=Ne===void 0?"":Ne,ot=we.rootPrefixCls,Bt="".concat(ot,"-item-group-title"),wt="".concat(ot,"-item-group-list"),rt=we.title,st=we.children;return Be.forEach(function(St){return delete we[St]}),delete we.onClick,delete we.direction,D.createElement("li",Object.assign({},we,{className:"".concat(ht," ").concat(ot,"-item-group")}),D.createElement("div",{className:Bt,title:typeof rt=="string"?rt:void 0},rt),D.createElement("ul",{className:wt},D.Children.map(st,this.renderInnerMenuItem)))}}]),it}(D.Component);ze.isMenuItemGroup=!0,ze.defaultProps={disabled:!0};var gt=ze,Lt=function(dt){var it=dt.className,nt=dt.rootPrefixCls,we=dt.style;return D.createElement("li",{className:"".concat(it," ").concat(nt,"-item-divider"),style:we})};Lt.defaultProps={disabled:!0,className:"",style:{}};var Pt=Lt,Rt=ue.e=ve},"24YM":function(qe,ue,k){"use strict";Object.defineProperty(ue,"__esModule",{value:!0}),ue.SensorTabIndex=ue.SensorClassName=ue.SizeSensorId=void 0;var J="size-sensor-id";ue.SizeSensorId=J;var N="size-sensor-object";ue.SensorClassName=N;var O="-1";ue.SensorTabIndex=O},"24hK":function(qe,ue,k){"use strict";k.d(ue,"a",function(){return O});var J=k("JYp7"),N=function(){function Q(R){this.element=R,this.next=Q.Undefined,this.prev=Q.Undefined}return Q.Undefined=new Q(void 0),Q}(),O=function(){function Q(){this._first=N.Undefined,this._last=N.Undefined,this._size=0}return Object.defineProperty(Q.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Q.prototype.isEmpty=function(){return this._first===N.Undefined},Q.prototype.clear=function(){this._first=N.Undefined,this._last=N.Undefined,this._size=0},Q.prototype.unshift=function(R){return this._insert(R,!1)},Q.prototype.push=function(R){return this._insert(R,!0)},Q.prototype._insert=function(R,B){var D=this,f=new N(R);if(this._first===N.Undefined)this._first=f,this._last=f;else if(B){var b=this._last;this._last=f,f.prev=b,b.next=f}else{var g=this._first;this._first=f,f.next=g,g.prev=f}this._size+=1;var i=!1;return function(){i||(i=!0,D._remove(f))}},Q.prototype.shift=function(){if(this._first===N.Undefined)return;var R=this._first.element;return this._remove(this._first),R},Q.prototype.pop=function(){if(this._last===N.Undefined)return;var R=this._last.element;return this._remove(this._last),R},Q.prototype._remove=function(R){if(R.prev!==N.Undefined&&R.next!==N.Undefined){var B=R.prev;B.next=R.next,R.next.prev=B}else R.prev===N.Undefined&&R.next===N.Undefined?(this._first=N.Undefined,this._last=N.Undefined):R.next===N.Undefined?(this._last=this._last.prev,this._last.next=N.Undefined):R.prev===N.Undefined&&(this._first=this._first.next,this._first.prev=N.Undefined);this._size-=1},Q.prototype.iterator=function(){var R,B=this._first;return{next:function(){return B===N.Undefined?J.c:(R?R.value=B.element:R={done:!1,value:B.element},B=B.next,R)}}},Q.prototype.toArray=function(){for(var R=[],B=this._first;B!==N.Undefined;B=B.next)R.push(B.element);return R},Q}()},"2DNl":function(qe,ue,k){var J=k("IMiH"),N=k("loD1"),O=k("59Ip"),Q=k("aKvl"),R=k("n1HI"),B=k("hX1E"),D=B.normalizeRadian,f=k("Sj9i"),b=k("hyiK"),g=J.CMD,i=Math.PI*2,l=1e-4;function v(x,M){return Math.abs(x-M)<l}var h=[-1,-1,-1],d=[-1,-1];function E(){var x=d[0];d[0]=d[1],d[1]=x}function o(x,M,C,c,r,a,A,L,T,w){if(w>M&&w>c&&w>a&&w>L||w<M&&w<c&&w<a&&w<L)return 0;var _=f.cubicRootAt(M,c,a,L,w,h);if(_===0)return 0;for(var j=0,W=-1,Z,X,G=0;G<_;G++){var te=h[G],Y=te===0||te===1?.5:1,le=f.cubicAt(x,C,r,A,te);if(le<T)continue;W<0&&(W=f.cubicExtrema(M,c,a,L,d),d[1]<d[0]&&W>1&&E(),Z=f.cubicAt(M,c,a,L,d[0]),W>1&&(X=f.cubicAt(M,c,a,L,d[1]))),W===2?te<d[0]?j+=Z<M?Y:-Y:te<d[1]?j+=X<Z?Y:-Y:j+=L<X?Y:-Y:te<d[0]?j+=Z<M?Y:-Y:j+=L<Z?Y:-Y}return j}function n(x,M,C,c,r,a,A,L){if(L>M&&L>c&&L>a||L<M&&L<c&&L<a)return 0;var T=f.quadraticRootAt(M,c,a,L,h);if(T===0)return 0;var w=f.quadraticExtremum(M,c,a);if(w>=0&&w<=1){for(var _=0,j=f.quadraticAt(M,c,a,w),W=0;W<T;W++){var Z=h[W]===0||h[W]===1?.5:1,X=f.quadraticAt(x,C,r,h[W]);if(X<A)continue;h[W]<w?_+=j<M?Z:-Z:_+=a<j?Z:-Z}return _}else{var Z=h[0]===0||h[0]===1?.5:1,X=f.quadraticAt(x,C,r,h[0]);return X<A?0:a<M?Z:-Z}}function s(x,M,C,c,r,a,A,L){if(L-=M,L>C||L<-C)return 0;var T=Math.sqrt(C*C-L*L);h[0]=-T,h[1]=T;var w=Math.abs(c-r);if(w<1e-4)return 0;if(w%i<1e-4){c=0,r=i;var _=a?1:-1;return A>=h[0]+x&&A<=h[1]+x?_:0}if(a){var T=c;c=D(r),r=D(T)}else c=D(c),r=D(r);c>r&&(r+=i);for(var j=0,W=0;W<2;W++){var Z=h[W];if(Z+x>A){var X=Math.atan2(L,Z),_=a?1:-1;X<0&&(X=i+X),(X>=c&&X<=r||X+i>=c&&X+i<=r)&&(X>Math.PI/2&&X<Math.PI*1.5&&(_=-_),j+=_)}}return j}function u(x,M,C,c,r){for(var a=0,A=0,L=0,T=0,w=0,_=0;_<x.length;){var j=x[_++];j===g.M&&_>1&&(C||(a+=b(A,L,T,w,c,r))),_===1&&(A=x[_],L=x[_+1],T=A,w=L);switch(j){case g.M:T=x[_++],w=x[_++],A=T,L=w;break;case g.L:if(C){if(N.containStroke(A,L,x[_],x[_+1],M,c,r))return!0}else a+=b(A,L,x[_],x[_+1],c,r)||0;A=x[_++],L=x[_++];break;case g.C:if(C){if(O.containStroke(A,L,x[_++],x[_++],x[_++],x[_++],x[_],x[_+1],M,c,r))return!0}else a+=o(A,L,x[_++],x[_++],x[_++],x[_++],x[_],x[_+1],c,r)||0;A=x[_++],L=x[_++];break;case g.Q:if(C){if(Q.containStroke(A,L,x[_++],x[_++],x[_],x[_+1],M,c,r))return!0}else a+=n(A,L,x[_++],x[_++],x[_],x[_+1],c,r)||0;A=x[_++],L=x[_++];break;case g.A:var W=x[_++],Z=x[_++],X=x[_++],G=x[_++],te=x[_++],Y=x[_++];_+=1;var le=1-x[_++],Ae=Math.cos(te)*X+W,Be=Math.sin(te)*G+Z;_>1?a+=b(A,L,Ae,Be,c,r):(T=Ae,w=Be);var Ce=(c-W)*G/X+W;if(C){if(R.containStroke(W,Z,G,te,te+Y,le,M,Ce,r))return!0}else a+=s(W,Z,G,te,te+Y,le,Ce,r);A=Math.cos(te+Y)*X+W,L=Math.sin(te+Y)*G+Z;break;case g.R:T=A=x[_++],w=L=x[_++];var Se=x[_++],Fe=x[_++],Ae=T+Se,Be=w+Fe;if(C){if(N.containStroke(T,w,Ae,w,M,c,r)||N.containStroke(Ae,w,Ae,Be,M,c,r)||N.containStroke(Ae,Be,T,Be,M,c,r)||N.containStroke(T,Be,T,w,M,c,r))return!0}else a+=b(Ae,w,Ae,Be,c,r),a+=b(T,Be,T,w,c,r);break;case g.Z:if(C){if(N.containStroke(A,L,T,w,M,c,r))return!0}else a+=b(A,L,T,w,c,r);A=T,L=w;break}}return!C&&!v(L,w)&&(a+=b(A,L,T,w,c,r)||0),a!==0}function p(x,M,C){return u(x,0,!1,M,C)}function S(x,M,C,c){return u(x,M,!0,C,c)}ue.contain=p,ue.containStroke=S},"2fw6":function(qe,ue,k){var J=k("y+Vt"),N=J.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(O,Q,R){R&&O.moveTo(Q.cx+Q.r,Q.cy),O.arc(Q.cx,Q.cy,Q.r,0,Math.PI*2,!0)}});qe.exports=N},"3C/r":function(qe,ue){var k=function(N,O){this.image=N,this.repeat=O,this.type="pattern"};k.prototype.getCanvasPattern=function(N){return N.createPattern(this.image,this.repeat||"repeat")};var J=k;qe.exports=J},"3CBa":function(qe,ue,k){var J=k("hydK"),N=J.createElement,O=k("bYtY"),Q=k("SUKs"),R=k("y+Vt"),B=k("Dagg"),D=k("dqUG"),f=k("DBLp"),b=k("sW+o"),g=k("n6Mw"),i=k("vKoX"),l=k("P47w"),v=l.path,h=l.image,d=l.text;function E(r){return parseInt(r,10)}function o(r){return r instanceof R?v:r instanceof B?h:r instanceof D?d:v}function n(r,a){return a&&r&&a.parentNode!==r}function s(r,a,A){if(n(r,a)&&A){var L=A.nextSibling;L?r.insertBefore(a,L):r.appendChild(a)}}function u(r,a){if(n(r,a)){var A=r.firstChild;A?r.insertBefore(a,A):r.appendChild(a)}}function p(r,a){a&&r&&a.parentNode===r&&r.removeChild(a)}function S(r){return r.__textSvgEl}function x(r){return r.__svgEl}var M=function(r,a,A,L){this.root=r,this.storage=a,this._opts=A=O.extend({},A||{});var T=N("svg");T.setAttribute("xmlns","http://www.w3.org/2000/svg"),T.setAttribute("version","1.1"),T.setAttribute("baseProfile","full"),T.style.cssText="user-select:none;position:absolute;left:0;top:0;";var w=N("g");T.appendChild(w);var _=N("g");T.appendChild(_),this.gradientManager=new b(L,_),this.clipPathManager=new g(L,_),this.shadowManager=new i(L,_);var j=document.createElement("div");j.style.cssText="overflow:hidden;position:relative",this._svgDom=T,this._svgRoot=_,this._backgroundRoot=w,this._viewport=j,r.appendChild(j),j.appendChild(T),this.resize(A.width,A.height),this._visibleList=[]};M.prototype={constructor:M,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var r=this.getViewportRoot();if(r)return{offsetLeft:r.offsetLeft||0,offsetTop:r.offsetTop||0}},refresh:function(){var r=this.storage.getDisplayList(!0);this._paintList(r)},setBackgroundColor:function(r){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var a=N("rect");a.setAttribute("width",this.getWidth()),a.setAttribute("height",this.getHeight()),a.setAttribute("x",0),a.setAttribute("y",0),a.setAttribute("id",0),a.style.fill=r,this._backgroundRoot.appendChild(a),this._backgroundNode=a},_paintList:function(r){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var a=this._svgRoot,A=this._visibleList,L=r.length,T=[],w;for(w=0;w<L;w++){var _=r[w],j=o(_),W=x(_)||S(_);_.invisible||(_.__dirty&&(j&&j.brush(_),this.clipPathManager.update(_),_.style&&(this.gradientManager.update(_.style.fill),this.gradientManager.update(_.style.stroke),this.shadowManager.update(W,_)),_.__dirty=!1),T.push(_))}var Z=f(A,T),X;for(w=0;w<Z.length;w++){var G=Z[w];if(G.removed)for(var te=0;te<G.count;te++){var _=A[G.indices[te]],W=x(_),Y=S(_);p(a,W),p(a,Y)}}for(w=0;w<Z.length;w++){var G=Z[w];if(G.added)for(var te=0;te<G.count;te++){var _=T[G.indices[te]],W=x(_),Y=S(_);X?s(a,W,X):u(a,W),W?s(a,Y,W):X?s(a,Y,X):u(a,Y),s(a,Y,W),X=Y||W||X,this.gradientManager.addWithoutUpdate(W||Y,_),this.shadowManager.addWithoutUpdate(W||Y,_),this.clipPathManager.markUsed(_)}else if(!G.removed)for(var te=0;te<G.count;te++){var _=T[G.indices[te]],W=x(_),Y=S(_),W=x(_),Y=S(_);this.gradientManager.markUsed(_),this.gradientManager.addWithoutUpdate(W||Y,_),this.shadowManager.markUsed(_),this.shadowManager.addWithoutUpdate(W||Y,_),this.clipPathManager.markUsed(_),Y&&s(a,Y,W),X=W||Y||X}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=T},_getDefs:function(r){var a=this._svgDom,A=a.getElementsByTagName("defs");if(A.length===0)if(r){var A=a.insertBefore(N("defs"),a.firstChild);return A.contains||(A.contains=function(T){var w=A.children;if(!w)return!1;for(var _=w.length-1;_>=0;--_)if(w[_]===T)return!0;return!1}),A}else return null;else return A[0]},resize:function(r,a){var A=this._viewport;A.style.display="none";var L=this._opts;if(r!=null&&(L.width=r),a!=null&&(L.height=a),r=this._getSize(0),a=this._getSize(1),A.style.display="",this._width!==r||this._height!==a){this._width=r,this._height=a;var T=A.style;T.width=r+"px",T.height=a+"px";var w=this._svgDom;w.setAttribute("width",r),w.setAttribute("height",a)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",r),this._backgroundNode.setAttribute("height",a))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(r){var a=this._opts,A=["width","height"][r],L=["clientWidth","clientHeight"][r],T=["paddingLeft","paddingTop"][r],w=["paddingRight","paddingBottom"][r];if(a[A]!=null&&a[A]!=="auto")return parseFloat(a[A]);var _=this.root,j=document.defaultView.getComputedStyle(_);return(_[L]||E(j[A])||E(_.style[A]))-(E(j[T])||0)-(E(j[w])||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 r=encodeURIComponent(this._svgDom.outerHTML.replace(/></g,`>
|
|
\r<`));return"data:image/svg+xml;charset=UTF-8,"+r}};function C(r){return function(){Q('In SVG mode painter not support method "'+r+'"')}}O.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(r){M.prototype[r]=C(r)});var c=M;qe.exports=c},"3e3G":function(qe,ue,k){var J=k("bYtY"),N=k("QuXc"),O=function(R,B,D,f,b){this.x=R==null?.5:R,this.y=B==null?.5:B,this.r=D==null?.5:D,this.type="radial",this.global=b||!1,N.call(this,f)};O.prototype={constructor:O},J.inherits(O,N);var Q=O;qe.exports=Q},"3gBT":function(qe,ue){var k=2311;function J(){return k++}qe.exports=J},"49sm":function(qe,ue){var k={}.toString;qe.exports=Array.isArray||function(J){return k.call(J)=="[object Array]"}},"4fz+":function(qe,ue,k){var J=k("bYtY"),N=k("1bdT"),O=k("mFDi"),Q=function(B){B=B||{},N.call(this,B);for(var D in B)B.hasOwnProperty(D)&&(this[D]=B[D]);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(B){return this._children[B]},childOfName:function(B){for(var D=this._children,f=0;f<D.length;f++)if(D[f].name===B)return D[f]},childCount:function(){return this._children.length},add:function(B){return B&&B!==this&&B.parent!==this&&(this._children.push(B),this._doAdd(B)),this},addBefore:function(B,D){if(B&&B!==this&&B.parent!==this&&D&&D.parent===this){var f=this._children,b=f.indexOf(D);b>=0&&(f.splice(b,0,B),this._doAdd(B))}return this},_doAdd:function(B){B.parent&&B.parent.remove(B),B.parent=this;var D=this.__storage,f=this.__zr;D&&D!==B.__storage&&(D.addToStorage(B),B instanceof Q&&B.addChildrenToStorage(D)),f&&f.refresh()},remove:function(B){var D=this.__zr,f=this.__storage,b=this._children,g=J.indexOf(b,B);return g<0?this:(b.splice(g,1),B.parent=null,f&&(f.delFromStorage(B),B instanceof Q&&B.delChildrenFromStorage(f)),D&&D.refresh(),this)},removeAll:function(){var B=this._children,D=this.__storage,f,b;for(b=0;b<B.length;b++)f=B[b],D&&(D.delFromStorage(f),f instanceof Q&&f.delChildrenFromStorage(D)),f.parent=null;return B.length=0,this},eachChild:function(B,D){for(var f=this._children,b=0;b<f.length;b++){var g=f[b];B.call(D,g,b)}return this},traverse:function(B,D){for(var f=0;f<this._children.length;f++){var b=this._children[f];B.call(D,b),b.type==="group"&&b.traverse(B,D)}return this},addChildrenToStorage:function(B){for(var D=0;D<this._children.length;D++){var f=this._children[D];B.addToStorage(f),f instanceof Q&&f.addChildrenToStorage(B)}},delChildrenFromStorage:function(B){for(var D=0;D<this._children.length;D++){var f=this._children[D];B.delFromStorage(f),f instanceof Q&&f.delChildrenFromStorage(B)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(B){for(var D=null,f=new O(0,0,0,0),b=B||this._children,g=[],i=0;i<b.length;i++){var l=b[i];if(l.ignore||l.invisible)continue;var v=l.getBoundingRect(),h=l.getLocalTransform(g);h?(f.copy(v),f.applyTransform(h),D=D||f.clone(),D.union(f)):(D=D||v.clone(),D.union(v))}return D||f}},J.inherits(Q,N);var R=Q;qe.exports=R},"4mN7":function(qe,ue,k){var J=k("QBsz"),N=k("Sj9i"),O=Math.min,Q=Math.max,R=Math.sin,B=Math.cos,D=Math.PI*2,f=J.create(),b=J.create(),g=J.create();function i(n,s,u){if(n.length===0)return;var p=n[0],S=p[0],x=p[0],M=p[1],C=p[1],c;for(c=1;c<n.length;c++)p=n[c],S=O(S,p[0]),x=Q(x,p[0]),M=O(M,p[1]),C=Q(C,p[1]);s[0]=S,s[1]=M,u[0]=x,u[1]=C}function l(n,s,u,p,S,x){S[0]=O(n,u),S[1]=O(s,p),x[0]=Q(n,u),x[1]=Q(s,p)}var v=[],h=[];function d(n,s,u,p,S,x,M,C,c,r){var a=N.cubicExtrema,A=N.cubicAt,L,T=a(n,u,S,M,v);for(c[0]=Infinity,c[1]=Infinity,r[0]=-Infinity,r[1]=-Infinity,L=0;L<T;L++){var w=A(n,u,S,M,v[L]);c[0]=O(w,c[0]),r[0]=Q(w,r[0])}for(T=a(s,p,x,C,h),L=0;L<T;L++){var _=A(s,p,x,C,h[L]);c[1]=O(_,c[1]),r[1]=Q(_,r[1])}c[0]=O(n,c[0]),r[0]=Q(n,r[0]),c[0]=O(M,c[0]),r[0]=Q(M,r[0]),c[1]=O(s,c[1]),r[1]=Q(s,r[1]),c[1]=O(C,c[1]),r[1]=Q(C,r[1])}function E(n,s,u,p,S,x,M,C){var c=N.quadraticExtremum,r=N.quadraticAt,a=Q(O(c(n,u,S),1),0),A=Q(O(c(s,p,x),1),0),L=r(n,u,S,a),T=r(s,p,x,A);M[0]=O(n,S,L),M[1]=O(s,x,T),C[0]=Q(n,S,L),C[1]=Q(s,x,T)}function o(n,s,u,p,S,x,M,C,c){var r=J.min,a=J.max,A=Math.abs(S-x);if(A%D<1e-4&&A>1e-4){C[0]=n-u,C[1]=s-p,c[0]=n+u,c[1]=s+p;return}if(f[0]=B(S)*u+n,f[1]=R(S)*p+s,b[0]=B(x)*u+n,b[1]=R(x)*p+s,r(C,f,b),a(c,f,b),S=S%D,S<0&&(S=S+D),x=x%D,x<0&&(x=x+D),S>x&&!M?x+=D:S<x&&M&&(S+=D),M){var L=x;x=S,S=L}for(var T=0;T<x;T+=Math.PI/2)T>S&&(g[0]=B(T)*u+n,g[1]=R(T)*p+s,r(C,g,C),a(c,g,c))}ue.fromPoints=i,ue.fromLine=l,ue.fromCubic=d,ue.fromQuadratic=E,ue.fromArc=o},"55Ip":function(qe,ue,k){"use strict";k.d(ue,"a",function(){return s}),k.d(ue,"b",function(){return C});var J=k("Ty5D"),N=k("dI71"),O=k("q1tI"),Q=k.n(O),R=k("YS25"),B=k("17x9"),D=k.n(B),f=k("wx14"),b=k("zLVn"),g=k("9R94"),i=function(r){Object(N.a)(a,r);function a(){for(var L,T=arguments.length,w=new Array(T),_=0;_<T;_++)w[_]=arguments[_];return L=r.call.apply(r,[this].concat(w))||this,L.history=Object(R.a)(L.props),L}var A=a.prototype;return A.render=function(){return Q.a.createElement(J.c,{history:this.history,children:this.props.children})},a}(Q.a.Component),l=function(r){Object(N.a)(a,r);function a(){for(var L,T=arguments.length,w=new Array(T),_=0;_<T;_++)w[_]=arguments[_];return L=r.call.apply(r,[this].concat(w))||this,L.history=Object(R.b)(L.props),L}var A=a.prototype;return A.render=function(){return Q.a.createElement(J.c,{history:this.history,children:this.props.children})},a}(Q.a.Component),v=function(a,A){return typeof a=="function"?a(A):a},h=function(a,A){return typeof a=="string"?Object(R.c)(a,null,null,A):a},d=function(a){return a},E=Q.a.forwardRef;typeof E=="undefined"&&(E=d);function o(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}var n=E(function(r,a){var A=r.innerRef,L=r.navigate,T=r.onClick,w=Object(b.a)(r,["innerRef","navigate","onClick"]),_=w.target,j=Object(f.a)({},w,{onClick:function(Z){try{T&&T(Z)}catch(X){throw Z.preventDefault(),X}!Z.defaultPrevented&&Z.button===0&&(!_||_==="_self")&&!o(Z)&&(Z.preventDefault(),L())}});return d!==E?j.ref=a||A:j.ref=A,Q.a.createElement("a",j)}),s=E(function(r,a){var A=r.component,L=A===void 0?n:A,T=r.replace,w=r.to,_=r.innerRef,j=Object(b.a)(r,["component","replace","to","innerRef"]);return Q.a.createElement(J.e.Consumer,null,function(W){W||Object(g.a)(!1);var Z=W.history,X=h(v(w,W.location),W.location),G=X?Z.createHref(X):"",te=Object(f.a)({},j,{href:G,navigate:function(){var le=v(w,W.location),Ae=T?Z.replace:Z.push;Ae(le)}});return d!==E?te.ref=a||_:te.innerRef=_,Q.a.createElement(L,te)})});if(!1)var u,p;var S=function(a){return a},x=Q.a.forwardRef;typeof x=="undefined"&&(x=S);function M(){for(var r=arguments.length,a=new Array(r),A=0;A<r;A++)a[A]=arguments[A];return a.filter(function(L){return L}).join(" ")}var C=x(function(r,a){var A=r["aria-current"],L=A===void 0?"page":A,T=r.activeClassName,w=T===void 0?"active":T,_=r.activeStyle,j=r.className,W=r.exact,Z=r.isActive,X=r.location,G=r.sensitive,te=r.strict,Y=r.style,le=r.to,Ae=r.innerRef,Be=Object(b.a)(r,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return Q.a.createElement(J.e.Consumer,null,function(Ce){Ce||Object(g.a)(!1);var Se=X||Ce.location,Fe=h(v(le,Se),Se),Ve=Fe.pathname,De=Ve&&Ve.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Le=De?Object(J.f)(Se.pathname,{path:De,exact:W,sensitive:G,strict:te}):null,tt=!!(Z?Z(Le,Se):Le),Et=tt?M(j,w):j,Ie=tt?Object(f.a)({},Y,{},_):Y,Qe=Object(f.a)({"aria-current":tt&&L||null,className:Et,style:Ie,to:Fe},Be);return S!==x?Qe.ref=a||Ae:Qe.innerRef=Ae,Q.a.createElement(s,Qe)})});if(!1)var c},"59Ip":function(qe,ue,k){var J=k("Sj9i");function N(O,Q,R,B,D,f,b,g,i,l,v){if(i===0)return!1;var h=i;if(v>Q+h&&v>B+h&&v>f+h&&v>g+h||v<Q-h&&v<B-h&&v<f-h&&v<g-h||l>O+h&&l>R+h&&l>D+h&&l>b+h||l<O-h&&l<R-h&&l<D-h&&l<b-h)return!1;var d=J.cubicProjectPoint(O,Q,R,B,D,f,b,g,l,v,null);return d<=h/2}ue.containStroke=N},"5gs/":function(qe,ue,k){"use strict";k.r(ue);var J=k("cWXX"),N=k("/ezw"),O=k("g9YV"),Q=k("wCAj"),R=k("/zsF"),B=k("PArb"),D=k("14J3"),f=k("BMrR"),b=k("+L6B"),g=k("2/Rp"),i=k("jCWc"),l=k("kPKH"),v=k("sPJy"),h=k("bE4q"),d=k("miYZ"),E=k("tsqr"),o=k("2qtc"),n=k("kLXV"),s=k("9og8"),u=k("Pv/L"),p=k("k1fw"),S=k("tJVT"),x=k("PpiC"),M=k("WmNS"),C=k.n(M),c=k("q1tI"),r=k.n(c),a=k("wd/R"),A=k.n(a),L=k("xOOu"),T=k.n(L),w=k("Ty5D"),_=k("9kvl"),j=k("55Ip"),W=k("jhfD"),Z=k("CTES"),X=k("RCxd"),G=k("/MfK"),te=k("m3rI"),Y=k("xKgJ"),le=k("1vsH"),Ae=k("cVA7"),Be=k.n(Ae),Ce=k("z9Ch"),Se=k.n(Ce),Fe={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}},Ve=function(Oe){var Ye,ze,gt,Lt,Pt,Rt=Oe.shixunHomeworks,Dt=Oe.globalSetting,dt=Oe.loading,it=Oe.dispatch,nt=Object(w.i)(),we=Object(w.h)(),Ne=Object(c.useState)([]),ht=Object(S.a)(Ne,2),ot=ht[0],Bt=ht[1],wt=Object(c.useState)(we.query.tabs||0),rt=Object(S.a)(wt,2),st=rt[0],St=rt[1],It=Rt.shixunWorkReport,Qt=((Ye=It.echart_data)===null||Ye===void 0?void 0:Ye.efficiency_list.length)-parseInt((ze=It.echart_data)===null||ze===void 0?void 0:ze.myself_eff[0]),gr=function(){var jt,Ir,kr;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(hr){if(hr.name===It.username){var Sr;return"\u59D3\u540D\uFF1A"+It.username+"<br/>\u5B66\u53F7\uFF1A "+It.user_id+"<br/>\u6548\u7387\uFF1A"+((Sr=It.echart_data)===null||Sr===void 0?void 0:Sr.myself_eff[1])}else return hr.name+":"+hr.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:(jt=It.echart_data)===null||jt===void 0?void 0:jt.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:It.username,xAxis:Qt,yAxis:(Ir=It.echart_data)===null||Ir===void 0?void 0:Ir.myself_eff[1],value:(kr=It.echart_data)===null||kr===void 0?void 0:kr.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}},vr=function(){var jt,Ir,kr,_r;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(Sr){var sn=Sr.value;if(Sr.name===It.username){var en;return"\u59D3\u540D\uFF1A"+It.username+"<br/>\u5B66\u53F7\uFF1A "+It.user_id+"<br/>\u5F97\u5206\uFF1A"+((en=It.echart_data)===null||en===void 0?void 0:en.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:Fe,data:(jt=It.echart_data)===null||jt===void 0?void 0:jt.consume_list,symbolSize:function(Sr){return Math.round(Sr[2])},markPoint:{data:[{name:It.username,xAxis:(Ir=It.echart_data)===null||Ir===void 0?void 0:Ir.myself_object[0],yAxis:(kr=It.echart_data)===null||kr===void 0?void 0:kr.myself_object[1],value:(_r=It.echart_data)===null||_r===void 0?void 0:_r.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]}};return r.a.createElement(r.a.Fragment,null,r.a.createElement("aside",{className:"ml60 pr30"},r.a.createElement(f.a,null,r.a.createElement(l.a,{flex:"800px"},r.a.createElement(Be.a,{style:{width:750,height:580},option:gr()})),r.a.createElement(l.a,{flex:"1"},r.a.createElement("aside",{className:Se.a.rightInfo},r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("span",null,"\u59D3\u540D")," ",r.a.createElement("span",{className:"ml30"},It.username)),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u53F7")," ",r.a.createElement("span",{className:"ml30"},It.student_id||"--")),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",r.a.createElement("span",{className:"ml30 c-orange"},(gt=It.echart_data)===null||gt===void 0?void 0:gt.myself_eff[1])),r.a.createElement("li",null,r.a.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",r.a.createElement("span",{className:"ml30 c-orange"},(Lt=It.echart_data)===null||Lt===void 0?void 0:Lt.myself_eff[0]))),r.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",r.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",r.a.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",r.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"))))),r.a.createElement("aside",{className:"ml60 pr30"},r.a.createElement(f.a,null,r.a.createElement(l.a,{flex:"800px"},r.a.createElement(Be.a,{style:{width:750,height:580},option:vr()})),r.a.createElement(l.a,{flex:"1"},r.a.createElement("aside",{className:Se.a.rightInfo},r.a.createElement("ul",null,r.a.createElement("li",null,r.a.createElement("span",null,"\u59D3\u540D")," ",r.a.createElement("span",{className:"ml30"},It.username)),r.a.createElement("li",null,r.a.createElement("span",null,"\u5B66\u53F7")," ",r.a.createElement("span",{className:"ml30"},It.student_id||"--")),r.a.createElement("li",null,r.a.createElement("span",null,"\u80FD\u529B")," ",r.a.createElement("span",{className:"ml30 c-orange"},(Pt=It.echart_data)===null||Pt===void 0?void 0:Pt.myself_object[1]))),r.a.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",r.a.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",r.a.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",r.a.createElement("br",null)))))))},De=Object(_.a)(function(Ee){var Oe=Ee.shixunHomeworks,Ye=Ee.loading,ze=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:ze,loading:Ye.effects}})(Ve),Le=k("giR+"),tt=k("fyUT"),Et=function(Ee){var Oe=Ee.defaultValue,Ye=Ee.onBlur,ze=Ee.max,gt=Ee.className,Lt=gt===void 0?"game-score":gt,Pt=Object(c.useState)(Oe),Rt=Object(S.a)(Pt,2),Dt=Rt[0],dt=Rt[1];Object(c.useEffect)(function(){dt(Oe)},[Oe]);function it(we){dt(we)}function nt(){Dt!==Oe&&Ye(Dt>ze?ze:Dt)}return r.a.createElement(tt.a,{max:ze,min:0,className:Lt,value:Dt,onChange:it,onBlur:nt})},Ie=k("OaEy"),Qe=k("2fM7"),xe=k("ZW9T"),ie=k("Ot1p"),$=k("1eJ8"),re=k.n($),ce=Qe.a.Option,be={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},Me;(function(Ee){Ee[Ee.SET_PATH=0]="SET_PATH",Ee[Ee.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT"})(Me||(Me={}));function ke(Ee,Oe){switch(Oe.type){case Me.SET_PATH:return Object(p.a)(Object(p.a)({},Ee),{},{selectedPath:Oe.payload});case Me.GET_PASSED_CONTENT:return Object(p.a)(Object(p.a)({},Ee),{},{passedContent:Oe.payload});default:throw new Error}}var ct=function(Ee){var Oe,Ye,ze,gt,Lt=Ee.path,Pt=Ee.game_id,Rt=Ee.onPathChange,Dt=Ee.autoHeight,dt=Ee.diff_code_count,it=Ee.data,nt=Lt.split("\uFF1B").filter(function(st){return!!st}),we=Object(c.useReducer)(ke,{selectedPath:nt[0],passedContent:{language:"python",content:""}}),Ne=Object(S.a)(we,2),ht=Ne[0],ot=Ne[1],Bt=ht.selectedPath,wt=ht.passedContent;function rt(st){ot({type:Me.SET_PATH,payload:st})}return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null," ",r.a.createElement("span",null,"\u6700\u540E\u901A\u5173\u7684\u4EE3\u7801"),dt&&r.a.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",dt),r.a.createElement("span",null,r.a.createElement(Qe.a,{style:{width:200},value:Bt,onChange:rt}," ",nt.map(function(st){return r.a.createElement(ce,{key:st,value:st},st)})," "))," "),(Bt==null?void 0:Bt.split(".")[1])==="md"&&r.a.createElement(ie.a,{height:300,autoHeight:Dt,defaultValue:(it==null||((Oe=it.filter(function(st){return st.path===Bt}))===null||Oe===void 0||((Ye=Oe[0])===null||Ye===void 0))?void 0:Ye.content)||"",className:re.a.md}),(Bt==null?void 0:Bt.split(".")[1])!=="md"&&r.a.createElement(xe.b,{height:300,language:wt.language,value:(it==null||((ze=it.filter(function(st){return st.path===Bt}))===null||ze===void 0||((gt=ze[0])===null||gt===void 0))?void 0:gt.content)||"",autoHeight:Dt,theme:"default",options:be}))},ut=k("ErOA"),mt=function(Oe){var Ye=Oe.shixunHomeworks,ze=Oe.autoHeight,gt=Oe.dispatch,Lt=Ye.shixunWorkReport,Pt=Lt.stage_list,Rt=Lt.work_id,Dt=Object(w.i)(),dt=Object(Y.c)(),it=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:120},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail"}];function nt(ot,Bt){return we.apply(this,arguments)}function we(){return we=Object(s.a)(C.a.mark(function ot(Bt,wt){var rt,st;return C.a.wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return rt=Pt[Bt].challenge_id,It.next=3,gt({type:"shixunHomeworks/changeScore",payload:{categoryId:Dt.homeworkId,type:"report",score:wt,challenge_id:rt}});case 3:return st=It.sent,It.next=6,gt({type:"shixunHomeworks/getShixunWorkReport",payload:Object(p.a)({},Dt)});case 6:st.status===0&&E.b.success("\u64CD\u4F5C\u6210\u529F");case 7:case"end":return It.stop()}},ot)})),we.apply(this,arguments)}function Ne(ot,Bt){return Object(ut.c)("student_works/".concat(Rt,"/rep_passed_content.json"),{path:Bt,game_id:ot})}var ht=Object(le.n)(5,Lt.shixun_detail);return r.a.createElement(r.a.Fragment,null,ht==null?void 0:ht.map(function(ot,Bt){return r.a.createElement("div",{key:Bt},ot.map(function(wt,rt){var st;return r.a.createElement("aside",{className:"pl30 pr30",key:rt},r.a.createElement("div",{className:"".concat(Se.a.shixunTitle," mt10")},r.a.createElement("div",null,r.a.createElement("span",{className:"fa fa-code "}),r.a.createElement("strong",{className:"c-black"},"\u7B2C",Bt*5+rt+1,"\u5173 ",r.a.createElement(j.a,{className:"c-black",to:"/tasks/".concat(wt.game_identifier)},wt.subject))),dt?r.a.createElement("span",null,"\u8C03\u5206\uFF1A",r.a.createElement(Et,{className:"game-score",max:Pt[rt].game_score_full,defaultValue:Pt[rt].game_score,onBlur:function(It){nt(rt,It)}})):null),r.a.createElement("div",{className:"font16 mt10"},wt.st===0&&wt.complete_status===0&&"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801",wt.st===0&&wt.complete_status!==0&&(wt.path?r.a.createElement("aside",{className:Se.a.shixunWrp},r.a.createElement(ct,{autoHeight:ze,path:wt.path,game_id:wt.id,data:wt.game_codes,diff_code_count:wt.diff_code_count,onPathChange:Ne})):"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A"),wt.st===1&&(wt.complete_status===0?"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801":"\u5DF2\u901A\u5173\uFF0C\u65E0\u4EE3\u7801\u5C55\u793A")),r.a.createElement("aside",{className:"mt10 font16"},(st=wt.outputs)!==null&&st!==void 0&&st.length?r.a.createElement(Q.a,{columns:it,pagination:{hideOnSinglePage:!0},dataSource:wt.outputs}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"))}))}))},pt=Object(_.a)(function(Ee){var Oe=Ee.shixunHomeworks,Ye=Ee.loading,ze=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:ze,loading:Ye.effects}})(mt),Ot=k("5NDa"),Ft=k("5rEg"),He=k("y8nQ"),Pe=k("Vl3Y"),at=function(Oe){var Ye=Oe.shixunHomeworks,ze=Oe.dispatch,gt=Object(x.a)(Oe,["shixunHomeworks","dispatch"]),Lt=Object(w.i)(),Pt=Object(c.useState)(!1),Rt=Object(S.a)(Pt,2),Dt=Rt[0],dt=Rt[1],it=Pe.a.useForm(),nt=Object(S.a)(it,1),we=nt[0];Object(c.useEffect)(function(){var ht,ot,Bt,wt;Ye.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&we.setFieldsValue({comment:(ht=Ye.actionTabs.selectArrs)===null||ht===void 0||((ot=ht.data)===null||ot===void 0)?void 0:ot.work_comment,hidden_comment:(Bt=Ye.actionTabs.selectArrs)===null||Bt===void 0||((wt=Bt.data)===null||wt===void 0)?void 0:wt.work_comment_hidden})},[Ye.actionTabs.key]);var Ne=function(){var ht=Object(s.a)(C.a.mark(function ot(){var Bt,wt;return C.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return Bt=we.getFieldValue(),st.next=3,Object(ut.a)("/api/student_works/".concat(Lt.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:Bt.hidden_comment,comment:Bt.comment}});case 3:wt=st.sent,wt.status===0&&(E.b.success("\u8BC4\u9605\u6210\u529F"),we.resetFields(),ze({type:"shixunHomeworks/setActionTabs",payload:{}}),ze({type:"shixunHomeworks/getShixunWorkReport",payload:Object(p.a)({},Lt)}));case 5:case"end":return st.stop()}},ot)}));return function(){return ht.apply(this,arguments)}}();return r.a.createElement(r.a.Fragment,null,r.a.createElement(n.a,{centered:!0,title:"\u66F4\u6539\u70B9\u8BC4",visible:Ye.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(s.a)(C.a.mark(function ht(){var ot;return C.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:ot=we.getFieldValue(),JSON.stringify(ot)==="{}"||ot.hidden_comment===""&&ot.comment===""?dt(!0):Ne();case 2:case"end":return wt.stop()}},ht)})),onCancel:function(){ze({type:"shixunHomeworks/setActionTabs",payload:{}})}},r.a.createElement(Pe.a,{form:we,onChange:function(){Dt&&dt(!1)}},r.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement(Pe.a.Item,{name:"comment"},r.a.createElement(Ft.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),r.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement(Pe.a.Item,{name:"hidden_comment"},r.a.createElement(Ft.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),Dt&&r.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},vt=Object(_.a)(function(Ee){var Oe=Ee.shixunHomeworks;return{shixunHomeworks:Oe}})(at),et=k("Xm8N"),At=k("9Bee"),je=k("XYT7"),_e=k("1n7x"),Ue=k.n(_e),me=function(Oe){var Ye,ze,gt=Oe.shixunHomeworks,Lt=Oe.globalSetting,Pt=Oe.loading,Rt=Oe.dispatch,Dt=Object(x.a)(Oe,["shixunHomeworks","globalSetting","loading","dispatch"]),dt=Object(c.useState)(Object(p.a)({},Object(w.i)())),it=Object(S.a)(dt,2),nt=it[0],we=it[1],Ne=Object(w.i)(),ht=Object(c.useState)([]),ot=Object(u.a)(ht),Bt=Object(c.useState)({last:!1}),wt=Object(S.a)(Bt,2),rt=wt[0],st=wt[1],St=Object(c.useState)({last:!1}),It=Object(S.a)(St,2),Qt=It[0],gr=It[1],vr=Object(c.useRef)(),cr=Object(c.useRef)(),jt=Object(c.useState)(!1),Ir=Object(S.a)(jt,2),kr=Ir[0],_r=Ir[1],hr=Object(c.useState)(!1),Sr=Object(S.a)(hr,2),sn=Sr[0],en=Sr[1],he=Object(c.useState)(!1),ge=Object(S.a)(he,2),Re=ge[0],Ze=ge[1],Je=gt.shixunWorkReport,Tt=Object(Y.c)(),q=Object(c.useState)(new T.a),F=Object(S.a)(q,2),P=F[0],ee=F[1],ae=Object(c.useState)(0),ne=Object(S.a)(ae,2),Ke=ne[0],xt=ne[1],kt=Object(c.useState)([]),Ht=Object(S.a)(kt,2),Ct=Ht[0],Yt=Ht[1],Wt=Object(c.useState)(!1),$t=Object(S.a)(Wt,2),fr=$t[0],Fr=$t[1],yr=Object(c.useState)(!1),Rr=Object(S.a)(yr,2),pr=Rr[0],Nr=Rr[1];Object(c.useEffect)(function(){return Rt({type:"globalSetting/footerToggle",payload:!1}),function(){Rt({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(c.useEffect)(function(){gt.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&Ct.length>0&&$r("all")},[Ct]),Object(c.useEffect)(function(){we(Object(p.a)({},Ne))},[Dt.location.pathname]);var Hr=function(){document.body.scrollIntoView()};function qr(){return Yr.apply(this,arguments)}function Yr(){return Yr=Object(s.a)(C.a.mark(function wr(){var dr,sr,nr,Zt,br,Cr,Tr;return C.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:return nr=JSON.parse(sessionStorage.all_student_works_params||"{}"),Dn.next=3,Rt({type:"shixunHomeworks/getAllStudentWorks",payload:Object(p.a)(Object(p.a)({},nt),nr)});case 3:Zt=Dn.sent,Yt(Zt.all_student_works),br=(dr=Zt.all_student_works)===null||dr===void 0?void 0:dr.map(function(Qr){return String(Qr.student_work_id)}).indexOf(nt.homeworkId),br===((sr=Zt.all_student_works)===null||sr===void 0?void 0:sr.length)-1?st({last:!0}):st((Cr=Zt.all_student_works)===null||Cr===void 0?void 0:Cr[br+1]),br===0?gr({last:!0}):gr((Tr=Zt.all_student_works)===null||Tr===void 0?void 0:Tr[br-1]);case 8:case"end":return Dn.stop()}},wr)})),Yr.apply(this,arguments)}var nn=function(){document.querySelectorAll("canvas").forEach(function(dr){(!dr.clientWidth||!dr.clientHeight)&&dr.remove()})},cn=function(){vr.current.offsetHeight>62e3?Ze(!1):Ze(!0)},$r=function(){var wr=Object(s.a)(C.a.mark(function dr(sr){var nr,Zt,br,Cr,Tr,Er;return C.a.wrap(function(Qr){for(;;)switch(Qr.prev=Qr.next){case 0:if(Tr=function(){return Tr=Object(s.a)(C.a.mark(function Hn(){var Ln;return C.a.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return Xn.next=2,Rt({type:"shixunHomeworks/getShixunWorkReport",payload:{homeworkId:Ct[nr].student_work_id}});case 2:Ln=Xn.sent,Hr(),nr++,setTimeout(Object(s.a)(C.a.mark(function xn(){var Yn,Mn,oi,Fn,gn,Qn,li;return C.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:nn(),Mn=P.folder("".concat(Ln==null?void 0:Ln.username)),oi=document.querySelector("#export-all").children,Fn=Ue()(),gn=C.a.mark(function tr(Br){return C.a.wrap(function(Or){for(;;)switch(Or.prev=Or.next){case 0:return Or.next=2,Fn.set(br).from(oi[Br]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Dr=Object(s.a)(C.a.mark(function bn(Un){return C.a.wrap(function(ei){for(;;)switch(ei.prev=ei.next){case 0:if(!(Br<oi.length-1)){ei.next=3;break}return ei.next=3,Un.addPage();case 3:case"end":return ei.stop()}},bn)}));return function(bn){return Dr.apply(this,arguments)}}());case 2:case"end":return Or.stop()}},tr)}),Qn=0;case 6:if(!(Qn<oi.length)){er.next=11;break}return er.delegateYield(gn(Qn),"t0",8);case 8:Qn++,er.next=6;break;case 11:Mn.file("".concat(Ct[nr-1].student_work_user_name).concat(nr,".pdf"),Fn.output("blob")),li=Mn.folder("\u4EE3\u7801\u6587\u4EF6"),Ln==null||((Yn=Ln.shixun_detail)===null||Yn===void 0)||Yn.map(function(tr,Br){var Ur,Or=li.folder("\u7B2C".concat(Br+1,"\u5173-").concat(tr.subject,"-").concat(tr.id));tr==null||((Ur=tr.game_codes)===null||Ur===void 0)||Ur.map(function(Dr){Or.file("".concat(Dr.filename,".txt"),Dr==null?void 0:Dr.content)})}),Zt.update({content:r.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",r.a.createElement("span",{className:"c-blue"},nr),"/",Ct==null?void 0:Ct.length,r.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),nr==(Ct==null?void 0:Ct.length)?(Zt.destroy(),an()):Cr();case 16:case"end":return er.stop()}},xn)})),2200);case 6:case"end":return Xn.stop()}},Hn)})),Tr.apply(this,arguments)},Cr=function(){return Tr.apply(this,arguments)},nr=0,Zt=n.a.info({width:460,title:r.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",r.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:r.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",r.a.createElement("span",{className:"c-blue"},nr+1),"/",sr!=="all"?1:Ct==null?void 0:Ct.length,r.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:Se.a.modal,onOk:function(){}}),br={margin:[0,0],filename:"".concat(Je.username,".pdf"),html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},!(sr!=="all"||(Ct==null?void 0:Ct.length)<2)){Qr.next=12;break}return Qr.delegateYield(C.a.mark(function Cn(){var Hn,Ln,Jr,Xn,xn,Yn,Mn;return C.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:nn(),Hr(),Ln=cr.current.children,Jr=Ue()(),Xn=P.folder("".concat(Je==null?void 0:Je.username)),xn=C.a.mark(function gn(Qn){return C.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Jr.set(br).from(Ln[Qn]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var er=Object(s.a)(C.a.mark(function tr(Br){return C.a.wrap(function(Or){for(;;)switch(Or.prev=Or.next){case 0:if(!(Qn<Ln.length-1)){Or.next=3;break}return Or.next=3,Br.addPage();case 3:case"end":return Or.stop()}},tr)}));return function(tr){return er.apply(this,arguments)}}());case 2:case"end":return qt.stop()}},gn)}),Yn=0;case 7:if(!(Yn<Ln.length)){Fn.next=12;break}return Fn.delegateYield(xn(Yn),"t0",9);case 9:Yn++,Fn.next=7;break;case 12:return _r(!1),Xn.file("".concat(Je.username,".pdf"),Jr.output("blob"),{base64:!1}),Mn=Xn.folder("\u4EE3\u7801\u6587\u4EF6"),Je==null||((Hn=Je.shixun_detail)===null||Hn===void 0)||Hn.map(function(gn,Qn){var li,qt=Mn.folder("\u7B2C".concat(Qn+1,"\u5173-").concat(gn.subject,"-").concat(gn.id));gn==null||((li=gn.game_codes)===null||li===void 0)||li.map(function(er){qt.file("".concat(er.filename,".txt"),er==null?void 0:er.content)})}),Zt.destroy(),an(),Fn.abrupt("return",{v:void 0});case 19:case"end":return Fn.stop()}},Cn)})(),"t0",7);case 7:if(Er=Qr.t0,!(typeof Er=="object")){Qr.next=10;break}return Qr.abrupt("return",Er.v);case 10:Qr.next=13;break;case 12:Cr();case 13:case"end":return Qr.stop()}},dr)}));return function(sr){return wr.apply(this,arguments)}}(),an=function(){P.generateAsync({type:"blob"}).then(function(dr){var sr=document.createElement("a");sr.href=window.URL.createObjectURL(dr),sr.download=Je.course_name+".zip",document.body.appendChild(sr);var nr=document.createEvent("MouseEvents");nr.initEvent("click",!1,!1),sr.dispatchEvent(nr),document.body.removeChild(sr),ee(new T.a)}),Ze(!1)};Object(c.useEffect)(function(){ln()},[nt.homeworkId]);var ln=function(){var wr=Object(s.a)(C.a.mark(function dr(){return C.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return en(!0),nr.next=3,Rt({type:"shixunHomeworks/getShixunWorkReport",payload:Object(p.a)({},nt)});case 3:en(!1),Object(Y.c)()&&qr();case 5:case"end":return nr.stop()}},dr)}));return function(){return wr.apply(this,arguments)}}(),dn=[{title:"\u5173\u5361",dataIndex:"name",render:function(dr,sr,nr){return nr+1}},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name"},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time"},{title:"\u4EE3\u7801\u4FEE\u6539\u884C\u6570",dataIndex:"diff_code_count",render:function(dr,sr,nr){return dr||"- -"}},{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(dr){return dr?"\u662F":"\u5426"}},{title:"\u7ECF\u9A8C\u503C",dataIndex:"experience",render:function(dr,sr){return r.a.createElement("div",null,r.a.createElement("span",{className:"c-green"},sr.myself_experience),"/",dr)}},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:function(dr,sr){return r.a.createElement("div",null,r.a.createElement("span",{className:"c-green"},dr),"/",sr.game_score_full)}},{title:"\u8C03\u5206",dataIndex:"game_score",render:function(dr,sr){return Tt?r.a.createElement(Et,{max:sr.game_score_full,defaultValue:parseFloat(dr),onBlur:function(){var nr=Object(s.a)(C.a.mark(function Zt(br){var Cr;return C.a.wrap(function(Er){for(;;)switch(Er.prev=Er.next){case 0:return Er.next=2,Rt({type:"shixunHomeworks/changeScore",payload:{categoryId:nt.homeworkId,type:"report",score:br,challenge_id:sr.challenge_id}});case 2:return Cr=Er.sent,Er.next=5,Rt({type:"shixunHomeworks/getShixunWorkReport",payload:Object(p.a)({},nt)});case 5:Cr.status===0&&E.b.success("\u64CD\u4F5C\u6210\u529F");case 6:case"end":return Er.stop()}},Zt)}));return function(Zt){return nr.apply(this,arguments)}}()}):dr}}],hn=function(dr){Rt({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(function(){dr==="next"?_.d.push("/classrooms/".concat(nt.coursesId,"/shixun_homework/").concat(nt.categoryId,"/").concat(rt==null?void 0:rt.student_work_id,"/comment")):_.d.push("/classrooms/".concat(nt.coursesId,"/shixun_homework/").concat(nt.categoryId,"/").concat(Qt==null?void 0:Qt.student_work_id,"/comment"))},200)};return r.a.createElement("section",{className:"bg-fafafa mb100",style:{position:"sticky",top:0}},r.a.createElement("div",{className:"edu-container mt10"},r.a.createElement(N.a,{loading:sn,active:!0,avatar:{size:40},paragraph:{rows:5}},r.a.createElement("div",{className:"edu-container"},Je.course_id&&r.a.createElement("section",{className:"animated fadeIn"},r.a.createElement("aside",{className:""},Je.category&&r.a.createElement(h.a,{separator:">"},r.a.createElement(h.a.Item,null,r.a.createElement(j.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework")},Je.course_name)),r.a.createElement(h.a.Item,null,r.a.createElement(j.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework/").concat(Je.category.main?"":Je.category.category_id)},Je.category.category_name)),r.a.createElement(h.a.Item,null,r.a.createElement(j.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework/").concat(Je.homework_common_id,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),r.a.createElement(h.a.Item,null,Je.username))),r.a.createElement("aside",{className:[Se.a.title1,"mt20"].join(" ")},r.a.createElement(f.a,{align:"middle"},r.a.createElement(l.a,{flex:1},r.a.createElement(j.a,{to:"/classrooms/".concat(Je.course_id,"/shixun_homework/").concat(Je.homework_common_id,"/detail")},r.a.createElement(W.a,{className:"font16 c-black"})),r.a.createElement("strong",{className:"font20 ml5"},Je.shixun_name),r.a.createElement(le.k,{temporary:!0,status:Je.homework_status})),r.a.createElement(l.a,{className:Se.a.title1_right},Je.view_tpi&&r.a.createElement(g.a,null,r.a.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),r.a.createElement(j.a,{className:"c-black",target:"_blank",to:"/tasks/".concat(Je==null||((Ye=Je.shixun_detail)===null||Ye===void 0||((ze=Ye[0])===null||ze===void 0))?void 0:ze.game_identifier)},"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD")),Object(Y.c)()&&Je.homework_end===!1&&!!Je.myshixun_id&&r.a.createElement(g.a,{className:"ml10",onClick:Object(s.a)(C.a.mark(function wr(){return C.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return sr.next=2,Rt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:Je.myshixun_identifier}}});case 2:case"end":return sr.stop()}},wr)}))},r.a.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),r.a.createElement(g.a,{className:"ml10",onClick:function(){return $r("")},loading:kr},r.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),Object(Y.c)()&&(Ct==null?void 0:Ct.length)>1&&r.a.createElement(g.a,{className:"ml10",onClick:function(){return $r("all")}},r.a.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),r.a.createElement("aside",{className:"mt30 relative"})),r.a.createElement("aside",{className:"edu-container bg-white",ref:vr},r.a.createElement("div",{id:"export-all",ref:cr},r.a.createElement("div",{id:"export-all-1"},r.a.createElement("div",{className:Se.a.title},r.a.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),r.a.createElement("div",null,Object(Y.c)()&&r.a.createElement(g.a,{className:"mr20",type:"primary",onClick:function(){Rt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Je.user_id,data:Object(p.a)({},Je)}}})}},r.a.createElement(Z.a,null),Je.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),r.a.createElement(B.a,{style:{marginTop:0}}),r.a.createElement(f.a,{className:"pl30 pr30"},r.a.createElement(l.a,null,r.a.createElement("img",{className:Se.a.userPic,src:"".concat(te.a.IMG_SERVER,"/images/").concat(Je.image_url),alt:Je.username})),r.a.createElement(l.a,null,r.a.createElement("span",{className:"font16 ml40"},Je.username),r.a.createElement(le.e,{status:Je.compelete_status}),r.a.createElement("ul",{className:Se.a.userInfo},r.a.createElement("li",null,"\u5B66\u53F7\uFF1A",Je.student_id||"--"),r.a.createElement("li",null,"\u5206\u73ED\uFF1A",Je.group_name||"--"),r.a.createElement("br",null),r.a.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",r.a.createElement("span",{className:"c-red"},Je.complete_count),"/",r.a.createElement("span",{className:"c-red"},Je.challenges_count)),r.a.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",r.a.createElement("span",{className:"c-red"},Je.current_complete_count||"-"),"/",r.a.createElement("span",{className:"c-red"},Je.challenges_count)),r.a.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",Je&&Je.efficiency===null?"--":Je&&Je.efficiency),r.a.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",Je&&Je.max_efficiency===null?"--":Je&&Je.max_efficiency))),r.a.createElement("ul",{className:[Se.a.listItem,"mt10"].join(" ")},r.a.createElement("li",null,r.a.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),r.a.createElement("div",{className:"c-light-black mt20"},Je&&Je.passed_time===null||Je&&Je.passed_time==="--"?"--":A()(Je&&Je.passed_time).format("YYYY-MM-DD HH:mm"))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",r.a.createElement("i",{onClick:function(dr){dr.stopPropagation(),dr.preventDefault(),Fr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),r.a.createElement("div",{className:"c-light-black mt20"},Je==null?void 0:Je.human_training_time_rules)),r.a.createElement("li",null,r.a.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",r.a.createElement("i",{onClick:function(dr){dr.stopPropagation(),dr.preventDefault(),Nr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),r.a.createElement("div",{className:"c-light-black mt20"},Je.time_consuming)),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),r.a.createElement("div",{className:"mt20"},Je.evaluate_count)),(Je==null?void 0:Je.eff_score_full)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("li",null,r.a.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},Je.challenge_score),"/",r.a.createElement("span",{className:"c-light-black"},Je.challenge_score_full))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u6548\u7387\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},Je.eff_score),"/",r.a.createElement("span",{className:"c-light-black"},Je.eff_score_full)))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u8FDF\u4EA4\u6263\u5206"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",null,Je.late_penalty||"- -"))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},Je.work_score),"/",r.a.createElement("span",{className:"c-light-black"},Je.all_work_score))),r.a.createElement("li",null,r.a.createElement("strong",null,"\u603B\u8BC4"),r.a.createElement("div",{className:"mt20"},r.a.createElement("span",{className:"c-orange"},Je.overall_appraisal))))),r.a.createElement(B.a,{style:{margin:0}}),(Je.work_comment_hidden||Je.work_comment)&&r.a.createElement("div",null,r.a.createElement(f.a,{align:"middle"},r.a.createElement(l.a,{flex:1},r.a.createElement("h1",{className:Se.a.title},"\u70B9\u8BC4\u5185\u5BB9")),r.a.createElement(l.a,{className:"pr30"},Object(Y.c)()&&r.a.createElement(g.a,{onClick:Object(s.a)(C.a.mark(function wr(){return C.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:n.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:r.a.createElement(X.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(s.a)(C.a.mark(function Zt(){var br;return C.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:return Tr.next=2,Object(je.m)({comment_id:Je.comment_id,homeworkId:nt.homeworkId});case 2:br=Tr.sent,br.status===0&&(E.b.success("\u5220\u9664\u6210\u529F"),Rt({type:"shixunHomeworks/getShixunWorkReport",payload:Object(p.a)({},nt)}));case 4:case"end":return Tr.stop()}},Zt)}))()}});case 1:case"end":return sr.stop()}},wr)}))},r.a.createElement(G.a,null),"\u5220\u9664"))),r.a.createElement(B.a,{style:{margin:0}}),Je.work_comment&&r.a.createElement("aside",{className:"pl30 pr30 mt20"},r.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement("br",null),r.a.createElement(At.a,{value:Je.work_comment})),Je.work_comment_hidden&&r.a.createElement("aside",{className:"pl30 pr30 mt20"},r.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),r.a.createElement("br",null),r.a.createElement(At.a,{value:Je.work_comment_hidden}))),r.a.createElement("h1",{className:Se.a.title},"\u9636\u6BB5\u6210\u7EE9"),r.a.createElement("aside",{className:"pl30 pr30"},r.a.createElement(Q.a,{dataSource:Je.stage_list,pagination:!1,columns:dn})),(Je==null?void 0:Je.work_description)&&r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",{className:Se.a.title},"\u4E2A\u4EBA\u603B\u7ED3"),r.a.createElement("aside",{className:"pl30 pr30"},r.a.createElement(At.a,{value:Je==null?void 0:Je.work_description}))),r.a.createElement("h1",{className:Se.a.title},"\u56FE\u5F62\u7EDF\u8BA1"),r.a.createElement(De,null),r.a.createElement("h1",{className:Se.a.title},"\u5B9E\u8BAD\u8BE6\u60C5")),r.a.createElement(pt,{autoHeight:Re}))),Object(Y.c)()&&r.a.createElement("aside",{className:"".concat(Se.a.footerBar," ").concat(kr?Se.a.footerBarStatic:"")},r.a.createElement("aside",{className:"edu-container"},r.a.createElement(f.a,{align:"middle"},r.a.createElement(l.a,{flex:"1"},r.a.createElement(j.a,{className:Se.a.exitComment,to:"/classrooms/".concat(nt.coursesId,"/shixun_homework/").concat(nt.categoryId,"/detail")},"\u8FD4\u56DE\u5217\u8868")),r.a.createElement(l.a,{flex:"1",className:"tr"},r.a.createElement(g.a,{type:"default",disabled:Qt==null?void 0:Qt.last,onClick:function(){return hn()}},"\u4E0A\u4E00\u4E2A"),r.a.createElement(g.a,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:rt==null?void 0:rt.last,onClick:function(){return hn("next")}},"\u4E0B\u4E00\u4E2A"),Object(Y.c)()&&r.a.createElement(g.a,{type:"primary",onClick:Object(s.a)(C.a.mark(function wr(){return C.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:Rt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Je.user_id,data:Object(p.a)({},Je)}}});case 1:case"end":return sr.stop()}},wr)}))},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),r.a.createElement(vt,null),r.a.createElement(et.a,null),r.a.createElement(n.a,{visible:fr,width:860,centered:!0,onCancel:function(){Fr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},r.a.createElement("div",{style:{color:"#333333",fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),r.a.createElement("br",null),r.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"),r.a.createElement("br",null),r.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"),r.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 "),r.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")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),r.a.createElement("br",null),r.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 "),r.a.createElement("br",null),r.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"),r.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 "),r.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"),r.a.createElement("br",null),r.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")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u5373\u65F6\u901A\u5173\u65F6\u957F"),r.a.createElement("br",null),r.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")),r.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},r.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),r.a.createElement("br",null),r.a.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u8BA1\u65F6\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),r.a.createElement(n.a,{visible:pr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:function(){Nr(!1)},width:600},r.a.createElement("div",{style:{fontWeight:400,color:"#333333"}},r.a.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.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"),r.a.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.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"),r.a.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",r.a.createElement("span",{style:{color:"#145DFF"}},"\u5373\u65F6\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"))))},ve=ue.default=Object(_.a)(function(Ee){var Oe=Ee.shixunHomeworks,Ye=Ee.loading,ze=Ee.globalSetting;return{shixunHomeworks:Oe,globalSetting:ze,loading:Ye.effects}})(me)},"6+eU":function(qe,ue,k){"use strict";k.d(ue,"a",function(){return x});var J=k("wx14"),N=k("rePB"),O=k("VTBJ"),Q=k("1OyB"),R=k("vuIU"),B=k("Ji7U"),D=k("LK+K"),f=k("q1tI"),b=k.n(f),g=k("TSYQ"),i=k.n(g),l=function(C){var c,r="".concat(C.rootPrefixCls,"-item"),a=i()(r,"".concat(r,"-").concat(C.page),(c={},Object(N.a)(c,"".concat(r,"-active"),C.active),Object(N.a)(c,C.className,!!C.className),Object(N.a)(c,"".concat(r,"-disabled"),!C.page),c)),A=function(){C.onClick(C.page)},L=function(w){C.onKeyPress(w,C.onClick,C.page)};return b.a.createElement("li",{title:C.showTitle?C.page:null,className:a,onClick:A,onKeyPress:L,tabIndex:"0"},C.itemRender(C.page,"page",b.a.createElement("a",{rel:"nofollow"},C.page)))},v=l,h={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},d=function(M){Object(B.a)(c,M);var C=Object(D.a)(c);function c(){var r;Object(Q.a)(this,c);for(var a=arguments.length,A=new Array(a),L=0;L<a;L++)A[L]=arguments[L];return r=C.call.apply(C,[this].concat(A)),r.state={goInputText:""},r.buildOptionText=function(T){return"".concat(T," ").concat(r.props.locale.items_per_page)},r.changeSize=function(T){r.props.changeSize(Number(T))},r.handleChange=function(T){r.setState({goInputText:T.target.value})},r.handleBlur=function(T){var w=r.props,_=w.goButton,j=w.quickGo,W=w.rootPrefixCls,Z=r.state.goInputText;if(_||Z==="")return;if(T.relatedTarget&&(T.relatedTarget.className.indexOf("".concat(W,"-prev"))>=0||T.relatedTarget.className.indexOf("".concat(W,"-next"))>=0))return;r.setState({goInputText:""}),j(r.getValidValue())},r.go=function(T){var w=r.state.goInputText;if(w==="")return;(T.keyCode===h.ENTER||T.type==="click")&&(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue()))},r}return Object(R.a)(c,[{key:"getValidValue",value:function(){var a=this.state,A=a.goInputText,L=a.current;return!A||isNaN(A)?L:Number(A)}},{key:"getPageSizeOptions",value:function(){var a=this.props,A=a.pageSize,L=a.pageSizeOptions;return L.some(function(T){return T.toString()===A.toString()})?L:L.concat([A.toString()]).sort(function(T,w){var _=isNaN(Number(T))?0:Number(T),j=isNaN(Number(w))?0:Number(w);return _-j})}},{key:"render",value:function(){var a=this,A=this.props,L=A.pageSize,T=A.locale,w=A.rootPrefixCls,_=A.changeSize,j=A.quickGo,W=A.goButton,Z=A.selectComponentClass,X=A.buildOptionText,G=A.selectPrefixCls,te=A.disabled,Y=this.state.goInputText,le="".concat(w,"-options"),Ae=Z,Be=null,Ce=null,Se=null;if(!_&&!j)return null;var Fe=this.getPageSizeOptions();if(_&&Ae){var Ve=Fe.map(function(De,Le){return b.a.createElement(Ae.Option,{key:Le,value:De.toString()},(X||a.buildOptionText)(De))});Be=b.a.createElement(Ae,{disabled:te,prefixCls:G,showSearch:!1,className:"".concat(le,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(L||Fe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Le){return Le.parentNode}},Ve)}return j&&(W&&(Se=typeof W=="boolean"?b.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:te,className:"".concat(le,"-quick-jumper-button")},T.jump_to_confirm):b.a.createElement("span",{onClick:this.go,onKeyUp:this.go},W)),Ce=b.a.createElement("div",{className:"".concat(le,"-quick-jumper")},T.jump_to,b.a.createElement("input",{disabled:te,type:"text",value:Y,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),T.page,Se)),b.a.createElement("li",{className:"".concat(le)},Be,Ce)}}]),c}(b.a.Component);d.defaultProps={pageSizeOptions:["10","20","50","100"]};var E=d,o=k("N2Kk");function n(){}function s(M){return typeof M=="number"&&isFinite(M)&&Math.floor(M)===M}function u(M,C,c){return c}function p(M,C,c){var r=typeof M=="undefined"?C.pageSize:M;return Math.floor((c.total-1)/r)+1}var S=function(M){Object(B.a)(c,M);var C=Object(D.a)(c);function c(r){var a;Object(Q.a)(this,c),a=C.call(this,r),a.getJumpPrevPage=function(){return Math.max(1,a.state.current-(a.props.showLessItems?3:5))},a.getJumpNextPage=function(){return Math.min(p(void 0,a.state,a.props),a.state.current+(a.props.showLessItems?3:5))},a.getItemIcon=function(_,j){var W=a.props.prefixCls,Z=_||b.a.createElement("button",{type:"button","aria-label":j,className:"".concat(W,"-item-link")});return typeof _=="function"&&(Z=b.a.createElement(_,Object(O.a)({},a.props))),Z},a.savePaginationNode=function(_){a.paginationNode=_},a.isValid=function(_){return s(_)&&_!==a.state.current},a.shouldDisplayQuickJumper=function(){var _=a.props,j=_.showQuickJumper,W=_.pageSize,Z=_.total;return Z<=W?!1:j},a.handleKeyDown=function(_){(_.keyCode===h.ARROW_UP||_.keyCode===h.ARROW_DOWN)&&_.preventDefault()},a.handleKeyUp=function(_){var j=a.getValidValue(_),W=a.state.currentInputValue;j!==W&&a.setState({currentInputValue:j}),_.keyCode===h.ENTER?a.handleChange(j):_.keyCode===h.ARROW_UP?a.handleChange(j-1):_.keyCode===h.ARROW_DOWN&&a.handleChange(j+1)},a.changePageSize=function(_){var j=a.state.current,W=p(_,a.state,a.props);j=j>W?W:j,W===0&&(j=a.state.current),typeof _=="number"&&("pageSize"in a.props||a.setState({pageSize:_}),"current"in a.props||a.setState({current:j,currentInputValue:j})),a.props.onShowSizeChange(j,_),"onChange"in a.props&&a.props.onChange&&a.props.onChange(j,_)},a.handleChange=function(_){var j=a.props.disabled,W=_;if(a.isValid(W)&&!j){var Z=p(void 0,a.state,a.props);W>Z?W=Z:W<1&&(W=1),"current"in a.props||a.setState({current:W,currentInputValue:W});var X=a.state.pageSize;return a.props.onChange(W,X),W}return a.state.current},a.prev=function(){a.hasPrev()&&a.handleChange(a.state.current-1)},a.next=function(){a.hasNext()&&a.handleChange(a.state.current+1)},a.jumpPrev=function(){a.handleChange(a.getJumpPrevPage())},a.jumpNext=function(){a.handleChange(a.getJumpNextPage())},a.hasPrev=function(){return a.state.current>1},a.hasNext=function(){return a.state.current<p(void 0,a.state,a.props)},a.runIfEnter=function(_,j){if(_.key==="Enter"||_.charCode===13){for(var W=arguments.length,Z=new Array(W>2?W-2:0),X=2;X<W;X++)Z[X-2]=arguments[X];j.apply(void 0,Z)}},a.runIfEnterPrev=function(_){a.runIfEnter(_,a.prev)},a.runIfEnterNext=function(_){a.runIfEnter(_,a.next)},a.runIfEnterJumpPrev=function(_){a.runIfEnter(_,a.jumpPrev)},a.runIfEnterJumpNext=function(_){a.runIfEnter(_,a.jumpNext)},a.handleGoTO=function(_){(_.keyCode===h.ENTER||_.type==="click")&&a.handleChange(a.state.currentInputValue)};var A=r.onChange!==n,L="current"in r;L&&!A&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var T=r.defaultCurrent;"current"in r&&(T=r.current);var w=r.defaultPageSize;return"pageSize"in r&&(w=r.pageSize),T=Math.min(T,p(w,void 0,r)),a.state={current:T,currentInputValue:T,pageSize:w},a}return Object(R.a)(c,[{key:"componentDidUpdate",value:function(a,A){var L=this.props.prefixCls;if(A.current!==this.state.current&&this.paginationNode){var T=this.paginationNode.querySelector(".".concat(L,"-item-").concat(A.current));T&&document.activeElement===T&&T.blur()}}},{key:"getValidValue",value:function(a){var A=a.target.value,L=p(void 0,this.state,this.props),T=this.state.currentInputValue,w;return A===""?w=A:isNaN(Number(A))?w=T:A>=L?w=L:w=Number(A),w}},{key:"getShowSizeChanger",value:function(){var a=this.props,A=a.showSizeChanger,L=a.total,T=a.totalBoundaryShowSizeChanger;return typeof A!="undefined"?A:L>T}},{key:"renderPrev",value:function(a){var A=this.props,L=A.prevIcon,T=A.itemRender,w=T(a,"prev",this.getItemIcon(L,"prev page")),_=!this.hasPrev();return Object(f.isValidElement)(w)?Object(f.cloneElement)(w,{disabled:_}):w}},{key:"renderNext",value:function(a){var A=this.props,L=A.nextIcon,T=A.itemRender,w=T(a,"next",this.getItemIcon(L,"next page")),_=!this.hasNext();return Object(f.isValidElement)(w)?Object(f.cloneElement)(w,{disabled:_}):w}},{key:"render",value:function(){var a=this,A=this.props,L=A.prefixCls,T=A.className,w=A.style,_=A.disabled,j=A.hideOnSinglePage,W=A.total,Z=A.locale,X=A.showQuickJumper,G=A.showLessItems,te=A.showTitle,Y=A.showTotal,le=A.simple,Ae=A.itemRender,Be=A.showPrevNextJumpers,Ce=A.jumpPrevIcon,Se=A.jumpNextIcon,Fe=A.selectComponentClass,Ve=A.selectPrefixCls,De=A.pageSizeOptions,Le=this.state,tt=Le.current,Et=Le.pageSize,Ie=Le.currentInputValue;if(j===!0&&W<=Et)return null;var Qe=p(void 0,this.state,this.props),xe=[],ie=null,$=null,re=null,ce=null,be=null,Me=X&&X.goButton,ke=G?1:2,ct=tt-1>0?tt-1:0,ut=tt+1<Qe?tt+1:Qe,mt=Object.keys(this.props).reduce(function(me,ve){return(ve.substr(0,5)==="data-"||ve.substr(0,5)==="aria-"||ve==="role")&&(me[ve]=a.props[ve]),me},{});if(le)return Me&&(typeof Me=="boolean"?be=b.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Z.jump_to_confirm):be=b.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Me),be=b.a.createElement("li",{title:te?"".concat(Z.jump_to).concat(tt,"/").concat(Qe):null,className:"".concat(L,"-simple-pager")},be)),b.a.createElement("ul",Object(J.a)({className:i()(L,"".concat(L,"-simple"),Object(N.a)({},"".concat(L,"-disabled"),_),T),style:w,ref:this.savePaginationNode},mt),b.a.createElement("li",{title:te?Z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:i()("".concat(L,"-prev"),Object(N.a)({},"".concat(L,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(ct)),b.a.createElement("li",{title:te?"".concat(tt,"/").concat(Qe):null,className:"".concat(L,"-simple-pager")},b.a.createElement("input",{type:"text",value:Ie,disabled:_,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),b.a.createElement("span",{className:"".concat(L,"-slash")},"/"),Qe),b.a.createElement("li",{title:te?Z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:i()("".concat(L,"-next"),Object(N.a)({},"".concat(L,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(ut)),be);if(Qe<=3+ke*2){var pt={locale:Z,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:te,itemRender:Ae};Qe||xe.push(b.a.createElement(v,Object(J.a)({},pt,{key:"noPager",page:Qe,className:"".concat(L,"-disabled")})));for(var Ot=1;Ot<=Qe;Ot+=1){var Ft=tt===Ot;xe.push(b.a.createElement(v,Object(J.a)({},pt,{key:Ot,page:Ot,active:Ft})))}}else{var He=G?Z.prev_3:Z.prev_5,Pe=G?Z.next_3:Z.next_5;Be&&(ie=b.a.createElement("li",{title:te?He:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:i()("".concat(L,"-jump-prev"),Object(N.a)({},"".concat(L,"-jump-prev-custom-icon"),!!Ce))},Ae(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ce,"prev page"))),$=b.a.createElement("li",{title:te?Pe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:i()("".concat(L,"-jump-next"),Object(N.a)({},"".concat(L,"-jump-next-custom-icon"),!!Se))},Ae(this.getJumpNextPage(),"jump-next",this.getItemIcon(Se,"next page")))),ce=b.a.createElement(v,{locale:Z,last:!0,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Qe,page:Qe,active:!1,showTitle:te,itemRender:Ae}),re=b.a.createElement(v,{locale:Z,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:te,itemRender:Ae});var at=Math.max(1,tt-ke),vt=Math.min(tt+ke,Qe);tt-1<=ke&&(vt=1+ke*2),Qe-tt<=ke&&(at=Qe-ke*2);for(var et=at;et<=vt;et+=1){var At=tt===et;xe.push(b.a.createElement(v,{locale:Z,rootPrefixCls:L,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:et,page:et,active:At,showTitle:te,itemRender:Ae}))}tt-1>=ke*2&&tt!==1+2&&(xe[0]=Object(f.cloneElement)(xe[0],{className:"".concat(L,"-item-after-jump-prev")}),xe.unshift(ie)),Qe-tt>=ke*2&&tt!==Qe-2&&(xe[xe.length-1]=Object(f.cloneElement)(xe[xe.length-1],{className:"".concat(L,"-item-before-jump-next")}),xe.push($)),at!==1&&xe.unshift(re),vt!==Qe&&xe.push(ce)}var je=null;Y&&(je=b.a.createElement("li",{className:"".concat(L,"-total-text")},Y(W,[W===0?0:(tt-1)*Et+1,tt*Et>W?W:tt*Et])));var _e=!this.hasPrev()||!Qe,Ue=!this.hasNext()||!Qe;return b.a.createElement("ul",Object(J.a)({className:i()(L,T,Object(N.a)({},"".concat(L,"-disabled"),_)),style:w,unselectable:"unselectable",ref:this.savePaginationNode},mt),je,b.a.createElement("li",{title:te?Z.prev_page:null,onClick:this.prev,tabIndex:_e?null:0,onKeyPress:this.runIfEnterPrev,className:i()("".concat(L,"-prev"),Object(N.a)({},"".concat(L,"-disabled"),_e)),"aria-disabled":_e},this.renderPrev(ct)),xe,b.a.createElement("li",{title:te?Z.next_page:null,onClick:this.next,tabIndex:Ue?null:0,onKeyPress:this.runIfEnterNext,className:i()("".concat(L,"-next"),Object(N.a)({},"".concat(L,"-disabled"),Ue)),"aria-disabled":Ue},this.renderNext(ut)),b.a.createElement(E,{disabled:_,locale:Z,rootPrefixCls:L,selectComponentClass:Fe,selectPrefixCls:Ve,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:tt,pageSize:Et,pageSizeOptions:De,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Me}))}}],[{key:"getDerivedStateFromProps",value:function(a,A){var L={};if("current"in a&&(L.current=a.current,a.current!==A.current&&(L.currentInputValue=L.current)),"pageSize"in a&&a.pageSize!==A.pageSize){var T=A.current,w=p(a.pageSize,A,a);T=T>w?w:T,"current"in a||(L.current=T,L.currentInputValue=T),L.pageSize=a.pageSize}return L}}]),c}(b.a.Component);S.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:o.a,style:{},itemRender:u,totalBoundaryShowSizeChanger:50};var x=S},"6GrX":function(qe,ue,k){var J=k("mFDi"),N=k("Xnb7"),O=k("bYtY"),Q=O.getContext,R=O.extend,B=O.retrieve2,D=O.retrieve3,f=O.trim,b={},g=0,i=5e3,l=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,v="12px sans-serif",h={};function d(j,W){h[j]=W}function E(j,W){W=W||v;var Z=j+":"+W;if(b[Z])return b[Z];for(var X=(j+"").split(`
|
|
`),G=0,te=0,Y=X.length;te<Y;te++)G=Math.max(A(X[te],W).width,G);return g>i&&(g=0,b={}),g++,b[Z]=G,G}function o(j,W,Z,X,G,te,Y,le){return Y?s(j,W,Z,X,G,te,Y,le):n(j,W,Z,X,G,te,le)}function n(j,W,Z,X,G,te,Y){var le=L(j,W,G,te,Y),Ae=E(j,W);G&&(Ae+=G[1]+G[3]);var Be=le.outerHeight,Ce=u(0,Ae,Z),Se=p(0,Be,X),Fe=new J(Ce,Se,Ae,Be);return Fe.lineHeight=le.lineHeight,Fe}function s(j,W,Z,X,G,te,Y,le){var Ae=T(j,{rich:Y,truncate:le,font:W,textAlign:Z,textPadding:G,textLineHeight:te}),Be=Ae.outerWidth,Ce=Ae.outerHeight,Se=u(0,Be,Z),Fe=p(0,Ce,X);return new J(Se,Fe,Be,Ce)}function u(j,W,Z){return Z==="right"?j-=W:Z==="center"&&(j-=W/2),j}function p(j,W,Z){return Z==="middle"?j-=W/2:Z==="bottom"&&(j-=W),j}function S(j,W,Z){var X=W.textPosition,G=W.textDistance,te=Z.x,Y=Z.y;G=G||0;var le=Z.height,Ae=Z.width,Be=le/2,Ce="left",Se="top";switch(X){case"left":te-=G,Y+=Be,Ce="right",Se="middle";break;case"right":te+=G+Ae,Y+=Be,Se="middle";break;case"top":te+=Ae/2,Y-=G,Ce="center",Se="bottom";break;case"bottom":te+=Ae/2,Y+=le+G,Ce="center";break;case"inside":te+=Ae/2,Y+=Be,Ce="center",Se="middle";break;case"insideLeft":te+=G,Y+=Be,Se="middle";break;case"insideRight":te+=Ae-G,Y+=Be,Ce="right",Se="middle";break;case"insideTop":te+=Ae/2,Y+=G,Ce="center";break;case"insideBottom":te+=Ae/2,Y+=le-G,Ce="center",Se="bottom";break;case"insideTopLeft":te+=G,Y+=G;break;case"insideTopRight":te+=Ae-G,Y+=G,Ce="right";break;case"insideBottomLeft":te+=G,Y+=le-G,Se="bottom";break;case"insideBottomRight":te+=Ae-G,Y+=le-G,Ce="right",Se="bottom";break}return j=j||{},j.x=te,j.y=Y,j.textAlign=Ce,j.textVerticalAlign=Se,j}function x(j,W,Z){var X={textPosition:j,textDistance:Z};return S({},X,W)}function M(j,W,Z,X,G){if(!W)return"";var te=(j+"").split(`
|
|
`);G=C(W,Z,X,G);for(var Y=0,le=te.length;Y<le;Y++)te[Y]=c(te[Y],G);return te.join(`
|
|
`)}function C(j,W,Z,X){X=R({},X),X.font=W;var Z=B(Z,"...");X.maxIterations=B(X.maxIterations,2);var G=X.minChar=B(X.minChar,0);X.cnCharWidth=E("\u56FD",W);var te=X.ascCharWidth=E("a",W);X.placeholder=B(X.placeholder,"");for(var Y=j=Math.max(0,j-1),le=0;le<G&&Y>=te;le++)Y-=te;var Ae=E(Z,W);return Ae>Y&&(Z="",Ae=0),Y=j-Ae,X.ellipsis=Z,X.ellipsisWidth=Ae,X.contentWidth=Y,X.containerWidth=j,X}function c(j,W){var Z=W.containerWidth,X=W.font,G=W.contentWidth;if(!Z)return"";var te=E(j,X);if(te<=Z)return j;for(var Y=0;;Y++){if(te<=G||Y>=W.maxIterations){j+=W.ellipsis;break}var le=Y===0?r(j,G,W.ascCharWidth,W.cnCharWidth):te>0?Math.floor(j.length*G/te):0;j=j.substr(0,le),te=E(j,X)}return j===""&&(j=W.placeholder),j}function r(j,W,Z,X){for(var G=0,te=0,Y=j.length;te<Y&&G<W;te++){var le=j.charCodeAt(te);G+=0<=le&&le<=127?Z:X}return te}function a(j){return E("\u56FD",j)}function A(j,W){return h.measureText(j,W)}h.measureText=function(j,W){var Z=Q();return Z.font=W||v,Z.measureText(j)};function L(j,W,Z,X,G){j!=null&&(j+="");var te=B(X,a(W)),Y=j?j.split(`
|
|
`):[],le=Y.length*te,Ae=le,Be=!0;if(Z&&(Ae+=Z[0]+Z[2]),j&&G){Be=!1;var Ce=G.outerHeight,Se=G.outerWidth;if(Ce!=null&&Ae>Ce)j="",Y=[];else if(Se!=null)for(var Fe=C(Se-(Z?Z[1]+Z[3]:0),W,G.ellipsis,{minChar:G.minChar,placeholder:G.placeholder}),Ve=0,De=Y.length;Ve<De;Ve++)Y[Ve]=c(Y[Ve],Fe)}return{lines:Y,height:le,outerHeight:Ae,lineHeight:te,canCacheByTextString:Be}}function T(j,W){var Z={lines:[],width:0,height:0};if(j!=null&&(j+=""),!j)return Z;for(var X=l.lastIndex=0,G;(G=l.exec(j))!=null;){var te=G.index;te>X&&w(Z,j.substring(X,te)),w(Z,G[2],G[1]),X=l.lastIndex}X<j.length&&w(Z,j.substring(X,j.length));var Y=Z.lines,le=0,Ae=0,Be=[],Ce=W.textPadding,Se=W.truncate,Fe=Se&&Se.outerWidth,Ve=Se&&Se.outerHeight;Ce&&(Fe!=null&&(Fe-=Ce[1]+Ce[3]),Ve!=null&&(Ve-=Ce[0]+Ce[2]));for(var De=0;De<Y.length;De++){for(var Le=Y[De],tt=0,Et=0,Ie=0;Ie<Le.tokens.length;Ie++){var Qe=Le.tokens[Ie],xe=Qe.styleName&&W.rich[Qe.styleName]||{},ie=Qe.textPadding=xe.textPadding,$=Qe.font=xe.font||W.font,re=Qe.textHeight=B(xe.textHeight,a($));if(ie&&(re+=ie[0]+ie[2]),Qe.height=re,Qe.lineHeight=D(xe.textLineHeight,W.textLineHeight,re),Qe.textAlign=xe&&xe.textAlign||W.textAlign,Qe.textVerticalAlign=xe&&xe.textVerticalAlign||"middle",Ve!=null&&le+Qe.lineHeight>Ve)return{lines:[],width:0,height:0};Qe.textWidth=E(Qe.text,$);var ce=xe.textWidth,be=ce==null||ce==="auto";if(typeof ce=="string"&&ce.charAt(ce.length-1)==="%")Qe.percentWidth=ce,Be.push(Qe),ce=0;else{if(be){ce=Qe.textWidth;var Me=xe.textBackgroundColor,ke=Me&&Me.image;ke&&(ke=N.findExistImage(ke),N.isImageReady(ke)&&(ce=Math.max(ce,ke.width*re/ke.height)))}var ct=ie?ie[1]+ie[3]:0;ce+=ct;var ut=Fe!=null?Fe-Et:null;ut!=null&&ut<ce&&(!be||ut<ct?(Qe.text="",Qe.textWidth=ce=0):(Qe.text=M(Qe.text,ut-ct,$,Se.ellipsis,{minChar:Se.minChar}),Qe.textWidth=E(Qe.text,$),ce=Qe.textWidth+ct))}Et+=Qe.width=ce,xe&&(tt=Math.max(tt,Qe.lineHeight))}Le.width=Et,Le.lineHeight=tt,le+=tt,Ae=Math.max(Ae,Et)}Z.outerWidth=Z.width=B(W.textWidth,Ae),Z.outerHeight=Z.height=B(W.textHeight,le),Ce&&(Z.outerWidth+=Ce[1]+Ce[3],Z.outerHeight+=Ce[0]+Ce[2]);for(var De=0;De<Be.length;De++){var Qe=Be[De],mt=Qe.percentWidth;Qe.width=parseInt(mt,10)/100*Ae}return Z}function w(j,W,Z){for(var X=W==="",G=W.split(`
|
|
`),te=j.lines,Y=0;Y<G.length;Y++){var le=G[Y],Ae={styleName:Z,text:le,isLineHolder:!le&&!X};if(Y)te.push({tokens:[Ae]});else{var Be=(te[te.length-1]||(te[0]={tokens:[]})).tokens,Ce=Be.length;Ce===1&&Be[0].isLineHolder?Be[0]=Ae:(le||!Ce||X)&&Be.push(Ae)}}}function _(j){var W=(j.fontSize||j.fontFamily)&&[j.fontStyle,j.fontWeight,(j.fontSize||12)+"px",j.fontFamily||"sans-serif"].join(" ");return W&&f(W)||j.textFont||j.font}ue.DEFAULT_FONT=v,ue.$override=d,ue.getWidth=E,ue.getBoundingRect=o,ue.adjustTextX=u,ue.adjustTextY=p,ue.calculateTextPosition=S,ue.adjustTextPositionOnRect=x,ue.truncateText=M,ue.getLineHeight=a,ue.measureText=A,ue.parsePlainText=L,ue.parseRichText=T,ue.makeFont=_},"6RRn":function(qe,ue,k){"use strict";var J=k("wCXF"),N=k("n6Qo");k.d(ue,"b",function(){return N.a});var O=k("IBYe"),Q=k("6eGT"),R=k("hW8S");k.d(ue,"a",function(){return R.a}),ue.c=J.b},"6eGT":function(qe,ue,k){"use strict";function J(N){return null}ue.a=J},"6fms":function(qe,ue,k){var J=k("SUKs"),N=k("06Qe"),O=k("bYtY"),Q=O.each;function R(b){return parseInt(b,10)}function B(b,g){N.initVML(),this.root=b,this.storage=g;var i=document.createElement("div"),l=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",l.style.cssText="position:absolute;left:0;top:0;",b.appendChild(i),this._vmlRoot=l,this._vmlViewport=i,this.resize();var v=g.delFromStorage,h=g.addToStorage;g.delFromStorage=function(d){v.call(g,d),d&&(d.onRemove&&d.onRemove(l))},g.addToStorage=function(d){d.onAdd&&d.onAdd(l),h.call(g,d)},this._firstPaint=!0}B.prototype={constructor:B,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var b=this.getViewportRoot();if(b)return{offsetLeft:b.offsetLeft||0,offsetTop:b.offsetTop||0}},refresh:function(){var b=this.storage.getDisplayList(!0,!0);this._paintList(b)},_paintList:function(b){for(var g=this._vmlRoot,i=0;i<b.length;i++){var l=b[i];l.invisible||l.ignore?(l.__alreadyNotVisible||l.onRemove(g),l.__alreadyNotVisible=!0):(l.__alreadyNotVisible&&l.onAdd(g),l.__alreadyNotVisible=!1,l.__dirty&&(l.beforeBrush&&l.beforeBrush(),(l.brushVML||l.brush).call(l,g),l.afterBrush&&l.afterBrush())),l.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(g),this._firstPaint=!1)},resize:function(b,g){var b=b==null?this._getWidth():b,g=g==null?this._getHeight():g;if(this._width!==b||this._height!==g){this._width=b,this._height=g;var i=this._vmlViewport.style;i.width=b+"px",i.height=g+"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 b=this.root,g=b.currentStyle;return(b.clientWidth||R(g.width))-R(g.paddingLeft)-R(g.paddingRight)|0},_getHeight:function(){var b=this.root,g=b.currentStyle;return(b.clientHeight||R(g.height))-R(g.paddingTop)-R(g.paddingBottom)|0}};function D(b){return function(){J('In IE8.0 VML mode painter not support method "'+b+'"')}}Q(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(b){B.prototype[b]=D(b)});var f=B;qe.exports=f},"746U":function(qe,ue,k){"use strict";k.d(ue,"d",function(){return N}),k.d(ue,"j",function(){return O}),k.d(ue,"i",function(){return Q}),k.d(ue,"h",function(){return R}),k.d(ue,"e",function(){return B}),k.d(ue,"k",function(){return D}),k.d(ue,"l",function(){return f}),k.d(ue,"a",function(){return b}),k.d(ue,"f",function(){return i}),k.d(ue,"g",function(){return l}),k.d(ue,"m",function(){return v}),k.d(ue,"c",function(){return E}),k.d(ue,"b",function(){return o}),k.d(ue,"n",function(){return n}),k.d(ue,"o",function(){return s});var J={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function N(u){return Array.isArray?Array.isArray(u):!!(u&&typeof u.length===J.number&&u.constructor===Array)}function O(u){return typeof u===J.string||u instanceof String}function Q(u){return typeof u===J.object&&u!==null&&!Array.isArray(u)&&!(u instanceof RegExp)&&!(u instanceof Date)}function R(u){return(typeof u===J.number||u instanceof Number)&&!isNaN(u)}function B(u){return u===!0||u===!1}function D(u){return typeof u===J.undefined}function f(u){return D(u)||u===null}function b(u,p){if(!u)throw new Error(p?"Unexpected type, expected '"+p+"'":"Unexpected type")}var g=Object.prototype.hasOwnProperty;function i(u){if(!Q(u))return!1;for(var p in u)if(g.call(u,p))return!1;return!0}function l(u){return typeof u===J.function}function v(u,p){for(var S=Math.min(u.length,p.length),x=0;x<S;x++)h(u[x],p[x])}function h(u,p){if(O(p)){if(typeof u!==p)throw new Error("argument does not match constraint: typeof "+p)}else if(l(p)){try{if(u instanceof p)return}catch(S){}if(!f(u)&&u.constructor===p)return;if(p.length===1&&p.call(void 0,u)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function d(u){for(var p=[],S=Object.getPrototypeOf(u);Object.prototype!==S;)p=p.concat(Object.getOwnPropertyNames(S)),S=Object.getPrototypeOf(S);return p}function E(u){for(var p=[],S=0,x=d(u);S<x.length;S++){var M=x[S];typeof u[M]=="function"&&p.push(M)}return p}function o(u,p){for(var S=function(r){return function(){var a=Array.prototype.slice.call(arguments,0);return p(r,a)}},x={},M=0,C=u;M<C.length;M++){var c=C[M];x[c]=S(c)}return x}function n(u){return u===null?void 0:u}function s(u){return typeof u=="undefined"?null:u}},"7Cbv":function(qe,ue,k){"use strict";var J=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),N=new Uint8Array(16);function O(){if(!J)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return J(N)}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 R(v){return typeof v=="string"&&Q.test(v)}for(var B=R,D=[],f=0;f<256;++f)D.push((f+256).toString(16).substr(1));function b(v){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,d=(D[v[h+0]]+D[v[h+1]]+D[v[h+2]]+D[v[h+3]]+"-"+D[v[h+4]]+D[v[h+5]]+"-"+D[v[h+6]]+D[v[h+7]]+"-"+D[v[h+8]]+D[v[h+9]]+"-"+D[v[h+10]]+D[v[h+11]]+D[v[h+12]]+D[v[h+13]]+D[v[h+14]]+D[v[h+15]]).toLowerCase();if(!B(d))throw TypeError("Stringified UUID is invalid");return d}var g=b;function i(v,h,d){v=v||{};var E=v.random||(v.rng||O)();if(E[6]=E[6]&15|64,E[8]=E[8]&63|128,h){d=d||0;for(var o=0;o<16;++o)h[d+o]=E[o];return h}return g(E)}var l=ue.a=i},"7SHv":function(qe,ue,k){var J=k("LPTA"),N=J.devicePixelRatio,O=k("bYtY"),Q=k("SUKs"),R=k("mFDi"),B=k("BPZU"),D=k("Xmg4"),f=k("mLcG"),b=k("Dagg"),g=k("ItGF"),i=1e5,l=314159,v=.01,h=.001;function d(C){return parseInt(C,10)}function E(C){return C?C.__builtin__?!0:!(typeof C.resize!="function"||typeof C.refresh!="function"):!1}var o=new R(0,0,0,0),n=new R(0,0,0,0);function s(C,c,r){return o.copy(C.getBoundingRect()),C.transform&&o.applyTransform(C.transform),n.width=c,n.height=r,!o.intersect(n)}function u(C,c){if(C===c)return!1;if(!C||!c||C.length!==c.length)return!0;for(var r=0;r<C.length;r++)if(C[r]!==c[r])return!0;return!1}function p(C,c){for(var r=0;r<C.length;r++){var a=C[r];a.setTransform(c),c.beginPath(),a.buildPath(c,a.shape),c.clip(),a.restoreTransform(c)}}function S(C,c){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+C+"px","height:"+c+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var x=function(C,c,r){this.type="canvas";var a=!C.nodeName||C.nodeName.toUpperCase()==="CANVAS";this._opts=r=O.extend({},r||{}),this.dpr=r.devicePixelRatio||N,this._singleCanvas=a,this.root=C;var A=C.style;A&&(A["-webkit-tap-highlight-color"]="transparent",A["-webkit-user-select"]=A["user-select"]=A["-webkit-touch-callout"]="none",C.innerHTML=""),this.storage=c;var L=this._zlevelList=[],T=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,a){var _=C.width,j=C.height;r.width!=null&&(_=r.width),r.height!=null&&(j=r.height),this.dpr=r.devicePixelRatio||1,C.width=_*this.dpr,C.height=j*this.dpr,this._width=_,this._height=j;var W=new D(C,this,this.dpr);W.__builtin__=!0,W.initContext(),T[l]=W,W.zlevel=l,L.push(l),this._domRoot=C}else{this._width=this._getSize(0),this._height=this._getSize(1);var w=this._domRoot=S(this._width,this._height);C.appendChild(w)}this._hoverlayer=null,this._hoverElements=[]};x.prototype={constructor:x,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var C=this.getViewportRoot();if(C)return{offsetLeft:C.offsetLeft||0,offsetTop:C.offsetTop||0}},refresh:function(C){var c=this.storage.getDisplayList(!0),r=this._zlevelList;this._redrawId=Math.random(),this._paintList(c,C,this._redrawId);for(var a=0;a<r.length;a++){var A=r[a],L=this._layers[A];if(!L.__builtin__&&L.refresh){var T=a===0?this._backgroundColor:null;L.refresh(T)}}return this.refreshHover(),this},addHover:function(C,c){if(C.__hoverMir)return;var r=new C.constructor({style:C.style,shape:C.shape,z:C.z,z2:C.z2,silent:C.silent});return r.__from=C,C.__hoverMir=r,c&&r.setStyle(c),this._hoverElements.push(r),r},removeHover:function(C){var c=C.__hoverMir,r=this._hoverElements,a=O.indexOf(r,c);a>=0&&r.splice(a,1),C.__hoverMir=null},clearHover:function(C){for(var c=this._hoverElements,r=0;r<c.length;r++){var a=c[r].__from;a&&(a.__hoverMir=null)}c.length=0},refreshHover:function(){var C=this._hoverElements,c=C.length,r=this._hoverlayer;if(r&&r.clear(),!c)return;B(C,this.storage.displayableSortFunc),r||(r=this._hoverlayer=this.getLayer(i));var a={};r.ctx.save();for(var A=0;A<c;){var L=C[A],T=L.__from;if(!(T&&T.__zr)){C.splice(A,1),T.__hoverMir=null,c--;continue}A++,T.invisible||(L.transform=T.transform,L.invTransform=T.invTransform,L.__clipPaths=T.__clipPaths,this._doPaintEl(L,r,!0,a))}r.ctx.restore()},getHoverLayer:function(){return this.getLayer(i)},_paintList:function(C,c,r){if(this._redrawId!==r)return;c=c||!1,this._updateLayerStatus(C);var a=this._doPaintList(C,c);if(this._needsManuallyCompositing&&this._compositeManually(),!a){var A=this;f(function(){A._paintList(C,c,r)})}},_compositeManually:function(){var C=this.getLayer(l).ctx,c=this._domRoot.width,r=this._domRoot.height;C.clearRect(0,0,c,r),this.eachBuiltinLayer(function(a){a.virtual&&C.drawImage(a.dom,0,0,c,r)})},_doPaintList:function(C,c){for(var r=[],a=0;a<this._zlevelList.length;a++){var A=this._zlevelList[a],L=this._layers[A];L.__builtin__&&L!==this._hoverlayer&&(L.__dirty||c)&&r.push(L)}for(var T=!0,w=0;w<r.length;w++){var L=r[w],_=L.ctx,j={};_.save();var W=c?L.__startIndex:L.__drawIndex,Z=!c&&L.incremental&&Date.now,X=Z&&Date.now(),G=L.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(L.__startIndex===L.__endIndex)L.clear(!1,G);else if(W===L.__startIndex){var te=C[W];(!te.incremental||!te.notClear||c)&&L.clear(!1,G)}W===-1&&(console.error("For some unknown reason. drawIndex is -1"),W=L.__startIndex);for(var Y=W;Y<L.__endIndex;Y++){var le=C[Y];if(this._doPaintEl(le,L,c,j),le.__dirty=le.__dirtyText=!1,Z){var Ae=Date.now()-X;if(Ae>15)break}}L.__drawIndex=Y,L.__drawIndex<L.__endIndex&&(T=!1),j.prevElClipPaths&&_.restore(),_.restore()}return g.wxa&&O.each(this._layers,function(Be){Be&&Be.ctx&&Be.ctx.draw&&Be.ctx.draw()}),T},_doPaintEl:function(C,c,r,a){var A=c.ctx,L=C.transform;if((c.__dirty||r)&&!C.invisible&&C.style.opacity!==0&&!(L&&!L[0]&&!L[3])&&!(C.culling&&s(C,this._width,this._height))){var T=C.__clipPaths,w=a.prevElClipPaths;(!w||u(T,w))&&(w&&(A.restore(),a.prevElClipPaths=null,a.prevEl=null),T&&(A.save(),p(T,A),a.prevElClipPaths=T)),C.beforeBrush&&C.beforeBrush(A),C.brush(A,a.prevEl||null),a.prevEl=C,C.afterBrush&&C.afterBrush(A)}},getLayer:function(C,c){this._singleCanvas&&!this._needsManuallyCompositing&&(C=l);var r=this._layers[C];return r||(r=new D("zr_"+C,this,this.dpr),r.zlevel=C,r.__builtin__=!0,this._layerConfig[C]?O.merge(r,this._layerConfig[C],!0):this._layerConfig[C-v]&&O.merge(r,this._layerConfig[C-v],!0),c&&(r.virtual=c),this.insertLayer(C,r),r.initContext()),r},insertLayer:function(C,c){var r=this._layers,a=this._zlevelList,A=a.length,L=null,T=-1,w=this._domRoot;if(r[C]){Q("ZLevel "+C+" has been used already");return}if(!E(c)){Q("Layer of zlevel "+C+" is not valid");return}if(A>0&&C>a[0]){for(T=0;T<A-1&&!(a[T]<C&&a[T+1]>C);T++);L=r[a[T]]}if(a.splice(T+1,0,C),r[C]=c,!c.virtual)if(L){var _=L.dom;_.nextSibling?w.insertBefore(c.dom,_.nextSibling):w.appendChild(c.dom)}else w.firstChild?w.insertBefore(c.dom,w.firstChild):w.appendChild(c.dom)},eachLayer:function(C,c){var r=this._zlevelList,a,A;for(A=0;A<r.length;A++)a=r[A],C.call(c,this._layers[a],a)},eachBuiltinLayer:function(C,c){var r=this._zlevelList,a,A,L;for(L=0;L<r.length;L++)A=r[L],a=this._layers[A],a.__builtin__&&C.call(c,a,A)},eachOtherLayer:function(C,c){var r=this._zlevelList,a,A,L;for(L=0;L<r.length;L++)A=r[L],a=this._layers[A],a.__builtin__||C.call(c,a,A)},getLayers:function(){return this._layers},_updateLayerStatus:function(C){this.eachBuiltinLayer(function(j,W){j.__dirty=j.__used=!1});function c(j){A&&(A.__endIndex!==j&&(A.__dirty=!0),A.__endIndex=j)}if(this._singleCanvas)for(var r=1;r<C.length;r++){var a=C[r];if(a.zlevel!==C[r-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}for(var A=null,L=0,T,r=0;r<C.length;r++){var a=C[r],w=a.zlevel,_;T!==w&&(T=w,L=0),a.incremental?(_=this.getLayer(w+h,this._needsManuallyCompositing),_.incremental=!0,L=1):_=this.getLayer(w+(L>0?v:0),this._needsManuallyCompositing),_.__builtin__||Q("ZLevel "+w+" has been used by unkown layer "+_.id),_!==A&&(_.__used=!0,_.__startIndex!==r&&(_.__dirty=!0),_.__startIndex=r,_.incremental?_.__drawIndex=-1:_.__drawIndex=r,c(r),A=_),a.__dirty&&(_.__dirty=!0,_.incremental&&_.__drawIndex<0&&(_.__drawIndex=r))}c(r),this.eachBuiltinLayer(function(j,W){!j.__used&&j.getElementCount()>0&&(j.__dirty=!0,j.__startIndex=j.__endIndex=j.__drawIndex=0),j.__dirty&&j.__drawIndex<0&&(j.__drawIndex=j.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(C){C.clear()},setBackgroundColor:function(C){this._backgroundColor=C},configLayer:function(C,c){if(c){var r=this._layerConfig;r[C]?O.merge(r[C],c,!0):r[C]=c;for(var a=0;a<this._zlevelList.length;a++){var A=this._zlevelList[a];if(A===C||A===C+v){var L=this._layers[A];O.merge(L,r[C],!0)}}}},delLayer:function(C){var c=this._layers,r=this._zlevelList,a=c[C];if(!a)return;a.dom.parentNode.removeChild(a.dom),delete c[C],r.splice(O.indexOf(r,C),1)},resize:function(C,c){if(this._domRoot.style){var r=this._domRoot;r.style.display="none";var a=this._opts;if(C!=null&&(a.width=C),c!=null&&(a.height=c),C=this._getSize(0),c=this._getSize(1),r.style.display="",this._width!==C||c!==this._height){r.style.width=C+"px",r.style.height=c+"px";for(var A in this._layers)this._layers.hasOwnProperty(A)&&this._layers[A].resize(C,c);O.each(this._progressiveLayers,function(L){L.resize(C,c)}),this.refresh(!0)}this._width=C,this._height=c}else{if(C==null||c==null)return;this._width=C,this._height=c,this.getLayer(l).resize(C,c)}return this},clearLayer:function(C){var c=this._layers[C];c&&c.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(C){if(C=C||{},this._singleCanvas&&!this._compositeManually)return this._layers[l].dom;var c=new D("image",this,C.pixelRatio||this.dpr);if(c.initContext(),c.clear(!1,C.backgroundColor||this._backgroundColor),C.pixelRatio<=this.dpr){this.refresh();var r=c.dom.width,a=c.dom.height,A=c.ctx;this.eachLayer(function(j){j.__builtin__?A.drawImage(j.dom,0,0,r,a):j.renderToCanvas&&(c.ctx.save(),j.renderToCanvas(c.ctx),c.ctx.restore())})}else for(var L={},T=this.storage.getDisplayList(!0),w=0;w<T.length;w++){var _=T[w];this._doPaintEl(_,c,!0,L)}return c.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(C){var c=this._opts,r=["width","height"][C],a=["clientWidth","clientHeight"][C],A=["paddingLeft","paddingTop"][C],L=["paddingRight","paddingBottom"][C];if(c[r]!=null&&c[r]!=="auto")return parseFloat(c[r]);var T=this.root,w=document.defaultView.getComputedStyle(T);return(T[a]||d(w[r])||d(T.style[r]))-(d(w[A])||0)-(d(w[L])||0)|0},pathToImage:function(C,c){c=c||this.dpr;var r=document.createElement("canvas"),a=r.getContext("2d"),A=C.getBoundingRect(),L=C.style,T=L.shadowBlur*c,w=L.shadowOffsetX*c,_=L.shadowOffsetY*c,j=L.hasStroke()?L.lineWidth:0,W=Math.max(j/2,-w+T),Z=Math.max(j/2,w+T),X=Math.max(j/2,-_+T),G=Math.max(j/2,_+T),te=A.width+W+Z,Y=A.height+X+G;r.width=te*c,r.height=Y*c,a.scale(c,c),a.clearRect(0,0,te,Y),a.dpr=c;var le={position:C.position,rotation:C.rotation,scale:C.scale};C.position=[W-A.x,X-A.y],C.rotation=0,C.scale=[1,1],C.updateTransform(),C&&C.brush(a);var Ae=b,Be=new Ae({style:{x:0,y:0,image:r}});return le.position!=null&&(Be.position=C.position=le.position),le.rotation!=null&&(Be.rotation=C.rotation=le.rotation),le.scale!=null&&(Be.scale=C.scale=le.scale),Be}};var M=x;qe.exports=M},"7ahc":function(qe,ue,k){"use strict";k.d(ue,"a",function(){return p});var J=k("k1fw"),N=k("0Owb"),O=k("+L6B"),Q=k("2/Rp"),R=k("y8nQ"),B=k("Vl3Y"),D=k("tJVT"),f=k("OaEy"),b=k("2fM7"),g=k("q1tI"),i=k.n(g),l=k("VrN/"),v=k.n(l),h=k("p77/"),d=k.n(h),E=k("c5Ni"),o=k.n(E),n=b.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},u={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"]};ue.b=function(S){var x=S.callback,M=S.onCancel,C=Object(g.useState)("python"),c=Object(D.a)(C,2),r=c[0],a=c[1];function A(T){a(u[T][1])}function L(T){x(T)}return i.a.createElement(B.a,Object(N.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:L}),i.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},i.a.createElement(b.a,{onChange:A},Object.keys(u).map(function(T){return i.a.createElement(n,{key:T,value:T},u[T][0])}))),i.a.createElement(B.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},i.a.createElement(p,{mode:r})),i.a.createElement("div",{className:"flex-container flex-end"},i.a.createElement(Q.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(Q.a,{type:"ghost",onClick:M},"\u53D6\u6D88")))};function p(S){var x=S.value,M=S.onChange,C=S.mode,c=S.options,r=c===void 0?{}:c,a=Object(g.useRef)(),A=Object(g.useState)(),L=Object(D.a)(A,2),T=L[0],w=L[1];return Object(g.useEffect)(function(){if(T){function _(j){var W=j.getValue();M&&M(W)}return T.on("change",_),function(){T.off("change",_)}}},[T,M]),Object(g.useEffect)(function(){T&&T.setOption("mode",C)},[T,C]),Object(g.useEffect)(function(){T&&((x!==T.getValue()||x==="")&&setTimeout(function(){T.setValue(x||" ")},300))},[T,x]),Object(g.useEffect)(function(){if(a.current&&!T){var _=v.a.fromTextArea(a.current,Object(J.a)({mode:C,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},r));w(_)}},[a.current,T]),i.a.createElement("div",{className:"my-codemirror-container"},i.a.createElement("textarea",{ref:a}))}},"7ixt":function(qe,ue,k){"use strict";k.d(ue,"a",function(){return O});var J={adjustX:1,adjustY:1},N=[0,0],O={left:{points:["cr","cl"],overflow:J,offset:[-4,0],targetOffset:N},right:{points:["cl","cr"],overflow:J,offset:[4,0],targetOffset:N},top:{points:["bc","tc"],overflow:J,offset:[0,-4],targetOffset:N},bottom:{points:["tc","bc"],overflow:J,offset:[0,4],targetOffset:N},topLeft:{points:["bl","tl"],overflow:J,offset:[0,-4],targetOffset:N},leftTop:{points:["tr","tl"],overflow:J,offset:[-4,0],targetOffset:N},topRight:{points:["br","tr"],overflow:J,offset:[0,-4],targetOffset:N},rightTop:{points:["tl","tr"],overflow:J,offset:[4,0],targetOffset:N},bottomRight:{points:["tr","br"],overflow:J,offset:[0,4],targetOffset:N},rightBottom:{points:["bl","br"],overflow:J,offset:[4,0],targetOffset:N},bottomLeft:{points:["tl","bl"],overflow:J,offset:[0,4],targetOffset:N},leftBottom:{points:["br","bl"],overflow:J,offset:[-4,0],targetOffset:N}},Q=O},"7oTu":function(qe,ue,k){var J=k("IMiH"),N=k("QBsz"),O=N.applyTransform,Q=J.CMD,R=[[],[],[]],B=Math.sqrt,D=Math.atan2;function f(b,g){var i=b.data,l,v,h,d,E,o,n=Q.M,s=Q.C,u=Q.L,p=Q.R,S=Q.A,x=Q.Q;for(h=0,d=0;h<i.length;){l=i[h++],d=h,v=0;switch(l){case n:v=1;break;case u:v=1;break;case s:v=3;break;case x:v=2;break;case S:var M=g[4],C=g[5],c=B(g[0]*g[0]+g[1]*g[1]),r=B(g[2]*g[2]+g[3]*g[3]),a=D(-g[1]/r,g[0]/c);i[h]*=c,i[h++]+=M,i[h]*=r,i[h++]+=C,i[h++]*=c,i[h++]*=r,i[h++]+=a,i[h++]+=a,h+=2,d=h;break;case p:o[0]=i[h++],o[1]=i[h++],O(o,o,g),i[d++]=o[0],i[d++]=o[1],o[0]+=i[h++],o[1]+=i[h++],O(o,o,g),i[d++]=o[0],i[d++]=o[1]}for(E=0;E<v;E++){var o=R[E];o[0]=i[h++],o[1]=i[h++],O(o,o,g),i[d++]=o[0],i[d++]=o[1]}}}qe.exports=f},"815F":function(qe,ue,k){"use strict";k.d(ue,"e",function(){return D}),k.d(ue,"c",function(){return b}),k.d(ue,"d",function(){return g}),k.d(ue,"a",function(){return l}),k.d(ue,"f",function(){return v}),k.d(ue,"b",function(){return h});var J=k("KQm4"),N=k("VTBJ"),O=k("Ff2n"),Q=k("Zm9Q"),R=k("Kwbf"),B=k("OZM5");function D(d,E){return d!=null?d:E}function f(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],E=new Map;function o(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(u){var p=u.key,S=u.children;Object(R.a)(p!=null,"Tree node must have a certain key: [".concat(s).concat(p,"]"));var x=String(p);Object(R.a)(!E.has(x)||p===null||p===void 0,"Same 'key' exist in the Tree: ".concat(x)),E.set(x,!0),o(S,"".concat(s).concat(x," > "))})}o(d)}function b(d){function E(o){var n=Object(Q.a)(o);return n.map(function(s){if(!Object(B.i)(s))return Object(R.a)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var u=s.key,p=s.props,S=p.children,x=Object(O.a)(p,["children"]),M=Object(N.a)({key:u},x),C=E(S);return C.length&&(M.children=C),M}).filter(function(s){return s})}return E(d)}function g(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],o=new Set(E===!0?[]:E),n=[];function s(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map(function(S,x){var M=Object(B.h)(p?p.pos:"0",x),C=D(S.key,M),c=Object(N.a)(Object(N.a)({},S),{},{parent:p,pos:M,children:null,data:S,isStart:[].concat(Object(J.a)(p?p.isStart:[]),[x===0]),isEnd:[].concat(Object(J.a)(p?p.isEnd:[]),[x===u.length-1])});return n.push(c),E===!0||o.has(C)?c.children=s(S.children||[],c):c.children=[],c})}return s(d),n}function i(d,E,o){var n;o?typeof o=="string"?n=function(p){return p[o]}:typeof o=="function"&&(n=function(p){return o(p)}):n=function(p,S){return D(p.key,S)};function s(u,p,S){var x=u?u.children:d,M=u?Object(B.h)(S.pos,p):"0";if(u){var C=n(u,M),c={node:u,index:p,pos:M,key:C,parentPos:S.node?S.pos:null,level:S.level+1};E(c)}x&&x.forEach(function(r,a){s(r,a,{node:u,pos:M,level:S?S.level+1:-1})})}s(null)}function l(d){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=E.initWrapper,n=E.processEntity,s=E.onProcessFinished,u=arguments.length>2?arguments[2]:void 0,p={},S={},x={posEntities:p,keyEntities:S};return o&&(x=o(x)||x),i(d,function(M){var C=M.node,c=M.index,r=M.pos,a=M.key,A=M.parentPos,L=M.level,T={node:C,index:c,key:a,pos:r,level:L},w=D(a,r);p[r]=T,S[w]=T,T.parent=p[A],T.parent&&(T.parent.children=T.parent.children||[],T.parent.children.push(T)),n&&n(T,x)},u),s&&s(x),x}function v(d,E){var o=E.expandedKeys,n=E.selectedKeys,s=E.loadedKeys,u=E.loadingKeys,p=E.checkedKeys,S=E.halfCheckedKeys,x=E.dragOverNodeKey,M=E.dropPosition,C=E.keyEntities,c=C[d],r={eventKey:d,expanded:o.indexOf(d)!==-1,selected:n.indexOf(d)!==-1,loaded:s.indexOf(d)!==-1,loading:u.indexOf(d)!==-1,checked:p.indexOf(d)!==-1,halfChecked:S.indexOf(d)!==-1,pos:String(c?c.pos:""),dragOver:x===d&&M===0,dragOverGapTop:x===d&&M===-1,dragOverGapBottom:x===d&&M===1};return r}function h(d){var E=d.data,o=d.expanded,n=d.selected,s=d.checked,u=d.loaded,p=d.loading,S=d.halfChecked,x=d.dragOver,M=d.dragOverGapTop,C=d.dragOverGapBottom,c=d.pos,r=d.active,a=Object(N.a)(Object(N.a)({},E),{},{expanded:o,selected:n,checked:s,loaded:u,loading:p,halfChecked:S,dragOver:x,dragOverGapTop:M,dragOverGapBottom:C,pos:c,active:r});return"props"in a||Object.defineProperty(a,"props",{get:function(){return Object(R.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),d}}),a}},"8EBN":function(qe,ue,k){(function(J){J(k("VrN/"))})(function(J){"use strict";J.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 N=0;N<J.modeInfo.length;N++){var O=J.modeInfo[N];O.mimes&&(O.mime=O.mimes[0])}J.findModeByMIME=function(Q){Q=Q.toLowerCase();for(var R=0;R<J.modeInfo.length;R++){var B=J.modeInfo[R];if(B.mime==Q)return B;if(B.mimes){for(var D=0;D<B.mimes.length;D++)if(B.mimes[D]==Q)return B}}if(/\+xml$/.test(Q))return J.findModeByMIME("application/xml");if(/\+json$/.test(Q))return J.findModeByMIME("application/json")},J.findModeByExtension=function(Q){Q=Q.toLowerCase();for(var R=0;R<J.modeInfo.length;R++){var B=J.modeInfo[R];if(B.ext){for(var D=0;D<B.ext.length;D++)if(B.ext[D]==Q)return B}}},J.findModeByFileName=function(Q){for(var R=0;R<J.modeInfo.length;R++){var B=J.modeInfo[R];if(B.file&&B.file.test(Q))return B}var D=Q.lastIndexOf("."),f=D>-1&&Q.substring(D+1,Q.length);if(f)return J.findModeByExtension(f)},J.findModeByName=function(Q){Q=Q.toLowerCase();for(var R=0;R<J.modeInfo.length;R++){var B=J.modeInfo[R];if(B.name.toLowerCase()==Q)return B;if(B.alias){for(var D=0;D<B.alias.length;D++)if(B.alias[D].toLowerCase()==Q)return B}}}})},"8HAY":function(qe,ue,k){"use strict";k.d(ue,"a",function(){return B}),k.d(ue,"b",function(){return D});var J=k("pmY6"),N=k("MI8n"),O=function(){var f=function(b,g){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(b,g)};return function(b,g){f(b,g);function i(){this.constructor=b}b.prototype=g===null?Object.create(g):(i.prototype=g.prototype,new i)}}(),Q=function(f,b,g,i){function l(v){return v instanceof g?v:new g(function(h){h(v)})}return new(g||(g=Promise))(function(v,h){function d(n){try{o(i.next(n))}catch(s){h(s)}}function E(n){try{o(i.throw(n))}catch(s){h(s)}}function o(n){n.done?v(n.value):l(n.value).then(d,E)}o((i=i.apply(f,b||[])).next())})},R=function(f,b){var g={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},i,l,v,h;return h={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function d(o){return function(n){return E([o,n])}}function E(o){if(i)throw new TypeError("Generator is already executing.");for(;g;)try{if(i=1,l&&(v=o[0]&2?l.return:o[0]?l.throw||((v=l.return)&&v.call(l),0):l.next)&&!(v=v.call(l,o[1])).done)return v;(l=0,v)&&(o=[o[0]&2,v.value]);switch(o[0]){case 0:case 1:v=o;break;case 4:return g.label++,{value:o[1],done:!1};case 5:g.label++,l=o[1],o=[0];continue;case 7:o=g.ops.pop(),g.trys.pop();continue;default:if(!(v=g.trys,v=v.length>0&&v[v.length-1])&&(o[0]===6||o[0]===2)){g=0;continue}if(o[0]===3&&(!v||o[1]>v[0]&&o[1]<v[3])){g.label=o[1];break}if(o[0]===6&&g.label<v[1]){g.label=v[1],v=o;break}if(v&&g.label<v[2]){g.label=v[2],g.ops.push(o);break}v[2]&&g.ops.pop(),g.trys.pop();continue}o=b.call(f,g)}catch(n){o=[6,n],l=0}finally{i=v=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},B=function(f){O(b,f);function b(g,i,l,v,h){i===void 0&&(i=""),l===void 0&&(l=""),v===void 0&&(v=!0);var d=f.call(this)||this;return d._onDidChange=d._register(new N.a),d.onDidChange=d._onDidChange.event,d._enabled=!0,d._checked=!1,d._id=g,d._label=i,d._cssClass=l,d._enabled=v,d._actionCallback=h,d}return Object.defineProperty(b.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"label",{get:function(){return this._label},set:function(g){this._setLabel(g)},enumerable:!0,configurable:!0}),b.prototype._setLabel=function(g){this._label!==g&&(this._label=g,this._onDidChange.fire({label:g}))},Object.defineProperty(b.prototype,"tooltip",{get:function(){return this._tooltip||""},set:function(g){this._setTooltip(g)},enumerable:!0,configurable:!0}),b.prototype._setTooltip=function(g){this._tooltip!==g&&(this._tooltip=g,this._onDidChange.fire({tooltip:g}))},Object.defineProperty(b.prototype,"class",{get:function(){return this._cssClass},set:function(g){this._setClass(g)},enumerable:!0,configurable:!0}),b.prototype._setClass=function(g){this._cssClass!==g&&(this._cssClass=g,this._onDidChange.fire({class:g}))},Object.defineProperty(b.prototype,"enabled",{get:function(){return this._enabled},set:function(g){this._setEnabled(g)},enumerable:!0,configurable:!0}),b.prototype._setEnabled=function(g){this._enabled!==g&&(this._enabled=g,this._onDidChange.fire({enabled:g}))},Object.defineProperty(b.prototype,"checked",{get:function(){return this._checked},set:function(g){this._setChecked(g)},enumerable:!0,configurable:!0}),b.prototype._setChecked=function(g){this._checked!==g&&(this._checked=g,this._onDidChange.fire({checked:g}))},b.prototype.run=function(g,i){return this._actionCallback?this._actionCallback(g):Promise.resolve(!0)},b}(J.a),D=function(f){O(b,f);function b(){var g=f!==null&&f.apply(this,arguments)||this;return g._onDidBeforeRun=g._register(new N.a),g.onDidBeforeRun=g._onDidBeforeRun.event,g._onDidRun=g._register(new N.a),g.onDidRun=g._onDidRun.event,g}return b.prototype.run=function(g,i){return Q(this,void 0,void 0,function(){var l,v;return R(this,function(h){switch(h.label){case 0:if(!g.enabled)return[2,Promise.resolve(null)];this._onDidBeforeRun.fire({action:g}),h.label=1;case 1:return h.trys.push([1,3,,4]),[4,this.runAction(g,i)];case 2:return l=h.sent(),this._onDidRun.fire({action:g,result:l}),[3,4];case 3:return v=h.sent(),this._onDidRun.fire({action:g,error:v}),[3,4];case 4:return[2]}})})},b.prototype.runAction=function(g,i){var l=i?g.run(i):g.run();return Promise.resolve(l)},b}(J.a)},"8XDt":function(qe,ue,k){k("qH13");var J=k("aX58"),N=J.registerPainter,O=k("6fms");N("vml",O)},"8hTe":function(qe,ue,k){qe.exports={button:"button___1wy9m"}},"9Bee":function(qe,ue,k){"use strict";var J=k("DYRE"),N=k("zeV3"),O=k("+L6B"),Q=k("2/Rp"),R=k("k1fw"),B=k("9og8"),D=k("tJVT"),f=k("WmNS"),b=k.n(f),g=k("q1tI"),i=k.n(g),l=k("vg9a"),v=k("DlQD"),h=k.n(v),d=k("rUJ1");function E(q,F){var P=q.match(/^(\s+)(?:```)/);if(P===null)return F;var ee=P[1];return F.split(`
|
|
`).map(function(ae){var ne=ae.match(/^\s+/);if(ne===null)return ae;var Ke=Object(D.a)(ne,1),xt=Ke[0];return xt.length>=ee.length?ae.slice(ee.length):ae}).join(`
|
|
`)}var o=[],n=["<ul>"],s=new h.a.Renderer,u=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){o.length=0,n=["<ul>"]}var S={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(q,F,P,ee){if(F>=q.length||q[F].level<=P)return F;var ae=q[F];ee.push("<li><a href='#"+ae.anchor+"'>"+ae.text+"</a>"),F++;var ne=[];return F=x(q,F,ae.level,ne),ne.length>0&&(ee.push("<ul>"),ne.forEach(function(Ke){ee.push(Ke)}),ee.push("</ul>")),ee.push("</li>"),F=x(q,F,P,ee),F}function M(){return x(o,0,0,n),n.push("</ul>"),n.join("")}var C={heading:function(F){var P=u.exec(F);if(P)return{type:"heading",raw:P[0],depth:P[1].length,text:P[2]}},fences:function(F){var P=this.rules.block.fences.exec(F);if(P){var ee=P[0],ae=E(ee,P[3]||""),ne=P[2]?P[2].trim():P[2];if(["latex","katex","math"].indexOf(ne)>=0){var Ke=a(),xt=ae;ae=Ke,A[Ke]={type:"block",expression:xt}}return{type:"code",raw:ee,lang:ne,text:ae}}}},c=/(?:\${2})([^\n`]+?)(?:\${2})/gi,r=0,a=function(){return"__special_katext_id_".concat(r++,"__")},A={};function L(){return A}function T(){r=0,A={}}function w(q){return q=q.replace(c,function(F,P){var ee=a();return A[ee]={type:"inline",expression:P},ee}),q}var _=s.listitem;s.listitem=function(q){return _(w(q))};var j=s.paragraph;s.paragraph=function(q){return j(w(q))};var W=s.tablecell;s.tablecell=function(q,F){return W(w(q),F)},s.code=function(q,F,P){var ee=(F||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"<p class='editormd-tex'>".concat(q,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(F,'">').concat(P?q:Object(d.escape)(q,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(P?q:Object(d.escape)(q,!0))+"</code></pre>"},s.heading=function(q,F,P){var ee=this.options.headerPrefix+P.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:ee,level:F,text:q}),"<h"+F+' id="'+ee+'">'+q+"</h"+F+">"},h.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),h.a.use({tokenizer:C,renderer:s});var Z=h.a,X=k("SJMd"),G=k("ulZh"),te=k.n(G),Y=k("m3rI"),le=k("Oy/b"),Ae=k("p5ED"),Be=k("ErOA");/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var Ce=function(q,F){return(Ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,ee){P.__proto__=ee}||function(P,ee){for(var ae in ee)Object.prototype.hasOwnProperty.call(ee,ae)&&(P[ae]=ee[ae])})(q,F)};function Se(q,F){function P(){this.constructor=q}Ce(q,F),q.prototype=F===null?Object.create(F):(P.prototype=F.prototype,new P)}function Fe(q,F,P,ee){return new(P||(P=Promise))(function(ae,ne){function Ke(Ht){try{kt(ee.next(Ht))}catch(Ct){ne(Ct)}}function xt(Ht){try{kt(ee.throw(Ht))}catch(Ct){ne(Ct)}}function kt(Ht){var Ct;Ht.done?ae(Ht.value):(Ct=Ht.value,Ct instanceof P?Ct:new P(function(Yt){Yt(Ct)})).then(Ke,xt)}kt((ee=ee.apply(q,F||[])).next())})}function Ve(q,F){var P,ee,ae,ne,Ke={label:0,sent:function(){if(1&ae[0])throw ae[1];return ae[1]},trys:[],ops:[]};return ne={next:xt(0),throw:xt(1),return:xt(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function xt(kt){return function(Ht){return function(Ct){if(P)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(P=1,ee&&(ae=2&Ct[0]?ee.return:Ct[0]?ee.throw||((ae=ee.return)&&ae.call(ee),0):ee.next)&&!(ae=ae.call(ee,Ct[1])).done)return ae;switch(ee=0,ae&&(Ct=[2&Ct[0],ae.value]),Ct[0]){case 0:case 1:ae=Ct;break;case 4:return Ke.label++,{value:Ct[1],done:!1};case 5:Ke.label++,ee=Ct[1],Ct=[0];continue;case 7:Ct=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ae=Ke.trys,(ae=ae.length>0&&ae[ae.length-1])||Ct[0]!==6&&Ct[0]!==2)){Ke=0;continue}if(Ct[0]===3&&(!ae||Ct[1]>ae[0]&&Ct[1]<ae[3])){Ke.label=Ct[1];break}if(Ct[0]===6&&Ke.label<ae[1]){Ke.label=ae[1],ae=Ct;break}if(ae&&Ke.label<ae[2]){Ke.label=ae[2],Ke.ops.push(Ct);break}ae[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Ct=F.call(q,Ke)}catch(Yt){Ct=[6,Yt],ee=0}finally{P=ae=0}if(5&Ct[0])throw Ct[1];return{value:Ct[0]?Ct[1]:void 0,done:!0}}([kt,Ht])}}}function De(){for(var q=0,F=0,P=arguments.length;F<P;F++)q+=arguments[F].length;var ee=Array(q),ae=0;for(F=0;F<P;F++)for(var ne=arguments[F],Ke=0,xt=ne.length;Ke<xt;Ke++,ae++)ee[ae]=ne[Ke];return ee}var Le=function(){function q(){}return q.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},q.setAttributes=function(F,P){for(var ee=0,ae=P;ee<ae.length;ee++){var ne=ae[ee],Ke=ne[0],xt=ne[1];F.setAttribute(Ke,xt)}},q.createRect=function(F,P,ee){var ae=document.createElementNS("http://www.w3.org/2000/svg","rect");return ae.setAttribute("width",F.toString()),ae.setAttribute("height",P.toString()),ee&&q.setAttributes(ae,ee),ae},q.createLine=function(F,P,ee,ae,ne){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",F.toString()),Ke.setAttribute("y1",P.toString()),Ke.setAttribute("x2",ee.toString()),Ke.setAttribute("y2",ae.toString()),ne&&q.setAttributes(Ke,ne),Ke},q.createPolygon=function(F,P){var ee=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ee.setAttribute("points",F),P&&q.setAttributes(ee,P),ee},q.createCircle=function(F,P){var ee=document.createElementNS("http://www.w3.org/2000/svg","circle");return ee.setAttribute("cx",(F/2).toString()),ee.setAttribute("cy",(F/2).toString()),ee.setAttribute("r",F.toString()),P&&q.setAttributes(ee,P),ee},q.createEllipse=function(F,P,ee){var ae=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ae.setAttribute("cx",(F/2).toString()),ae.setAttribute("cy",(P/2).toString()),ae.setAttribute("rx",(F/2).toString()),ae.setAttribute("ry",(P/2).toString()),ee&&q.setAttributes(ae,ee),ae},q.createGroup=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","g");return F&&q.setAttributes(P,F),P},q.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},q.createMarker=function(F,P,ee,ae,ne,Ke,xt){var kt=document.createElementNS("http://www.w3.org/2000/svg","marker");return q.setAttributes(kt,[["id",F],["orient",P],["markerWidth",ee.toString()],["markerHeight",ae.toString()],["refX",ne.toString()],["refY",Ke.toString()]]),kt.appendChild(xt),kt},q.createText=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","text");return P.setAttribute("x","0"),P.setAttribute("y","0"),F&&q.setAttributes(P,F),P},q.createTSpan=function(F,P){var ee=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ee.textContent=F,P&&q.setAttributes(ee,P),ee},q.createImage=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","image");return F&&q.setAttributes(P,F),P},q.createPoint=function(F,P){var ee=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ee.x=F,ee.y=P,ee},q.createPath=function(F,P){var ee=document.createElementNS("http://www.w3.org/2000/svg","path");return ee.setAttribute("d",F),P&&q.setAttributes(ee,P),ee},q}(),tt=function(){function q(){}return q.addKey=function(F){q.key=F},Object.defineProperty(q,"isLicensed",{get:function(){return!!q.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(q.key)},enumerable:!1,configurable:!0}),q}(),Et=function(){function q(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return q.prototype.rasterize=function(F,P,ee){var ae=this;return new Promise(function(ne){var Ke=ee!==void 0?ee:document.createElement("canvas");F===null&&(ae.markersOnly=!0,ae.naturalSize=!1);var xt=document.createElementNS("http://www.w3.org/2000/svg","svg");xt.setAttribute("xmlns","http://www.w3.org/2000/svg"),xt.setAttribute("width",P.width.baseVal.valueAsString),xt.setAttribute("height",P.height.baseVal.valueAsString),xt.setAttribute("viewBox","0 0 "+P.viewBox.baseVal.width.toString()+" "+P.viewBox.baseVal.height.toString()),xt.innerHTML=P.innerHTML,ae.naturalSize===!0?(xt.width.baseVal.value=F.naturalWidth,xt.height.baseVal.value=F.naturalHeight):ae.width!==void 0&&ae.height!==void 0&&(xt.width.baseVal.value=ae.width,xt.height.baseVal.value=ae.height),Ke.width=xt.width.baseVal.value,Ke.height=xt.height.baseVal.value;var kt=xt.outerHTML,Ht=Ke.getContext("2d");ae.markersOnly!==!0&&Ht.drawImage(F,0,0,Ke.width,Ke.height);var Ct=window.URL,Yt=new Image(Ke.width,Ke.height);Yt.setAttribute("crossOrigin","anonymous");var Wt=new Blob([kt],{type:"image/svg+xml"}),$t=Ct.createObjectURL(Wt);Yt.onload=function(){Ht.drawImage(Yt,0,0),Ct.revokeObjectURL($t);var fr=Ke.toDataURL(ae.imageType,ae.imageQuality);ne(fr)},Yt.src=$t})},q}(),Ie=function(){},Qe=function(){function q(F){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+F+"_"}return Object.defineProperty(q.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(q.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(q.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),q.prototype.addClass=function(F){return this.styleSheet===void 0&&this.addStyleSheet(),F.name=""+this.classNamePrefix+F.localName,this.classes.push(F),this.styleSheet.sheet.insertRule("."+F.name+" {"+F.style+"}",this.styleSheet.sheet.cssRules.length),F},q.prototype.addRule=function(F){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(F),this.styleSheet.sheet.insertRule(F.selector+" {"+F.style+"}",this.styleSheet.sheet.cssRules.length)},q.prototype.addStyleSheet=function(){var F;this.styleSheet=document.createElement("style"),((F=this.styleSheetRoot)!==null&&F!==void 0?F:document.head).appendChild(this.styleSheet),this.addRule(new xe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new xe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new xe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new ie("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new ie("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},q.prototype.removeStyleSheet=function(){var F;this.styleSheet&&(((F=this.styleSheetRoot)!==null&&F!==void 0?F:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},q}(),xe=function(q,F){this.selector=q,this.style=F},ie=function(q,F){this.localName=q,this.style=F},$=function(){function q(F,P,ee,ae,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=F,this.displayMode=P,this.markerItems=ee,this.uiStyleSettings=ae,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return q.prototype.show=function(F){var P=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=F,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ee=document.createElement("div");ee.className=this.toolbarBlockStyleClass.name,ee.style.whiteSpace="nowrap",this.uiContainer.appendChild(ee),this.addActionButton(ee,'<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(ee,'<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(ee,'<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(ee,'<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(ee,'<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(ee,'<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(ee,'<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(ee,'<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(ne){var Ke=document.createElement("div");Ke.className=""+P.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",ne.typeName),Ke.innerHTML=ne.icon,Ke.addEventListener("click",function(){P.markerToolbarButtonClicked(Ke,ne)}),P.buttons.push(Ke),P.markerButtons.push(Ke)}),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 ae=document.createElement("div");ae.className=this.toolbarBlockStyleClass.name,ae.style.whiteSpace="nowrap",ae.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ae),this.addActionButton(ae,'<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(ae,'<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()},q.prototype.addButtonClickListener=function(F){this.buttonClickListeners.push(F)},q.prototype.removeButtonClickListener=function(F){this.buttonClickListeners.indexOf(F)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(F),1)},q.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},q.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var F=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var P=0;P<this.markerButtons.length;P++)P<F||P===F&&this.markerButtons.length-1===F?this.markerButtonBlock.appendChild(this.markerButtons[P]):(P===F&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[P]))}},q.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")},q.prototype.resetButtonStyles=function(){var F=this;this.buttons.forEach(function(P){P.className=P.className.replace(F.uiStyleSettings.toolbarButtonStyleColorsClassName?F.uiStyleSettings.toolbarButtonStyleColorsClassName:F.toolbarButtonStyleColorsClass.name,"").trim(),P.className=P.className.replace(F.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?F.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:F.toolbarActiveButtonStyleColorsClass.name,"").trim(),P.className+=" "+(F.uiStyleSettings.toolbarButtonStyleColorsClassName?F.uiStyleSettings.toolbarButtonStyleColorsClassName:F.toolbarButtonStyleColorsClass.name)})},q.prototype.addActionButton=function(F,P,ee){var ae=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=P,ne.setAttribute("data-action",ee),ne.addEventListener("click",function(){ae.actionToolbarButtonClicked(ne,ee)}),ee){case"select":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ne.style.fill=this.uiStyleSettings.closeButtonColor}F.appendChild(ne),this.buttons.push(ne)},q.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ie("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 ie("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ie("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ie("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 ie("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var F=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ie("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*F)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*F)+`px;
|
|
padding: `+F+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ie("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ie("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new xe("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new xe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},q.prototype.markerToolbarButtonClicked=function(F,P){this.setActiveButton(F),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("marker",P)}),this.markerButtonOverflowBlock.style.display="none"},q.prototype.actionToolbarButtonClicked=function(F,P){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("action",P)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},q.prototype.setActiveButton=function(F){this.resetButtonStyles(),F.className=F.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),F.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},q.prototype.setActiveMarkerButton=function(F){var P=this.markerButtons.find(function(ee){return ee.getAttribute("data-type-name")===F});P&&this.setActiveButton(P)},q.prototype.setCurrentMarker=function(F){var P=this;this.currentMarker=F,this.buttons.filter(function(ee){return/delete|notes/.test(ee.getAttribute("data-action"))}).forEach(function(ee){P.currentMarker===void 0?(ee.style.fillOpacity="0.4",ee.style.pointerEvents="none"):(ee.style.fillOpacity="1",ee.style.pointerEvents="all")})},q}(),re=function(){function q(F,P,ee,ae){this.panels=[],this.panelButtons=[],this.markerjsContainer=F,this.displayMode=P,this.uiStyleSettings=ee,this.styles=ae,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return q.prototype.addStyles=function(){var F;this.toolboxStyleClass=this.styles.addClass(new ie("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 ie("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var P=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ie("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ie("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ie("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 ie("toolbox-panel-row_colors",`
|
|
background-color: `+((F=this.uiStyleSettings.toolboxBackgroundColor)!==null&&F!==void 0?F:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ie("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*P)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*P)+`px;
|
|
padding: `+P+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ie("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ie("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new xe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new xe("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},q.prototype.show=function(F){var P;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=F,this.uiContainer.className=this.toolboxStyleClass.name+" "+((P=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&P!==void 0?P:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},q.prototype.setPanelButtons=function(F){var P,ee,ae=this;this.panels=F,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((P=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&P!==void 0?P:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var Ke;ne.uiStyleSettings=ae.uiStyleSettings;var xt=document.createElement("div");xt.className=ae.toolboxButtonStyleClass.name+" "+((Ke=ae.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:ae.toolboxButtonStyleColorsClass.name),xt.innerHTML=ne.icon,xt.title=ne.title,xt.addEventListener("click",function(){ae.panelButtonClick(ne)}),ae.panelButtons.push(xt),ae.buttonRow.appendChild(xt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},q.prototype.panelButtonClick=function(F){var P=this,ee=-1;if(F!==this.activePanel){ee=this.panels.indexOf(F),this.panelRow.innerHTML="";var ae=F.getUi();ae.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ae),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=F}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){P.displayMode==="inline"?P.panelRow.style.display="none":P.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,Ke){var xt,kt;ne.className=P.toolboxButtonStyleClass.name+" "+(Ke===ee?""+((xt=P.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&xt!==void 0?xt:P.toolboxActiveButtonStyleColorsClass.name):""+((kt=P.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&kt!==void 0?kt:P.toolboxButtonStyleColorsClass.name))})},q}(),ce=function(q,F){this.title=q,this.icon=F},be=function(q){function F(P,ee,ae,ne){var Ke=q.call(this,P,ne||'<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 Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=ee,Ke.currentColor=ae,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return Se(F,q),F.prototype.getUi=function(){var P=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.whiteSpace="nowrap",this.colors.forEach(function(ae){var ne=P.getColorBox(ae);ee.appendChild(ne),P.colorBoxes.push(ne)}),ee},F.prototype.getColorBox=function(P){var ee=this,ae=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-ae,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=ne-2+"px",Ke.style.height=ne-2+"px",Ke.style.padding="1px",Ke.style.marginRight="2px",Ke.style.marginBottom="2px",Ke.style.borderWidth="2px",Ke.style.borderStyle="solid",Ke.style.borderRadius=(ne+2)/2+"px",Ke.style.borderColor=P===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){ee.setCurrentColor(P,Ke)});var xt=document.createElement("div");return xt.style.display="inline-block",xt.style.width=ne-2+"px",xt.style.height=ne-2+"px",xt.style.backgroundColor=P,xt.style.borderRadius=ne/2+"px",P==="transparent"&&(xt.style.fill=this.uiStyleSettings.toolboxAccentColor,xt.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>`),Ke.appendChild(xt),Ke},F.prototype.setCurrentColor=function(P,ee){var ae=this;this.currentColor=P,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===ee?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(P)},F}(ce),Me=function(){function q(F,P,ee){this._state="new",this._isSelected=!1,this._container=F,this._overlayContainer=P,this.globalSettings=ee,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(q.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),q.prototype.ownsTarget=function(F){return!1},Object.defineProperty(q.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),q.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},q.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},q.prototype.pointerDown=function(F,P){},q.prototype.dblClick=function(F,P){},q.prototype.manipulate=function(F){},q.prototype.pointerUp=function(F){this.stateChanged()},q.prototype.dispose=function(){},q.prototype.addMarkerVisualToContainer=function(F){this.container.childNodes.length>0?this.container.insertBefore(F,this.container.childNodes[0]):this.container.appendChild(F)},q.prototype.getState=function(){return{typeName:q.typeName,state:this.state,notes:this.notes}},q.prototype.restoreState=function(F){this._state=F.state,this.notes=F.notes},q.prototype.scale=function(F,P){},q.prototype.colorChanged=function(F){this.onColorChanged&&this.onColorChanged(F),this.stateChanged()},q.prototype.fillColorChanged=function(F){this.onFillColorChanged&&this.onFillColorChanged(F),this.stateChanged()},q.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var F=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),F.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(F)&&this.onStateChanged(this)}},q.typeName="MarkerBase",q}(),ke=function(){function q(){this.findGripByVisual=this.findGripByVisual.bind(this)}return q.prototype.findGripByVisual=function(F){return this.topLeft.ownsTarget(F)?this.topLeft:this.topCenter.ownsTarget(F)?this.topCenter:this.topRight.ownsTarget(F)?this.topRight:this.centerLeft.ownsTarget(F)?this.centerLeft:this.centerRight.ownsTarget(F)?this.centerRight:this.bottomLeft.ownsTarget(F)?this.bottomLeft:this.bottomCenter.ownsTarget(F)?this.bottomCenter:this.bottomRight.ownsTarget(F)?this.bottomRight:void 0},q}(),ct=function(){function q(){this.GRIP_SIZE=10,this.visual=Le.createGroup(),this.visual.appendChild(Le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return q.prototype.ownsTarget=function(F){return F===this.visual||F===this.visual.childNodes[0]||F===this.visual.childNodes[1]},q}(),ut=function(){function q(){}return q.toITransformMatrix=function(F){return{a:F.a,b:F.b,c:F.c,d:F.d,e:F.e,f:F.f}},q.toSVGMatrix=function(F,P){return F.a=P.a,F.b=P.b,F.c=P.c,F.d=P.d,F.e=P.e,F.f=P.f,F},q}(),mt=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.left=0,ne.top=0,ne.width=0,ne.height=0,ne.defaultSize={x:50,y:20},ne.offsetX=0,ne.offsetY=0,ne.rotationAngle=0,ne.CB_DISTANCE=10,ne._suppressMarkerCreateEvent=!1,ne.container.transform.baseVal.appendItem(Le.createTransform()),ne.setupControlBox(),ne}return Se(F,q),Object.defineProperty(F.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"visual",{get:function(){return this._visual},set:function(P){this._visual=P;var ee=Le.createTransform();this._visual.transform.baseVal.appendItem(ee)},enumerable:!1,configurable:!0}),F.prototype.ownsTarget=function(P){return!!q.prototype.ownsTarget.call(this,P)||!!(this.controlGrips.findGripByVisual(P)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(P))},F.prototype.pointerDown=function(P,ee){q.prototype.pointerDown.call(this,P,ee),this.state==="new"&&(this.left=P.x,this.top=P.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ae=this.unrotatePoint(P);if(this.manipulationStartX=ae.x,this.manipulationStartY=ae.y,this.offsetX=ae.x-this.left,this.offsetY=ae.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ee),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ke=this.container.transform.baseVal.getItem(0);Ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},F.prototype.pointerUp=function(P){var ee=this.state;q.prototype.pointerUp.call(this,P),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(P),this._state="select",ee==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},F.prototype.moveVisual=function(P){this.visual.style.transform="translate("+P.x+"px, "+P.y+"px)"},F.prototype.manipulate=function(P){var ee=this.unrotatePoint(P);this.state==="creating"?this.resize(P):this.state==="move"?(this.left=this.manipulationStartLeft+(ee.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ee.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ee):this.state==="rotate"&&this.rotate(P)},F.prototype.resize=function(P){var ee=this.manipulationStartLeft,ae=this.manipulationStartWidth,ne=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ee=this.manipulationStartLeft+P.x-this.manipulationStartX,ae=this.manipulationStartWidth+this.manipulationStartLeft-ee;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ae=this.manipulationStartWidth+P.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+P.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+P.y-this.manipulationStartY}ae>=0?(this.left=ee,this.width=ae):(this.left=ee+ae,this.width=-ae),Ke>=0?(this.top=ne,this.height=Ke):(this.top=ne+Ke,this.height=-Ke),this.setSize()},F.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},F.prototype.rotate=function(P){if(Math.abs(P.x-this.centerX)>.1){var ee=Math.sign(P.x-this.centerX);this.rotationAngle=180*Math.atan((P.y-this.centerY)/(P.x-this.centerX))/Math.PI+90*ee,this.applyRotation()}},F.prototype.applyRotation=function(){var P=this.container.transform.baseVal.getItem(0);P.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(P,0)},F.prototype.rotatePoint=function(P){if(this.rotationAngle===0)return P;var ee=this.container.getCTM(),ae=Le.createPoint(P.x,P.y);return{x:(ae=ae.matrixTransform(ee)).x,y:ae.y}},F.prototype.unrotatePoint=function(P){if(this.rotationAngle===0)return P;var ee=this.container.getCTM();ee=ee.inverse();var ae=Le.createPoint(P.x,P.y);return{x:(ae=ae.matrixTransform(ee)).x,y:ae.y}},F.prototype.select=function(){q.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},F.prototype.deselect=function(){q.prototype.deselect.call(this),this.controlBox.style.display="none"},F.prototype.setupControlBox=function(){this.controlBox=Le.createGroup();var P=Le.createTransform();P.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(P),this.container.appendChild(this.controlBox),this.controlRect=Le.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=Le.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 ke,this.addControlGrips(),this.controlBox.style.display="none"},F.prototype.adjustControlBox=function(){var P=this.controlBox.transform.baseVal.getItem(0);P.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(P,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()},F.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()},F.prototype.createGrip=function(){var P=new ct;return P.visual.transform.baseVal.appendItem(Le.createTransform()),this.controlBox.appendChild(P.visual),P},F.prototype.positionGrips=function(){var P=this.controlGrips.topLeft.GRIP_SIZE,ee=-P/2,ae=ee,ne=(this.width+this.CB_DISTANCE)/2-P/2,Ke=(this.height+this.CB_DISTANCE)/2-P/2,xt=this.height+this.CB_DISTANCE-P/2,kt=this.width+this.CB_DISTANCE-P/2;this.positionGrip(this.controlGrips.topLeft.visual,ee,ae),this.positionGrip(this.controlGrips.topCenter.visual,ne,ae),this.positionGrip(this.controlGrips.topRight.visual,kt,ae),this.positionGrip(this.controlGrips.centerLeft.visual,ee,Ke),this.positionGrip(this.controlGrips.centerRight.visual,kt,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,ee,xt),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,xt),this.positionGrip(this.controlGrips.bottomRight.visual,kt,xt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,ae-3*this.CB_DISTANCE)},F.prototype.positionGrip=function(P,ee,ae){var ne=P.transform.baseVal.getItem(0);ne.setTranslate(ee,ae),P.transform.baseVal.replaceItem(ne,0)},F.prototype.hideControlBox=function(){this.controlBox.style.display="none"},F.prototype.showControlBox=function(){this.controlBox.style.display=""},F.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ut.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ut.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},q.prototype.getState.call(this))},F.prototype.restoreState=function(P){q.prototype.restoreState.call(this,P);var ee=P;this.left=ee.left,this.top=ee.top,this.width=ee.width,this.height=ee.height,this.rotationAngle=ee.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ut.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ee.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ut.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ee.containerTransformMatrix))},F.prototype.scale=function(P,ee){q.prototype.scale.call(this,P,ee);var ae=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:ae.x*P,y:ae.y*ee});this.left=ne.x,this.top=ne.y,this.width=this.width*P,this.height=this.height*ee,this.adjustControlBox()},F}(Me),pt=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne}return Se(F,q),F.prototype.ownsTarget=function(P){return!(!q.prototype.ownsTarget.call(this,P)&&P!==this.visual)},F.prototype.createVisual=function(){this.visual=Le.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)},F.prototype.pointerDown=function(P,ee){q.prototype.pointerDown.call(this,P,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(P),this._state="creating")},F.prototype.manipulate=function(P){q.prototype.manipulate.call(this,P)},F.prototype.resize=function(P){q.prototype.resize.call(this,P),this.setSize()},F.prototype.setSize=function(){q.prototype.setSize.call(this),Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},F.prototype.pointerUp=function(P){q.prototype.pointerUp.call(this,P),this.setSize()},F.prototype.setStrokeColor=function(P){this.strokeColor=P,this.visual&&Le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(P),this.stateChanged()},F.prototype.setFillColor=function(P){this.fillColor=P,this.visual&&Le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},F.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.visual&&Le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},F.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.visual&&Le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},F.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},q.prototype.getState.call(this))},F.prototype.restoreState=function(P){var ee=P;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),q.prototype.restoreState.call(this,P),this.setSize()},F.prototype.scale=function(P,ee){q.prototype.scale.call(this,P,ee),this.setSize()},F.title="Rectangle marker",F}(mt),Ot=function(q){function F(P,ee,ae,ne){var Ke=q.call(this,P,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=ee,Ke.currentWidth=ae,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return Se(F,q),F.prototype.getUi=function(){var P=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.widths.forEach(function(ae){var ne=document.createElement("div");ne.style.display="flex",ne.style.flexGrow="2",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=ae===P.currentWidth?P.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){P.setCurrentWidth(ae,ne)}),ee.appendChild(ne);var Ke=document.createElement("div");Ke.innerText=ae.toString(),Ke.style.marginRight="5px",ne.appendChild(Ke);var xt=document.createElement("div");xt.style.minHeight="20px",xt.style.flexGrow="2",xt.style.display="flex",xt.style.alignItems="center";var kt=document.createElement("hr");kt.style.minWidth="20px",kt.style.border="0px",kt.style.borderTop=ae+"px solid "+P.uiStyleSettings.toolboxColor,kt.style.flexGrow="2",xt.appendChild(kt),ne.appendChild(xt),P.widthBoxes.push(ne)}),ee},F.prototype.setCurrentWidth=function(P,ee){var ae=this;this.currentWidth=P,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===ee?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},F}(ce),Ft=function(q){function F(P,ee,ae,ne){var Ke=q.call(this,P,ne||'<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 Ke.styles=[],Ke.styleBoxes=[],Ke.styles=ee,Ke.currentStyle=ae,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return Se(F,q),F.prototype.getUi=function(){var P=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.styles.forEach(function(ae){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/P.styles.length-5+"%",ne.style.borderColor=ae===P.currentStyle?P.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){P.setCurrentStyle(ae,ne)}),ee.appendChild(ne);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var xt=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+P.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ae!==""?'stroke-dasharray="'+ae+'"':"")+` />
|
|
</svg>`;Ke.innerHTML=xt,ne.appendChild(Ke),P.styleBoxes.push(ne)}),ee},F.prototype.setCurrentStyle=function(P,ee){var ae=this;this.currentStyle=P,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===ee?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},F}(ce),He=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.strokeColor=ae.defaultColor,ne.strokeWidth=ae.defaultStrokeWidth,ne.strokeDasharray=ae.defaultStrokeDasharray,ne.strokePanel=new be("Line color",ae.defaultColorSet,ae.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ot("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ft("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Se(F,q),Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=q.prototype.getState.call(this);return P.typeName=F.typeName,P},F.typeName="FrameMarker",F.title="Frame marker",F.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',F}(pt),Pe=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},at=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.x1=0,ne.y1=0,ne.x2=0,ne.y2=0,ne.defaultLength=50,ne.manipulationStartX=0,ne.manipulationStartY=0,ne.manipulationStartX1=0,ne.manipulationStartY1=0,ne.manipulationStartX2=0,ne.manipulationStartY2=0,ne.setupControlBox(),ne}return Se(F,q),F.prototype.ownsTarget=function(P){return!!q.prototype.ownsTarget.call(this,P)||!(!this.grip1.ownsTarget(P)&&!this.grip2.ownsTarget(P))},F.prototype.pointerDown=function(P,ee){q.prototype.pointerDown.call(this,P,ee),this.manipulationStartX=P.x,this.manipulationStartY=P.y,this.state==="new"&&(this.x1=P.x,this.y1=P.y,this.x2=P.x,this.y2=P.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(ee)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ee)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},F.prototype.pointerUp=function(P){var ee=this.state;q.prototype.pointerUp.call(this,P),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(P),this._state="select",ee==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},F.prototype.adjustVisual=function(){},F.prototype.manipulate=function(P){this.state==="creating"?this.resize(P):this.state==="move"?(this.x1=this.manipulationStartX1+P.x-this.manipulationStartX,this.y1=this.manipulationStartY1+P.y-this.manipulationStartY,this.x2=this.manipulationStartX2+P.x-this.manipulationStartX,this.y2=this.manipulationStartY2+P.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(P)},F.prototype.resize=function(P){switch(this.activeGrip){case this.grip1:this.x1=P.x,this.y1=P.y;break;case this.grip2:case void 0:this.x2=P.x,this.y2=P.y}this.adjustVisual(),this.adjustControlBox()},F.prototype.select=function(){q.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},F.prototype.deselect=function(){q.prototype.deselect.call(this),this.controlBox.style.display="none"},F.prototype.setupControlBox=function(){this.controlBox=Le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},F.prototype.adjustControlBox=function(){this.positionGrips()},F.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},F.prototype.createGrip=function(){var P=new ct;return P.visual.transform.baseVal.appendItem(Le.createTransform()),this.controlBox.appendChild(P.visual),P},F.prototype.positionGrips=function(){var P=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-P/2,this.y1-P/2),this.positionGrip(this.grip2.visual,this.x2-P/2,this.y2-P/2)},F.prototype.positionGrip=function(P,ee,ae){var ne=P.transform.baseVal.getItem(0);ne.setTranslate(ee,ae),P.transform.baseVal.replaceItem(ne,0)},F.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},q.prototype.getState.call(this))},F.prototype.restoreState=function(P){q.prototype.restoreState.call(this,P);var ee=P;this.x1=ee.x1,this.y1=ee.y1,this.x2=ee.x2,this.y2=ee.y2},F.prototype.scale=function(P,ee){q.prototype.scale.call(this,P,ee),this.x1=this.x1*P,this.y1=this.y1*ee,this.x2=this.x2*P,this.y2=this.y2*ee,this.adjustVisual(),this.adjustControlBox()},F}(Me),vt=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.strokeColor=ae.defaultColor,ne.strokeWidth=ae.defaultStrokeWidth,ne.strokeDasharray=ae.defaultStrokeDasharray,ne.strokePanel=new be("Line color",ae.defaultColorSet,ae.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ot("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ft("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Se(F,q),F.prototype.ownsTarget=function(P){return!(!q.prototype.ownsTarget.call(this,P)&&P!==this.visual&&P!==this.selectorLine&&P!==this.visibleLine)},F.prototype.createVisual=function(){this.visual=Le.createGroup(),this.selectorLine=Le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Le.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)},F.prototype.pointerDown=function(P,ee){q.prototype.pointerDown.call(this,P,ee),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},F.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()),Le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},F.prototype.setStrokeColor=function(P){this.strokeColor=P,this.adjustVisual(),this.colorChanged(P)},F.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.adjustVisual()},F.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.adjustVisual(),this.stateChanged()},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},q.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){q.prototype.restoreState.call(this,P);var ee=P;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.createVisual(),this.adjustVisual()},F.typeName="LineMarker",F.title="Line marker",F.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',F}(at),et=function(q){function F(P,ee,ae,ne){var Ke=q.call(this,P,ne||'<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 Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=ee,Ke.currentFont=ae,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return Se(F,q),F.prototype.getUi=function(){var P=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.flexGrow="2",this.fonts.forEach(function(ae){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/P.fonts.length-5+"%",ne.style.borderColor=ae===P.currentFont?P.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){P.setCurrentFont(ae,ne)}),ee.appendChild(ne);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=ae,Ke.style.overflow="hidden";var xt=document.createElement("div");xt.style.whiteSpace="nowrap",xt.style.overflow="hidden",xt.style.textOverflow="ellipsis",xt.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(xt),ne.appendChild(Ke),P.fontBoxes.push(ne)}),ee},F.prototype.setCurrentFont=function(P,ee){var ae=this;this.currentFont=P,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===ee?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},F}(ce),At=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.color="transparent",ne.padding=5,ne.DEFAULT_TEXT="your text here",ne.text=ne.DEFAULT_TEXT,ne.isMoved=!1,ne.color=ae.defaultColor,ne.fontFamily=ae.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setColor=ne.setColor.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.renderText=ne.renderText.bind(ne),ne.sizeText=ne.sizeText.bind(ne),ne.textEditDivClicked=ne.textEditDivClicked.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.setSize=ne.setSize.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.colorPanel=new be("Color",ae.defaultColorSet,ae.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new et("Font",ae.defaultFontFamilies,ae.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return Se(F,q),F.prototype.ownsTarget=function(P){if(q.prototype.ownsTarget.call(this,P)||P===this.visual||P===this.textElement||P===this.bgRectangle)return!0;var ee=!1;return this.textElement.childNodes.forEach(function(ae){ae===P&&(ee=!0)}),ee},F.prototype.createVisual=function(){this.visual=Le.createGroup(),this.bgRectangle=Le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Le.createTransform()),this.textElement.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},F.prototype.pointerDown=function(P,ee){q.prototype.pointerDown.call(this,P,ee),this.isMoved=!1,this.pointerDownPoint=P,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(P),this._state="creating")},F.prototype.renderText=function(){var P=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(ee){P.textElement.appendChild(Le.createTSpan(ee.trim()===""?" ":ee.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},F.prototype.getTextScale=function(){var P=this.textElement.getBBox(),ee=1;if(P.width>0&&P.height>0){var ae=(1*this.width-this.width*this.padding*2/100)/P.width,ne=(1*this.height-this.height*this.padding*2/100)/P.height;ee=Math.min(ae,ne)}return ee},F.prototype.getTextPosition=function(P){var ee=this.textElement.getBBox(),ae=0,ne=0;return ee.width>0&&ee.height>0&&(ae=(this.width-ee.width*P)/2,ne=this.height/2-ee.height*P/2),{x:ae,y:ne}},F.prototype.sizeText=function(){var P=this.textElement.getBBox(),ee=this.getTextScale(),ae=this.getTextPosition(ee);ae.y-=P.y*ee,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ae.x+"px, "+ae.y+"px) scale("+ee+", "+ee+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ae.x,ae.y),this.textElement.transform.baseVal.getItem(1).setScale(ee,ee))},F.prototype.manipulate=function(P){q.prototype.manipulate.call(this,P),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(P.x-this.pointerDownPoint.x)>5||Math.abs(P.y-this.pointerDownPoint.y)>5)},F.prototype.resize=function(P){q.prototype.resize.call(this,P),this.isMoved=!0,this.setSize(),this.sizeText()},F.prototype.setSize=function(){q.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},F.prototype.pointerUp=function(P){var ee=this.state;ee==="creating"&&(this._suppressMarkerCreateEvent=!0),q.prototype.pointerUp.call(this,P),this.setSize(),(ee==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},F.prototype.showTextEditor=function(){var P=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(ee){ee.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ee=Number.parseFloat(P.textEditor.style.fontSize);P.textEditor.clientWidth>=Number.parseInt(P.textEditor.style.maxWidth)&&ee>.9;)ee-=.1,P.textEditor.style.fontSize=Math.max(ee,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ee){ee.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ee){if(ee.clipboardData){var ae=ee.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(ae)),ee.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){P.textEditDivClicked(P.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},F.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var P=this.getTextScale(),ee=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ae=this.textElement.getBBox(),ne={x:ae.width*P,y:ae.height*P};ee.x-=ne.x/2,ee.y-=ne.y/2,this.textEditor.style.top=ee.y+"px",this.textEditor.style.left=ee.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ee.x+"px",this.textEditor.style.fontSize=Math.max(16*P,12)+"px",this.textElement.style.display="none"}},F.prototype.textEditDivClicked=function(P){this.text=P.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},F.prototype.select=function(){q.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},F.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),q.prototype.deselect.call(this)},F.prototype.dblClick=function(P,ee){q.prototype.dblClick.call(this,P,ee),this.showTextEditor()},F.prototype.setColor=function(P){this.textElement&&Le.setAttributes(this.textElement,[["fill",P]]),this.color=P,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(P)},F.prototype.setFont=function(P){this.textElement&&Le.setAttributes(this.textElement,[["font-family",P]]),this.fontFamily=P,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},F.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},F.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},q.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){var ee=P;this.color=ee.color,this.fontFamily=ee.fontFamily,this.padding=ee.padding,this.text=ee.text,this.createVisual(),q.prototype.restoreState.call(this,P),this.setSize()},F.prototype.scale=function(P,ee){q.prototype.scale.call(this,P,ee),this.setSize(),this.sizeText(),this.positionTextEditor()},F.typeName="TextMarker",F.title="Text marker",F.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>',F}(mt),je=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=ae.defaultColor,ne.lineWidth=ae.defaultStrokeWidth,ne.pixelRatio=ae.freehandPixelRatio,ne.setColor=ne.setColor.bind(ne),ne.addCanvas=ne.addCanvas.bind(ne),ne.finishCreation=ne.finishCreation.bind(ne),ne.setLineWidth=ne.setLineWidth.bind(ne),ne.colorPanel=new be("Color",ae.defaultColorSet,ae.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Ot("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return Se(F,q),F.prototype.ownsTarget=function(P){return!(!q.prototype.ownsTarget.call(this,P)&&P!==this.visual&&P!==this.drawingImage)},F.prototype.createVisual=function(){this.visual=Le.createGroup(),this.drawingImage=Le.createImage(),this.visual.appendChild(this.drawingImage);var P=Le.createTransform();this.visual.transform.baseVal.appendItem(P),this.addMarkerVisualToContainer(this.visual)},F.prototype.pointerDown=function(P,ee){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(P.x,P.y),this.drawing=!0):q.prototype.pointerDown.call(this,P,ee)},F.prototype.manipulate=function(P){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(P.x,P.y),this.canvasContext.stroke()):q.prototype.manipulate.call(this,P)},F.prototype.resize=function(P){q.prototype.resize.call(this,P),Le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},F.prototype.pointerUp=function(P){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):q.prototype.pointerUp.call(this,P)},F.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)},F.prototype.select=function(){this.state==="creating"&&this.finishCreation(),q.prototype.select.call(this)},F.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),q.prototype.deselect.call(this)},F.prototype.finishCreation=function(){for(var P=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ee=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ae=ee[0],ne=ee[1],Ke=ee[2],xt=ee[3],kt=!1,Ht=0;Ht<this.canvasElement.height;Ht++)for(var Ct=0;Ct<this.canvasElement.width;Ct++)P.data[Ht*this.canvasElement.width*4+4*Ct+3]>0&&(kt=!0,Ht<ne&&(ne=Ht),Ct<ae&&(ae=Ct),Ht>xt&&(xt=Ht),Ct>Ke&&(Ke=Ct));if(kt){this.left=ae/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(Ke-ae)/this.pixelRatio,this.height=(xt-ne)/this.pixelRatio;var Yt=document.createElement("canvas");Yt.width=Ke-ae,Yt.height=xt-ne,Yt.getContext("2d").putImageData(this.canvasContext.getImageData(ae,ne,Ke-ae,xt-ne),0,0),this.drawingImgUrl=Yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},F.prototype.setDrawingImage=function(){Le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},F.prototype.setColor=function(P){this.color=P,this.colorChanged(P)},F.prototype.setLineWidth=function(P){this.lineWidth=P},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({drawingImgUrl:this.drawingImgUrl},q.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){this.createVisual(),q.prototype.restoreState.call(this,P),this.drawingImgUrl=P.drawingImgUrl,this.setDrawingImage()},F.prototype.scale=function(P,ee){q.prototype.scale.call(this,P,ee),this.setDrawingImage()},F.typeName="FreehandMarker",F.title="Freehand marker",F.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>',F}(mt),_e=function(q){function F(P,ee,ae){var ne=q.call(this,P,ae||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ne.typeBoxes=[],ne.currentType=ee,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return Se(F,q),F.prototype.getUi=function(){var P=this,ee=document.createElement("div");ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2";for(var ae=function(xt){var kt="both";switch(xt){case 0:kt="both";break;case 1:kt="start";break;case 2:kt="end";break;case 3:kt="none"}var Ht=document.createElement("div");if(Ht.style.display="flex",Ht.style.flexGrow="2",Ht.style.alignItems="center",Ht.style.justifyContent="space-between",Ht.style.padding="5px",Ht.style.borderWidth="2px",Ht.style.borderStyle="solid",Ht.style.borderColor=kt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Ht.addEventListener("click",function(){P.setCurrentType(kt,Ht)}),ee.appendChild(Ht),kt==="both"||kt==="start"){var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.minHeight="20px",Ct.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="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ct.style.marginLeft="5px",Ht.appendChild(Ct)}var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.alignItems="center",Yt.style.minHeight="20px",Yt.style.flexGrow="2";var Wt=document.createElement("hr");if(Wt.style.minWidth="20px",Wt.style.border="0px",Wt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Wt.style.flexGrow="2",Yt.appendChild(Wt),Ht.appendChild(Yt),kt==="both"||kt==="end"){var $t=document.createElement("div");$t.style.display="flex",$t.style.alignItems="center",$t.style.minHeight="20px",$t.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="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,$t.style.marginRight="5px",Ht.appendChild($t)}ne.typeBoxes.push(Ht)},ne=this,Ke=0;Ke<4;Ke++)ae(Ke);return ee},F.prototype.setCurrentType=function(P,ee){var ae=this;this.currentType=P,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===ee?ae.uiStyleSettings!==void 0?ae.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},F}(ce),Ue=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.arrowType="end",ne.arrowBaseHeight=10,ne.arrowBaseWidth=10,ne.getArrowPoints=ne.getArrowPoints.bind(ne),ne.setArrowType=ne.setArrowType.bind(ne),ne.arrowTypePanel=new _e("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return Se(F,q),F.prototype.ownsTarget=function(P){return!(!q.prototype.ownsTarget.call(this,P)&&P!==this.arrow1&&P!==this.arrow2)},F.prototype.getArrowPoints=function(P,ee){var ae=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return P-ae/2+","+(ee+ne/2)+" "+P+","+(ee-ne/2)+" "+(P+ae/2)+","+(ee+ne/2)},F.prototype.createTips=function(){this.arrow1=Le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Le.createTransform()),this.visual.appendChild(this.arrow2)},F.prototype.pointerDown=function(P,ee){q.prototype.pointerDown.call(this,P,ee),this.state==="creating"&&this.createTips()},F.prototype.adjustVisual=function(){if(q.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",Le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var P=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.arrow1.transform.baseVal.getItem(0);ee.setRotate(P,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ee,0);var ae=this.arrow2.transform.baseVal.getItem(0);ae.setRotate(P+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ae,0)}},F.prototype.setArrowType=function(P){this.arrowType=P,this.adjustVisual(),this.stateChanged()},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({arrowType:this.arrowType},q.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){q.prototype.restoreState.call(this,P);var ee=P;this.arrowType=ee.arrowType,this.createTips(),this.adjustVisual()},F.typeName="ArrowMarker",F.title="Arrow marker",F.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',F}(vt),me=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.fillColor=ae.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new be("Color",ae.defaultColorSet,ae.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return Se(F,q),Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=q.prototype.getState.call(this);return P.typeName=F.typeName,P},F.typeName="CoverMarker",F.title="Cover marker",F.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',F}(pt),ve=function(q){function F(P,ee,ae,ne){var Ke=q.call(this,P,ne||'<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 Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=ee,Ke.currentOpacity=ae,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return Se(F,q),F.prototype.getUi=function(){var P=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",ee.style.justifyContent="space-between",this.opacities.forEach(function(ae){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="center",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=ae===P.currentOpacity?P.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){P.setCurrentOpacity(ae,ne)}),ee.appendChild(ne);var Ke=document.createElement("div");Ke.innerText=100*ae+"%",ne.appendChild(Ke),P.opacityBoxes.push(ne)}),ee},F.prototype.setCurrentOpacity=function(P,ee){var ae=this;this.currentOpacity=P,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===ee?ae.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},F}(ce),Ee=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=ae.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=ae.defaultHighlightOpacity,ne.fillPanel=new be("Color",ae.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new ve("Opacity",ae.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Se(F,q),F.prototype.setOpacity=function(P){this.opacity=P,this.visual&&Le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=q.prototype.getState.call(this);return P.typeName=F.typeName,P},F.typeName="HighlightMarker",F.title="Highlight marker",F.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>',F}(me),Oe='<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>',Ye=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.bgColor="transparent",ne.tipPosition={x:0,y:0},ne.tipBase1Position={x:0,y:0},ne.tipBase2Position={x:0,y:0},ne.tipMoving=!1,ne.color=ae.defaultStrokeColor,ne.bgColor=ae.defaultFillColor,ne.fontFamily=ae.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setBgColor=ne.setBgColor.bind(ne),ne.getTipPoints=ne.getTipPoints.bind(ne),ne.positionTip=ne.positionTip.bind(ne),ne.setTipPoints=ne.setTipPoints.bind(ne),ne.colorPanel=new be("Text color",ae.defaultColorSet,ne.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>'),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new be("Fill color",ae.defaultColorSet,ne.bgColor,Oe),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new et("Font",ae.defaultFontFamilies,ae.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new ct,ne.tipGrip.visual.transform.baseVal.appendItem(Le.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return Se(F,q),F.prototype.ownsTarget=function(P){return q.prototype.ownsTarget.call(this,P)||this.tipGrip.ownsTarget(P)||this.tip===P},F.prototype.createTip=function(){Le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},F.prototype.pointerDown=function(P,ee){this.state==="new"&&q.prototype.pointerDown.call(this,P,ee),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ee)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):q.prototype.pointerDown.call(this,P,ee)},F.prototype.pointerUp=function(P){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,q.prototype.pointerUp.call(this,P);else{var ee=this.state==="creating";q.prototype.pointerUp.call(this,P),this.setTipPoints(ee),this.positionTip()}},F.prototype.manipulate=function(P){if(this.tipMoving){var ee=this.unrotatePoint(P);this.tipPosition={x:ee.x-this.manipulationStartLeft,y:ee.y-this.manipulationStartTop},this.positionTip()}else q.prototype.manipulate.call(this,P)},F.prototype.setBgColor=function(P){this.bgRectangle&&this.tip&&(Le.setAttributes(this.bgRectangle,[["fill",P]]),Le.setAttributes(this.tip,[["fill",P]])),this.bgColor=P,this.fillColorChanged(P)},F.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},F.prototype.setTipPoints=function(P){P===void 0&&(P=!1);var ee=Math.min(this.height/2,15),ae=this.height/5;P&&(this.tipPosition={x:ee+ae/2,y:this.height+20});var ne=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ae=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:ee,y:0},this.tipBase2Position={x:ee+ae,y:0}):(this.tipBase1Position={x:0,y:ee},this.tipBase2Position={x:0,y:ee+ae}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ae=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ee-ae,y:0},this.tipBase2Position={x:this.width-ee,y:0}):(this.tipBase1Position={x:this.width,y:ee},this.tipBase2Position={x:this.width,y:ee+ae}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ae=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ee-ae,y:this.height},this.tipBase2Position={x:this.width-ee,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ee-ae},this.tipBase2Position={x:this.width,y:this.height-ee}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ae=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:ee,y:this.height},this.tipBase2Position={x:ee+ae,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ee},this.tipBase2Position={x:0,y:this.height-ee-ae})},F.prototype.resize=function(P){q.prototype.resize.call(this,P),this.positionTip()},F.prototype.positionTip=function(){Le.setAttributes(this.tip,[["points",this.getTipPoints()]]);var P=this.tipGrip.visual.transform.baseVal.getItem(0);P.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(P,0)},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),F.prototype.select=function(){this.positionTip(),q.prototype.select.call(this)},F.prototype.getState=function(){var P=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},q.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){var ee=P;this.bgColor=ee.bgColor,this.tipPosition=ee.tipPosition,q.prototype.restoreState.call(this,P),this.createTip(),this.setTipPoints()},F.prototype.scale=function(P,ee){q.prototype.scale.call(this,P,ee),this.tipPosition={x:this.tipPosition.x*P,y:this.tipPosition.y*ee},this.positionTip()},F.typeName="CalloutMarker",F.title="Callout marker",F.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>',F}(At),ze=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=ae.defaultColor,ne.strokeWidth=ae.defaultStrokeWidth,ne.strokeDasharray=ae.defaultStrokeDasharray,ne.fillColor=ae.defaultFillColor,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.setOpacity=ne.setOpacity.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.strokePanel=new be("Line color",De(ae.defaultColorSet,["transparent"]),ae.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new be("Fill color",De(ae.defaultColorSet,["transparent"]),ne.fillColor,Oe),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ot("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ft("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new ve("Opacity",ae.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return Se(F,q),F.prototype.ownsTarget=function(P){return!(!q.prototype.ownsTarget.call(this,P)&&P!==this.visual)},F.prototype.createVisual=function(){this.visual=Le.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)},F.prototype.pointerDown=function(P,ee){q.prototype.pointerDown.call(this,P,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(P),this._state="creating")},F.prototype.manipulate=function(P){q.prototype.manipulate.call(this,P)},F.prototype.resize=function(P){q.prototype.resize.call(this,P),this.setSize()},F.prototype.setSize=function(){q.prototype.setSize.call(this),Le.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},F.prototype.pointerUp=function(P){q.prototype.pointerUp.call(this,P),this.setSize()},F.prototype.setStrokeColor=function(P){this.strokeColor=P,this.visual&&Le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(P),this.stateChanged()},F.prototype.setFillColor=function(P){this.fillColor=P,this.visual&&Le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(P),this.stateChanged()},F.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.visual&&Le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},F.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.visual&&Le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},F.prototype.setOpacity=function(P){this.opacity=P,this.visual&&Le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},q.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){var ee=P;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),q.prototype.restoreState.call(this,P),this.setSize()},F.prototype.scale=function(P,ee){q.prototype.scale.call(this,P,ee),this.setSize()},F.typeName="EllipseMarker",F.title="Ellipse marker",F.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>',F}(mt),gt=function(q){function F(P,ee,ae){return q.call(this,P,ee,ae)||this}return Se(F,q),Object.defineProperty(F.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),F.prototype.ownsTarget=function(P){return!(!q.prototype.ownsTarget.call(this,P)&&P!==this.tip1&&P!==this.tip2)},F.prototype.createTips=function(){this.tip1=Le.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(Le.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Le.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(Le.createTransform()),this.visual.appendChild(this.tip2)},F.prototype.pointerDown=function(P,ee){q.prototype.pointerDown.call(this,P,ee),this.state==="creating"&&this.createTips()},F.prototype.adjustVisual=function(){if(q.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Le.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()]]),Le.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 P=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.tip1.transform.baseVal.getItem(0);ee.setRotate(P,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ee,0);var ae=this.tip2.transform.baseVal.getItem(0);ae.setRotate(P+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ae,0)}},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=q.prototype.getState.call(this);return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){q.prototype.restoreState.call(this,P),this.createTips(),this.adjustVisual()},F.typeName="MeasurementMarker",F.title="Measurement marker",F.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>',F}(vt),Lt=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.strokePanel.colors=ae.defaultColorSet,ne.fillColor="transparent",ne}return Se(F,q),Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=q.prototype.getState.call(this);return P.typeName=F.typeName,P},F.typeName="EllipseFrameMarker",F.title="Ellipse frame marker",F.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>',F}(ze),Pt=function(){function q(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(q.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),q.prototype.addUndoStep=function(F){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(F)||(this.undoStack.push(F),JSON.stringify(this.lastRedoStep)!==JSON.stringify(F)&&this.redoStack.splice(0,this.redoStack.length))},q.prototype.replaceLastUndoStep=function(F){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=F)},q.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},q.prototype.undo=function(){if(this.undoStack.length>1){var F=this.undoStack.pop();return F!==void 0&&this.redoStack.push(F),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},q.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},q}(),Rt=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee,ae)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.curveX=0,ne.curveY=0,ne.manipulationStartCurveX=0,ne.manipulationStartCurveY=0,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.positionGrips=ne.positionGrips.bind(ne),ne.addControlGrips=ne.addControlGrips.bind(ne),ne.adjustVisual=ne.adjustVisual.bind(ne),ne.setupControlBox=ne.setupControlBox.bind(ne),ne.resize=ne.resize.bind(ne),ne.strokeColor=ae.defaultColor,ne.strokeWidth=ae.defaultStrokeWidth,ne.strokeDasharray=ae.defaultStrokeDasharray,ne.strokePanel=new be("Line color",ae.defaultColorSet,ae.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ot("Line width",ae.defaultStrokeWidths,ae.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Ft("Line style",ae.defaultStrokeDasharrays,ae.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return Se(F,q),F.prototype.ownsTarget=function(P){return!(!q.prototype.ownsTarget.call(this,P)&&P!==this.visual&&P!==this.selectorCurve&&P!==this.visibleCurve&&!this.curveGrip.ownsTarget(P))},F.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},F.prototype.createVisual=function(){this.visual=Le.createGroup(),this.selectorCurve=Le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Le.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)},F.prototype.pointerDown=function(P,ee){q.prototype.pointerDown.call(this,P,ee),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=P.x,this.curveY=P.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ee)&&(this.activeGrip=this.curveGrip,this._state="resize")},F.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},F.prototype.setupControlBox=function(){q.prototype.setupControlBox.call(this),this.curveControlLine1=Le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Le.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)},F.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,q.prototype.addControlGrips.call(this)},F.prototype.positionGrips=function(){q.prototype.positionGrips.call(this);var P=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-P/2,this.curveY-P/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()))},F.prototype.manipulate=function(P){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+P.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+P.y-this.manipulationStartY),q.prototype.manipulate.call(this,P)},F.prototype.resize=function(P){this.activeGrip===this.curveGrip&&(this.curveX=P.x,this.curveY=P.y),q.prototype.resize.call(this,P),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},F.prototype.setStrokeColor=function(P){this.strokeColor=P,this.adjustVisual(),this.colorChanged(P)},F.prototype.setStrokeWidth=function(P){this.strokeWidth=P,this.adjustVisual()},F.prototype.setStrokeDasharray=function(P){this.strokeDasharray=P,this.adjustVisual()},F.prototype.scale=function(P,ee){this.curveX=this.curveX*P,this.curveY=this.curveY*ee,q.prototype.scale.call(this,P,ee)},Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),F.prototype.getState=function(){var P=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},q.prototype.getState.call(this));return P.typeName=F.typeName,P},F.prototype.restoreState=function(P){q.prototype.restoreState.call(this,P);var ee=P;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.curveX=ee.curveX,this.curveY=ee.curveY,this.createVisual(),this.adjustVisual()},F.typeName="CurveMarker",F.title="Curve marker",F.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>',F}(at),Dt=function(){function q(F,P){P===void 0&&(P=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=F,this.cancelable=P}return Object.defineProperty(q.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),q.prototype.preventDefault=function(){this._defaultPrevented=!0},q}(),dt=function(q){function F(P,ee,ae){var ne=q.call(this,P,!1)||this;return ne.dataUrl=ee,ne.state=ae,ne}return Se(F,q),F}(Dt),it=function(q){function F(P,ee,ae){ae===void 0&&(ae=!1);var ne=q.call(this,P,ae)||this;return ne.marker=ee,ne}return Se(F,q),F}(Dt),nt=function(){function q(){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 q.prototype.addEventListener=function(F,P){this[F].push(P)},q.prototype.removeEventListener=function(F,P){var ee=this[F].indexOf(P);ee>-1&&this[F].splice(ee,1)},q}(),we=function(){function q(F){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Pe,this._isOpen=!1,this.undoRedoManager=new Pt,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 nt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=q.instanceCounter++,this.styles=new Qe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=F,this.targetRoot=document.body,this.width=F.clientWidth,this.height=F.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(q.prototype,"ALL_MARKER_TYPES",{get:function(){return[He,je,Ue,At,Lt,ze,Ee,Ye,gt,me,vt,Rt]},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[He,je,Ue,At,ze,Ee,Ye]},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"BASIC_MARKER_TYPES",{get:function(){return[He,je,Ue,At,Ee]},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(F){var P=this;this._availableMarkerTypes.splice(0),F.forEach(function(ee){if(typeof ee=="string"){var ae=P.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===ee});ae!==void 0&&P._availableMarkerTypes.push(ae)}else P._availableMarkerTypes.push(ee)})},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(F){this._zoomLevel=F,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(q.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),q.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),tt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},q.prototype.show=function(){var F=this;this.styles.styleSheetRoot===void 0&&Ie.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ie.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(P){return P(new Dt(F))})},q.prototype.render=function(){return Fe(this,void 0,void 0,function(){var F;return Ve(this,function(P){switch(P.label){case 0:return this.setCurrentMarker(),(F=new Et).naturalSize=this.renderAtNaturalSize,F.imageType=this.renderImageType,F.imageQuality=this.renderImageQuality,F.markersOnly=this.renderMarkersOnly,F.width=this.renderWidth,F.height=this.renderHeight,[4,F.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return P.sent(),[4,F.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,P.sent()]}})})},q.prototype.close=function(F){var P=this;if(F===void 0&&(F=!1),this.isOpen){var ee=!1;F||this.eventListeners.beforeclose.forEach(function(ae){var ne=new Dt(P,!0);ae(ne),ne.defaultPrevented&&(ee=!0)}),ee||(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(ae){return ae(new Dt(P))}),this.detachEvents(),this._isOpen=!1)}},q.prototype.addMarkersToToolbar=function(){for(var F,P=[],ee=0;ee<arguments.length;ee++)P[ee]=arguments[ee];(F=this._availableMarkerTypes).push.apply(F,P)},q.prototype.addRenderEventListener=function(F){this.addEventListener("render",function(P){F(P.dataUrl,P.state)})},q.prototype.removeRenderEventListener=function(F){},q.prototype.addCloseEventListener=function(F){this.addEventListener("close",function(){F()})},q.prototype.removeCloseEventListener=function(F){},q.prototype.setupResizeObserver=function(){var F=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){F.resize(F.target.clientWidth,F.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return F.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},q.prototype.onPopupTargetResize=function(){var F=1*this.target.clientWidth/this.target.clientHeight,P=this.editorCanvas.clientWidth/F>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*F:this.editorCanvas.clientWidth,ee=P<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/F;this.resize(P,ee)},q.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},q.prototype.resize=function(F,P){this._isResizing=!0;var ee=F/this.imageWidth,ae=P/this.imageHeight;this.imageWidth=Math.round(F),this.imageHeight=Math.round(P),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(ee,ae),this._isResizing=!1},q.prototype.scaleMarkers=function(F,P){var ee,ae=this;this._currentMarker&&this._currentMarker instanceof At?this._currentMarker.scale(F,P):(ee=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==ae._currentMarker&&ne.scale(F,P)}),ee!==void 0&&this.setCurrentMarker(ee)},q.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"},q.prototype.setTopLeft=function(){var F=this.editingTarget.getBoundingClientRect(),P=this.editorCanvas.getBoundingClientRect();this.left=F.left-P.left,this.top=F.top-P.top},q.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)},q.prototype.addDefs=function(){for(var F,P=[],ee=0;ee<arguments.length;ee++)P[ee]=arguments[ee];this.defs=Le.createDefs(),this.addDefsToImage(),(F=this.defs).append.apply(F,P)},q.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},q.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)},q.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},q.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},q.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)},q.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},q.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)},q.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 F=document.createElement("a");F.href="https://markerjs.com/",F.target="_blank",F.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>',F.title="Powered by marker.js",F.style.display="grid",F.style.alignItems="center",F.style.justifyItems="center",F.style.padding="3px",F.style.width="20px",F.style.height="20px",this.logoUI.appendChild(F),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},q.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")},q.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"},q.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},q.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 F=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=F+"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 $(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 re(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},q.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},q.prototype.removeMarker=function(F){this.markerImage.removeChild(F.container),this.markers.indexOf(F)>-1&&this.markers.splice(this.markers.indexOf(F),1),F.dispose()},q.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())},q.prototype.toolbarButtonClicked=function(F,P){if(F==="marker"&&P!==void 0)this.createNewMarker(P);else if(F==="action")switch(P){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()}},q.prototype.deleteSelectedMarker=function(){var F=this;if(this._currentMarker!==void 0){var P=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ae){var ne=new it(F,F._currentMarker,!0);ae(ne),ne.defaultPrevented&&(P=!0)}),!P){var ee=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(ae){return ae(new it(F,ee))})}}},q.prototype.clear=function(){var F=this,P=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var xt=new it(F,void 0,!0);Ke(xt),xt.defaultPrevented&&(P=!0)}),!P)){this.setCurrentMarker();for(var ee=function(Ke){var xt=ae.markers[Ke];ae.setCurrentMarker(ae.markers[Ke]),ae._currentMarker.dispose(),ae.markerImage.removeChild(ae._currentMarker.container),ae.markers.splice(ae.markers.indexOf(ae._currentMarker),1),ae.eventListeners.markerdelete.forEach(function(kt){return kt(new it(F,xt))})},ae=this,ne=this.markers.length-1;ne>=0;ne--)ee(ne);this.addUndoStep()}},Object.defineProperty(q.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),q.prototype.showNotesEditor=function(){var F;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=(F=this._currentMarker.notes)!==null&&F!==void 0?F:"",this.overlayContainer.appendChild(this.notesArea))},q.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)},q.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},q.prototype.addUndoStep=function(){var F=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var P=this.getState(),ee=this.undoRedoManager.getLastUndoStep();if(!ee||ee.width===P.width&&ee.height===P.height){var ae=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(P),ae<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new Dt(F))})}else this.undoRedoManager.replaceLastUndoStep(P),this.eventListeners.statechange.forEach(function(ne){return ne(new Dt(F))})}},q.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},q.prototype.undoStep=function(){var F=this,P=this.undoRedoManager.undo();P!==void 0&&(this.restoreState(P),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ee){return ee(new Dt(F))}))},q.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},q.prototype.redoStep=function(){var F=this,P=this.undoRedoManager.redo();P!==void 0&&(this.restoreState(P),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ee){return ee(new Dt(F))}))},q.prototype.stepZoom=function(){var F=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=F<this.zoomSteps.length-1?this.zoomSteps[F+1]:this.zoomSteps[0]},q.prototype.panTo=function(F){this.contentDiv.scrollBy({left:this.prevPanPoint.x-F.x,top:this.prevPanPoint.y-F.y}),this.prevPanPoint=F},q.prototype.startRenderAndClose=function(){return Fe(this,void 0,void 0,function(){var F,P,ee=this;return Ve(this,function(ae){switch(ae.label){case 0:return[4,this.render()];case 1:return F=ae.sent(),P=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new dt(ee,F,P))}),this.close(!0),[2]}})})},q.prototype.getState=function(F){F===!0&&this.setCurrentMarker();var P={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ee){return P.markers.push(ee.getState())}),P},q.prototype.restoreState=function(F){var P=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);F.markers.forEach(function(ee){var ae=P._availableMarkerTypes.find(function(Ke){return Ke.typeName===ee.typeName});if(ae!==void 0){var ne=P.addNewMarker(ae);ne.restoreState(ee),P.markers.push(ne)}}),F.width&&F.height&&(F.width!==this.imageWidth||F.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/F.width,this.imageHeight/F.height),this.eventListeners.restorestate.forEach(function(ee){return ee(new Dt(P))})},q.prototype.addNewMarker=function(F){var P=Le.createGroup();return this.markerImage.appendChild(P),new F(P,this.overlayContainer,this.settings)},q.prototype.createNewMarker=function(F){var P,ee=this;(P=typeof F=="string"?this._availableMarkerTypes.find(function(ae){return ae.typeName===F}):F)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(P),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(P.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ae){return ae(new it(ee,ee._currentMarker))}))},q.prototype.markerCreated=function(F){var P=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(F),this.setCurrentMarker(F),F instanceof je&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(je):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ee){return ee(new it(P,P._currentMarker))})},q.prototype.colorChanged=function(F){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=F,this.settings.defaultStrokeColor=F)},q.prototype.fillColorChanged=function(F){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=F)},q.prototype.markerStateChanged=function(F){var P=this;this.eventListeners.markerchange.forEach(function(ee){return ee(new it(P,F))})},q.prototype.setCurrentMarker=function(F){var P=this;this._currentMarker!==F&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ee){return ee(new it(P,P._currentMarker))})),this._currentMarker=F,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(ee){return ee(new it(P,P._currentMarker))}))},q.prototype.onPointerDown=function(F){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||F.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var P=this.markers.find(function(ee){return ee.ownsTarget(F.target)});P!==void 0?(this.setCurrentMarker(P),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(F.clientX,F.clientY),F.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:F.clientX,y:F.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(F.clientX,F.clientY))},q.prototype.onDblClick=function(F){if(this._isFocused||this.focus(),this.mode==="select"){var P=this.markers.find(function(ee){return ee.ownsTarget(F.target)});P!==void 0&&P!==this._currentMarker&&this.setCurrentMarker(P),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(F.clientX,F.clientY),F.target):this.setCurrentMarker()}},q.prototype.onPointerMove=function(F){this.touchPoints!==1&&F.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||F.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(F.clientX,F.clientY)):this.zoomLevel>1&&this.panTo({x:F.clientX,y:F.clientY}))},q.prototype.onPointerUp=function(F){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(F.clientX,F.clientY)),this.isDragging=!1,this.addUndoStep()},q.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},q.prototype.onKeyUp=function(F){this._currentMarker===void 0||this.notesArea!==void 0||F.key!=="Delete"&&F.key!=="Backspace"||this.deleteSelectedMarker()},q.prototype.clientToLocalCoordinates=function(F,P){var ee=this.markerImage.getBoundingClientRect();return{x:(F-ee.left)/this.zoomLevel,y:(P-ee.top)/this.zoomLevel}},q.prototype.onWindowResize=function(){this.positionUI()},q.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var F=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=F+"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()},q.prototype.addLicenseKey=function(F){tt.addKey(F)},q.prototype.addEventListener=function(F,P){this.eventListeners.addEventListener(F,P)},q.prototype.removeEventListener=function(F,P){this.eventListeners.removeEventListener(F,P)},q.prototype.renderState=function(F){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(F),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(q.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),q.prototype.focus=function(){var F=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(P){return P(new Dt(F))}))},q.prototype.blur=function(){var F=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(P){return P(new Dt(F))}))},q.instanceCounter=0,q}();/* **********************************
|
|
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 Ne=function(q,F){return(Ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,ee){P.__proto__=ee}||function(P,ee){for(var ae in ee)Object.prototype.hasOwnProperty.call(ee,ae)&&(P[ae]=ee[ae])})(q,F)};function ht(q,F){if(typeof F!="function"&&F!==null)throw new TypeError("Class extends value "+String(F)+" is not a constructor or null");function P(){this.constructor=q}Ne(q,F),q.prototype=F===null?Object.create(F):(P.prototype=F.prototype,new P)}function ot(q,F,P,ee){return new(P||(P=Promise))(function(ae,ne){function Ke(Ht){try{kt(ee.next(Ht))}catch(Ct){ne(Ct)}}function xt(Ht){try{kt(ee.throw(Ht))}catch(Ct){ne(Ct)}}function kt(Ht){var Ct;Ht.done?ae(Ht.value):(Ct=Ht.value,Ct instanceof P?Ct:new P(function(Yt){Yt(Ct)})).then(Ke,xt)}kt((ee=ee.apply(q,F||[])).next())})}function Bt(q,F){var P,ee,ae,ne,Ke={label:0,sent:function(){if(1&ae[0])throw ae[1];return ae[1]},trys:[],ops:[]};return ne={next:xt(0),throw:xt(1),return:xt(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function xt(kt){return function(Ht){return function(Ct){if(P)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(P=1,ee&&(ae=2&Ct[0]?ee.return:Ct[0]?ee.throw||((ae=ee.return)&&ae.call(ee),0):ee.next)&&!(ae=ae.call(ee,Ct[1])).done)return ae;switch(ee=0,ae&&(Ct=[2&Ct[0],ae.value]),Ct[0]){case 0:case 1:ae=Ct;break;case 4:return Ke.label++,{value:Ct[1],done:!1};case 5:Ke.label++,ee=Ct[1],Ct=[0];continue;case 7:Ct=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ae=Ke.trys,(ae=ae.length>0&&ae[ae.length-1])||Ct[0]!==6&&Ct[0]!==2)){Ke=0;continue}if(Ct[0]===3&&(!ae||Ct[1]>ae[0]&&Ct[1]<ae[3])){Ke.label=Ct[1];break}if(Ct[0]===6&&Ke.label<ae[1]){Ke.label=ae[1],ae=Ct;break}if(ae&&Ke.label<ae[2]){Ke.label=ae[2],Ke.ops.push(Ct);break}ae[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Ct=F.call(q,Ke)}catch(Yt){Ct=[6,Yt],ee=0}finally{P=ae=0}if(5&Ct[0])throw Ct[1];return{value:Ct[0]?Ct[1]:void 0,done:!0}}([kt,Ht])}}}var wt=function(){function q(){}return q.addKey=function(F){q.key=F},Object.defineProperty(q,"isLicensed",{get:function(){return!!q.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(q.key)},enumerable:!1,configurable:!0}),q}(),rt=function(){function q(){}return q.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},q.setAttributes=function(F,P){for(var ee=0,ae=P;ee<ae.length;ee++){var ne=ae[ee],Ke=ne[0],xt=ne[1];F.setAttribute(Ke,xt)}},q.createRect=function(F,P,ee){var ae=document.createElementNS("http://www.w3.org/2000/svg","rect");return ae.setAttribute("width",F.toString()),ae.setAttribute("height",P.toString()),ee&&q.setAttributes(ae,ee),ae},q.createLine=function(F,P,ee,ae,ne){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",F.toString()),Ke.setAttribute("y1",P.toString()),Ke.setAttribute("x2",ee.toString()),Ke.setAttribute("y2",ae.toString()),ne&&q.setAttributes(Ke,ne),Ke},q.createPolygon=function(F,P){var ee=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ee.setAttribute("points",F),P&&q.setAttributes(ee,P),ee},q.createCircle=function(F,P){var ee=document.createElementNS("http://www.w3.org/2000/svg","circle");return ee.setAttribute("cx",(F/2).toString()),ee.setAttribute("cy",(F/2).toString()),ee.setAttribute("r",F.toString()),P&&q.setAttributes(ee,P),ee},q.createEllipse=function(F,P,ee){var ae=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ae.setAttribute("cx",(F/2).toString()),ae.setAttribute("cy",(P/2).toString()),ae.setAttribute("rx",(F/2).toString()),ae.setAttribute("ry",(P/2).toString()),ee&&q.setAttributes(ae,ee),ae},q.createGroup=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","g");return F&&q.setAttributes(P,F),P},q.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},q.createMarker=function(F,P,ee,ae,ne,Ke,xt){var kt=document.createElementNS("http://www.w3.org/2000/svg","marker");return q.setAttributes(kt,[["id",F],["orient",P],["markerWidth",ee.toString()],["markerHeight",ae.toString()],["refX",ne.toString()],["refY",Ke.toString()]]),kt.appendChild(xt),kt},q.createText=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","text");return P.setAttribute("x","0"),P.setAttribute("y","0"),F&&q.setAttributes(P,F),P},q.createTSpan=function(F,P){var ee=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ee.textContent=F,P&&q.setAttributes(ee,P),ee},q.createImage=function(F){var P=document.createElementNS("http://www.w3.org/2000/svg","image");return F&&q.setAttributes(P,F),P},q.createPoint=function(F,P){var ee=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ee.x=F,ee.y=P,ee},q.createPath=function(F,P){var ee=document.createElementNS("http://www.w3.org/2000/svg","path");return ee.setAttribute("d",F),P&&q.setAttributes(ee,P),ee},q.createElement=function(F,P){var ee=document.createElementNS("http://www.w3.org/2000/svg",F);return P&&q.setAttributes(ee,P),ee},q.getHollowRectanglePath=function(F,P,ee,ae,ne,Ke,xt,kt){return"M"+F+","+P+"V"+(P+ae)+"H"+(F+ee)+"V"+P+"H"+ne+"V"+Ke+"H"+(ne+xt)+"V"+(Ke+kt)+"H"+ne+"V"+P+"Z"},q}(),st=function(){function q(F){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+F+"_"}return Object.defineProperty(q.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(q.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(q.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),q.prototype.addClass=function(F){return this.styleSheet===void 0&&this.addStyleSheet(),F.name=""+this.classNamePrefix+F.localName,this.classes.push(F),this.styleSheet.sheet.insertRule("."+F.name+" {"+F.style+"}",this.styleSheet.sheet.cssRules.length),F},q.prototype.addRule=function(F){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(F),this.styleSheet.sheet.insertRule(F.selector+" {"+F.style+"}",this.styleSheet.sheet.cssRules.length)},q.prototype.addStyleSheet=function(){var F;this.styleSheet=document.createElement("style"),((F=this.styleSheetRoot)!==null&&F!==void 0?F:document.head).appendChild(this.styleSheet),this.addRule(new St("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new St("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new St("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new It("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new It("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},q.prototype.removeStyleSheet=function(){var F;this.styleSheet&&(((F=this.styleSheetRoot)!==null&&F!==void 0?F:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},q}(),St=function(q,F){this.selector=q,this.style=F},It=function(q,F){this.localName=q,this.style=F},Qt=function(){function q(){this.blocks=[],this.display=""}return q.prototype.addButtonBlock=function(F){F.className=this.blockClassName,F.buttonClassName=this.buttonClassName,F.buttonColorsClassName=this.buttonColorsClassName,F.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(F)},q.prototype.addElementBlock=function(F){F.className===void 0&&(F.className=this.blockClassName),this.blocks.push(F)},q.prototype.getUI=function(){var F=document.createElement("div");return F.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,F.style.display=this.display,this.blocks.forEach(function(P){return F.appendChild(P.getUI())}),F},q}(),gr=function(){function q(){}return q.prototype.getUI=function(){var F=document.createElement("div");if(F.className=this.className,this.minWidth!==void 0&&(F.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":F.style.justifyContent="flex-start";break;case"center":F.style.justifyContent="center";break;case"end":F.style.justifyContent="flex-end"}return F.style.whiteSpace="nowrap",F},q}(),vr=function(q){function F(){var P=q!==null&&q.apply(this,arguments)||this;return P.buttons=[],P}return ht(F,q),F.prototype.addButton=function(P){P.className=this.buttonClassName,P.colorsClassName=this.buttonColorsClassName,P.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(P)},F.prototype.getUI=function(){var P=q.prototype.getUI.call(this);return this.buttons.forEach(function(ee){return P.appendChild(ee.getUI())}),P},F}(gr),cr=function(){function q(F,P){this._isActive=!1,this._isHidden=!1,this._icon=F,this.title=P,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(q.prototype,"icon",{get:function(){return this._icon},set:function(F){this._icon=F,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isActive",{get:function(){return this._isActive},set:function(F){this._isActive=F,this.adjustClassName()},enumerable:!1,configurable:!0}),q.prototype.getUI=function(){var F=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 F.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},q.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,"")))},q.prototype.hide=function(){this._isHidden=!0},q}(),jt=function(q){function F(){var P=q!==null&&q.apply(this,arguments)||this;return P.elements=[],P}return ht(F,q),F.prototype.addElement=function(P){this.elements.push(P)},F.prototype.getUI=function(){var P=q.prototype.getUI.call(this);return this.elements.forEach(function(ee){return P.appendChild(ee)}),P},F}(gr),Ir=function(){function q(F,P){this.horizontal=F,this.vertical=P}return Object.defineProperty(q.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),q.prototype.getVerticalLength=function(F){return F/this.ratio},q.prototype.getHorizontalLength=function(F){return F*this.ratio},q}(),kr=function(){function q(){}return q.getIcon=function(F,P){if(F>0&&P>0){var ee=new Ir(F,P),ae=ee.ratio>=1?20:ee.getHorizontalLength(20),ne=ee.ratio<1?20:ee.getVerticalLength(20),Ke=document.createElementNS("http://www.w3.org/2000/svg","svg");Ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ke.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ke);var xt=rt.createDefs();Ke.appendChild(xt);var kt=rt.createElement("clipPath",[["id","text-bg-clip"]]);xt.appendChild(kt);var Ht=rt.createPath(rt.getHollowRectanglePath((24-ae)/2,(24-ne)/2,ae,ne,(24-ae)/2+2,(24-ne)/2+2,ae-4,ne-4));Ke.appendChild(Ht);var Ct=rt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ct.appendChild(rt.createTSpan(F+":"+P)),Ke.appendChild(Ct);var Yt=Ct.getBBox();rt.setAttributes(Ct,[["x",((24-Yt.width)/2).toString()],["y",((24-Yt.height)/2-Yt.y).toString()]]);var Wt=rt.createPath(rt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Yt.width))/2,(24-Math.ceil(Yt.height))/2,Math.ceil(Yt.width),Math.ceil(Yt.height)));return kt.appendChild(Wt),rt.setAttributes(Ht,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ke),Ke.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>'},q}(),_r=function(q){function F(P,ee,ae){var ne=q.call(this,P,ee)||this;return ne.isDropdownOpen=!1,ne.onClick=ne.dropdownButtonClicked,ne.dropdownButtons=ae,ne}return ht(F,q),F.prototype.setupDropdown=function(){var P=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ee){ee.className=P.className,ee.colorsClassName=P.colorsClassName,P.dropdownBlock.appendChild(ee.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},F.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},F.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},F.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},F.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},F.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},F}(cr),hr=function(){function q(F,P){this.GRIP_SIZE=10,this.color=F,this.fillColor=P,this.visual=rt.createGroup(),this.visual.appendChild(rt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(rt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return q.prototype.ownsTarget=function(F){return F===this.visual||F===this.visual.childNodes[0]||F===this.visual.childNodes[1]},q.prototype.setCenter=function(F,P){this.visual.childNodes.forEach(function(ee){return rt.setAttributes(ee,[["cx",F.toString()],["cy",P.toString()]])})},q}(),Sr=function(){function q(F,P,ee,ae){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=F,this.canvasHeight=P,this.margin=ee,this.container=ae,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(q.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(F){this._aspectRatio=F,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(F){this._isGridVisible=F,this.gridContainer&&rt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(F){this._zoomFactor=F,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),q.prototype.open=function(){var F=this;this.cropShadeElement=rt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=rt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var P=0;P<this.numberOfGridLines;P++)this.horizontalGridLines.push(rt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(rt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ee){return F.gridContainer.appendChild(ee)}),this.verticalGridLines.forEach(function(ee){return F.gridContainer.appendChild(ee)}),this.cropRectElement=rt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new hr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new hr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new hr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new hr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},q.prototype.setCropRectangle=function(F){this.cropRect=F;var P=Object.assign({},this.cropRect);this.zoomFactor!==1&&(P.width=this.cropRect.width*this.zoomFactor,P.height=this.cropRect.height*this.zoomFactor,P.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-P.width/2,P.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-P.height/2),rt.setAttributes(this.cropRectElement,[["x",P.x.toString()],["y",P.y.toString()],["width",P.width.toString()],["height",P.height.toString()]]);var ee=P.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ne,Ke){var xt=P.y+ee*(Ke+1);rt.setAttributes(ne,[["x1",""+P.x],["y1",""+xt],["x2",""+(P.x+P.width)],["y2",""+xt]])});var ae=P.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ne,Ke){var xt=P.x+ae*(Ke+1);rt.setAttributes(ne,[["x1",""+xt],["y1",""+P.y],["x2",""+xt],["y2",""+(P.y+P.height)]])}),rt.setAttributes(this.cropShadeElement,[["d",rt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,P.x,P.y,P.width,P.height)]]),this.topLeftGrip.setCenter(P.x,P.y),this.topRightGrip.setCenter(P.x+P.width,P.y),this.bottomLeftGrip.setCenter(P.x,P.y+P.height),this.bottomRightGrip.setCenter(P.x+P.width,P.y+P.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},q.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)},q.prototype.clientToLocalCoordinates=function(F,P){var ee=this.container.getBoundingClientRect();return{x:F-ee.left+this.margin,y:P-ee.top+this.margin}},q.prototype.onPointerDown=function(F){this.container.setPointerCapture(F.pointerId),this.previousPoint=this.clientToLocalCoordinates(F.clientX,F.clientY),this.cropRectElement===F.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(F.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(F.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(F.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(F.target)&&(this.activeGrip=this.bottomRightGrip)},q.prototype.onPointerMove=function(F){if(this.isMoving)this.move(this.clientToLocalCoordinates(F.clientX,F.clientY));else if(this.activeGrip){var P=this.clientToLocalCoordinates(F.clientX,F.clientY);this.resize(P)}F.preventDefault()},q.prototype.onPointerUp=function(F){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(F.pointerId)},q.prototype.move=function(F){var P=F.x-this.previousPoint.x,ee=F.y-this.previousPoint.y;this.zoomFactor!==1&&(P=-P/this.zoomFactor,ee=-ee/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+P),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ee),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=F},q.prototype.resize=function(F){var P=Object.assign({},this.cropRect),ee=F.x-this.previousPoint.x,ae=F.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:P.x+ee<this.margin&&(ee=this.margin-P.x),P.x+=ee,P.width=this.cropRect.x+this.cropRect.width-P.x;break;case this.bottomRightGrip:case this.topRightGrip:P.width+ee>this.canvasWidth*this.zoomFactor&&(ee=this.canvasWidth*this.zoomFactor-P.width),P.width+=ee}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(P.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ee),P.height=this.aspectRatio.getVerticalLength(P.width)):(P.y+=ae,P.height=this.cropRect.y+this.cropRect.height-P.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?P.height=this.aspectRatio.getVerticalLength(P.width):P.height+=ae}P.width<10&&(P.x=this.cropRect.x,P.width=10),P.height<10&&(P.y=this.cropRect.y,P.height=10),this.previousPoint=F,P.x>=this.margin&&P.y>=this.margin&&P.x-this.margin+P.width<=this.canvasWidth&&P.y-this.margin+P.height<=this.canvasHeight&&(this.cropRect=P,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},q.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var F=this.cropRect.x+this.cropRect.width/2,P=this.cropRect.y+this.cropRect.height/2,ee=this.aspectRatio.getHorizontalLength(this.cropRect.height),ae=this.aspectRatio.getVerticalLength(this.cropRect.width);ee/this.canvasWidth<ae/this.canvasHeight?this.cropRect.width=ee:this.cropRect.height=ae,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=F-this.cropRect.width/2,this.cropRect.y=P-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)}},q.prototype.getRescaledRect=function(F,P,ee,ae,ne,Ke){var xt=ee/F,kt=ae/P;return{x:(ne.x-Ke)*xt+Ke,y:(ne.y-Ke)*kt+Ke,width:ne.width*xt,height:ne.height*kt}},q.prototype.scaleCanvas=function(F,P){var ee=this.getRescaledRect(this.canvasWidth,this.canvasHeight,F,P,this.cropRect,this.margin);this.canvasWidth=F,this.canvasHeight=P,this.onCropChange&&this.onCropChange(ee),this.setCropRectangle(ee)},q}(),sn=function(){function q(F){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=F,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(q.prototype,"angle",{get:function(){return this._angle},set:function(F){this._angle=F,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),q.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},q.prototype.onPointerDown=function(F){this.controlContainer.setPointerCapture(F.pointerId),this.isDragging=!0,this.previousPoint={x:F.clientX,y:F.clientY}},q.prototype.onPointerMove=function(F){this.isDragging&&(this.onAngleChange&&this.onAngleChange((F.clientX-this.previousPoint.x)/5),this.previousPoint.x=F.clientX)},q.prototype.onPointerUp=function(F){this.isDragging&&this.onAngleChange&&this.onAngleChange((F.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(F.pointerId)},q.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var F=this.angleLabelText.getBBox();rt.setAttributes(this.angleLabelElement,[["x",((this.width-F.width)/2).toString()],["y",(this.height/2).toString()]])}},q.prototype.positionScaleShape=function(){if(this.scaleShape){var F=this.scaleShape.transform.baseVal.getItem(0);F.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(F,0)}},q.prototype.getVisual=function(){var F=document.createElementNS("http://www.w3.org/2000/svg","svg");F.setAttribute("xmlns","http://www.w3.org/2000/svg"),F.setAttribute("width",this.width+"px"),F.setAttribute("height",this.height+"px"),F.setAttribute("viewBox","0 0 "+this.width+" "+this.height),F.style.flexShrink="0",document.body.appendChild(F);for(var P="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ee=1;ee<=this.width/5+10;ee++){var ae=ee%5==0?this.height/3:this.height/6;P+="h4v"+-ae+"h1v"+ae}P+="v1H0Z",this.scaleShape=rt.createPath(P);var ne=rt.createTransform();this.scaleShape.transform.baseVal.appendItem(ne),F.appendChild(this.scaleShape),this.angleLabelElement=rt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=rt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=rt.createTSpan("");return Ke.innerHTML="°",this.angleLabelElement.appendChild(Ke),F.appendChild(this.angleLabelElement),document.body.removeChild(F),F},q}(),en=function(){function q(){this.naturalSize=!1,this.imageType="image/png"}return q.prototype.rasterize=function(F,P,ee,ae,ne,Ke,xt){var kt=this;return new Promise(function(Ht){var Ct=document.createElement("canvas");Ct.width=F.width.baseVal.value-2*ae,Ct.height=F.height.baseVal.value-2*ae;var Yt=1,Wt=1;kt.naturalSize===!0?(Yt=P.naturalWidth/(F.width.baseVal.value-2*ae)/Ke,Wt=P.naturalHeight/(F.height.baseVal.value-2*ae)/xt,Ct.width=P.naturalWidth/Ke,Ct.height=P.naturalHeight/xt):kt.width!==void 0&&kt.height!==void 0&&(Yt=kt.width/ee.width,Wt=kt.height/ee.height,Ct.width*=Yt,Ct.height*=Wt);var $t=Ct.getContext("2d");$t.translate(Ct.width/2,Ct.height/2),$t.rotate(ne*Math.PI/180),$t.scale(Ke,xt),$t.translate(-Ct.width/2,-Ct.height/2),$t.drawImage(P,0,0,Ct.width,Ct.height);var fr=document.createElement("canvas");fr.width=ee.width*Yt,fr.height=ee.height*Wt,fr.getContext("2d").putImageData($t.getImageData((ee.x-ae)*Yt,(ee.y-ae)*Wt,ee.width*Yt,ee.height*Wt),0,0),Ht(fr.toDataURL(kt.imageType,kt.imageQuality))})},q}(),he=function(){function q(F){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=q.instanceCounter++,this.styles=new st(this.instanceNo),this.target=F,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(q.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(F){this._zoomToCropEnabled=F,F?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(F){this._isGridVisible=F,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"gridLines",{get:function(){return this._gridLines},set:function(F){this._gridLines=F,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(F){this._rotationAngle=F,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"aspectRatio",{get:function(){var F;return(F=this._aspectRatio)!==null&&F!==void 0?F:this.aspectRatios[0]},set:function(F){this._aspectRatio=F},enumerable:!1,configurable:!0}),q.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},q.prototype.show=function(){this.showUI(),this.open()},q.prototype.close=function(F){F===void 0&&(F=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),F||this.closeEventListeners.forEach(function(P){return P()}),this._isOpen=!1)},q.prototype.addRenderEventListener=function(F){this.renderEventListeners.push(F)},q.prototype.removeRenderEventListener=function(F){this.renderEventListeners.indexOf(F)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(F),1)},q.prototype.addCloseEventListener=function(F){this.closeEventListeners.push(F)},q.prototype.removeCloseEventListener=function(F){this.closeEventListeners.indexOf(F)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(F),1)},q.prototype.setupResizeObserver=function(){var F=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){F.resize(F.target.clientWidth,F.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))},q.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var F=1*this.target.clientWidth/this.target.clientHeight,P=this.contentDiv.clientWidth/F>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*F:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ee=P+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/F;this.resize(P,ee)}},q.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},q.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",rt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},q.prototype.resize=function(F,P){this.imageWidth=Math.round(F),this.imageHeight=Math.round(P),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()},q.prototype.setEditingTarget=function(){var F=document.createElement("canvas");F.width=this.target.naturalWidth,F.height=this.target.naturalHeight,F.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var P=F.toDataURL();rt.setAttributes(this.editingTarget,[["href",P]]),this.setEditingTargetSize()},q.prototype.setTopLeft=function(){var F=this.target.getBoundingClientRect(),P=this.editorCanvas.getBoundingClientRect();this.left=F.left-P.left-this.CANVAS_MARGIN,this.top=F.top-P.top-this.CANVAS_MARGIN},q.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=rt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=rt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=rt.createGroup(),this.editingTargetRotationScaleContainer=rt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var F=rt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(F);var P=rt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(P),this.editingTargetContainer=rt.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)},q.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},q.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=rt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Sr(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()},q.prototype.zoomToCrop=function(){if(this.cropRect){var F=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,P=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=F+"px "+P+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-F+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-P+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},q.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)},q.prototype.cropRectChanged=function(F){this.cropRect=F,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},q.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},q.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"},q.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},q.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 F=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,P=this.target.offsetTop>F+this.CANVAS_MARGIN?this.target.offsetTop-(F+this.CANVAS_MARGIN):0;this.coverDiv.style.top=P+"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},q.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},q.prototype.addTopToolbar=function(){var F=this;this.topToolbar=new Qt,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 P=new vr;P.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(P);var ee=[];this.aspectRatios.forEach(function(Wt){var $t=new cr(kr.getIcon(Wt.horizontal,Wt.vertical),Wt.horizontal===0&&Wt.vertical===0?"FREE":Wt.horizontal+":"+Wt.vertical);$t.onClick=function(){return F.ratioButtonClicked(Wt)},ee.push($t)}),this.aspectRatioButton=new _r(kr.getIcon(0,0),"Aspect ratio",ee),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,P.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ae=new cr('<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");ae.isActive=this.isGridVisible,ae.onClick=function(){F.isGridVisible=!F.isGridVisible,ae.isActive=F.isGridVisible},P.addButton(ae);var ne=new cr('<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(ne.isActive=this.zoomToCropEnabled,ne.onClick=function(){F.zoomToCropEnabled=!F.zoomToCropEnabled,ne.isActive=F.zoomToCropEnabled},P.addButton(ne),!wt.isLicensed){var Ke=new jt;this.topToolbar.addElementBlock(Ke);var xt=document.createElement("div");xt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var kt=document.createElement("a");kt.style.color="currentColor",kt.href="https://markerjs.com/products/cropro",kt.target="_blank",kt.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>',xt.appendChild(kt),Ke.addElement(xt)}var Ht=new vr;Ht.minWidth=3*this.toolbarHeight+"px",Ht.contentAlign="end",this.topToolbar.addButtonBlock(Ht);var Ct=new cr('<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");Ct.onClick=this.startRenderAndClose,Ht.addButton(Ct),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ct.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Yt=new cr('<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");Yt.onClick=this.close,Ht.addButton(Yt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Yt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},q.prototype.addBottomToolbar=function(){var F=this;this.bottomToolbar=new Qt,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 P=new vr;P.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(P);var ee=new cr('<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");ee.onClick=this.rotateLeftButtonClicked,P.addButton(ee);var ae=new cr('<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");ae.onClick=this.rotateRightButtonClicked,P.addButton(ae);var ne=new jt;ne.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ne),this.straightener=new sn("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(Ht){F.rotateBy(Ht),F.straightener.angle=F.rotationAngle},ne.addElement(this.straightener.getUI());var Ke=new vr;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var xt=new cr('<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");xt.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(xt);var kt=new cr('<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");kt.onClick=this.flipVerticallyButtonClicked,Ke.addButton(kt)},q.prototype.ratioButtonClicked=function(F){this.aspectRatio=F,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},q.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=kr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},q.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ir(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},q.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},q.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},q.prototype.restoreState=function(F){if(F){var P=this.cropLayer.getRescaledRect(F.width,F.height,this.imageWidth,this.imageHeight,F.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(P),this.cropRectChanged(P),this.flippedHorizontally=F.flippedHorizontally,this.flippedVertically=F.flippedVertically,this.applyFlip(),this.rotationAngle=F.rotationAngle,this.applyRotation()}},q.prototype.clientToLocalCoordinates=function(F,P){var ee=this.cropImage.getBoundingClientRect();return{x:F-ee.left,y:P-ee.top}},q.prototype.onWindowResize=function(){this.positionUI()},q.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var F=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=F+"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()},q.prototype.rotateLeftButtonClicked=function(){var F=this.rotationAngle-90;this.rotationAngle%90!=0&&(F+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(F)},q.prototype.rotateRightButtonClicked=function(){var F=this.rotationAngle+90;this.rotationAngle%90!=0&&(F-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(F)},q.prototype.rotateTo=function(F){F=(F=F>180?F-360:F)<=-180?F+360:F,this.rotationAngle=F,this.applyRotation()},q.prototype.rotateBy=function(F){this.rotateTo((this.rotationAngle+F)%360)},q.prototype.applyRotation=function(){var F=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var P=this.editingTargetRotationContainer.transform.baseVal.getItem(0);P.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(P,0);var ee=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ee.width,this.imageHeight/ee.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=F},q.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},q.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},q.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},q.prototype.startRenderAndClose=function(){return ot(this,void 0,void 0,function(){var F,P;return Bt(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return F=ee.sent(),P=this.getState(),this.renderEventListeners.forEach(function(ae){return ae(F,P)}),this.close(!0),[2]}})})},q.prototype.render=function(){return ot(this,void 0,void 0,function(){var F;return Bt(this,function(P){switch(P.label){case 0:return(F=new en).naturalSize=this.renderAtNaturalSize,F.imageType=this.renderImageType,F.imageQuality=this.renderImageQuality,F.width=this.renderWidth,F.height=this.renderHeight,this.unzoomFromCrop(),rt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,F.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 P.sent(),[4,F.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,P.sent()]}})})},q.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new It("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 It("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new It("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var F=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new It("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*F)+`px;
|
|
height: `+(this.toolbarHeight-2*F)+`px;
|
|
padding: `+F+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new It("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new It("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new St("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new St("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new It("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 It("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new It("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 It("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*F)+`px;
|
|
padding: `+F+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new It("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},q.instanceCounter=0,q}(),ge=k("8hTe"),Re=k.n(ge),Ze=/<pre[^>]*>/g;function Je(q){var F=document.createElement("div");return F.innerHTML=q,F.childNodes.length===0?"":F.childNodes[0].nodeValue}var Tt=ue.a=function(q){var F=q.value,P=F===void 0?"":F,ee=q.edit,ae=ee===void 0?!1:ee,ne=q.className,Ke=q.showTextOnly,xt=q.showLines,kt=q.replaces,Ht=q.zoomImg,Ct=q.hasMask,Yt=q.style,Wt=Yt===void 0?{}:Yt,$t=q.stylesPrev,fr=$t===void 0?{}:$t,Fr=String(P),yr=Object(g.useRef)(),Rr=Object(g.useRef)(),pr=Object(g.useState)(""),Nr=Object(D.a)(pr,2),Hr=Nr[0],qr=Nr[1],Yr=Object(g.useState)("office"),nn=Object(D.a)(Yr,2),cn=nn[0],$r=nn[1],an=function(){var Zt=new he(Rr.current);Zt.displayMode="popup",Zt.addRenderEventListener(function(){var br=Object(B.a)(b.a.mark(function Cr(Tr){var Er;return b.a.wrap(function(Qr){for(;;)switch(Qr.prev=Qr.next){case 0:return yr.current.style.display="none",Qr.next=3,Object(Be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Tr}});case 3:Er=Qr.sent,Er!=null&&Er.id&&kt(Rr.current.getAttribute("src").replace(Y.a.API_SERVER,""),"/api/attachments/".concat(Er==null?void 0:Er.id,"?type=").concat(Er.content_type));case 5:case"end":return Qr.stop()}},Cr)}));return function(Cr){return br.apply(this,arguments)}}()),Zt.show()},ln=function(){var Zt=new we(Rr.current);Zt.settings.displayMode="popup",Zt.addEventListener("render",function(){var br=Object(B.a)(b.a.mark(function Cr(Tr){var Er;return b.a.wrap(function(Qr){for(;;)switch(Qr.prev=Qr.next){case 0:if(yr.current.style.display="none",!Rr.current){Qr.next=6;break}return Qr.next=4,Object(Be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Tr.dataUrl}});case 4:Er=Qr.sent,Er!=null&&Er.id&&kt(Rr.current.getAttribute("src").replace(Y.a.API_SERVER,""),"/api/attachments/".concat(Er==null?void 0:Er.id,"?type=").concat(Er.content_type));case 6:case"end":return Qr.stop()}},Cr)}));return function(Cr){return br.apply(this,arguments)}}()),Zt.show(),window.markerArea=Zt},dn=Object(g.useMemo)(function(){try{var nr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Zt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,br=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Fr=Fr.replace(nr,"("+Y.a.API_SERVER+"/api/attachments/").replace(Zt,'"'+Y.a.API_SERVER+"/api/attachments/").replace(br,'"'+Y.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,`
|
|
`),Fr=Fr.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
|
|
`)}catch(Dn){}var Cr=Z(Fr),Tr=L();if(Fr.match(/\[TOC\]/)&&(Cr=Cr.replace("<p>[TOC]</p>",M()),p()),Cr=Cr.replace(/(__special_katext_id_\d+__)/g,function(Dn,Qr){var Cn=Tr[Qr],Hn=Cn.type,Ln=Cn.expression;return Object(le.renderToString)(Je(Ln)||"",{displayMode:Hn==="block",throwOnError:!1,output:"html"})}),Cr=Cr.replace(/▁/g,"\u2581\u2581\u2581"),T(),Ke){var Er=document.createElement("div");return Er.innerHTML=Cr,Er.innerText}return setTimeout(function(){return dr()},500),Cr},[Fr]),hn=Object(g.useRef)();S.WebkitLineClamp=xt,xt&&(Wt=Object(R.a)(Object(R.a)({},Wt),S));function wr(nr){var Zt=nr.target;if(Zt.tagName.toUpperCase()==="IMG"){if(Ht){var br=Zt.getAttribute("src");qr(br),$r("image")}}else if(Zt.tagName.toUpperCase()==="A"){var Cr=Zt.getAttribute("href");if(Cr.indexOf("office")>-1)nr.preventDefault(),qr(Cr),$r("office");else if(Cr.indexOf("application/pdf")>-1)nr.preventDefault(),qr(Cr),$r("pdf");else if(Cr.indexOf("type=text")>-1)nr.preventDefault(),qr(Cr),$r("html");else if(Cr.startsWith("#")){nr.preventDefault();var Tr=document.getElementById(Cr.replace("#",""));Tr&&Tr.scrollIntoView(!0)}}}var dr=function(){var Zt,br=(Zt=hn.current)===null||Zt===void 0?void 0:Zt.querySelectorAll("video");br==null||br.forEach(function(Cr){if(Cr.oncontextmenu=function(){return!1},Cr.src.indexOf(".m3u8")>-1&&!Cr.canPlayType("application/vnd.apple.mpegurl")){if(te.a.isSupported()){var Tr=new te.a;Tr.loadSource(Cr.src),Tr.attachMedia(Cr)}}})};Object(g.useEffect)(function(){if(hn.current&&dn&&(dn.match(Ze)&&window.PR.prettyPrint()),hn.current)return hn.current.addEventListener("click",wr),function(){hn.current.removeEventListener("click",wr),T(),p()}},[dn,hn.current,wr]);var sr=function(Zt){if(!ae)return;Zt.target.nodeName==="IMG"?(yr.current.style.display="flex",yr.current.style.width=Zt.target.clientWidth+"px",yr.current.style.height=Zt.target.clientHeight+"px",yr.current.style.top=Zt.target.offsetTop+"px",yr.current.style.left=Zt.target.offsetLeft+"px",Rr.current.src=Zt.target.getAttribute("src")):yr.current.style.display="none"};return i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("div",{ref:hn,style:Object(R.a)({},Wt),className:"".concat(ne||""," markdown-body ").concat(Re.a.mdBody),onMouseOver:sr,dangerouslySetInnerHTML:{__html:dn}}),i.a.createElement("div",{ref:yr,className:Re.a.button},i.a.createElement(N.a,null,i.a.createElement(Q.a,{onClick:function(){return an()}},"\u88C1\u526A"),i.a.createElement(Q.a,{onClick:function(){return ln()}},"\u7F16\u8F91"))),i.a.createElement("img",{ref:Rr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),i.a.createElement(Ae.a,{close:!0,data:Hr,hasMask:Ct,type:Hr!=null&&Hr.length?cn:"",style:Object(R.a)({},fr),onClose:function(){return qr("")}}))}},"9VGf":function(qe,ue,k){"use strict";k.d(ue,"a",function(){return O});var J=k("q1tI"),N=k.n(J);function O(Q,R){var B=Object(J.useRef)();Object(J.useEffect)(function(){B.current=Q}),Object(J.useEffect)(function(){function D(){B.current()}if(R!==null){var f=setInterval(D,R);return function(){return clearInterval(f)}}},[R])}},BPZU:function(qe,ue){var k=32,J=7,N=256;function O(i){for(var l=0;i>=k;)l|=i&1,i>>=1;return i+l}function Q(i,l,v,h){var d=l+1;if(d===v)return 1;if(h(i[d++],i[l])<0){for(;d<v&&h(i[d],i[d-1])<0;)d++;R(i,l,d)}else for(;d<v&&h(i[d],i[d-1])>=0;)d++;return d-l}function R(i,l,v){for(v--;l<v;){var h=i[l];i[l++]=i[v],i[v--]=h}}function B(i,l,v,h,d){for(h===l&&h++;h<v;h++){for(var E=i[h],o=l,n=h,s;o<n;)s=o+n>>>1,d(E,i[s])<0?n=s:o=s+1;var u=h-o;switch(u){case 3:i[o+3]=i[o+2];case 2:i[o+2]=i[o+1];case 1:i[o+1]=i[o];break;default:for(;u>0;)i[o+u]=i[o+u-1],u--}i[o]=E}}function D(i,l,v,h,d,E){var o=0,n=0,s=1;if(E(i,l[v+d])>0){for(n=h-d;s<n&&E(i,l[v+d+s])>0;)o=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n),o+=d,s+=d}else{for(n=d+1;s<n&&E(i,l[v+d-s])<=0;)o=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n);var u=o;o=d-s,s=d-u}for(o++;o<s;){var p=o+(s-o>>>1);E(i,l[v+p])>0?o=p+1:s=p}return s}function f(i,l,v,h,d,E){var o=0,n=0,s=1;if(E(i,l[v+d])<0){for(n=d+1;s<n&&E(i,l[v+d-s])<0;)o=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n);var u=o;o=d-s,s=d-u}else{for(n=h-d;s<n&&E(i,l[v+d+s])>=0;)o=s,s=(s<<1)+1,s<=0&&(s=n);s>n&&(s=n),o+=d,s+=d}for(o++;o<s;){var p=o+(s-o>>>1);E(i,l[v+p])<0?s=p:o=p+1}return s}function b(i,l){var v=J,h=0,d=N,E=0,o,n,s=0;h=i.length,h<2*N&&(d=h>>>1);var u=[];E=h<120?5:h<1542?10:h<119151?19:40,o=[],n=[];function p(r,a){o[s]=r,n[s]=a,s+=1}function S(){for(;s>1;){var r=s-2;if(r>=1&&n[r-1]<=n[r]+n[r+1]||r>=2&&n[r-2]<=n[r]+n[r-1])n[r-1]<n[r+1]&&r--;else if(n[r]>n[r+1])break;M(r)}}function x(){for(;s>1;){var r=s-2;r>0&&n[r-1]<n[r+1]&&r--,M(r)}}function M(r){var a=o[r],A=n[r],L=o[r+1],T=n[r+1];n[r]=A+T,r===s-3&&(o[r+1]=o[r+2],n[r+1]=n[r+2]),s--;var w=f(i[L],i,a,A,0,l);if(a+=w,A-=w,A===0)return;if(T=D(i[a+A-1],i,L,T,T-1,l),T===0)return;A<=T?C(a,A,L,T):c(a,A,L,T)}function C(r,a,A,L){var T=0;for(T=0;T<a;T++)u[T]=i[r+T];var w=0,_=A,j=r;if(i[j++]=i[_++],--L===0){for(T=0;T<a;T++)i[j+T]=u[w+T];return}if(a===1){for(T=0;T<L;T++)i[j+T]=i[_+T];i[j+L]=u[w];return}for(var W=v,Z,X,G;;){Z=0,X=0,G=!1;do if(l(i[_],u[w])<0){if(i[j++]=i[_++],X++,Z=0,--L===0){G=!0;break}}else if(i[j++]=u[w++],Z++,X=0,--a===1){G=!0;break}while((Z|X)<W);if(G)break;do{if(Z=f(i[_],u,w,a,0,l),Z!==0){for(T=0;T<Z;T++)i[j+T]=u[w+T];if(j+=Z,w+=Z,a-=Z,a<=1){G=!0;break}}if(i[j++]=i[_++],--L===0){G=!0;break}if(X=D(u[w],i,_,L,0,l),X!==0){for(T=0;T<X;T++)i[j+T]=i[_+T];if(j+=X,_+=X,L-=X,L===0){G=!0;break}}if(i[j++]=u[w++],--a===1){G=!0;break}W--}while(Z>=J||X>=J);if(G)break;W<0&&(W=0),W+=2}if(v=W,v<1&&(v=1),a===1){for(T=0;T<L;T++)i[j+T]=i[_+T];i[j+L]=u[w]}else{if(a===0)throw new Error;for(T=0;T<a;T++)i[j+T]=u[w+T]}}function c(r,a,A,L){var T=0;for(T=0;T<L;T++)u[T]=i[A+T];var w=r+a-1,_=L-1,j=A+L-1,W=0,Z=0;if(i[j--]=i[w--],--a===0){for(W=j-(L-1),T=0;T<L;T++)i[W+T]=u[T];return}if(L===1){for(j-=a,w-=a,Z=j+1,W=w+1,T=a-1;T>=0;T--)i[Z+T]=i[W+T];i[j]=u[_];return}for(var X=v;;){var G=0,te=0,Y=!1;do if(l(u[_],i[w])<0){if(i[j--]=i[w--],G++,te=0,--a===0){Y=!0;break}}else if(i[j--]=u[_--],te++,G=0,--L===1){Y=!0;break}while((G|te)<X);if(Y)break;do{if(G=a-f(u[_],i,r,a,a-1,l),G!==0){for(j-=G,w-=G,a-=G,Z=j+1,W=w+1,T=G-1;T>=0;T--)i[Z+T]=i[W+T];if(a===0){Y=!0;break}}if(i[j--]=u[_--],--L===1){Y=!0;break}if(te=L-D(i[w],u,0,L,L-1,l),te!==0){for(j-=te,_-=te,L-=te,Z=j+1,W=_+1,T=0;T<te;T++)i[Z+T]=u[W+T];if(L<=1){Y=!0;break}}if(i[j--]=i[w--],--a===0){Y=!0;break}X--}while(G>=J||te>=J);if(Y)break;X<0&&(X=0),X+=2}if(v=X,v<1&&(v=1),L===1){for(j-=a,w-=a,Z=j+1,W=w+1,T=a-1;T>=0;T--)i[Z+T]=i[W+T];i[j]=u[_]}else{if(L===0)throw new Error;for(W=j-(L-1),T=0;T<L;T++)i[W+T]=u[T]}}this.mergeRuns=S,this.forceMergeRuns=x,this.pushRun=p}function g(i,l,v,h){v||(v=0),h||(h=i.length);var d=h-v;if(d<2)return;var E=0;if(d<k){E=Q(i,v,h,l),B(i,v,h,v+E,l);return}var o=new b(i,l),n=O(d);do{if(E=Q(i,v,h,l),E<n){var s=d;s>n&&(s=n),B(i,v,v+s,v+E,l),E=s}o.pushRun(v,E),o.mergeRuns(),d-=E,v+=E}while(d!==0);o.forceMergeRuns()}qe.exports=g},BU3w:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return B});var J=k("MNnm"),N="rc-util-key";function O(D){if(D.attachTo)return D.attachTo;var f=document.querySelector("head");return f||document.body}function Q(D){var f,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(J.a)())return null;var g=document.createElement("style");if((f=b.csp)===null||f===void 0?void 0:f.nonce){var i;g.nonce=(i=b.csp)===null||i===void 0?void 0:i.nonce}g.innerHTML=D;var l=O(b),v=l.firstChild;return b.prepend&&l.prepend?l.prepend(g):b.prepend&&v?l.insertBefore(g,v):l.appendChild(g),g}var R=new Map;function B(D,f){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g=O(b);if(!R.has(g)){var i=Q("",b),l=i.parentNode;R.set(g,l),l.removeChild(i)}var v=Array.from(R.get(g).children).find(function(n){return n.tagName==="STYLE"&&n[N]===f});if(v){var h,d;if(((h=b.csp)===null||h===void 0?void 0:h.nonce)&&v.nonce!==((d=b.csp)===null||d===void 0?void 0:d.nonce)){var E;v.nonce=(E=b.csp)===null||E===void 0?void 0:E.nonce}return v.innerHTML!==D&&(v.innerHTML=D),v}var o=Q(D,b);return o[N]=f,o}},Bd2K:function(qe,ue,k){(function(J){J(k("VrN/"),k("osHv"))})(function(J){J.defineOption("autoCloseTags",!1,function(b,g,i){if(i!=J.Init&&i&&b.removeKeyMap("autoCloseTags"),!g)return;var l={name:"autoCloseTags"};(typeof g!="object"||g.whenClosing!==!1)&&(l["'/'"]=function(v){return B(v)}),(typeof g!="object"||g.whenOpening!==!1)&&(l["'>'"]=function(v){return Q(v)}),b.addKeyMap(l)});var N=["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(b){if(b.getOption("disableInput"))return J.Pass;for(var g=b.listSelections(),i=[],l=b.getOption("autoCloseTags"),v=0;v<g.length;v++){if(!g[v].empty())return J.Pass;var h=g[v].head,d=b.getTokenAt(h),E=J.innerMode(b.getMode(),d.state),o=E.state,n=E.mode.xmlCurrentTag&&E.mode.xmlCurrentTag(o),s=n&&n.name;if(!s)return J.Pass;var u=E.mode.configuration=="html",p=typeof l=="object"&&l.dontCloseTags||u&&N,S=typeof l=="object"&&l.indentTags||u&&O;d.end>h.ch&&(s=s.slice(0,s.length-d.end+h.ch));var x=s.toLowerCase();if(!s||d.type=="string"&&(d.end!=h.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||d.string.length==1)||d.type=="tag"&&n.close||d.string.indexOf("/")==h.ch-d.start-1||p&&D(p,x)>-1||f(b,E.mode.xmlCurrentContext&&E.mode.xmlCurrentContext(o)||[],s,h,!0))return J.Pass;var M=typeof l=="object"&&l.emptyTags;if(M&&D(M,s)>-1){i[v]={text:"/>",newPos:J.Pos(h.line,h.ch+2)};continue}var C=S&&D(S,x)>-1;i[v]={indent:C,text:">"+(C?`
|
|
|
|
`:"")+"</"+s+">",newPos:C?J.Pos(h.line+1,0):J.Pos(h.line,h.ch+1)}}for(var c=typeof l=="object"&&l.dontIndentOnAutoClose,v=g.length-1;v>=0;v--){var r=i[v];b.replaceRange(r.text,g[v].head,g[v].anchor,"+insert");var a=b.listSelections().slice(0);a[v]={head:r.newPos,anchor:r.newPos},b.setSelections(a),!c&&r.indent&&(b.indentLine(r.newPos.line,null,!0),b.indentLine(r.newPos.line+1,null,!0))}}function R(b,g){for(var i=b.listSelections(),l=[],v=g?"/":"</",h=b.getOption("autoCloseTags"),d=typeof h=="object"&&h.dontIndentOnSlash,E=0;E<i.length;E++){if(!i[E].empty())return J.Pass;var o=i[E].head,n=b.getTokenAt(o),s=J.innerMode(b.getMode(),n.state),u=s.state;if(g&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=o.ch-1))return J.Pass;var p,S=s.mode.name!="xml"&&b.getMode().name=="htmlmixed";if(S&&s.mode.name=="javascript")p=v+"script";else if(S&&s.mode.name=="css")p=v+"style";else{var x=s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(u);if(!x||x.length&&f(b,x,x[x.length-1],o))return J.Pass;p=v+x[x.length-1]}b.getLine(o.line).charAt(n.end)!=">"&&(p+=">"),l[E]=p}if(b.replaceSelections(l),i=b.listSelections(),!d)for(var E=0;E<i.length;E++)(E==i.length-1||i[E].head.line<i[E+1].head.line)&&b.indentLine(i[E].head.line)}function B(b){return b.getOption("disableInput")?J.Pass:R(b,!0)}J.commands.closeTag=function(b){return R(b)};function D(b,g){if(b.indexOf)return b.indexOf(g);for(var i=0,l=b.length;i<l;++i)if(b[i]==g)return i;return-1}function f(b,g,i,l,v){if(!J.scanForClosingTag)return!1;var h=Math.min(b.lastLine()+1,l.line+500),d=J.scanForClosingTag(b,l,null,h);if(!d||d.tag!=i)return!1;for(var E=v?1:0,o=g.length-1;o>=0&&g[o]==i;o--)++E;l=d.to;for(var o=1;o<E;o++){var n=J.scanForClosingTag(b,l,null,h);if(!n||n.tag!=i)return!1;l=n.to}return!0}})},BjJ7:function(qe,ue,k){"use strict";k.d(ue,"d",function(){return N}),k.d(ue,"c",function(){return O}),k.d(ue,"e",function(){return Q}),k.d(ue,"b",function(){return R}),k.d(ue,"a",function(){return D});var J=k("m3rI");function N(f){var b=!0;if(f.length>0){for(var g=0;g<f.length;g++)if(f[g].compile_success==0||!f[g].compile_success){b=!1;break}}else b=!1;return b}function O(f){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",g=[],i=0;i<f.length;i++){var l=f[i],v=b?"".concat(b,"/").concat(l.name):"".concat(l.name);g.push({title:l.name,isLeaf:!(l.type==="tree"),key:v})}return g}function Q(f,b,g){for(var i=0;i<f.length;i++){var l=f[i];if(l.key===b){l.children=g;break}l.children&&Q(l.children,b,g)}return f}function R(f,b,g){var i;return function(){var l=this,v=arguments,h=function(){i=null,g||f.apply(l,v)},d=g&&!i;clearTimeout(i),i=setTimeout(h,b),d&&f.apply(l,v)}}var B=!0,D=J.a.API_SERVER},BlVb:function(qe,ue,k){var J=k("hyiK"),N=1e-8;function O(R,B){return Math.abs(R-B)<N}function Q(R,B,D){var f=0,b=R[0];if(!b)return!1;for(var g=1;g<R.length;g++){var i=R[g];f+=J(b[0],b[1],i[0],i[1],B,D),b=i}var l=R[0];return(!O(b[0],l[0])||!O(b[1],l[1]))&&(f+=J(b[0],b[1],l[0],l[1],B,D)),f!==0}ue.contain=Q},Bq2U:function(qe,ue,k){var J=k("RDYZ"),N=k("Qe9p"),O=k("bYtY"),Q=O.isArrayLike,R=Array.prototype.slice;function B(p,S){return p[S]}function D(p,S,x){p[S]=x}function f(p,S,x){return(S-p)*x+p}function b(p,S,x){return x>.5?S:p}function g(p,S,x,M,C){var c=p.length;if(C===1)for(var r=0;r<c;r++)M[r]=f(p[r],S[r],x);else for(var a=c&&p[0].length,r=0;r<c;r++)for(var A=0;A<a;A++)M[r][A]=f(p[r][A],S[r][A],x)}function i(p,S,x){var M=p.length,C=S.length;if(M!==C){var c=M>C;if(c)p.length=C;else for(var r=M;r<C;r++)p.push(x===1?S[r]:R.call(S[r]))}for(var a=p[0]&&p[0].length,r=0;r<p.length;r++)if(x===1)isNaN(p[r])&&(p[r]=S[r]);else for(var A=0;A<a;A++)isNaN(p[r][A])&&(p[r][A]=S[r][A])}function l(p,S,x){if(p===S)return!0;var M=p.length;if(M!==S.length)return!1;if(x===1){for(var C=0;C<M;C++)if(p[C]!==S[C])return!1}else for(var c=p[0].length,C=0;C<M;C++)for(var r=0;r<c;r++)if(p[C][r]!==S[C][r])return!1;return!0}function v(p,S,x,M,C,c,r,a,A){var L=p.length;if(A===1)for(var T=0;T<L;T++)a[T]=h(p[T],S[T],x[T],M[T],C,c,r);else for(var w=p[0].length,T=0;T<L;T++)for(var _=0;_<w;_++)a[T][_]=h(p[T][_],S[T][_],x[T][_],M[T][_],C,c,r)}function h(p,S,x,M,C,c,r){var a=(x-p)*.5,A=(M-S)*.5;return(2*(S-x)+a+A)*r+(-3*(S-x)-2*a-A)*c+a*C+S}function d(p){if(Q(p)){var S=p.length;if(Q(p[0])){for(var x=[],M=0;M<S;M++)x.push(R.call(p[M]));return x}return R.call(p)}return p}function E(p){return p[0]=Math.floor(p[0]),p[1]=Math.floor(p[1]),p[2]=Math.floor(p[2]),"rgba("+p.join(",")+")"}function o(p){var S=p[p.length-1].value;return Q(S&&S[0])?2:1}function n(p,S,x,M,C,c){var r=p._getter,a=p._setter,A=S==="spline",L=M.length;if(!L)return;var T=M[0].value,w=Q(T),_=!1,j=!1,W=w?o(M):0,Z;M.sort(function($,re){return $.time-re.time}),Z=M[L-1].time;for(var X=[],G=[],te=M[0].value,Y=!0,le=0;le<L;le++){X.push(M[le].time/Z);var Ae=M[le].value;if(w&&l(Ae,te,W)||!w&&Ae===te||(Y=!1),te=Ae,typeof Ae=="string"){var Be=N.parse(Ae);Be?(Ae=Be,_=!0):j=!0}G.push(Ae)}if(!c&&Y)return;for(var Ce=G[L-1],le=0;le<L-1;le++)w?i(G[le],Ce,W):isNaN(G[le])&&!isNaN(Ce)&&!j&&!_&&(G[le]=Ce);w&&i(r(p._target,C),Ce,W);var Se=0,Fe=0,Ve,De,Le,tt,Et,Ie;if(_)var Qe=[0,0,0,0];var xe=function($,re){var ce;if(re<0)ce=0;else if(re<Fe){for(Ve=Math.min(Se+1,L-1),ce=Ve;ce>=0&&!(X[ce]<=re);ce--);ce=Math.min(ce,L-2)}else{for(ce=Se;ce<L&&!(X[ce]>re);ce++);ce=Math.min(ce-1,L-2)}Se=ce,Fe=re;var be=X[ce+1]-X[ce];if(be===0)return;if(De=(re-X[ce])/be,A)if(tt=G[ce],Le=G[ce===0?ce:ce-1],Et=G[ce>L-2?L-1:ce+1],Ie=G[ce>L-3?L-1:ce+2],w)v(Le,tt,Et,Ie,De,De*De,De*De*De,r($,C),W);else{var Me;if(_)Me=v(Le,tt,Et,Ie,De,De*De,De*De*De,Qe,1),Me=E(Qe);else{if(j)return b(tt,Et,De);Me=h(Le,tt,Et,Ie,De,De*De,De*De*De)}a($,C,Me)}else if(w)g(G[ce],G[ce+1],De,r($,C),W);else{var Me;if(_)g(G[ce],G[ce+1],De,Qe,1),Me=E(Qe);else{if(j)return b(G[ce],G[ce+1],De);Me=f(G[ce],G[ce+1],De)}a($,C,Me)}},ie=new J({target:p._target,life:Z,loop:p._loop,delay:p._delay,onframe:xe,ondestroy:x});return S&&S!=="spline"&&(ie.easing=S),ie}var s=function(p,S,x,M){this._tracks={},this._target=p,this._loop=S||!1,this._getter=x||B,this._setter=M||D,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};s.prototype={when:function(p,S){var x=this._tracks;for(var M in S){if(!S.hasOwnProperty(M))continue;if(!x[M]){x[M]=[];var C=this._getter(this._target,M);if(C==null)continue;p!==0&&x[M].push({time:0,value:d(C)})}x[M].push({time:p,value:S[M]})}return this},during:function(p){return this._onframeList.push(p),this},pause:function(){for(var p=0;p<this._clipList.length;p++)this._clipList[p].pause();this._paused=!0},resume:function(){for(var p=0;p<this._clipList.length;p++)this._clipList[p].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var p=this._doneList,S=p.length,x=0;x<S;x++)p[x].call(this)},start:function(p,S){var x=this,M=0,C=function(){M--,M||x._doneCallback()},c;for(var r in this._tracks){if(!this._tracks.hasOwnProperty(r))continue;var a=n(this,p,C,this._tracks[r],r,S);a&&(this._clipList.push(a),M++,this.animation&&this.animation.addClip(a),c=a)}if(c){var A=c.onframe;c.onframe=function(L,T){A(L,T);for(var w=0;w<x._onframeList.length;w++)x._onframeList[w](L,T)}}return M||this._doneCallback(),this},stop:function(p){for(var S=this._clipList,x=this.animation,M=0;M<S.length;M++){var C=S[M];p&&C.onframe(this._target,1),x&&x.removeClip(C)}S.length=0},delay:function(p){return this._delay=p,this},done:function(p){return p&&this._doneList.push(p),this},getClips:function(){return this._clipList}};var u=s;qe.exports=u},"C+DQ":function(qe,ue,k){},"C/vA":function(qe,ue,k){"use strict";k.d(ue,"a",function(){return J});function J(N){var O=this,Q=!1,R;return function(){return Q||(Q=!0,R=N.apply(O,arguments)),R}}},C0SR:function(qe,ue,k){var J=k("YH21"),N=function(){this._track=[]};N.prototype={constructor:N,recognize:function(D,f,b){return this._doTrack(D,f,b),this._recognize(D)},clear:function(){return this._track.length=0,this},_doTrack:function(D,f,b){var g=D.touches;if(!g)return;for(var i={points:[],touches:[],target:f,event:D},l=0,v=g.length;l<v;l++){var h=g[l],d=J.clientToLocal(b,h,{});i.points.push([d.zrX,d.zrY]),i.touches.push(h)}this._track.push(i)},_recognize:function(D){for(var f in R)if(R.hasOwnProperty(f)){var b=R[f](this._track,D);if(b)return b}}};function O(D){var f=D[1][0]-D[0][0],b=D[1][1]-D[0][1];return Math.sqrt(f*f+b*b)}function Q(D){return[(D[0][0]+D[1][0])/2,(D[0][1]+D[1][1])/2]}var R={pinch:function(D,f){var b=D.length;if(!b)return;var g=(D[b-1]||{}).points,i=(D[b-2]||{}).points||g;if(i&&i.length>1&&g&&g.length>1){var l=O(g)/O(i);!isFinite(l)&&(l=1),f.pinchScale=l;var v=Q(g);return f.pinchX=v[0],f.pinchY=v[1],{type:"pinch",target:D[0].target,event:f}}}},B=N;qe.exports=B},"Cg/j":function(qe,ue,k){"use strict";k.d(ue,"b",function(){return J}),k.d(ue,"a",function(){return N}),k.d(ue,"c",function(){return Q}),k.d(ue,"d",function(){return R});var J;(function(B){B.serviceIds=new Map,B.DI_TARGET="$di$target",B.DI_DEPENDENCIES="$di$dependencies";function D(f){return f[B.DI_DEPENDENCIES]||[]}B.getServiceDependencies=D})(J||(J={}));var N=Q("instantiationService");function O(B,D,f,b){D[J.DI_TARGET]===D?D[J.DI_DEPENDENCIES].push({id:B,index:f,optional:b}):(D[J.DI_DEPENDENCIES]=[{id:B,index:f,optional:b}],D[J.DI_TARGET]=D)}function Q(B){if(J.serviceIds.has(B))return J.serviceIds.get(B);var D=function(f,b,g){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");O(D,f,g,!1)};return D.toString=function(){return B},J.serviceIds.set(B,D),D}function R(B){return function(D,f,b){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");O(B,D,b,!0)}}},DBLp:function(qe,ue){function k(){}k.prototype={diff:function(R,B,D){D||(D=function(s,u){return s===u}),this.equals=D;var f=this;R=R.slice(),B=B.slice();var b=B.length,g=R.length,i=1,l=b+g,v=[{newPos:-1,components:[]}],h=this.extractCommon(v[0],B,R,0);if(v[0].newPos+1>=b&&h+1>=g){for(var d=[],E=0;E<B.length;E++)d.push(E);return[{indices:d,count:B.length}]}function o(){for(var s=-1*i;s<=i;s+=2){var u,p=v[s-1],S=v[s+1],x=(S?S.newPos:0)-s;p&&(v[s-1]=void 0);var M=p&&p.newPos+1<b,C=S&&0<=x&&x<g;if(!M&&!C){v[s]=void 0;continue}if(!M||C&&p.newPos<S.newPos?(u=N(S),f.pushComponent(u.components,void 0,!0)):(u=p,u.newPos++,f.pushComponent(u.components,!0,void 0)),x=f.extractCommon(u,B,R,s),u.newPos+1>=b&&x+1>=g)return J(f,u.components,B,R);v[s]=u}i++}for(;i<=l;){var n=o();if(n)return n}},pushComponent:function(R,B,D){var f=R[R.length-1];f&&f.added===B&&f.removed===D?R[R.length-1]={count:f.count+1,added:B,removed:D}:R.push({count:1,added:B,removed:D})},extractCommon:function(R,B,D,f){for(var b=B.length,g=D.length,i=R.newPos,l=i-f,v=0;i+1<b&&l+1<g&&this.equals(B[i+1],D[l+1]);)i++,l++,v++;return v&&R.components.push({count:v}),R.newPos=i,l},tokenize:function(R){return R.slice()},join:function(R){return R.slice()}};function J(R,B,D,f){for(var b=0,g=B.length,i=0,l=0;b<g;b++){var v=B[b];if(v.removed){for(var h=[],d=l;d<l+v.count;d++)h.push(d);v.indices=h,l+=v.count}else{for(var h=[],d=i;d<i+v.count;d++)h.push(d);v.indices=h,i+=v.count,v.added||(l+=v.count)}}return B}function N(R){return{newPos:R.newPos,components:R.components.slice(0)}}var O=new k;function Q(R,B,D){return O.diff(R,B,D)}qe.exports=Q},DN4a:function(qe,ue,k){var J=k("Fofx"),N=k("QBsz"),O=J.identity,Q=5e-5;function R(l){return l>Q||l<-Q}var B=function(l){l=l||{},l.position||(this.position=[0,0]),l.rotation==null&&(this.rotation=0),l.scale||(this.scale=[1,1]),this.origin=this.origin||null},D=B.prototype;D.transform=null,D.needLocalTransform=function(){return R(this.rotation)||R(this.position[0])||R(this.position[1])||R(this.scale[0]-1)||R(this.scale[1]-1)};var f=[];D.updateTransform=function(){var l=this.parent,v=l&&l.transform,h=this.needLocalTransform(),d=this.transform;if(!(h||v)){d&&O(d);return}d=d||J.create(),h?this.getLocalTransform(d):O(d),v&&(h?J.mul(d,l.transform,d):J.copy(d,l.transform)),this.transform=d;var E=this.globalScaleRatio;if(E!=null&&E!==1){this.getGlobalScale(f);var o=f[0]<0?-1:1,n=f[1]<0?-1:1,s=((f[0]-o)*E+o)/f[0]||0,u=((f[1]-n)*E+n)/f[1]||0;d[0]*=s,d[1]*=s,d[2]*=u,d[3]*=u}this.invTransform=this.invTransform||J.create(),J.invert(this.invTransform,d)},D.getLocalTransform=function(l){return B.getLocalTransform(this,l)},D.setTransform=function(l){var v=this.transform,h=l.dpr||1;v?l.setTransform(h*v[0],h*v[1],h*v[2],h*v[3],h*v[4],h*v[5]):l.setTransform(h,0,0,h,0,0)},D.restoreTransform=function(l){var v=l.dpr||1;l.setTransform(v,0,0,v,0,0)};var b=[],g=J.create();D.setLocalTransform=function(l){if(!l)return;var v=l[0]*l[0]+l[1]*l[1],h=l[2]*l[2]+l[3]*l[3],d=this.position,E=this.scale;R(v-1)&&(v=Math.sqrt(v)),R(h-1)&&(h=Math.sqrt(h)),l[0]<0&&(v=-v),l[3]<0&&(h=-h),d[0]=l[4],d[1]=l[5],E[0]=v,E[1]=h,this.rotation=Math.atan2(-l[1]/h,l[0]/v)},D.decomposeTransform=function(){if(!this.transform)return;var l=this.parent,v=this.transform;l&&l.transform&&(J.mul(b,l.invTransform,v),v=b);var h=this.origin;h&&(h[0]||h[1])&&(g[4]=h[0],g[5]=h[1],J.mul(b,v,g),b[4]-=h[0],b[5]-=h[1],v=b),this.setLocalTransform(v)},D.getGlobalScale=function(l){var v=this.transform;return l=l||[],v?(l[0]=Math.sqrt(v[0]*v[0]+v[1]*v[1]),l[1]=Math.sqrt(v[2]*v[2]+v[3]*v[3]),v[0]<0&&(l[0]=-l[0]),v[3]<0&&(l[1]=-l[1]),l):(l[0]=1,l[1]=1,l)},D.transformCoordToLocal=function(l,v){var h=[l,v],d=this.invTransform;return d&&N.applyTransform(h,h,d),h},D.transformCoordToGlobal=function(l,v){var h=[l,v],d=this.transform;return d&&N.applyTransform(h,h,d),h},B.getLocalTransform=function(l,v){v=v||[],O(v);var h=l.origin,d=l.scale||[1,1],E=l.rotation||0,o=l.position||[0,0];return h&&(v[4]-=h[0],v[5]-=h[1]),J.scale(v,v,d),E&&J.rotate(v,v,E),h&&(v[4]+=h[0],v[5]+=h[1]),v[4]+=o[0],v[5]+=o[1],v};var i=B;qe.exports=i},Dagg:function(qe,ue,k){var J=k("Gev7"),N=k("mFDi"),O=k("bYtY"),Q=k("Xnb7");function R(D){J.call(this,D)}R.prototype={constructor:R,type:"image",brush:function(D,f){var b=this.style,g=b.image;b.bind(D,this,f);var i=this._image=Q.createOrUpdateImage(g,this._image,this,this.onload);if(!i||!Q.isImageReady(i))return;var l=b.x||0,v=b.y||0,h=b.width,d=b.height,E=i.width/i.height;if(h==null&&d!=null?h=d*E:d==null&&h!=null?d=h/E:h==null&&d==null&&(h=i.width,d=i.height),this.setTransform(D),b.sWidth&&b.sHeight){var o=b.sx||0,n=b.sy||0;D.drawImage(i,o,n,b.sWidth,b.sHeight,l,v,h,d)}else if(b.sx&&b.sy){var o=b.sx,n=b.sy,s=h-o,u=d-n;D.drawImage(i,o,n,s,u,l,v,h,d)}else D.drawImage(i,l,v,h,d);b.text!=null&&(this.restoreTransform(D),this.drawRectText(D,this.getBoundingRect()))},getBoundingRect:function(){var D=this.style;return this._rect||(this._rect=new N(D.x||0,D.y||0,D.width||0,D.height||0)),this._rect}},O.inherits(R,J);var B=R;qe.exports=B},DlQD:function(qe,ue,k){(function(J,N){qe.exports=N()})(this,function(){"use strict";function J(je,_e){for(var Ue=0;Ue<_e.length;Ue++){var me=_e[Ue];me.enumerable=me.enumerable||!1,me.configurable=!0,"value"in me&&(me.writable=!0),Object.defineProperty(je,me.key,me)}}function N(je,_e,Ue){return _e&&J(je.prototype,_e),Ue&&J(je,Ue),je}function O(je,_e){if(!je)return;if(typeof je=="string")return Q(je,_e);var Ue=Object.prototype.toString.call(je).slice(8,-1);if(Ue==="Object"&&je.constructor&&(Ue=je.constructor.name),Ue==="Map"||Ue==="Set")return Array.from(je);if(Ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ue))return Q(je,_e)}function Q(je,_e){(_e==null||_e>je.length)&&(_e=je.length);for(var Ue=0,me=new Array(_e);Ue<_e;Ue++)me[Ue]=je[Ue];return me}function R(je,_e){var Ue;if(typeof Symbol=="undefined"||je[Symbol.iterator]==null){if(Array.isArray(je)||(Ue=O(je))||_e&&je&&typeof je.length=="number"){Ue&&(je=Ue);var me=0;return function(){return me>=je.length?{done:!0}:{done:!1,value:je[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 Ue=je[Symbol.iterator](),Ue.next.bind(Ue)}function B(je,_e){return _e={exports:{}},je(_e,_e.exports),_e.exports}var D=B(function(je){function _e(){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 Ue(me){je.exports.defaults=me}je.exports={defaults:_e(),getDefaults:_e,changeDefaults:Ue}}),f=D.defaults,b=D.getDefaults,g=D.changeDefaults,i=/[&<>"']/,l=/[&<>"']/g,v=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,d={"&":"&","<":"<",">":">",'"':""","'":"'"},E=function(_e){return d[_e]};function o(je,_e){if(_e){if(i.test(je))return je.replace(l,E)}else if(v.test(je))return je.replace(h,E);return je}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(je){return je.replace(n,function(_e,Ue){return Ue=Ue.toLowerCase(),Ue==="colon"?":":Ue.charAt(0)==="#"?Ue.charAt(1)==="x"?String.fromCharCode(parseInt(Ue.substring(2),16)):String.fromCharCode(+Ue.substring(1)):""})}var u=/(^|[^\[])\^/g;function p(je,_e){je=je.source||je,_e=_e||"";var Ue={replace:function(ve,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(u,"$1"),je=je.replace(ve,Ee),Ue},getRegex:function(){return new RegExp(je,_e)}};return Ue}var S=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function M(je,_e,Ue){if(je){var me;try{me=decodeURIComponent(s(Ue)).replace(S,"").toLowerCase()}catch(ve){return null}if(me.indexOf("javascript:")===0||me.indexOf("vbscript:")===0||me.indexOf("data:")===0)return null}_e&&!x.test(Ue)&&(Ue=A(_e,Ue));try{Ue=encodeURI(Ue).replace(/%25/g,"%")}catch(ve){return null}return Ue}var C={},c=/^[^:]+:\/*[^/]*$/,r=/^([^:]+:)[\s\S]*$/,a=/^([^:]+:\/*[^/]*)[\s\S]*$/;function A(je,_e){C[" "+je]||(c.test(je)?C[" "+je]=je+"/":C[" "+je]=_(je,"/",!0)),je=C[" "+je];var Ue=je.indexOf(":")===-1;return _e.substring(0,2)==="//"?Ue?_e:je.replace(r,"$1")+_e:_e.charAt(0)==="/"?Ue?_e:je.replace(a,"$1")+_e:je+_e}var L={exec:function(){}};function T(je){for(var _e=1,Ue,me;_e<arguments.length;_e++){Ue=arguments[_e];for(me in Ue)Object.prototype.hasOwnProperty.call(Ue,me)&&(je[me]=Ue[me])}return je}function w(je,_e){var Ue=je.replace(/\|/g,function(Ee,Oe,Ye){for(var ze=!1,gt=Oe;--gt>=0&&Ye[gt]==="\\";)ze=!ze;return ze?"|":" |"}),me=Ue.split(/ \|/),ve=0;if(me.length>_e)me.splice(_e);else for(;me.length<_e;)me.push("");for(;ve<me.length;ve++)me[ve]=me[ve].trim().replace(/\\\|/g,"|");return me}function _(je,_e,Ue){var me=je.length;if(me===0)return"";for(var ve=0;ve<me;){var Ee=je.charAt(me-ve-1);if(Ee===_e&&!Ue)ve++;else if(Ee!==_e&&Ue)ve++;else break}return je.substr(0,me-ve)}function j(je,_e){if(je.indexOf(_e[1])===-1)return-1;for(var Ue=je.length,me=0,ve=0;ve<Ue;ve++)if(je[ve]==="\\")ve++;else if(je[ve]===_e[0])me++;else if(je[ve]===_e[1]&&(me--,me<0))return ve;return-1}function W(je){je&&je.sanitize&&!je.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 Z={escape:o,unescape:s,edit:p,cleanUrl:M,resolveUrl:A,noopTest:L,merge:T,splitCells:w,rtrim:_,findClosingBracket:j,checkSanitizeDeprecation:W},X=D.defaults,G=Z.rtrim,te=Z.splitCells,Y=Z.escape,le=Z.findClosingBracket;function Ae(je,_e,Ue){var me=_e.href,ve=_e.title?Y(_e.title):null,Ee=je[1].replace(/\\([\[\]])/g,"$1");return je[0].charAt(0)!=="!"?{type:"link",raw:Ue,href:me,title:ve,text:Ee}:{type:"image",raw:Ue,href:me,title:ve,text:Y(Ee)}}function Be(je,_e){var Ue=je.match(/^(\s+)(?:```)/);if(Ue===null)return _e;var me=Ue[1];return _e.split(`
|
|
`).map(function(ve){var Ee=ve.match(/^\s+/);if(Ee===null)return ve;var Oe=Ee[0];return Oe.length>=me.length?ve.slice(me.length):ve}).join(`
|
|
`)}var Ce=function(){function je(Ue){this.options=Ue||X}var _e=je.prototype;return _e.space=function(me){var ve=this.rules.block.newline.exec(me);if(ve)return ve[0].length>1?{type:"space",raw:ve[0]}:{raw:`
|
|
`}},_e.code=function(me,ve){var Ee=this.rules.block.code.exec(me);if(Ee){var Oe=ve[ve.length-1];if(Oe&&Oe.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var Ye=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?Ye:G(Ye,`
|
|
`)}}},_e.fences=function(me){var ve=this.rules.block.fences.exec(me);if(ve){var Ee=ve[0],Oe=Be(Ee,ve[3]||"");return{type:"code",raw:Ee,lang:ve[2]?ve[2].trim():ve[2],text:Oe}}},_e.heading=function(me){var ve=this.rules.block.heading.exec(me);if(ve)return{type:"heading",raw:ve[0],depth:ve[1].length,text:ve[2]}},_e.nptable=function(me){var ve=this.rules.block.nptable.exec(me);if(ve){var Ee={type:"table",header:te(ve[1].replace(/^ *| *\| *$/g,"")),align:ve[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ve[3]?ve[3].replace(/\n$/,"").split(`
|
|
`):[],raw:ve[0]};if(Ee.header.length===Ee.align.length){var Oe=Ee.align.length,Ye;for(Ye=0;Ye<Oe;Ye++)/^ *-+: *$/.test(Ee.align[Ye])?Ee.align[Ye]="right":/^ *:-+: *$/.test(Ee.align[Ye])?Ee.align[Ye]="center":/^ *:-+ *$/.test(Ee.align[Ye])?Ee.align[Ye]="left":Ee.align[Ye]=null;for(Oe=Ee.cells.length,Ye=0;Ye<Oe;Ye++)Ee.cells[Ye]=te(Ee.cells[Ye],Ee.header.length);return Ee}}},_e.hr=function(me){var ve=this.rules.block.hr.exec(me);if(ve)return{type:"hr",raw:ve[0]}},_e.blockquote=function(me){var ve=this.rules.block.blockquote.exec(me);if(ve){var Ee=ve[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ve[0],text:Ee}}},_e.list=function(me){var ve=this.rules.block.list.exec(me);if(ve){for(var Ee=ve[0],Oe=ve[2],Ye=Oe.length>1,ze=Oe[Oe.length-1]===")",gt={type:"list",raw:Ee,ordered:Ye,start:Ye?+Oe.slice(0,-1):"",loose:!1,items:[]},Lt=ve[0].match(this.rules.block.item),Pt=!1,Rt,Dt,dt,it,nt,we,Ne,ht=Lt.length,ot=0;ot<ht;ot++)Rt=Lt[ot],Ee=Rt,Dt=Rt.length,Rt=Rt.replace(/^ *([*+-]|\d+[.)]) */,""),~Rt.indexOf(`
|
|
`)&&(Dt-=Rt.length,Rt=this.options.pedantic?Rt.replace(/^ {1,4}/gm,""):Rt.replace(new RegExp("^ {1,"+Dt+"}","gm"),"")),ot!==ht-1&&(dt=this.rules.block.bullet.exec(Lt[ot+1])[0],(Ye?dt.length===1||!ze&&dt[dt.length-1]===")":dt.length>1||this.options.smartLists&&dt!==Oe)&&(it=Lt.slice(ot+1).join(`
|
|
`),gt.raw=gt.raw.substring(0,gt.raw.length-it.length),ot=ht-1)),nt=Pt||/\n\n(?!\s*$)/.test(Rt),ot!==ht-1&&(Pt=Rt.charAt(Rt.length-1)===`
|
|
`,nt||(nt=Pt)),nt&&(gt.loose=!0),we=/^\[[ xX]\] /.test(Rt),Ne=void 0,we&&(Ne=Rt[1]!==" ",Rt=Rt.replace(/^\[[ xX]\] +/,"")),gt.items.push({type:"list_item",raw:Ee,task:we,checked:Ne,loose:nt,text:Rt});return gt}},_e.html=function(me){var ve=this.rules.block.html.exec(me);if(ve)return{type:this.options.sanitize?"paragraph":"html",raw:ve[0],pre:!this.options.sanitizer&&(ve[1]==="pre"||ve[1]==="script"||ve[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):Y(ve[0]):ve[0]}},_e.def=function(me){var ve=this.rules.block.def.exec(me);if(ve){ve[3]&&(ve[3]=ve[3].substring(1,ve[3].length-1));var Ee=ve[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:ve[0],href:ve[2],title:ve[3]}}},_e.table=function(me){var ve=this.rules.block.table.exec(me);if(ve){var Ee={type:"table",header:te(ve[1].replace(/^ *| *\| *$/g,"")),align:ve[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ve[3]?ve[3].replace(/\n$/,"").split(`
|
|
`):[]};if(Ee.header.length===Ee.align.length){Ee.raw=ve[0];var Oe=Ee.align.length,Ye;for(Ye=0;Ye<Oe;Ye++)/^ *-+: *$/.test(Ee.align[Ye])?Ee.align[Ye]="right":/^ *:-+: *$/.test(Ee.align[Ye])?Ee.align[Ye]="center":/^ *:-+ *$/.test(Ee.align[Ye])?Ee.align[Ye]="left":Ee.align[Ye]=null;for(Oe=Ee.cells.length,Ye=0;Ye<Oe;Ye++)Ee.cells[Ye]=te(Ee.cells[Ye].replace(/^ *\| *| *\| *$/g,""),Ee.header.length);return Ee}}},_e.lheading=function(me){var ve=this.rules.block.lheading.exec(me);if(ve)return{type:"heading",raw:ve[0],depth:ve[2].charAt(0)==="="?1:2,text:ve[1]}},_e.paragraph=function(me){var ve=this.rules.block.paragraph.exec(me);if(ve)return{type:"paragraph",raw:ve[0],text:ve[1].charAt(ve[1].length-1)===`
|
|
`?ve[1].slice(0,-1):ve[1]}},_e.text=function(me,ve){var Ee=this.rules.block.text.exec(me);if(Ee){var Oe=ve[ve.length-1];return Oe&&Oe.type==="text"?{raw:Ee[0],text:Ee[0]}:{type:"text",raw:Ee[0],text:Ee[0]}}},_e.escape=function(me){var ve=this.rules.inline.escape.exec(me);if(ve)return{type:"escape",raw:ve[0],text:Y(ve[1])}},_e.tag=function(me,ve,Ee){var Oe=this.rules.inline.tag.exec(me);if(Oe)return!ve&&/^<a /i.test(Oe[0])?ve=!0:ve&&/^<\/a>/i.test(Oe[0])&&(ve=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(Oe[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Oe[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:Oe[0],inLink:ve,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):Y(Oe[0]):Oe[0]}},_e.link=function(me){var ve=this.rules.inline.link.exec(me);if(ve){var Ee=le(ve[2],"()");if(Ee>-1){var Oe=ve[0].indexOf("!")===0?5:4,Ye=Oe+ve[1].length+Ee;ve[2]=ve[2].substring(0,Ee),ve[0]=ve[0].substring(0,Ye).trim(),ve[3]=""}var ze=ve[2],gt="";if(this.options.pedantic){var Lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ze);Lt?(ze=Lt[1],gt=Lt[3]):gt=""}else gt=ve[3]?ve[3].slice(1,-1):"";ze=ze.trim().replace(/^<([\s\S]*)>$/,"$1");var Pt=Ae(ve,{href:ze&&ze.replace(this.rules.inline._escapes,"$1"),title:gt&>.replace(this.rules.inline._escapes,"$1")},ve[0]);return Pt}},_e.reflink=function(me,ve){var Ee;if((Ee=this.rules.inline.reflink.exec(me))||(Ee=this.rules.inline.nolink.exec(me))){var Oe=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(Oe=ve[Oe.toLowerCase()],!Oe||!Oe.href){var Ye=Ee[0].charAt(0);return{type:"text",raw:Ye,text:Ye}}var ze=Ae(Ee,Oe,Ee[0]);return ze}},_e.strong=function(me,ve,Ee){Ee===void 0&&(Ee="");var Oe=this.rules.inline.strong.start.exec(me);if(Oe&&(!Oe[1]||Oe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ve=ve.slice(-1*me.length);var Ye=Oe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ye.lastIndex=0;for(var ze;(Oe=Ye.exec(ve))!=null;)if(ze=this.rules.inline.strong.middle.exec(ve.slice(0,Oe.index+3)),ze)return{type:"strong",raw:me.slice(0,ze[0].length),text:me.slice(2,ze[0].length-2)}}},_e.em=function(me,ve,Ee){Ee===void 0&&(Ee="");var Oe=this.rules.inline.em.start.exec(me);if(Oe&&(!Oe[1]||Oe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ve=ve.slice(-1*me.length);var Ye=Oe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ye.lastIndex=0;for(var ze;(Oe=Ye.exec(ve))!=null;)if(ze=this.rules.inline.em.middle.exec(ve.slice(0,Oe.index+2)),ze)return{type:"em",raw:me.slice(0,ze[0].length),text:me.slice(1,ze[0].length-1)}}},_e.codespan=function(me){var ve=this.rules.inline.code.exec(me);if(ve){var Ee=ve[2].replace(/\n/g," "),Oe=/[^ ]/.test(Ee),Ye=Ee.startsWith(" ")&&Ee.endsWith(" ");return Oe&&Ye&&(Ee=Ee.substring(1,Ee.length-1)),Ee=Y(Ee,!0),{type:"codespan",raw:ve[0],text:Ee}}},_e.br=function(me){var ve=this.rules.inline.br.exec(me);if(ve)return{type:"br",raw:ve[0]}},_e.del=function(me){var ve=this.rules.inline.del.exec(me);if(ve)return{type:"del",raw:ve[0],text:ve[1]}},_e.autolink=function(me,ve){var Ee=this.rules.inline.autolink.exec(me);if(Ee){var Oe,Ye;return Ee[2]==="@"?(Oe=Y(this.options.mangle?ve(Ee[1]):Ee[1]),Ye="mailto:"+Oe):(Oe=Y(Ee[1]),Ye=Oe),{type:"link",raw:Ee[0],text:Oe,href:Ye,tokens:[{type:"text",raw:Oe,text:Oe}]}}},_e.url=function(me,ve){var Ee;if(Ee=this.rules.inline.url.exec(me)){var Oe,Ye;if(Ee[2]==="@")Oe=Y(this.options.mangle?ve(Ee[0]):Ee[0]),Ye="mailto:"+Oe;else{var ze;do ze=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(ze!==Ee[0]);Oe=Y(Ee[0]),Ee[1]==="www."?Ye="http://"+Oe:Ye=Oe}return{type:"link",raw:Ee[0],text:Oe,href:Ye,tokens:[{type:"text",raw:Oe,text:Oe}]}}},_e.inlineText=function(me,ve,Ee){var Oe=this.rules.inline.text.exec(me);if(Oe){var Ye;return ve?Ye=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):Y(Oe[0]):Oe[0]:Ye=Y(this.options.smartypants?Ee(Oe[0]):Oe[0]),{type:"text",raw:Oe[0],text:Ye}}},je}(),Se=Z.noopTest,Fe=Z.edit,Ve=Z.merge,De={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:Se,table:Se,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};De._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,De._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,De.def=Fe(De.def).replace("label",De._label).replace("title",De._title).getRegex(),De.bullet=/(?:[*+-]|\d{1,9}[.)])/,De.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,De.item=Fe(De.item,"gm").replace(/bull/g,De.bullet).getRegex(),De.list=Fe(De.list).replace(/bull/g,De.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+De.def.source+")").getRegex(),De._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",De._comment=/<!--(?!-?>)[\s\S]*?-->/,De.html=Fe(De.html,"i").replace("comment",De._comment).replace("tag",De._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),De.paragraph=Fe(De._paragraph).replace("hr",De.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",De._tag).getRegex(),De.blockquote=Fe(De.blockquote).replace("paragraph",De.paragraph).getRegex(),De.normal=Ve({},De),De.gfm=Ve({},De.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*|$)"}),De.gfm.nptable=Fe(De.gfm.nptable).replace("hr",De.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",De._tag).getRegex(),De.gfm.table=Fe(De.gfm.table).replace("hr",De.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",De._tag).getRegex(),De.pedantic=Ve({},De.normal,{html:Fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",De._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:Se,paragraph:Fe(De.normal._paragraph).replace("hr",De.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",De.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Le={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Se,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:Se,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Le._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Le.punctuation=Fe(Le.punctuation).replace(/punctuation/g,Le._punctuation).getRegex(),Le._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Le._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Le.em.start=Fe(Le.em.start).replace(/punctuation/g,Le._punctuation).getRegex(),Le.em.middle=Fe(Le.em.middle).replace(/punctuation/g,Le._punctuation).replace(/overlapSkip/g,Le._overlapSkip).getRegex(),Le.em.endAst=Fe(Le.em.endAst,"g").replace(/punctuation/g,Le._punctuation).getRegex(),Le.em.endUnd=Fe(Le.em.endUnd,"g").replace(/punctuation/g,Le._punctuation).getRegex(),Le.strong.start=Fe(Le.strong.start).replace(/punctuation/g,Le._punctuation).getRegex(),Le.strong.middle=Fe(Le.strong.middle).replace(/punctuation/g,Le._punctuation).replace(/blockSkip/g,Le._blockSkip).getRegex(),Le.strong.endAst=Fe(Le.strong.endAst,"g").replace(/punctuation/g,Le._punctuation).getRegex(),Le.strong.endUnd=Fe(Le.strong.endUnd,"g").replace(/punctuation/g,Le._punctuation).getRegex(),Le.blockSkip=Fe(Le._blockSkip,"g").getRegex(),Le.overlapSkip=Fe(Le._overlapSkip,"g").getRegex(),Le._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Le._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Le._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])?)+(?![-_])/,Le.autolink=Fe(Le.autolink).replace("scheme",Le._scheme).replace("email",Le._email).getRegex(),Le._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Le.tag=Fe(Le.tag).replace("comment",De._comment).replace("attribute",Le._attribute).getRegex(),Le._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Le._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Le._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Le.link=Fe(Le.link).replace("label",Le._label).replace("href",Le._href).replace("title",Le._title).getRegex(),Le.reflink=Fe(Le.reflink).replace("label",Le._label).getRegex(),Le.reflinkSearch=Fe(Le.reflinkSearch,"g").replace("reflink",Le.reflink).replace("nolink",Le.nolink).getRegex(),Le.normal=Ve({},Le),Le.pedantic=Ve({},Le.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:Fe(/^!?\[(label)\]\((.*?)\)/).replace("label",Le._label).getRegex(),reflink:Fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Le._label).getRegex()}),Le.gfm=Ve({},Le.normal,{escape:Fe(Le.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),Le.gfm.url=Fe(Le.gfm.url,"i").replace("email",Le.gfm._extended_email).getRegex(),Le.breaks=Ve({},Le.gfm,{br:Fe(Le.br).replace("{2,}","*").getRegex(),text:Fe(Le.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var tt={block:De,inline:Le},Et=D.defaults,Ie=tt.block,Qe=tt.inline;function xe(je){return je.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 ie(je){var _e="",Ue,me,ve=je.length;for(Ue=0;Ue<ve;Ue++)me=je.charCodeAt(Ue),Math.random()>.5&&(me="x"+me.toString(16)),_e+="&#"+me+";";return _e}var $=function(){function je(Ue){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ue||Et,this.options.tokenizer=this.options.tokenizer||new Ce,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var me={block:Ie.normal,inline:Qe.normal};this.options.pedantic?(me.block=Ie.pedantic,me.inline=Qe.pedantic):this.options.gfm&&(me.block=Ie.gfm,this.options.breaks?me.inline=Qe.breaks:me.inline=Qe.gfm),this.tokenizer.rules=me}je.lex=function(me,ve){var Ee=new je(ve);return Ee.lex(me)};var _e=je.prototype;return _e.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},_e.blockTokens=function(me,ve,Ee){ve===void 0&&(ve=[]),Ee===void 0&&(Ee=!0),me=me.replace(/^ +$/gm,"");for(var Oe,Ye,ze,gt;me;){if(Oe=this.tokenizer.space(me)){me=me.substring(Oe.raw.length),Oe.type&&ve.push(Oe);continue}if(Oe=this.tokenizer.code(me,ve)){me=me.substring(Oe.raw.length),Oe.type?ve.push(Oe):(gt=ve[ve.length-1],gt.raw+=`
|
|
`+Oe.raw,gt.text+=`
|
|
`+Oe.text);continue}if(Oe=this.tokenizer.fences(me)){me=me.substring(Oe.raw.length),ve.push(Oe);continue}if(Oe=this.tokenizer.heading(me)){me=me.substring(Oe.raw.length),ve.push(Oe);continue}if(Oe=this.tokenizer.nptable(me)){me=me.substring(Oe.raw.length),ve.push(Oe);continue}if(Oe=this.tokenizer.hr(me)){me=me.substring(Oe.raw.length),ve.push(Oe);continue}if(Oe=this.tokenizer.blockquote(me)){me=me.substring(Oe.raw.length),Oe.tokens=this.blockTokens(Oe.text,[],Ee),ve.push(Oe);continue}if(Oe=this.tokenizer.list(me)){for(me=me.substring(Oe.raw.length),ze=Oe.items.length,Ye=0;Ye<ze;Ye++)Oe.items[Ye].tokens=this.blockTokens(Oe.items[Ye].text,[],!1);ve.push(Oe);continue}if(Oe=this.tokenizer.html(me)){me=me.substring(Oe.raw.length),ve.push(Oe);continue}if(Ee&&(Oe=this.tokenizer.def(me))){me=me.substring(Oe.raw.length),this.tokens.links[Oe.tag]||(this.tokens.links[Oe.tag]={href:Oe.href,title:Oe.title});continue}if(Oe=this.tokenizer.table(me)){me=me.substring(Oe.raw.length),ve.push(Oe);continue}if(Oe=this.tokenizer.lheading(me)){me=me.substring(Oe.raw.length),ve.push(Oe);continue}if(Ee&&(Oe=this.tokenizer.paragraph(me))){me=me.substring(Oe.raw.length),ve.push(Oe);continue}if(Oe=this.tokenizer.text(me,ve)){me=me.substring(Oe.raw.length),Oe.type?ve.push(Oe):(gt=ve[ve.length-1],gt.raw+=`
|
|
`+Oe.raw,gt.text+=`
|
|
`+Oe.text);continue}if(me){var Lt="Infinite loop on byte: "+me.charCodeAt(0);if(this.options.silent){console.error(Lt);break}else throw new Error(Lt)}}return ve},_e.inline=function(me){var ve,Ee,Oe,Ye,ze,gt,Lt=me.length;for(ve=0;ve<Lt;ve++){gt=me[ve];switch(gt.type){case"paragraph":case"text":case"heading":{gt.tokens=[],this.inlineTokens(gt.text,gt.tokens);break}case"table":{for(gt.tokens={header:[],cells:[]},Ye=gt.header.length,Ee=0;Ee<Ye;Ee++)gt.tokens.header[Ee]=[],this.inlineTokens(gt.header[Ee],gt.tokens.header[Ee]);for(Ye=gt.cells.length,Ee=0;Ee<Ye;Ee++)for(ze=gt.cells[Ee],gt.tokens.cells[Ee]=[],Oe=0;Oe<ze.length;Oe++)gt.tokens.cells[Ee][Oe]=[],this.inlineTokens(ze[Oe],gt.tokens.cells[Ee][Oe]);break}case"blockquote":{this.inline(gt.tokens);break}case"list":{for(Ye=gt.items.length,Ee=0;Ee<Ye;Ee++)this.inline(gt.items[Ee].tokens);break}}}return me},_e.inlineTokens=function(me,ve,Ee,Oe,Ye){ve===void 0&&(ve=[]),Ee===void 0&&(Ee=!1),Oe===void 0&&(Oe=!1),Ye===void 0&&(Ye="");var ze,gt=me,Lt;if(this.tokens.links){var Pt=Object.keys(this.tokens.links);if(Pt.length>0)for(;(Lt=this.tokenizer.rules.inline.reflinkSearch.exec(gt))!=null;)Pt.includes(Lt[0].slice(Lt[0].lastIndexOf("[")+1,-1))&&(gt=gt.slice(0,Lt.index)+"["+"a".repeat(Lt[0].length-2)+"]"+gt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Lt=this.tokenizer.rules.inline.blockSkip.exec(gt))!=null;)gt=gt.slice(0,Lt.index)+"["+"a".repeat(Lt[0].length-2)+"]"+gt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;me;){if(ze=this.tokenizer.escape(me)){me=me.substring(ze.raw.length),ve.push(ze);continue}if(ze=this.tokenizer.tag(me,Ee,Oe)){me=me.substring(ze.raw.length),Ee=ze.inLink,Oe=ze.inRawBlock,ve.push(ze);continue}if(ze=this.tokenizer.link(me)){me=me.substring(ze.raw.length),ze.type==="link"&&(ze.tokens=this.inlineTokens(ze.text,[],!0,Oe)),ve.push(ze);continue}if(ze=this.tokenizer.reflink(me,this.tokens.links)){me=me.substring(ze.raw.length),ze.type==="link"&&(ze.tokens=this.inlineTokens(ze.text,[],!0,Oe)),ve.push(ze);continue}if(ze=this.tokenizer.strong(me,gt,Ye)){me=me.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],Ee,Oe),ve.push(ze);continue}if(ze=this.tokenizer.em(me,gt,Ye)){me=me.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],Ee,Oe),ve.push(ze);continue}if(ze=this.tokenizer.codespan(me)){me=me.substring(ze.raw.length),ve.push(ze);continue}if(ze=this.tokenizer.br(me)){me=me.substring(ze.raw.length),ve.push(ze);continue}if(ze=this.tokenizer.del(me)){me=me.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],Ee,Oe),ve.push(ze);continue}if(ze=this.tokenizer.autolink(me,ie)){me=me.substring(ze.raw.length),ve.push(ze);continue}if(!Ee&&(ze=this.tokenizer.url(me,ie))){me=me.substring(ze.raw.length),ve.push(ze);continue}if(ze=this.tokenizer.inlineText(me,Oe,xe)){me=me.substring(ze.raw.length),Ye=ze.raw.slice(-1),ve.push(ze);continue}if(me){var Rt="Infinite loop on byte: "+me.charCodeAt(0);if(this.options.silent){console.error(Rt);break}else throw new Error(Rt)}}return ve},N(je,null,[{key:"rules",get:function(){return{block:Ie,inline:Qe}}}]),je}(),re=D.defaults,ce=Z.cleanUrl,be=Z.escape,Me=function(){function je(Ue){this.options=Ue||re}var _e=je.prototype;return _e.code=function(me,ve,Ee){var Oe=(ve||"").match(/\S*/)[0];if(this.options.highlight){var Ye=this.options.highlight(me,Oe);Ye!=null&&Ye!==me&&(Ee=!0,me=Ye)}return Oe?'<pre><code class="'+this.options.langPrefix+be(Oe,!0)+'">'+(Ee?me:be(me,!0))+`</code></pre>
|
|
`:"<pre><code>"+(Ee?me:be(me,!0))+`</code></pre>
|
|
`},_e.blockquote=function(me){return`<blockquote>
|
|
`+me+`</blockquote>
|
|
`},_e.html=function(me){return me},_e.heading=function(me,ve,Ee,Oe){return this.options.headerIds?"<h"+ve+' id="'+this.options.headerPrefix+Oe.slug(Ee)+'">'+me+"</h"+ve+`>
|
|
`:"<h"+ve+">"+me+"</h"+ve+`>
|
|
`},_e.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},_e.list=function(me,ve,Ee){var Oe=ve?"ol":"ul",Ye=ve&&Ee!==1?' start="'+Ee+'"':"";return"<"+Oe+Ye+`>
|
|
`+me+"</"+Oe+`>
|
|
`},_e.listitem=function(me){return"<li>"+me+`</li>
|
|
`},_e.checkbox=function(me){return"<input "+(me?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},_e.paragraph=function(me){return"<p>"+me+`</p>
|
|
`},_e.table=function(me,ve){return ve&&(ve="<tbody>"+ve+"</tbody>"),`<table>
|
|
<thead>
|
|
`+me+`</thead>
|
|
`+ve+`</table>
|
|
`},_e.tablerow=function(me){return`<tr>
|
|
`+me+`</tr>
|
|
`},_e.tablecell=function(me,ve){var Ee=ve.header?"th":"td",Oe=ve.align?"<"+Ee+' align="'+ve.align+'">':"<"+Ee+">";return Oe+me+"</"+Ee+`>
|
|
`},_e.strong=function(me){return"<strong>"+me+"</strong>"},_e.em=function(me){return"<em>"+me+"</em>"},_e.codespan=function(me){return"<code>"+me+"</code>"},_e.br=function(){return this.options.xhtml?"<br/>":"<br>"},_e.del=function(me){return"<del>"+me+"</del>"},_e.link=function(me,ve,Ee){if(me=ce(this.options.sanitize,this.options.baseUrl,me),me===null)return Ee;var Oe='<a href="'+be(me)+'"';return ve&&(Oe+=' title="'+ve+'"'),Oe+=">"+Ee+"</a>",Oe},_e.image=function(me,ve,Ee){if(me=ce(this.options.sanitize,this.options.baseUrl,me),me===null)return Ee;var Oe='<img src="'+me+'" alt="'+Ee+'"';return ve&&(Oe+=' title="'+ve+'"'),Oe+=this.options.xhtml?"/>":">",Oe},_e.text=function(me){return me},je}(),ke=function(){function je(){}var _e=je.prototype;return _e.strong=function(me){return me},_e.em=function(me){return me},_e.codespan=function(me){return me},_e.del=function(me){return me},_e.html=function(me){return me},_e.text=function(me){return me},_e.link=function(me,ve,Ee){return""+Ee},_e.image=function(me,ve,Ee){return""+Ee},_e.br=function(){return""},je}(),ct=function(){function je(){this.seen={}}var _e=je.prototype;return _e.slug=function(me){var ve=me.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ve)){var Ee=ve;do this.seen[Ee]++,ve=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(ve))}return this.seen[ve]=0,ve},je}(),ut=D.defaults,mt=Z.unescape,pt=function(){function je(Ue){this.options=Ue||ut,this.options.renderer=this.options.renderer||new Me,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ke,this.slugger=new ct}je.parse=function(me,ve){var Ee=new je(ve);return Ee.parse(me)};var _e=je.prototype;return _e.parse=function(me,ve){ve===void 0&&(ve=!0);var Ee="",Oe,Ye,ze,gt,Lt,Pt,Rt,Dt,dt,it,nt,we,Ne,ht,ot,Bt,wt,rt,st=me.length;for(Oe=0;Oe<st;Oe++){it=me[Oe];switch(it.type){case"space":continue;case"hr":{Ee+=this.renderer.hr();continue}case"heading":{Ee+=this.renderer.heading(this.parseInline(it.tokens),it.depth,mt(this.parseInline(it.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ee+=this.renderer.code(it.text,it.lang,it.escaped);continue}case"table":{for(Dt="",Rt="",gt=it.header.length,Ye=0;Ye<gt;Ye++)Rt+=this.renderer.tablecell(this.parseInline(it.tokens.header[Ye]),{header:!0,align:it.align[Ye]});for(Dt+=this.renderer.tablerow(Rt),dt="",gt=it.cells.length,Ye=0;Ye<gt;Ye++){for(Pt=it.tokens.cells[Ye],Rt="",Lt=Pt.length,ze=0;ze<Lt;ze++)Rt+=this.renderer.tablecell(this.parseInline(Pt[ze]),{header:!1,align:it.align[ze]});dt+=this.renderer.tablerow(Rt)}Ee+=this.renderer.table(Dt,dt);continue}case"blockquote":{dt=this.parse(it.tokens),Ee+=this.renderer.blockquote(dt);continue}case"list":{for(nt=it.ordered,we=it.start,Ne=it.loose,gt=it.items.length,dt="",Ye=0;Ye<gt;Ye++)ot=it.items[Ye],Bt=ot.checked,wt=ot.task,ht="",ot.task&&(rt=this.renderer.checkbox(Bt),Ne?ot.tokens.length>0&&ot.tokens[0].type==="text"?(ot.tokens[0].text=rt+" "+ot.tokens[0].text,ot.tokens[0].tokens&&ot.tokens[0].tokens.length>0&&ot.tokens[0].tokens[0].type==="text"&&(ot.tokens[0].tokens[0].text=rt+" "+ot.tokens[0].tokens[0].text)):ot.tokens.unshift({type:"text",text:rt}):ht+=rt),ht+=this.parse(ot.tokens,Ne),dt+=this.renderer.listitem(ht,wt,Bt);Ee+=this.renderer.list(dt,nt,we);continue}case"html":{Ee+=this.renderer.html(it.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(it.tokens));continue}case"text":{for(dt=it.tokens?this.parseInline(it.tokens):it.text;Oe+1<st&&me[Oe+1].type==="text";)it=me[++Oe],dt+=`
|
|
`+(it.tokens?this.parseInline(it.tokens):it.text);Ee+=ve?this.renderer.paragraph(dt):dt;continue}default:{var St='Token with "'+it.type+'" type was not found.';if(this.options.silent){console.error(St);return}else throw new Error(St)}}}return Ee},_e.parseInline=function(me,ve){ve=ve||this.renderer;var Ee="",Oe,Ye,ze=me.length;for(Oe=0;Oe<ze;Oe++){Ye=me[Oe];switch(Ye.type){case"escape":{Ee+=ve.text(Ye.text);break}case"html":{Ee+=ve.html(Ye.text);break}case"link":{Ee+=ve.link(Ye.href,Ye.title,this.parseInline(Ye.tokens,ve));break}case"image":{Ee+=ve.image(Ye.href,Ye.title,Ye.text);break}case"strong":{Ee+=ve.strong(this.parseInline(Ye.tokens,ve));break}case"em":{Ee+=ve.em(this.parseInline(Ye.tokens,ve));break}case"codespan":{Ee+=ve.codespan(Ye.text);break}case"br":{Ee+=ve.br();break}case"del":{Ee+=ve.del(this.parseInline(Ye.tokens,ve));break}case"text":{Ee+=ve.text(Ye.text);break}default:{var gt='Token with "'+Ye.type+'" type was not found.';if(this.options.silent){console.error(gt);return}else throw new Error(gt)}}}return Ee},je}(),Ot=Z.merge,Ft=Z.checkSanitizeDeprecation,He=Z.escape,Pe=D.getDefaults,at=D.changeDefaults,vt=D.defaults;function et(je,_e,Ue){if(typeof je=="undefined"||je===null)throw new Error("marked(): input parameter is undefined or null");if(typeof je!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(je)+", string expected");if(typeof _e=="function"&&(Ue=_e,_e=null),_e=Ot({},et.defaults,_e||{}),Ft(_e),Ue){var me=_e.highlight,ve;try{ve=$.lex(je,_e)}catch(ze){return Ue(ze)}var Ee=function(gt){var Lt;if(!gt)try{Lt=pt.parse(ve,_e)}catch(Pt){gt=Pt}return _e.highlight=me,gt?Ue(gt):Ue(null,Lt)};if(!me||me.length<3)return Ee();if(delete _e.highlight,!ve.length)return Ee();var Oe=0;et.walkTokens(ve,function(ze){ze.type==="code"&&(Oe++,setTimeout(function(){me(ze.text,ze.lang,function(gt,Lt){if(gt)return Ee(gt);Lt!=null&&Lt!==ze.text&&(ze.text=Lt,ze.escaped=!0),Oe--,Oe===0&&Ee()})},0))}),Oe===0&&Ee();return}try{var Ye=$.lex(je,_e);return _e.walkTokens&&et.walkTokens(Ye,_e.walkTokens),pt.parse(Ye,_e)}catch(ze){if(ze.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,_e.silent)return"<p>An error occurred:</p><pre>"+He(ze.message+"",!0)+"</pre>";throw ze}}et.options=et.setOptions=function(je){return Ot(et.defaults,je),at(et.defaults),et},et.getDefaults=Pe,et.defaults=vt,et.use=function(je){var _e=Ot({},je);if(je.renderer&&function(){var me=et.defaults.renderer||new Me,ve=function(Ye){var ze=me[Ye];me[Ye]=function(){for(var gt=arguments.length,Lt=new Array(gt),Pt=0;Pt<gt;Pt++)Lt[Pt]=arguments[Pt];var Rt=je.renderer[Ye].apply(me,Lt);return Rt===!1&&(Rt=ze.apply(me,Lt)),Rt}};for(var Ee in je.renderer)ve(Ee);_e.renderer=me}(),je.tokenizer&&function(){var me=et.defaults.tokenizer||new Ce,ve=function(Ye){var ze=me[Ye];me[Ye]=function(){for(var gt=arguments.length,Lt=new Array(gt),Pt=0;Pt<gt;Pt++)Lt[Pt]=arguments[Pt];var Rt=je.tokenizer[Ye].apply(me,Lt);return Rt===!1&&(Rt=ze.apply(me,Lt)),Rt}};for(var Ee in je.tokenizer)ve(Ee);_e.tokenizer=me}(),je.walkTokens){var Ue=et.defaults.walkTokens;_e.walkTokens=function(me){je.walkTokens(me),Ue&&Ue(me)}}et.setOptions(_e)},et.walkTokens=function(je,_e){for(var Ue=R(je),me;!(me=Ue()).done;){var ve=me.value;_e(ve);switch(ve.type){case"table":{for(var Ee=R(ve.tokens.header),Oe;!(Oe=Ee()).done;){var Ye=Oe.value;et.walkTokens(Ye,_e)}for(var ze=R(ve.tokens.cells),gt;!(gt=ze()).done;)for(var Lt=gt.value,Pt=R(Lt),Rt;!(Rt=Pt()).done;){var Dt=Rt.value;et.walkTokens(Dt,_e)}break}case"list":{et.walkTokens(ve.items,_e);break}default:ve.tokens&&et.walkTokens(ve.tokens,_e)}}},et.Parser=pt,et.parser=pt.parse,et.Renderer=Me,et.TextRenderer=ke,et.Lexer=$,et.lexer=$.lex,et.Tokenizer=Ce,et.Slugger=ct,et.parse=et;var At=et;return At})},ELLl:function(qe,ue,k){(function(J){J(k("VrN/"))})(function(J){var N={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},O=J.Pos;J.defineOption("autoCloseBrackets",!1,function(d,E,o){o&&o!=J.Init&&(d.removeKeyMap(R),d.state.closeBrackets=null),E&&(B(Q(E,"pairs")),d.state.closeBrackets=E,d.addKeyMap(R))});function Q(d,E){return E=="pairs"&&typeof d=="string"?d:typeof d=="object"&&d[E]!=null?d[E]:N[E]}var R={Backspace:b,Enter:g};function B(d){for(var E=0;E<d.length;E++){var o=d.charAt(E),n="'"+o+"'";R[n]||(R[n]=D(o))}}B(N.pairs+"`");function D(d){return function(E){return l(E,d)}}function f(d){var E=d.state.closeBrackets;if(!E||E.override)return E;var o=d.getModeAt(d.getCursor());return o.closeBrackets||E}function b(d){var E=f(d);if(!E||d.getOption("disableInput"))return J.Pass;for(var o=Q(E,"pairs"),n=d.listSelections(),s=0;s<n.length;s++){if(!n[s].empty())return J.Pass;var u=v(d,n[s].head);if(!u||o.indexOf(u)%2!=0)return J.Pass}for(var s=n.length-1;s>=0;s--){var p=n[s].head;d.replaceRange("",O(p.line,p.ch-1),O(p.line,p.ch+1),"+delete")}}function g(d){var E=f(d),o=E&&Q(E,"explode");if(!o||d.getOption("disableInput"))return J.Pass;for(var n=d.listSelections(),s=0;s<n.length;s++){if(!n[s].empty())return J.Pass;var u=v(d,n[s].head);if(!u||o.indexOf(u)%2!=0)return J.Pass}d.operation(function(){var p=d.lineSeparator()||`
|
|
`;d.replaceSelection(p+p,null),d.execCommand("goCharLeft"),n=d.listSelections();for(var S=0;S<n.length;S++){var x=n[S].head.line;d.indentLine(x,null,!0),d.indentLine(x+1,null,!0)}})}function i(d){var E=J.cmpPos(d.anchor,d.head)>0;return{anchor:new O(d.anchor.line,d.anchor.ch+(E?-1:1)),head:new O(d.head.line,d.head.ch+(E?1:-1))}}function l(d,E){var o=f(d);if(!o||d.getOption("disableInput"))return J.Pass;var n=Q(o,"pairs"),s=n.indexOf(E);if(s==-1)return J.Pass;for(var u=Q(o,"closeBefore"),p=Q(o,"triples"),S=n.charAt(s+1)==E,x=d.listSelections(),M=s%2==0,C,c=0;c<x.length;c++){var r=x[c],a=r.head,A,L=d.getRange(a,O(a.line,a.ch+1));if(M&&!r.empty())A="surround";else if((S||!M)&&L==E)S&&h(d,a)?A="both":p.indexOf(E)>=0&&d.getRange(a,O(a.line,a.ch+3))==E+E+E?A="skipThree":A="skip";else if(S&&a.ch>1&&p.indexOf(E)>=0&&d.getRange(O(a.line,a.ch-2),a)==E+E){if(a.ch>2&&/\bstring/.test(d.getTokenTypeAt(O(a.line,a.ch-2))))return J.Pass;A="addFour"}else if(S){var T=a.ch==0?" ":d.getRange(O(a.line,a.ch-1),a);if(!J.isWordChar(L)&&T!=E&&!J.isWordChar(T))A="both";else return J.Pass}else if(M&&(L.length===0||/\s/.test(L)||u.indexOf(L)>-1))A="both";else return J.Pass;if(!C)C=A;else if(C!=A)return J.Pass}var w=s%2?n.charAt(s-1):E,_=s%2?E:n.charAt(s+1);d.operation(function(){if(C=="skip")d.execCommand("goCharRight");else if(C=="skipThree")for(var j=0;j<3;j++)d.execCommand("goCharRight");else if(C=="surround"){for(var W=d.getSelections(),j=0;j<W.length;j++)W[j]=w+W[j]+_;d.replaceSelections(W,"around"),W=d.listSelections().slice();for(var j=0;j<W.length;j++)W[j]=i(W[j]);d.setSelections(W)}else C=="both"?(d.replaceSelection(w+_,null),d.triggerElectric(w+_),d.execCommand("goCharLeft")):C=="addFour"&&(d.replaceSelection(w+w+w+w,"before"),d.execCommand("goCharRight"))})}function v(d,E){var o=d.getRange(O(E.line,E.ch-1),O(E.line,E.ch+1));return o.length==2?o:null}function h(d,E){var o=d.getTokenAt(O(E.line,E.ch+1));return/\bstring/.test(o.type)&&o.start==E.ch&&(E.ch==0||!/\bstring/.test(d.getTokenTypeAt(E)))}})},Fofx:function(qe,ue){var k=typeof Float32Array=="undefined"?Array:Float32Array;function J(){var g=new k(6);return N(g),g}function N(g){return g[0]=1,g[1]=0,g[2]=0,g[3]=1,g[4]=0,g[5]=0,g}function O(g,i){return g[0]=i[0],g[1]=i[1],g[2]=i[2],g[3]=i[3],g[4]=i[4],g[5]=i[5],g}function Q(g,i,l){var v=i[0]*l[0]+i[2]*l[1],h=i[1]*l[0]+i[3]*l[1],d=i[0]*l[2]+i[2]*l[3],E=i[1]*l[2]+i[3]*l[3],o=i[0]*l[4]+i[2]*l[5]+i[4],n=i[1]*l[4]+i[3]*l[5]+i[5];return g[0]=v,g[1]=h,g[2]=d,g[3]=E,g[4]=o,g[5]=n,g}function R(g,i,l){return g[0]=i[0],g[1]=i[1],g[2]=i[2],g[3]=i[3],g[4]=i[4]+l[0],g[5]=i[5]+l[1],g}function B(g,i,l){var v=i[0],h=i[2],d=i[4],E=i[1],o=i[3],n=i[5],s=Math.sin(l),u=Math.cos(l);return g[0]=v*u+E*s,g[1]=-v*s+E*u,g[2]=h*u+o*s,g[3]=-h*s+u*o,g[4]=u*d+s*n,g[5]=u*n-s*d,g}function D(g,i,l){var v=l[0],h=l[1];return g[0]=i[0]*v,g[1]=i[1]*h,g[2]=i[2]*v,g[3]=i[3]*h,g[4]=i[4]*v,g[5]=i[5]*h,g}function f(g,i){var l=i[0],v=i[2],h=i[4],d=i[1],E=i[3],o=i[5],n=l*E-d*v;return n?(n=1/n,g[0]=E*n,g[1]=-d*n,g[2]=-v*n,g[3]=l*n,g[4]=(v*o-E*h)*n,g[5]=(d*h-l*o)*n,g):null}function b(g){var i=J();return O(i,g),i}ue.create=J,ue.identity=N,ue.copy=O,ue.mul=Q,ue.translate=R,ue.rotate=B,ue.scale=D,ue.invert=f,ue.clone=b},FxDU:function(qe,ue,k){"use strict";Object.defineProperty(ue,"__esModule",{value:!0}),ue.createSensor=void 0;var J=k("QO+J"),N=k("j5sG"),O=typeof ResizeObserver!="undefined"?N.createSensor:J.createSensor;ue.createSensor=O},Gev7:function(qe,ue,k){var J=k("bYtY"),N=k("K2GJ"),O=k("1bdT"),Q=k("ni6a");function R(D){D=D||{},O.call(this,D);for(var f in D)D.hasOwnProperty(f)&&f!=="style"&&(this[f]=D[f]);this.style=new N(D.style,this),this._rect=null,this.__clipPaths=null}R.prototype={constructor:R,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(D){},afterBrush:function(D){},brush:function(D,f){},getBoundingRect:function(){},contain:function(D,f){return this.rectContain(D,f)},traverse:function(D,f){D.call(f,this)},rectContain:function(D,f){var b=this.transformCoordToLocal(D,f),g=this.getBoundingRect();return g.contain(b[0],b[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(D){return this.animate("style",D)},attrKV:function(D,f){D!=="style"?O.prototype.attrKV.call(this,D,f):this.style.set(f)},setStyle:function(D,f){return this.style.set(D,f),this.dirty(!1),this},useStyle:function(D){return this.style=new N(D,this),this.dirty(!1),this},calculateTextPosition:null},J.inherits(R,O),J.mixin(R,Q);var B=R;qe.exports=B},Gytx:function(qe,ue){qe.exports=function(J,N,O,Q){var R=O?O.call(Q,J,N):void 0;if(R!==void 0)return!!R;if(J===N)return!0;if(typeof J!="object"||!J||typeof N!="object"||!N)return!1;var B=Object.keys(J),D=Object.keys(N);if(B.length!==D.length)return!1;for(var f=Object.prototype.hasOwnProperty.bind(N),b=0;b<B.length;b++){var g=B[b];if(!f(g))return!1;var i=J[g],l=N[g];if(R=O?O.call(Q,i,l,g):void 0,R===!1||R===void 0&&i!==l)return!1}return!0}},H6uX:function(qe,ue){var k=Array.prototype.slice,J=function(R){this._$handlers={},this._$eventProcessor=R};J.prototype={constructor:J,one:function(R,B,D,f){return O(this,R,B,D,f,!0)},on:function(R,B,D,f){return O(this,R,B,D,f,!1)},isSilent:function(R){var B=this._$handlers;return!B[R]||!B[R].length},off:function(R,B){var D=this._$handlers;if(!R)return this._$handlers={},this;if(B){if(D[R]){for(var f=[],b=0,g=D[R].length;b<g;b++)D[R][b].h!==B&&f.push(D[R][b]);D[R]=f}D[R]&&D[R].length===0&&delete D[R]}else delete D[R];return this},trigger:function(R){var B=this._$handlers[R],D=this._$eventProcessor;if(B){var f=arguments,b=f.length;b>3&&(f=k.call(f,1));for(var g=B.length,i=0;i<g;){var l=B[i];if(D&&D.filter&&l.query!=null&&!D.filter(R,l.query)){i++;continue}switch(b){case 1:l.h.call(l.ctx);break;case 2:l.h.call(l.ctx,f[1]);break;case 3:l.h.call(l.ctx,f[1],f[2]);break;default:l.h.apply(l.ctx,f);break}l.one?(B.splice(i,1),g--):i++}}return D&&D.afterTrigger&&D.afterTrigger(R),this},triggerWithContext:function(R){var B=this._$handlers[R],D=this._$eventProcessor;if(B){var f=arguments,b=f.length;b>4&&(f=k.call(f,1,f.length-1));for(var g=f[f.length-1],i=B.length,l=0;l<i;){var v=B[l];if(D&&D.filter&&v.query!=null&&!D.filter(R,v.query)){l++;continue}switch(b){case 1:v.h.call(g);break;case 2:v.h.call(g,f[1]);break;case 3:v.h.call(g,f[1],f[2]);break;default:v.h.apply(g,f);break}v.one?(B.splice(l,1),i--):l++}}return D&&D.afterTrigger&&D.afterTrigger(R),this}};function N(R,B){var D=R._$eventProcessor;return B!=null&&D&&D.normalizeQuery&&(B=D.normalizeQuery(B)),B}function O(R,B,D,f,b,g){var i=R._$handlers;if(typeof D=="function"&&(b=f,f=D,D=null),!f||!B)return R;D=N(R,D),i[B]||(i[B]=[]);for(var l=0;l<i[B].length;l++)if(i[B][l].h===f)return R;var v={h:f,one:g,query:D,ctx:b||R,callAtLast:f.zrEventfulCallAtLast},h=i[B].length-1,d=i[B][h];return d&&d.callAtLast?i[B].splice(h,0,v):i[B].push(v),R}var Q=J;qe.exports=Q},H7XF:function(qe,ue,k){"use strict";ue.byteLength=f,ue.toByteArray=g,ue.fromByteArray=v;for(var J=[],N=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R=0,B=Q.length;R<B;++R)J[R]=Q[R],N[Q.charCodeAt(R)]=R;N["-".charCodeAt(0)]=62,N["_".charCodeAt(0)]=63;function D(h){var d=h.length;if(d%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var E=h.indexOf("=");E===-1&&(E=d);var o=E===d?0:4-E%4;return[E,o]}function f(h){var d=D(h),E=d[0],o=d[1];return(E+o)*3/4-o}function b(h,d,E){return(d+E)*3/4-E}function g(h){var d,E=D(h),o=E[0],n=E[1],s=new O(b(h,o,n)),u=0,p=n>0?o-4:o,S;for(S=0;S<p;S+=4)d=N[h.charCodeAt(S)]<<18|N[h.charCodeAt(S+1)]<<12|N[h.charCodeAt(S+2)]<<6|N[h.charCodeAt(S+3)],s[u++]=d>>16&255,s[u++]=d>>8&255,s[u++]=d&255;return n===2&&(d=N[h.charCodeAt(S)]<<2|N[h.charCodeAt(S+1)]>>4,s[u++]=d&255),n===1&&(d=N[h.charCodeAt(S)]<<10|N[h.charCodeAt(S+1)]<<4|N[h.charCodeAt(S+2)]>>2,s[u++]=d>>8&255,s[u++]=d&255),s}function i(h){return J[h>>18&63]+J[h>>12&63]+J[h>>6&63]+J[h&63]}function l(h,d,E){for(var o,n=[],s=d;s<E;s+=3)o=(h[s]<<16&16711680)+(h[s+1]<<8&65280)+(h[s+2]&255),n.push(i(o));return n.join("")}function v(h){for(var d,E=h.length,o=E%3,n=[],s=16383,u=0,p=E-o;u<p;u+=s)n.push(l(h,u,u+s>p?p:u+s));return o===1?(d=h[E-1],n.push(J[d>>2]+J[d<<4&63]+"==")):o===2&&(d=(h[E-2]<<8)+h[E-1],n.push(J[d>>10]+J[d>>4&63]+J[d<<2&63]+"=")),n.join("")}},HDXh:function(qe,ue,k){"use strict";(function(J){/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/var N=k("H7XF"),O=k("kVK+"),Q=k("49sm");ue.Buffer=f,ue.SlowBuffer=n,ue.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=J.TYPED_ARRAY_SUPPORT!==void 0?J.TYPED_ARRAY_SUPPORT:R(),ue.kMaxLength=B();function R(){try{var ie=new Uint8Array(1);return ie.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ie.foo()===42&&typeof ie.subarray=="function"&&ie.subarray(1,1).byteLength===0}catch($){return!1}}function B(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function D(ie,$){if(B()<$)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(ie=new Uint8Array($),ie.__proto__=f.prototype):(ie===null&&(ie=new f($)),ie.length=$),ie}function f(ie,$,re){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(ie,$,re);if(typeof ie=="number"){if(typeof $=="string")throw new Error("If encoding is specified then the first argument must be a string");return l(this,ie)}return b(this,ie,$,re)}f.poolSize=8192,f._augment=function(ie){return ie.__proto__=f.prototype,ie};function b(ie,$,re,ce){if(typeof $=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&$ instanceof ArrayBuffer?d(ie,$,re,ce):typeof $=="string"?v(ie,$,re):E(ie,$)}f.from=function(ie,$,re){return b(null,ie,$,re)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0}));function g(ie){if(typeof ie!="number")throw new TypeError('"size" argument must be a number');if(ie<0)throw new RangeError('"size" argument must not be negative')}function i(ie,$,re,ce){return g($),$<=0?D(ie,$):re!==void 0?typeof ce=="string"?D(ie,$).fill(re,ce):D(ie,$).fill(re):D(ie,$)}f.alloc=function(ie,$,re){return i(null,ie,$,re)};function l(ie,$){if(g($),ie=D(ie,$<0?0:o($)|0),!f.TYPED_ARRAY_SUPPORT)for(var re=0;re<$;++re)ie[re]=0;return ie}f.allocUnsafe=function(ie){return l(null,ie)},f.allocUnsafeSlow=function(ie){return l(null,ie)};function v(ie,$,re){if((typeof re!="string"||re==="")&&(re="utf8"),!f.isEncoding(re))throw new TypeError('"encoding" must be a valid string encoding');var ce=s($,re)|0;ie=D(ie,ce);var be=ie.write($,re);return be!==ce&&(ie=ie.slice(0,be)),ie}function h(ie,$){var re=$.length<0?0:o($.length)|0;ie=D(ie,re);for(var ce=0;ce<re;ce+=1)ie[ce]=$[ce]&255;return ie}function d(ie,$,re,ce){if($.byteLength,re<0||$.byteLength<re)throw new RangeError("'offset' is out of bounds");if($.byteLength<re+(ce||0))throw new RangeError("'length' is out of bounds");return re===void 0&&ce===void 0?$=new Uint8Array($):ce===void 0?$=new Uint8Array($,re):$=new Uint8Array($,re,ce),f.TYPED_ARRAY_SUPPORT?(ie=$,ie.__proto__=f.prototype):ie=h(ie,$),ie}function E(ie,$){if(f.isBuffer($)){var re=o($.length)|0;return ie=D(ie,re),ie.length===0||$.copy(ie,0,0,re),ie}if($){if(typeof ArrayBuffer!="undefined"&&$.buffer instanceof ArrayBuffer||"length"in $)return typeof $.length!="number"||xe($.length)?D(ie,0):h(ie,$);if($.type==="Buffer"&&Q($.data))return h(ie,$.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function o(ie){if(ie>=B())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B().toString(16)+" bytes");return ie|0}function n(ie){return+ie!=ie&&(ie=0),f.alloc(+ie)}f.isBuffer=function($){return!!($!=null&&$._isBuffer)},f.compare=function($,re){if(!f.isBuffer($)||!f.isBuffer(re))throw new TypeError("Arguments must be Buffers");if($===re)return 0;for(var ce=$.length,be=re.length,Me=0,ke=Math.min(ce,be);Me<ke;++Me)if($[Me]!==re[Me]){ce=$[Me],be=re[Me];break}return ce<be?-1:be<ce?1:0},f.isEncoding=function($){switch(String($).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}},f.concat=function($,re){if(!Q($))throw new TypeError('"list" argument must be an Array of Buffers');if($.length===0)return f.alloc(0);var ce;if(re===void 0)for(re=0,ce=0;ce<$.length;++ce)re+=$[ce].length;var be=f.allocUnsafe(re),Me=0;for(ce=0;ce<$.length;++ce){var ke=$[ce];if(!f.isBuffer(ke))throw new TypeError('"list" argument must be an Array of Buffers');ke.copy(be,Me),Me+=ke.length}return be};function s(ie,$){if(f.isBuffer(ie))return ie.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ie)||ie instanceof ArrayBuffer))return ie.byteLength;typeof ie!="string"&&(ie=""+ie);var re=ie.length;if(re===0)return 0;for(var ce=!1;;)switch($){case"ascii":case"latin1":case"binary":return re;case"utf8":case"utf-8":case void 0:return Le(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re*2;case"hex":return re>>>1;case"base64":return Ie(ie).length;default:if(ce)return Le(ie).length;$=(""+$).toLowerCase(),ce=!0}}f.byteLength=s;function u(ie,$,re){var ce=!1;if(($===void 0||$<0)&&($=0),$>this.length)return"";if((re===void 0||re>this.length)&&(re=this.length),re<=0)return"";if(re>>>=0,$>>>=0,re<=$)return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return Z(this,$,re);case"utf8":case"utf-8":return T(this,$,re);case"ascii":return j(this,$,re);case"latin1":case"binary":return W(this,$,re);case"base64":return L(this,$,re);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,$,re);default:if(ce)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),ce=!0}}f.prototype._isBuffer=!0;function p(ie,$,re){var ce=ie[$];ie[$]=ie[re],ie[re]=ce}f.prototype.swap16=function(){var $=this.length;if($%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var re=0;re<$;re+=2)p(this,re,re+1);return this},f.prototype.swap32=function(){var $=this.length;if($%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var re=0;re<$;re+=4)p(this,re,re+3),p(this,re+1,re+2);return this},f.prototype.swap64=function(){var $=this.length;if($%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var re=0;re<$;re+=8)p(this,re,re+7),p(this,re+1,re+6),p(this,re+2,re+5),p(this,re+3,re+4);return this},f.prototype.toString=function(){var $=this.length|0;return $===0?"":arguments.length===0?T(this,0,$):u.apply(this,arguments)},f.prototype.equals=function($){if(!f.isBuffer($))throw new TypeError("Argument must be a Buffer");return this===$?!0:f.compare(this,$)===0},f.prototype.inspect=function(){var $="",re=ue.INSPECT_MAX_BYTES;return this.length>0&&($=this.toString("hex",0,re).match(/.{2}/g).join(" "),this.length>re&&($+=" ... ")),"<Buffer "+$+">"},f.prototype.compare=function($,re,ce,be,Me){if(!f.isBuffer($))throw new TypeError("Argument must be a Buffer");if(re===void 0&&(re=0),ce===void 0&&(ce=$?$.length:0),be===void 0&&(be=0),Me===void 0&&(Me=this.length),re<0||ce>$.length||be<0||Me>this.length)throw new RangeError("out of range index");if(be>=Me&&re>=ce)return 0;if(be>=Me)return-1;if(re>=ce)return 1;if(re>>>=0,ce>>>=0,be>>>=0,Me>>>=0,this===$)return 0;for(var ke=Me-be,ct=ce-re,ut=Math.min(ke,ct),mt=this.slice(be,Me),pt=$.slice(re,ce),Ot=0;Ot<ut;++Ot)if(mt[Ot]!==pt[Ot]){ke=mt[Ot],ct=pt[Ot];break}return ke<ct?-1:ct<ke?1:0};function S(ie,$,re,ce,be){if(ie.length===0)return-1;if(typeof re=="string"?(ce=re,re=0):re>2147483647?re=2147483647:re<-2147483648&&(re=-2147483648),re=+re,isNaN(re)&&(re=be?0:ie.length-1),re<0&&(re=ie.length+re),re>=ie.length){if(be)return-1;re=ie.length-1}else if(re<0)if(be)re=0;else return-1;if(typeof $=="string"&&($=f.from($,ce)),f.isBuffer($))return $.length===0?-1:x(ie,$,re,ce,be);if(typeof $=="number")return $=$&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?be?Uint8Array.prototype.indexOf.call(ie,$,re):Uint8Array.prototype.lastIndexOf.call(ie,$,re):x(ie,[$],re,ce,be);throw new TypeError("val must be string, number or Buffer")}function x(ie,$,re,ce,be){var Me=1,ke=ie.length,ct=$.length;if(ce!==void 0&&(ce=String(ce).toLowerCase(),ce==="ucs2"||ce==="ucs-2"||ce==="utf16le"||ce==="utf-16le")){if(ie.length<2||$.length<2)return-1;Me=2,ke/=2,ct/=2,re/=2}function ut(He,Pe){return Me===1?He[Pe]:He.readUInt16BE(Pe*Me)}var mt;if(be){var pt=-1;for(mt=re;mt<ke;mt++)if(ut(ie,mt)===ut($,pt===-1?0:mt-pt)){if(pt===-1&&(pt=mt),mt-pt+1===ct)return pt*Me}else pt!==-1&&(mt-=mt-pt),pt=-1}else for(re+ct>ke&&(re=ke-ct),mt=re;mt>=0;mt--){for(var Ot=!0,Ft=0;Ft<ct;Ft++)if(ut(ie,mt+Ft)!==ut($,Ft)){Ot=!1;break}if(Ot)return mt}return-1}f.prototype.includes=function($,re,ce){return this.indexOf($,re,ce)!==-1},f.prototype.indexOf=function($,re,ce){return S(this,$,re,ce,!0)},f.prototype.lastIndexOf=function($,re,ce){return S(this,$,re,ce,!1)};function M(ie,$,re,ce){re=Number(re)||0;var be=ie.length-re;ce?(ce=Number(ce),ce>be&&(ce=be)):ce=be;var Me=$.length;if(Me%2!==0)throw new TypeError("Invalid hex string");ce>Me/2&&(ce=Me/2);for(var ke=0;ke<ce;++ke){var ct=parseInt($.substr(ke*2,2),16);if(isNaN(ct))return ke;ie[re+ke]=ct}return ke}function C(ie,$,re,ce){return Qe(Le($,ie.length-re),ie,re,ce)}function c(ie,$,re,ce){return Qe(tt($),ie,re,ce)}function r(ie,$,re,ce){return c(ie,$,re,ce)}function a(ie,$,re,ce){return Qe(Ie($),ie,re,ce)}function A(ie,$,re,ce){return Qe(Et($,ie.length-re),ie,re,ce)}f.prototype.write=function($,re,ce,be){if(re===void 0)be="utf8",ce=this.length,re=0;else if(ce===void 0&&typeof re=="string")be=re,ce=this.length,re=0;else if(isFinite(re))re=re|0,isFinite(ce)?(ce=ce|0,be===void 0&&(be="utf8")):(be=ce,ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Me=this.length-re;if((ce===void 0||ce>Me)&&(ce=Me),$.length>0&&(ce<0||re<0)||re>this.length)throw new RangeError("Attempt to write outside buffer bounds");be||(be="utf8");for(var ke=!1;;)switch(be){case"hex":return M(this,$,re,ce);case"utf8":case"utf-8":return C(this,$,re,ce);case"ascii":return c(this,$,re,ce);case"latin1":case"binary":return r(this,$,re,ce);case"base64":return a(this,$,re,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,$,re,ce);default:if(ke)throw new TypeError("Unknown encoding: "+be);be=(""+be).toLowerCase(),ke=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function L(ie,$,re){return $===0&&re===ie.length?N.fromByteArray(ie):N.fromByteArray(ie.slice($,re))}function T(ie,$,re){re=Math.min(ie.length,re);for(var ce=[],be=$;be<re;){var Me=ie[be],ke=null,ct=Me>239?4:Me>223?3:Me>191?2:1;if(be+ct<=re){var ut,mt,pt,Ot;switch(ct){case 1:Me<128&&(ke=Me);break;case 2:ut=ie[be+1],(ut&192)===128&&(Ot=(Me&31)<<6|ut&63,Ot>127&&(ke=Ot));break;case 3:ut=ie[be+1],mt=ie[be+2],(ut&192)===128&&(mt&192)===128&&(Ot=(Me&15)<<12|(ut&63)<<6|mt&63,Ot>2047&&(Ot<55296||Ot>57343)&&(ke=Ot));break;case 4:ut=ie[be+1],mt=ie[be+2],pt=ie[be+3],(ut&192)===128&&(mt&192)===128&&(pt&192)===128&&(Ot=(Me&15)<<18|(ut&63)<<12|(mt&63)<<6|pt&63,Ot>65535&&Ot<1114112&&(ke=Ot))}}ke===null?(ke=65533,ct=1):ke>65535&&(ke-=65536,ce.push(ke>>>10&1023|55296),ke=56320|ke&1023),ce.push(ke),be+=ct}return _(ce)}var w=4096;function _(ie){var $=ie.length;if($<=w)return String.fromCharCode.apply(String,ie);for(var re="",ce=0;ce<$;)re+=String.fromCharCode.apply(String,ie.slice(ce,ce+=w));return re}function j(ie,$,re){var ce="";re=Math.min(ie.length,re);for(var be=$;be<re;++be)ce+=String.fromCharCode(ie[be]&127);return ce}function W(ie,$,re){var ce="";re=Math.min(ie.length,re);for(var be=$;be<re;++be)ce+=String.fromCharCode(ie[be]);return ce}function Z(ie,$,re){var ce=ie.length;(!$||$<0)&&($=0),(!re||re<0||re>ce)&&(re=ce);for(var be="",Me=$;Me<re;++Me)be+=De(ie[Me]);return be}function X(ie,$,re){for(var ce=ie.slice($,re),be="",Me=0;Me<ce.length;Me+=2)be+=String.fromCharCode(ce[Me]+ce[Me+1]*256);return be}f.prototype.slice=function($,re){var ce=this.length;$=~~$,re=re===void 0?ce:~~re,$<0?($+=ce,$<0&&($=0)):$>ce&&($=ce),re<0?(re+=ce,re<0&&(re=0)):re>ce&&(re=ce),re<$&&(re=$);var be;if(f.TYPED_ARRAY_SUPPORT)be=this.subarray($,re),be.__proto__=f.prototype;else{var Me=re-$;be=new f(Me,void 0);for(var ke=0;ke<Me;++ke)be[ke]=this[ke+$]}return be};function G(ie,$,re){if(ie%1!==0||ie<0)throw new RangeError("offset is not uint");if(ie+$>re)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function($,re,ce){$=$|0,re=re|0,ce||G($,re,this.length);for(var be=this[$],Me=1,ke=0;++ke<re&&(Me*=256);)be+=this[$+ke]*Me;return be},f.prototype.readUIntBE=function($,re,ce){$=$|0,re=re|0,ce||G($,re,this.length);for(var be=this[$+--re],Me=1;re>0&&(Me*=256);)be+=this[$+--re]*Me;return be},f.prototype.readUInt8=function($,re){return re||G($,1,this.length),this[$]},f.prototype.readUInt16LE=function($,re){return re||G($,2,this.length),this[$]|this[$+1]<<8},f.prototype.readUInt16BE=function($,re){return re||G($,2,this.length),this[$]<<8|this[$+1]},f.prototype.readUInt32LE=function($,re){return re||G($,4,this.length),(this[$]|this[$+1]<<8|this[$+2]<<16)+this[$+3]*16777216},f.prototype.readUInt32BE=function($,re){return re||G($,4,this.length),this[$]*16777216+(this[$+1]<<16|this[$+2]<<8|this[$+3])},f.prototype.readIntLE=function($,re,ce){$=$|0,re=re|0,ce||G($,re,this.length);for(var be=this[$],Me=1,ke=0;++ke<re&&(Me*=256);)be+=this[$+ke]*Me;return Me*=128,be>=Me&&(be-=Math.pow(2,8*re)),be},f.prototype.readIntBE=function($,re,ce){$=$|0,re=re|0,ce||G($,re,this.length);for(var be=re,Me=1,ke=this[$+--be];be>0&&(Me*=256);)ke+=this[$+--be]*Me;return Me*=128,ke>=Me&&(ke-=Math.pow(2,8*re)),ke},f.prototype.readInt8=function($,re){return re||G($,1,this.length),this[$]&128?(255-this[$]+1)*-1:this[$]},f.prototype.readInt16LE=function($,re){re||G($,2,this.length);var ce=this[$]|this[$+1]<<8;return ce&32768?ce|4294901760:ce},f.prototype.readInt16BE=function($,re){re||G($,2,this.length);var ce=this[$+1]|this[$]<<8;return ce&32768?ce|4294901760:ce},f.prototype.readInt32LE=function($,re){return re||G($,4,this.length),this[$]|this[$+1]<<8|this[$+2]<<16|this[$+3]<<24},f.prototype.readInt32BE=function($,re){return re||G($,4,this.length),this[$]<<24|this[$+1]<<16|this[$+2]<<8|this[$+3]},f.prototype.readFloatLE=function($,re){return re||G($,4,this.length),O.read(this,$,!0,23,4)},f.prototype.readFloatBE=function($,re){return re||G($,4,this.length),O.read(this,$,!1,23,4)},f.prototype.readDoubleLE=function($,re){return re||G($,8,this.length),O.read(this,$,!0,52,8)},f.prototype.readDoubleBE=function($,re){return re||G($,8,this.length),O.read(this,$,!1,52,8)};function te(ie,$,re,ce,be,Me){if(!f.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if($>be||$<Me)throw new RangeError('"value" argument is out of bounds');if(re+ce>ie.length)throw new RangeError("Index out of range")}f.prototype.writeUIntLE=function($,re,ce,be){if($=+$,re=re|0,ce=ce|0,!be){var Me=Math.pow(2,8*ce)-1;te(this,$,re,ce,Me,0)}var ke=1,ct=0;for(this[re]=$&255;++ct<ce&&(ke*=256);)this[re+ct]=$/ke&255;return re+ce},f.prototype.writeUIntBE=function($,re,ce,be){if($=+$,re=re|0,ce=ce|0,!be){var Me=Math.pow(2,8*ce)-1;te(this,$,re,ce,Me,0)}var ke=ce-1,ct=1;for(this[re+ke]=$&255;--ke>=0&&(ct*=256);)this[re+ke]=$/ct&255;return re+ce},f.prototype.writeUInt8=function($,re,ce){return $=+$,re=re|0,ce||te(this,$,re,1,255,0),f.TYPED_ARRAY_SUPPORT||($=Math.floor($)),this[re]=$&255,re+1};function Y(ie,$,re,ce){$<0&&($=65535+$+1);for(var be=0,Me=Math.min(ie.length-re,2);be<Me;++be)ie[re+be]=($&255<<8*(ce?be:1-be))>>>(ce?be:1-be)*8}f.prototype.writeUInt16LE=function($,re,ce){return $=+$,re=re|0,ce||te(this,$,re,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[re]=$&255,this[re+1]=$>>>8):Y(this,$,re,!0),re+2},f.prototype.writeUInt16BE=function($,re,ce){return $=+$,re=re|0,ce||te(this,$,re,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[re]=$>>>8,this[re+1]=$&255):Y(this,$,re,!1),re+2};function le(ie,$,re,ce){$<0&&($=4294967295+$+1);for(var be=0,Me=Math.min(ie.length-re,4);be<Me;++be)ie[re+be]=$>>>(ce?be:3-be)*8&255}f.prototype.writeUInt32LE=function($,re,ce){return $=+$,re=re|0,ce||te(this,$,re,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[re+3]=$>>>24,this[re+2]=$>>>16,this[re+1]=$>>>8,this[re]=$&255):le(this,$,re,!0),re+4},f.prototype.writeUInt32BE=function($,re,ce){return $=+$,re=re|0,ce||te(this,$,re,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[re]=$>>>24,this[re+1]=$>>>16,this[re+2]=$>>>8,this[re+3]=$&255):le(this,$,re,!1),re+4},f.prototype.writeIntLE=function($,re,ce,be){if($=+$,re=re|0,!be){var Me=Math.pow(2,8*ce-1);te(this,$,re,ce,Me-1,-Me)}var ke=0,ct=1,ut=0;for(this[re]=$&255;++ke<ce&&(ct*=256);)$<0&&ut===0&&this[re+ke-1]!==0&&(ut=1),this[re+ke]=($/ct>>0)-ut&255;return re+ce},f.prototype.writeIntBE=function($,re,ce,be){if($=+$,re=re|0,!be){var Me=Math.pow(2,8*ce-1);te(this,$,re,ce,Me-1,-Me)}var ke=ce-1,ct=1,ut=0;for(this[re+ke]=$&255;--ke>=0&&(ct*=256);)$<0&&ut===0&&this[re+ke+1]!==0&&(ut=1),this[re+ke]=($/ct>>0)-ut&255;return re+ce},f.prototype.writeInt8=function($,re,ce){return $=+$,re=re|0,ce||te(this,$,re,1,127,-128),f.TYPED_ARRAY_SUPPORT||($=Math.floor($)),$<0&&($=255+$+1),this[re]=$&255,re+1},f.prototype.writeInt16LE=function($,re,ce){return $=+$,re=re|0,ce||te(this,$,re,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[re]=$&255,this[re+1]=$>>>8):Y(this,$,re,!0),re+2},f.prototype.writeInt16BE=function($,re,ce){return $=+$,re=re|0,ce||te(this,$,re,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[re]=$>>>8,this[re+1]=$&255):Y(this,$,re,!1),re+2},f.prototype.writeInt32LE=function($,re,ce){return $=+$,re=re|0,ce||te(this,$,re,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[re]=$&255,this[re+1]=$>>>8,this[re+2]=$>>>16,this[re+3]=$>>>24):le(this,$,re,!0),re+4},f.prototype.writeInt32BE=function($,re,ce){return $=+$,re=re|0,ce||te(this,$,re,4,2147483647,-2147483648),$<0&&($=4294967295+$+1),f.TYPED_ARRAY_SUPPORT?(this[re]=$>>>24,this[re+1]=$>>>16,this[re+2]=$>>>8,this[re+3]=$&255):le(this,$,re,!1),re+4};function Ae(ie,$,re,ce,be,Me){if(re+ce>ie.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("Index out of range")}function Be(ie,$,re,ce,be){return be||Ae(ie,$,re,4,34028234663852886e22,-34028234663852886e22),O.write(ie,$,re,ce,23,4),re+4}f.prototype.writeFloatLE=function($,re,ce){return Be(this,$,re,!0,ce)},f.prototype.writeFloatBE=function($,re,ce){return Be(this,$,re,!1,ce)};function Ce(ie,$,re,ce,be){return be||Ae(ie,$,re,8,17976931348623157e292,-17976931348623157e292),O.write(ie,$,re,ce,52,8),re+8}f.prototype.writeDoubleLE=function($,re,ce){return Ce(this,$,re,!0,ce)},f.prototype.writeDoubleBE=function($,re,ce){return Ce(this,$,re,!1,ce)},f.prototype.copy=function($,re,ce,be){if(ce||(ce=0),!be&&be!==0&&(be=this.length),re>=$.length&&(re=$.length),re||(re=0),be>0&&be<ce&&(be=ce),be===ce)return 0;if($.length===0||this.length===0)return 0;if(re<0)throw new RangeError("targetStart out of bounds");if(ce<0||ce>=this.length)throw new RangeError("sourceStart out of bounds");if(be<0)throw new RangeError("sourceEnd out of bounds");be>this.length&&(be=this.length),$.length-re<be-ce&&(be=$.length-re+ce);var Me=be-ce,ke;if(this===$&&ce<re&&re<be)for(ke=Me-1;ke>=0;--ke)$[ke+re]=this[ke+ce];else if(Me<1e3||!f.TYPED_ARRAY_SUPPORT)for(ke=0;ke<Me;++ke)$[ke+re]=this[ke+ce];else Uint8Array.prototype.set.call($,this.subarray(ce,ce+Me),re);return Me},f.prototype.fill=function($,re,ce,be){if(typeof $=="string"){if(typeof re=="string"?(be=re,re=0,ce=this.length):typeof ce=="string"&&(be=ce,ce=this.length),$.length===1){var Me=$.charCodeAt(0);Me<256&&($=Me)}if(be!==void 0&&typeof be!="string")throw new TypeError("encoding must be a string");if(typeof be=="string"&&!f.isEncoding(be))throw new TypeError("Unknown encoding: "+be)}else typeof $=="number"&&($=$&255);if(re<0||this.length<re||this.length<ce)throw new RangeError("Out of range index");if(ce<=re)return this;re=re>>>0,ce=ce===void 0?this.length:ce>>>0,$||($=0);var ke;if(typeof $=="number")for(ke=re;ke<ce;++ke)this[ke]=$;else{var ct=f.isBuffer($)?$:Le(new f($,be).toString()),ut=ct.length;for(ke=0;ke<ce-re;++ke)this[ke+re]=ct[ke%ut]}return this};var Se=/[^+\/0-9A-Za-z-_]/g;function Fe(ie){if(ie=Ve(ie).replace(Se,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function Ve(ie){return ie.trim?ie.trim():ie.replace(/^\s+|\s+$/g,"")}function De(ie){return ie<16?"0"+ie.toString(16):ie.toString(16)}function Le(ie,$){$=$||Infinity;for(var re,ce=ie.length,be=null,Me=[],ke=0;ke<ce;++ke){if(re=ie.charCodeAt(ke),re>55295&&re<57344){if(!be){if(re>56319){($-=3)>-1&&Me.push(239,191,189);continue}else if(ke+1===ce){($-=3)>-1&&Me.push(239,191,189);continue}be=re;continue}if(re<56320){($-=3)>-1&&Me.push(239,191,189),be=re;continue}re=(be-55296<<10|re-56320)+65536}else be&&(($-=3)>-1&&Me.push(239,191,189));if(be=null,re<128){if(($-=1)<0)break;Me.push(re)}else if(re<2048){if(($-=2)<0)break;Me.push(re>>6|192,re&63|128)}else if(re<65536){if(($-=3)<0)break;Me.push(re>>12|224,re>>6&63|128,re&63|128)}else if(re<1114112){if(($-=4)<0)break;Me.push(re>>18|240,re>>12&63|128,re>>6&63|128,re&63|128)}else throw new Error("Invalid code point")}return Me}function tt(ie){for(var $=[],re=0;re<ie.length;++re)$.push(ie.charCodeAt(re)&255);return $}function Et(ie,$){for(var re,ce,be,Me=[],ke=0;ke<ie.length&&!(($-=2)<0);++ke)re=ie.charCodeAt(ke),ce=re>>8,be=re%256,Me.push(be),Me.push(ce);return Me}function Ie(ie){return N.toByteArray(Fe(ie))}function Qe(ie,$,re,ce){for(var be=0;be<ce&&!(be+re>=$.length||be>=ie.length);++be)$[be+re]=ie[be];return be}function xe(ie){return ie!==ie}}).call(this,k("IyRk"))},HmJG:function(qe,ue,k){},I8Z2:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return Q}),k.d(ue,"b",function(){return v}),k.d(ue,"c",function(){return d});var J=k("q1tI"),N=function(){var E=function(o,n){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var p in u)u.hasOwnProperty(p)&&(s[p]=u[p])},E(o,n)};return function(o,n){E(o,n);function s(){this.constructor=o}o.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),O=J.createContext(null),Q=function(E){N(o,E);function o(){return E!==null&&E.apply(this,arguments)||this}return o.prototype.render=function(){return J.createElement(O.Provider,{value:this.props.store},this.props.children)},o}(J.Component),R=k("Gytx"),B=k.n(R),D=k("2mql"),f=k.n(D),b=function(){var E=function(o,n){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var p in u)u.hasOwnProperty(p)&&(s[p]=u[p])},E(o,n)};return function(o,n){E(o,n);function s(){this.constructor=o}o.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),g=function(){return g=Object.assign||function(E){for(var o,n=1,s=arguments.length;n<s;n++){o=arguments[n];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(E[u]=o[u])}return E},g.apply(this,arguments)};function i(E){return E.displayName||E.name||"Component"}var l=function(){return{}};function v(E,o){o===void 0&&(o={});var n=!!E,s=E||l;return function(p){var S=function(M){b(C,M);function C(c,r){var a=M.call(this,c,r)||this;return a.unsubscribe=null,a.handleChange=function(){if(!a.unsubscribe)return;var A=s(a.store.getState(),a.props);a.setState({subscribed:A})},a.store=a.context,a.state={subscribed:s(a.store.getState(),c),store:a.store,props:c},a}return C.getDerivedStateFromProps=function(c,r){return E&&E.length===2&&c!==r.props?{subscribed:s(r.store.getState(),c),props:c}:{props:c}},C.prototype.componentDidMount=function(){this.trySubscribe()},C.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},C.prototype.shouldComponentUpdate=function(c,r){return!B()(this.props,c)||!B()(this.state.subscribed,r.subscribed)},C.prototype.trySubscribe=function(){n&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},C.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},C.prototype.render=function(){var c=g(g(g({},this.props),this.state.subscribed),{store:this.store});return J.createElement(p,g({},c,{ref:this.props.miniStoreForwardedRef}))},C.displayName="Connect("+i(p)+")",C.contextType=O,C}(J.Component);if(o.forwardRef){var x=J.forwardRef(function(M,C){return J.createElement(S,g({},M,{miniStoreForwardedRef:C}))});return f()(x,p)}return f()(S,p)}}var h=function(){return h=Object.assign||function(E){for(var o,n=1,s=arguments.length;n<s;n++){o=arguments[n];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(E[u]=o[u])}return E},h.apply(this,arguments)};function d(E){var o=E,n=[];function s(S){o=h(h({},o),S);for(var x=0;x<n.length;x++)n[x]()}function u(){return o}function p(S){return n.push(S),function(){var M=n.indexOf(S);n.splice(M,1)}}return{setState:s,getState:u,subscribe:p}}},IBYe:function(qe,ue,k){"use strict";function J(N){return null}ue.a=J},IMiH:function(qe,ue,k){var J=k("Sj9i"),N=k("QBsz"),O=k("4mN7"),Q=k("mFDi"),R=k("LPTA"),B=R.devicePixelRatio,D={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},f=[],b=[],g=[],i=[],l=Math.min,v=Math.max,h=Math.cos,d=Math.sin,E=Math.sqrt,o=Math.abs,n=typeof Float32Array!="undefined",s=function(p){this._saveData=!(p||!1),this._saveData&&(this.data=[]),this._ctx=null};s.prototype={constructor:s,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(p,S,x){x=x||0,this._ux=o(x/B/p)||0,this._uy=o(x/B/S)||0},getContext:function(){return this._ctx},beginPath:function(p){return this._ctx=p,p&&p.beginPath(),p&&(this.dpr=p.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(p,S){return this.addData(D.M,p,S),this._ctx&&this._ctx.moveTo(p,S),this._x0=p,this._y0=S,this._xi=p,this._yi=S,this},lineTo:function(p,S){var x=o(p-this._xi)>this._ux||o(S-this._yi)>this._uy||this._len<5;return this.addData(D.L,p,S),this._ctx&&x&&(this._needsDash()?this._dashedLineTo(p,S):this._ctx.lineTo(p,S)),x&&(this._xi=p,this._yi=S),this},bezierCurveTo:function(p,S,x,M,C,c){return this.addData(D.C,p,S,x,M,C,c),this._ctx&&(this._needsDash()?this._dashedBezierTo(p,S,x,M,C,c):this._ctx.bezierCurveTo(p,S,x,M,C,c)),this._xi=C,this._yi=c,this},quadraticCurveTo:function(p,S,x,M){return this.addData(D.Q,p,S,x,M),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(p,S,x,M):this._ctx.quadraticCurveTo(p,S,x,M)),this._xi=x,this._yi=M,this},arc:function(p,S,x,M,C,c){return this.addData(D.A,p,S,x,x,M,C-M,0,c?0:1),this._ctx&&this._ctx.arc(p,S,x,M,C,c),this._xi=h(C)*x+p,this._yi=d(C)*x+S,this},arcTo:function(p,S,x,M,C){return this._ctx&&this._ctx.arcTo(p,S,x,M,C),this},rect:function(p,S,x,M){return this._ctx&&this._ctx.rect(p,S,x,M),this.addData(D.R,p,S,x,M),this},closePath:function(){this.addData(D.Z);var p=this._ctx,S=this._x0,x=this._y0;return p&&(this._needsDash()&&this._dashedLineTo(S,x),p.closePath()),this._xi=S,this._yi=x,this},fill:function(p){p&&p.fill(),this.toStatic()},stroke:function(p){p&&p.stroke(),this.toStatic()},setLineDash:function(p){if(p instanceof Array){this._lineDash=p,this._dashIdx=0;for(var S=0,x=0;x<p.length;x++)S+=p[x];this._dashSum=S}return this},setLineDashOffset:function(p){return this._dashOffset=p,this},len:function(){return this._len},setData:function(p){var S=p.length;!(this.data&&this.data.length===S)&&n&&(this.data=new Float32Array(S));for(var x=0;x<S;x++)this.data[x]=p[x];this._len=S},appendPath:function(p){p instanceof Array||(p=[p]);for(var S=p.length,x=0,M=this._len,C=0;C<S;C++)x+=p[C].len();n&&this.data instanceof Float32Array&&(this.data=new Float32Array(M+x));for(var C=0;C<S;C++)for(var c=p[C].data,r=0;r<c.length;r++)this.data[M++]=c[r];this._len=M},addData:function(p){if(!this._saveData)return;var S=this.data;this._len+arguments.length>S.length&&(this._expandData(),S=this.data);for(var x=0;x<arguments.length;x++)S[this._len++]=arguments[x];this._prevCmd=p},_expandData:function(){if(!(this.data instanceof Array)){for(var p=[],S=0;S<this._len;S++)p[S]=this.data[S];this.data=p}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(p,S){var x=this._dashSum,M=this._dashOffset,C=this._lineDash,c=this._ctx,r=this._xi,a=this._yi,A=p-r,L=S-a,T=E(A*A+L*L),w=r,_=a,j,W=C.length,Z;for(A/=T,L/=T,M<0&&(M=x+M),M%=x,w-=M*A,_-=M*L;A>0&&w<=p||A<0&&w>=p||A===0&&(L>0&&_<=S||L<0&&_>=S);){if(Z=this._dashIdx,j=C[Z],w+=A*j,_+=L*j,this._dashIdx=(Z+1)%W,A>0&&w<r||A<0&&w>r||L>0&&_<a||L<0&&_>a)continue;c[Z%2?"moveTo":"lineTo"](A>=0?l(w,p):v(w,p),L>=0?l(_,S):v(_,S))}A=w-p,L=_-S,this._dashOffset=-E(A*A+L*L)},_dashedBezierTo:function(p,S,x,M,C,c){var r=this._dashSum,a=this._dashOffset,A=this._lineDash,L=this._ctx,T=this._xi,w=this._yi,_,j,W,Z=J.cubicAt,X=0,G=this._dashIdx,te=A.length,Y,le,Ae=0;for(a<0&&(a=r+a),a%=r,_=0;_<1;_+=.1)j=Z(T,p,x,C,_+.1)-Z(T,p,x,C,_),W=Z(w,S,M,c,_+.1)-Z(w,S,M,c,_),X+=E(j*j+W*W);for(;G<te&&!(Ae+=A[G],Ae>a);G++);for(_=(Ae-a)/X;_<=1;)Y=Z(T,p,x,C,_),le=Z(w,S,M,c,_),G%2?L.moveTo(Y,le):L.lineTo(Y,le),_+=A[G]/X,G=(G+1)%te;G%2!==0&&L.lineTo(C,c),j=C-Y,W=c-le,this._dashOffset=-E(j*j+W*W)},_dashedQuadraticTo:function(p,S,x,M){var C=x,c=M;x=(x+2*p)/3,M=(M+2*S)/3,p=(this._xi+2*p)/3,S=(this._yi+2*S)/3,this._dashedBezierTo(p,S,x,M,C,c)},toStatic:function(){var p=this.data;p instanceof Array&&(p.length=this._len,n&&(this.data=new Float32Array(p)))},getBoundingRect:function(){f[0]=f[1]=g[0]=g[1]=Number.MAX_VALUE,b[0]=b[1]=i[0]=i[1]=-Number.MAX_VALUE;for(var p=this.data,S=0,x=0,M=0,C=0,c=0;c<p.length;){var r=p[c++];c===1&&(S=p[c],x=p[c+1],M=S,C=x);switch(r){case D.M:M=p[c++],C=p[c++],S=M,x=C,g[0]=M,g[1]=C,i[0]=M,i[1]=C;break;case D.L:O.fromLine(S,x,p[c],p[c+1],g,i),S=p[c++],x=p[c++];break;case D.C:O.fromCubic(S,x,p[c++],p[c++],p[c++],p[c++],p[c],p[c+1],g,i),S=p[c++],x=p[c++];break;case D.Q:O.fromQuadratic(S,x,p[c++],p[c++],p[c],p[c+1],g,i),S=p[c++],x=p[c++];break;case D.A:var a=p[c++],A=p[c++],L=p[c++],T=p[c++],w=p[c++],_=p[c++]+w;c+=1;var j=1-p[c++];c===1&&(M=h(w)*L+a,C=d(w)*T+A),O.fromArc(a,A,L,T,w,_,j,g,i),S=h(_)*L+a,x=d(_)*T+A;break;case D.R:M=S=p[c++],C=x=p[c++];var W=p[c++],Z=p[c++];O.fromLine(M,C,M+W,C+Z,g,i);break;case D.Z:S=M,x=C;break}N.min(f,f,g),N.max(b,b,i)}return c===0&&(f[0]=f[1]=b[0]=b[1]=0),new Q(f[0],f[1],b[0]-f[0],b[1]-f[1])},rebuildPath:function(p){for(var S=this.data,x,M,C,c,r,a,A=this._ux,L=this._uy,T=this._len,w=0;w<T;){var _=S[w++];w===1&&(C=S[w],c=S[w+1],x=C,M=c);switch(_){case D.M:x=C=S[w++],M=c=S[w++],p.moveTo(C,c);break;case D.L:r=S[w++],a=S[w++],(o(r-C)>A||o(a-c)>L||w===T-1)&&(p.lineTo(r,a),C=r,c=a);break;case D.C:p.bezierCurveTo(S[w++],S[w++],S[w++],S[w++],S[w++],S[w++]),C=S[w-2],c=S[w-1];break;case D.Q:p.quadraticCurveTo(S[w++],S[w++],S[w++],S[w++]),C=S[w-2],c=S[w-1];break;case D.A:var j=S[w++],W=S[w++],Z=S[w++],X=S[w++],G=S[w++],te=S[w++],Y=S[w++],le=S[w++],Ae=Z>X?Z:X,Be=Z>X?1:Z/X,Ce=Z>X?X/Z:1,Se=Math.abs(Z-X)>.001,Fe=G+te;Se?(p.translate(j,W),p.rotate(Y),p.scale(Be,Ce),p.arc(0,0,Ae,G,Fe,1-le),p.scale(1/Be,1/Ce),p.rotate(-Y),p.translate(-j,-W)):p.arc(j,W,Ae,G,Fe,1-le),w===1&&(x=h(G)*Z+j,M=d(G)*X+W),C=h(Fe)*Z+j,c=d(Fe)*X+W;break;case D.R:x=C=S[w],M=c=S[w+1],p.rect(S[w++],S[w++],S[w++],S[w++]);break;case D.Z:p.closePath(),C=x,c=M}}}},s.CMD=D;var u=s;qe.exports=u},ItGF:function(qe,ue){var k={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?k={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document=="undefined"&&typeof self!="undefined"?k={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator=="undefined"?k={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:k=N(navigator.userAgent);var J=k;function N(O){var Q={},R={},B=O.match(/Firefox\/([\d.]+)/),D=O.match(/MSIE\s([\d.]+)/)||O.match(/Trident\/.+?rv:(([\d.]+))/),f=O.match(/Edge\/([\d.]+)/),b=/micromessenger/i.test(O);return B&&(R.firefox=!0,R.version=B[1]),D&&(R.ie=!0,R.version=D[1]),f&&(R.edge=!0,R.version=f[1]),b&&(R.weChat=!0),{browser:R,os:Q,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!="undefined",touchEventsSupported:"ontouchstart"in window&&!R.ie&&!R.edge,pointerEventsSupported:"onpointerdown"in window&&(R.edge||R.ie&&R.version>=11),domSupported:typeof document!="undefined"}}qe.exports=J},JYp7:function(qe,ue,k){"use strict";k.d(ue,"c",function(){return N}),k.d(ue,"d",function(){return O}),k.d(ue,"f",function(){return R}),k.d(ue,"a",function(){return B}),k.d(ue,"b",function(){return D}),k.d(ue,"e",function(){return f});var J=function(){var b=function(g,i){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,v){l.__proto__=v}||function(l,v){for(var h in v)v.hasOwnProperty(h)&&(l[h]=v[h])},b(g,i)};return function(g,i){b(g,i);function l(){this.constructor=g}g.prototype=i===null?Object.create(i):(l.prototype=i.prototype,new l)}}(),N={done:!0,value:void 0},O;(function(b){var g={next:function(){return N}};function i(){return g}b.empty=i;function l(S){var x=!1;return{next:function(){return x?N:(x=!0,{done:!1,value:S})}}}b.single=l;function v(S,x,M){return x===void 0&&(x=0),M===void 0&&(M=S.length),{next:function(){return x>=M?N:{done:!1,value:S[x++]}}}}b.fromArray=v;function h(S){return{next:function(){var x=S.next();return x.done?N:{done:!1,value:x.value}}}}b.fromNativeIterator=h;function d(S){return S?Array.isArray(S)?b.fromArray(S):S:b.empty()}b.from=d;function E(S,x){return{next:function(){var M=S.next();return M.done?N:{done:!1,value:x(M.value)}}}}b.map=E;function o(S,x){return{next:function(){for(;;){var M=S.next();if(M.done)return N;if(x(M.value))return{done:!1,value:M.value}}}}}b.filter=o;function n(S,x){for(var M=S.next();!M.done;M=S.next())x(M.value)}b.forEach=n;function s(S,x){x===void 0&&(x=Number.POSITIVE_INFINITY);var M=[];if(x===0)return M;for(var C=0,c=S.next();!c.done&&!(M.push(c.value),++C>=x);c=S.next());return M}b.collect=s;function u(){for(var S=[],x=0;x<arguments.length;x++)S[x]=arguments[x];var M=0;return{next:function(){if(M>=S.length)return N;var C=S[M],c=C.next();return c.done?(M++,this.next()):c}}}b.concat=u;function p(S){return new Q(S)}b.chain=p})(O||(O={}));var Q=function(){function b(g){this.it=g}return b.prototype.next=function(){return this.it.next()},b}();function R(b){return Array.isArray(b)?O.fromArray(b):b||O.empty()}var B=function(){function b(g,i,l,v){i===void 0&&(i=0),l===void 0&&(l=g.length),v===void 0&&(v=i-1),this.items=g,this.start=i,this.end=l,this.index=v}return b.prototype.first=function(){return this.index=this.start,this.current()},b.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},b.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},b}(),D=function(b){J(g,b);function g(i,l,v,h){return l===void 0&&(l=0),v===void 0&&(v=i.length),h===void 0&&(h=l-1),b.call(this,i,l,v,h)||this}return g.prototype.current=function(){return b.prototype.current.call(this)},g.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},g.prototype.first=function(){return this.index=this.start,this.current()},g.prototype.last=function(){return this.index=this.end-1,this.current()},g.prototype.parent=function(){return null},g}(B),f=function(){function b(g,i){this.iterator=g,this.fn=i}return b.prototype.next=function(){return this.fn(this.iterator.next())},b}()},K2GJ:function(qe,ue,k){var J=k("fW2E"),N=k("gut8"),O=N.ContextCachedBy,Q=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],R=function(l){this.extendFrom(l,!1)};function B(l,v,h){var d=v.x==null?0:v.x,E=v.x2==null?1:v.x2,o=v.y==null?0:v.y,n=v.y2==null?0:v.y2;v.global||(d=d*h.width+h.x,E=E*h.width+h.x,o=o*h.height+h.y,n=n*h.height+h.y),d=isNaN(d)?0:d,E=isNaN(E)?1:E,o=isNaN(o)?0:o,n=isNaN(n)?0:n;var s=l.createLinearGradient(d,o,E,n);return s}function D(l,v,h){var d=h.width,E=h.height,o=Math.min(d,E),n=v.x==null?.5:v.x,s=v.y==null?.5:v.y,u=v.r==null?.5:v.r;v.global||(n=n*d+h.x,s=s*E+h.y,u=u*o);var p=l.createRadialGradient(n,s,0,n,s,u);return p}R.prototype={constructor:R,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(l,v,h){var d=this,E=h&&h.style,o=!E||l.__attrCachedBy!==O.STYLE_BIND;l.__attrCachedBy=O.STYLE_BIND;for(var n=0;n<Q.length;n++){var s=Q[n],u=s[0];(o||d[u]!==E[u])&&(l[u]=J(l,u,d[u]||s[1]))}if((o||d.fill!==E.fill)&&(l.fillStyle=d.fill),(o||d.stroke!==E.stroke)&&(l.strokeStyle=d.stroke),(o||d.opacity!==E.opacity)&&(l.globalAlpha=d.opacity==null?1:d.opacity),(o||d.blend!==E.blend)&&(l.globalCompositeOperation=d.blend||"source-over"),this.hasStroke()){var p=d.lineWidth;l.lineWidth=p/(this.strokeNoScale&&v&&v.getLineScale?v.getLineScale():1)}},hasFill:function(){var l=this.fill;return l!=null&&l!=="none"},hasStroke:function(){var l=this.stroke;return l!=null&&l!=="none"&&this.lineWidth>0},extendFrom:function(l,v){if(l)for(var h in l)l.hasOwnProperty(h)&&(v===!0||(v===!1?!this.hasOwnProperty(h):l[h]!=null))&&(this[h]=l[h])},set:function(l,v){typeof l=="string"?this[l]=v:this.extendFrom(l,!0)},clone:function(){var l=new this.constructor;return l.extendFrom(this,!0),l},getGradient:function(l,v,h){for(var d=v.type==="radial"?D:B,E=d(l,v,h),o=v.colorStops,n=0;n<o.length;n++)E.addColorStop(o[n].offset,o[n].color);return E}};for(var f=R.prototype,b=0;b<Q.length;b++){var g=Q[b];g[0]in f||(f[g[0]]=g[1])}R.getGradient=f.getGradient;var i=R;qe.exports=i},LPTA:function(qe,ue){var k=1;typeof window!="undefined"&&(k=Math.max(window.devicePixelRatio||1,1));var J=0,N=k;ue.debugMode=J,ue.devicePixelRatio=N},LdHM:function(qe,ue,k){"use strict";k.d(ue,"b",function(){return u}),k.d(ue,"a",function(){return S});var J=k("1OyB"),N=k("vuIU"),O=k("Ji7U"),Q=k("LK+K"),R=k("q1tI"),B=k("rePB"),D=k("Ff2n"),f=k("ODXe"),b=k("4IlW"),g=k("bX4T"),i=k("YrtM"),l=k("TSYQ"),v=k.n(l),h=k("+nKL"),d=k("8OUc"),E=function(te,Y){var le=te.prefixCls,Ae=te.id,Be=te.flattenOptions,Ce=te.childrenAsData,Se=te.values,Fe=te.searchValue,Ve=te.multiple,De=te.defaultActiveFirstOption,Le=te.height,tt=te.itemHeight,Et=te.notFoundContent,Ie=te.open,Qe=te.menuItemSelectedIcon,xe=te.virtual,ie=te.onSelect,$=te.onToggleOpen,re=te.onActiveValue,ce=te.onScroll,be=te.onMouseEnter,Me="".concat(le,"-item"),ke=Object(i.a)(function(){return Be},[Ie,Be],function(At,je){return je[0]&&At[1]!==je[1]}),ct=R.useRef(null),ut=function(je){je.preventDefault()},mt=function(je){ct.current&&ct.current.scrollTo({index:je})},pt=function(je){for(var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ue=ke.length,me=0;me<Ue;me+=1){var ve=(je+me*_e+Ue)%Ue,Ee=ke[ve],Oe=Ee.group,Ye=Ee.data;if(!Oe&&!Ye.disabled)return ve}return-1},Ot=R.useState(function(){return pt(0)}),Ft=Object(f.a)(Ot,2),He=Ft[0],Pe=Ft[1],at=function(je){Pe(je);var _e=ke[je];if(!_e){re(null,-1);return}re(_e.data.value,je)};R.useEffect(function(){at(De!==!1?pt(0):-1)},[ke.length,Fe]),R.useEffect(function(){var At=setTimeout(function(){if(!Ve&&Ie&&Se.size===1){var je=Array.from(Se)[0],_e=ke.findIndex(function(Ue){var me=Ue.data;return me.value===je});at(_e),mt(_e)}});return function(){return clearTimeout(At)}},[Ie]);var vt=function(je){je!==void 0&&ie(je,{selected:!Se.has(je)}),Ve||$(!1)};if(R.useImperativeHandle(Y,function(){return{onKeyDown:function(je){var _e=je.which;switch(_e){case b.a.UP:case b.a.DOWN:{var Ue=0;if(_e===b.a.UP?Ue=-1:_e===b.a.DOWN&&(Ue=1),Ue!==0){var me=pt(He+Ue,Ue);mt(me),at(me)}break}case b.a.ENTER:{var ve=ke[He];ve&&!ve.data.disabled?vt(ve.data.value):vt(void 0),Ie&&je.preventDefault();break}case b.a.ESC:$(!1)}},onKeyUp:function(){},scrollTo:function(je){mt(je)}}}),ke.length===0)return R.createElement("div",{role:"listbox",id:"".concat(Ae,"_list"),className:"".concat(Me,"-empty"),onMouseDown:ut},Et);function et(At){var je=ke[At];if(!je)return null;var _e=je.data||{},Ue=_e.value,me=_e.label,ve=_e.children,Ee=Object(g.a)(_e,!0),Oe=Ce?ve:me;return je?R.createElement("div",Object.assign({"aria-label":typeof Oe=="string"?Oe:null},Ee,{key:At,role:"option",id:"".concat(Ae,"_list_").concat(At),"aria-selected":Se.has(Ue)}),Ue):null}return R.createElement(R.Fragment,null,R.createElement("div",{role:"listbox",id:"".concat(Ae,"_list"),style:{height:0,width:0,overflow:"hidden"}},et(He-1),et(He),et(He+1)),R.createElement(h.a,{itemKey:"key",ref:ct,data:ke,height:Le,itemHeight:tt,fullHeight:!1,onMouseDown:ut,onScroll:ce,virtual:xe,onMouseEnter:be},function(At,je){var _e,Ue=At.group,me=At.groupOption,ve=At.data,Ee=ve.label,Oe=ve.key;if(Ue)return R.createElement("div",{className:v()(Me,"".concat(Me,"-group"))},Ee!==void 0?Ee:Oe);var Ye=ve.disabled,ze=ve.value,gt=ve.title,Lt=ve.children,Pt=ve.style,Rt=ve.className,Dt=Object(D.a)(ve,["disabled","value","title","children","style","className"]),dt=Se.has(ze),it="".concat(Me,"-option"),nt=v()(Me,it,Rt,(_e={},Object(B.a)(_e,"".concat(it,"-grouped"),me),Object(B.a)(_e,"".concat(it,"-active"),He===je&&!Ye),Object(B.a)(_e,"".concat(it,"-disabled"),Ye),Object(B.a)(_e,"".concat(it,"-selected"),dt),_e)),we=Ce?Lt:Ee,Ne=!Qe||typeof Qe=="function"||dt;return R.createElement("div",Object.assign({},Dt,{"aria-selected":dt,className:nt,title:gt,onMouseMove:function(){if(He===je||Ye)return;at(je)},onClick:function(){Ye||vt(ze)},style:Pt}),R.createElement("div",{className:"".concat(it,"-content")},we||ze),R.isValidElement(Qe)||dt,Ne&&R.createElement(d.a,{className:"".concat(Me,"-option-state"),customizeIcon:Qe,customizeIconProps:{isSelected:dt}},dt?"\u2713":null))}))},o=R.forwardRef(E);o.displayName="OptionList";var n=o,s=function(){return null};s.isSelectOption=!0;var u=s,p=function(){return null};p.isSelectOptGroup=!0;var S=p,x=k("VTBJ"),M=k("Zm9Q");function C(G){var te=G.key,Y=G.props,le=Y.children,Ae=Y.value,Be=Object(D.a)(Y,["children","value"]);return Object(x.a)({key:te,value:Ae!==void 0?Ae:te,children:le},Be)}function c(G){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(M.a)(G).map(function(Y,le){if(!R.isValidElement(Y)||!Y.type)return null;var Ae=Y.type.isSelectOptGroup,Be=Y.key,Ce=Y.props,Se=Ce.children,Fe=Object(D.a)(Ce,["children"]);return te||!Ae?C(Y):Object(x.a)(Object(x.a)({key:"__RC_SELECT_GRP__".concat(Be===null?le:Be,"__"),label:Be},Fe),{},{options:c(Se)})}).filter(function(Y){return Y})}var r=k("2Qr1"),a=k("qNPg"),A=k("U8pU"),L=k("Kwbf"),T=k("WKfj");function w(G){var te=G.mode,Y=G.options,le=G.children,Ae=G.backfill,Be=G.allowClear,Ce=G.placeholder,Se=G.getInputElement,Fe=G.showSearch,Ve=G.onSearch,De=G.defaultOpen,Le=G.autoFocus,tt=G.labelInValue,Et=G.value,Ie=G.inputValue,Qe=G.optionLabelProp,xe=te==="multiple"||te==="tags",ie=Fe!==void 0?Fe:xe||te==="combobox",$=Y||c(le);if(Object(L.a)(te!=="tags"||$.every(function(Me){return!Me.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),te==="tags"||te==="combobox"){var re=$.some(function(Me){return Me.options?Me.options.some(function(ke){return typeof("value"in ke?ke.value:ke.key)=="number"}):typeof("value"in Me?Me.value:Me.key)=="number"});Object(L.a)(!re,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(L.a)(te!=="combobox"||!Qe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(L.a)(te==="combobox"||!Ae,"`backfill` only works with `combobox` mode."),Object(L.a)(te==="combobox"||!Se,"`getInputElement` only work with `combobox` mode."),Object(L.b)(te!=="combobox"||!Se||!Be||!Ce,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ve&&!ie&&te!=="combobox"&&te!=="tags"&&Object(L.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(L.b)(!De||Le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Et!=null){var ce=Object(T.d)(Et);Object(L.a)(!tt||ce.every(function(Me){return Object(A.a)(Me)==="object"&&("key"in Me||"value"in Me)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(L.a)(!xe||Array.isArray(Et),"`value` should be array when `mode` is `multiple` or `tags`")}if(le){var be=null;Object(M.a)(le).some(function(Me){if(!R.isValidElement(Me)||!Me.type)return!1;var ke=Me.type;if(ke.isSelectOption)return!1;if(ke.isSelectOptGroup){var ct=Object(M.a)(Me.props.children).every(function(ut){return!R.isValidElement(ut)||!Me.type||ut.type.isSelectOption?!0:(be=ut.type,!1)});return!ct}return be=ke,!0}),be&&Object(L.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(be.displayName||be.name||be,"`.")),Object(L.a)(Ie===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var _=w,j=Object(a.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:c,flattenOptions:r.d,getLabeledValue:r.e,filterOptions:r.b,isValueDisabled:r.g,findValueOption:r.c,warningProps:_,fillOptionsWithMissingValue:r.a}),W=function(G){Object(O.a)(Y,G);var te=Object(Q.a)(Y);function Y(){var le;return Object(J.a)(this,Y),le=te.apply(this,arguments),le.selectRef=R.createRef(),le.focus=function(){le.selectRef.current.focus()},le.blur=function(){le.selectRef.current.blur()},le}return Object(N.a)(Y,[{key:"render",value:function(){return R.createElement(j,Object.assign({ref:this.selectRef},this.props))}}]),Y}(R.Component);W.Option=u,W.OptGroup=S;var Z=W,X=ue.c=Z},M8RZ:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return b});var J=k("fWQN"),N=k("mtLc"),O=k("yKVA"),Q=k("879j"),R=k("q1tI"),B=k.n(R),D=k("i8i4"),f=k.n(D),b=function(g){Object(O.a)(l,g);var i=Object(Q.a)(l);function l(v){var h;Object(J.a)(this,l),h=i.call(this,v);var d=window.document;return h.node=d.createElement("div"),d.body.appendChild(h.node),h}return Object(N.a)(l,[{key:"render",value:function(){var h=this.props.children;return Object(D.createPortal)(h,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),l}(B.a.Component)},MEGo:function(qe,ue,k){var J=k("4fz+"),N=k("Dagg"),O=k("dqUG"),Q=k("2fw6"),R=k("x6Kt"),B=k("rmlV"),D=k("yxFR"),f=k("y+Vt"),b=k("h7HQ"),g=k("1Jh7"),i=k("SKnc"),l=k("K2GJ"),v=k("Fofx"),h=k("NC18"),d=h.createFromString,E=k("bYtY"),o=E.isString,n=E.extend,s=E.defaults,u=E.trim,p=E.each,S=/[\s,]+/;function x(Y){if(o(Y)){var le=new DOMParser;Y=le.parseFromString(Y,"text/xml")}for(Y.nodeType===9&&(Y=Y.firstChild);Y.nodeName.toLowerCase()!=="svg"||Y.nodeType!==1;)Y=Y.nextSibling;return Y}function M(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}M.prototype.parse=function(Y,le){le=le||{};var Ae=x(Y);if(!Ae)throw new Error("Illegal svg");var Be=new J;this._root=Be;var Ce=Ae.getAttribute("viewBox")||"",Se=parseFloat(Ae.getAttribute("width")||le.width),Fe=parseFloat(Ae.getAttribute("height")||le.height);isNaN(Se)&&(Se=null),isNaN(Fe)&&(Fe=null),T(Ae,Be,null,!0);for(var Ve=Ae.firstChild;Ve;)this._parseNode(Ve,Be),Ve=Ve.nextSibling;var De,Le;if(Ce){var tt=u(Ce).split(S);tt.length>=4&&(De={x:parseFloat(tt[0]||0),y:parseFloat(tt[1]||0),width:parseFloat(tt[2]),height:parseFloat(tt[3])})}if(De&&Se!=null&&Fe!=null&&(Le=G(De,Se,Fe),!le.ignoreViewBox)){var Et=Be;Be=new J,Be.add(Et),Et.scale=Le.scale.slice(),Et.position=Le.position.slice()}return!le.ignoreRootClip&&Se!=null&&Fe!=null&&Be.setClipPath(new R({shape:{x:0,y:0,width:Se,height:Fe}})),{root:Be,width:Se,height:Fe,viewBoxRect:De,viewBoxTransform:Le}},M.prototype._parseNode=function(Y,le){var Ae=Y.nodeName.toLowerCase();Ae==="defs"?this._isDefine=!0:Ae==="text"&&(this._isText=!0);var Be;if(this._isDefine){var Ce=c[Ae];if(Ce){var Se=Ce.call(this,Y),Fe=Y.getAttribute("id");Fe&&(this._defs[Fe]=Se)}}else{var Ce=C[Ae];Ce&&(Be=Ce.call(this,Y,le),le.add(Be))}for(var Ve=Y.firstChild;Ve;)Ve.nodeType===1&&this._parseNode(Ve,Be),Ve.nodeType===3&&this._isText&&this._parseText(Ve,Be),Ve=Ve.nextSibling;Ae==="defs"?this._isDefine=!1:Ae==="text"&&(this._isText=!1)},M.prototype._parseText=function(Y,le){if(Y.nodeType===1){var Ae=Y.getAttribute("dx")||0,Be=Y.getAttribute("dy")||0;this._textX+=parseFloat(Ae),this._textY+=parseFloat(Be)}var Ce=new O({style:{text:Y.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});a(le,Ce),T(Y,Ce,this._defs);var Se=Ce.style.fontSize;Se&&Se<9&&(Ce.style.fontSize=9,Ce.scale=Ce.scale||[1,1],Ce.scale[0]*=Se/9,Ce.scale[1]*=Se/9);var Fe=Ce.getBoundingRect();return this._textX+=Fe.width,le.add(Ce),Ce};var C={g:function(Y,le){var Ae=new J;return a(le,Ae),T(Y,Ae,this._defs),Ae},rect:function(Y,le){var Ae=new R;return a(le,Ae),T(Y,Ae,this._defs),Ae.setShape({x:parseFloat(Y.getAttribute("x")||0),y:parseFloat(Y.getAttribute("y")||0),width:parseFloat(Y.getAttribute("width")||0),height:parseFloat(Y.getAttribute("height")||0)}),Ae},circle:function(Y,le){var Ae=new Q;return a(le,Ae),T(Y,Ae,this._defs),Ae.setShape({cx:parseFloat(Y.getAttribute("cx")||0),cy:parseFloat(Y.getAttribute("cy")||0),r:parseFloat(Y.getAttribute("r")||0)}),Ae},line:function(Y,le){var Ae=new D;return a(le,Ae),T(Y,Ae,this._defs),Ae.setShape({x1:parseFloat(Y.getAttribute("x1")||0),y1:parseFloat(Y.getAttribute("y1")||0),x2:parseFloat(Y.getAttribute("x2")||0),y2:parseFloat(Y.getAttribute("y2")||0)}),Ae},ellipse:function(Y,le){var Ae=new B;return a(le,Ae),T(Y,Ae,this._defs),Ae.setShape({cx:parseFloat(Y.getAttribute("cx")||0),cy:parseFloat(Y.getAttribute("cy")||0),rx:parseFloat(Y.getAttribute("rx")||0),ry:parseFloat(Y.getAttribute("ry")||0)}),Ae},polygon:function(Y,le){var Ae=Y.getAttribute("points");Ae&&(Ae=A(Ae));var Be=new b({shape:{points:Ae||[]}});return a(le,Be),T(Y,Be,this._defs),Be},polyline:function(Y,le){var Ae=new f;a(le,Ae),T(Y,Ae,this._defs);var Be=Y.getAttribute("points");Be&&(Be=A(Be));var Ce=new g({shape:{points:Be||[]}});return Ce},image:function(Y,le){var Ae=new N;return a(le,Ae),T(Y,Ae,this._defs),Ae.setStyle({image:Y.getAttribute("xlink:href"),x:Y.getAttribute("x"),y:Y.getAttribute("y"),width:Y.getAttribute("width"),height:Y.getAttribute("height")}),Ae},text:function(Y,le){var Ae=Y.getAttribute("x")||0,Be=Y.getAttribute("y")||0,Ce=Y.getAttribute("dx")||0,Se=Y.getAttribute("dy")||0;this._textX=parseFloat(Ae)+parseFloat(Ce),this._textY=parseFloat(Be)+parseFloat(Se);var Fe=new J;return a(le,Fe),T(Y,Fe,this._defs),Fe},tspan:function(Y,le){var Ae=Y.getAttribute("x"),Be=Y.getAttribute("y");Ae!=null&&(this._textX=parseFloat(Ae)),Be!=null&&(this._textY=parseFloat(Be));var Ce=Y.getAttribute("dx")||0,Se=Y.getAttribute("dy")||0,Fe=new J;return a(le,Fe),T(Y,Fe,this._defs),this._textX+=Ce,this._textY+=Se,Fe},path:function(Y,le){var Ae=Y.getAttribute("d")||"",Be=d(Ae);return a(le,Be),T(Y,Be,this._defs),Be}},c={lineargradient:function(Y){var le=parseInt(Y.getAttribute("x1")||0,10),Ae=parseInt(Y.getAttribute("y1")||0,10),Be=parseInt(Y.getAttribute("x2")||10,10),Ce=parseInt(Y.getAttribute("y2")||0,10),Se=new i(le,Ae,Be,Ce);return r(Y,Se),Se},radialgradient:function(Y){}};function r(Y,le){for(var Ae=Y.firstChild;Ae;){if(Ae.nodeType===1){var Be=Ae.getAttribute("offset");Be.indexOf("%")>0?Be=parseInt(Be,10)/100:Be?Be=parseFloat(Be):Be=0;var Ce=Ae.getAttribute("stop-color")||"#000000";le.addColorStop(Be,Ce)}Ae=Ae.nextSibling}}function a(Y,le){Y&&Y.__inheritedStyle&&(le.__inheritedStyle||(le.__inheritedStyle={}),s(le.__inheritedStyle,Y.__inheritedStyle))}function A(Y){for(var le=u(Y).split(S),Ae=[],Be=0;Be<le.length;Be+=2){var Ce=parseFloat(le[Be]),Se=parseFloat(le[Be+1]);Ae.push([Ce,Se])}return Ae}var L={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 T(Y,le,Ae,Be){var Ce=le.__inheritedStyle||{},Se=le.type==="text";if(Y.nodeType===1&&(W(Y,le),n(Ce,X(Y)),!Be)){for(var Fe in L)if(L.hasOwnProperty(Fe)){var Ve=Y.getAttribute(Fe);Ve!=null&&(Ce[L[Fe]]=Ve)}}var De=Se?"textFill":"fill",Le=Se?"textStroke":"stroke";le.style=le.style||new l;var tt=le.style;Ce.fill!=null&&tt.set(De,_(Ce.fill,Ae)),Ce.stroke!=null&&tt.set(Le,_(Ce.stroke,Ae)),p(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(Et){var Ie=Et==="lineWidth"&&Se?"textStrokeWidth":Et;Ce[Et]!=null&&tt.set(Ie,parseFloat(Ce[Et]))}),(!Ce.textBaseline||Ce.textBaseline==="auto")&&(Ce.textBaseline="alphabetic"),Ce.textBaseline==="alphabetic"&&(Ce.textBaseline="bottom"),Ce.textAlign==="start"&&(Ce.textAlign="left"),Ce.textAlign==="end"&&(Ce.textAlign="right"),p(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(Et){Ce[Et]!=null&&tt.set(Et,Ce[Et])}),Ce.lineDash&&(le.style.lineDash=u(Ce.lineDash).split(S)),tt[Le]&&tt[Le]!=="none"&&(le[Le]=!0),le.__inheritedStyle=Ce}var w=/url\(\s*#(.*?)\)/;function _(Y,le){var Ae=le&&Y&&Y.match(w);if(Ae){var Be=u(Ae[1]),Ce=le[Be];return Ce}return Y}var j=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;function W(Y,le){var Ae=Y.getAttribute("transform");if(Ae){Ae=Ae.replace(/,/g," ");var Be=null,Ce=[];Ae.replace(j,function(De,Le,tt){Ce.push(Le,tt)});for(var Se=Ce.length-1;Se>0;Se-=2){var Fe=Ce[Se],Ve=Ce[Se-1];Be=Be||v.create();switch(Ve){case"translate":Fe=u(Fe).split(S),v.translate(Be,Be,[parseFloat(Fe[0]),parseFloat(Fe[1]||0)]);break;case"scale":Fe=u(Fe).split(S),v.scale(Be,Be,[parseFloat(Fe[0]),parseFloat(Fe[1]||Fe[0])]);break;case"rotate":Fe=u(Fe).split(S),v.rotate(Be,Be,parseFloat(Fe[0]));break;case"skew":Fe=u(Fe).split(S),console.warn("Skew transform is not supported yet");break;case"matrix":var Fe=u(Fe).split(S);Be[0]=parseFloat(Fe[0]),Be[1]=parseFloat(Fe[1]),Be[2]=parseFloat(Fe[2]),Be[3]=parseFloat(Fe[3]),Be[4]=parseFloat(Fe[4]),Be[5]=parseFloat(Fe[5]);break}}le.setLocalTransform(Be)}}var Z=/([^\s:;]+)\s*:\s*([^:;]+)/g;function X(Y){var le=Y.getAttribute("style"),Ae={};if(!le)return Ae;var Be={};Z.lastIndex=0;for(var Ce;(Ce=Z.exec(le))!=null;)Be[Ce[1]]=Ce[2];for(var Se in L)L.hasOwnProperty(Se)&&Be[Se]!=null&&(Ae[L[Se]]=Be[Se]);return Ae}function G(Y,le,Ae){var Be=le/Y.width,Ce=Ae/Y.height,Se=Math.min(Be,Ce),Fe=[Se,Se],Ve=[-(Y.x+Y.width/2)*Se+le/2,-(Y.y+Y.height/2)*Se+Ae/2];return{scale:Fe,position:Ve}}function te(Y,le){var Ae=new M;return Ae.parse(Y,le)}ue.parseXML=x,ue.makeViewBoxTransform=G,ue.parseSVG=te},MI8n:function(qe,ue,k){"use strict";k.d(ue,"b",function(){return B}),k.d(ue,"a",function(){return b}),k.d(ue,"e",function(){return g}),k.d(ue,"d",function(){return i}),k.d(ue,"c",function(){return l}),k.d(ue,"f",function(){return v});var J=k("/cxE"),N=k("C/vA"),O=k("pmY6"),Q=k("24hK"),R=function(){var h=function(d,E){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s])},h(d,E)};return function(d,E){h(d,E);function o(){this.constructor=d}d.prototype=E===null?Object.create(E):(o.prototype=E.prototype,new o)}}(),B;(function(h){h.None=function(){return O.a.None};function d(_){return function(j,W,Z){W===void 0&&(W=null);var X=!1,G;return G=_(function(te){return X?void 0:(G?G.dispose():X=!0,j.call(W,te))},null,Z),X&&G.dispose(),G}}h.once=d;function E(_,j){return S(function(W,Z,X){return Z===void 0&&(Z=null),_(function(G){return W.call(Z,j(G))},null,X)})}h.map=E;function o(_,j){return S(function(W,Z,X){return Z===void 0&&(Z=null),_(function(G){j(G),W.call(Z,G)},null,X)})}h.forEach=o;function n(_,j){return S(function(W,Z,X){return Z===void 0&&(Z=null),_(function(G){return j(G)&&W.call(Z,G)},null,X)})}h.filter=n;function s(_){return _}h.signal=s;function u(){for(var _=[],j=0;j<arguments.length;j++)_[j]=arguments[j];return function(W,Z,X){return Z===void 0&&(Z=null),O.e.apply(void 0,_.map(function(G){return G(function(te){return W.call(Z,te)},null,X)}))}}h.any=u;function p(_,j,W){var Z=W;return E(_,function(X){return Z=j(Z,X),Z})}h.reduce=p;function S(_){var j,W=new b({onFirstListenerAdd:function(){j=_(W.fire,W)},onLastListenerRemove:function(){j.dispose()}});return W.event}h.snapshot=S;function x(_,j,W,Z,X){W===void 0&&(W=100),Z===void 0&&(Z=!1);var G,te=void 0,Y=void 0,le=0,Ae=new b({leakWarningThreshold:X,onFirstListenerAdd:function(){G=_(function(Be){le++,te=j(te,Be),Z&&!Y&&(Ae.fire(te),te=void 0),clearTimeout(Y),Y=setTimeout(function(){var Ce=te;te=void 0,Y=void 0,(!Z||le>1)&&Ae.fire(Ce),le=0},W)})},onLastListenerRemove:function(){G.dispose()}});return Ae.event}h.debounce=x;function M(_){var j=new Date().getTime();return E(d(_),function(W){return new Date().getTime()-j})}h.stopwatch=M;function C(_){var j=!0,W;return n(_,function(Z){var X=j||Z!==W;return j=!1,W=Z,X})}h.latch=C;function c(_,j,W){j===void 0&&(j=!1),W===void 0&&(W=[]);var Z=W.slice(),X=_(function(Y){Z?Z.push(Y):te.fire(Y)}),G=function(){Z&&Z.forEach(function(Y){return te.fire(Y)}),Z=null},te=new b({onFirstListenerAdd:function(){X||(X=_(function(Y){return te.fire(Y)}))},onFirstListenerDidAdd:function(){Z&&(j?setTimeout(G):G())},onLastListenerRemove:function(){X&&X.dispose(),X=null}});return te.event}h.buffer=c;var r=function(){function _(j){this.event=j}return _.prototype.map=function(j){return new _(E(this.event,j))},_.prototype.forEach=function(j){return new _(o(this.event,j))},_.prototype.filter=function(j){return new _(n(this.event,j))},_.prototype.reduce=function(j,W){return new _(p(this.event,j,W))},_.prototype.latch=function(){return new _(C(this.event))},_.prototype.debounce=function(j,W,Z,X){return W===void 0&&(W=100),Z===void 0&&(Z=!1),new _(x(this.event,j,W,Z,X))},_.prototype.on=function(j,W,Z){return this.event(j,W,Z)},_.prototype.once=function(j,W,Z){return d(this.event)(j,W,Z)},_}();function a(_){return new r(_)}h.chain=a;function A(_,j,W){W===void 0&&(W=function(Y){return Y});var Z=function(){for(var Y=[],le=0;le<arguments.length;le++)Y[le]=arguments[le];return te.fire(W.apply(void 0,Y))},X=function(){return _.on(j,Z)},G=function(){return _.removeListener(j,Z)},te=new b({onFirstListenerAdd:X,onLastListenerRemove:G});return te.event}h.fromNodeEventEmitter=A;function L(_,j,W){W===void 0&&(W=function(Y){return Y});var Z=function(){for(var Y=[],le=0;le<arguments.length;le++)Y[le]=arguments[le];return te.fire(W.apply(void 0,Y))},X=function(){return _.addEventListener(j,Z)},G=function(){return _.removeEventListener(j,Z)},te=new b({onFirstListenerAdd:X,onLastListenerRemove:G});return te.event}h.fromDOMEventEmitter=L;function T(_){var j=new b,W=!1;return _.then(void 0,function(){return null}).then(function(){W?j.fire(void 0):setTimeout(function(){return j.fire(void 0)},0)}),W=!0,j.event}h.fromPromise=T;function w(_){return new Promise(function(j){return d(_)(j)})}h.toPromise=w})(B||(B={}));var D=-1,f=function(){function h(d,E){E===void 0&&(E=Math.random().toString(18).slice(2,5)),this.customThreshold=d,this.name=E,this._warnCountdown=0}return h.prototype.dispose=function(){this._stacks&&this._stacks.clear()},h.prototype.check=function(d){var E=this,o=D;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||d<o)return;this._stacks||(this._stacks=new Map);var n=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),s=this._stacks.get(n)||0;if(this._stacks.set(n,s+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=o*.5;var u,p=0;this._stacks.forEach(function(S,x){(!u||p<S)&&(u=x,p=S)}),console.warn("["+this.name+"] potential listener LEAK detected, having "+d+" listeners already. MOST frequent listener ("+p+"):"),console.warn(u)}return function(){var S=E._stacks.get(n)||0;E._stacks.set(n,S-1)}},h}(),b=function(){function h(d){this._disposed=!1,this._options=d,this._leakageMon=D>0?new f(this._options&&this._options.leakWarningThreshold):void 0}return Object.defineProperty(h.prototype,"event",{get:function(){var d=this;return this._event||(this._event=function(E,o,n){d._listeners||(d._listeners=new Q.a);var s=d._listeners.isEmpty();s&&d._options&&d._options.onFirstListenerAdd&&d._options.onFirstListenerAdd(d);var u=d._listeners.push(o?[E,o]:E);s&&d._options&&d._options.onFirstListenerDidAdd&&d._options.onFirstListenerDidAdd(d),d._options&&d._options.onListenerDidAdd&&d._options.onListenerDidAdd(d,E,o);var p;d._leakageMon&&(p=d._leakageMon.check(d._listeners.size));var S;return S={dispose:function(){if(p&&p(),S.dispose=h._noop,!d._disposed&&(u(),d._options&&d._options.onLastListenerRemove)){var x=d._listeners&&!d._listeners.isEmpty();x||d._options.onLastListenerRemove(d)}}},n instanceof O.b?n.add(S):Array.isArray(n)&&n.push(S),S}),this._event},enumerable:!0,configurable:!0}),h.prototype.fire=function(d){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Q.a);for(var E=this._listeners.iterator(),o=E.next();!o.done;o=E.next())this._deliveryQueue.push([o.value,d]);for(;this._deliveryQueue.size>0;){var n=this._deliveryQueue.shift(),s=n[0],u=n[1];try{typeof s=="function"?s.call(void 0,u):s[0].call(s[1],u)}catch(p){Object(J.e)(p)}}}},h.prototype.dispose=function(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},h._noop=function(){},h}(),g=function(h){R(d,h);function d(E){var o=h.call(this,E)||this;return o._isPaused=0,o._eventQueue=new Q.a,o._mergeFn=E&&E.merge,o}return d.prototype.pause=function(){this._isPaused++},d.prototype.resume=function(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){var E=this._eventQueue.toArray();this._eventQueue.clear(),h.prototype.fire.call(this,this._mergeFn(E))}else for(;!this._isPaused&&this._eventQueue.size!==0;)h.prototype.fire.call(this,this._eventQueue.shift())},d.prototype.fire=function(E){this._listeners&&(this._isPaused!==0?this._eventQueue.push(E):h.prototype.fire.call(this,E))},d}(b),i=function(){function h(){var d=this;this.hasListeners=!1,this.events=[],this.emitter=new b({onFirstListenerAdd:function(){return d.onFirstListenerAdd()},onLastListenerRemove:function(){return d.onLastListenerRemove()}})}return Object.defineProperty(h.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),h.prototype.add=function(d){var E=this,o={event:d,listener:null};this.events.push(o),this.hasListeners&&this.hook(o);var n=function(){E.hasListeners&&E.unhook(o);var s=E.events.indexOf(o);E.events.splice(s,1)};return Object(O.h)(Object(N.a)(n))},h.prototype.onFirstListenerAdd=function(){var d=this;this.hasListeners=!0,this.events.forEach(function(E){return d.hook(E)})},h.prototype.onLastListenerRemove=function(){var d=this;this.hasListeners=!1,this.events.forEach(function(E){return d.unhook(E)})},h.prototype.hook=function(d){var E=this;d.listener=d.event(function(o){return E.emitter.fire(o)})},h.prototype.unhook=function(d){d.listener&&d.listener.dispose(),d.listener=null},h.prototype.dispose=function(){this.emitter.dispose()},h}(),l=function(){function h(){this.buffers=[]}return h.prototype.wrapEvent=function(d){var E=this;return function(o,n,s){return d(function(u){var p=E.buffers[E.buffers.length-1];p?p.push(function(){return o.call(n,u)}):o.call(n,u)},void 0,s)}},h.prototype.bufferEvents=function(d){var E=[];this.buffers.push(E);var o=d();return this.buffers.pop(),E.forEach(function(n){return n()}),o},h}(),v=function(){function h(){var d=this;this.listening=!1,this.inputEvent=B.None,this.inputEventListener=O.a.None,this.emitter=new b({onFirstListenerDidAdd:function(){d.listening=!0,d.inputEventListener=d.inputEvent(d.emitter.fire,d.emitter)},onLastListenerRemove:function(){d.listening=!1,d.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(h.prototype,"input",{set:function(d){this.inputEvent=d,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=d(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),h.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},h}()},MKOG:function(qe,ue,k){var J=k("bYtY"),N=k("YH21"),O=N.Dispatcher,Q=k("mLcG"),R=k("Bq2U"),B=function(f){f=f||{},this.stage=f.stage||{},this.onframe=f.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,O.call(this)};B.prototype={constructor:B,addClip:function(f){this._clips.push(f)},addAnimator:function(f){f.animation=this;for(var b=f.getClips(),g=0;g<b.length;g++)this.addClip(b[g])},removeClip:function(f){var b=J.indexOf(this._clips,f);b>=0&&this._clips.splice(b,1)},removeAnimator:function(f){for(var b=f.getClips(),g=0;g<b.length;g++)this.removeClip(b[g]);f.animation=null},_update:function(){for(var f=new Date().getTime()-this._pausedTime,b=f-this._time,g=this._clips,i=g.length,l=[],v=[],h=0;h<i;h++){var d=g[h],E=d.step(f,b);E&&(l.push(E),v.push(d))}for(var h=0;h<i;)g[h]._needsRemove?(g[h]=g[i-1],g.pop(),i--):h++;i=l.length;for(var h=0;h<i;h++)v[h].fire(l[h]);this._time=f,this.onframe(b),this.trigger("frame",b),this.stage.update&&this.stage.update()},_startLoop:function(){var f=this;this._running=!0;function b(){f._running&&(Q(b),!f._paused&&f._update())}Q(b)},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(f,b){b=b||{};var g=new R(f,b.loop,b.getter,b.setter);return this.addAnimator(g),g}},J.mixin(B,O);var D=B;qe.exports=D},N0LK:function(qe,ue,k){"use strict";k.d(ue,"x",function(){return J}),k.d(ue,"F",function(){return N}),k.d(ue,"r",function(){return Q}),k.d(ue,"o",function(){return R}),k.d(ue,"p",function(){return B}),k.d(ue,"Q",function(){return D}),k.d(ue,"K",function(){return b}),k.d(ue,"k",function(){return g}),k.d(ue,"N",function(){return i}),k.d(ue,"m",function(){return l}),k.d(ue,"l",function(){return v}),k.d(ue,"I",function(){return h}),k.d(ue,"H",function(){return d}),k.d(ue,"q",function(){return E}),k.d(ue,"t",function(){return o}),k.d(ue,"D",function(){return n}),k.d(ue,"e",function(){return s}),k.d(ue,"f",function(){return u}),k.d(ue,"B",function(){return p}),k.d(ue,"C",function(){return S}),k.d(ue,"n",function(){return M}),k.d(ue,"O",function(){return c}),k.d(ue,"c",function(){return r}),k.d(ue,"d",function(){return a}),k.d(ue,"z",function(){return A}),k.d(ue,"A",function(){return L}),k.d(ue,"u",function(){return T}),k.d(ue,"E",function(){return _}),k.d(ue,"G",function(){return j}),k.d(ue,"i",function(){return Z}),k.d(ue,"g",function(){return G}),k.d(ue,"v",function(){return Y}),k.d(ue,"h",function(){return le}),k.d(ue,"y",function(){return Ae}),k.d(ue,"w",function(){return Be}),k.d(ue,"a",function(){return Ce}),k.d(ue,"P",function(){return Se}),k.d(ue,"L",function(){return Fe}),k.d(ue,"J",function(){return Ve}),k.d(ue,"j",function(){return De}),k.d(ue,"M",function(){return Le}),k.d(ue,"s",function(){return tt}),k.d(ue,"b",function(){return Et});function J(xe){return!xe||typeof xe!="string"?!0:xe.trim().length===0}function N(xe,ie,$){$===void 0&&($="0");for(var re=""+xe,ce=[re],be=re.length;be<ie;be++)ce.push($);return ce.reverse().join("")}var O=/{(\d+)}/g;function Q(xe){for(var ie=[],$=1;$<arguments.length;$++)ie[$-1]=arguments[$];return ie.length===0?xe:xe.replace(O,function(re,ce){var be=parseInt(ce,10);return isNaN(be)||be<0||be>=ie.length?re:ie[be]})}function R(xe){return xe.replace(/[<>&]/g,function(ie){switch(ie){case"<":return"<";case">":return">";case"&":return"&";default:return ie}})}function B(xe){return xe.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function D(xe,ie){ie===void 0&&(ie=" ");var $=f(xe,ie);return b($,ie)}function f(xe,ie){if(!xe||!ie)return xe;var $=ie.length;if($===0||xe.length===0)return xe;for(var re=0;xe.indexOf(ie,re)===re;)re=re+$;return xe.substring(re)}function b(xe,ie){if(!xe||!ie)return xe;var $=ie.length,re=xe.length;if($===0||re===0)return xe;for(var ce=re,be=-1;!(be=xe.lastIndexOf(ie,ce-1),be===-1||be+$!==ce);){if(be===0)return"";ce=be}return xe.substring(0,ce)}function g(xe){return xe.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function i(xe,ie){if(xe.length<ie.length)return!1;if(xe===ie)return!0;for(var $=0;$<ie.length;$++)if(xe[$]!==ie[$])return!1;return!0}function l(xe,ie){var $=xe.length-ie.length;return $>0?xe.indexOf(ie,$)===$:$===0?xe===ie:!1}function v(xe,ie,$){if($===void 0&&($={}),!xe)throw new Error("Cannot create regex from empty string");ie||(xe=B(xe)),$.wholeWord&&(/\B/.test(xe.charAt(0))||(xe="\\b"+xe),/\B/.test(xe.charAt(xe.length-1))||(xe=xe+"\\b"));var re="";return $.global&&(re+="g"),$.matchCase||(re+="i"),$.multiline&&(re+="m"),$.unicode&&(re+="u"),new RegExp(xe,re)}function h(xe){if(xe.source==="^"||xe.source==="^$"||xe.source==="$"||xe.source==="^\\s*$")return!1;var ie=xe.exec("");return!!(ie&&xe.lastIndex===0)}function d(xe){return(xe.global?"g":"")+(xe.ignoreCase?"i":"")+(xe.multiline?"m":"")+(xe.unicode?"u":"")}function E(xe){for(var ie=0,$=xe.length;ie<$;ie++){var re=xe.charCodeAt(ie);if(re!==32&&re!==9)return ie}return-1}function o(xe,ie,$){ie===void 0&&(ie=0),$===void 0&&($=xe.length);for(var re=ie;re<$;re++){var ce=xe.charCodeAt(re);if(ce!==32&&ce!==9)return xe.substring(ie,re)}return xe.substring(ie,$)}function n(xe,ie){ie===void 0&&(ie=xe.length-1);for(var $=ie;$>=0;$--){var re=xe.charCodeAt($);if(re!==32&&re!==9)return $}return-1}function s(xe,ie){return xe<ie?-1:xe>ie?1:0}function u(xe,ie){for(var $=Math.min(xe.length,ie.length),re=0;re<$;re++){var ce=xe.charCodeAt(re),be=ie.charCodeAt(re);if(ce===be)continue;S(ce)&&(ce+=32),S(be)&&(be+=32);var Me=ce-be;if(Me===0)continue;return p(ce)&&p(be)?Me:s(xe.toLowerCase(),ie.toLowerCase())}return xe.length<ie.length?-1:xe.length>ie.length?1:0}function p(xe){return xe>=97&&xe<=122}function S(xe){return xe>=65&&xe<=90}function x(xe){return p(xe)||S(xe)}function M(xe,ie){return xe.length===ie.length&&C(xe,ie)}function C(xe,ie,$){$===void 0&&($=xe.length);for(var re=0;re<$;re++){var ce=xe.charCodeAt(re),be=ie.charCodeAt(re);if(ce===be)continue;if(x(ce)&&x(be)){var Me=Math.abs(ce-be);if(Me!==0&&Me!==32)return!1}else if(String.fromCharCode(ce).toLowerCase()!==String.fromCharCode(be).toLowerCase())return!1}return!0}function c(xe,ie){var $=ie.length;return ie.length>xe.length?!1:C(xe,ie,$)}function r(xe,ie){var $,re=Math.min(xe.length,ie.length);for($=0;$<re;$++)if(xe.charCodeAt($)!==ie.charCodeAt($))return $;return re}function a(xe,ie){var $,re=Math.min(xe.length,ie.length),ce=xe.length-1,be=ie.length-1;for($=0;$<re;$++)if(xe.charCodeAt(ce-$)!==ie.charCodeAt(be-$))return $;return re}function A(xe){return 55296<=xe&&xe<=56319}function L(xe){return 56320<=xe&&xe<=57343}function T(xe,ie,$){var re=xe.charCodeAt($);if(A(re)&&$+1<ie){var ce=xe.charCodeAt($+1);if(L(ce))return(re-55296<<10)+(ce-56320)+65536}return re}function w(xe,ie){var $=xe.charCodeAt(ie-1);if(L($)&&ie>1){var re=xe.charCodeAt(ie-2);if(A(re))return(re-55296<<10)+($-56320)+65536}return $}function _(xe,ie){var $=Ie.getInstance(),re=ie,ce=xe.length,be=T(xe,ce,ie);ie+=be>=65536?2:1;for(var Me=$.getGraphemeBreakType(be);ie<ce;){var ke=T(xe,ce,ie),ct=$.getGraphemeBreakType(ke);if(Et(Me,ct))break;ie+=ke>=65536?2:1,Me=ct}return ie-re}function j(xe,ie){var $=Ie.getInstance(),re=ie,ce=w(xe,ie);ie-=ce>=65536?2:1;for(var be=$.getGraphemeBreakType(ce);ie>0;){var Me=w(xe,ie),ke=$.getGraphemeBreakType(Me);if(Et(ke,be))break;ie-=Me>=65536?2:1,be=ke}return re-ie}var W=/(?:[\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 Z(xe){return W.test(xe)}var X=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDE73\uDE78-\uDE82\uDE90-\uDE95])/;function G(xe){return X.test(xe)}var te=/^[\t\n\r\x20-\x7E]*$/;function Y(xe){return te.test(xe)}function le(xe){for(var ie=0,$=xe.length;ie<$;ie++)if(Ae(xe.charCodeAt(ie)))return!0;return!1}function Ae(xe){return xe=+xe,xe>=11904&&xe<=55215||xe>=63744&&xe<=64255||xe>=65281&&xe<=65374}function Be(xe){return xe>=127462&&xe<=127487||xe>=9728&&xe<=10175||xe>=127744&&xe<=128591||xe>=128640&&xe<=128764||xe>=128992&&xe<=129003||xe>=129280&&xe<=129535||xe>=129648&&xe<=129651||xe>=129656&&xe<=129666||xe>=129680&&xe<=129685}var Ce=String.fromCharCode(65279);function Se(xe){return!!(xe&&xe.length>0&&xe.charCodeAt(0)===65279)}function Fe(xe){return btoa(encodeURIComponent(xe))}function Ve(xe,ie){for(var $="",re=0;re<ie;re++)$+=xe;return $}function De(xe,ie){return ie===void 0&&(ie=!1),xe?(ie&&(xe=xe.replace(/\\./g,"")),xe.toLowerCase()!==xe):!1}function Le(xe){var ie=90-65+1;return xe=xe%(2*ie),xe<ie?String.fromCharCode(97+xe):String.fromCharCode(65+xe-ie)}function tt(xe){var ie=Ie.getInstance();return ie.getGraphemeBreakType(xe)}function Et(xe,ie){return xe===0?ie!==5&&ie!==7:xe===2&&ie===3?!1:xe===4||xe===2||xe===3||(ie===4||ie===2||ie===3)?!0:xe===8&&(ie===8||ie===9||ie===11||ie===12)||((xe===11||xe===9)&&(ie===9||ie===10)||((xe===12||xe===10)&&ie===10||(ie===5||ie===13||(ie===7||(xe===1||xe===13&&ie===14)))))?!1:!(xe===6&&ie===6)}var Ie=function(){function xe(){this._data=Qe()}return xe.getInstance=function(){return xe._INSTANCE||(xe._INSTANCE=new xe),xe._INSTANCE},xe.prototype.getGraphemeBreakType=function(ie){if(ie<32)return ie===10?3:ie===13?2:4;if(ie<127)return 0;for(var $=this._data,re=$.length/3,ce=1;ce<=re;)if(ie<$[3*ce])ce=2*ce;else if(ie>$[3*ce+1])ce=2*ce+1;else return $[3*ce+2];return 0},xe._INSTANCE=null,xe}();function Qe(){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]")}},NC18:function(qe,ue,k){var J=k("y+Vt"),N=k("IMiH"),O=k("7oTu"),Q=Math.sqrt,R=Math.sin,B=Math.cos,D=Math.PI,f=function(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])},b=function(s,u){return(s[0]*u[0]+s[1]*u[1])/(f(s)*f(u))},g=function(s,u){return(s[0]*u[1]<s[1]*u[0]?-1:1)*Math.acos(b(s,u))};function i(s,u,p,S,x,M,C,c,r,a,A){var L=r*(D/180),T=B(L)*(s-p)/2+R(L)*(u-S)/2,w=-1*R(L)*(s-p)/2+B(L)*(u-S)/2,_=T*T/(C*C)+w*w/(c*c);_>1&&(C*=Q(_),c*=Q(_));var j=(x===M?-1:1)*Q((C*C*(c*c)-C*C*(w*w)-c*c*(T*T))/(C*C*(w*w)+c*c*(T*T)))||0,W=j*C*w/c,Z=j*-c*T/C,X=(s+p)/2+B(L)*W-R(L)*Z,G=(u+S)/2+R(L)*W+B(L)*Z,te=g([1,0],[(T-W)/C,(w-Z)/c]),Y=[(T-W)/C,(w-Z)/c],le=[(-1*T-W)/C,(-1*w-Z)/c],Ae=g(Y,le);b(Y,le)<=-1&&(Ae=D),b(Y,le)>=1&&(Ae=0),M===0&&Ae>0&&(Ae=Ae-2*D),M===1&&Ae<0&&(Ae=Ae+2*D),A.addData(a,X,G,C,c,te,Ae,L,M)}var l=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,v=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function h(s){if(!s)return new N;for(var u=0,p=0,S=u,x=p,M,C=new N,c=N.CMD,r=s.match(l),a=0;a<r.length;a++){for(var A=r[a],L=A.charAt(0),T,w=A.match(v)||[],_=w.length,j=0;j<_;j++)w[j]=parseFloat(w[j]);for(var W=0;W<_;){var Z,X,G,te,Y,le,Ae,Be=u,Ce=p;switch(L){case"l":u+=w[W++],p+=w[W++],T=c.L,C.addData(T,u,p);break;case"L":u=w[W++],p=w[W++],T=c.L,C.addData(T,u,p);break;case"m":u+=w[W++],p+=w[W++],T=c.M,C.addData(T,u,p),S=u,x=p,L="l";break;case"M":u=w[W++],p=w[W++],T=c.M,C.addData(T,u,p),S=u,x=p,L="L";break;case"h":u+=w[W++],T=c.L,C.addData(T,u,p);break;case"H":u=w[W++],T=c.L,C.addData(T,u,p);break;case"v":p+=w[W++],T=c.L,C.addData(T,u,p);break;case"V":p=w[W++],T=c.L,C.addData(T,u,p);break;case"C":T=c.C,C.addData(T,w[W++],w[W++],w[W++],w[W++],w[W++],w[W++]),u=w[W-2],p=w[W-1];break;case"c":T=c.C,C.addData(T,w[W++]+u,w[W++]+p,w[W++]+u,w[W++]+p,w[W++]+u,w[W++]+p),u+=w[W-2],p+=w[W-1];break;case"S":Z=u,X=p;var Se=C.len(),Fe=C.data;M===c.C&&(Z+=u-Fe[Se-4],X+=p-Fe[Se-3]),T=c.C,Be=w[W++],Ce=w[W++],u=w[W++],p=w[W++],C.addData(T,Z,X,Be,Ce,u,p);break;case"s":Z=u,X=p;var Se=C.len(),Fe=C.data;M===c.C&&(Z+=u-Fe[Se-4],X+=p-Fe[Se-3]),T=c.C,Be=u+w[W++],Ce=p+w[W++],u+=w[W++],p+=w[W++],C.addData(T,Z,X,Be,Ce,u,p);break;case"Q":Be=w[W++],Ce=w[W++],u=w[W++],p=w[W++],T=c.Q,C.addData(T,Be,Ce,u,p);break;case"q":Be=w[W++]+u,Ce=w[W++]+p,u+=w[W++],p+=w[W++],T=c.Q,C.addData(T,Be,Ce,u,p);break;case"T":Z=u,X=p;var Se=C.len(),Fe=C.data;M===c.Q&&(Z+=u-Fe[Se-4],X+=p-Fe[Se-3]),u=w[W++],p=w[W++],T=c.Q,C.addData(T,Z,X,u,p);break;case"t":Z=u,X=p;var Se=C.len(),Fe=C.data;M===c.Q&&(Z+=u-Fe[Se-4],X+=p-Fe[Se-3]),u+=w[W++],p+=w[W++],T=c.Q,C.addData(T,Z,X,u,p);break;case"A":G=w[W++],te=w[W++],Y=w[W++],le=w[W++],Ae=w[W++],Be=u,Ce=p,u=w[W++],p=w[W++],T=c.A,i(Be,Ce,u,p,le,Ae,G,te,Y,T,C);break;case"a":G=w[W++],te=w[W++],Y=w[W++],le=w[W++],Ae=w[W++],Be=u,Ce=p,u+=w[W++],p+=w[W++],T=c.A,i(Be,Ce,u,p,le,Ae,G,te,Y,T,C);break}}(L==="z"||L==="Z")&&(T=c.Z,C.addData(T),u=S,p=x),M=T}return C.toStatic(),C}function d(s,u){var p=h(s);return u=u||{},u.buildPath=function(S){if(S.setData){S.setData(p.data);var x=S.getContext();x&&S.rebuildPath(x)}else{var x=S;p.rebuildPath(x)}},u.applyTransform=function(S){O(p,S),this.dirty(!0)},u}function E(s,u){return new J(d(s,u))}function o(s,u){return J.extend(d(s,u))}function n(s,u){for(var p=[],S=s.length,x=0;x<S;x++){var M=s[x];M.path||M.createPathProxy(),M.__dirtyPath&&M.buildPath(M.path,M.shape,!0),p.push(M.path)}var C=new J(u);return C.createPathProxy(),C.buildPath=function(c){c.appendPath(p);var r=c.getContext();r&&c.rebuildPath(r)},C}ue.createFromString=E,ue.extendFromString=o,ue.mergePath=n},NohK:function(qe,ue,k){"use strict";Object.defineProperty(ue,"__esModule",{value:!0}),ue.default=void 0;var J=function(O){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,R=null;return function(){for(var B=this,D=arguments.length,f=new Array(D),b=0;b<D;b++)f[b]=arguments[b];clearTimeout(R),R=setTimeout(function(){O.apply(B,f)},Q)}};ue.default=J},NvD2:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return B});var J=k("Kwbf");function N(D,f){var b=new Set;return D.forEach(function(g){f.has(g)||b.add(g)}),b}function O(D){var f=D||{},b=f.disabled,g=f.disableCheckbox,i=f.checkable;return!!(b||g)||i===!1}function Q(D,f,b,g){for(var i=new Set(D),l=new Set,v=0;v<=b;v+=1){var h=f.get(v)||new Set;h.forEach(function(n){var s=n.key,u=n.node,p=n.children,S=p===void 0?[]:p;i.has(s)&&!g(u)&&S.filter(function(x){return!g(x.node)}).forEach(function(x){i.add(x.key)})})}for(var d=new Set,E=b;E>=0;E-=1){var o=f.get(E)||new Set;o.forEach(function(n){var s=n.parent,u=n.node;if(g(u)||!n.parent||d.has(n.parent.key))return;if(g(n.parent.node)){d.add(s.key);return}var p=!0,S=!1;(s.children||[]).filter(function(x){return!g(x.node)}).forEach(function(x){var M=x.key,C=i.has(M);p&&!C&&(p=!1),!S&&(C||l.has(M))&&(S=!0)}),p&&i.add(s.key),S&&l.add(s.key),d.add(s.key)})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(N(l,i))}}function R(D,f,b,g,i){for(var l=new Set(D),v=new Set(f),h=0;h<=g;h+=1){var d=b.get(h)||new Set;d.forEach(function(s){var u=s.key,p=s.node,S=s.children,x=S===void 0?[]:S;!l.has(u)&&!v.has(u)&&!i(p)&&x.filter(function(M){return!i(M.node)}).forEach(function(M){l.delete(M.key)})})}v=new Set;for(var E=new Set,o=g;o>=0;o-=1){var n=b.get(o)||new Set;n.forEach(function(s){var u=s.parent,p=s.node;if(i(p)||!s.parent||E.has(s.parent.key))return;if(i(s.parent.node)){E.add(u.key);return}var S=!0,x=!1;(u.children||[]).filter(function(M){return!i(M.node)}).forEach(function(M){var C=M.key,c=l.has(C);S&&!c&&(S=!1),!x&&(c||v.has(C))&&(x=!0)}),S||l.delete(u.key),x&&v.add(u.key),E.add(u.key)})}return{checkedKeys:Array.from(l),halfCheckedKeys:Array.from(N(v,l))}}function B(D,f,b,g){var i=[],l;g?l=g:l=O;var v=new Set(D.filter(function(o){var n=!!b[o];return n||i.push(o),n})),h=new Map,d=0;Object.keys(b).forEach(function(o){var n=b[o],s=n.level,u=h.get(s);u||(u=new Set,h.set(s,u)),u.add(n),d=Math.max(d,s)}),Object(J.a)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(o){return"'".concat(o,"'")}).join(", ")));var E;return f===!0?E=Q(v,h,d,l):E=R(v,f.halfCheckedKeys,h,d,l),E}},OLES:function(qe,ue,k){"use strict";var J=k("U8pU"),N=k("VTBJ"),O=k("Ff2n"),Q=k("q1tI"),R=k("uciX"),B=k("7ixt"),D=function(v){var h=v.overlay,d=v.prefixCls,E=v.id,o=v.overlayInnerStyle;return Q.createElement("div",{className:"".concat(d,"-inner"),id:E,role:"tooltip",style:o},typeof h=="function"?h():h)},f=D,b=function(v,h){var d=v.overlayClassName,E=v.trigger,o=E===void 0?["hover"]:E,n=v.mouseEnterDelay,s=n===void 0?0:n,u=v.mouseLeaveDelay,p=u===void 0?.1:u,S=v.overlayStyle,x=v.prefixCls,M=x===void 0?"rc-tooltip":x,C=v.children,c=v.onVisibleChange,r=v.afterVisibleChange,a=v.transitionName,A=v.animation,L=v.placement,T=L===void 0?"right":L,w=v.align,_=w===void 0?{}:w,j=v.destroyTooltipOnHide,W=j===void 0?!1:j,Z=v.defaultVisible,X=v.getTooltipContainer,G=v.overlayInnerStyle,te=Object(O.a)(v,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Y=Object(Q.useRef)(null);Object(Q.useImperativeHandle)(h,function(){return Y.current});var le=Object(N.a)({},te);"visible"in v&&(le.popupVisible=v.visible);var Ae=function(){var Ve=v.arrowContent,De=Ve===void 0?null:Ve,Le=v.overlay,tt=v.id;return[Q.createElement("div",{className:"".concat(M,"-arrow"),key:"arrow"},De),Q.createElement(f,{key:"content",prefixCls:M,id:tt,overlay:Le,overlayInnerStyle:G})]},Be=!1,Ce=!1;if(typeof W=="boolean")Be=W;else if(W&&Object(J.a)(W)==="object"){var Se=W.keepParent;Be=Se===!0,Ce=Se===!1}return Q.createElement(R.a,Object.assign({popupClassName:d,prefixCls:M,popup:Ae,action:o,builtinPlacements:B.a,popupPlacement:T,ref:Y,popupAlign:_,getPopupContainer:X,onPopupVisibleChange:c,afterPopupVisibleChange:r,popupTransitionName:a,popupAnimation:A,defaultPopupVisible:Z,destroyPopupOnHide:Be,autoDestroy:Ce,mouseLeaveDelay:p,popupStyle:S,mouseEnterDelay:s},le),C)},g=Object(Q.forwardRef)(b),i=ue.a=g},OS9S:function(qe,ue,k){var J=k("bYtY"),N=J.inherits,O=k("Gev7"),Q=k("mFDi");function R(f){O.call(this,f),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}R.prototype.incremental=!0,R.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},R.prototype.addDisplayable=function(f,b){b?this._temporaryDisplayables.push(f):this._displayables.push(f),this.dirty()},R.prototype.addDisplayables=function(f,b){b=b||!1;for(var g=0;g<f.length;g++)this.addDisplayable(f[g],b)},R.prototype.eachPendingDisplayable=function(f){for(var b=this._cursor;b<this._displayables.length;b++)f&&f(this._displayables[b]);for(var b=0;b<this._temporaryDisplayables.length;b++)f&&f(this._temporaryDisplayables[b])},R.prototype.update=function(){this.updateTransform();for(var f=this._cursor;f<this._displayables.length;f++){var b=this._displayables[f];b.parent=this,b.update(),b.parent=null}for(var f=0;f<this._temporaryDisplayables.length;f++){var b=this._temporaryDisplayables[f];b.parent=this,b.update(),b.parent=null}},R.prototype.brush=function(f,b){for(var g=this._cursor;g<this._displayables.length;g++){var i=this._displayables[g];i.beforeBrush&&i.beforeBrush(f),i.brush(f,g===this._cursor?null:this._displayables[g-1]),i.afterBrush&&i.afterBrush(f)}this._cursor=g;for(var g=0;g<this._temporaryDisplayables.length;g++){var i=this._temporaryDisplayables[g];i.beforeBrush&&i.beforeBrush(f),i.brush(f,g===0?null:this._temporaryDisplayables[g-1]),i.afterBrush&&i.afterBrush(f)}this._temporaryDisplayables=[],this.notClear=!0};var B=[];R.prototype.getBoundingRect=function(){if(!this._rect){for(var f=new Q(Infinity,Infinity,-Infinity,-Infinity),b=0;b<this._displayables.length;b++){var g=this._displayables[b],i=g.getBoundingRect().clone();g.needLocalTransform()&&i.applyTransform(g.getLocalTransform(B)),f.union(i)}this._rect=f}return this._rect},R.prototype.contain=function(f,b){var g=this.transformCoordToLocal(f,b),i=this.getBoundingRect();if(i.contain(g[0],g[1]))for(var l=0;l<this._displayables.length;l++){var v=this._displayables[l];if(v.contain(f,b))return!0}return!1},N(R,O);var D=R;qe.exports=D},OZM5:function(qe,ue,k){"use strict";k.d(ue,"b",function(){return g}),k.d(ue,"a",function(){return i}),k.d(ue,"k",function(){return l}),k.d(ue,"h",function(){return v}),k.d(ue,"i",function(){return h}),k.d(ue,"g",function(){return d}),k.d(ue,"c",function(){return E}),k.d(ue,"d",function(){return o}),k.d(ue,"j",function(){return u}),k.d(ue,"e",function(){return p}),k.d(ue,"f",function(){return S});var J=k("KQm4"),N=k("U8pU"),O=k("Ff2n"),Q=k("q1tI"),R=k.n(Q),B=k("Kwbf"),D=k("WaYH"),f=.25,b=2;function g(x,M){var C=x.slice(),c=C.indexOf(M);return c>=0&&C.splice(c,1),C}function i(x,M){var C=x.slice();return C.indexOf(M)===-1&&C.push(M),C}function l(x){return x.split("-")}function v(x,M){return"".concat(x,"-").concat(M)}function h(x){return x&&x.type&&x.type.isTreeNode}function d(x,M){var C=[x],c=M[x];function r(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(A){var L=A.key,T=A.children;C.push(L),r(T)})}return r(c.children),C}function E(x,M){var C=x.clientY,c=M.selectHandle.getBoundingClientRect(),r=c.top,a=c.bottom,A=c.height,L=Math.max(A*f,b);return C<=r+L?-1:C>=a-L?1:0}function o(x,M){if(!x)return;var C=M.multiple;return C?x.slice():x.length?[x[0]]:x}var n=function(M){return M};function s(x,M){if(!x)return[];var C=M||{},c=C.processProps,r=c===void 0?n:c,a=Array.isArray(x)?x:[x];return a.map(function(A){var L=A.children,T=Object(O.a)(A,["children"]),w=s(L,M);return R.a.createElement(D.a,Object.assign({},r(T)),w)})}function u(x){if(!x)return null;var M;if(Array.isArray(x))M={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(N.a)(x)==="object")M={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(B.a)(!1,"`checkedKeys` is not an array or an object"),null;return M}function p(x,M){var C=new Set;function c(r){if(C.has(r))return;var a=M[r];if(!a)return;C.add(r);var A=a.parent,L=a.node;if(L.disabled)return;A&&c(A.key)}return(x||[]).forEach(function(r){c(r)}),Object(J.a)(C)}function S(x){var M={};return Object.keys(x).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(M[C]=x[C])}),M}},Ot1p:function(qe,ue,k){"use strict";var J=k("2qtc"),N=k("kLXV"),O=k("rAM+"),Q=k("miYZ"),R=k("tsqr"),B=k("9og8"),D=k("tJVT"),f=k("jrin"),b=k("WmNS"),g=k.n(b),i=k("q1tI"),l=k.n(i),v=k("VrN/"),h=k.n(v),d=k("bdgK"),E=k("p77/"),o=k("Bd2K"),n=k("ELLl"),s=k("19Vz"),u=k("lZu9"),p=k("+NIl"),S=k("kSUc"),x=k("9Bee"),M=function(ze){var gt=ze.value,Lt=gt===void 0?"":gt,Pt=ze.className,Rt=ze.showTextOnly,Dt=ze.showLines,dt=ze.style,it=dt===void 0?{}:dt,nt=Object(i.useMemo)(function(){return""},[Lt]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:nt}}))},C=k("0Owb"),c=k("dejd"),r=k("C+DQ"),a=k("1vsH"),A=k("m3rI"),L=[{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 T(ze){var gt=ze.onActionCallback,Lt=ze.title,Pt=ze.icon,Rt=ze.actionName,Dt=ze.className,dt=Dt===void 0?"":Dt,it=ze.children;function nt(){gt(Rt)}return l.a.createElement("a",{title:Lt,className:dt,onClick:nt},l.a.createElement("i",{className:"md-iconfont ".concat(Pt)}),it)}var w=function(ze){var gt=ze.watch,Lt=ze.showNullButton,Pt=ze.onActionCallback,Rt=ze.fullScreen,Dt=ze.insertTemp,dt=ze.hidetoolBar,it=ze.uuid,nt=ze.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(a.D)("_educoder_session_login"),"&_educoder_session=").concat(Object(a.D)("_educoder_session"),"&key=").concat(it,"&api=").concat(encodeURIComponent(A.a.PROXY_SERVER)));var we=[].concat(L,[{title:"".concat(gt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(gt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!dt&&we.map(function(Ne,ht){return l.a.createElement("li",{key:ht},Ne.actionName?l.a.createElement(T,Object(C.a)({},Ne,{onActionCallback:Pt})):l.a.createElement("span",{className:"v-line"}))}),Lt?l.a.createElement("li",null,l.a.createElement(T,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Pt},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Dt&&l.a.createElement("li",null,l.a.createElement(T,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Dt),onActionCallback:Pt},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(T,{icon:"".concat(Rt?"icon-shrink":"icon-enlarge"),title:Rt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Pt})))},_=k("M8RZ"),j=k("+L6B"),W=k("2/Rp"),Z=k("y8nQ"),X=k("Vl3Y"),G=k("5NDa"),te=k("5rEg"),Y={labelCol:{span:4},wrapperCol:{span:20}},le=function(ze){var gt=ze.callback,Lt=ze.onCancel;function Pt(Rt){gt(Rt)}return l.a.createElement(X.a,Object(C.a)({},Y,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Pt}),l.a.createElement(X.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(te.a,null)),l.a.createElement(X.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(te.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:Lt},"\u53D6\u6D88")))},Ae=k("7ahc"),Be=k("k1fw"),Ce=k("HmJG"),Se=k("BjJ7"),Fe=X.a.useForm,Ve={width:280,marginRight:10},De={labelCol:{span:5},wrapperCol:{span:19}},Le=function(ze){var gt=ze.callback,Lt=ze.onCancel,Pt=Fe(),Rt=Object(D.a)(Pt,1),Dt=Rt[0],dt=Object(i.useRef)();function it(Ne){gt(Object(Be.a)(Object(Be.a)({},Ne),{},{name:dt.current}))}function nt(Ne,ht){Dt.setFieldsValue({src:"/api/attachments/".concat(Ne.id,"?type=").concat(Ne.content_type),type:ht.type})}function we(Ne){var ht=Ne.target.files[0];dt.current=ht.name,Et(ht,nt)}return l.a.createElement(X.a,Object(C.a)({form:Dt},De,{className:"upload-image-panel",onFinish:it}),l.a.createElement(X.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(X.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},l.a.createElement(te.a,{style:Ve})),l.a.createElement(tt,{onFileChange:we}))),l.a.createElement(X.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},l.a.createElement(te.a,{style:{width:264}})),l.a.createElement(X.a.Item,{style:{textAlign:"right"}},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:Lt},"\u53D6\u6D88")))};function tt(ze){var gt=ze.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:gt}))}function Et(ze,gt){if(!ze)throw new String("\u6CA1\u6709\u6587\u4EF6");var Lt=new FormData;Lt.append("editormd-image-file",ze),Lt.append("file_param_name","editormd-image-file"),Lt.append("byxhr","true");var Pt=new window.XMLHttpRequest;Pt.withCredentials=!0,Pt.addEventListener("load",function(Rt){gt(JSON.parse(Rt.target.responseText),ze)},!1),Pt.addEventListener("error",function(Rt){console.error(Rt)},!1),Pt.open("POST","".concat(Se.a,"/api/attachments.json")),Pt.send(Lt)}var Ie=k("giR+"),Qe=k("fyUT"),xe=k("7Kak"),ie=k("9yH6"),$=ie.a.Group,re={margin:"0 8px"},ce=function(ze){var gt=ze.callback,Lt=ze.onCancel;function Pt(Rt){gt(Rt)}return l.a.createElement(X.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Pt},l.a.createElement("div",{className:"flex-container"},l.a.createElement("span",{style:re},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:re},"\u884C\u6570"),l.a.createElement(X.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(Qe.a,null)),l.a.createElement("span",{style:re},"\u5217\u6570"),l.a.createElement(X.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(Qe.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12}},l.a.createElement("span",{style:re},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(X.a.Item,{name:"align"},l.a.createElement($,null,l.a.createElement(ie.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(ie.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(ie.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(ie.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:Lt},"\u53D6\u6D88")))},be=k("ErOA"),Me=k("7Cbv"),ke="link",ct="upload-image",ut="code-block",mt="add-table",pt="------------",Ot={default:pt,left:":".concat(pt),center:":".concat(pt,":"),right:"".concat(pt,":")},Ft=k("9VGf"),He,Pe;function at(){}var vt=0,et=1e4,At="\u2581",je=`
|
|
**\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 _e(ze){return/^\d+$/.test(ze)?"".concat(ze,"px"):ze}var Ue=navigator.platform.toUpperCase().indexOf("MAC")>=0,me=Ue?"Cmd":"Ctrl",ve=["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=(He={},Object(f.a)(He,me+"-B","bold"),Object(f.a)(He,me+"-I","italic"),He),Oe=(Pe={},Object(f.a)(Pe,ke,"\u6DFB\u52A0\u94FE\u63A5"),Object(f.a)(Pe,ut,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(f.a)(Pe,ct,"\u6DFB\u52A0\u6587\u4EF6"),Object(f.a)(Pe,mt,"\u6DFB\u52A0\u8868\u683C"),Pe),Ye=ue.a=function(ze){var gt=ze.defaultValue,Lt=gt===void 0?"":gt,Pt=ze.onChange,Rt=ze.width,Dt=Rt===void 0?"100%":Rt,dt=ze.height,it=dt===void 0?400:dt,nt=ze.miniToolbar,we=nt===void 0?!1:nt,Ne=ze.isFocus,ht=Ne===void 0?!1:Ne,ot=ze.watch,Bt=ze.insertTemp,wt=ze.mode,rt=wt===void 0?"markdown":wt,st=ze.id,St=st===void 0?"markdown-editor-id":st,It=ze.showResizeBar,Qt=It===void 0?!1:It,gr=ze.noStorage,vr=gr===void 0?!1:gr,cr=ze.showNullButton,jt=cr===void 0?!1:cr,Ir=ze.hidetoolBar,kr=Ir===void 0?!1:Ir,_r=ze.fullScreen,hr=_r===void 0?!1:_r,Sr=ze.onBlur,sn=ze.onCMBeforeChange,en=ze.onFullScreen,he=ze.className,ge=he===void 0?"":he,Re=ze.disablePaste,Ze=Re===void 0?!1:Re,Je=ze.placeholder,Tt=Je===void 0?"":Je,q=ze.values,F=q===void 0?"":q,P=Object(i.useState)(null),ee=Object(D.a)(P,2),ae=ee[0],ne=ee[1],Ke=Object(i.useState)(Lt),xt=Object(D.a)(Ke,2),kt=xt[0],Ht=xt[1],Ct=Object(i.useState)(ot),Yt=Object(D.a)(Ct,2),Wt=Yt[0],$t=Yt[1],fr=Object(i.useState)(hr),Fr=Object(D.a)(fr,2),yr=Fr[0],Rr=Fr[1],pr=Object(i.useState)(""),Nr=Object(D.a)(pr,2),Hr=Nr[0],qr=Nr[1],Yr=Object(i.useState)(0),nn=Object(D.a)(Yr,2),cn=nn[0],$r=nn[1],an=Object(i.useState)(it),ln=Object(D.a)(an,2),dn=ln[0],hn=ln[1],wr=Object(i.useState)(!1),dr=Object(D.a)(wr,2),sr=dr[0],nr=dr[1],Zt=Object(i.useRef)(Object(Me.a)()),br=Object(i.useRef)(!1),Cr=Object(i.useRef)(),Tr=Object(i.useRef)(),Er=Object(i.useRef)(),Dn=Object(i.useRef)(),Qr=Object(i.useRef)(),Cn=function(){var qt=Object(B.a)(g.a.mark(function er(){var tr,Br;return g.a.wrap(function(Or){for(;;)switch(Or.prev=Or.next){case 0:return Or.next=2,Object(be.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Zt.current}});case 2:Br=Or.sent,Br!=null&&(tr=Br.attachments)!==null&&tr!==void 0&&tr.length&&(console.log("cm:",ae,Tr),Br.attachments.map(function(Dr){Dr.content_type.indexOf("image")>-1?ae.replaceSelection(".concat(Dr.content_type,")")):Dr.content_type.indexOf("video")>-1?ae.replaceSelection('<video width="100%" controls src="'.concat(A.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Dr.content_type.indexOf("pdf")>-1?ae.replaceSelection('<a href="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Dr.id,"?type=").concat(Dr.content_type,'&disposition=inline" target="_blank">').concat(Dr.name,"</a>")):ae.replaceSelection("[".concat(Dr.name,"](").concat(A.a.API_SERVER,"/api/attachments/").concat(Dr.id,"?type=").concat(Dr.content_type,")"))}));case 4:case"end":return Or.stop()}},er)}));return function(){return qt.apply(this,arguments)}}();Object(i.useEffect)(function(){Ht(F),ae==null||ae.setValue(F)},[F]),Object(i.useEffect)(function(){en==null||en(yr)},[yr]),Object(i.useEffect)(function(){if(Tr.current){var qt=h.a.fromTextArea(Tr.current,{mode:rt,lineNumbers:!we,lineWrapping:!0,value:Lt,autoCloseTags:!0,autoCloseBrackets:!0});ht&&qt.focus();function er(tr,Br){if(Ze){Br.preventDefault();return}var Ur=Br.clipboardData;if(Ur){var Or=Ur.types.toString(),Dr=Ur.items;if(Or==="Files"||Ur.types.indexOf("Files")>-1){if(Br.preventDefault(),rt=="stex")return;try{var bn,Un=Dr[1];((bn=Dr[0])===null||bn===void 0?void 0:bn.kind)==="file"&&(Un=Dr[0]);var Mr=Un.getAsFile(),ei=Mr.name.split(".").pop();Et(Mr,function(Gr){if(Gr.id){var Rn,ui,Ai;(Mr==null||((Rn=Mr.type)===null||Rn===void 0)?void 0:Rn.indexOf("image"))>-1?qt.replaceSelection(".concat(Gr.content_type,")")):(Mr==null||((ui=Mr.type)===null||ui===void 0)?void 0:ui.indexOf("video"))>-1?qt.replaceSelection('<video width="100%" controls src="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Gr.id,'"></video>')):(Mr==null||((Ai=Mr.type)===null||Ai===void 0)?void 0:Ai.indexOf("pdf"))>-1?qt.replaceSelection('<a href="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Gr.id,"?type=").concat(Mr.type,'&disposition=inline" target="_blank">').concat(Mr.name,"</a>")):ve.includes(ei)?qt.replaceSelection('<a href="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Gr.id,'?type=office&disposition=inline" target="_blank">').concat(Mr.name,"</a>")):qt.replaceSelection("[".concat(Mr.name,"](").concat(A.a.API_SERVER,"/api/attachments/").concat(Gr.id,"?type=").concat(Gr.content_type,")"))}else(Gr==null?void 0:Gr.status)===401&&(document.location.href="/user/login")})}catch(Gr){R.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return qt.on("paste",er),qt.on("dragleave",function(tr,Br){Er.current.classList.remove("mouse-hover-md")}),qt.on("dragover",function(tr,Br){Er.current.classList.add("mouse-hover-md")}),qt.on("drop",function(tr,Br){Er.current.classList.add("mouse-hover-md");var Ur;if(Ur=Br.dataTransfer.files,Ur.length>0){Br.preventDefault(),Br.stopPropagation();for(var Or=function(Un){var Mr=Ur[Un],ei=Mr.name.split(".").pop();Et(Mr,function(Gr){if(Gr.id){var Rn,ui,Ai;(Mr==null||((Rn=Mr.type)===null||Rn===void 0)?void 0:Rn.indexOf("image"))>-1?qt.replaceSelection(".concat(Gr.content_type,")")):(Mr==null||((ui=Mr.type)===null||ui===void 0)?void 0:ui.indexOf("video"))>-1?qt.replaceSelection('<video width="100%" controls src="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Gr.id,'"></video>')):(Mr==null||((Ai=Mr.type)===null||Ai===void 0)?void 0:Ai.indexOf("pdf"))>-1?qt.replaceSelection('<a href="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Gr.id,"?type=").concat(Mr.type,'&disposition=inline" target="_blank">').concat(Mr.name,"</a>")):ve.includes(ei)?qt.replaceSelection('<a href="'.concat(A.a.API_SERVER,"/api/attachments/").concat(Gr.id,'?type=office&disposition=inline" target="_blank">').concat(Mr.name,"</a>")):qt.replaceSelection("[".concat(Mr.name,"](").concat(A.a.API_SERVER,"/api/attachments/").concat(Gr.id,"?type=").concat(Gr.content_type,")"))}else(Gr==null?void 0:Gr.status)===401&&(document.location.href="/user/login")})},Dr=0;Dr<Ur.length;Dr++)Or(Dr)}}),ne(qt),function(){qt.off("paste",er)}}},[]);var Hn=Object(i.useCallback)(function(){if(Er.current)try{}catch(qt){console.log(qt,"---- to set md editor body height")}},[dn,Er,yr]);Object(i.useEffect)(function(){function qt(){var tr=new d.default(function(Br){var Ur=Object(O.a)(Br),Or;try{for(Ur.s();!(Or=Ur.n()).done;){var Dr=Or.value;(Dr.target.offsetHeight>0||Dr.target.offsetWidth>0)&&(Hn(),ae.setSize("100%","100%"),ae.refresh())}}catch(bn){Ur.e(bn)}finally{Ur.f()}});return tr.observe(Tr.current.parentElement),tr}if(ae){var er=qt();return function(){er.unobserve(Tr.current.parentElement)}}},[ae,Hn]),Object(i.useEffect)(function(){if(ae){for(var qt=[],er=function(){var Dr=Br[tr];Ur=Object(D.a)(Dr,2);var bn=Ur[0],Un=Ur[1],Mr=Object(f.a)({},bn,function(){Ln(Un)});qt.push(Mr),ae.addKeyMap(Mr)},tr=0,Br=Object.entries(Ee);tr<Br.length;tr++){var Ur;er()}return Cr.current=setInterval(function(){br.current&&Cn()},4e3),function(){clearInterval(Cr.current);var Or=Object(O.a)(qt),Dr;try{for(Or.s();!(Dr=Or.n()).done;){var bn=Dr.value;ae.removeKeyMap(bn)}}catch(Un){Or.e(Un)}finally{Or.f()}}}},[ae]),Object(i.useEffect)(function(){hr!==yr&&Rr(hr)},[hr]),Object(Ft.a)(function(){if(!vr&&cn>0){var qt=new Date().getTime(),er=window.sessionStorage.getItem(St);qt>=cn+et&&(!er||er!==kt)&&(window.sessionStorage.setItem(St,kt),nr(!0))}},et),Object(i.useEffect)(function(){$t(ot)},[ae,ot]),Object(i.useEffect)(function(){ae&&(ht&&ae.focus())},[ae,ht]),Object(i.useEffect)(function(){if(Wt&&ae){var qt=ae.getScrollerElement();function er(tr){var Br=tr.target;if(Qr.current){var Ur=Br.scrollTop/Br.scrollHeight;Qr.current.scrollTop=Qr.current.scrollHeight*Ur}}return qt.addEventListener("scroll",er),function(){qt.removeEventListener("scroll",er)}}},[ae,Wt]),Object(i.useEffect)(function(){if(ae&&sn){function qt(er,tr){sn(er,tr)}return ae.on("beforeChange",qt),function(){ae.off("beforeChange",qt)}}},[ae,sn]),Object(i.useEffect)(function(){if(ae&&Sr){function qt(){Sr(ae.getValue())}return ae.on("blur",qt),function(){ae.off("blur",qt)}}},[ae,Sr]),Object(i.useEffect)(function(){if(ae){function qt(er){var tr=er.getValue();Ht(tr),$r(new Date().getTime()),er.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Pt&&Pt(tr)}return ae.on("change",qt),function(){ae.off("change",qt)}}},[ae,Pt]),Object(i.useEffect)(function(){ae&&(Lt==null?(ae.setValue(""),Ht("")):Lt!==ae.getValue()&&(ae.setValue(Lt),Ht(Lt),ae.setCursor(ae.lineCount(),0)))},[ae,Lt]);var Ln=Object(i.useCallback)(function(qt){var er=ae.getCursor(),tr=ae.getSelection(),Br=tr.split(`
|
|
`);switch(qt){case"bold":return ae.replaceSelection("**"+tr+"**"),tr===""&&ae.setCursor(er.line,er.ch+2),ae.focus();case"italic":return ae.replaceSelection("*"+tr+"*"),tr===""&&ae.setCursor(er.line,er.ch+1),ae.focus();case"code":return ae.replaceSelection("`"+tr+"`"),tr===""&&ae.setCursor(er.line,er.ch+1),ae.focus();case"inline-latex":return ae.replaceSelection("`$$"+tr+"$$`"),tr===""&&ae.setCursor(er.line,er.ch+3),ae.focus();case"latex":return ae.replaceSelection("```latex\n"+tr+"\n```"),ae.setCursor(er.line+1,tr.length+1),ae.focus();case"line-break":return ae.replaceSelection(`<br/>
|
|
`),ae.focus();case"list-ul":return tr===""?ae.replaceSelection("- "+tr):ae.replaceSelection(Br.map(function(Ur){return Ur===""?"":"- ".concat(Ur)}).join(`
|
|
`)),ae.focus();case"list-ol":return tr===""?ae.replaceSelection("1. "+tr):ae.replaceSelection(Br.map(function(Ur,Or){return Ur===""?"":"".concat(Or+1,". ").concat(Ur)}).join(`
|
|
`)),ae.focus();case"add-null-ch":return tr===""&&ae.setCursor(er.line,er.ch+1),ae.replaceSelection(At),ae.focus();case"inster-template-1":return tr===""&&ae.setCursor(er.line,er.ch),ae.replaceSelection(je),ae.focus();case"eraser":return ae.setValue(""),ae.focus();case"trigger-watch":return $t(!Wt),ae.focus();case"trigger-full-screen":return Rr(!yr),ae.focus();case ke:qr(ke);return;case ut:qr(ut);return;case ct:qr(ct);return;case mt:qr(mt);return;default:throw new Error}},[ae,Wt,yr]),Jr=Object(i.useCallback)(function(qt){qr("");switch(Hr){case ke:var er=qt.title,tr=qt.link;return ae.replaceSelection("[".concat(er,"](").concat(tr,")")),ae.focus();case ut:var Br=qt.language,Ur=qt.content;return ae.replaceSelection(["```"+Br,Ur,"```"].join(`
|
|
`)),ae.focus();case ct:var Or=qt.src,Dr=qt.alt,bn=qt.name;return Or.indexOf("type=image")>-1?ae.replaceSelection(".concat(Or,' "').concat(Dr||"",'" )')):Or.indexOf("type=application/pdf")>-1?ae.replaceSelection('<a href="'.concat(Or,'&disposition=inline" target="_blank">').concat(bn,"</a>")):ae.replaceSelection('<a href="'.concat(Or,'" target="_blank">').concat(bn,"</a>")),ae.focus();case mt:for(var Un=qt.row,Mr=qt.col,ei=qt.align,Gr=`
|
|
`,Rn=0;Rn<Un;Rn++){for(var ui=[],Ai=[],Vr=0;Vr<Mr;Vr++)Rn===1&&Ai.push(Ot[ei]),ui.push(" ");Rn===1&&(Gr+="| ".concat(Ai.join(" | "),` |
|
|
`)),Gr+="| ".concat(ui.join(Mr===1?"":" | "),` |
|
|
`)}return ae.replaceSelection(Gr+`
|
|
`),ae.focus();default:throw new Error}},[ae,Hr]),Xn=Object(i.useMemo)(function(){switch(Hr){case ke:return l.a.createElement(le,{callback:Jr,onCancel:xn});case ut:return l.a.createElement(Ae.b,{callback:Jr,onCancel:xn});case ct:return l.a.createElement(Le,{callback:Jr,onCancel:xn});case mt:return l.a.createElement(ce,{callback:Jr,onCancel:xn});default:return null}},[Hr]);function xn(){qr("")}Object(i.useEffect)(function(){if(Dn.current){var qt=Dn.current,er=!1,tr=0;function Br(Dr){er=!0,tr=Dr.pageY}function Ur(){er=!1}function Or(Dr){if(er){var bn=Dr.pageY-tr;bn<0&&(bn=0),bn>300&&(bn=300);var Un=it+bn+"px";hn(Un)}}return qt.addEventListener("mousedown",Br),document.addEventListener("mousemove",Or),document.addEventListener("mouseup",Ur),function(){qt.removeEventListener("mousedown",Br),document.removeEventListener("mousemove",Or),document.removeEventListener("mouseup",Ur)}}},[ae,Dn]),Object(i.useEffect)(function(){hn(it)},[it]);var Yn=_e(Dt),Mn=_e(dn),oi={width:Yn,height:Mn},Fn=Object(i.useMemo)(function(){if(cn){var qt=new Date(cn),er=qt.getHours(),tr=qt.getMinutes(),Br=qt.getSeconds();return er=er<10?"0"+er:er,tr=tr<10?"0"+tr:tr,Br=Br<10?"0"+Br:Br,"".concat(er,":").concat(tr,":").concat(Br)}return 0},[cn]);function gn(){window.sessionStorage.removeItem(St),nr(!1),$r(0)}function Qn(){nr(!1),$r(0),ae.setValue(window.sessionStorage.getItem(St))}function li(qt,er){var tr=ae.getValue();tr=tr.replace(qt,er),Ht(tr),ae==null||ae.setValue(tr)}return l.a.createElement(i.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:Er},l.a.createElement("div",{className:"markdown-editor-container ".concat(ge," ").concat(Wt?"on-preview":""," ").concat(we?"mini":""," ").concat(yr?"full-screen":""),style:oi},l.a.createElement(w,{insertTemp:Bt,watch:Wt,fullScreen:yr,showNullButton:jt,onActionCallback:Ln,hidetoolBar:kr,uuid:Zt.current,setOpenPhones:function(){br.current=!0}}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:Tr,placeholder:Tt})),Wt?l.a.createElement("div",{ref:Qr,className:"preview-container"},rt==="stex"&&l.a.createElement(M,{value:kt}),rt!=="stex"&&l.a.createElement(x.a,{edit:!0,value:kt,replaces:li})):null))),Qt?l.a.createElement("a",{ref:Dn,className:"editor-resize"}):null,l.a.createElement(_.a,null,Oe[Hr]?l.a.createElement(N.a,{centered:!0,title:Oe[Hr],visible:!0,onCancel:xn,footer:null},Xn):null))}},P47w:function(qe,ue,k){var J=k("hydK"),N=J.createElement,O=k("IMiH"),Q=k("mFDi"),R=k("Fofx"),B=k("6GrX"),D=k("pzxd"),f=k("dqUG"),b=O.CMD,g=Array.prototype.join,i="none",l=Math.round,v=Math.sin,h=Math.cos,d=Math.PI,E=Math.PI*2,o=180/d,n=1e-4;function s(Y){return l(Y*1e4)/1e4}function u(Y){return Y<n&&Y>-n}function p(Y,le){var Ae=le?Y.textFill:Y.fill;return Ae!=null&&Ae!==i}function S(Y,le){var Ae=le?Y.textStroke:Y.stroke;return Ae!=null&&Ae!==i}function x(Y,le){le&&M(Y,"transform","matrix("+g.call(le,",")+")")}function M(Y,le,Ae){(!Ae||Ae.type!=="linear"&&Ae.type!=="radial")&&Y.setAttribute(le,Ae)}function C(Y,le,Ae){Y.setAttributeNS("http://www.w3.org/1999/xlink",le,Ae)}function c(Y,le,Ae,Be){if(p(le,Ae)){var Ce=Ae?le.textFill:le.fill;Ce=Ce==="transparent"?i:Ce,M(Y,"fill",Ce),M(Y,"fill-opacity",le.fillOpacity!=null?le.fillOpacity*le.opacity:le.opacity)}else M(Y,"fill",i);if(S(le,Ae)){var Se=Ae?le.textStroke:le.stroke;Se=Se==="transparent"?i:Se,M(Y,"stroke",Se);var Fe=Ae?le.textStrokeWidth:le.lineWidth,Ve=!Ae&&le.strokeNoScale?Be.getLineScale():1;M(Y,"stroke-width",Fe/Ve),M(Y,"paint-order",Ae?"stroke":"fill"),M(Y,"stroke-opacity",le.strokeOpacity!=null?le.strokeOpacity:le.opacity);var De=le.lineDash;De?(M(Y,"stroke-dasharray",le.lineDash.join(",")),M(Y,"stroke-dashoffset",l(le.lineDashOffset||0))):M(Y,"stroke-dasharray",""),le.lineCap&&M(Y,"stroke-linecap",le.lineCap),le.lineJoin&&M(Y,"stroke-linejoin",le.lineJoin),le.miterLimit&&M(Y,"stroke-miterlimit",le.miterLimit)}else M(Y,"stroke",i)}function r(Y){for(var le=[],Ae=Y.data,Be=Y.len(),Ce=0;Ce<Be;){var Se=Ae[Ce++],Fe="",Ve=0;switch(Se){case b.M:Fe="M",Ve=2;break;case b.L:Fe="L",Ve=2;break;case b.Q:Fe="Q",Ve=4;break;case b.C:Fe="C",Ve=6;break;case b.A:var De=Ae[Ce++],Le=Ae[Ce++],tt=Ae[Ce++],Et=Ae[Ce++],Ie=Ae[Ce++],Qe=Ae[Ce++],xe=Ae[Ce++],ie=Ae[Ce++],$=Math.abs(Qe),re=u($-E)||(ie?Qe>=E:-Qe>=E),ce=Qe>0?Qe%E:Qe%E+E,be=!1;re?be=!0:u($)?be=!1:be=ce>=d===!!ie;var Me=s(De+tt*h(Ie)),ke=s(Le+Et*v(Ie));re&&(ie?Qe=E-1e-4:Qe=-E+1e-4,be=!0,Ce===9&&le.push("M",Me,ke));var ct=s(De+tt*h(Ie+Qe)),ut=s(Le+Et*v(Ie+Qe));le.push("A",s(tt),s(Et),l(xe*o),+be,+ie,ct,ut);break;case b.Z:Fe="Z";break;case b.R:var ct=s(Ae[Ce++]),ut=s(Ae[Ce++]),mt=s(Ae[Ce++]),pt=s(Ae[Ce++]);le.push("M",ct,ut,"L",ct+mt,ut,"L",ct+mt,ut+pt,"L",ct,ut+pt,"L",ct,ut);break}Fe&&le.push(Fe);for(var Ot=0;Ot<Ve;Ot++)le.push(s(Ae[Ce++]))}return le.join(" ")}var a={};a.brush=function(Y){var le=Y.style,Ae=Y.__svgEl;Ae||(Ae=N("path"),Y.__svgEl=Ae),Y.path||Y.createPathProxy();var Be=Y.path;if(Y.__dirtyPath){Be.beginPath(),Be.subPixelOptimize=!1,Y.buildPath(Be,Y.shape),Y.__dirtyPath=!1;var Ce=r(Be);Ce.indexOf("NaN")<0&&M(Ae,"d",Ce)}c(Ae,le,!1,Y),x(Ae,Y.transform),le.text!=null?W(Y,Y.getBoundingRect()):te(Y)};var A={};A.brush=function(Y){var le=Y.style,Ae=le.image;if(Ae instanceof HTMLImageElement){var Be=Ae.src;Ae=Be}if(!Ae)return;var Ce=le.x||0,Se=le.y||0,Fe=le.width,Ve=le.height,De=Y.__svgEl;De||(De=N("image"),Y.__svgEl=De),Ae!==Y.__imageSrc&&(C(De,"href",Ae),Y.__imageSrc=Ae),M(De,"width",Fe),M(De,"height",Ve),M(De,"x",Ce),M(De,"y",Se),x(De,Y.transform),le.text!=null?W(Y,Y.getBoundingRect()):te(Y)};var L={},T=new Q,w={},_=[],j={left:"start",right:"end",center:"middle",middle:"middle"},W=function(Y,le){var Ae=Y.style,Be=Y.transform,Ce=Y instanceof f||Ae.transformText;Y.__dirty&&D.normalizeTextStyle(Ae,!0);var Se=Ae.text;if(Se!=null&&(Se+=""),!D.needDrawText(Se,Ae))return;Se==null&&(Se=""),!Ce&&Be&&(T.copy(le),T.applyTransform(Be),le=T);var Fe=Y.__textSvgEl;Fe||(Fe=N("text"),Y.__textSvgEl=Fe);var Ve=Fe.style,De=Ae.font||B.DEFAULT_FONT,Le=Fe.__computedFont;De!==Fe.__styleFont&&(Ve.font=Fe.__styleFont=De,Le=Fe.__computedFont=Ve.font);var tt=Ae.textPadding,Et=Ae.textLineHeight,Ie=Y.__textCotentBlock;(!Ie||Y.__dirtyText)&&(Ie=Y.__textCotentBlock=B.parsePlainText(Se,Le,tt,Et,Ae.truncate));var Qe=Ie.outerHeight,xe=Ie.lineHeight;D.getBoxPosition(w,Y,Ae,le);var ie=w.baseX,$=w.baseY,re=w.textAlign||"left",ce=w.textVerticalAlign;Z(Fe,Ce,Be,Ae,le,ie,$);var be=B.adjustTextY($,Qe,ce),Me=ie,ke=be;tt&&(Me=X(ie,re,tt),ke+=tt[0]),ke+=xe/2,c(Fe,Ae,!0,Y);var ct=Ie.canCacheByTextString,ut=Y.__tspanList||(Y.__tspanList=[]),mt=ut.length;if(ct&&Y.__canCacheByTextString&&Y.__text===Se){if(Y.__dirtyText&&mt)for(var pt=0;pt<mt;++pt)G(ut[pt],re,Me,ke+pt*xe)}else{Y.__text=Se,Y.__canCacheByTextString=ct;for(var Ot=Ie.lines,Ft=Ot.length,pt=0;pt<Ft;pt++){var He=ut[pt],Pe=Ot[pt];He?He.__zrText!==Pe&&(He.innerHTML="",He.appendChild(document.createTextNode(Pe))):(He=ut[pt]=N("tspan"),Fe.appendChild(He),He.appendChild(document.createTextNode(Pe))),G(He,re,Me,ke+pt*xe)}if(mt>Ft){for(;pt<mt;pt++)Fe.removeChild(ut[pt]);ut.length=Ft}}};function Z(Y,le,Ae,Be,Ce,Se,Fe){R.identity(_),le&&Ae&&R.copy(_,Ae);var Ve=Be.textRotation;if(Ce&&Ve){var De=Be.textOrigin;De==="center"?(Se=Ce.width/2+Ce.x,Fe=Ce.height/2+Ce.y):De&&(Se=De[0]+Ce.x,Fe=De[1]+Ce.y),_[4]-=Se,_[5]-=Fe,R.rotate(_,_,Ve),_[4]+=Se,_[5]+=Fe}x(Y,_)}function X(Y,le,Ae){return le==="right"?Y-Ae[1]:le==="center"?Y+Ae[3]/2-Ae[1]/2:Y+Ae[3]}function G(Y,le,Ae,Be){M(Y,"dominant-baseline","middle"),M(Y,"text-anchor",j[le]),M(Y,"x",Ae),M(Y,"y",Be)}function te(Y){Y&&Y.__textSvgEl&&(Y.__textSvgEl.parentNode&&Y.__textSvgEl.parentNode.removeChild(Y.__textSvgEl),Y.__textSvgEl=null,Y.__tspanList=[],Y.__text=null)}L.drawRectText=W,L.brush=function(Y){var le=Y.style;le.text!=null?W(Y,!1):te(Y)},ue.path=a,ue.image=A,ue.text=L},P4Qj:function(qe,ue,k){"use strict";Object.defineProperty(ue,"__esModule",{value:!0}),ue.removeSensor=ue.getSensor=void 0;var J=Q(k("chpo")),N=k("FxDU"),O=k("24YM");function Q(f){return f&&f.__esModule?f:{default:f}}var R={},B=function(b){var g=b.getAttribute(O.SizeSensorId);if(g&&R[g])return R[g];var i=(0,J.default)();b.setAttribute(O.SizeSensorId,i);var l=(0,N.createSensor)(b);return R[i]=l,l};ue.getSensor=B;var D=function(b){var g=b.element.getAttribute(O.SizeSensorId);b.element.removeAttribute(O.SizeSensorId),b.destroy(),g&&R[g]&&delete R[g]};ue.removeSensor=D},QBsz:function(qe,ue){var k=typeof Float32Array=="undefined"?Array:Float32Array;function J(c,r){var a=new k(2);return c==null&&(c=0),r==null&&(r=0),a[0]=c,a[1]=r,a}function N(c,r){return c[0]=r[0],c[1]=r[1],c}function O(c){var r=new k(2);return r[0]=c[0],r[1]=c[1],r}function Q(c,r,a){return c[0]=r,c[1]=a,c}function R(c,r,a){return c[0]=r[0]+a[0],c[1]=r[1]+a[1],c}function B(c,r,a,A){return c[0]=r[0]+a[0]*A,c[1]=r[1]+a[1]*A,c}function D(c,r,a){return c[0]=r[0]-a[0],c[1]=r[1]-a[1],c}function f(c){return Math.sqrt(g(c))}var b=f;function g(c){return c[0]*c[0]+c[1]*c[1]}var i=g;function l(c,r,a){return c[0]=r[0]*a[0],c[1]=r[1]*a[1],c}function v(c,r,a){return c[0]=r[0]/a[0],c[1]=r[1]/a[1],c}function h(c,r){return c[0]*r[0]+c[1]*r[1]}function d(c,r,a){return c[0]=r[0]*a,c[1]=r[1]*a,c}function E(c,r){var a=f(r);return a===0?(c[0]=0,c[1]=0):(c[0]=r[0]/a,c[1]=r[1]/a),c}function o(c,r){return Math.sqrt((c[0]-r[0])*(c[0]-r[0])+(c[1]-r[1])*(c[1]-r[1]))}var n=o;function s(c,r){return(c[0]-r[0])*(c[0]-r[0])+(c[1]-r[1])*(c[1]-r[1])}var u=s;function p(c,r){return c[0]=-r[0],c[1]=-r[1],c}function S(c,r,a,A){return c[0]=r[0]+A*(a[0]-r[0]),c[1]=r[1]+A*(a[1]-r[1]),c}function x(c,r,a){var A=r[0],L=r[1];return c[0]=a[0]*A+a[2]*L+a[4],c[1]=a[1]*A+a[3]*L+a[5],c}function M(c,r,a){return c[0]=Math.min(r[0],a[0]),c[1]=Math.min(r[1],a[1]),c}function C(c,r,a){return c[0]=Math.max(r[0],a[0]),c[1]=Math.max(r[1],a[1]),c}ue.create=J,ue.copy=N,ue.clone=O,ue.set=Q,ue.add=R,ue.scaleAndAdd=B,ue.sub=D,ue.len=f,ue.length=b,ue.lenSquare=g,ue.lengthSquare=i,ue.mul=l,ue.div=v,ue.dot=h,ue.scale=d,ue.normalize=E,ue.distance=o,ue.dist=n,ue.distanceSquare=s,ue.distSquare=u,ue.negate=p,ue.lerp=S,ue.applyTransform=x,ue.min=M,ue.max=C},QDVR:function(qe,ue,k){"use strict";k.d(ue,"e",function(){return N}),k.d(ue,"d",function(){return O}),k.d(ue,"c",function(){return D}),k.d(ue,"b",function(){return f}),k.d(ue,"a",function(){return g});var J=function(){var i=function(l,v){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var E in d)d.hasOwnProperty(E)&&(h[E]=d[E])},i(l,v)};return function(l,v){i(l,v);function h(){this.constructor=l}l.prototype=v===null?Object.create(v):(h.prototype=v.prototype,new h)}}();function N(i){var l=[];return i.forEach(function(v){return l.push(v)}),l}function O(i){var l=[];return i.forEach(function(v,h){return l.push(h)}),l}var Q=function(){function i(){this._value="",this._pos=0}return i.prototype.reset=function(l){return this._value=l,this._pos=0,this},i.prototype.next=function(){return this._pos+=1,this},i.prototype.hasNext=function(){return this._pos<this._value.length-1},i.prototype.cmp=function(l){var v=l.charCodeAt(0),h=this._value.charCodeAt(this._pos);return v-h},i.prototype.value=function(){return this._value[this._pos]},i}(),R=function(){function i(l){l===void 0&&(l=!0),this._splitOnBackslash=l}return i.prototype.reset=function(l){return this._value=l.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()},i.prototype.hasNext=function(){return this._to<this._value.length},i.prototype.next=function(){this._from=this._to;for(var l=!0;this._to<this._value.length;this._to++){var v=this._value.charCodeAt(this._to);if(v===47||this._splitOnBackslash&&v===92)if(l)this._from++;else break;else l=!1}return this},i.prototype.cmp=function(l){for(var v=0,h=l.length,d=this._from;v<h&&d<this._to;){var E=l.charCodeAt(v)-this._value.charCodeAt(d);if(E!==0)return E;v+=1,d+=1}return h===this._to-this._from?0:v<h?-1:1},i.prototype.value=function(){return this._value.substring(this._from,this._to)},i}(),B=function(){function i(){}return i}(),D=function(){function i(l){this._iter=l}return i.forPaths=function(){return new i(new R)},i.forStrings=function(){return new i(new Q)},i.prototype.clear=function(){this._root=void 0},i.prototype.set=function(l,v){var h=this._iter.reset(l),d;for(this._root||(this._root=new B,this._root.segment=h.value()),d=this._root;;){var E=h.cmp(d.segment);if(E>0)d.left||(d.left=new B,d.left.segment=h.value()),d=d.left;else if(E<0)d.right||(d.right=new B,d.right.segment=h.value()),d=d.right;else if(h.hasNext())h.next(),d.mid||(d.mid=new B,d.mid.segment=h.value()),d=d.mid;else break}var o=d.value;return d.value=v,d.key=l,o},i.prototype.get=function(l){for(var v=this._iter.reset(l),h=this._root;h;){var d=v.cmp(h.segment);if(d>0)h=h.left;else if(d<0)h=h.right;else if(v.hasNext())v.next(),h=h.mid;else break}return h?h.value:void 0},i.prototype.findSubstr=function(l){for(var v=this._iter.reset(l),h=this._root,d=void 0;h;){var E=v.cmp(h.segment);if(E>0)h=h.left;else if(E<0)h=h.right;else if(v.hasNext())v.next(),d=h.value||d,h=h.mid;else break}return h&&h.value||d},i.prototype.forEach=function(l){this._forEach(this._root,l)},i.prototype._forEach=function(l,v){l&&(this._forEach(l.left,v),l.value&&v(l.value,l.key),this._forEach(l.mid,v),this._forEach(l.right,v))},i}(),f=function(){function i(){this.map=new Map,this.ignoreCase=!1}return i.prototype.set=function(l,v){this.map.set(this.toKey(l),v)},i.prototype.get=function(l){return this.map.get(this.toKey(l))},i.prototype.toKey=function(l){var v=l.toString();return this.ignoreCase&&(v=v.toLowerCase()),v},i}(),b=function(){function i(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return i.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(i.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),i.prototype.get=function(l,v){v===void 0&&(v=0);var h=this._map.get(l);return h?(v!==0&&this.touch(h,v),h.value):void 0},i.prototype.set=function(l,v,h){h===void 0&&(h=0);var d=this._map.get(l);if(d)d.value=v,h!==0&&this.touch(d,h);else{d={key:l,value:v,next:void 0,previous:void 0};switch(h){case 0:this.addItemLast(d);break;case 1:this.addItemFirst(d);break;case 2:this.addItemLast(d);break;default:this.addItemLast(d);break}this._map.set(l,d),this._size++}},i.prototype.delete=function(l){return!!this.remove(l)},i.prototype.remove=function(l){var v=this._map.get(l);return v?(this._map.delete(l),this.removeItem(v),this._size--,v.value):void 0},i.prototype.forEach=function(l,v){for(var h=this._head;h;)v?l.bind(v)(h.value,h.key,this):l(h.value,h.key,this),h=h.next},i.prototype.trimOld=function(l){if(l>=this.size)return;if(l===0){this.clear();return}for(var v=this._head,h=this.size;v&&h>l;)this._map.delete(v.key),v=v.next,h--;this._head=v,this._size=h,v&&(v.previous=void 0)},i.prototype.addItemFirst=function(l){if(!this._head&&!this._tail)this._tail=l;else if(this._head)l.next=this._head,this._head.previous=l;else throw new Error("Invalid list");this._head=l},i.prototype.addItemLast=function(l){if(!this._head&&!this._tail)this._head=l;else if(this._tail)l.previous=this._tail,this._tail.next=l;else throw new Error("Invalid list");this._tail=l},i.prototype.removeItem=function(l){if(l===this._head&&l===this._tail)this._head=void 0,this._tail=void 0;else if(l===this._head){if(!l.next)throw new Error("Invalid list");l.next.previous=void 0,this._head=l.next}else if(l===this._tail){if(!l.previous)throw new Error("Invalid list");l.previous.next=void 0,this._tail=l.previous}else{var v=l.next,h=l.previous;if(!v||!h)throw new Error("Invalid list");v.previous=h,h.next=v}l.next=void 0,l.previous=void 0},i.prototype.touch=function(l,v){if(!this._head||!this._tail)throw new Error("Invalid list");if(v!==1&&v!==2)return;if(v===1){if(l===this._head)return;var h=l.next,d=l.previous;l===this._tail?(d.next=void 0,this._tail=d):(h.previous=d,d.next=h),l.previous=void 0,l.next=this._head,this._head.previous=l,this._head=l}else if(v===2){if(l===this._tail)return;var h=l.next,d=l.previous;l===this._head?(h.previous=void 0,this._head=h):(h.previous=d,d.next=h),l.next=void 0,l.previous=this._tail,this._tail.next=l,this._tail=l}},i.prototype.toJSON=function(){var l=[];return this.forEach(function(v,h){l.push([h,v])}),l},i}(),g=function(i){J(l,i);function l(v,h){h===void 0&&(h=1);var d=i.call(this)||this;return d._limit=v,d._ratio=Math.min(Math.max(0,h),1),d}return l.prototype.get=function(v){return i.prototype.get.call(this,v,2)},l.prototype.peek=function(v){return i.prototype.get.call(this,v,0)},l.prototype.set=function(v,h){i.prototype.set.call(this,v,h,2),this.checkTrim()},l.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},l}(b)},"QO+J":function(qe,ue,k){"use strict";Object.defineProperty(ue,"__esModule",{value:!0}),ue.createSensor=void 0;var J=O(k("NohK")),N=k("24YM");function O(R){return R&&R.__esModule?R:{default:R}}var Q=function(B){var D=void 0,f=[],b=function(){getComputedStyle(B).position==="static"&&(B.style.position="relative");var d=document.createElement("object");return d.onload=function(){d.contentDocument.defaultView.addEventListener("resize",g),g()},d.style.display="block",d.style.position="absolute",d.style.top="0",d.style.left="0",d.style.height="100%",d.style.width="100%",d.style.overflow="hidden",d.style.pointerEvents="none",d.style.zIndex="-1",d.style.opacity="0",d.setAttribute("class",N.SensorClassName),d.setAttribute("tabindex",N.SensorTabIndex),d.type="text/html",B.appendChild(d),d.data="about:blank",d},g=(0,J.default)(function(){f.forEach(function(h){h(B)})}),i=function(d){D||(D=b()),f.indexOf(d)===-1&&f.push(d)},l=function(){D&&D.parentNode&&(D.contentDocument&&D.contentDocument.defaultView.removeEventListener("resize",g),D.parentNode.removeChild(D),D=void 0,f=[])},v=function(d){var E=f.indexOf(d);E!==-1&&f.splice(E,1),f.length===0&&D&&l()};return{element:B,bind:i,destroy:l,unbind:v}};ue.createSensor=Q},Qe9p:function(qe,ue,k){var J=k("1RvN"),N={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(r){return r=Math.round(r),r<0?0:r>255?255:r}function Q(r){return r=Math.round(r),r<0?0:r>360?360:r}function R(r){return r<0?0:r>1?1:r}function B(r){return r.length&&r.charAt(r.length-1)==="%"?O(parseFloat(r)/100*255):O(parseInt(r,10))}function D(r){return r.length&&r.charAt(r.length-1)==="%"?R(parseFloat(r)/100):R(parseFloat(r))}function f(r,a,A){return A<0?A+=1:A>1&&(A-=1),A*6<1?r+(a-r)*A*6:A*2<1?a:A*3<2?r+(a-r)*(2/3-A)*6:r}function b(r,a,A){return r+(a-r)*A}function g(r,a,A,L,T){return r[0]=a,r[1]=A,r[2]=L,r[3]=T,r}function i(r,a){return r[0]=a[0],r[1]=a[1],r[2]=a[2],r[3]=a[3],r}var l=new J(20),v=null;function h(r,a){v&&i(v,a),v=l.put(r,v||a.slice())}function d(r,a){if(!r)return;a=a||[];var A=l.get(r);if(A)return i(a,A);r=r+"";var L=r.replace(/ /g,"").toLowerCase();if(L in N)return i(a,N[L]),h(r,a),a;if(L.charAt(0)==="#"){if(L.length===4){var T=parseInt(L.substr(1),16);if(!(T>=0&&T<=4095)){g(a,0,0,0,1);return}return g(a,(T&3840)>>4|(T&3840)>>8,T&240|(T&240)>>4,T&15|(T&15)<<4,1),h(r,a),a}else if(L.length===7){var T=parseInt(L.substr(1),16);if(!(T>=0&&T<=16777215)){g(a,0,0,0,1);return}return g(a,(T&16711680)>>16,(T&65280)>>8,T&255,1),h(r,a),a}return}var w=L.indexOf("("),_=L.indexOf(")");if(w!==-1&&_+1===L.length){var j=L.substr(0,w),W=L.substr(w+1,_-(w+1)).split(","),Z=1;switch(j){case"rgba":if(W.length!==4){g(a,0,0,0,1);return}Z=D(W.pop());case"rgb":if(W.length!==3){g(a,0,0,0,1);return}return g(a,B(W[0]),B(W[1]),B(W[2]),Z),h(r,a),a;case"hsla":if(W.length!==4){g(a,0,0,0,1);return}return W[3]=D(W[3]),E(W,a),h(r,a),a;case"hsl":if(W.length!==3){g(a,0,0,0,1);return}return E(W,a),h(r,a),a;default:return}}g(a,0,0,0,1);return}function E(r,a){var A=(parseFloat(r[0])%360+360)%360/360,L=D(r[1]),T=D(r[2]),w=T<=.5?T*(L+1):T+L-T*L,_=T*2-w;return a=a||[],g(a,O(f(_,w,A+1/3)*255),O(f(_,w,A)*255),O(f(_,w,A-1/3)*255),1),r.length===4&&(a[3]=r[3]),a}function o(r){if(!r)return;var a=r[0]/255,A=r[1]/255,L=r[2]/255,T=Math.min(a,A,L),w=Math.max(a,A,L),_=w-T,j=(w+T)/2,W,Z;if(_===0)W=0,Z=0;else{j<.5?Z=_/(w+T):Z=_/(2-w-T);var X=((w-a)/6+_/2)/_,G=((w-A)/6+_/2)/_,te=((w-L)/6+_/2)/_;a===w?W=te-G:A===w?W=1/3+X-te:L===w&&(W=2/3+G-X),W<0&&(W+=1),W>1&&(W-=1)}var Y=[W*360,Z,j];return r[3]!=null&&Y.push(r[3]),Y}function n(r,a){var A=d(r);if(A){for(var L=0;L<3;L++)a<0?A[L]=A[L]*(1-a)|0:A[L]=(255-A[L])*a+A[L]|0,A[L]>255?A[L]=255:r[L]<0&&(A[L]=0);return c(A,A.length===4?"rgba":"rgb")}}function s(r){var a=d(r);if(a)return((1<<24)+(a[0]<<16)+(a[1]<<8)+ +a[2]).toString(16).slice(1)}function u(r,a,A){if(!(a&&a.length)||!(r>=0&&r<=1))return;A=A||[];var L=r*(a.length-1),T=Math.floor(L),w=Math.ceil(L),_=a[T],j=a[w],W=L-T;return A[0]=O(b(_[0],j[0],W)),A[1]=O(b(_[1],j[1],W)),A[2]=O(b(_[2],j[2],W)),A[3]=R(b(_[3],j[3],W)),A}var p=u;function S(r,a,A){if(!(a&&a.length)||!(r>=0&&r<=1))return;var L=r*(a.length-1),T=Math.floor(L),w=Math.ceil(L),_=d(a[T]),j=d(a[w]),W=L-T,Z=c([O(b(_[0],j[0],W)),O(b(_[1],j[1],W)),O(b(_[2],j[2],W)),R(b(_[3],j[3],W))],"rgba");return A?{color:Z,leftIndex:T,rightIndex:w,value:L}:Z}var x=S;function M(r,a,A,L){if(r=d(r),r)return r=o(r),a!=null&&(r[0]=Q(a)),A!=null&&(r[1]=D(A)),L!=null&&(r[2]=D(L)),c(E(r),"rgba")}function C(r,a){if(r=d(r),r&&a!=null)return r[3]=R(a),c(r,"rgba")}function c(r,a){if(!r||!r.length)return;var A=r[0]+","+r[1]+","+r[2];return(a==="rgba"||a==="hsva"||a==="hsla")&&(A+=","+r[3]),a+"("+A+")"}ue.parse=d,ue.lift=n,ue.toHex=s,ue.fastLerp=u,ue.fastMapToColor=p,ue.lerp=S,ue.mapToColor=x,ue.modifyHSL=M,ue.modifyAlpha=C,ue.stringify=c},QuXc:function(qe,ue){var k=function(N){this.colorStops=N||[]};k.prototype={constructor:k,addColorStop:function(N,O){this.colorStops.push({offset:N,color:O})}};var J=k;qe.exports=J},RDYZ:function(qe,ue,k){var J=k("dMvE");function N(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}N.prototype={constructor:N,step:function(Q,R){if(this._initialized||(this._startTime=Q+this._delay,this._initialized=!0),this._paused){this._pausedTime+=R;return}var B=(Q-this._startTime-this._pausedTime)/this._life;if(B<0)return;B=Math.min(B,1);var D=this.easing,f=typeof D=="string"?J[D]:D,b=typeof f=="function"?f(B):B;return this.fire("frame",b),B===1?this.loop?(this.restart(Q),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(Q){var R=(Q-this._startTime-this._pausedTime)%this._life;this._startTime=Q-R+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(Q,R){Q="on"+Q,this[Q]&&this[Q](this._target,R)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var O=N;qe.exports=O},RXMa:function(qe,ue,k){var J=k("y+Vt"),N=J.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(O,Q){var R=Q.cx,B=Q.cy,D=Math.PI*2;O.moveTo(R+Q.r,B),O.arc(R,B,Q.r,0,D,!1),O.moveTo(R+Q.r0,B),O.arc(R,B,Q.r0,0,D,!0)}});qe.exports=N},"SA+Z":function(qe,ue,k){var J=k("wTVA"),N=k("EbDI"),O=k("ZhPi"),Q=k("wkBT");function R(B){return J(B)||N(B)||O(B)||Q()}qe.exports=R,qe.exports.__esModule=!0,qe.exports.default=qe.exports},SJMd:function(qe,ue){/**
|
|
* @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 k,J,N,O=!1,Q,R;window.PR_SHOULD_USE_CONTINUATION=!0;var B,D;(function(){var f=window,b=["break,continue,do,else,for,if,return,while"],g=[b,"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"],i=[g,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],l=[i,"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"],v=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],h=[i,"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"],d="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",E=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],o="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",n=[b,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],s=[b,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],u=[b,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],p=[l,h,v,E,o,n,s,u],S=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,x="str",M="kwd",C="com",c="typ",r="lit",a="pun",A="pln",L="tag",T="dec",w="src",_="atn",j="atv",W="nocode",Z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function X(ie){for(var $=0,re=!1,ce=!1,be=0,Me=ie.length;be<Me;++be){var ke=ie[be];if(ke.ignoreCase)ce=!0;else if(/[a-z]/i.test(ke.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){re=!0,ce=!1;break}}var ct={b:8,t:9,n:10,v:11,f:12,r:13};function ut(He){var Pe=He.charCodeAt(0);if(Pe!==92)return Pe;var at=He.charAt(1);return Pe=ct[at],Pe||("0"<=at&&at<="7"?parseInt(He.substring(1),8):at==="u"||at==="x"?parseInt(He.substring(2),16):He.charCodeAt(1))}function mt(He){if(He<32)return(He<16?"\\x0":"\\x")+He.toString(16);var Pe=String.fromCharCode(He);return Pe==="\\"||Pe==="-"||Pe==="]"||Pe==="^"?"\\"+Pe:Pe}function pt(He){var Pe=He.substring(1,He.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")),at=[],vt=Pe[0]==="^",et=["["];vt&&et.push("^");for(var At=vt?1:0,je=Pe.length;At<je;++At){var _e=Pe[At];if(/\\[bdsw]/i.test(_e))et.push(_e);else{var Ue=ut(_e),me;At+2<je&&Pe[At+1]==="-"?(me=ut(Pe[At+2]),At+=2):me=Ue,at.push([Ue,me]),me<65||Ue>122||(me<65||Ue>90||at.push([Math.max(65,Ue)|32,Math.min(me,90)|32]),me<97||Ue>122||at.push([Math.max(97,Ue)&~32,Math.min(me,122)&~32]))}}at.sort(function(Ye,ze){return Ye[0]-ze[0]||ze[1]-Ye[1]});for(var ve=[],Ee=[],At=0;At<at.length;++At){var Oe=at[At];Oe[0]<=Ee[1]+1?Ee[1]=Math.max(Ee[1],Oe[1]):ve.push(Ee=Oe)}for(var At=0;At<ve.length;++At){var Oe=ve[At];et.push(mt(Oe[0])),Oe[1]>Oe[0]&&(Oe[1]+1>Oe[0]&&et.push("-"),et.push(mt(Oe[1])))}return et.push("]"),et.join("")}function Ot(He){for(var Pe=He.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")),at=Pe.length,vt=[],et=0,At=0;et<at;++et){var je=Pe[et];if(je==="(")++At;else if(je.charAt(0)==="\\"){var _e=+je.substring(1);_e&&(_e<=At?vt[_e]=-1:Pe[et]=mt(_e))}}for(var et=1;et<vt.length;++et)vt[et]===-1&&(vt[et]=++$);for(var et=0,At=0;et<at;++et){var je=Pe[et];if(je==="(")++At,vt[At]||(Pe[et]="(?:");else if(je.charAt(0)==="\\"){var _e=+je.substring(1);_e&&_e<=At&&(Pe[et]="\\"+vt[_e])}}for(var et=0;et<at;++et)Pe[et]==="^"&&Pe[et+1]!=="^"&&(Pe[et]="");if(He.ignoreCase&&re)for(var et=0;et<at;++et){var je=Pe[et],Ue=je.charAt(0);je.length>=2&&Ue==="["?Pe[et]=pt(je):Ue!=="\\"&&(Pe[et]=je.replace(/[a-zA-Z]/g,function(Ee){var Oe=Ee.charCodeAt(0);return"["+String.fromCharCode(Oe&~32,Oe|32)+"]"}))}return Pe.join("")}for(var Ft=[],be=0,Me=ie.length;be<Me;++be){var ke=ie[be];if(ke.global||ke.multiline)throw new Error(""+ke);Ft.push("(?:"+Ot(ke)+")")}return new RegExp(Ft.join("|"),ce?"gi":"g")}function G(ie,$){var re=/(?:^|\s)nocode(?:\s|$)/,ce=[],be=0,Me=[],ke=0;function ct(ut){var mt=ut.nodeType;if(mt==1){if(re.test(ut.className))return;for(var pt=ut.firstChild;pt;pt=pt.nextSibling)ct(pt);var Ot=ut.nodeName.toLowerCase();(Ot==="br"||Ot==="li")&&(ce[ke]=`
|
|
`,Me[ke<<1]=be++,Me[ke++<<1|1]=ut)}else if(mt==3||mt==4){var Ft=ut.nodeValue;Ft.length&&($?Ft=Ft.replace(/\r\n?/g,`
|
|
`):Ft=Ft.replace(/[ \t\r\n]+/g," "),ce[ke]=Ft,Me[ke<<1]=be,be+=Ft.length,Me[ke++<<1|1]=ut)}}return ct(ie),{sourceCode:ce.join("").replace(/\n$/,""),spans:Me}}function te(ie,$,re,ce,be){if(!re)return;var Me={sourceNode:ie,pre:1,langExtension:null,numberLines:null,sourceCode:re,spans:null,basePos:$,decorations:null};ce(Me),be.push.apply(be,Me.decorations)}var Y=/\S/;function le(ie){for(var $=void 0,re=ie.firstChild;re;re=re.nextSibling){var ce=re.nodeType;$=ce===1?$?ie:re:ce===3&&Y.test(re.nodeValue)?ie:$}return $===ie?void 0:$}function Ae(ie,$){var re={},ce;(function(){for(var ke=ie.concat($),ct=[],ut={},mt=0,pt=ke.length;mt<pt;++mt){var Ot=ke[mt],Ft=Ot[3];if(Ft)for(var He=Ft.length;--He>=0;)re[Ft.charAt(He)]=Ot;var Pe=Ot[1],at=""+Pe;ut.hasOwnProperty(at)||(ct.push(Pe),ut[at]=null)}ct.push(/[\0-\uffff]/),ce=X(ct)})();var be=$.length,Me=function(ke){for(var ct=ke.sourceCode,ut=ke.basePos,mt=ke.sourceNode,pt=[ut,A],Ot=0,Ft=ct.match(ce)||[],He={},Pe=0,at=Ft.length;Pe<at;++Pe){var vt=Ft[Pe],et=He[vt],At=void 0,je;if(typeof et=="string")je=!1;else{var _e=re[vt.charAt(0)];if(_e)At=vt.match(_e[1]),et=_e[0];else{for(var Ue=0;Ue<be;++Ue)if(_e=$[Ue],At=vt.match(_e[1]),At){et=_e[0];break}At||(et=A)}je=et.length>=5&&et.substring(0,5)==="lang-",je&&!(At&&typeof At[1]=="string")&&(je=!1,et=w),je||(He[vt]=et)}var me=Ot;if(Ot+=vt.length,!je)pt.push(ut+me,et);else{var ve=At[1],Ee=vt.indexOf(ve),Oe=Ee+ve.length;At[2]&&(Oe=vt.length-At[2].length,Ee=Oe-ve.length);var Ye=et.substring(5);te(mt,ut+me,vt.substring(0,Ee),Me,pt),te(mt,ut+me+Ee,ve,Le(Ye,ve),pt),te(mt,ut+me+Oe,vt.substring(Oe),Me,pt)}}ke.decorations=pt};return Me}function Be(ie){var $=[],re=[];ie.tripleQuotedStrings?$.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?$.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):$.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&re.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ce=ie.hashComments;ce&&(ie.cStyleComments?(ce>1?$.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):$.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),re.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):$.push([C,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&(re.push([C,/^\/\/[^\r\n]*/,null]),re.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var be=ie.regexLiterals;if(be){var Me=be>1?"":`
|
|
\r`,ke=Me?".":"[\\S\\s]",ct="/(?=[^/*"+Me+"])(?:[^/\\x5B\\x5C"+Me+"]|\\x5C"+ke+"|\\x5B(?:[^\\x5C\\x5D"+Me+"]|\\x5C"+ke+")*(?:\\x5D|$))+/";re.push(["lang-regex",RegExp("^"+Z+"("+ct+")")])}var ut=ie.types;ut&&re.push([c,ut]);var mt=(""+ie.keywords).replace(/^ | $/g,"");mt.length&&re.push([M,new RegExp("^(?:"+mt.replace(/[\s,]+/g,"|")+")\\b"),null]),$.push([A,/^\s+/,null,` \r
|
|
\xA0`]);var pt="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(pt+="(?!s*/)"),re.push([r,/^@[a-z_$][a-z_$@0-9]*/i,null],[c,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[A,/^[a-z_$][a-z_$@0-9]*/i,null],[r,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[A,/^\\[\s\S]?/,null],[a,new RegExp(pt),null]),Ae($,re)}var Ce=Be({keywords:p,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Se(ie,$,re){for(var ce=/(?:^|\s)nocode(?:\s|$)/,be=/\r\n?|\n/,Me=ie.ownerDocument,ke=Me.createElement("li");ie.firstChild;)ke.appendChild(ie.firstChild);var ct=[ke];function ut(Pe){var at=Pe.nodeType;if(at==1&&!ce.test(Pe.className))if(Pe.nodeName==="br")mt(Pe),Pe.parentNode&&Pe.parentNode.removeChild(Pe);else for(var vt=Pe.firstChild;vt;vt=vt.nextSibling)ut(vt);else if((at==3||at==4)&&re){var et=Pe.nodeValue,At=et.match(be);if(At){var je=et.substring(0,At.index);Pe.nodeValue=je;var _e=et.substring(At.index+At[0].length);if(_e){var Ue=Pe.parentNode;Ue.insertBefore(Me.createTextNode(_e),Pe.nextSibling)}mt(Pe),je||Pe.parentNode.removeChild(Pe)}}}function mt(Pe){for(;!Pe.nextSibling;)if(Pe=Pe.parentNode,!Pe)return;function at(At,je){var _e=je?At.cloneNode(!1):At,Ue=At.parentNode;if(Ue){var me=at(Ue,1),ve=At.nextSibling;me.appendChild(_e);for(var Ee=ve;Ee;Ee=ve)ve=Ee.nextSibling,me.appendChild(Ee)}return _e}for(var vt=at(Pe.nextSibling,0),et;(et=vt.parentNode)&&et.nodeType===1;)vt=et;ct.push(vt)}for(var pt=0;pt<ct.length;++pt)ut(ct[pt]);$===($|0)&&ct[0].setAttribute("value",$);var Ot=Me.createElement("ol");Ot.className="linenums";for(var Ft=Math.max(0,$-1|0)||0,pt=0,He=ct.length;pt<He;++pt)ke=ct[pt],ke.className="L"+(pt+Ft)%10,ke.firstChild||ke.appendChild(Me.createTextNode("\xA0")),Ot.appendChild(ke);ie.appendChild(Ot)}function Fe(ie){var $=/\bMSIE\s(\d+)/.exec(navigator.userAgent);$=$&&+$[1]<=8;var re=/\n/g,ce=ie.sourceCode,be=ce.length,Me=0,ke=ie.spans,ct=ke.length,ut=0,mt=ie.decorations,pt=mt.length,Ot=0;mt[pt]=be;var Ft,He;for(He=Ft=0;He<pt;)mt[He]!==mt[He+2]?(mt[Ft++]=mt[He++],mt[Ft++]=mt[He++]):He+=2;for(pt=Ft,He=Ft=0;He<pt;){for(var Pe=mt[He],at=mt[He+1],vt=He+2;vt+2<=pt&&mt[vt+1]===at;)vt+=2;mt[Ft++]=Pe,mt[Ft++]=at,He=vt}pt=mt.length=Ft;var et=ie.sourceNode,At="";et&&(At=et.style.display,et.style.display="none");try{for(var je=null;ut<ct;){var _e=ke[ut],Ue=ke[ut+2]||be,me=mt[Ot+2]||be,vt=Math.min(Ue,me),ve=ke[ut+1],Ee;if(ve.nodeType!==1&&(Ee=ce.substring(Me,vt))){$&&(Ee=Ee.replace(re,"\r")),ve.nodeValue=Ee;var Oe=ve.ownerDocument,Ye=Oe.createElement("span");Ye.className=mt[Ot+1];var ze=ve.parentNode;ze.replaceChild(Ye,ve),Ye.appendChild(ve),Me<Ue&&(ke[ut+1]=ve=Oe.createTextNode(ce.substring(vt,Ue)),ze.insertBefore(ve,Ye.nextSibling))}Me=vt,Me>=Ue&&(ut+=2),Me>=me&&(Ot+=2)}}finally{et&&(et.style.display=At)}}var Ve={};function De(ie,$){for(var re=$.length;--re>=0;){var ce=$[re];Ve.hasOwnProperty(ce)?f.console&&console.warn("cannot override language handler %s",ce):Ve[ce]=ie}}function Le(ie,$){return ie&&Ve.hasOwnProperty(ie)||(ie=/^\s*</.test($)?"default-markup":"default-code"),Ve[ie]}De(Ce,["default-code"]),De(Ae([],[[A,/^[^<?]+/],[T,/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[a,/^(?:<[%?]|[%?]>)/],["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"]),De(Ae([[A,/^[\s]+/,null,` \r
|
|
`],[j,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[L,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[_,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[a,/^[=<>\/]+/],["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"]),De(Ae([],[[j,/^[\s\S]+/]]),["uq.val"]),De(Be({keywords:l,hashComments:!0,cStyleComments:!0,types:S}),["c","cc","cpp","cxx","cyc","m"]),De(Be({keywords:"null,true,false"}),["json"]),De(Be({keywords:h,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:S}),["cs"]),De(Be({keywords:v,cStyleComments:!0}),["java"]),De(Be({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),De(Be({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),De(Be({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),De(Be({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),De(Be({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),De(Be({keywords:d,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),De(Ae([],[[x,/^[\s\S]+/]]),["regex"]);function tt(ie){var $=ie.langExtension;try{var re=G(ie.sourceNode,ie.pre),ce=re.sourceCode;ie.sourceCode=ce,ie.spans=re.spans,ie.basePos=0,Le($,ce)(ie),Fe(ie)}catch(be){f.console&&console.log(be&&be.stack||be)}}function Et(ie,$,re){var ce=re||!1,be=$||null,Me=document.createElement("div");Me.innerHTML="<pre>"+ie+"</pre>",Me=Me.firstChild,ce&&Se(Me,ce,!0);var ke={langExtension:be,numberLines:ce,sourceNode:Me,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return tt(ke),Me.innerHTML}function Ie(ie,$){var re=$||document.body,ce=re.ownerDocument||document;function be(_e){return re.getElementsByTagName(_e)}for(var Me=[be("pre"),be("code"),be("xmp")],ke=[],ct=0;ct<Me.length;++ct)for(var ut=0,mt=Me[ct].length;ut<mt;++ut)ke.push(Me[ct][ut]);Me=null;var pt=Date;pt.now||(pt={now:function(){return+new Date}});var Ot=0,Ft=/\blang(?:uage)?-([\w.]+)(?!\S)/,He=/\bprettyprint\b/,Pe=/\bprettyprinted\b/,at=/pre|xmp/i,vt=/^code$/i,et=/^(?:pre|code|xmp)$/i,At={};function je(){for(var _e=f.PR_SHOULD_USE_CONTINUATION?pt.now()+250:Infinity;Ot<ke.length&&pt.now()<_e;Ot++){for(var Ue=ke[Ot],me=At,ve=Ue;ve=ve.previousSibling;){var Ee=ve.nodeType,Oe=(Ee===7||Ee===8)&&ve.nodeValue;if(Oe?!/^\??prettify\b/.test(Oe):Ee!==3||/\S/.test(ve.nodeValue))break;if(Oe){me={},Oe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ht,ot,Bt){me[ot]=Bt});break}}var Ye=Ue.className;if((me!==At||He.test(Ye))&&!Pe.test(Ye)){for(var ze=!1,gt=Ue.parentNode;gt;gt=gt.parentNode){var Lt=gt.tagName;if(et.test(Lt)&>.className&&He.test(gt.className)){ze=!0;break}}if(!ze){Ue.className+=" prettyprinted";var Pt=me.lang;if(!Pt){Pt=Ye.match(Ft);var Rt;!Pt&&(Rt=le(Ue))&&vt.test(Rt.tagName)&&(Pt=Rt.className.match(Ft)),Pt&&(Pt=Pt[1])}var Dt;if(at.test(Ue.tagName))Dt=1;else{var dt=Ue.currentStyle,it=ce.defaultView,nt=dt?dt.whiteSpace:it&&it.getComputedStyle?it.getComputedStyle(Ue,null).getPropertyValue("white-space"):0;Dt=nt&&nt.substring(0,3)==="pre"}var we=me.linenums;(we=we==="true"||+we)||(we=Ye.match(/\blinenums\b(?::(\d+))?/),we=we?we[1]&&we[1].length?+we[1]:!0:!1),we&&Se(Ue,we,Dt);var Ne={langExtension:Pt,sourceNode:Ue,numberLines:we,pre:Dt,sourceCode:null,basePos:null,spans:null,decorations:null};tt(Ne)}}}Ot<ke.length?f.setTimeout(je,250):typeof ie=="function"&&ie()}je()}var Qe=f.PR={createSimpleLexer:Ae,registerLangHandler:De,sourceDecorator:Be,PR_ATTRIB_NAME:_,PR_ATTRIB_VALUE:j,PR_COMMENT:C,PR_DECLARATION:T,PR_KEYWORD:M,PR_LITERAL:r,PR_NOCODE:W,PR_PLAIN:A,PR_PUNCTUATION:a,PR_SOURCE:w,PR_STRING:x,PR_TAG:L,PR_TYPE:c,prettyPrintOne:O?f.prettyPrintOne=Et:B=Et,prettyPrint:D=O?f.prettyPrint=Ie:D=Ie},xe=f.define;typeof xe=="function"&&xe.amd&&xe("google-code-prettify",[],function(){return Qe})})()},SKnc:function(qe,ue,k){var J=k("bYtY"),N=k("QuXc"),O=function(R,B,D,f,b,g){this.x=R==null?0:R,this.y=B==null?0:B,this.x2=D==null?1:D,this.y2=f==null?0:f,this.type="linear",this.global=g||!1,N.call(this,b)};O.prototype={constructor:O},J.inherits(O,N);var Q=O;qe.exports=Q},SUKs:function(qe,ue,k){var J=k("LPTA"),N=J.debugMode,O=function(){};N===1&&(O=console.error);var Q=O;qe.exports=Q},Sj9i:function(qe,ue,k){var J=k("QBsz"),N=J.create,O=J.distSquare,Q=Math.pow,R=Math.sqrt,B=1e-8,D=1e-4,f=R(3),b=1/3,g=N(),i=N(),l=N();function v(r){return r>-B&&r<B}function h(r){return r>B||r<-B}function d(r,a,A,L,T){var w=1-T;return w*w*(w*r+3*T*a)+T*T*(T*L+3*w*A)}function E(r,a,A,L,T){var w=1-T;return 3*(((a-r)*w+2*(A-a)*T)*w+(L-A)*T*T)}function o(r,a,A,L,T,w){var _=L+3*(a-A)-r,j=3*(A-a*2+r),W=3*(a-r),Z=r-T,X=j*j-3*_*W,G=j*W-9*_*Z,te=W*W-3*j*Z,Y=0;if(v(X)&&v(G))if(v(j))w[0]=0;else{var le=-W/j;le>=0&&le<=1&&(w[Y++]=le)}else{var Ae=G*G-4*X*te;if(v(Ae)){var Be=G/X,le=-j/_+Be,Ce=-Be/2;le>=0&&le<=1&&(w[Y++]=le),Ce>=0&&Ce<=1&&(w[Y++]=Ce)}else if(Ae>0){var Se=R(Ae),Fe=X*j+1.5*_*(-G+Se),Ve=X*j+1.5*_*(-G-Se);Fe<0?Fe=-Q(-Fe,b):Fe=Q(Fe,b),Ve<0?Ve=-Q(-Ve,b):Ve=Q(Ve,b);var le=(-j-(Fe+Ve))/(3*_);le>=0&&le<=1&&(w[Y++]=le)}else{var De=(2*X*j-3*_*G)/(2*R(X*X*X)),Le=Math.acos(De)/3,tt=R(X),Et=Math.cos(Le),le=(-j-2*tt*Et)/(3*_),Ce=(-j+tt*(Et+f*Math.sin(Le)))/(3*_),Ie=(-j+tt*(Et-f*Math.sin(Le)))/(3*_);le>=0&&le<=1&&(w[Y++]=le),Ce>=0&&Ce<=1&&(w[Y++]=Ce),Ie>=0&&Ie<=1&&(w[Y++]=Ie)}}return Y}function n(r,a,A,L,T){var w=6*A-12*a+6*r,_=9*a+3*L-3*r-9*A,j=3*a-3*r,W=0;if(v(_)){if(h(w)){var Z=-j/w;Z>=0&&Z<=1&&(T[W++]=Z)}}else{var X=w*w-4*_*j;if(v(X))T[0]=-w/(2*_);else if(X>0){var G=R(X),Z=(-w+G)/(2*_),te=(-w-G)/(2*_);Z>=0&&Z<=1&&(T[W++]=Z),te>=0&&te<=1&&(T[W++]=te)}}return W}function s(r,a,A,L,T,w){var _=(a-r)*T+r,j=(A-a)*T+a,W=(L-A)*T+A,Z=(j-_)*T+_,X=(W-j)*T+j,G=(X-Z)*T+Z;w[0]=r,w[1]=_,w[2]=Z,w[3]=G,w[4]=G,w[5]=X,w[6]=W,w[7]=L}function u(r,a,A,L,T,w,_,j,W,Z,X){var G,te=.005,Y=Infinity,le,Ae,Be,Ce;g[0]=W,g[1]=Z;for(var Se=0;Se<1;Se+=.05)i[0]=d(r,A,T,_,Se),i[1]=d(a,L,w,j,Se),Be=O(g,i),Be<Y&&(G=Se,Y=Be);Y=Infinity;for(var Fe=0;Fe<32&&!(te<D);Fe++)le=G-te,Ae=G+te,i[0]=d(r,A,T,_,le),i[1]=d(a,L,w,j,le),Be=O(i,g),le>=0&&Be<Y?(G=le,Y=Be):(l[0]=d(r,A,T,_,Ae),l[1]=d(a,L,w,j,Ae),Ce=O(l,g),Ae<=1&&Ce<Y?(G=Ae,Y=Ce):te*=.5);return X&&(X[0]=d(r,A,T,_,G),X[1]=d(a,L,w,j,G)),R(Y)}function p(r,a,A,L){var T=1-L;return T*(T*r+2*L*a)+L*L*A}function S(r,a,A,L){return 2*((1-L)*(a-r)+L*(A-a))}function x(r,a,A,L,T){var w=r-2*a+A,_=2*(a-r),j=r-L,W=0;if(v(w)){if(h(_)){var Z=-j/_;Z>=0&&Z<=1&&(T[W++]=Z)}}else{var X=_*_-4*w*j;if(v(X)){var Z=-_/(2*w);Z>=0&&Z<=1&&(T[W++]=Z)}else if(X>0){var G=R(X),Z=(-_+G)/(2*w),te=(-_-G)/(2*w);Z>=0&&Z<=1&&(T[W++]=Z),te>=0&&te<=1&&(T[W++]=te)}}return W}function M(r,a,A){var L=r+A-2*a;return L===0?.5:(r-a)/L}function C(r,a,A,L,T){var w=(a-r)*L+r,_=(A-a)*L+a,j=(_-w)*L+w;T[0]=r,T[1]=w,T[2]=j,T[3]=j,T[4]=_,T[5]=A}function c(r,a,A,L,T,w,_,j,W){var Z,X=.005,G=Infinity;g[0]=_,g[1]=j;for(var te=0;te<1;te+=.05){i[0]=p(r,A,T,te),i[1]=p(a,L,w,te);var Y=O(g,i);Y<G&&(Z=te,G=Y)}G=Infinity;for(var le=0;le<32&&!(X<D);le++){var Ae=Z-X,Be=Z+X;i[0]=p(r,A,T,Ae),i[1]=p(a,L,w,Ae);var Y=O(i,g);if(Ae>=0&&Y<G)Z=Ae,G=Y;else{l[0]=p(r,A,T,Be),l[1]=p(a,L,w,Be);var Ce=O(l,g);Be<=1&&Ce<G?(Z=Be,G=Ce):X*=.5}}return W&&(W[0]=p(r,A,T,Z),W[1]=p(a,L,w,Z)),R(G)}ue.cubicAt=d,ue.cubicDerivativeAt=E,ue.cubicRootAt=o,ue.cubicExtrema=n,ue.cubicSubdivide=s,ue.cubicProjectPoint=u,ue.quadraticAt=p,ue.quadraticDerivativeAt=S,ue.quadraticRootAt=x,ue.quadraticExtremum=M,ue.quadraticSubdivide=C,ue.quadraticProjectPoint=c},SqI9:function(qe,ue,k){var J=k("y+Vt"),N=k("iXp4"),O=J.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},brush:N(J.prototype.brush),buildPath:function(Q,R){var B=R.cx,D=R.cy,f=Math.max(R.r0||0,0),b=Math.max(R.r,0),g=R.startAngle,i=R.endAngle,l=R.clockwise,v=Math.cos(g),h=Math.sin(g);Q.moveTo(v*f+B,h*f+D),Q.lineTo(v*b+B,h*b+D),Q.arc(B,D,b,g,i,!l),Q.lineTo(Math.cos(i)*f+B,Math.sin(i)*f+D),f!==0&&Q.arc(B,D,f,i,g,l),Q.closePath()}});qe.exports=O},SrGk:function(qe,ue,k){var J=k("hydK"),N=J.createElement,O=k("bYtY"),Q=k("y+Vt"),R=k("Dagg"),B=k("dqUG"),D=k("P47w"),f=D.path,b=D.image,g=D.text,i="0",l="1";function v(d,E,o,n,s){this._zrId=d,this._svgRoot=E,this._tagNames=typeof o=="string"?[o]:o,this._markLabel=n,this._domName=s||"_dom",this.nextId=0}v.prototype.createElement=N,v.prototype.getDefs=function(d){var E=this._svgRoot,o=this._svgRoot.getElementsByTagName("defs");return o.length===0?d?(o=E.insertBefore(this.createElement("defs"),E.firstChild),o.contains||(o.contains=function(n){var s=o.children;if(!s)return!1;for(var u=s.length-1;u>=0;--u)if(s[u]===n)return!0;return!1}),o):null:o[0]},v.prototype.update=function(d,E){if(!d)return;var o=this.getDefs(!1);if(d[this._domName]&&o.contains(d[this._domName]))typeof E=="function"&&E(d);else{var n=this.add(d);n&&(d[this._domName]=n)}},v.prototype.addDom=function(d){var E=this.getDefs(!0);E.appendChild(d)},v.prototype.removeDom=function(d){var E=this.getDefs(!1);E&&d[this._domName]&&(E.removeChild(d[this._domName]),d[this._domName]=null)},v.prototype.getDoms=function(){var d=this.getDefs(!1);if(!d)return[];var E=[];return O.each(this._tagNames,function(o){var n=d.getElementsByTagName(o);E=E.concat([].slice.call(n))}),E},v.prototype.markAllUnused=function(){var d=this.getDoms(),E=this;O.each(d,function(o){o[E._markLabel]=i})},v.prototype.markUsed=function(d){d&&(d[this._markLabel]=l)},v.prototype.removeUnused=function(){var d=this.getDefs(!1);if(!d)return;var E=this.getDoms(),o=this;O.each(E,function(n){n[o._markLabel]!==l&&d.removeChild(n)})},v.prototype.getSvgProxy=function(d){return d instanceof Q?f:d instanceof R?b:d instanceof B?g:f},v.prototype.getTextSvgElement=function(d){return d.__textSvgEl},v.prototype.getSvgElement=function(d){return d.__svgEl};var h=v;qe.exports=h},T6xi:function(qe,ue,k){var J=k("YgsL"),N=k("nCxF");function O(Q,R,B){var D=R.points,f=R.smooth;if(D&&D.length>=2){if(f&&f!=="spline"){var b=N(D,f,B,R.smoothConstraint);Q.moveTo(D[0][0],D[0][1]);for(var g=D.length,i=0;i<(B?g:g-1);i++){var l=b[i*2],v=b[i*2+1],h=D[(i+1)%g];Q.bezierCurveTo(l[0],l[1],v[0],v[1],h[0],h[1])}}else{f==="spline"&&(D=J(D,B)),Q.moveTo(D[0][0],D[0][1]);for(var i=1,d=D.length;i<d;i++)Q.lineTo(D[i][0],D[i][1])}B&&Q.closePath()}}ue.buildPath=O},T8No:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return Q}),k.d(ue,"b",function(){return v}),k.d(ue,"d",function(){return h}),k.d(ue,"c",function(){return d}),k.d(ue,"e",function(){return E});var J=k("N0LK"),N=k("Cg/j"),O=function(){var o=function(n,s){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,p){u.__proto__=p}||function(u,p){for(var S in p)p.hasOwnProperty(S)&&(u[S]=p[S])},o(n,s)};return function(n,s){o(n,s);function u(){this.constructor=n}n.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Q=function(){function o(){}return o.has=function(n){return B.create(n)},o.equals=function(n,s){return D.create(n,s)},o.regex=function(n,s){return g.create(n,s)},o.not=function(n){return b.create(n)},o.and=function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return l.create(n)},o.or=function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return v.create(n)},o.deserialize=function(n,s){return s===void 0&&(s=!1),n?this._deserializeOrExpression(n,s):void 0},o._deserializeOrExpression=function(n,s){var u=this,p=n.split("||");return v.create(p.map(function(S){return u._deserializeAndExpression(S,s)}))},o._deserializeAndExpression=function(n,s){var u=this,p=n.split("&&");return l.create(p.map(function(S){return u._deserializeOne(S,s)}))},o._deserializeOne=function(n,s){if(n=n.trim(),n.indexOf("!=")>=0){var u=n.split("!=");return f.create(u[0].trim(),this._deserializeValue(u[1],s))}if(n.indexOf("==")>=0){var u=n.split("==");return D.create(u[0].trim(),this._deserializeValue(u[1],s))}if(n.indexOf("=~")>=0){var u=n.split("=~");return g.create(u[0].trim(),this._deserializeRegexValue(u[1],s))}return/^\!\s*/.test(n)?b.create(n.substr(1).trim()):B.create(n)},o._deserializeValue=function(n,s){if(n=n.trim(),n==="true")return!0;if(n==="false")return!1;var u=/^'([^']*)'$/.exec(n);return u?u[1].trim():n},o._deserializeRegexValue=function(n,s){if(Object(J.x)(n)){if(s)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}var u=n.indexOf("/"),p=n.lastIndexOf("/");if(u===p||u<0){if(s)throw new Error("bad regexp-value '"+n+"', missing /-enclosure");return console.warn("bad regexp-value '"+n+"', missing /-enclosure"),null}var S=n.slice(u+1,p),x=n[p+1]==="i"?"i":"";try{return new RegExp(S,x)}catch(M){if(s)throw new Error("bad regexp-value '"+n+"', parse error: "+M);return console.warn("bad regexp-value '"+n+"', parse error: "+M),null}},o}();function R(o,n){var s=o.getType(),u=n.getType();if(s!==u)return s-u;switch(s){case 1:return o.cmp(n);case 2:return o.cmp(n);case 3:return o.cmp(n);case 4:return o.cmp(n);case 6:return o.cmp(n);case 7:return o.cmp(n);case 5:return o.cmp(n);default:throw new Error("Unknown ContextKeyExpr!")}}var B=function(){function o(n){this.key=n}return o.create=function(n){return new o(n)},o.prototype.getType=function(){return 1},o.prototype.cmp=function(n){return this.key<n.key?-1:this.key>n.key?1:0},o.prototype.equals=function(n){return n instanceof o?this.key===n.key:!1},o.prototype.evaluate=function(n){return!!n.getValue(this.key)},o.prototype.keys=function(){return[this.key]},o.prototype.negate=function(){return b.create(this.key)},o}(),D=function(){function o(n,s){this.key=n,this.value=s}return o.create=function(n,s){return typeof s=="boolean"?s?B.create(n):b.create(n):new o(n,s)},o.prototype.getType=function(){return 3},o.prototype.cmp=function(n){return this.key<n.key?-1:this.key>n.key?1:this.value<n.value?-1:this.value>n.value?1:0},o.prototype.equals=function(n){return n instanceof o?this.key===n.key&&this.value===n.value:!1},o.prototype.evaluate=function(n){return n.getValue(this.key)==this.value},o.prototype.keys=function(){return[this.key]},o.prototype.negate=function(){return f.create(this.key,this.value)},o}(),f=function(){function o(n,s){this.key=n,this.value=s}return o.create=function(n,s){return typeof s=="boolean"?s?b.create(n):B.create(n):new o(n,s)},o.prototype.getType=function(){return 4},o.prototype.cmp=function(n){return this.key<n.key?-1:this.key>n.key?1:this.value<n.value?-1:this.value>n.value?1:0},o.prototype.equals=function(n){return n instanceof o?this.key===n.key&&this.value===n.value:!1},o.prototype.evaluate=function(n){return n.getValue(this.key)!=this.value},o.prototype.keys=function(){return[this.key]},o.prototype.negate=function(){return D.create(this.key,this.value)},o}(),b=function(){function o(n){this.key=n}return o.create=function(n){return new o(n)},o.prototype.getType=function(){return 2},o.prototype.cmp=function(n){return this.key<n.key?-1:this.key>n.key?1:0},o.prototype.equals=function(n){return n instanceof o?this.key===n.key:!1},o.prototype.evaluate=function(n){return!n.getValue(this.key)},o.prototype.keys=function(){return[this.key]},o.prototype.negate=function(){return B.create(this.key)},o}(),g=function(){function o(n,s){this.key=n,this.regexp=s}return o.create=function(n,s){return new o(n,s)},o.prototype.getType=function(){return 6},o.prototype.cmp=function(n){if(this.key<n.key)return-1;if(this.key>n.key)return 1;var s=this.regexp?this.regexp.source:"",u=n.regexp?n.regexp.source:"";return s<u?-1:s>u?1:0},o.prototype.equals=function(n){if(n instanceof o){var s=this.regexp?this.regexp.source:"",u=n.regexp?n.regexp.source:"";return this.key===n.key&&s===u}return!1},o.prototype.evaluate=function(n){var s=n.getValue(this.key);return this.regexp?this.regexp.test(s):!1},o.prototype.keys=function(){return[this.key]},o.prototype.negate=function(){return i.create(this)},o}(),i=function(){function o(n){this._actual=n}return o.create=function(n){return new o(n)},o.prototype.getType=function(){return 7},o.prototype.cmp=function(n){return this._actual.cmp(n._actual)},o.prototype.equals=function(n){return n instanceof o?this._actual.equals(n._actual):!1},o.prototype.evaluate=function(n){return!this._actual.evaluate(n)},o.prototype.keys=function(){return this._actual.keys()},o.prototype.negate=function(){return this._actual},o}(),l=function(){function o(n){this.expr=n}return o.create=function(n){var s=o._normalizeArr(n);return s.length===0?void 0:s.length===1?s[0]:new o(s)},o.prototype.getType=function(){return 5},o.prototype.cmp=function(n){if(this.expr.length<n.expr.length)return-1;if(this.expr.length>n.expr.length)return 1;for(var s=0,u=this.expr.length;s<u;s++){var p=R(this.expr[s],n.expr[s]);if(p!==0)return p}return 0},o.prototype.equals=function(n){if(n instanceof o){if(this.expr.length!==n.expr.length)return!1;for(var s=0,u=this.expr.length;s<u;s++)if(!this.expr[s].equals(n.expr[s]))return!1;return!0}return!1},o.prototype.evaluate=function(n){for(var s=0,u=this.expr.length;s<u;s++)if(!this.expr[s].evaluate(n))return!1;return!0},o._normalizeArr=function(n){var s=[];if(n){for(var u=0,p=n.length;u<p;u++){var S=n[u];if(!S)continue;if(S instanceof o){s=s.concat(S.expr);continue}if(S instanceof v)throw new Error('It is not allowed to have an or expression here due to lack of parens! For example "a && (b||c)" is not supported, use "(a&&b) || (a&&c)" instead.');s.push(S)}s.sort(R)}return s},o.prototype.keys=function(){for(var n=[],s=0,u=this.expr;s<u.length;s++){var p=u[s];n.push.apply(n,p.keys())}return n},o.prototype.negate=function(){for(var n=[],s=0,u=this.expr;s<u.length;s++){var p=u[s];n.push(p.negate())}return v.create(n)},o}(),v=function(){function o(n){this.expr=n}return o.create=function(n){var s=o._normalizeArr(n);return s.length===0?void 0:s.length===1?s[0]:new o(s)},o.prototype.getType=function(){return 8},o.prototype.equals=function(n){if(n instanceof o){if(this.expr.length!==n.expr.length)return!1;for(var s=0,u=this.expr.length;s<u;s++)if(!this.expr[s].equals(n.expr[s]))return!1;return!0}return!1},o.prototype.evaluate=function(n){for(var s=0,u=this.expr.length;s<u;s++)if(this.expr[s].evaluate(n))return!0;return!1},o._normalizeArr=function(n){var s=[];if(n){for(var u=0,p=n.length;u<p;u++){var S=n[u];if(!S)continue;if(S instanceof o){s=s.concat(S.expr);continue}s.push(S)}s.sort(R)}return s},o.prototype.keys=function(){for(var n=[],s=0,u=this.expr;s<u.length;s++){var p=u[s];n.push.apply(n,p.keys())}return n},o.prototype.negate=function(){for(var n=[],s=0,u=this.expr;s<u.length;s++){var p=u[s];n.push(p.negate())}for(var S=function(w){return w instanceof o?w.expr:[w]};n.length>1;){for(var x=n.shift(),M=n.shift(),C=[],c=0,r=S(x);c<r.length;c++)for(var a=r[c],A=0,L=S(M);A<L.length;A++){var T=L[A];C.push(Q.and(a,T))}n.unshift(Q.or.apply(Q,C))}return n[0]},o}(),h=function(o){O(n,o);function n(s,u){var p=o.call(this,s)||this;return p._defaultValue=u,p}return n.prototype.bindTo=function(s){return s.createKey(this.key,this._defaultValue)},n.prototype.getValue=function(s){return s.getContextKeyValue(this.key)},n.prototype.toNegated=function(){return Q.not(this.key)},n}(B),d=Object(N.c)("contextKeyService"),E="setContext"},VpOo:function(qe,ue){function k(J,N){var O=N.x,Q=N.y,R=N.width,B=N.height,D=N.r,f,b,g,i;R<0&&(O=O+R,R=-R),B<0&&(Q=Q+B,B=-B),typeof D=="number"?f=b=g=i=D:D instanceof Array?D.length===1?f=b=g=i=D[0]:D.length===2?(f=g=D[0],b=i=D[1]):D.length===3?(f=D[0],b=i=D[1],g=D[2]):(f=D[0],b=D[1],g=D[2],i=D[3]):f=b=g=i=0;var l;f+b>R&&(l=f+b,f*=R/l,b*=R/l),g+i>R&&(l=g+i,g*=R/l,i*=R/l),b+g>B&&(l=b+g,b*=B/l,g*=B/l),f+i>B&&(l=f+i,f*=B/l,i*=B/l),J.moveTo(O+f,Q),J.lineTo(O+R-b,Q),b!==0&&J.arc(O+R-b,Q+b,b,-Math.PI/2,0),J.lineTo(O+R,Q+B-g),g!==0&&J.arc(O+R-g,Q+B-g,g,0,Math.PI/2),J.lineTo(O+i,Q+B),i!==0&&J.arc(O+i,Q+B-i,i,Math.PI/2,Math.PI),J.lineTo(O,Q+f),f!==0&&J.arc(O+f,Q+f,f,Math.PI,Math.PI*1.5)}ue.buildPath=k},"VrN/":function(qe,ue,k){(function(J,N){qe.exports=N()})(this,function(){"use strict";var J=navigator.userAgent,N=navigator.platform,O=/gecko\/\d/i.test(J),Q=/MSIE \d/.test(J),R=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(J),B=/Edge\/(\d+)/.exec(J),D=Q||R||B,f=D&&(Q?document.documentMode||6:+(B||R)[1]),b=!B&&/WebKit\//.test(J),g=b&&/Qt\/\d+\.\d+/.test(J),i=!B&&/Chrome\//.test(J),l=/Opera\//.test(J),v=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(J),d=/PhantomJS/.test(J),E=!B&&/AppleWebKit/.test(J)&&/Mobile\/\w+/.test(J),o=/Android/.test(J),n=E||o||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(J),s=E||/Mac/.test(N),u=/\bCrOS\b/.test(J),p=/win/i.test(N),S=l&&J.match(/Version\/(\d*\.\d*)/);S&&(S=Number(S[1])),S&&S>=15&&(l=!1,b=!0);var x=s&&(g||l&&(S==null||S<12.11)),M=O||D&&f>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var c=function(e,t){var y=e.className,m=C(t).exec(y);if(m){var I=y.slice(m.index+m[0].length);e.className=y.slice(0,m.index)+(I?m[1]+I:"")}};function r(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function a(e,t){return r(e).appendChild(t)}function A(e,t,y,m){var I=document.createElement(e);if(y&&(I.className=y),m&&(I.style.cssText=m),typeof t=="string")I.appendChild(document.createTextNode(t));else if(t)for(var V=0;V<t.length;++V)I.appendChild(t[V]);return I}function L(e,t,y,m){var I=A(e,t,y,m);return I.setAttribute("role","presentation"),I}var T;document.createRange?T=function(e,t,y,m){var I=document.createRange();return I.setEnd(m||e,y),I.setStart(e,t),I}:T=function(e,t,y){var m=document.body.createTextRange();try{m.moveToElementText(e.parentNode)}catch(I){return m}return m.collapse(!0),m.moveEnd("character",y),m.moveStart("character",t),m};function w(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function _(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function j(e,t){var y=e.className;C(t).test(y)||(e.className+=(y?" ":"")+t)}function W(e,t){for(var y=e.split(" "),m=0;m<y.length;m++)y[m]&&!C(y[m]).test(t)&&(t+=" "+y[m]);return t}var Z=function(e){e.select()};E?Z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:D&&(Z=function(e){try{e.select()}catch(t){}});function X(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function G(e,t,y){t||(t={});for(var m in e)e.hasOwnProperty(m)&&(y!==!1||!t.hasOwnProperty(m))&&(t[m]=e[m]);return t}function te(e,t,y,m,I){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var V=m||0,oe=I||0;;){var de=e.indexOf(" ",V);if(de<0||de>=t)return oe+(t-V);oe+=de-V,oe+=y-oe%y,V=de+1}}var Y=function(){this.id=null,this.f=null,this.time=0,this.handler=X(this.onTimeout,this)};Y.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Y.prototype.set=function(e,t){this.f=t;var y=+new Date+e;(!this.id||y<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=y)};function le(e,t){for(var y=0;y<e.length;++y)if(e[y]==t)return y;return-1}var Ae=50,Be={toString:function(){return"CodeMirror.Pass"}},Ce={scroll:!1},Se={origin:"*mouse"},Fe={origin:"+move"};function Ve(e,t,y){for(var m=0,I=0;;){var V=e.indexOf(" ",m);V==-1&&(V=e.length);var oe=V-m;if(V==e.length||I+oe>=t)return m+Math.min(oe,t-I);if(I+=V-m,I+=y-I%y,m=V+1,I>=t)return m}}var De=[""];function Le(e){for(;De.length<=e;)De.push(tt(De)+" ");return De[e]}function tt(e){return e[e.length-1]}function Et(e,t){for(var y=[],m=0;m<e.length;m++)y[m]=t(e[m],m);return y}function Ie(e,t,y){for(var m=0,I=y(t);m<e.length&&y(e[m])<=I;)m++;e.splice(m,0,t)}function Qe(){}function xe(e,t){var y;return Object.create?y=Object.create(e):(Qe.prototype=e,y=new Qe),t&&G(t,y),y}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function $(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function re(e,t){return t?t.source.indexOf("\\w")>-1&&$(e)?!0:t.test(e):$(e)}function ce(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Me(e){return e.charCodeAt(0)>=768&&be.test(e)}function ke(e,t,y){for(;(y<0?t>0:t<e.length)&&Me(e.charAt(t));)t+=y;return t}function ct(e,t,y){for(var m=t>y?-1:1;;){if(t==y)return t;var I=(t+y)/2,V=m<0?Math.ceil(I):Math.floor(I);if(V==t)return e(V)?t:y;e(V)?y=V:t=V+m}}function ut(e,t,y,m){if(!e)return m(t,y,"ltr",0);for(var I=!1,V=0;V<e.length;++V){var oe=e[V];(oe.from<y&&oe.to>t||t==y&&oe.to==t)&&(m(Math.max(oe.from,t),Math.min(oe.to,y),oe.level==1?"rtl":"ltr",V),I=!0)}I||m(t,y,"ltr")}var mt=null;function pt(e,t,y){var m;mt=null;for(var I=0;I<e.length;++I){var V=e[I];if(V.from<t&&V.to>t)return I;V.to==t&&(V.from!=V.to&&y=="before"?m=I:mt=I),V.from==t&&(V.from!=V.to&&y!="before"?m=I:mt=I)}return m!=null?m:mt}var Ot=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function y(ye){return ye<=247?e.charAt(ye):1424<=ye&&ye<=1524?"R":1536<=ye&&ye<=1785?t.charAt(ye-1536):1774<=ye&&ye<=2220?"r":8192<=ye&&ye<=8203?"w":ye==8204?"b":"L"}var m=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,I=/[stwN]/,V=/[LRr]/,oe=/[Lb1n]/,de=/[1n]/;function fe(ye,Xe,$e){this.level=ye,this.from=Xe,this.to=$e}return function(ye,Xe){var $e=Xe=="ltr"?"L":"R";if(ye.length==0||Xe=="ltr"&&!m.test(ye))return!1;for(var yt=ye.length,ft=[],Ut=0;Ut<yt;++Ut)ft.push(y(ye.charCodeAt(Ut)));for(var Nt=0,Kt=$e;Nt<yt;++Nt){var Vt=ft[Nt];Vt=="m"?ft[Nt]=Kt:Kt=Vt}for(var Jt=0,Xt=$e;Jt<yt;++Jt){var ir=ft[Jt];ir=="1"&&Xt=="r"?ft[Jt]="n":V.test(ir)&&(Xt=ir,ir=="r"&&(ft[Jt]="R"))}for(var xr=1,mr=ft[0];xr<yt-1;++xr){var Pr=ft[xr];Pr=="+"&&mr=="1"&&ft[xr+1]=="1"?ft[xr]="1":Pr==","&&mr==ft[xr+1]&&(mr=="1"||mr=="n")&&(ft[xr]=mr),mr=Pr}for(var yn=0;yn<yt;++yn){var zn=ft[yn];if(zn==",")ft[yn]="N";else if(zn=="%"){var On=void 0;for(On=yn+1;On<yt&&ft[On]=="%";++On);for(var fi=yn&&ft[yn-1]=="!"||On<yt&&ft[On]=="1"?"1":"N",$n=yn;$n<On;++$n)ft[$n]=fi;yn=On-1}}for(var _n=0,qn=$e;_n<yt;++_n){var Vn=ft[_n];qn=="L"&&Vn=="1"?ft[_n]="L":V.test(Vn)&&(qn=Vn)}for(var Gt=0;Gt<yt;++Gt)if(I.test(ft[Gt])){var Bn=void 0;for(Bn=Gt+1;Bn<yt&&I.test(ft[Bn]);++Bn);for(var Sn=(Gt?ft[Gt-1]:$e)=="L",Tn=(Bn<yt?ft[Bn]:$e)=="L",Wa=Sn==Tn?Sn?"L":"R":$e,Xr=Gt;Xr<Bn;++Xr)ft[Xr]=Wa;Gt=Bn-1}for(var Kr=[],yi,Wn=0;Wn<yt;)if(oe.test(ft[Wn])){var Ga=Wn;for(++Wn;Wn<yt&&oe.test(ft[Wn]);++Wn);Kr.push(new fe(0,Ga,Wn))}else{var Gi=Wn,Fi=Kr.length,Ba=Xe=="rtl"?1:0;for(++Wn;Wn<yt&&ft[Wn]!="L";++Wn);for(var ii=Gi;ii<Wn;)if(de.test(ft[ii])){Gi<ii&&(Kr.splice(Fi,0,new fe(1,Gi,ii)),Fi+=Ba);var Sa=ii;for(++ii;ii<Wn&&de.test(ft[ii]);++ii);Kr.splice(Fi,0,new fe(2,Sa,ii)),Fi+=Ba,Gi=ii}else++ii;Gi<Wn&&Kr.splice(Fi,0,new fe(1,Gi,Wn))}return Xe=="ltr"&&(Kr[0].level==1&&(yi=ye.match(/^\s+/))&&(Kr[0].from=yi[0].length,Kr.unshift(new fe(0,0,yi[0].length))),tt(Kr).level==1&&(yi=ye.match(/\s+$/))&&(tt(Kr).to-=yi[0].length,Kr.push(new fe(0,yt-yi[0].length,yt)))),Xe=="rtl"?Kr.reverse():Kr}}();function Ft(e,t){var y=e.order;return y==null&&(y=e.order=Ot(e.text,t)),y}var He=[],Pe=function(e,t,y){if(e.addEventListener)e.addEventListener(t,y,!1);else if(e.attachEvent)e.attachEvent("on"+t,y);else{var m=e._handlers||(e._handlers={});m[t]=(m[t]||He).concat(y)}};function at(e,t){return e._handlers&&e._handlers[t]||He}function vt(e,t,y){if(e.removeEventListener)e.removeEventListener(t,y,!1);else if(e.detachEvent)e.detachEvent("on"+t,y);else{var m=e._handlers,I=m&&m[t];if(I){var V=le(I,y);V>-1&&(m[t]=I.slice(0,V).concat(I.slice(V+1)))}}}function et(e,t){var y=at(e,t);if(!y.length)return;for(var m=Array.prototype.slice.call(arguments,2),I=0;I<y.length;++I)y[I].apply(null,m)}function At(e,t,y){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),et(e,y||t.type,e,t),Ee(t)||t.codemirrorIgnore}function je(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var y=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),m=0;m<t.length;++m)le(y,t[m])==-1&&y.push(t[m])}function _e(e,t){return at(e,t).length>0}function Ue(e){e.prototype.on=function(t,y){Pe(this,t,y)},e.prototype.off=function(t,y){vt(this,t,y)}}function me(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ve(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Oe(e){me(e),ve(e)}function Ye(e){return e.target||e.srcElement}function ze(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),s&&e.ctrlKey&&t==1&&(t=3),t}var gt=function(){if(D&&f<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}(),Lt;function Pt(e){if(Lt==null){var t=A("span","\u200B");a(e,A("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Lt=t.offsetWidth<=1&&t.offsetHeight>2&&!(D&&f<8))}var y=Lt?A("span","\u200B"):A("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return y.setAttribute("cm-text",""),y}var Rt;function Dt(e){if(Rt!=null)return Rt;var t=a(e,document.createTextNode("A\u062EA")),y=T(t,0,1).getBoundingClientRect(),m=T(t,1,2).getBoundingClientRect();return r(e),!y||y.left==y.right?!1:Rt=m.right-y.right<3}var dt=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,y=[],m=e.length;t<=m;){var I=e.indexOf(`
|
|
`,t);I==-1&&(I=e.length);var V=e.slice(t,e.charAt(I-1)=="\r"?I-1:I),oe=V.indexOf("\r");oe!=-1?(y.push(V.slice(0,oe)),t+=oe+1):(y.push(V),t=I+1)}return y}:function(e){return e.split(/\r\n?|\n/)},it=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(y){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},nt=function(){var e=A("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),we=null;function Ne(e){if(we!=null)return we;var t=a(e,A("span","x")),y=t.getBoundingClientRect(),m=T(t,0,1).getBoundingClientRect();return we=Math.abs(y.left-m.left)>1}var ht={},ot={};function Bt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ht[e]=t}function wt(e,t){ot[e]=t}function rt(e){if(typeof e=="string"&&ot.hasOwnProperty(e))e=ot[e];else if(e&&typeof e.name=="string"&&ot.hasOwnProperty(e.name)){var t=ot[e.name];typeof t=="string"&&(t={name:t}),e=xe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return rt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return rt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function st(e,t){t=rt(t);var y=ht[t.name];if(!y)return st(e,"text/plain");var m=y(e,t);if(St.hasOwnProperty(t.name)){var I=St[t.name];for(var V in I){if(!I.hasOwnProperty(V))continue;m.hasOwnProperty(V)&&(m["_"+V]=m[V]),m[V]=I[V]}}if(m.name=t.name,t.helperType&&(m.helperType=t.helperType),t.modeProps)for(var oe in t.modeProps)m[oe]=t.modeProps[oe];return m}var St={};function It(e,t){var y=St.hasOwnProperty(e)?St[e]:St[e]={};G(t,y)}function Qt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var y={};for(var m in t){var I=t[m];I instanceof Array&&(I=I.concat([])),y[m]=I}return y}function gr(e,t){for(var y;e.innerMode&&!(y=e.innerMode(t),!y||y.mode==e);)t=y.state,e=y.mode;return y||{mode:e,state:t}}function vr(e,t,y){return e.startState?e.startState(t,y):!0}var cr=function(e,t,y){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=y};cr.prototype.eol=function(){return this.pos>=this.string.length},cr.prototype.sol=function(){return this.pos==this.lineStart},cr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},cr.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},cr.prototype.eat=function(e){var t=this.string.charAt(this.pos),y;if(typeof e=="string"?y=t==e:y=t&&(e.test?e.test(t):e(t)),y)return++this.pos,t},cr.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},cr.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},cr.prototype.skipToEnd=function(){this.pos=this.string.length},cr.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},cr.prototype.backUp=function(e){this.pos-=e},cr.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=te(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?te(this.string,this.lineStart,this.tabSize):0)},cr.prototype.indentation=function(){return te(this.string,null,this.tabSize)-(this.lineStart?te(this.string,this.lineStart,this.tabSize):0)},cr.prototype.match=function(e,t,y){if(typeof e=="string"){var m=function(oe){return y?oe.toLowerCase():oe},I=this.string.substr(this.pos,e.length);if(m(I)==m(e))return t!==!1&&(this.pos+=e.length),!0}else{var V=this.string.slice(this.pos).match(e);return V&&V.index>0?null:(V&&t!==!1&&(this.pos+=V[0].length),V)}},cr.prototype.current=function(){return this.string.slice(this.start,this.pos)},cr.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},cr.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},cr.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function jt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var y=e;!y.lines;)for(var m=0;;++m){var I=y.children[m],V=I.chunkSize();if(t<V){y=I;break}t-=V}return y.lines[t]}function Ir(e,t,y){var m=[],I=t.line;return e.iter(t.line,y.line+1,function(V){var oe=V.text;I==y.line&&(oe=oe.slice(0,y.ch)),I==t.line&&(oe=oe.slice(t.ch)),m.push(oe),++I}),m}function kr(e,t,y){var m=[];return e.iter(t,y,function(I){m.push(I.text)}),m}function _r(e,t){var y=t-e.height;if(y)for(var m=e;m;m=m.parent)m.height+=y}function hr(e){if(e.parent==null)return null;for(var t=e.parent,y=le(t.lines,e),m=t.parent;m;t=m,m=m.parent)for(var I=0;!(m.children[I]==t);++I)y+=m.children[I].chunkSize();return y+t.first}function Sr(e,t){var y=e.first;e:do{for(var m=0;m<e.children.length;++m){var I=e.children[m],V=I.height;if(t<V){e=I;continue e}t-=V,y+=I.chunkSize()}return y}while(!e.lines);for(var oe=0;oe<e.lines.length;++oe){var de=e.lines[oe],fe=de.height;if(t<fe)break;t-=fe}return y+oe}function sn(e,t){return t>=e.first&&t<e.first+e.size}function en(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function he(e,t,y){if(y===void 0&&(y=null),!(this instanceof he))return new he(e,t,y);this.line=e,this.ch=t,this.sticky=y}function ge(e,t){return e.line-t.line||e.ch-t.ch}function Re(e,t){return e.sticky==t.sticky&&ge(e,t)==0}function Ze(e){return he(e.line,e.ch)}function Je(e,t){return ge(e,t)<0?t:e}function Tt(e,t){return ge(e,t)<0?e:t}function q(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function F(e,t){if(t.line<e.first)return he(e.first,0);var y=e.first+e.size-1;return t.line>y?he(y,jt(e,y).text.length):P(t,jt(e,t.line).text.length)}function P(e,t){var y=e.ch;return y==null||y>t?he(e.line,t):y<0?he(e.line,0):e}function ee(e,t){for(var y=[],m=0;m<t.length;m++)y[m]=F(e,t[m]);return y}var ae=function(e,t){this.state=e,this.lookAhead=t},ne=function(e,t,y,m){this.state=t,this.doc=e,this.line=y,this.maxLookAhead=m||0,this.baseTokens=null,this.baseTokenPos=1};ne.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ne.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ne.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ne.fromSaved=function(e,t,y){return t instanceof ae?new ne(e,Qt(e.mode,t.state),y,t.lookAhead):new ne(e,Qt(e.mode,t),y)},ne.prototype.save=function(e){var t=e!==!1?Qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ae(t,this.maxLookAhead):t};function Ke(e,t,y,m){var I=[e.state.modeGen],V={};Fr(e,t.text,e.doc.mode,y,function(ye,Xe){return I.push(ye,Xe)},V,m);for(var oe=y.state,de=function(ye){y.baseTokens=I;var Xe=e.state.overlays[ye],$e=1,yt=0;y.state=!0,Fr(e,t.text,Xe.mode,y,function(ft,Ut){for(var Nt=$e;yt<ft;){var Kt=I[$e];Kt>ft&&I.splice($e,1,ft,I[$e+1],Kt),$e+=2,yt=Math.min(ft,Kt)}if(!Ut)return;if(Xe.opaque)I.splice(Nt,$e-Nt,ft,"overlay "+Ut),$e=Nt+2;else for(;Nt<$e;Nt+=2){var Vt=I[Nt+1];I[Nt+1]=(Vt?Vt+" ":"")+"overlay "+Ut}},V),y.state=oe,y.baseTokens=null,y.baseTokenPos=1},fe=0;fe<e.state.overlays.length;++fe)de(fe);return{styles:I,classes:V.bgClass||V.textClass?V:null}}function xt(e,t,y){if(!t.styles||t.styles[0]!=e.state.modeGen){var m=kt(e,hr(t)),I=t.text.length>e.options.maxHighlightLength&&Qt(e.doc.mode,m.state),V=Ke(e,t,m);I&&(m.state=I),t.stateAfter=m.save(!I),t.styles=V.styles,V.classes?t.styleClasses=V.classes:t.styleClasses&&(t.styleClasses=null),y===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function kt(e,t,y){var m=e.doc,I=e.display;if(!m.mode.startState)return new ne(m,!0,t);var V=yr(e,t,y),oe=V>m.first&&jt(m,V-1).stateAfter,de=oe?ne.fromSaved(m,oe,V):new ne(m,vr(m.mode),V);return m.iter(V,t,function(fe){Ht(e,fe.text,de);var ye=de.line;fe.stateAfter=ye==t-1||ye%5==0||ye>=I.viewFrom&&ye<I.viewTo?de.save():null,de.nextLine()}),y&&(m.modeFrontier=de.line),de}function Ht(e,t,y,m){var I=e.doc.mode,V=new cr(t,e.options.tabSize,y);for(V.start=V.pos=m||0,t==""&&Ct(I,y.state);!V.eol();)Yt(I,V,y.state),V.start=V.pos}function Ct(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var y=gr(e,t);if(y.mode.blankLine)return y.mode.blankLine(y.state)}function Yt(e,t,y,m){for(var I=0;I<10;I++){m&&(m[0]=gr(e,y).mode);var V=e.token(t,y);if(t.pos>t.start)return V}throw new Error("Mode "+e.name+" failed to advance stream.")}var Wt=function(e,t,y){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=y};function $t(e,t,y,m){var I=e.doc,V=I.mode,oe;t=F(I,t);var de=jt(I,t.line),fe=kt(e,t.line,y),ye=new cr(de.text,e.options.tabSize,fe),Xe;for(m&&(Xe=[]);(m||ye.pos<t.ch)&&!ye.eol();)ye.start=ye.pos,oe=Yt(V,ye,fe.state),m&&Xe.push(new Wt(ye,oe,Qt(I.mode,fe.state)));return m?Xe:new Wt(ye,oe,fe.state)}function fr(e,t){if(e)for(;;){var y=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!y)break;e=e.slice(0,y.index)+e.slice(y.index+y[0].length);var m=y[1]?"bgClass":"textClass";t[m]==null?t[m]=y[2]:new RegExp("(?:^|\\s)"+y[2]+"(?:$|\\s)").test(t[m])||(t[m]+=" "+y[2])}return e}function Fr(e,t,y,m,I,V,oe){var de=y.flattenSpans;de==null&&(de=e.options.flattenSpans);var fe=0,ye=null,Xe=new cr(t,e.options.tabSize,m),$e,yt=e.options.addModeClass&&[null];for(t==""&&fr(Ct(y,m.state),V);!Xe.eol();){if(Xe.pos>e.options.maxHighlightLength?(de=!1,oe&&Ht(e,t,m,Xe.pos),Xe.pos=t.length,$e=null):$e=fr(Yt(y,Xe,m.state,yt),V),yt){var ft=yt[0].name;ft&&($e="m-"+($e?ft+" "+$e:ft))}if(!de||ye!=$e){for(;fe<Xe.start;)fe=Math.min(Xe.start,fe+5e3),I(fe,ye);ye=$e}Xe.start=Xe.pos}for(;fe<Xe.pos;){var Ut=Math.min(Xe.pos,fe+5e3);I(Ut,ye),fe=Ut}}function yr(e,t,y){for(var m,I,V=e.doc,oe=y?-1:t-(e.doc.mode.innerMode?1e3:100),de=t;de>oe;--de){if(de<=V.first)return V.first;var fe=jt(V,de-1),ye=fe.stateAfter;if(ye&&(!y||de+(ye instanceof ae?ye.lookAhead:0)<=V.modeFrontier))return de;var Xe=te(fe.text,null,e.options.tabSize);(I==null||m>Xe)&&(I=de-1,m=Xe)}return I}function Rr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var y=e.first,m=t-1;m>y;m--){var I=jt(e,m).stateAfter;if(I&&(!(I instanceof ae)||m+I.lookAhead<t)){y=m+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,y)}var pr=!1,Nr=!1;function Hr(){pr=!0}function qr(){Nr=!0}function Yr(e,t,y){this.marker=e,this.from=t,this.to=y}function nn(e,t){if(e)for(var y=0;y<e.length;++y){var m=e[y];if(m.marker==t)return m}}function cn(e,t){for(var y,m=0;m<e.length;++m)e[m]!=t&&(y||(y=[])).push(e[m]);return y}function $r(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function an(e,t,y){var m;if(e)for(var I=0;I<e.length;++I){var V=e[I],oe=V.marker,de=V.from==null||(oe.inclusiveLeft?V.from<=t:V.from<t);if(de||V.from==t&&oe.type=="bookmark"&&(!y||!V.marker.insertLeft)){var fe=V.to==null||(oe.inclusiveRight?V.to>=t:V.to>t);(m||(m=[])).push(new Yr(oe,V.from,fe?null:V.to))}}return m}function ln(e,t,y){var m;if(e)for(var I=0;I<e.length;++I){var V=e[I],oe=V.marker,de=V.to==null||(oe.inclusiveRight?V.to>=t:V.to>t);if(de||V.from==t&&oe.type=="bookmark"&&(!y||V.marker.insertLeft)){var fe=V.from==null||(oe.inclusiveLeft?V.from<=t:V.from<t);(m||(m=[])).push(new Yr(oe,fe?null:V.from-t,V.to==null?null:V.to-t))}}return m}function dn(e,t){if(t.full)return null;var y=sn(e,t.from.line)&&jt(e,t.from.line).markedSpans,m=sn(e,t.to.line)&&jt(e,t.to.line).markedSpans;if(!y&&!m)return null;var I=t.from.ch,V=t.to.ch,oe=ge(t.from,t.to)==0,de=an(y,I,oe),fe=ln(m,V,oe),ye=t.text.length==1,Xe=tt(t.text).length+(ye?I:0);if(de)for(var $e=0;$e<de.length;++$e){var yt=de[$e];if(yt.to==null){var ft=nn(fe,yt.marker);ft?ye&&(yt.to=ft.to==null?null:ft.to+Xe):yt.to=I}}if(fe)for(var Ut=0;Ut<fe.length;++Ut){var Nt=fe[Ut];if(Nt.to!=null&&(Nt.to+=Xe),Nt.from==null){var Kt=nn(de,Nt.marker);Kt||(Nt.from=Xe,ye&&(de||(de=[])).push(Nt))}else Nt.from+=Xe,ye&&(de||(de=[])).push(Nt)}de&&(de=hn(de)),fe&&fe!=de&&(fe=hn(fe));var Vt=[de];if(!ye){var Jt=t.text.length-2,Xt;if(Jt>0&&de)for(var ir=0;ir<de.length;++ir)de[ir].to==null&&(Xt||(Xt=[])).push(new Yr(de[ir].marker,null,null));for(var xr=0;xr<Jt;++xr)Vt.push(Xt);Vt.push(fe)}return Vt}function hn(e){for(var t=0;t<e.length;++t){var y=e[t];y.from!=null&&y.from==y.to&&y.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function wr(e,t,y){var m=null;if(e.iter(t.line,y.line+1,function(ft){if(ft.markedSpans)for(var Ut=0;Ut<ft.markedSpans.length;++Ut){var Nt=ft.markedSpans[Ut].marker;Nt.readOnly&&(!m||le(m,Nt)==-1)&&(m||(m=[])).push(Nt)}}),!m)return null;for(var I=[{from:t,to:y}],V=0;V<m.length;++V)for(var oe=m[V],de=oe.find(0),fe=0;fe<I.length;++fe){var ye=I[fe];if(ge(ye.to,de.from)<0||ge(ye.from,de.to)>0)continue;var Xe=[fe,1],$e=ge(ye.from,de.from),yt=ge(ye.to,de.to);($e<0||!oe.inclusiveLeft&&!$e)&&Xe.push({from:ye.from,to:de.from}),(yt>0||!oe.inclusiveRight&&!yt)&&Xe.push({from:de.to,to:ye.to}),I.splice.apply(I,Xe),fe+=Xe.length-3}return I}function dr(e){var t=e.markedSpans;if(!t)return;for(var y=0;y<t.length;++y)t[y].marker.detachLine(e);e.markedSpans=null}function sr(e,t){if(!t)return;for(var y=0;y<t.length;++y)t[y].marker.attachLine(e);e.markedSpans=t}function nr(e){return e.inclusiveLeft?-1:0}function Zt(e){return e.inclusiveRight?1:0}function br(e,t){var y=e.lines.length-t.lines.length;if(y!=0)return y;var m=e.find(),I=t.find(),V=ge(m.from,I.from)||nr(e)-nr(t);if(V)return-V;var oe=ge(m.to,I.to)||Zt(e)-Zt(t);return oe||t.id-e.id}function Cr(e,t){var y=Nr&&e.markedSpans,m;if(y)for(var I=void 0,V=0;V<y.length;++V)I=y[V],I.marker.collapsed&&(t?I.from:I.to)==null&&(!m||br(m,I.marker)<0)&&(m=I.marker);return m}function Tr(e){return Cr(e,!0)}function Er(e){return Cr(e,!1)}function Dn(e,t){var y=Nr&&e.markedSpans,m;if(y)for(var I=0;I<y.length;++I){var V=y[I];V.marker.collapsed&&(V.from==null||V.from<t)&&(V.to==null||V.to>t)&&(!m||br(m,V.marker)<0)&&(m=V.marker)}return m}function Qr(e,t,y,m,I){var V=jt(e,t),oe=Nr&&V.markedSpans;if(oe)for(var de=0;de<oe.length;++de){var fe=oe[de];if(!fe.marker.collapsed)continue;var ye=fe.marker.find(0),Xe=ge(ye.from,y)||nr(fe.marker)-nr(I),$e=ge(ye.to,m)||Zt(fe.marker)-Zt(I);if(Xe>=0&&$e<=0||Xe<=0&&$e>=0)continue;if(Xe<=0&&(fe.marker.inclusiveRight&&I.inclusiveLeft?ge(ye.to,y)>=0:ge(ye.to,y)>0)||Xe>=0&&(fe.marker.inclusiveRight&&I.inclusiveLeft?ge(ye.from,m)<=0:ge(ye.from,m)<0))return!0}}function Cn(e){for(var t;t=Tr(e);)e=t.find(-1,!0).line;return e}function Hn(e){for(var t;t=Er(e);)e=t.find(1,!0).line;return e}function Ln(e){for(var t,y;t=Er(e);)e=t.find(1,!0).line,(y||(y=[])).push(e);return y}function Jr(e,t){var y=jt(e,t),m=Cn(y);return y==m?t:hr(m)}function Xn(e,t){if(t>e.lastLine())return t;var y=jt(e,t),m;if(!xn(e,y))return t;for(;m=Er(y);)y=m.find(1,!0).line;return hr(y)+1}function xn(e,t){var y=Nr&&t.markedSpans;if(y)for(var m=void 0,I=0;I<y.length;++I){if(m=y[I],!m.marker.collapsed)continue;if(m.from==null)return!0;if(m.marker.widgetNode)continue;if(m.from==0&&m.marker.inclusiveLeft&&Yn(e,t,m))return!0}}function Yn(e,t,y){if(y.to==null){var m=y.marker.find(1,!0);return Yn(e,m.line,nn(m.line.markedSpans,y.marker))}if(y.marker.inclusiveRight&&y.to==t.text.length)return!0;for(var I=void 0,V=0;V<t.markedSpans.length;++V)if(I=t.markedSpans[V],I.marker.collapsed&&!I.marker.widgetNode&&I.from==y.to&&(I.to==null||I.to!=y.from)&&(I.marker.inclusiveLeft||y.marker.inclusiveRight)&&Yn(e,t,I))return!0}function Mn(e){e=Cn(e);for(var t=0,y=e.parent,m=0;m<y.lines.length;++m){var I=y.lines[m];if(I==e)break;t+=I.height}for(var V=y.parent;V;y=V,V=y.parent)for(var oe=0;oe<V.children.length;++oe){var de=V.children[oe];if(de==y)break;t+=de.height}return t}function oi(e){if(e.height==0)return 0;for(var t=e.text.length,y,m=e;y=Tr(m);){var I=y.find(0,!0);m=I.from.line,t+=I.from.ch-I.to.ch}for(m=e;y=Er(m);){var V=y.find(0,!0);t-=m.text.length-V.from.ch,m=V.to.line,t+=m.text.length-V.to.ch}return t}function Fn(e){var t=e.display,y=e.doc;t.maxLine=jt(y,y.first),t.maxLineLength=oi(t.maxLine),t.maxLineChanged=!0,y.iter(function(m){var I=oi(m);I>t.maxLineLength&&(t.maxLineLength=I,t.maxLine=m)})}var gn=function(e,t,y){this.text=e,sr(this,t),this.height=y?y(this):1};gn.prototype.lineNo=function(){return hr(this)},Ue(gn);function Qn(e,t,y,m){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),dr(e),sr(e,y);var I=m?m(e):1;I!=e.height&&_r(e,I)}function li(e){e.parent=null,dr(e)}var qt={},er={};function tr(e,t){if(!e||/^\s*$/.test(e))return null;var y=t.addModeClass?er:qt;return y[e]||(y[e]=e.replace(/\S+/g,"cm-$&"))}function Br(e,t){var y=L("span",null,null,b?"padding-right: .1px":null),m={pre:L("pre",[y],"CodeMirror-line"),content:y,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var I=0;I<=(t.rest?t.rest.length:0);I++){var V=I?t.rest[I-1]:t.line,oe=void 0;m.pos=0,m.addToken=Or,Dt(e.display.measure)&&(oe=Ft(V,e.doc.direction))&&(m.addToken=bn(m.addToken,oe)),m.map=[];var de=t!=e.display.externalMeasured&&hr(V);Mr(V,m,xt(e,V,de)),V.styleClasses&&(V.styleClasses.bgClass&&(m.bgClass=W(V.styleClasses.bgClass,m.bgClass||"")),V.styleClasses.textClass&&(m.textClass=W(V.styleClasses.textClass,m.textClass||""))),m.map.length==0&&m.map.push(0,0,m.content.appendChild(Pt(e.display.measure))),I==0?(t.measure.map=m.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(m.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(b){var fe=m.content.lastChild;(/\bcm-tab\b/.test(fe.className)||fe.querySelector&&fe.querySelector(".cm-tab"))&&(m.content.className="cm-tab-wrap-hack")}return et(e,"renderLine",e,t.line,m.pre),m.pre.className&&(m.textClass=W(m.pre.className,m.textClass||"")),m}function Ur(e){var t=A("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Or(e,t,y,m,I,V,oe){if(!t)return;var de=e.splitSpaces?Dr(t,e.trailingSpace):t,fe=e.cm.state.specialChars,ye=!1,Xe;if(!fe.test(t))e.col+=t.length,Xe=document.createTextNode(de),e.map.push(e.pos,e.pos+t.length,Xe),D&&f<9&&(ye=!0),e.pos+=t.length;else{Xe=document.createDocumentFragment();for(var $e=0;;){fe.lastIndex=$e;var yt=fe.exec(t),ft=yt?yt.index-$e:t.length-$e;if(ft){var Ut=document.createTextNode(de.slice($e,$e+ft));D&&f<9?Xe.appendChild(A("span",[Ut])):Xe.appendChild(Ut),e.map.push(e.pos,e.pos+ft,Ut),e.col+=ft,e.pos+=ft}if(!yt)break;$e+=ft+1;var Nt=void 0;if(yt[0]==" "){var Kt=e.cm.options.tabSize,Vt=Kt-e.col%Kt;Nt=Xe.appendChild(A("span",Le(Vt),"cm-tab")),Nt.setAttribute("role","presentation"),Nt.setAttribute("cm-text"," "),e.col+=Vt}else yt[0]=="\r"||yt[0]==`
|
|
`?(Nt=Xe.appendChild(A("span",yt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Nt.setAttribute("cm-text",yt[0]),e.col+=1):(Nt=e.cm.options.specialCharPlaceholder(yt[0]),Nt.setAttribute("cm-text",yt[0]),D&&f<9?Xe.appendChild(A("span",[Nt])):Xe.appendChild(Nt),e.col+=1);e.map.push(e.pos,e.pos+1,Nt),e.pos++}}if(e.trailingSpace=de.charCodeAt(t.length-1)==32,y||m||I||ye||V||oe){var Jt=y||"";m&&(Jt+=m),I&&(Jt+=I);var Xt=A("span",[Xe],Jt,V);if(oe)for(var ir in oe)oe.hasOwnProperty(ir)&&ir!="style"&&ir!="class"&&Xt.setAttribute(ir,oe[ir]);return e.content.appendChild(Xt)}e.content.appendChild(Xe)}function Dr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var y=t,m="",I=0;I<e.length;I++){var V=e.charAt(I);V==" "&&y&&(I==e.length-1||e.charCodeAt(I+1)==32)&&(V="\xA0"),m+=V,y=V==" "}return m}function bn(e,t){return function(y,m,I,V,oe,de,fe){I=I?I+" cm-force-border":"cm-force-border";for(var ye=y.pos,Xe=ye+m.length;;){for(var $e=void 0,yt=0;yt<t.length&&!($e=t[yt],$e.to>ye&&$e.from<=ye);yt++);if($e.to>=Xe)return e(y,m,I,V,oe,de,fe);e(y,m.slice(0,$e.to-ye),I,V,null,de,fe),V=null,m=m.slice($e.to-ye),ye=$e.to}}}function Un(e,t,y,m){var I=!m&&y.widgetNode;I&&e.map.push(e.pos,e.pos+t,I),!m&&e.cm.display.input.needsContentAttribute&&(I||(I=e.content.appendChild(document.createElement("span"))),I.setAttribute("cm-marker",y.id)),I&&(e.cm.display.input.setUneditable(I),e.content.appendChild(I)),e.pos+=t,e.trailingSpace=!1}function Mr(e,t,y){var m=e.markedSpans,I=e.text,V=0;if(!m){for(var oe=1;oe<y.length;oe+=2)t.addToken(t,I.slice(V,V=y[oe]),tr(y[oe+1],t.cm.options));return}for(var de=I.length,fe=0,ye=1,Xe="",$e,yt,ft=0,Ut,Nt,Kt,Vt,Jt;;){if(ft==fe){Ut=Nt=Kt=yt="",Jt=null,Vt=null,ft=Infinity;for(var Xt=[],ir=void 0,xr=0;xr<m.length;++xr){var mr=m[xr],Pr=mr.marker;if(Pr.type=="bookmark"&&mr.from==fe&&Pr.widgetNode)Xt.push(Pr);else if(mr.from<=fe&&(mr.to==null||mr.to>fe||Pr.collapsed&&mr.to==fe&&mr.from==fe)){if(mr.to!=null&&mr.to!=fe&&ft>mr.to&&(ft=mr.to,Nt=""),Pr.className&&(Ut+=" "+Pr.className),Pr.css&&(yt=(yt?yt+";":"")+Pr.css),Pr.startStyle&&mr.from==fe&&(Kt+=" "+Pr.startStyle),Pr.endStyle&&mr.to==ft&&(ir||(ir=[])).push(Pr.endStyle,mr.to),Pr.title&&((Jt||(Jt={})).title=Pr.title),Pr.attributes)for(var yn in Pr.attributes)(Jt||(Jt={}))[yn]=Pr.attributes[yn];Pr.collapsed&&(!Vt||br(Vt.marker,Pr)<0)&&(Vt=mr)}else mr.from>fe&&ft>mr.from&&(ft=mr.from)}if(ir)for(var zn=0;zn<ir.length;zn+=2)ir[zn+1]==ft&&(Nt+=" "+ir[zn]);if(!Vt||Vt.from==fe)for(var On=0;On<Xt.length;++On)Un(t,0,Xt[On]);if(Vt&&(Vt.from||0)==fe){if(Un(t,(Vt.to==null?de+1:Vt.to)-fe,Vt.marker,Vt.from==null),Vt.to==null)return;Vt.to==fe&&(Vt=!1)}}if(fe>=de)break;for(var fi=Math.min(de,ft);;){if(Xe){var $n=fe+Xe.length;if(!Vt){var _n=$n>fi?Xe.slice(0,fi-fe):Xe;t.addToken(t,_n,$e?$e+Ut:Ut,Kt,fe+_n.length==ft?Nt:"",yt,Jt)}if($n>=fi){Xe=Xe.slice(fi-fe),fe=fi;break}fe=$n,Kt=""}Xe=I.slice(V,V=y[ye++]),$e=tr(y[ye++],t.cm.options)}}}function ei(e,t,y){this.line=t,this.rest=Ln(t),this.size=this.rest?hr(tt(this.rest))-y+1:1,this.node=this.text=null,this.hidden=xn(e,t)}function Gr(e,t,y){for(var m=[],I,V=t;V<y;V=I){var oe=new ei(e.doc,jt(e.doc,V),V);I=V+oe.size,m.push(oe)}return m}var Rn=null;function ui(e){Rn?Rn.ops.push(e):e.ownsGroup=Rn={ops:[e],delayedCallbacks:[]}}function Ai(e){var t=e.delayedCallbacks,y=0;do{for(;y<t.length;y++)t[y].call(null);for(var m=0;m<e.ops.length;m++){var I=e.ops[m];if(I.cursorActivityHandlers)for(;I.cursorActivityCalled<I.cursorActivityHandlers.length;)I.cursorActivityHandlers[I.cursorActivityCalled++].call(null,I.cm)}}while(y<t.length)}function Vr(e,t){var y=e.ownsGroup;if(!y)return;try{Ai(y)}finally{Rn=null,t(y)}}var jr=null;function Zr(e,t){var y=at(e,t);if(!y.length)return;var m=Array.prototype.slice.call(arguments,2),I;Rn?I=Rn.delayedCallbacks:jr?I=jr:(I=jr=[],setTimeout(ci,0));for(var V=function(de){I.push(function(){return y[de].apply(null,m)})},oe=0;oe<y.length;++oe)V(oe)}function ci(){var e=jr;jr=null;for(var t=0;t<e.length;++t)e[t]()}function Vi(e,t,y,m){for(var I=0;I<t.changes.length;I++){var V=t.changes[I];V=="text"?hs(e,t):V=="gutter"?_o(e,t,y,m):V=="class"?fs(e,t):V=="widget"&&nl(e,t,m)}t.changes=null}function Xi(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),D&&f<8&&(e.node.style.zIndex=2)),e.node}function Za(e,t){var y=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(y&&(y+=" CodeMirror-linebackground"),t.background)y?t.background.className=y:(t.background.parentNode.removeChild(t.background),t.background=null);else if(y){var m=Xi(t);t.background=m.insertBefore(A("div",null,y),m.firstChild),e.display.input.setUneditable(t.background)}}function Ro(e,t){var y=e.display.externalMeasured;return y&&y.line==t.line?(e.display.externalMeasured=null,t.measure=y.measure,y.built):Br(e,t)}function hs(e,t){var y=t.text.className,m=Ro(e,t);t.text==t.node&&(t.node=m.pre),t.text.parentNode.replaceChild(m.pre,t.text),t.text=m.pre,m.bgClass!=t.bgClass||m.textClass!=t.textClass?(t.bgClass=m.bgClass,t.textClass=m.textClass,fs(e,t)):y&&(t.text.className=y)}function fs(e,t){Za(e,t),t.line.wrapClass?Xi(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var y=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=y||""}function _o(e,t,y,m){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var I=Xi(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?m.fixedPos:-m.gutterTotalWidth)+"px; width: "+m.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),I.insertBefore(t.gutterBackground,t.text)}var V=t.line.gutterMarkers;if(e.options.lineNumbers||V){var oe=Xi(t),de=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?m.fixedPos:-m.gutterTotalWidth)+"px");if(e.display.input.setUneditable(de),oe.insertBefore(de,t.text),t.line.gutterClass&&(de.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(t.lineNumber=de.appendChild(A("div",en(e.options,y),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+m.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),V)for(var fe=0;fe<e.display.gutterSpecs.length;++fe){var ye=e.display.gutterSpecs[fe].className,Xe=V.hasOwnProperty(ye)&&V[ye];Xe&&de.appendChild(A("div",[Xe],"CodeMirror-gutter-elt","left: "+m.gutterLeft[ye]+"px; width: "+m.gutterWidth[ye]+"px"))}}}function nl(e,t,y){t.alignable&&(t.alignable=null);for(var m=C("CodeMirror-linewidget"),I=t.node.firstChild,V=void 0;I;I=V)V=I.nextSibling,m.test(I.className)&&t.node.removeChild(I);Oa(e,t,y)}function il(e,t,y,m){var I=Ro(e,t);return t.text=t.node=I.pre,I.bgClass&&(t.bgClass=I.bgClass),I.textClass&&(t.textClass=I.textClass),fs(e,t),_o(e,t,y,m),Oa(e,t,m),t.node}function Oa(e,t,y){if(Aa(e,t.line,t,y,!0),t.rest)for(var m=0;m<t.rest.length;m++)Aa(e,t.rest[m],t,y,!1)}function Aa(e,t,y,m,I){if(!t.widgets)return;for(var V=Xi(y),oe=0,de=t.widgets;oe<de.length;++oe){var fe=de[oe],ye=A("div",[fe.node],"CodeMirror-linewidget"+(fe.className?" "+fe.className:""));fe.handleMouseEvents||ye.setAttribute("cm-ignore-events","true"),vn(fe,ye,y,m),e.display.input.setUneditable(ye),I&&fe.above?V.insertBefore(ye,y.gutter||y.text):V.appendChild(ye),Zr(fe,"redraw")}}function vn(e,t,y,m){if(e.noHScroll){(y.alignable||(y.alignable=[])).push(t);var I=m.wrapperWidth;t.style.left=m.fixedPos+"px",e.coverGutter||(I-=m.gutterTotalWidth,t.style.paddingLeft=m.gutterTotalWidth+"px"),t.style.width=I+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-m.gutterTotalWidth+"px"))}function $a(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!w(document.body,e.node)){var y="position: relative;";e.coverGutter&&(y+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(y+="width: "+t.display.wrapper.clientWidth+"px;"),a(t.display.measure,A("div",[e.node],null,y))}return e.height=e.node.parentNode.offsetHeight}function Bi(e,t){for(var y=Ye(t);y!=e.wrapper;y=y.parentNode)if(!y||y.nodeType==1&&y.getAttribute("cm-ignore-events")=="true"||y.parentNode==e.sizer&&y!=e.mover)return!0}function qa(e){return e.lineSpace.offsetTop}function Yi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Si(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=a(e.measure,A("pre","x","CodeMirror-line-like")),y=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,m={left:parseInt(y.paddingLeft),right:parseInt(y.paddingRight)};return!isNaN(m.left)&&!isNaN(m.right)&&(e.cachedPaddingH=m),m}function Ii(e){return Ae-e.display.nativeBarWidth}function di(e){return e.display.scroller.clientWidth-Ii(e)-e.display.barWidth}function In(e){return e.display.scroller.clientHeight-Ii(e)-e.display.barHeight}function al(e,t,y){var m=e.options.lineWrapping,I=m&&di(e);if(!t.measure.heights||m&&t.measure.width!=I){var V=t.measure.heights=[];if(m){t.measure.width=I;for(var oe=t.text.firstChild.getClientRects(),de=0;de<oe.length-1;de++){var fe=oe[de],ye=oe[de+1];Math.abs(fe.bottom-ye.bottom)>2&&V.push((fe.bottom+ye.top)/2-y.top)}}V.push(y.bottom-y.top)}}function Gn(e,t,y){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var m=0;m<e.rest.length;m++)if(e.rest[m]==t)return{map:e.measure.maps[m],cache:e.measure.caches[m]};for(var I=0;I<e.rest.length;I++)if(hr(e.rest[I])>y)return{map:e.measure.maps[I],cache:e.measure.caches[I],before:!0}}function ps(e,t){t=Cn(t);var y=hr(t),m=e.display.externalMeasured=new ei(e.doc,t,y);m.lineN=y;var I=m.built=Br(e,m);return m.text=I.pre,a(e.display.lineMeasure,I.pre),m}function Pi(e,t,y,m){return Ti(e,on(e,t),y,m)}function ca(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Zi(e,t)];var y=e.display.externalMeasured;if(y&&t>=y.lineN&&t<y.lineN+y.size)return y}function on(e,t){var y=hr(t),m=ca(e,y);m&&!m.text?m=null:m&&m.changes&&(Vi(e,m,y,bs(e)),e.curOp.forceUpdate=!0),m||(m=ps(e,t));var I=Gn(m,t,y);return{line:t,view:m,rect:null,map:I.map,cache:I.cache,before:I.before,hasHeights:!1}}function Ti(e,t,y,m,I){t.before&&(y=-1);var V=y+(m||""),oe;return t.cache.hasOwnProperty(V)?oe=t.cache[V]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(al(e,t.view,t.rect),t.hasHeights=!0),oe=Mo(e,t,y,m),oe.bogus||(t.cache[V]=oe)),{left:oe.left,right:oe.right,top:I?oe.rtop:oe.top,bottom:I?oe.rbottom:oe.bottom}}var ms={left:0,right:0,top:0,bottom:0};function gs(e,t,y){for(var m,I,V,oe,de,fe,ye=0;ye<e.length;ye+=3)if(de=e[ye],fe=e[ye+1],t<de?(I=0,V=1,oe="left"):t<fe?(I=t-de,V=I+1):(ye==e.length-3||t==fe&&e[ye+3]>t)&&(V=fe-de,I=V-1,t>=fe&&(oe="right")),I!=null){if(m=e[ye+2],de==fe&&y==(m.insertLeft?"left":"right")&&(oe=y),y=="left"&&I==0)for(;ye&&e[ye-2]==e[ye-3]&&e[ye-1].insertLeft;)m=e[(ye-=3)+2],oe="left";if(y=="right"&&I==fe-de)for(;ye<e.length-3&&e[ye+3]==e[ye+4]&&!e[ye+5].insertLeft;)m=e[(ye+=3)+2],oe="right";break}return{node:m,start:I,end:V,collapse:oe,coverStart:de,coverEnd:fe}}function ol(e,t){var y=ms;if(t=="left")for(var m=0;m<e.length&&!((y=e[m]).left!=y.right);m++);else for(var I=e.length-1;I>=0&&!((y=e[I]).left!=y.right);I--);return y}function Mo(e,t,y,m){var I=gs(t.map,y,m),V=I.node,oe=I.start,de=I.end,fe=I.collapse,ye;if(V.nodeType==3){for(var Xe=0;Xe<4;Xe++){for(;oe&&Me(t.line.text.charAt(I.coverStart+oe));)--oe;for(;I.coverStart+de<I.coverEnd&&Me(t.line.text.charAt(I.coverStart+de));)++de;if(D&&f<9&&oe==0&&de==I.coverEnd-I.coverStart?ye=V.parentNode.getBoundingClientRect():ye=ol(T(V,oe,de).getClientRects(),m),ye.left||ye.right||oe==0)break;de=oe,oe=oe-1,fe="right"}D&&f<11&&(ye=sl(e.display.measure,ye))}else{oe>0&&(fe=m="right");var $e;e.options.lineWrapping&&($e=V.getClientRects()).length>1?ye=$e[m=="right"?$e.length-1:0]:ye=V.getBoundingClientRect()}if(D&&f<9&&!oe&&(!ye||!ye.left&&!ye.right)){var yt=V.parentNode.getClientRects()[0];yt?ye={left:yt.left,right:yt.left+Ia(e.display),top:yt.top,bottom:yt.bottom}:ye=ms}for(var ft=ye.top-t.rect.top,Ut=ye.bottom-t.rect.top,Nt=(ft+Ut)/2,Kt=t.view.measure.heights,Vt=0;Vt<Kt.length-1&&!(Nt<Kt[Vt]);Vt++);var Jt=Vt?Kt[Vt-1]:0,Xt=Kt[Vt],ir={left:(fe=="right"?ye.right:ye.left)-t.rect.left,right:(fe=="left"?ye.left:ye.right)-t.rect.left,top:Jt,bottom:Xt};return!ye.left&&!ye.right&&(ir.bogus=!0),e.options.singleCursorHeightPerLine||(ir.rtop=ft,ir.rbottom=Ut),ir}function sl(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ne(e))return t;var y=screen.logicalXDPI/screen.deviceXDPI,m=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*y,right:t.right*y,top:t.top*m,bottom:t.bottom*m}}function vs(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function pi(e){e.display.externalMeasure=null,r(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)vs(e.display.view[t])}function Ei(e){pi(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ki(){return i&&o?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function jn(){return i&&o?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ri(e){var t=0;if(e.widgets)for(var y=0;y<e.widgets.length;++y)e.widgets[y].above&&(t+=$a(e.widgets[y]));return t}function eo(e,t,y,m,I){if(!I){var V=Ri(t);y.top+=V,y.bottom+=V}if(m=="line")return y;m||(m="local");var oe=Mn(t);if(m=="local"?oe+=qa(e.display):oe-=e.display.viewOffset,m=="page"||m=="window"){var de=e.display.lineSpace.getBoundingClientRect();oe+=de.top+(m=="window"?0:jn());var fe=de.left+(m=="window"?0:ki());y.left+=fe,y.right+=fe}return y.top+=oe,y.bottom+=oe,y}function ys(e,t,y){if(y=="div")return t;var m=t.left,I=t.top;if(y=="page")m-=ki(),I-=jn();else if(y=="local"||!y){var V=e.display.sizer.getBoundingClientRect();m+=V.left,I+=V.top}var oe=e.display.lineSpace.getBoundingClientRect();return{left:m-oe.left,top:I-oe.top}}function to(e,t,y,m,I){return m||(m=jt(e.doc,t.line)),eo(e,m,Pi(e,m,t.ch,I),y)}function Ci(e,t,y,m,I,V){m=m||jt(e.doc,t.line),I||(I=on(e,m));function oe(Ut,Nt){var Kt=Ti(e,I,Ut,Nt?"right":"left",V);return Nt?Kt.left=Kt.right:Kt.right=Kt.left,eo(e,m,Kt,y)}var de=Ft(m,e.doc.direction),fe=t.ch,ye=t.sticky;if(fe>=m.text.length?(fe=m.text.length,ye="before"):fe<=0&&(fe=0,ye="after"),!de)return oe(ye=="before"?fe-1:fe,ye=="before");function Xe(Ut,Nt,Kt){var Vt=de[Nt],Jt=Vt.level==1;return oe(Kt?Ut-1:Ut,Jt!=Kt)}var $e=pt(de,fe,ye),yt=mt,ft=Xe(fe,$e,ye=="before");return yt!=null&&(ft.other=Xe(fe,yt,ye!="before")),ft}function ll(e,t){var y=0;t=F(e.doc,t),e.options.lineWrapping||(y=Ia(e.display)*t.ch);var m=jt(e.doc,t.line),I=Mn(m)+qa(e.display);return{left:y,right:y,top:I,bottom:I+m.height}}function da(e,t,y,m,I){var V=he(e,t,y);return V.xRel=I,m&&(V.outside=m),V}function Li(e,t,y){var m=e.doc;if(y+=e.display.viewOffset,y<0)return da(m.first,0,null,-1,-1);var I=Sr(m,y),V=m.first+m.size-1;if(I>V)return da(m.first+m.size-1,jt(m,V).text.length,null,1,1);t<0&&(t=0);for(var oe=jt(m,I);;){var de=cl(e,oe,I,t,y),fe=Dn(oe,de.ch+(de.xRel>0||de.outside>0?1:0));if(!fe)return de;var ye=fe.find(1);if(ye.line==I)return ye;oe=jt(m,I=ye.line)}}function ul(e,t,y,m){m-=Ri(t);var I=t.text.length,V=ct(function(oe){return Ti(e,y,oe-1).bottom<=m},I,0);return I=ct(function(oe){return Ti(e,y,oe).top>m},V,I),{begin:V,end:I}}function Al(e,t,y,m){y||(y=on(e,t));var I=eo(e,t,Ti(e,y,m),"line").top;return ul(e,t,y,I)}function Da(e,t,y,m){return e.bottom<=y?!1:e.top>y?!0:(m?e.left:e.right)>t}function cl(e,t,y,m,I){I-=Mn(t);var V=on(e,t),oe=Ri(t),de=0,fe=t.text.length,ye=!0,Xe=Ft(t,e.doc.direction);if(Xe){var $e=(e.options.lineWrapping?yu:vu)(e,t,y,V,Xe,m,I);ye=$e.level!=1,de=ye?$e.from:$e.to-1,fe=ye?$e.to:$e.from-1}var yt=null,ft=null,Ut=ct(function(xr){var mr=Ti(e,V,xr);return mr.top+=oe,mr.bottom+=oe,Da(mr,m,I,!1)?(mr.top<=I&&mr.left<=m&&(yt=xr,ft=mr),!0):!1},de,fe),Nt,Kt,Vt=!1;if(ft){var Jt=m-ft.left<ft.right-m,Xt=Jt==ye;Ut=yt+(Xt?0:1),Kt=Xt?"after":"before",Nt=Jt?ft.left:ft.right}else{!ye&&(Ut==fe||Ut==de)&&Ut++,Kt=Ut==0?"after":Ut==t.text.length?"before":Ti(e,V,Ut-(ye?1:0)).bottom+oe<=I==ye?"after":"before";var ir=Ci(e,he(y,Ut,Kt),"line",t,V);Nt=ir.left,Vt=I<ir.top?-1:I>=ir.bottom?1:0}return Ut=ke(t.text,Ut,1),da(y,Ut,Kt,Vt,m-Nt)}function vu(e,t,y,m,I,V,oe){var de=ct(function($e){var yt=I[$e],ft=yt.level!=1;return Da(Ci(e,he(y,ft?yt.to:yt.from,ft?"before":"after"),"line",t,m),V,oe,!0)},0,I.length-1),fe=I[de];if(de>0){var ye=fe.level!=1,Xe=Ci(e,he(y,ye?fe.from:fe.to,ye?"after":"before"),"line",t,m);Da(Xe,V,oe,!0)&&Xe.top>oe&&(fe=I[de-1])}return fe}function yu(e,t,y,m,I,V,oe){var de=ul(e,t,m,oe),fe=de.begin,ye=de.end;/\s/.test(t.text.charAt(ye-1))&&ye--;for(var Xe=null,$e=null,yt=0;yt<I.length;yt++){var ft=I[yt];if(ft.from>=ye||ft.to<=fe)continue;var Ut=ft.level!=1,Nt=Ti(e,m,Ut?Math.min(ye,ft.to)-1:Math.max(fe,ft.from)).right,Kt=Nt<V?V-Nt+1e9:Nt-V;(!Xe||$e>Kt)&&(Xe=ft,$e=Kt)}return Xe||(Xe=I[I.length-1]),Xe.from<fe&&(Xe={from:fe,to:Xe.to,level:Xe.level}),Xe.to>ye&&(Xe={from:Xe.from,to:ye,level:Xe.level}),Xe}var Jn;function ha(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Jn==null){Jn=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Jn.appendChild(document.createTextNode("x")),Jn.appendChild(A("br"));Jn.appendChild(document.createTextNode("x"))}a(e.measure,Jn);var y=Jn.offsetHeight/50;return y>3&&(e.cachedTextHeight=y),r(e.measure),y||1}function Ia(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),y=A("pre",[t],"CodeMirror-line-like");a(e.measure,y);var m=t.getBoundingClientRect(),I=(m.right-m.left)/10;return I>2&&(e.cachedCharWidth=I),I||10}function bs(e){for(var t=e.display,y={},m={},I=t.gutters.clientLeft,V=t.gutters.firstChild,oe=0;V;V=V.nextSibling,++oe){var de=e.display.gutterSpecs[oe].className;y[de]=V.offsetLeft+V.clientLeft+I,m[de]=V.clientWidth}return{fixedPos:Ra(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:y,gutterWidth:m,wrapperWidth:t.wrapper.clientWidth}}function Ra(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function dl(e){var t=ha(e.display),y=e.options.lineWrapping,m=y&&Math.max(5,e.display.scroller.clientWidth/Ia(e.display)-3);return function(I){if(xn(e.doc,I))return 0;var V=0;if(I.widgets)for(var oe=0;oe<I.widgets.length;oe++)I.widgets[oe].height&&(V+=I.widgets[oe].height);return y?V+(Math.ceil(I.text.length/m)||1)*t:V+t}}function Fo(e){var t=e.doc,y=dl(e);t.iter(function(m){var I=y(m);I!=m.height&&_r(m,I)})}function Ji(e,t,y,m){var I=e.display;if(!y&&Ye(t).getAttribute("cm-not-content")=="true")return null;var V,oe,de=I.lineSpace.getBoundingClientRect();try{V=t.clientX-de.left,oe=t.clientY-de.top}catch($e){return null}var fe=Li(e,V,oe),ye;if(m&&fe.xRel>0&&(ye=jt(e.doc,fe.line).text).length==fe.ch){var Xe=te(ye,ye.length,e.options.tabSize)-ye.length;fe=he(fe.line,Math.max(0,Math.round((V-Si(e.display).left)/Ia(e.display))-Xe))}return fe}function Zi(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var y=e.display.view,m=0;m<y.length;m++)if(t-=y[m].size,t<0)return m}function ti(e,t,y,m){t==null&&(t=e.doc.first),y==null&&(y=e.doc.first+e.doc.size),m||(m=0);var I=e.display;if(m&&y<I.viewTo&&(I.updateLineNumbers==null||I.updateLineNumbers>t)&&(I.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=I.viewTo)Nr&&Jr(e.doc,t)<I.viewTo&&Hi(e);else if(y<=I.viewFrom)Nr&&Xn(e.doc,y+m)>I.viewFrom?Hi(e):(I.viewFrom+=m,I.viewTo+=m);else if(t<=I.viewFrom&&y>=I.viewTo)Hi(e);else if(t<=I.viewFrom){var V=ro(e,y,y+m,1);V?(I.view=I.view.slice(V.index),I.viewFrom=V.lineN,I.viewTo+=m):Hi(e)}else if(y>=I.viewTo){var oe=ro(e,t,t,-1);oe?(I.view=I.view.slice(0,oe.index),I.viewTo=oe.lineN):Hi(e)}else{var de=ro(e,t,t,-1),fe=ro(e,y,y+m,1);de&&fe?(I.view=I.view.slice(0,de.index).concat(Gr(e,de.lineN,fe.lineN)).concat(I.view.slice(fe.index)),I.viewTo+=m):Hi(e)}var ye=I.externalMeasured;ye&&(y<ye.lineN?ye.lineN+=m:t<ye.lineN+ye.size&&(I.externalMeasured=null))}function Ni(e,t,y){e.curOp.viewChanged=!0;var m=e.display,I=e.display.externalMeasured;if(I&&t>=I.lineN&&t<I.lineN+I.size&&(m.externalMeasured=null),t<m.viewFrom||t>=m.viewTo)return;var V=m.view[Zi(e,t)];if(V.node==null)return;var oe=V.changes||(V.changes=[]);le(oe,y)==-1&&oe.push(y)}function Hi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ro(e,t,y,m){var I=Zi(e,t),V,oe=e.display.view;if(!Nr||y==e.doc.first+e.doc.size)return{index:I,lineN:y};for(var de=e.display.viewFrom,fe=0;fe<I;fe++)de+=oe[fe].size;if(de!=t){if(m>0){if(I==oe.length-1)return null;V=de+oe[I].size-t,I++}else V=de-t;t+=V,y+=V}for(;Jr(e.doc,y)!=y;){if(I==(m<0?0:oe.length-1))return null;y+=m*oe[I-(m<0?1:0)].size,I+=m}return{index:I,lineN:y}}function hl(e,t,y){var m=e.display,I=m.view;I.length==0||t>=m.viewTo||y<=m.viewFrom?(m.view=Gr(e,t,y),m.viewFrom=t):(m.viewFrom>t?m.view=Gr(e,t,m.viewFrom).concat(m.view):m.viewFrom<t&&(m.view=m.view.slice(Zi(e,t))),m.viewFrom=t,m.viewTo<y?m.view=m.view.concat(Gr(e,m.viewTo,y)):m.viewTo>y&&(m.view=m.view.slice(0,Zi(e,y)))),m.viewTo=y}function fl(e){for(var t=e.display.view,y=0,m=0;m<t.length;m++){var I=t[m];!I.hidden&&(!I.node||I.changes)&&++y}return y}function $i(e){e.display.input.showSelection(e.display.input.prepareSelection())}function pl(e,t){t===void 0&&(t=!0);for(var y=e.doc,m={},I=m.cursors=document.createDocumentFragment(),V=m.selection=document.createDocumentFragment(),oe=0;oe<y.sel.ranges.length;oe++){if(!t&&oe==y.sel.primIndex)continue;var de=y.sel.ranges[oe];if(de.from().line>=e.display.viewTo||de.to().line<e.display.viewFrom)continue;var fe=de.empty();(fe||e.options.showCursorWhenSelecting)&&ml(e,de.head,I),fe||bu(e,de,V)}return m}function ml(e,t,y){var m=Ci(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),I=y.appendChild(A("div","\xA0","CodeMirror-cursor"));if(I.style.left=m.left+"px",I.style.top=m.top+"px",I.style.height=Math.max(0,m.bottom-m.top)*e.options.cursorHeight+"px",m.other){var V=y.appendChild(A("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));V.style.display="",V.style.left=m.other.left+"px",V.style.top=m.other.top+"px",V.style.height=(m.other.bottom-m.other.top)*.85+"px"}}function _a(e,t){return e.top-t.top||e.left-t.left}function bu(e,t,y){var m=e.display,I=e.doc,V=document.createDocumentFragment(),oe=Si(e.display),de=oe.left,fe=Math.max(m.sizerWidth,di(e)-m.sizer.offsetLeft)-oe.right,ye=I.direction=="ltr";function Xe(Xt,ir,xr,mr){ir<0&&(ir=0),ir=Math.round(ir),mr=Math.round(mr),V.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+Xt+`px;
|
|
top: `+ir+"px; width: "+(xr==null?fe-Xt:xr)+`px;
|
|
height: `+(mr-ir)+"px"))}function $e(Xt,ir,xr){var mr=jt(I,Xt),Pr=mr.text.length,yn,zn;function On(_n,qn){return to(e,he(Xt,_n),"div",mr,qn)}function fi(_n,qn,Vn){var Gt=Al(e,mr,null,_n),Bn=qn=="ltr"==(Vn=="after")?"left":"right",Sn=Vn=="after"?Gt.begin:Gt.end-(/\s/.test(mr.text.charAt(Gt.end-1))?2:1);return On(Sn,Bn)[Bn]}var $n=Ft(mr,I.direction);return ut($n,ir||0,xr==null?Pr:xr,function(_n,qn,Vn,Gt){var Bn=Vn=="ltr",Sn=On(_n,Bn?"left":"right"),Tn=On(qn-1,Bn?"right":"left"),Wa=ir==null&&_n==0,Xr=xr==null&&qn==Pr,Kr=Gt==0,yi=!$n||Gt==$n.length-1;if(Tn.top-Sn.top<=3){var Wn=(ye?Wa:Xr)&&Kr,Ga=(ye?Xr:Wa)&&yi,Gi=Wn?de:(Bn?Sn:Tn).left,Fi=Ga?fe:(Bn?Tn:Sn).right;Xe(Gi,Sn.top,Fi-Gi,Sn.bottom)}else{var Ba,ii,Sa,tl;Bn?(Ba=ye&&Wa&&Kr?de:Sn.left,ii=ye?fe:fi(_n,Vn,"before"),Sa=ye?de:fi(qn,Vn,"after"),tl=ye&&Xr&&yi?fe:Tn.right):(Ba=ye?fi(_n,Vn,"before"):de,ii=!ye&&Wa&&Kr?fe:Sn.right,Sa=!ye&&Xr&&yi?de:Tn.left,tl=ye?fi(qn,Vn,"after"):fe),Xe(Ba,Sn.top,ii-Ba,Sn.bottom),Sn.bottom<Tn.top&&Xe(de,Sn.bottom,null,Tn.top),Xe(Sa,Tn.top,tl-Sa,Tn.bottom)}(!yn||_a(Sn,yn)<0)&&(yn=Sn),_a(Tn,yn)<0&&(yn=Tn),(!zn||_a(Sn,zn)<0)&&(zn=Sn),_a(Tn,zn)<0&&(zn=Tn)}),{start:yn,end:zn}}var yt=t.from(),ft=t.to();if(yt.line==ft.line)$e(yt.line,yt.ch,ft.ch);else{var Ut=jt(I,yt.line),Nt=jt(I,ft.line),Kt=Cn(Ut)==Cn(Nt),Vt=$e(yt.line,yt.ch,Kt?Ut.text.length+1:null).end,Jt=$e(ft.line,Kt?0:null,ft.ch).start;Kt&&(Vt.top<Jt.top-2?(Xe(Vt.right,Vt.top,null,Vt.bottom),Xe(de,Jt.top,Jt.left,Jt.bottom)):Xe(Vt.right,Vt.top,Jt.left-Vt.right,Vt.bottom)),Vt.bottom<Jt.top&&Xe(de,Vt.bottom,null,Jt.top)}y.appendChild(V)}function Uo(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var y=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ma(e),t.cursorDiv.style.visibility=(y=!y)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.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,Ma(e))},100)}function Es(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(et(e,"focus",e,t),e.state.focused=!0,j(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),b&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Uo(e)}function Ma(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(et(e,"blur",e,t),e.state.focused=!1,c(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Po(e){for(var t=e.display,y=t.lineDiv.offsetTop,m=0;m<t.view.length;m++){var I=t.view[m],V=e.options.lineWrapping,oe=void 0,de=0;if(I.hidden)continue;if(D&&f<8){var fe=I.node.offsetTop+I.node.offsetHeight;oe=fe-y,y=fe}else{var ye=I.node.getBoundingClientRect();oe=ye.bottom-ye.top,!V&&I.text.firstChild&&(de=I.text.firstChild.getBoundingClientRect().right-ye.left-1)}var Xe=I.line.height-oe;if((Xe>.005||Xe<-.005)&&(_r(I.line,oe),fa(I.line),I.rest))for(var $e=0;$e<I.rest.length;$e++)fa(I.rest[$e]);if(de>e.display.sizerWidth){var yt=Math.ceil(de/Ia(e.display));yt>e.display.maxLineLength&&(e.display.maxLineLength=yt,e.display.maxLine=I.line,e.display.maxLineChanged=!0)}}}function fa(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var y=e.widgets[t],m=y.node.parentNode;m&&(y.height=m.offsetHeight)}}function ko(e,t,y){var m=y&&y.top!=null?Math.max(0,y.top):e.scroller.scrollTop;m=Math.floor(m-qa(e));var I=y&&y.bottom!=null?y.bottom:m+e.wrapper.clientHeight,V=Sr(t,m),oe=Sr(t,I);if(y&&y.ensure){var de=y.ensure.from.line,fe=y.ensure.to.line;de<V?(V=de,oe=Sr(t,Mn(jt(t,de))+e.wrapper.clientHeight)):Math.min(fe,t.lastLine())>=oe&&(V=Sr(t,Mn(jt(t,fe))-e.wrapper.clientHeight),oe=fe)}return{from:V,to:Math.max(oe,V+1)}}function Eu(e,t){if(At(e,"scrollCursorIntoView"))return;var y=e.display,m=y.sizer.getBoundingClientRect(),I=null;if(t.top+m.top<0?I=!0:t.bottom+m.top>(window.innerHeight||document.documentElement.clientHeight)&&(I=!1),I!=null&&!d){var V=A("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-y.viewOffset-qa(e.display))+`px;
|
|
height: `+(t.bottom-t.top+Ii(e)+y.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(V),V.scrollIntoView(I),e.display.lineSpace.removeChild(V)}}function No(e,t,y,m){m==null&&(m=0);var I;!e.options.lineWrapping&&t==y&&(t=t.ch?he(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,y=t.sticky=="before"?he(t.line,t.ch+1,"before"):t);for(var V=0;V<5;V++){var oe=!1,de=Ci(e,t),fe=!y||y==t?de:Ci(e,y);I={left:Math.min(de.left,fe.left),top:Math.min(de.top,fe.top)-m,right:Math.max(de.left,fe.left),bottom:Math.max(de.bottom,fe.bottom)+m};var ye=Cs(e,I),Xe=e.doc.scrollTop,$e=e.doc.scrollLeft;if(ye.scrollTop!=null&&(no(e,ye.scrollTop),Math.abs(e.doc.scrollTop-Xe)>1&&(oe=!0)),ye.scrollLeft!=null&&(pa(e,ye.scrollLeft),Math.abs(e.doc.scrollLeft-$e)>1&&(oe=!0)),!oe)break}return I}function Cu(e,t){var y=Cs(e,t);y.scrollTop!=null&&no(e,y.scrollTop),y.scrollLeft!=null&&pa(e,y.scrollLeft)}function Cs(e,t){var y=e.display,m=ha(e.display);t.top<0&&(t.top=0);var I=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:y.scroller.scrollTop,V=In(e),oe={};t.bottom-t.top>V&&(t.bottom=t.top+V);var de=e.doc.height+Yi(y),fe=t.top<m,ye=t.bottom>de-m;if(t.top<I)oe.scrollTop=fe?0:t.top;else if(t.bottom>I+V){var Xe=Math.min(t.top,(ye?de:t.bottom)-V);Xe!=I&&(oe.scrollTop=Xe)}var $e=e.options.fixedGutter?0:y.gutters.offsetWidth,yt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:y.scroller.scrollLeft-$e,ft=di(e)-y.gutters.offsetWidth,Ut=t.right-t.left>ft;return Ut&&(t.right=t.left+ft),t.left<10?oe.scrollLeft=0:t.left<yt?oe.scrollLeft=Math.max(0,t.left+$e-(Ut?0:10)):t.right>ft+yt-3&&(oe.scrollLeft=t.right+(Ut?0:10)-ft),oe}function xs(e,t){if(t==null)return;Ho(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Fa(e){Ho(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function qi(e,t,y){(t!=null||y!=null)&&Ho(e),t!=null&&(e.curOp.scrollLeft=t),y!=null&&(e.curOp.scrollTop=y)}function xu(e,t){Ho(e),e.curOp.scrollToPos=t}function Ho(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var y=ll(e,t.from),m=ll(e,t.to);yl(e,y,m,t.margin)}}function yl(e,t,y,m){var I=Cs(e,{left:Math.min(t.left,y.left),top:Math.min(t.top,y.top)-m,right:Math.max(t.right,y.right),bottom:Math.max(t.bottom,y.bottom)+m});qi(e,I.scrollLeft,I.scrollTop)}function no(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;O||Ua(e,{top:t}),io(e,t,!0),O&&Ua(e),ya(e,100)}function io(e,t,y){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!y)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function pa(e,t,y,m){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(y?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!m)return;e.doc.scrollLeft=t,wl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ao(e){var t=e.display,y=t.gutters.offsetWidth,m=Math.round(e.doc.height+Yi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?y:0,docHeight:m,scrollHeight:m+Ii(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:y}}var ma=function(e,t,y){this.cm=y;var m=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),I=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");m.tabIndex=I.tabIndex=-1,e(m),e(I),Pe(m,"scroll",function(){m.clientHeight&&t(m.scrollTop,"vertical")}),Pe(I,"scroll",function(){I.clientWidth&&t(I.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,D&&f<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ma.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,y=e.scrollHeight>e.clientHeight+1,m=e.nativeBarWidth;if(y){this.vert.style.display="block",this.vert.style.bottom=t?m+"px":"0";var I=e.viewHeight-(t?m:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+I)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=y?m+"px":"0",this.horiz.style.left=e.barLeft+"px";var V=e.viewWidth-e.barLeft-(y?m:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+V)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(m==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:y?m:0,bottom:t?m:0}},ma.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ma.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ma.prototype.zeroWidthHack=function(){var e=s&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Y,this.disableVert=new Y},ma.prototype.enableZeroWidthBar=function(e,t,y){e.style.pointerEvents="auto";function m(){var I=e.getBoundingClientRect(),V=y=="vert"?document.elementFromPoint(I.right-1,(I.top+I.bottom)/2):document.elementFromPoint((I.right+I.left)/2,I.bottom-1);V!=e?e.style.pointerEvents="none":t.set(1e3,m)}t.set(1e3,m)},ma.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var oo=function(){};oo.prototype.update=function(){return{bottom:0,right:0}},oo.prototype.setScrollLeft=function(){},oo.prototype.setScrollTop=function(){},oo.prototype.clear=function(){};function Qi(e,t){t||(t=ao(e));var y=e.display.barWidth,m=e.display.barHeight;bl(e,t);for(var I=0;I<4&&y!=e.display.barWidth||m!=e.display.barHeight;I++)y!=e.display.barWidth&&e.options.lineWrapping&&Po(e),bl(e,ao(e)),y=e.display.barWidth,m=e.display.barHeight}function bl(e,t){var y=e.display,m=y.scrollbars.update(t);y.sizer.style.paddingRight=(y.barWidth=m.right)+"px",y.sizer.style.paddingBottom=(y.barHeight=m.bottom)+"px",y.heightForcer.style.borderBottom=m.bottom+"px solid transparent",m.right&&m.bottom?(y.scrollbarFiller.style.display="block",y.scrollbarFiller.style.height=m.bottom+"px",y.scrollbarFiller.style.width=m.right+"px"):y.scrollbarFiller.style.display="",m.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(y.gutterFiller.style.display="block",y.gutterFiller.style.height=m.bottom+"px",y.gutterFiller.style.width=t.gutterWidth+"px"):y.gutterFiller.style.display=""}var El={native:ma,null:oo};function Cl(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&c(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new El[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Pe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,y){y=="horizontal"?pa(e,t):no(e,t)},e),e.display.scrollbars.addClass&&j(e.display.wrapper,e.display.scrollbars.addClass)}var wu=0;function ga(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:++wu},ui(e.curOp)}function va(e){var t=e.curOp;t&&Vr(t,function(y){for(var m=0;m<y.ops.length;m++)y.ops[m].cm.curOp=null;Bu(y)})}function Bu(e){for(var t=e.ops,y=0;y<t.length;y++)Su(t[y]);for(var m=0;m<t.length;m++)Tu(t[m]);for(var I=0;I<t.length;I++)Lu(t[I]);for(var V=0;V<t.length;V++)Qo(t[V]);for(var oe=0;oe<t.length;oe++)Ou(t[oe])}function Su(e){var t=e.cm,y=t.display;Du(t),e.updateMaxLine&&Fn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<y.viewFrom||e.scrollToPos.to.line>=y.viewTo)||y.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ko(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Tu(e){e.updatedDisplay=e.mustUpdate&&ws(e.cm,e.update)}function Lu(e){var t=e.cm,y=t.display;e.updatedDisplay&&Po(t),e.barMeasure=ao(t),y.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Pi(t,y.maxLine,y.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(y.scroller.clientWidth,y.sizer.offsetLeft+e.adjustWidthTo+Ii(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,y.sizer.offsetLeft+e.adjustWidthTo-di(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=y.input.prepareSelection())}function Qo(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&pa(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var y=e.focus&&e.focus==_();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,y),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Qi(t,e.barMeasure),e.updatedDisplay&&Ss(t,e.barMeasure),e.selectionChanged&&Uo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),y&&gl(e.cm)}function Ou(e){var t=e.cm,y=t.display,m=t.doc;if(e.updatedDisplay&&xl(t,e.update),y.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(y.wheelStartX=y.wheelStartY=null),e.scrollTop!=null&&io(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&pa(t,e.scrollLeft,!0,!0),e.scrollToPos){var I=No(t,F(m,e.scrollToPos.from),F(m,e.scrollToPos.to),e.scrollToPos.margin);Eu(t,I)}var V=e.maybeHiddenMarkers,oe=e.maybeUnhiddenMarkers;if(V)for(var de=0;de<V.length;++de)V[de].lines.length||et(V[de],"hide");if(oe)for(var fe=0;fe<oe.length;++fe)oe[fe].lines.length&&et(oe[fe],"unhide");y.wrapper.offsetHeight&&(m.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&et(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function hi(e,t){if(e.curOp)return t();ga(e);try{return t()}finally{va(e)}}function Pn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ga(e);try{return t.apply(e,arguments)}finally{va(e)}}}function ri(e){return function(){if(this.curOp)return e.apply(this,arguments);ga(this);try{return e.apply(this,arguments)}finally{va(this)}}}function Kn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ga(t);try{return e.apply(this,arguments)}finally{va(t)}}}function ya(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,X(jo,e))}function jo(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var y=+new Date+e.options.workTime,m=kt(e,t.highlightFrontier),I=[];t.iter(m.line,Math.min(t.first+t.size,e.display.viewTo+500),function(V){if(m.line>=e.display.viewFrom){var oe=V.styles,de=V.text.length>e.options.maxHighlightLength?Qt(t.mode,m.state):null,fe=Ke(e,V,m,!0);de&&(m.state=de),V.styles=fe.styles;var ye=V.styleClasses,Xe=fe.classes;Xe?V.styleClasses=Xe:ye&&(V.styleClasses=null);for(var $e=!oe||oe.length!=V.styles.length||ye!=Xe&&(!ye||!Xe||ye.bgClass!=Xe.bgClass||ye.textClass!=Xe.textClass),yt=0;!$e&&yt<oe.length;++yt)$e=oe[yt]!=V.styles[yt];$e&&I.push(m.line),V.stateAfter=m.save(),m.nextLine()}else V.text.length<=e.options.maxHighlightLength&&Ht(e,V.text,m),V.stateAfter=m.line%5==0?m.save():null,m.nextLine();if(+new Date>y)return ya(e,e.options.workDelay),!0}),t.highlightFrontier=m.line,t.modeFrontier=Math.max(t.modeFrontier,m.line),I.length&&hi(e,function(){for(var V=0;V<I.length;V++)Ni(e,I[V],"text")})}var Ko=function(e,t,y){var m=e.display;this.viewport=t,this.visible=ko(m,e.doc,t),this.editorIsHidden=!m.wrapper.offsetWidth,this.wrapperHeight=m.wrapper.clientHeight,this.wrapperWidth=m.wrapper.clientWidth,this.oldDisplayWidth=di(e),this.force=y,this.dims=bs(e),this.events=[]};Ko.prototype.signal=function(e,t){_e(e,t)&&this.events.push(arguments)},Ko.prototype.finish=function(){for(var e=0;e<this.events.length;e++)et.apply(null,this.events[e])};function Du(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ii(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ii(e)+"px",t.scrollbarsClipped=!0)}function Iu(e){if(e.hasFocus())return null;var t=_();if(!t||!w(e.display.lineDiv,t))return null;var y={activeElt:t};if(window.getSelection){var m=window.getSelection();m.anchorNode&&m.extend&&w(e.display.lineDiv,m.anchorNode)&&(y.anchorNode=m.anchorNode,y.anchorOffset=m.anchorOffset,y.focusNode=m.focusNode,y.focusOffset=m.focusOffset)}return y}function Ru(e){if(!e||!e.activeElt||e.activeElt==_())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&w(document.body,e.anchorNode)&&w(document.body,e.focusNode)){var t=window.getSelection(),y=document.createRange();y.setEnd(e.anchorNode,e.anchorOffset),y.collapse(!1),t.removeAllRanges(),t.addRange(y),t.extend(e.focusNode,e.focusOffset)}}function ws(e,t){var y=e.display,m=e.doc;if(t.editorIsHidden)return Hi(e),!1;if(!t.force&&t.visible.from>=y.viewFrom&&t.visible.to<=y.viewTo&&(y.updateLineNumbers==null||y.updateLineNumbers>=y.viewTo)&&y.renderedView==y.view&&fl(e)==0)return!1;Bl(e)&&(Hi(e),t.dims=bs(e));var I=m.first+m.size,V=Math.max(t.visible.from-e.options.viewportMargin,m.first),oe=Math.min(I,t.visible.to+e.options.viewportMargin);y.viewFrom<V&&V-y.viewFrom<20&&(V=Math.max(m.first,y.viewFrom)),y.viewTo>oe&&y.viewTo-oe<20&&(oe=Math.min(I,y.viewTo)),Nr&&(V=Jr(e.doc,V),oe=Xn(e.doc,oe));var de=V!=y.viewFrom||oe!=y.viewTo||y.lastWrapHeight!=t.wrapperHeight||y.lastWrapWidth!=t.wrapperWidth;hl(e,V,oe),y.viewOffset=Mn(jt(e.doc,y.viewFrom)),e.display.mover.style.top=y.viewOffset+"px";var fe=fl(e);if(!de&&fe==0&&!t.force&&y.renderedView==y.view&&(y.updateLineNumbers==null||y.updateLineNumbers>=y.viewTo))return!1;var ye=Iu(e);return fe>4&&(y.lineDiv.style.display="none"),_u(e,y.updateLineNumbers,t.dims),fe>4&&(y.lineDiv.style.display=""),y.renderedView=y.view,Ru(ye),r(y.cursorDiv),r(y.selectionDiv),y.gutters.style.height=y.sizer.style.minHeight=0,de&&(y.lastWrapHeight=t.wrapperHeight,y.lastWrapWidth=t.wrapperWidth,ya(e,400)),y.updateLineNumbers=null,!0}function xl(e,t){for(var y=t.viewport,m=!0;;m=!1){if(!m||!e.options.lineWrapping||t.oldDisplayWidth==di(e)){if(y&&y.top!=null&&(y={top:Math.min(e.doc.height+Yi(e.display)-In(e),y.top)}),t.visible=ko(e.display,e.doc,y),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else m&&(t.visible=ko(e.display,e.doc,y));if(!ws(e,t))break;Po(e);var I=ao(e);$i(e),Qi(e,I),Ss(e,I),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ua(e,t){var y=new Ko(e,t);if(ws(e,y)){Po(e),xl(e,y);var m=ao(e);$i(e),Qi(e,m),Ss(e,m),y.finish()}}function _u(e,t,y){var m=e.display,I=e.options.lineNumbers,V=m.lineDiv,oe=V.firstChild;function de(Ut){var Nt=Ut.nextSibling;return b&&s&&e.display.currentWheelTarget==Ut?Ut.style.display="none":Ut.parentNode.removeChild(Ut),Nt}for(var fe=m.view,ye=m.viewFrom,Xe=0;Xe<fe.length;Xe++){var $e=fe[Xe];if(!$e.hidden)if(!$e.node||$e.node.parentNode!=V){var yt=il(e,$e,ye,y);V.insertBefore(yt,oe)}else{for(;oe!=$e.node;)oe=de(oe);var ft=I&&t!=null&&t<=ye&&$e.lineNumber;$e.changes&&(le($e.changes,"gutter")>-1&&(ft=!1),Vi(e,$e,ye,y)),ft&&(r($e.lineNumber),$e.lineNumber.appendChild(document.createTextNode(en(e.options,ye)))),oe=$e.node.nextSibling}ye+=$e.size}for(;oe;)oe=de(oe)}function Bs(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Ss(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ii(e)+"px"}function wl(e){var t=e.display,y=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var m=Ra(t)-t.scroller.scrollLeft+e.doc.scrollLeft,I=t.gutters.offsetWidth,V=m+"px",oe=0;oe<y.length;oe++)if(!y[oe].hidden){e.options.fixedGutter&&(y[oe].gutter&&(y[oe].gutter.style.left=V),y[oe].gutterBackground&&(y[oe].gutterBackground.style.left=V));var de=y[oe].alignable;if(de)for(var fe=0;fe<de.length;fe++)de[fe].style.left=V}e.options.fixedGutter&&(t.gutters.style.left=m+I+"px")}function Bl(e){if(!e.options.lineNumbers)return!1;var t=e.doc,y=en(e.options,t.first+t.size-1),m=e.display;if(y.length!=m.lineNumChars){var I=m.measure.appendChild(A("div",[A("div",y)],"CodeMirror-linenumber CodeMirror-gutter-elt")),V=I.firstChild.offsetWidth,oe=I.offsetWidth-V;return m.lineGutter.style.width="",m.lineNumInnerWidth=Math.max(V,m.lineGutter.offsetWidth-oe)+1,m.lineNumWidth=m.lineNumInnerWidth+oe,m.lineNumChars=m.lineNumInnerWidth?y.length:-1,m.lineGutter.style.width=m.lineNumWidth+"px",Bs(e.display),!0}return!1}function Ts(e,t){for(var y=[],m=!1,I=0;I<e.length;I++){var V=e[I],oe=null;if(typeof V!="string"&&(oe=V.style,V=V.className),V=="CodeMirror-linenumbers")if(t)m=!0;else continue;y.push({className:V,style:oe})}return t&&!m&&y.push({className:"CodeMirror-linenumbers",style:null}),y}function Sl(e){var t=e.gutters,y=e.gutterSpecs;r(t),e.lineGutter=null;for(var m=0;m<y.length;++m){var I=y[m],V=I.className,oe=I.style,de=t.appendChild(A("div",null,"CodeMirror-gutter "+V));oe&&(de.style.cssText=oe),V=="CodeMirror-linenumbers"&&(e.lineGutter=de,de.style.width=(e.lineNumWidth||1)+"px")}t.style.display=y.length?"":"none",Bs(e)}function so(e){Sl(e.display),ti(e),wl(e)}function Mu(e,t,y,m){var I=this;this.input=y,I.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),I.scrollbarFiller.setAttribute("cm-not-content","true"),I.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),I.gutterFiller.setAttribute("cm-not-content","true"),I.lineDiv=L("div",null,"CodeMirror-code"),I.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),I.cursorDiv=A("div",null,"CodeMirror-cursors"),I.measure=A("div",null,"CodeMirror-measure"),I.lineMeasure=A("div",null,"CodeMirror-measure"),I.lineSpace=L("div",[I.measure,I.lineMeasure,I.selectionDiv,I.cursorDiv,I.lineDiv],null,"position: relative; outline: none");var V=L("div",[I.lineSpace],"CodeMirror-lines");I.mover=A("div",[V],null,"position: relative"),I.sizer=A("div",[I.mover],"CodeMirror-sizer"),I.sizerWidth=null,I.heightForcer=A("div",null,null,"position: absolute; height: "+Ae+"px; width: 1px;"),I.gutters=A("div",null,"CodeMirror-gutters"),I.lineGutter=null,I.scroller=A("div",[I.sizer,I.heightForcer,I.gutters],"CodeMirror-scroll"),I.scroller.setAttribute("tabIndex","-1"),I.wrapper=A("div",[I.scrollbarFiller,I.gutterFiller,I.scroller],"CodeMirror"),D&&f<8&&(I.gutters.style.zIndex=-1,I.scroller.style.paddingRight=0),!b&&!(O&&n)&&(I.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(I.wrapper):e(I.wrapper)),I.viewFrom=I.viewTo=t.first,I.reportedViewFrom=I.reportedViewTo=t.first,I.view=[],I.renderedView=null,I.externalMeasured=null,I.viewOffset=0,I.lastWrapHeight=I.lastWrapWidth=0,I.updateLineNumbers=null,I.nativeBarWidth=I.barHeight=I.barWidth=0,I.scrollbarsClipped=!1,I.lineNumWidth=I.lineNumInnerWidth=I.lineNumChars=null,I.alignWidgets=!1,I.cachedCharWidth=I.cachedTextHeight=I.cachedPaddingH=null,I.maxLine=null,I.maxLineLength=0,I.maxLineChanged=!1,I.wheelDX=I.wheelDY=I.wheelStartX=I.wheelStartY=null,I.shift=!1,I.selForContextMenu=null,I.activeTouch=null,I.gutterSpecs=Ts(m.gutters,m.lineNumbers),Sl(I),y.init(I)}var zo=0,mi=null;D?mi=-.53:O?mi=15:i?mi=-.7:v&&(mi=-1/3);function Tl(e){var t=e.wheelDeltaX,y=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),y==null&&e.detail&&e.axis==e.VERTICAL_AXIS?y=e.detail:y==null&&(y=e.wheelDelta),{x:t,y}}function Ll(e){var t=Tl(e);return t.x*=mi,t.y*=mi,t}function Ol(e,t){var y=Tl(t),m=y.x,I=y.y,V=e.display,oe=V.scroller,de=oe.scrollWidth>oe.clientWidth,fe=oe.scrollHeight>oe.clientHeight;if(!(m&&de||I&&fe))return;if(I&&s&&b){e:for(var ye=t.target,Xe=V.view;ye!=oe;ye=ye.parentNode)for(var $e=0;$e<Xe.length;$e++)if(Xe[$e].node==ye){e.display.currentWheelTarget=ye;break e}}if(m&&!O&&!l&&mi!=null){I&&fe&&no(e,Math.max(0,oe.scrollTop+I*mi)),pa(e,Math.max(0,oe.scrollLeft+m*mi)),(!I||I&&fe)&&me(t),V.wheelStartX=null;return}if(I&&mi!=null){var yt=I*mi,ft=e.doc.scrollTop,Ut=ft+V.wrapper.clientHeight;yt<0?ft=Math.max(0,ft+yt-50):Ut=Math.min(e.doc.height,Ut+yt+50),Ua(e,{top:ft,bottom:Ut})}zo<20&&(V.wheelStartX==null?(V.wheelStartX=oe.scrollLeft,V.wheelStartY=oe.scrollTop,V.wheelDX=m,V.wheelDY=I,setTimeout(function(){if(V.wheelStartX==null)return;var Nt=oe.scrollLeft-V.wheelStartX,Kt=oe.scrollTop-V.wheelStartY,Vt=Kt&&V.wheelDY&&Kt/V.wheelDY||Nt&&V.wheelDX&&Nt/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!Vt)return;mi=(mi*zo+Vt)/(zo+1),++zo},200)):(V.wheelDX+=m,V.wheelDY+=I))}var gi=function(e,t){this.ranges=e,this.primIndex=t};gi.prototype.primary=function(){return this.ranges[this.primIndex]},gi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var y=this.ranges[t],m=e.ranges[t];if(!Re(y.anchor,m.anchor)||!Re(y.head,m.head))return!1}return!0},gi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new tn(Ze(this.ranges[t].anchor),Ze(this.ranges[t].head));return new gi(e,this.primIndex)},gi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},gi.prototype.contains=function(e,t){t||(t=e);for(var y=0;y<this.ranges.length;y++){var m=this.ranges[y];if(ge(t,m.from())>=0&&ge(e,m.to())<=0)return y}return-1};var tn=function(e,t){this.anchor=e,this.head=t};tn.prototype.from=function(){return Tt(this.anchor,this.head)},tn.prototype.to=function(){return Je(this.anchor,this.head)},tn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function si(e,t,y){var m=e&&e.options.selectionsMayTouch,I=t[y];t.sort(function(yt,ft){return ge(yt.from(),ft.from())}),y=le(t,I);for(var V=1;V<t.length;V++){var oe=t[V],de=t[V-1],fe=ge(de.to(),oe.from());if(m&&!oe.empty()?fe>0:fe>=0){var ye=Tt(de.from(),oe.from()),Xe=Je(de.to(),oe.to()),$e=de.empty()?oe.from()==oe.head:de.from()==de.head;V<=y&&--y,t.splice(--V,2,new tn($e?Xe:ye,$e?ye:Xe))}}return new gi(t,y)}function ea(e,t){return new gi([new tn(e,t||e)],0)}function ta(e){return e.text?he(e.from.line+e.text.length-1,tt(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ls(e,t){if(ge(e,t.from)<0)return e;if(ge(e,t.to)<=0)return ta(t);var y=e.line+t.text.length-(t.to.line-t.from.line)-1,m=e.ch;return e.line==t.to.line&&(m+=ta(t).ch-t.to.ch),he(y,m)}function Os(e,t){for(var y=[],m=0;m<e.sel.ranges.length;m++){var I=e.sel.ranges[m];y.push(new tn(Ls(I.anchor,t),Ls(I.head,t)))}return si(e.cm,y,e.sel.primIndex)}function Dl(e,t,y){return e.line==t.line?he(y.line,e.ch-t.ch+y.ch):he(y.line+(e.line-t.line),e.ch)}function Fu(e,t,y){for(var m=[],I=he(e.first,0),V=I,oe=0;oe<t.length;oe++){var de=t[oe],fe=Dl(de.from,I,V),ye=Dl(ta(de),I,V);if(I=de.to,V=ye,y=="around"){var Xe=e.sel.ranges[oe],$e=ge(Xe.head,Xe.anchor)<0;m[oe]=new tn($e?ye:fe,$e?fe:ye)}else m[oe]=new tn(fe,fe)}return new gi(m,e.sel.primIndex)}function Ds(e){e.doc.mode=st(e.options,e.doc.modeOption),lo(e)}function lo(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ya(e,100),e.state.modeGen++,e.curOp&&ti(e)}function Il(e,t){return t.from.ch==0&&t.to.ch==0&&tt(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Is(e,t,y,m){function I(Jt){return y?y[Jt]:null}function V(Jt,Xt,ir){Qn(Jt,Xt,ir,m),Zr(Jt,"change",Jt,t)}function oe(Jt,Xt){for(var ir=[],xr=Jt;xr<Xt;++xr)ir.push(new gn(ye[xr],I(xr),m));return ir}var de=t.from,fe=t.to,ye=t.text,Xe=jt(e,de.line),$e=jt(e,fe.line),yt=tt(ye),ft=I(ye.length-1),Ut=fe.line-de.line;if(t.full)e.insert(0,oe(0,ye.length)),e.remove(ye.length,e.size-ye.length);else if(Il(e,t)){var Nt=oe(0,ye.length-1);V($e,$e.text,ft),Ut&&e.remove(de.line,Ut),Nt.length&&e.insert(de.line,Nt)}else if(Xe==$e)if(ye.length==1)V(Xe,Xe.text.slice(0,de.ch)+yt+Xe.text.slice(fe.ch),ft);else{var Kt=oe(1,ye.length-1);Kt.push(new gn(yt+Xe.text.slice(fe.ch),ft,m)),V(Xe,Xe.text.slice(0,de.ch)+ye[0],I(0)),e.insert(de.line+1,Kt)}else if(ye.length==1)V(Xe,Xe.text.slice(0,de.ch)+ye[0]+$e.text.slice(fe.ch),I(0)),e.remove(de.line+1,Ut);else{V(Xe,Xe.text.slice(0,de.ch)+ye[0],I(0)),V($e,yt+$e.text.slice(fe.ch),ft);var Vt=oe(1,ye.length-1);Ut>1&&e.remove(de.line+1,Ut-1),e.insert(de.line+1,Vt)}Zr(e,"change",e,t)}function ra(e,t,y){function m(I,V,oe){if(I.linked)for(var de=0;de<I.linked.length;++de){var fe=I.linked[de];if(fe.doc==V)continue;var ye=oe&&fe.sharedHist;if(y&&!ye)continue;t(fe.doc,ye),m(fe.doc,I,ye)}}m(e,null,!0)}function kn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Fo(e),Ds(e),Rl(e),e.options.lineWrapping||Fn(e),e.options.mode=t.modeOption,ti(e)}function Rl(e){(e.doc.direction=="rtl"?j:c)(e.display.lineDiv,"CodeMirror-rtl")}function Uu(e){hi(e,function(){Rl(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 Rs(e,t){var y={from:Ze(t.from),to:ta(t),text:Ir(e,t.from,t.to)};return Ul(e,y,t.from.line,t.to.line+1),ra(e,function(m){return Ul(m,y,t.from.line,t.to.line+1)},!0),y}function _l(e){for(;e.length;){var t=tt(e);if(t.ranges)e.pop();else break}}function Ml(e,t){if(t)return _l(e.done),tt(e.done);if(e.done.length&&!tt(e.done).ranges)return tt(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),tt(e.done)}function Fl(e,t,y,m){var I=e.history;I.undone.length=0;var V=+new Date,oe,de;if((I.lastOp==m||I.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&I.lastModTime>V-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(oe=Ml(I,I.lastOp==m)))de=tt(oe.changes),ge(t.from,t.to)==0&&ge(t.from,de.to)==0?de.to=ta(t):oe.changes.push(Rs(e,t));else{var fe=tt(I.done);for((!fe||!fe.ranges)&&Go(e.sel,I.done),oe={changes:[Rs(e,t)],generation:I.generation},I.done.push(oe);I.done.length>I.undoDepth;)I.done.shift(),I.done[0].ranges||I.done.shift()}I.done.push(y),I.generation=++I.maxGeneration,I.lastModTime=I.lastSelTime=V,I.lastOp=I.lastSelOp=m,I.lastOrigin=I.lastSelOrigin=t.origin,de||et(e,"historyAdded")}function Pu(e,t,y,m){var I=t.charAt(0);return I=="*"||I=="+"&&y.ranges.length==m.ranges.length&&y.somethingSelected()==m.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ku(e,t,y,m){var I=e.history,V=m&&m.origin;y==I.lastSelOp||V&&I.lastSelOrigin==V&&(I.lastModTime==I.lastSelTime&&I.lastOrigin==V||Pu(e,V,tt(I.done),t))?I.done[I.done.length-1]=t:Go(t,I.done),I.lastSelTime=+new Date,I.lastSelOrigin=V,I.lastSelOp=y,m&&m.clearRedo!==!1&&_l(I.undone)}function Go(e,t){var y=tt(t);y&&y.ranges&&y.equals(e)||t.push(e)}function Ul(e,t,y,m){var I=t["spans_"+e.id],V=0;e.iter(Math.max(e.first,y),Math.min(e.first+e.size,m),function(oe){oe.markedSpans&&((I||(I=t["spans_"+e.id]={}))[V]=oe.markedSpans),++V})}function Nu(e){if(!e)return null;for(var t,y=0;y<e.length;++y)e[y].marker.explicitlyCleared?t||(t=e.slice(0,y)):t&&t.push(e[y]);return t?t.length?t:null:e}function Pl(e,t){var y=t["spans_"+e.id];if(!y)return null;for(var m=[],I=0;I<t.text.length;++I)m.push(Nu(y[I]));return m}function ar(e,t){var y=Pl(e,t),m=dn(e,t);if(!y)return m;if(!m)return y;for(var I=0;I<y.length;++I){var V=y[I],oe=m[I];if(V&&oe){e:for(var de=0;de<oe.length;++de){for(var fe=oe[de],ye=0;ye<V.length;++ye)if(V[ye].marker==fe.marker)continue e;V.push(fe)}}else oe&&(y[I]=oe)}return y}function Pa(e,t,y){for(var m=[],I=0;I<e.length;++I){var V=e[I];if(V.ranges){m.push(y?gi.prototype.deepCopy.call(V):V);continue}var oe=V.changes,de=[];m.push({changes:de});for(var fe=0;fe<oe.length;++fe){var ye=oe[fe],Xe=void 0;if(de.push({from:ye.from,to:ye.to,text:ye.text}),t)for(var $e in ye)(Xe=$e.match(/^spans_(\d+)$/))&&(le(t,Number(Xe[1]))>-1&&(tt(de)[$e]=ye[$e],delete ye[$e]))}}return m}function _s(e,t,y,m){if(m){var I=e.anchor;if(y){var V=ge(t,I)<0;V!=ge(y,I)<0?(I=t,t=y):V!=ge(t,y)<0&&(t=y)}return new tn(I,t)}else return new tn(y||t,t)}function ka(e,t,y,m,I){I==null&&(I=e.cm&&(e.cm.display.shift||e.extend)),Zn(e,new gi([_s(e.sel.primary(),t,y,I)],0),m)}function Oi(e,t,y){for(var m=[],I=e.cm&&(e.cm.display.shift||e.extend),V=0;V<e.sel.ranges.length;V++)m[V]=_s(e.sel.ranges[V],t[V],null,I);var oe=si(e.cm,m,e.sel.primIndex);Zn(e,oe,y)}function Ms(e,t,y,m){var I=e.sel.ranges.slice(0);I[t]=y,Zn(e,si(e.cm,I,e.sel.primIndex),m)}function Fs(e,t,y,m){Zn(e,ea(t,y),m)}function uo(e,t,y){var m={ranges:t.ranges,update:function(I){this.ranges=[];for(var V=0;V<I.length;V++)this.ranges[V]=new tn(F(e,I[V].anchor),F(e,I[V].head))},origin:y&&y.origin};return et(e,"beforeSelectionChange",e,m),e.cm&&et(e.cm,"beforeSelectionChange",e.cm,m),m.ranges!=t.ranges?si(e.cm,m.ranges,m.ranges.length-1):t}function Ao(e,t,y){var m=e.history.done,I=tt(m);I&&I.ranges?(m[m.length-1]=t,Vo(e,t,y)):Zn(e,t,y)}function Zn(e,t,y){Vo(e,t,y),ku(e,e.sel,e.cm?e.cm.curOp.id:NaN,y)}function Vo(e,t,y){(_e(e,"beforeSelectionChange")||e.cm&&_e(e.cm,"beforeSelectionChange"))&&(t=uo(e,t,y));var m=y&&y.bias||(ge(t.primary().head,e.sel.primary().head)<0?-1:1);kl(e,Xo(e,t,m,!0)),!(y&&y.scroll===!1)&&e.cm&&Fa(e.cm)}function kl(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,je(e.cm)),Zr(e,"cursorActivity",e)}function na(e){kl(e,Xo(e,e.sel,null,!1))}function Xo(e,t,y,m){for(var I,V=0;V<t.ranges.length;V++){var oe=t.ranges[V],de=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],fe=Yo(e,oe.anchor,de&&de.anchor,y,m),ye=Yo(e,oe.head,de&&de.head,y,m);(I||fe!=oe.anchor||ye!=oe.head)&&(I||(I=t.ranges.slice(0,V)),I[V]=new tn(fe,ye))}return I?si(e.cm,I,t.primIndex):t}function ia(e,t,y,m,I){var V=jt(e,t.line);if(V.markedSpans)for(var oe=0;oe<V.markedSpans.length;++oe){var de=V.markedSpans[oe],fe=de.marker,ye="selectLeft"in fe?!fe.selectLeft:fe.inclusiveLeft,Xe="selectRight"in fe?!fe.selectRight:fe.inclusiveRight;if((de.from==null||(ye?de.from<=t.ch:de.from<t.ch))&&(de.to==null||(Xe?de.to>=t.ch:de.to>t.ch))){if(I&&(et(fe,"beforeCursorEnter"),fe.explicitlyCleared))if(V.markedSpans){--oe;continue}else break;if(!fe.atomic)continue;if(y){var $e=fe.find(m<0?1:-1),yt=void 0;if((m<0?Xe:ye)&&($e=Us(e,$e,-m,$e&&$e.line==t.line?V:null)),$e&&$e.line==t.line&&(yt=ge($e,y))&&(m<0?yt<0:yt>0))return ia(e,$e,t,m,I)}var ft=fe.find(m<0?-1:1);return(m<0?ye:Xe)&&(ft=Us(e,ft,m,ft.line==t.line?V:null)),ft?ia(e,ft,t,m,I):null}}return t}function Yo(e,t,y,m,I){var V=m||1,oe=ia(e,t,y,V,I)||!I&&ia(e,t,y,V,!0)||ia(e,t,y,-V,I)||!I&&ia(e,t,y,-V,!0);return oe||(e.cantEdit=!0,he(e.first,0))}function Us(e,t,y,m){return y<0&&t.ch==0?t.line>e.first?F(e,he(t.line-1)):null:y>0&&t.ch==(m||jt(e,t.line)).text.length?t.line<e.first+e.size-1?he(t.line+1,0):null:new he(t.line,t.ch+y)}function Nl(e){e.setSelection(he(e.firstLine(),0),he(e.lastLine()),Ce)}function Jo(e,t,y){var m={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return m.canceled=!0}};return y&&(m.update=function(I,V,oe,de){I&&(m.from=F(e,I)),V&&(m.to=F(e,V)),oe&&(m.text=oe),de!==void 0&&(m.origin=de)}),et(e,"beforeChange",e,m),e.cm&&et(e.cm,"beforeChange",e.cm,m),m.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:m.from,to:m.to,text:m.text,origin:m.origin}}function Na(e,t,y){if(e.cm){if(!e.cm.curOp)return Pn(e.cm,Na)(e,t,y);if(e.cm.state.suppressEdits)return}if((_e(e,"beforeChange")||e.cm&&_e(e.cm,"beforeChange"))&&(t=Jo(e,t,!0),!t))return;var m=pr&&!y&&wr(e,t.from,t.to);if(m)for(var I=m.length-1;I>=0;--I)Hl(e,{from:m[I].from,to:m[I].to,text:I?[""]:t.text,origin:t.origin});else Hl(e,t)}function Hl(e,t){if(t.text.length==1&&t.text[0]==""&&ge(t.from,t.to)==0)return;var y=Os(e,t);Fl(e,t,y,e.cm?e.cm.curOp.id:NaN),co(e,t,y,dn(e,t));var m=[];ra(e,function(I,V){!V&&le(m,I.history)==-1&&(Kl(I.history,t),m.push(I.history)),co(I,t,null,dn(I,t))})}function Zo(e,t,y){var m=e.cm&&e.cm.state.suppressEdits;if(m&&!y)return;for(var I=e.history,V,oe=e.sel,de=t=="undo"?I.done:I.undone,fe=t=="undo"?I.undone:I.done,ye=0;ye<de.length&&!(V=de[ye],y?V.ranges&&!V.equals(e.sel):!V.ranges);ye++);if(ye==de.length)return;for(I.lastOrigin=I.lastSelOrigin=null;;)if(V=de.pop(),V.ranges){if(Go(V,fe),y&&!V.equals(e.sel)){Zn(e,V,{clearRedo:!1});return}oe=V}else if(m){de.push(V);return}else break;var Xe=[];Go(oe,fe),fe.push({changes:Xe,generation:I.generation}),I.generation=V.generation||++I.maxGeneration;for(var $e=_e(e,"beforeChange")||e.cm&&_e(e.cm,"beforeChange"),yt=function(Nt){var Kt=V.changes[Nt];if(Kt.origin=t,$e&&!Jo(e,Kt,!1))return de.length=0,{};Xe.push(Rs(e,Kt));var Vt=Nt?Os(e,Kt):tt(de);co(e,Kt,Vt,ar(e,Kt)),!Nt&&e.cm&&e.cm.scrollIntoView({from:Kt.from,to:ta(Kt)});var Jt=[];ra(e,function(Xt,ir){!ir&&le(Jt,Xt.history)==-1&&(Kl(Xt.history,Kt),Jt.push(Xt.history)),co(Xt,Kt,null,ar(Xt,Kt))})},ft=V.changes.length-1;ft>=0;--ft){var Ut=yt(ft);if(Ut)return Ut.v}}function Ql(e,t){if(t==0)return;if(e.first+=t,e.sel=new gi(Et(e.sel.ranges,function(I){return new tn(he(I.anchor.line+t,I.anchor.ch),he(I.head.line+t,I.head.ch))}),e.sel.primIndex),e.cm){ti(e.cm,e.first,e.first-t,t);for(var y=e.cm.display,m=y.viewFrom;m<y.viewTo;m++)Ni(e.cm,m,"gutter")}}function co(e,t,y,m){if(e.cm&&!e.cm.curOp)return Pn(e.cm,co)(e,t,y,m);if(t.to.line<e.first){Ql(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var I=t.text.length-1-(e.first-t.from.line);Ql(e,I),t={from:he(e.first,0),to:he(t.to.line+I,t.to.ch),text:[tt(t.text)],origin:t.origin}}var V=e.lastLine();t.to.line>V&&(t={from:t.from,to:he(V,jt(e,V).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ir(e,t.from,t.to),y||(y=Os(e,t)),e.cm?Hu(e.cm,t,m):Is(e,t,m),Vo(e,y,Ce),e.cantEdit&&Yo(e,he(e.firstLine(),0))&&(e.cantEdit=!1)}function Hu(e,t,y){var m=e.doc,I=e.display,V=t.from,oe=t.to,de=!1,fe=V.line;e.options.lineWrapping||(fe=hr(Cn(jt(m,V.line))),m.iter(fe,oe.line+1,function(ft){if(ft==I.maxLine)return de=!0,!0})),m.sel.contains(t.from,t.to)>-1&&je(e),Is(m,t,y,dl(e)),e.options.lineWrapping||(m.iter(fe,V.line+t.text.length,function(ft){var Ut=oi(ft);Ut>I.maxLineLength&&(I.maxLine=ft,I.maxLineLength=Ut,I.maxLineChanged=!0,de=!1)}),de&&(e.curOp.updateMaxLine=!0)),Rr(m,V.line),ya(e,400);var ye=t.text.length-(oe.line-V.line)-1;t.full?ti(e):V.line==oe.line&&t.text.length==1&&!Il(e.doc,t)?Ni(e,V.line,"text"):ti(e,V.line,oe.line+1,ye);var Xe=_e(e,"changes"),$e=_e(e,"change");if($e||Xe){var yt={from:V,to:oe,text:t.text,removed:t.removed,origin:t.origin};$e&&Zr(e,"change",e,yt),Xe&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(yt)}e.display.selForContextMenu=null}function Ha(e,t,y,m,I){var V;m||(m=y),ge(m,y)<0&&(V=[m,y],y=V[0],m=V[1]),typeof t=="string"&&(t=e.splitLines(t)),Na(e,{from:y,to:m,text:t,origin:I})}function jl(e,t,y,m){y<e.line?e.line+=m:t<e.line&&(e.line=t,e.ch=0)}function Ps(e,t,y,m){for(var I=0;I<e.length;++I){var V=e[I],oe=!0;if(V.ranges){V.copied||(V=e[I]=V.deepCopy(),V.copied=!0);for(var de=0;de<V.ranges.length;de++)jl(V.ranges[de].anchor,t,y,m),jl(V.ranges[de].head,t,y,m);continue}for(var fe=0;fe<V.changes.length;++fe){var ye=V.changes[fe];if(y<ye.from.line)ye.from=he(ye.from.line+m,ye.from.ch),ye.to=he(ye.to.line+m,ye.to.ch);else if(t<=ye.to.line){oe=!1;break}}oe||(e.splice(0,I+1),I=0)}}function Kl(e,t){var y=t.from.line,m=t.to.line,I=t.text.length-(m-y)-1;Ps(e.done,y,m,I),Ps(e.undone,y,m,I)}function ho(e,t,y,m){var I=t,V=t;return typeof t=="number"?V=jt(e,q(e,t)):I=hr(t),I==null?null:(m(V,I)&&e.cm&&Ni(e.cm,I,y),V)}function fo(e){this.lines=e,this.parent=null;for(var t=0,y=0;y<e.length;++y)e[y].parent=this,t+=e[y].height;this.height=t}fo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var y=e,m=e+t;y<m;++y){var I=this.lines[y];this.height-=I.height,li(I),Zr(I,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,y){this.height+=y,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var m=0;m<t.length;++m)t[m].parent=this},iterN:function(e,t,y){for(var m=e+t;e<m;++e)if(y(this.lines[e]))return!0}};function Qa(e){this.children=e;for(var t=0,y=0,m=0;m<e.length;++m){var I=e[m];t+=I.chunkSize(),y+=I.height,I.parent=this}this.size=t,this.height=y,this.parent=null}Qa.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var y=0;y<this.children.length;++y){var m=this.children[y],I=m.chunkSize();if(e<I){var V=Math.min(t,I-e),oe=m.height;if(m.removeInner(e,V),this.height-=oe-m.height,I==V&&(this.children.splice(y--,1),m.parent=null),(t-=V)==0)break;e=0}else e-=I}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof fo))){var de=[];this.collapse(de),this.children=[new fo(de)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,y){this.size+=t.length,this.height+=y;for(var m=0;m<this.children.length;++m){var I=this.children[m],V=I.chunkSize();if(e<=V){if(I.insertInner(e,t,y),I.lines&&I.lines.length>50){for(var oe=I.lines.length%25+25,de=oe;de<I.lines.length;){var fe=new fo(I.lines.slice(de,de+=25));I.height-=fe.height,this.children.splice(++m,0,fe),fe.parent=this}I.lines=I.lines.slice(0,oe),this.maybeSpill()}break}e-=V}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),y=new Qa(t);if(e.parent){e.size-=y.size,e.height-=y.height;var I=le(e.parent.children,e);e.parent.children.splice(I+1,0,y)}else{var m=new Qa(e.children);m.parent=e,e.children=[m,y],e=m}y.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,y){for(var m=0;m<this.children.length;++m){var I=this.children[m],V=I.chunkSize();if(e<V){var oe=Math.min(t,V-e);if(I.iterN(e,oe,y))return!0;if((t-=oe)==0)break;e=0}else e-=V}}};var po=function(e,t,y){if(y)for(var m in y)y.hasOwnProperty(m)&&(this[m]=y[m]);this.doc=e,this.node=t};po.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,y=this.line,m=hr(y);if(m==null||!t)return;for(var I=0;I<t.length;++I)t[I]==this&&t.splice(I--,1);t.length||(y.widgets=null);var V=$a(this);_r(y,Math.max(0,y.height-V)),e&&(hi(e,function(){mo(e,y,-V),Ni(e,m,"widget")}),Zr(e,"lineWidgetCleared",e,this,m))},po.prototype.changed=function(){var e=this,t=this.height,y=this.doc.cm,m=this.line;this.height=null;var I=$a(this)-t;if(!I)return;xn(this.doc,m)||_r(m,m.height+I),y&&hi(y,function(){y.curOp.forceUpdate=!0,mo(y,m,I),Zr(y,"lineWidgetChanged",y,e,hr(m))})},Ue(po);function mo(e,t,y){Mn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&xs(e,y)}function Qu(e,t,y,m){var I=new po(e,y,m),V=e.cm;return V&&I.noHScroll&&(V.display.alignWidgets=!0),ho(e,t,"widget",function(oe){var de=oe.widgets||(oe.widgets=[]);if(I.insertAt==null?de.push(I):de.splice(Math.min(de.length-1,Math.max(0,I.insertAt)),0,I),I.line=oe,V&&!xn(e,oe)){var fe=Mn(oe)<e.scrollTop;_r(oe,oe.height+$a(I)),fe&&xs(V,I.height),V.curOp.forceUpdate=!0}return!0}),V&&Zr(V,"lineWidgetAdded",V,I,typeof t=="number"?t:hr(t)),I}var $o=0,_i=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++$o};_i.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&ga(e),_e(this,"clear")){var y=this.find();y&&Zr(this,"clear",y.from,y.to)}for(var m=null,I=null,V=0;V<this.lines.length;++V){var oe=this.lines[V],de=nn(oe.markedSpans,this);e&&!this.collapsed?Ni(e,hr(oe),"text"):e&&(de.to!=null&&(I=hr(oe)),de.from!=null&&(m=hr(oe))),oe.markedSpans=cn(oe.markedSpans,de),de.from==null&&this.collapsed&&!xn(this.doc,oe)&&e&&_r(oe,ha(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var fe=0;fe<this.lines.length;++fe){var ye=Cn(this.lines[fe]),Xe=oi(ye);Xe>e.display.maxLineLength&&(e.display.maxLine=ye,e.display.maxLineLength=Xe,e.display.maxLineChanged=!0)}m!=null&&e&&this.collapsed&&ti(e,m,I+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&na(e.doc)),e&&Zr(e,"markerCleared",e,this,m,I),t&&va(e),this.parent&&this.parent.clear()},_i.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var y,m,I=0;I<this.lines.length;++I){var V=this.lines[I],oe=nn(V.markedSpans,this);if(oe.from!=null&&(y=he(t?V:hr(V),oe.from),e==-1))return y;if(oe.to!=null&&(m=he(t?V:hr(V),oe.to),e==1))return m}return y&&{from:y,to:m}},_i.prototype.changed=function(){var e=this,t=this.find(-1,!0),y=this,m=this.doc.cm;if(!t||!m)return;hi(m,function(){var I=t.line,V=hr(t.line),oe=ca(m,V);if(oe&&(vs(oe),m.curOp.selectionChanged=m.curOp.forceUpdate=!0),m.curOp.updateMaxLine=!0,!xn(y.doc,I)&&y.height!=null){var de=y.height;y.height=null;var fe=$a(y)-de;fe&&_r(I,I.height+fe)}Zr(m,"markerChanged",m,e)})},_i.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||le(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},_i.prototype.detachLine=function(e){if(this.lines.splice(le(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ue(_i);function ba(e,t,y,m,I){if(m&&m.shared)return ju(e,t,y,m,I);if(e.cm&&!e.cm.curOp)return Pn(e.cm,ba)(e,t,y,m,I);var V=new _i(e,I),oe=ge(t,y);if(m&&G(m,V,!1),oe>0||oe==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=L("span",[V.replacedWith],"CodeMirror-widget"),m.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),m.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(Qr(e,t.line,t,y,V)||t.line!=y.line&&Qr(e,y.line,t,y,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");qr()}V.addToHistory&&Fl(e,{from:t,to:y,origin:"markText"},e.sel,NaN);var de=t.line,fe=e.cm,ye;if(e.iter(de,y.line+1,function($e){fe&&V.collapsed&&!fe.options.lineWrapping&&Cn($e)==fe.display.maxLine&&(ye=!0),V.collapsed&&de!=t.line&&_r($e,0),$r($e,new Yr(V,de==t.line?t.ch:null,de==y.line?y.ch:null)),++de}),V.collapsed&&e.iter(t.line,y.line+1,function($e){xn(e,$e)&&_r($e,0)}),V.clearOnEnter&&Pe(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(Hr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++$o,V.atomic=!0),fe){if(ye&&(fe.curOp.updateMaxLine=!0),V.collapsed)ti(fe,t.line,y.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var Xe=t.line;Xe<=y.line;Xe++)Ni(fe,Xe,"text");V.atomic&&na(fe.doc),Zr(fe,"markerAdded",fe,V)}return V}var ja=function(e,t){this.markers=e,this.primary=t;for(var y=0;y<e.length;++y)e[y].parent=this};ja.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Zr(this,"clear")},ja.prototype.find=function(e,t){return this.primary.find(e,t)},Ue(ja);function ju(e,t,y,m,I){m=G(m),m.shared=!1;var V=[ba(e,t,y,m,I)],oe=V[0],de=m.widgetNode;return ra(e,function(fe){de&&(m.widgetNode=de.cloneNode(!0)),V.push(ba(fe,F(fe,t),F(fe,y),m,I));for(var ye=0;ye<fe.linked.length;++ye)if(fe.linked[ye].isParent)return;oe=tt(V)}),new ja(V,oe)}function ks(e){return e.findMarks(he(e.first,0),e.clipPos(he(e.lastLine())),function(t){return t.parent})}function Ns(e,t){for(var y=0;y<t.length;y++){var m=t[y],I=m.find(),V=e.clipPos(I.from),oe=e.clipPos(I.to);if(ge(V,oe)){var de=ba(e,V,oe,m.primary,m.primary.type);m.markers.push(de),de.parent=m}}}function Hs(e){for(var t=function(m){var I=e[m],V=[I.primary.doc];ra(I.primary.doc,function(fe){return V.push(fe)});for(var oe=0;oe<I.markers.length;oe++){var de=I.markers[oe];le(V,de.doc)==-1&&(de.parent=null,I.markers.splice(oe--,1))}},y=0;y<e.length;y++)t(y)}var zl=0,ni=function(e,t,y,m,I){if(!(this instanceof ni))return new ni(e,t,y,m,I);y==null&&(y=0),Qa.call(this,[new fo([new gn("",null)])]),this.first=y,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=y;var V=he(y,0);this.sel=ea(V),this.history=new Wo(null),this.id=++zl,this.modeOption=t,this.lineSep=m,this.direction=I=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Is(this,{from:V,to:V,text:e}),Zn(this,ea(V),Ce)};ni.prototype=xe(Qa.prototype,{constructor:ni,iter:function(e,t,y){y?this.iterN(e-this.first,t-e,y):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var y=0,m=0;m<t.length;++m)y+=t[m].height;this.insertInner(e-this.first,t,y)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=kr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Kn(function(e){var t=he(this.first,0),y=this.first+this.size-1;Na(this,{from:t,to:he(y,jt(this,y).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&qi(this.cm,0,0),Zn(this,ea(t),Ce)}),replaceRange:function(e,t,y,m){t=F(this,t),y=y?F(this,y):t,Ha(this,e,t,y,m)},getRange:function(e,t,y){var m=Ir(this,F(this,e),F(this,t));return y===!1?m:m.join(y||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(sn(this,e))return jt(this,e)},getLineNumber:function(e){return hr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=jt(this,e)),Cn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return F(this,e)},getCursor:function(e){var t=this.sel.primary(),y;return e==null||e=="head"?y=t.head:e=="anchor"?y=t.anchor:e=="end"||e=="to"||e===!1?y=t.to():y=t.from(),y},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Kn(function(e,t,y){Fs(this,F(this,typeof e=="number"?he(e,t||0):e),null,y)}),setSelection:Kn(function(e,t,y){Fs(this,F(this,e),F(this,t||e),y)}),extendSelection:Kn(function(e,t,y){ka(this,F(this,e),t&&F(this,t),y)}),extendSelections:Kn(function(e,t){Oi(this,ee(this,e),t)}),extendSelectionsBy:Kn(function(e,t){var y=Et(this.sel.ranges,e);Oi(this,ee(this,y),t)}),setSelections:Kn(function(e,t,y){if(!e.length)return;for(var m=[],I=0;I<e.length;I++)m[I]=new tn(F(this,e[I].anchor),F(this,e[I].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Zn(this,si(this.cm,m,t),y)}),addSelection:Kn(function(e,t,y){var m=this.sel.ranges.slice(0);m.push(new tn(F(this,e),F(this,t||e))),Zn(this,si(this.cm,m,m.length-1),y)}),getSelection:function(e){for(var t=this.sel.ranges,y,m=0;m<t.length;m++){var I=Ir(this,t[m].from(),t[m].to());y=y?y.concat(I):I}return e===!1?y:y.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],y=this.sel.ranges,m=0;m<y.length;m++){var I=Ir(this,y[m].from(),y[m].to());e!==!1&&(I=I.join(e||this.lineSeparator())),t[m]=I}return t},replaceSelection:function(e,t,y){for(var m=[],I=0;I<this.sel.ranges.length;I++)m[I]=e;this.replaceSelections(m,t,y||"+input")},replaceSelections:Kn(function(e,t,y){for(var m=[],I=this.sel,V=0;V<I.ranges.length;V++){var oe=I.ranges[V];m[V]={from:oe.from(),to:oe.to(),text:this.splitLines(e[V]),origin:y}}for(var de=t&&t!="end"&&Fu(this,m,t),fe=m.length-1;fe>=0;fe--)Na(this,m[fe]);de?Ao(this,de):this.cm&&Fa(this.cm)}),undo:Kn(function(){Zo(this,"undo")}),redo:Kn(function(){Zo(this,"redo")}),undoSelection:Kn(function(){Zo(this,"undo",!0)}),redoSelection:Kn(function(){Zo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,y=0,m=0;m<e.done.length;m++)e.done[m].ranges||++t;for(var I=0;I<e.undone.length;I++)e.undone[I].ranges||++y;return{undo:t,redo:y}},clearHistory:function(){var e=this;this.history=new Wo(this.history.maxGeneration),ra(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Pa(this.history.done),undone:Pa(this.history.undone)}},setHistory:function(e){var t=this.history=new Wo(this.history.maxGeneration);t.done=Pa(e.done.slice(0),null,!0),t.undone=Pa(e.undone.slice(0),null,!0)},setGutterMarker:Kn(function(e,t,y){return ho(this,e,"gutter",function(m){var I=m.gutterMarkers||(m.gutterMarkers={});return I[t]=y,!y&&ce(I)&&(m.gutterMarkers=null),!0})}),clearGutter:Kn(function(e){var t=this;this.iter(function(y){y.gutterMarkers&&y.gutterMarkers[e]&&ho(t,y,"gutter",function(){return y.gutterMarkers[e]=null,ce(y.gutterMarkers)&&(y.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!sn(this,e))return null;if(t=e,e=jt(this,e),!e)return null}else if(t=hr(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Kn(function(e,t,y){return ho(this,e,t=="gutter"?"gutter":"class",function(m){var I=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!m[I])m[I]=y;else{if(C(y).test(m[I]))return!1;m[I]+=" "+y}return!0})}),removeLineClass:Kn(function(e,t,y){return ho(this,e,t=="gutter"?"gutter":"class",function(m){var I=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",V=m[I];if(V)if(y==null)m[I]=null;else{var oe=V.match(C(y));if(!oe)return!1;var de=oe.index+oe[0].length;m[I]=V.slice(0,oe.index)+(!oe.index||de==V.length?"":" ")+V.slice(de)||null}else return!1;return!0})}),addLineWidget:Kn(function(e,t,y){return Qu(this,e,t,y)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,y){return ba(this,F(this,e),F(this,t),y,y&&y.type||"range")},setBookmark:function(e,t){var y={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=F(this,e),ba(this,e,e,y,"bookmark")},findMarksAt:function(e){e=F(this,e);var t=[],y=jt(this,e.line).markedSpans;if(y)for(var m=0;m<y.length;++m){var I=y[m];(I.from==null||I.from<=e.ch)&&(I.to==null||I.to>=e.ch)&&t.push(I.marker.parent||I.marker)}return t},findMarks:function(e,t,y){e=F(this,e),t=F(this,t);var m=[],I=e.line;return this.iter(e.line,t.line+1,function(V){var oe=V.markedSpans;if(oe)for(var de=0;de<oe.length;de++){var fe=oe[de];!(fe.to!=null&&I==e.line&&e.ch>=fe.to||fe.from==null&&I!=e.line||fe.from!=null&&I==t.line&&fe.from>=t.ch)&&(!y||y(fe.marker))&&m.push(fe.marker.parent||fe.marker)}++I}),m},getAllMarks:function(){var e=[];return this.iter(function(t){var y=t.markedSpans;if(y)for(var m=0;m<y.length;++m)y[m].from!=null&&e.push(y[m].marker)}),e},posFromIndex:function(e){var t,y=this.first,m=this.lineSeparator().length;return this.iter(function(I){var V=I.text.length+m;if(V>e)return t=e,!0;e-=V,++y}),F(this,he(y,t))},indexFromPos:function(e){e=F(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var y=this.lineSeparator().length;return this.iter(this.first,e.line,function(m){t+=m.text.length+y}),t},copy:function(e){var t=new ni(kr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,y=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<y&&(y=e.to);var m=new ni(kr(this,t,y),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(m.history=this.history),(this.linked||(this.linked=[])).push({doc:m,sharedHist:e.sharedHist}),m.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Ns(m,ks(this)),m},unlinkDoc:function(e){if(e instanceof En&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var y=this.linked[t];if(y.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Hs(ks(this));break}if(e.history==this.history){var m=[e.id];ra(e,function(I){return m.push(I.id)},!0),e.history=new Wo(null),e.history.done=Pa(this.history.done,m),e.history.undone=Pa(this.history.undone,m)}},iterLinkedDocs:function(e){ra(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):dt(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(t){return t.order=null}),this.cm&&Uu(this.cm)})}),ni.prototype.eachLine=ni.prototype.iter;var Qs=0;function Wl(e){var t=this;if(Gl(t),At(t,e)||Bi(t.display,e))return;me(e),D&&(Qs=+new Date);var y=Ji(t,e,!0),m=e.dataTransfer.files;if(!y||t.isReadOnly())return;if(m&&m.length&&window.FileReader&&window.File)for(var I=m.length,V=Array(I),oe=0,de=function(){++oe==I&&Pn(t,function(){y=F(t.doc,y);var ft={from:y,to:y,text:t.doc.splitLines(V.filter(function(Ut){return Ut!=null}).join(t.doc.lineSeparator())),origin:"paste"};Na(t.doc,ft),Ao(t.doc,ea(F(t.doc,y),F(t.doc,ta(ft))))})()},fe=function(ft,Ut){if(t.options.allowDropFileTypes&&le(t.options.allowDropFileTypes,ft.type)==-1){de();return}var Nt=new FileReader;Nt.onerror=function(){return de()},Nt.onload=function(){var Kt=Nt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Kt)){de();return}V[Ut]=Kt,de()},Nt.readAsText(ft)},ye=0;ye<m.length;ye++)fe(m[ye],ye);else{if(t.state.draggingText&&t.doc.sel.contains(y)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Xe=e.dataTransfer.getData("Text");if(Xe){var $e;if(t.state.draggingText&&!t.state.draggingText.copy&&($e=t.listSelections()),Vo(t.doc,ea(y,y)),$e)for(var yt=0;yt<$e.length;++yt)Ha(t.doc,"",$e[yt].anchor,$e[yt].head,"drag");t.replaceSelection(Xe,"around","paste"),t.display.input.focus()}}catch(ft){}}}function js(e,t){if(D&&(!e.state.draggingText||+new Date-Qs<100)){Oe(t);return}if(At(e,t)||Bi(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!v){var y=A("img",null,null,"position: fixed; left: 0; top: 0;");y.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",l&&(y.width=y.height=1,e.display.wrapper.appendChild(y),y._top=y.offsetTop),t.dataTransfer.setDragImage(y,0,0),l&&y.parentNode.removeChild(y)}}function Ku(e,t){var y=Ji(e,t);if(!y)return;var m=document.createDocumentFragment();ml(e,y,m),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),a(e.display.dragCursor,m)}function Gl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Vl(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),y=[],m=0;m<t.length;m++){var I=t[m].CodeMirror;I&&y.push(I)}y.length&&y[0].operation(function(){for(var V=0;V<y.length;V++)e(y[V])})}var vi=!1;function Ks(){if(vi)return;zu(),vi=!0}function zu(){var e;Pe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Vl(Wu)},100))}),Pe(window,"blur",function(){return Vl(Ma)})}function Wu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var aa={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"},go=0;go<10;go++)aa[go+48]=aa[go+96]=String(go);for(var qo=65;qo<=90;qo++)aa[qo]=String.fromCharCode(qo);for(var vo=1;vo<=12;vo++)aa[vo+111]=aa[vo+63235]="F"+vo;var ji={};ji.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"},ji.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"},ji.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"},ji.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"]},ji.default=s?ji.macDefault:ji.pcDefault;function Gu(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var y,m,I,V,oe=0;oe<t.length-1;oe++){var de=t[oe];if(/^(cmd|meta|m)$/i.test(de))V=!0;else if(/^a(lt)?$/i.test(de))y=!0;else if(/^(c|ctrl|control)$/i.test(de))m=!0;else if(/^s(hift)?$/i.test(de))I=!0;else throw new Error("Unrecognized modifier name: "+de)}return y&&(e="Alt-"+e),m&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),I&&(e="Shift-"+e),e}function Vu(e){var t={};for(var y in e)if(e.hasOwnProperty(y)){var m=e[y];if(/^(name|fallthrough|(de|at)tach)$/.test(y))continue;if(m=="..."){delete e[y];continue}for(var I=Et(y.split(" "),Gu),V=0;V<I.length;V++){var oe=void 0,de=void 0;V==I.length-1?(de=I.join(" "),oe=m):(de=I.slice(0,V+1).join(" "),oe="...");var fe=t[de];if(!fe)t[de]=oe;else if(fe!=oe)throw new Error("Inconsistent bindings for "+de)}delete e[y]}for(var ye in t)e[ye]=t[ye];return e}function Ea(e,t,y,m){t=Nn(t);var I=t.call?t.call(e,m):t[e];if(I===!1)return"nothing";if(I==="...")return"multi";if(I!=null&&y(I))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ea(e,t.fallthrough,y,m);for(var V=0;V<t.fallthrough.length;V++){var oe=Ea(e,t.fallthrough[V],y,m);if(oe)return oe}}}function Xl(e){var t=typeof e=="string"?e:aa[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function es(e,t,y){var m=e;return t.altKey&&m!="Alt"&&(e="Alt-"+e),(x?t.metaKey:t.ctrlKey)&&m!="Ctrl"&&(e="Ctrl-"+e),(x?t.ctrlKey:t.metaKey)&&m!="Mod"&&(e="Cmd-"+e),!y&&t.shiftKey&&m!="Shift"&&(e="Shift-"+e),e}function zs(e,t){if(l&&e.keyCode==34&&e.char)return!1;var y=aa[e.keyCode];return y==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(y=e.code),es(y,e,t))}function Nn(e){return typeof e=="string"?ji[e]:e}function Mi(e,t){for(var y=e.doc.sel.ranges,m=[],I=0;I<y.length;I++){for(var V=t(y[I]);m.length&&ge(V.from,tt(m).to)<=0;){var oe=m.pop();if(ge(oe.from,V.from)<0){V.from=oe.from;break}}m.push(V)}hi(e,function(){for(var de=m.length-1;de>=0;de--)Ha(e.doc,"",m[de].from,m[de].to,"+delete");Fa(e)})}function Ws(e,t,y){var m=ke(e.text,t+y,y);return m<0||m>e.text.length?null:m}function Gs(e,t,y){var m=Ws(e,t.ch,y);return m==null?null:new he(t.line,m,y<0?"after":"before")}function ts(e,t,y,m,I){if(e){t.doc.direction=="rtl"&&(I=-I);var V=Ft(y,t.doc.direction);if(V){var oe=I<0?tt(V):V[0],de=I<0==(oe.level==1),fe=de?"after":"before",ye;if(oe.level>0||t.doc.direction=="rtl"){var Xe=on(t,y);ye=I<0?y.text.length-1:0;var $e=Ti(t,Xe,ye).top;ye=ct(function(yt){return Ti(t,Xe,yt).top==$e},I<0==(oe.level==1)?oe.from:oe.to-1,ye),fe=="before"&&(ye=Ws(y,ye,1))}else ye=I<0?oe.to:oe.from;return new he(m,ye,fe)}}return new he(m,I<0?y.text.length:0,I<0?"before":"after")}function Vs(e,t,y,m){var I=Ft(t,e.doc.direction);if(!I)return Gs(t,y,m);y.ch>=t.text.length?(y.ch=t.text.length,y.sticky="before"):y.ch<=0&&(y.ch=0,y.sticky="after");var V=pt(I,y.ch,y.sticky),oe=I[V];if(e.doc.direction=="ltr"&&oe.level%2==0&&(m>0?oe.to>y.ch:oe.from<y.ch))return Gs(t,y,m);var de=function(Vt,Jt){return Ws(t,Vt instanceof he?Vt.ch:Vt,Jt)},fe,ye=function(Vt){return e.options.lineWrapping?(fe=fe||on(e,t),Al(e,t,fe,Vt)):{begin:0,end:t.text.length}},Xe=ye(y.sticky=="before"?de(y,-1):y.ch);if(e.doc.direction=="rtl"||oe.level==1){var $e=oe.level==1==m<0,yt=de(y,$e?1:-1);if(yt!=null&&($e?yt<=oe.to&&yt<=Xe.end:yt>=oe.from&&yt>=Xe.begin)){var ft=$e?"before":"after";return new he(y.line,yt,ft)}}var Ut=function(Vt,Jt,Xt){for(var ir=function(yn,zn){return zn?new he(y.line,de(yn,1),"before"):new he(y.line,yn,"after")};Vt>=0&&Vt<I.length;Vt+=Jt){var xr=I[Vt],mr=Jt>0==(xr.level!=1),Pr=mr?Xt.begin:de(Xt.end,-1);if(xr.from<=Pr&&Pr<xr.to)return ir(Pr,mr);if(Pr=mr?xr.from:de(xr.to,-1),Xt.begin<=Pr&&Pr<Xt.end)return ir(Pr,mr)}},Nt=Ut(V+m,m,Xe);if(Nt)return Nt;var Kt=m>0?Xe.end:de(Xe.begin,-1);return Kt!=null&&!(m>0&&Kt==t.text.length)&&(Nt=Ut(m>0?0:I.length-1,m,ye(Kt)),Nt)?Nt:null}var yo={selectAll:Nl,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ce)},killLine:function(e){return Mi(e,function(t){if(t.empty()){var y=jt(e.doc,t.head.line).text.length;return t.head.ch==y&&t.head.line<e.lastLine()?{from:t.head,to:he(t.head.line+1,0)}:{from:t.head,to:he(t.head.line,y)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Mi(e,function(t){return{from:he(t.from().line,0),to:F(e.doc,he(t.to().line+1,0))}})},delLineLeft:function(e){return Mi(e,function(t){return{from:he(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Mi(e,function(t){var y=e.charCoords(t.head,"div").top+5,m=e.coordsChar({left:0,top:y},"div");return{from:m,to:t.from()}})},delWrappedLineRight:function(e){return Mi(e,function(t){var y=e.charCoords(t.head,"div").top+5,m=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:y},"div");return{from:t.from(),to:m}})},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(he(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(he(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Yl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Jl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Xu(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var y=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:y},"div")},Fe)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var y=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:y},"div")},Fe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var y=e.cursorCoords(t.head,"div").top+5,m=e.coordsChar({left:0,top:y},"div");return m.ch<e.getLine(m.line).search(/\S/)?Jl(e,t.head):m},Fe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],y=e.listSelections(),m=e.options.tabSize,I=0;I<y.length;I++){var V=y[I].from(),oe=te(e.getLine(V.line),V.ch,m);t.push(Le(m-oe%m))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return hi(e,function(){for(var t=e.listSelections(),y=[],m=0;m<t.length;m++){if(!t[m].empty())continue;var I=t[m].head,V=jt(e.doc,I.line).text;if(V){if(I.ch==V.length&&(I=new he(I.line,I.ch-1)),I.ch>0)I=new he(I.line,I.ch+1),e.replaceRange(V.charAt(I.ch-1)+V.charAt(I.ch-2),he(I.line,I.ch-2),I,"+transpose");else if(I.line>e.doc.first){var oe=jt(e.doc,I.line-1).text;oe&&(I=new he(I.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+oe.charAt(oe.length-1),he(I.line-1,oe.length-1),I,"+transpose"))}}y.push(new tn(I,I))}e.setSelections(y)})},newlineAndIndent:function(e){return hi(e,function(){for(var t=e.listSelections(),y=t.length-1;y>=0;y--)e.replaceRange(e.doc.lineSeparator(),t[y].anchor,t[y].head,"+input");t=e.listSelections();for(var m=0;m<t.length;m++)e.indentLine(t[m].from().line,null,!0);Fa(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yl(e,t){var y=jt(e.doc,t),m=Cn(y);return m!=y&&(t=hr(m)),ts(!0,e,m,t,1)}function Xu(e,t){var y=jt(e.doc,t),m=Hn(y);return m!=y&&(t=hr(m)),ts(!0,e,y,t,-1)}function Jl(e,t){var y=Yl(e,t.line),m=jt(e.doc,y.line),I=Ft(m,e.doc.direction);if(!I||I[0].level==0){var V=Math.max(y.ch,m.text.search(/\S/)),oe=t.line==y.line&&t.ch<=V&&t.ch;return he(y.line,oe?0:V,y.sticky)}return y}function rs(e,t,y){if(typeof t=="string"&&(t=yo[t],!t))return!1;e.display.input.ensurePolled();var m=e.display.shift,I=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),y&&(e.display.shift=!1),I=t(e)!=Be}finally{e.display.shift=m,e.state.suppressEdits=!1}return I}function Yu(e,t,y){for(var m=0;m<e.state.keyMaps.length;m++){var I=Ea(t,e.state.keyMaps[m],y,e);if(I)return I}return e.options.extraKeys&&Ea(t,e.options.extraKeys,y,e)||Ea(t,e.options.keyMap,y,e)}var Ju=new Y;function bo(e,t,y,m){var I=e.state.keySeq;if(I){if(Xl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ju.set(50,function(){e.state.keySeq==I&&(e.state.keySeq=null,e.display.input.reset())}),Xs(e,I+" "+t,y,m))return!0}return Xs(e,t,y,m)}function Xs(e,t,y,m){var I=Yu(e,t,m);return I=="multi"&&(e.state.keySeq=t),I=="handled"&&Zr(e,"keyHandled",e,t,y),(I=="handled"||I=="multi")&&(me(y),Uo(e)),!!I}function Ys(e,t){var y=zs(t,!0);return y?t.shiftKey&&!e.state.keySeq?bo(e,"Shift-"+y,t,function(m){return rs(e,m,!0)})||bo(e,y,t,function(m){if(typeof m=="string"?/^go[A-Z]/.test(m):m.motion)return rs(e,m)}):bo(e,y,t,function(m){return rs(e,m)}):!1}function Zl(e,t,y){return bo(e,"'"+y+"'",t,function(m){return rs(e,m,!0)})}var ns=null;function is(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=_(),At(t,e))return;D&&f<11&&e.keyCode==27&&(e.returnValue=!1);var y=e.keyCode;t.display.shift=y==16||e.shiftKey;var m=Ys(t,e);l&&(ns=m?y:null,!m&&y==88&&!nt&&(s?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),O&&!s&&!m&&y==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),y==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Zu(t)}function Zu(e){var t=e.display.lineDiv;j(t,"CodeMirror-crosshair");function y(m){(m.keyCode==18||!m.altKey)&&(c(t,"CodeMirror-crosshair"),vt(document,"keyup",y),vt(document,"mouseover",y))}Pe(document,"keyup",y),Pe(document,"mouseover",y)}function $l(e){e.keyCode==16&&(this.doc.sel.shift=!1),At(this,e)}function ql(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Bi(t.display,e)||At(t,e)||e.ctrlKey&&!e.altKey||s&&e.metaKey)return;var y=e.keyCode,m=e.charCode;if(l&&y==ns){ns=null,me(e);return}if(l&&(!e.which||e.which<10)&&Ys(t,e))return;var I=String.fromCharCode(m==null?y:m);if(I=="\b")return;if(Zl(t,e,I))return;t.display.input.onKeyPress(e)}var $u=400,Ka=function(e,t,y){this.time=e,this.pos=t,this.button=y};Ka.prototype.compare=function(e,t,y){return this.time+$u>e&&ge(t,this.pos)==0&&y==this.button};var oa,Eo;function eu(e,t){var y=+new Date;return Eo&&Eo.compare(y,e,t)?(oa=Eo=null,"triple"):oa&&oa.compare(y,e,t)?(Eo=new Ka(y,e,t),oa=null,"double"):(oa=new Ka(y,e,t),Eo=null,"single")}function as(e){var t=this,y=t.display;if(At(t,e)||y.activeTouch&&y.input.supportsTouch())return;if(y.input.ensurePolled(),y.shift=e.shiftKey,Bi(y,e)){b||(y.scroller.draggable=!1,setTimeout(function(){return y.scroller.draggable=!0},100));return}if(Js(t,e))return;var m=Ji(t,e),I=ze(e),V=m?eu(m,I):"single";if(window.focus(),I==1&&t.state.selectingText&&t.state.selectingText(e),m&&tu(t,I,m,V,e))return;I==1?m?nu(t,m,V,e):Ye(e)==y.scroller&&me(e):I==2?(m&&ka(t.doc,m),setTimeout(function(){return y.input.focus()},20)):I==3&&(M?t.display.input.onContextMenu(e):vl(t))}function tu(e,t,y,m,I){var V="Click";return m=="double"?V="Double"+V:m=="triple"&&(V="Triple"+V),V=(t==1?"Left":t==2?"Middle":"Right")+V,bo(e,es(V,I),I,function(oe){if(typeof oe=="string"&&(oe=yo[oe]),!oe)return!1;var de=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),de=oe(e,y)!=Be}finally{e.state.suppressEdits=!1}return de})}function ru(e,t,y){var m=e.getOption("configureMouse"),I=m?m(e,t,y):{};if(I.unit==null){var V=u?y.shiftKey&&y.metaKey:y.altKey;I.unit=V?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(I.extend==null||e.doc.extend)&&(I.extend=e.doc.extend||y.shiftKey),I.addNew==null&&(I.addNew=s?y.metaKey:y.ctrlKey),I.moveOnDrag==null&&(I.moveOnDrag=!(s?y.altKey:y.ctrlKey)),I}function nu(e,t,y,m){D?setTimeout(X(gl,e),0):e.curOp.focus=_();var I=ru(e,y,m),V=e.doc.sel,oe;e.options.dragDrop&>&&!e.isReadOnly()&&y=="single"&&(oe=V.contains(t))>-1&&(ge((oe=V.ranges[oe]).from(),t)<0||t.xRel>0)&&(ge(oe.to(),t)>0||t.xRel<0)?qu(e,m,t,I):iu(e,m,t,I)}function qu(e,t,y,m){var I=e.display,V=!1,oe=Pn(e,function(ye){b&&(I.scroller.draggable=!1),e.state.draggingText=!1,vt(I.wrapper.ownerDocument,"mouseup",oe),vt(I.wrapper.ownerDocument,"mousemove",de),vt(I.scroller,"dragstart",fe),vt(I.scroller,"drop",oe),V||(me(ye),m.addNew||ka(e.doc,y,null,null,m.extend),b&&!v||D&&f==9?setTimeout(function(){I.wrapper.ownerDocument.body.focus({preventScroll:!0}),I.input.focus()},20):I.input.focus())}),de=function(ye){V=V||Math.abs(t.clientX-ye.clientX)+Math.abs(t.clientY-ye.clientY)>=10},fe=function(){return V=!0};b&&(I.scroller.draggable=!0),e.state.draggingText=oe,oe.copy=!m.moveOnDrag,I.scroller.dragDrop&&I.scroller.dragDrop(),Pe(I.wrapper.ownerDocument,"mouseup",oe),Pe(I.wrapper.ownerDocument,"mousemove",de),Pe(I.scroller,"dragstart",fe),Pe(I.scroller,"drop",oe),vl(e),setTimeout(function(){return I.input.focus()},20)}function Co(e,t,y){if(y=="char")return new tn(t,t);if(y=="word")return e.findWordAt(t);if(y=="line")return new tn(he(t.line,0),F(e.doc,he(t.line+1,0)));var m=y(e,t);return new tn(m.from,m.to)}function iu(e,t,y,m){var I=e.display,V=e.doc;me(t);var oe,de,fe=V.sel,ye=fe.ranges;if(m.addNew&&!m.extend?(de=V.sel.contains(y),de>-1?oe=ye[de]:oe=new tn(y,y)):(oe=V.sel.primary(),de=V.sel.primIndex),m.unit=="rectangle")m.addNew||(oe=new tn(y,y)),y=Ji(e,t,!0,!0),de=-1;else{var Xe=Co(e,y,m.unit);m.extend?oe=_s(oe,Xe.anchor,Xe.head,m.extend):oe=Xe}m.addNew?de==-1?(de=ye.length,Zn(V,si(e,ye.concat([oe]),de),{scroll:!1,origin:"*mouse"})):ye.length>1&&ye[de].empty()&&m.unit=="char"&&!m.extend?(Zn(V,si(e,ye.slice(0,de).concat(ye.slice(de+1)),0),{scroll:!1,origin:"*mouse"}),fe=V.sel):Ms(V,de,oe,Se):(de=0,Zn(V,new gi([oe],0),Se),fe=V.sel);var $e=y;function yt(Xt){if(ge($e,Xt)==0)return;if($e=Xt,m.unit=="rectangle"){for(var ir=[],xr=e.options.tabSize,mr=te(jt(V,y.line).text,y.ch,xr),Pr=te(jt(V,Xt.line).text,Xt.ch,xr),yn=Math.min(mr,Pr),zn=Math.max(mr,Pr),On=Math.min(y.line,Xt.line),fi=Math.min(e.lastLine(),Math.max(y.line,Xt.line));On<=fi;On++){var $n=jt(V,On).text,_n=Ve($n,yn,xr);yn==zn?ir.push(new tn(he(On,_n),he(On,_n))):$n.length>_n&&ir.push(new tn(he(On,_n),he(On,Ve($n,zn,xr))))}ir.length||ir.push(new tn(y,y)),Zn(V,si(e,fe.ranges.slice(0,de).concat(ir),de),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Xt)}else{var qn=oe,Vn=Co(e,Xt,m.unit),Gt=qn.anchor,Bn;ge(Vn.anchor,Gt)>0?(Bn=Vn.head,Gt=Tt(qn.from(),Vn.anchor)):(Bn=Vn.anchor,Gt=Je(qn.to(),Vn.head));var Sn=fe.ranges.slice(0);Sn[de]=au(e,new tn(F(V,Gt),Bn)),Zn(V,si(e,Sn,de),Se)}}var ft=I.wrapper.getBoundingClientRect(),Ut=0;function Nt(Xt){var ir=++Ut,xr=Ji(e,Xt,!0,m.unit=="rectangle");if(!xr)return;if(ge(xr,$e)!=0){e.curOp.focus=_(),yt(xr);var mr=ko(I,V);(xr.line>=mr.to||xr.line<mr.from)&&setTimeout(Pn(e,function(){Ut==ir&&Nt(Xt)}),150)}else{var Pr=Xt.clientY<ft.top?-20:Xt.clientY>ft.bottom?20:0;Pr&&setTimeout(Pn(e,function(){if(Ut!=ir)return;I.scroller.scrollTop+=Pr,Nt(Xt)}),50)}}function Kt(Xt){e.state.selectingText=!1,Ut=Infinity,Xt&&(me(Xt),I.input.focus()),vt(I.wrapper.ownerDocument,"mousemove",Vt),vt(I.wrapper.ownerDocument,"mouseup",Jt),V.history.lastSelOrigin=null}var Vt=Pn(e,function(Xt){Xt.buttons===0||!ze(Xt)?Kt(Xt):Nt(Xt)}),Jt=Pn(e,Kt);e.state.selectingText=Jt,Pe(I.wrapper.ownerDocument,"mousemove",Vt),Pe(I.wrapper.ownerDocument,"mouseup",Jt)}function au(e,t){var y=t.anchor,m=t.head,I=jt(e.doc,y.line);if(ge(y,m)==0&&y.sticky==m.sticky)return t;var V=Ft(I);if(!V)return t;var oe=pt(V,y.ch,y.sticky),de=V[oe];if(de.from!=y.ch&&de.to!=y.ch)return t;var fe=oe+(de.from==y.ch==(de.level!=1)?0:1);if(fe==0||fe==V.length)return t;var ye;if(m.line!=y.line)ye=(m.line-y.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Xe=pt(V,m.ch,m.sticky),$e=Xe-oe||(m.ch-y.ch)*(de.level==1?-1:1);Xe==fe-1||Xe==fe?ye=$e<0:ye=$e>0}var yt=V[fe+(ye?-1:0)],ft=ye==(yt.level==1),Ut=ft?yt.from:yt.to,Nt=ft?"after":"before";return y.ch==Ut&&y.sticky==Nt?t:new tn(new he(y.line,Ut,Nt),m)}function ou(e,t,y,m){var I,V;if(t.touches)I=t.touches[0].clientX,V=t.touches[0].clientY;else try{I=t.clientX,V=t.clientY}catch(yt){return!1}if(I>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;m&&me(t);var oe=e.display,de=oe.lineDiv.getBoundingClientRect();if(V>de.bottom||!_e(e,y))return Ee(t);V-=de.top-oe.viewOffset;for(var fe=0;fe<e.display.gutterSpecs.length;++fe){var ye=oe.gutters.childNodes[fe];if(ye&&ye.getBoundingClientRect().right>=I){var Xe=Sr(e.doc,V),$e=e.display.gutterSpecs[fe];return et(e,y,e,Xe,$e.className,t),Ee(t)}}}function Js(e,t){return ou(e,t,"gutterClick",!0)}function Zs(e,t){if(Bi(e.display,t)||za(e,t))return;if(At(e,t,"contextmenu"))return;M||e.display.input.onContextMenu(t)}function za(e,t){return _e(e,"gutterContextMenu")?ou(e,t,"gutterContextMenu",!1):!1}function os(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ei(e)}var Ki={toString:function(){return"CodeMirror.Init"}},su={},ss={};function eA(e){var t=e.optionHandlers;function y(m,I,V,oe){e.defaults[m]=I,V&&(t[m]=oe?function(de,fe,ye){ye!=Ki&&V(de,fe,ye)}:V)}e.defineOption=y,e.Init=Ki,y("value","",function(m,I){return m.setValue(I)},!0),y("mode",null,function(m,I){m.doc.modeOption=I,Ds(m)},!0),y("indentUnit",2,Ds,!0),y("indentWithTabs",!1),y("smartIndent",!0),y("tabSize",4,function(m){lo(m),Ei(m),ti(m)},!0),y("lineSeparator",null,function(m,I){if(m.doc.lineSep=I,!I)return;var V=[],oe=m.doc.first;m.doc.iter(function(fe){for(var ye=0;;){var Xe=fe.text.indexOf(I,ye);if(Xe==-1)break;ye=Xe+I.length,V.push(he(oe,Xe))}oe++});for(var de=V.length-1;de>=0;de--)Ha(m.doc,I,V[de],he(V[de].line,V[de].ch+I.length))}),y("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(m,I,V){m.state.specialChars=new RegExp(I.source+(I.test(" ")?"":"| "),"g"),V!=Ki&&m.refresh()}),y("specialCharPlaceholder",Ur,function(m){return m.refresh()},!0),y("electricChars",!0),y("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),y("spellcheck",!1,function(m,I){return m.getInputField().spellcheck=I},!0),y("autocorrect",!1,function(m,I){return m.getInputField().autocorrect=I},!0),y("autocapitalize",!1,function(m,I){return m.getInputField().autocapitalize=I},!0),y("rtlMoveVisually",!p),y("wholeLineUpdateBefore",!0),y("theme","default",function(m){os(m),so(m)},!0),y("keyMap","default",function(m,I,V){var oe=Nn(I),de=V!=Ki&&Nn(V);de&&de.detach&&de.detach(m,oe),oe.attach&&oe.attach(m,de||null)}),y("extraKeys",null),y("configureMouse",null),y("lineWrapping",!1,lu,!0),y("gutters",[],function(m,I){m.display.gutterSpecs=Ts(I,m.options.lineNumbers),so(m)},!0),y("fixedGutter",!0,function(m,I){m.display.gutters.style.left=I?Ra(m.display)+"px":"0",m.refresh()},!0),y("coverGutterNextToScrollbar",!1,function(m){return Qi(m)},!0),y("scrollbarStyle","native",function(m){Cl(m),Qi(m),m.display.scrollbars.setScrollTop(m.doc.scrollTop),m.display.scrollbars.setScrollLeft(m.doc.scrollLeft)},!0),y("lineNumbers",!1,function(m,I){m.display.gutterSpecs=Ts(m.options.gutters,I),so(m)},!0),y("firstLineNumber",1,so,!0),y("lineNumberFormatter",function(m){return m},so,!0),y("showCursorWhenSelecting",!1,$i,!0),y("resetSelectionOnContextMenu",!0),y("lineWiseCopyCut",!0),y("pasteLinesPerSelection",!0),y("selectionsMayTouch",!1),y("readOnly",!1,function(m,I){I=="nocursor"&&(Ma(m),m.display.input.blur()),m.display.input.readOnlyChanged(I)}),y("screenReaderLabel",null,function(m,I){I=I===""?null:I,m.display.input.screenReaderLabelChanged(I)}),y("disableInput",!1,function(m,I){I||m.display.input.reset()},!0),y("dragDrop",!0,tA),y("allowDropFileTypes",null),y("cursorBlinkRate",530),y("cursorScrollMargin",0),y("cursorHeight",1,$i,!0),y("singleCursorHeightPerLine",!0,$i,!0),y("workTime",100),y("workDelay",100),y("flattenSpans",!0,lo,!0),y("addModeClass",!1,lo,!0),y("pollInterval",100),y("undoDepth",200,function(m,I){return m.doc.history.undoDepth=I}),y("historyEventDelay",1250),y("viewportMargin",10,function(m){return m.refresh()},!0),y("maxHighlightLength",1e4,lo,!0),y("moveInputWithCursor",!0,function(m,I){I||m.display.input.resetPosition()}),y("tabindex",null,function(m,I){return m.display.input.getField().tabIndex=I||""}),y("autofocus",null),y("direction","ltr",function(m,I){return m.doc.setDirection(I)},!0),y("phrases",null)}function tA(e,t,y){var m=y&&y!=Ki;if(!t!=!m){var I=e.display.dragFunctions,V=t?Pe:vt;V(e.display.scroller,"dragstart",I.start),V(e.display.scroller,"dragenter",I.enter),V(e.display.scroller,"dragover",I.over),V(e.display.scroller,"dragleave",I.leave),V(e.display.scroller,"drop",I.drop)}}function lu(e){e.options.lineWrapping?(j(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(c(e.display.wrapper,"CodeMirror-wrap"),Fn(e)),Fo(e),ti(e),Ei(e),setTimeout(function(){return Qi(e)},100)}function En(e,t){var y=this;if(!(this instanceof En))return new En(e,t);this.options=t=t?G(t):{},G(su,t,!1);var m=t.value;typeof m=="string"?m=new ni(m,t.mode,null,t.lineSeparator,t.direction):t.mode&&(m.modeOption=t.mode),this.doc=m;var I=new En.inputStyles[t.inputStyle](this),V=this.display=new Mu(e,m,I,t);V.wrapper.CodeMirror=this,os(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Cl(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 Y,keySeq:null,specialChars:null},t.autofocus&&!n&&V.input.focus(),D&&f<11&&setTimeout(function(){return y.display.input.reset(!0)},20),uu(this),Ks(),ga(this),this.curOp.forceUpdate=!0,kn(this,m),t.autofocus&&!n||this.hasFocus()?setTimeout(function(){y.hasFocus()&&!y.state.focused&&Es(y)},20):Ma(this);for(var oe in ss)ss.hasOwnProperty(oe)&&ss[oe](this,t[oe],Ki);Bl(this),t.finishInit&&t.finishInit(this);for(var de=0;de<ls.length;++de)ls[de](this);va(this),b&&t.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}En.defaults=su,En.optionHandlers=ss;function uu(e){var t=e.display;Pe(t.scroller,"mousedown",Pn(e,as)),D&&f<11?Pe(t.scroller,"dblclick",Pn(e,function(fe){if(At(e,fe))return;var ye=Ji(e,fe);if(!ye||Js(e,fe)||Bi(e.display,fe))return;me(fe);var Xe=e.findWordAt(ye);ka(e.doc,Xe.anchor,Xe.head)})):Pe(t.scroller,"dblclick",function(fe){return At(e,fe)||me(fe)}),Pe(t.scroller,"contextmenu",function(fe){return Zs(e,fe)}),Pe(t.input.getField(),"contextmenu",function(fe){t.scroller.contains(fe.target)||Zs(e,fe)});var y,m={end:0};function I(){t.activeTouch&&(y=setTimeout(function(){return t.activeTouch=null},1e3),m=t.activeTouch,m.end=+new Date)}function V(fe){if(fe.touches.length!=1)return!1;var ye=fe.touches[0];return ye.radiusX<=1&&ye.radiusY<=1}function oe(fe,ye){if(ye.left==null)return!0;var Xe=ye.left-fe.left,$e=ye.top-fe.top;return Xe*Xe+$e*$e>20*20}Pe(t.scroller,"touchstart",function(fe){if(!At(e,fe)&&!V(fe)&&!Js(e,fe)){t.input.ensurePolled(),clearTimeout(y);var ye=+new Date;t.activeTouch={start:ye,moved:!1,prev:ye-m.end<=300?m:null},fe.touches.length==1&&(t.activeTouch.left=fe.touches[0].pageX,t.activeTouch.top=fe.touches[0].pageY)}}),Pe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Pe(t.scroller,"touchend",function(fe){var ye=t.activeTouch;if(ye&&!Bi(t,fe)&&ye.left!=null&&!ye.moved&&new Date-ye.start<300){var Xe=e.coordsChar(t.activeTouch,"page"),$e;!ye.prev||oe(ye,ye.prev)?$e=new tn(Xe,Xe):!ye.prev.prev||oe(ye,ye.prev.prev)?$e=e.findWordAt(Xe):$e=new tn(he(Xe.line,0),F(e.doc,he(Xe.line+1,0))),e.setSelection($e.anchor,$e.head),e.focus(),me(fe)}I()}),Pe(t.scroller,"touchcancel",I),Pe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(no(e,t.scroller.scrollTop),pa(e,t.scroller.scrollLeft,!0),et(e,"scroll",e))}),Pe(t.scroller,"mousewheel",function(fe){return Ol(e,fe)}),Pe(t.scroller,"DOMMouseScroll",function(fe){return Ol(e,fe)}),Pe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(fe){At(e,fe)||Oe(fe)},over:function(fe){At(e,fe)||(Ku(e,fe),Oe(fe))},start:function(fe){return js(e,fe)},drop:Pn(e,Wl),leave:function(fe){At(e,fe)||Gl(e)}};var de=t.input.getField();Pe(de,"keyup",function(fe){return $l.call(e,fe)}),Pe(de,"keydown",Pn(e,is)),Pe(de,"keypress",Pn(e,ql)),Pe(de,"focus",function(fe){return Es(e,fe)}),Pe(de,"blur",function(fe){return Ma(e,fe)})}var ls=[];En.defineInitHook=function(e){return ls.push(e)};function Ca(e,t,y,m){var I=e.doc,V;y==null&&(y="add"),y=="smart"&&(I.mode.indent?V=kt(e,t).state:y="prev");var oe=e.options.tabSize,de=jt(I,t),fe=te(de.text,null,oe);de.stateAfter&&(de.stateAfter=null);var ye=de.text.match(/^\s*/)[0],Xe;if(!m&&!/\S/.test(de.text))Xe=0,y="not";else if(y=="smart"&&(Xe=I.mode.indent(V,de.text.slice(ye.length),de.text),Xe==Be||Xe>150)){if(!m)return;y="prev"}y=="prev"?t>I.first?Xe=te(jt(I,t-1).text,null,oe):Xe=0:y=="add"?Xe=fe+e.options.indentUnit:y=="subtract"?Xe=fe-e.options.indentUnit:typeof y=="number"&&(Xe=fe+y),Xe=Math.max(0,Xe);var $e="",yt=0;if(e.options.indentWithTabs)for(var ft=Math.floor(Xe/oe);ft;--ft)yt+=oe,$e+=" ";if(yt<Xe&&($e+=Le(Xe-yt)),$e!=ye)return Ha(I,$e,he(t,0),he(t,ye.length),"+input"),de.stateAfter=null,!0;for(var Ut=0;Ut<I.sel.ranges.length;Ut++){var Nt=I.sel.ranges[Ut];if(Nt.head.line==t&&Nt.head.ch<ye.length){var Kt=he(t,ye.length);Ms(I,Ut,new tn(Kt,Kt));break}}}var xi=null;function xo(e){xi=e}function $s(e,t,y,m,I){var V=e.doc;e.display.shift=!1,m||(m=V.sel);var oe=+new Date-200,de=I=="paste"||e.state.pasteIncoming>oe,fe=dt(t),ye=null;if(de&&m.ranges.length>1)if(xi&&xi.text.join(`
|
|
`)==t){if(m.ranges.length%xi.text.length==0){ye=[];for(var Xe=0;Xe<xi.text.length;Xe++)ye.push(V.splitLines(xi.text[Xe]))}}else fe.length==m.ranges.length&&e.options.pasteLinesPerSelection&&(ye=Et(fe,function(Vt){return[Vt]}));for(var $e=e.curOp.updateInput,yt=m.ranges.length-1;yt>=0;yt--){var ft=m.ranges[yt],Ut=ft.from(),Nt=ft.to();ft.empty()&&(y&&y>0?Ut=he(Ut.line,Ut.ch-y):e.state.overwrite&&!de?Nt=he(Nt.line,Math.min(jt(V,Nt.line).text.length,Nt.ch+tt(fe).length)):de&&xi&&xi.lineWise&&xi.text.join(`
|
|
`)==fe.join(`
|
|
`)&&(Ut=Nt=he(Ut.line,0)));var Kt={from:Ut,to:Nt,text:ye?ye[yt%ye.length]:fe,origin:I||(de?"paste":e.state.cutIncoming>oe?"cut":"+input")};Na(e.doc,Kt),Zr(e,"inputRead",e,Kt)}t&&!de&&Bo(e,t),Fa(e),e.curOp.updateInput<2&&(e.curOp.updateInput=$e),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function wo(e,t){var y=e.clipboardData&&e.clipboardData.getData("Text");if(y)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&hi(t,function(){return $s(t,y,0,null,"paste")}),!0}function Bo(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var y=e.doc.sel,m=y.ranges.length-1;m>=0;m--){var I=y.ranges[m];if(I.head.ch>100||m&&y.ranges[m-1].head.line==I.head.line)continue;var V=e.getModeAt(I.head),oe=!1;if(V.electricChars){for(var de=0;de<V.electricChars.length;de++)if(t.indexOf(V.electricChars.charAt(de))>-1){oe=Ca(e,I.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(jt(e.doc,I.head.line).text.slice(0,I.head.ch))&&(oe=Ca(e,I.head.line,"smart")));oe&&Zr(e,"electricInput",e,I.head.line)}}function qs(e){for(var t=[],y=[],m=0;m<e.doc.sel.ranges.length;m++){var I=e.doc.sel.ranges[m].head.line,V={anchor:he(I,0),head:he(I+1,0)};y.push(V),t.push(e.getRange(V.anchor,V.head))}return{text:t,ranges:y}}function el(e,t,y,m){e.setAttribute("autocorrect",y?"":"off"),e.setAttribute("autocapitalize",m?"":"off"),e.setAttribute("spellcheck",!!t)}function Au(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return b?e.style.width="1000px":e.setAttribute("wrap","off"),E&&(e.style.border="1px solid black"),el(e),t}function cu(e){var t=e.optionHandlers,y=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(m,I){var V=this.options,oe=V[m];if(V[m]==I&&m!="mode")return;V[m]=I,t.hasOwnProperty(m)&&Pn(this,t[m])(this,I,oe),et(this,"optionChange",this,m)},getOption:function(m){return this.options[m]},getDoc:function(){return this.doc},addKeyMap:function(m,I){this.state.keyMaps[I?"push":"unshift"](Nn(m))},removeKeyMap:function(m){for(var I=this.state.keyMaps,V=0;V<I.length;++V)if(I[V]==m||I[V].name==m)return I.splice(V,1),!0},addOverlay:ri(function(m,I){var V=m.token?m:e.getMode(this.options,m);if(V.startState)throw new Error("Overlays may not be stateful.");Ie(this.state.overlays,{mode:V,modeSpec:m,opaque:I&&I.opaque,priority:I&&I.priority||0},function(oe){return oe.priority}),this.state.modeGen++,ti(this)}),removeOverlay:ri(function(m){for(var I=this.state.overlays,V=0;V<I.length;++V){var oe=I[V].modeSpec;if(oe==m||typeof m=="string"&&oe.name==m){I.splice(V,1),this.state.modeGen++,ti(this);return}}}),indentLine:ri(function(m,I,V){typeof I!="string"&&typeof I!="number"&&(I==null?I=this.options.smartIndent?"smart":"prev":I=I?"add":"subtract"),sn(this.doc,m)&&Ca(this,m,I,V)}),indentSelection:ri(function(m){for(var I=this.doc.sel.ranges,V=-1,oe=0;oe<I.length;oe++){var de=I[oe];if(de.empty())de.head.line>V&&(Ca(this,de.head.line,m,!0),V=de.head.line,oe==this.doc.sel.primIndex&&Fa(this));else{var fe=de.from(),ye=de.to(),Xe=Math.max(V,fe.line);V=Math.min(this.lastLine(),ye.line-(ye.ch?0:1))+1;for(var $e=Xe;$e<V;++$e)Ca(this,$e,m);var yt=this.doc.sel.ranges;fe.ch==0&&I.length==yt.length&&yt[oe].from().ch>0&&Ms(this.doc,oe,new tn(fe,yt[oe].to()),Ce)}}}),getTokenAt:function(m,I){return $t(this,m,I)},getLineTokens:function(m,I){return $t(this,he(m),I,!0)},getTokenTypeAt:function(m){m=F(this.doc,m);var I=xt(this,jt(this.doc,m.line)),V=0,oe=(I.length-1)/2,de=m.ch,fe;if(de==0)fe=I[2];else for(;;){var ye=V+oe>>1;if((ye?I[ye*2-1]:0)>=de)oe=ye;else if(I[ye*2+1]<de)V=ye+1;else{fe=I[ye*2+2];break}}var Xe=fe?fe.indexOf("overlay "):-1;return Xe<0?fe:Xe==0?null:fe.slice(0,Xe-1)},getModeAt:function(m){var I=this.doc.mode;return I.innerMode?e.innerMode(I,this.getTokenAt(m).state).mode:I},getHelper:function(m,I){return this.getHelpers(m,I)[0]},getHelpers:function(m,I){var V=[];if(!y.hasOwnProperty(I))return V;var oe=y[I],de=this.getModeAt(m);if(typeof de[I]=="string")oe[de[I]]&&V.push(oe[de[I]]);else if(de[I])for(var fe=0;fe<de[I].length;fe++){var ye=oe[de[I][fe]];ye&&V.push(ye)}else de.helperType&&oe[de.helperType]?V.push(oe[de.helperType]):oe[de.name]&&V.push(oe[de.name]);for(var Xe=0;Xe<oe._global.length;Xe++){var $e=oe._global[Xe];$e.pred(de,this)&&le(V,$e.val)==-1&&V.push($e.val)}return V},getStateAfter:function(m,I){var V=this.doc;return m=q(V,m==null?V.first+V.size-1:m),kt(this,m+1,I).state},cursorCoords:function(m,I){var V,oe=this.doc.sel.primary();return m==null?V=oe.head:typeof m=="object"?V=F(this.doc,m):V=m?oe.from():oe.to(),Ci(this,V,I||"page")},charCoords:function(m,I){return to(this,F(this.doc,m),I||"page")},coordsChar:function(m,I){return m=ys(this,m,I||"page"),Li(this,m.left,m.top)},lineAtHeight:function(m,I){return m=ys(this,{top:m,left:0},I||"page").top,Sr(this.doc,m+this.display.viewOffset)},heightAtLine:function(m,I,V){var oe=!1,de;if(typeof m=="number"){var fe=this.doc.first+this.doc.size-1;m<this.doc.first?m=this.doc.first:m>fe&&(m=fe,oe=!0),de=jt(this.doc,m)}else de=m;return eo(this,de,{top:0,left:0},I||"page",V||oe).top+(oe?this.doc.height-Mn(de):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(m,I,V,oe,de){var fe=this.display;m=Ci(this,F(this.doc,m));var ye=m.bottom,Xe=m.left;if(I.style.position="absolute",I.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(I),fe.sizer.appendChild(I),oe=="over")ye=m.top;else if(oe=="above"||oe=="near"){var $e=Math.max(fe.wrapper.clientHeight,this.doc.height),yt=Math.max(fe.sizer.clientWidth,fe.lineSpace.clientWidth);(oe=="above"||m.bottom+I.offsetHeight>$e)&&m.top>I.offsetHeight?ye=m.top-I.offsetHeight:m.bottom+I.offsetHeight<=$e&&(ye=m.bottom),Xe+I.offsetWidth>yt&&(Xe=yt-I.offsetWidth)}I.style.top=ye+"px",I.style.left=I.style.right="",de=="right"?(Xe=fe.sizer.clientWidth-I.offsetWidth,I.style.right="0px"):(de=="left"?Xe=0:de=="middle"&&(Xe=(fe.sizer.clientWidth-I.offsetWidth)/2),I.style.left=Xe+"px"),V&&Cu(this,{left:Xe,top:ye,right:Xe+I.offsetWidth,bottom:ye+I.offsetHeight})},triggerOnKeyDown:ri(is),triggerOnKeyPress:ri(ql),triggerOnKeyUp:$l,triggerOnMouseDown:ri(as),execCommand:function(m){if(yo.hasOwnProperty(m))return yo[m].call(null,this)},triggerElectric:ri(function(m){Bo(this,m)}),findPosH:function(m,I,V,oe){var de=1;I<0&&(de=-1,I=-I);for(var fe=F(this.doc,m),ye=0;ye<I&&!(fe=us(this.doc,fe,de,V,oe),fe.hitSide);++ye);return fe},moveH:ri(function(m,I){var V=this;this.extendSelectionsBy(function(oe){return V.display.shift||V.doc.extend||oe.empty()?us(V.doc,oe.head,m,I,V.options.rtlMoveVisually):m<0?oe.from():oe.to()},Fe)}),deleteH:ri(function(m,I){var V=this.doc.sel,oe=this.doc;V.somethingSelected()?oe.replaceSelection("",null,"+delete"):Mi(this,function(de){var fe=us(oe,de.head,m,I,!1);return m<0?{from:fe,to:de.head}:{from:de.head,to:fe}})}),findPosV:function(m,I,V,oe){var de=1,fe=oe;I<0&&(de=-1,I=-I);for(var ye=F(this.doc,m),Xe=0;Xe<I;++Xe){var $e=Ci(this,ye,"div");if(fe==null?fe=$e.left:$e.left=fe,ye=du(this,$e,de,V),ye.hitSide)break}return ye},moveV:ri(function(m,I){var V=this,oe=this.doc,de=[],fe=!this.display.shift&&!oe.extend&&oe.sel.somethingSelected();if(oe.extendSelectionsBy(function(Xe){if(fe)return m<0?Xe.from():Xe.to();var $e=Ci(V,Xe.head,"div");Xe.goalColumn!=null&&($e.left=Xe.goalColumn),de.push($e.left);var yt=du(V,$e,m,I);return I=="page"&&Xe==oe.sel.primary()&&xs(V,to(V,yt,"div").top-$e.top),yt},Fe),de.length)for(var ye=0;ye<oe.sel.ranges.length;ye++)oe.sel.ranges[ye].goalColumn=de[ye]}),findWordAt:function(m){var I=this.doc,V=jt(I,m.line).text,oe=m.ch,de=m.ch;if(V){var fe=this.getHelper(m,"wordChars");(m.sticky=="before"||de==V.length)&&oe?--oe:++de;for(var ye=V.charAt(oe),Xe=re(ye,fe)?function($e){return re($e,fe)}:/\s/.test(ye)?function($e){return/\s/.test($e)}:function($e){return!/\s/.test($e)&&!re($e)};oe>0&&Xe(V.charAt(oe-1));)--oe;for(;de<V.length&&Xe(V.charAt(de));)++de}return new tn(he(m.line,oe),he(m.line,de))},toggleOverwrite:function(m){if(m!=null&&m==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?j(this.display.cursorDiv,"CodeMirror-overwrite"):c(this.display.cursorDiv,"CodeMirror-overwrite"),et(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==_()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ri(function(m,I){qi(this,m,I)}),getScrollInfo:function(){var m=this.display.scroller;return{left:m.scrollLeft,top:m.scrollTop,height:m.scrollHeight-Ii(this)-this.display.barHeight,width:m.scrollWidth-Ii(this)-this.display.barWidth,clientHeight:In(this),clientWidth:di(this)}},scrollIntoView:ri(function(m,I){m==null?(m={from:this.doc.sel.primary().head,to:null},I==null&&(I=this.options.cursorScrollMargin)):typeof m=="number"?m={from:he(m,0),to:null}:m.from==null&&(m={from:m,to:null}),m.to||(m.to=m.from),m.margin=I||0,m.from.line!=null?xu(this,m):yl(this,m.from,m.to,m.margin)}),setSize:ri(function(m,I){var V=this,oe=function(fe){return typeof fe=="number"||/^\d+$/.test(String(fe))?fe+"px":fe};m!=null&&(this.display.wrapper.style.width=oe(m)),I!=null&&(this.display.wrapper.style.height=oe(I)),this.options.lineWrapping&&pi(this);var de=this.display.viewFrom;this.doc.iter(de,this.display.viewTo,function(fe){if(fe.widgets){for(var ye=0;ye<fe.widgets.length;ye++)if(fe.widgets[ye].noHScroll){Ni(V,de,"widget");break}}++de}),this.curOp.forceUpdate=!0,et(this,"refresh",this)}),operation:function(m){return hi(this,m)},startOperation:function(){return ga(this)},endOperation:function(){return va(this)},refresh:ri(function(){var m=this.display.cachedTextHeight;ti(this),this.curOp.forceUpdate=!0,Ei(this),qi(this,this.doc.scrollLeft,this.doc.scrollTop),Bs(this.display),(m==null||Math.abs(m-ha(this.display))>.5||this.options.lineWrapping)&&Fo(this),et(this,"refresh",this)}),swapDoc:ri(function(m){var I=this.doc;return I.cm=null,this.state.selectingText&&this.state.selectingText(),kn(this,m),Ei(this),this.display.input.reset(),qi(this,m.scrollLeft,m.scrollTop),this.curOp.forceScroll=!0,Zr(this,"swapDoc",this,I),I}),phrase:function(m){var I=this.options.phrases;return I&&Object.prototype.hasOwnProperty.call(I,m)?I[m]:m},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}},Ue(e),e.registerHelper=function(m,I,V){y.hasOwnProperty(m)||(y[m]=e[m]={_global:[]}),y[m][I]=V},e.registerGlobalHelper=function(m,I,V,oe){e.registerHelper(m,I,oe),y[m]._global.push({pred:V,val:oe})}}function us(e,t,y,m,I){var V=t,oe=y,de=jt(e,t.line),fe=I&&e.direction=="rtl"?-y:y;function ye(){var Jt=t.line+fe;return Jt<e.first||Jt>=e.first+e.size?!1:(t=new he(Jt,t.ch,t.sticky),de=jt(e,Jt))}function Xe(Jt){var Xt;if(m=="codepoint"){var ir=de.text.charCodeAt(t.ch+(m>0?0:-1));isNaN(ir)?Xt=null:Xt=new he(t.line,Math.max(0,Math.min(de.text.length,t.ch+y*(ir>=55296&&ir<56320?2:1))),-y)}else I?Xt=Vs(e.cm,de,t,y):Xt=Gs(de,t,y);if(Xt==null)if(!Jt&&ye())t=ts(I,e.cm,de,t.line,fe);else return!1;else t=Xt;return!0}if(m=="char"||m=="codepoint")Xe();else if(m=="column")Xe(!0);else if(m=="word"||m=="group")for(var $e=null,yt=m=="group",ft=e.cm&&e.cm.getHelper(t,"wordChars"),Ut=!0;!(y<0&&!Xe(!Ut));Ut=!1){var Nt=de.text.charAt(t.ch)||`
|
|
`,Kt=re(Nt,ft)?"w":yt&&Nt==`
|
|
`?"n":!yt||/\s/.test(Nt)?null:"p";if(yt&&!Ut&&!Kt&&(Kt="s"),$e&&$e!=Kt){y<0&&(y=1,Xe(),t.sticky="after");break}if(Kt&&($e=Kt),y>0&&!Xe(!Ut))break}var Vt=Yo(e,t,V,oe,!0);return Re(V,Vt)&&(Vt.hitSide=!0),Vt}function du(e,t,y,m){var I=e.doc,V=t.left,oe;if(m=="page"){var de=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),fe=Math.max(de-.5*ha(e.display),3);oe=(y>0?t.bottom:t.top)+y*fe}else m=="line"&&(oe=y>0?t.bottom+3:t.top-3);for(var ye;!(ye=Li(e,V,oe),!ye.outside);){if(y<0?oe<=0:oe>=I.height){ye.hitSide=!0;break}oe+=y*5}return ye}var un=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Y,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};un.prototype.init=function(e){var t=this,y=this,m=y.cm,I=y.div=e.lineDiv;el(I,m.options.spellcheck,m.options.autocorrect,m.options.autocapitalize);function V(de){for(var fe=de.target;fe;fe=fe.parentNode){if(fe==I)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(fe.className))break}return!1}Pe(I,"paste",function(de){if(!V(de)||At(m,de)||wo(de,m))return;f<=11&&setTimeout(Pn(m,function(){return t.updateFromDOM()}),20)}),Pe(I,"compositionstart",function(de){t.composing={data:de.data,done:!1}}),Pe(I,"compositionupdate",function(de){t.composing||(t.composing={data:de.data,done:!1})}),Pe(I,"compositionend",function(de){t.composing&&(de.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Pe(I,"touchstart",function(){return y.forceCompositionEnd()}),Pe(I,"input",function(){t.composing||t.readFromDOMSoon()});function oe(de){if(!V(de)||At(m,de))return;if(m.somethingSelected())xo({lineWise:!1,text:m.getSelections()}),de.type=="cut"&&m.replaceSelection("",null,"cut");else if(m.options.lineWiseCopyCut){var fe=qs(m);xo({lineWise:!0,text:fe.text}),de.type=="cut"&&m.operation(function(){m.setSelections(fe.ranges,0,Ce),m.replaceSelection("",null,"cut")})}else return;if(de.clipboardData){de.clipboardData.clearData();var ye=xi.text.join(`
|
|
`);if(de.clipboardData.setData("Text",ye),de.clipboardData.getData("Text")==ye){de.preventDefault();return}}var Xe=Au(),$e=Xe.firstChild;m.display.lineSpace.insertBefore(Xe,m.display.lineSpace.firstChild),$e.value=xi.text.join(`
|
|
`);var yt=document.activeElement;Z($e),setTimeout(function(){m.display.lineSpace.removeChild(Xe),yt.focus(),yt==I&&y.showPrimarySelection()},50)}Pe(I,"copy",oe),Pe(I,"cut",oe)},un.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},un.prototype.prepareSelection=function(){var e=pl(this.cm,!1);return e.focus=document.activeElement==this.div,e},un.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},un.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},un.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,y=t.doc.sel.primary(),m=y.from(),I=y.to();if(t.display.viewTo==t.display.viewFrom||m.line>=t.display.viewTo||I.line<t.display.viewFrom){e.removeAllRanges();return}var V=zi(t,e.anchorNode,e.anchorOffset),oe=zi(t,e.focusNode,e.focusOffset);if(V&&!V.bad&&oe&&!oe.bad&&ge(Tt(V,oe),m)==0&&ge(Je(V,oe),I)==0)return;var de=t.display.view,fe=m.line>=t.display.viewFrom&&xa(t,m)||{node:de[0].measure.map[2],offset:0},ye=I.line<t.display.viewTo&&xa(t,I);if(!ye){var Xe=de[de.length-1].measure,$e=Xe.maps?Xe.maps[Xe.maps.length-1]:Xe.map;ye={node:$e[$e.length-1],offset:$e[$e.length-2]-$e[$e.length-3]}}if(!fe||!ye){e.removeAllRanges();return}var yt=e.rangeCount&&e.getRangeAt(0),ft;try{ft=T(fe.node,fe.offset,ye.offset,ye.node)}catch(Ut){}ft&&(!O&&t.state.focused?(e.collapse(fe.node,fe.offset),ft.collapsed||(e.removeAllRanges(),e.addRange(ft))):(e.removeAllRanges(),e.addRange(ft)),yt&&e.anchorNode==null?e.addRange(yt):O&&this.startGracePeriod()),this.rememberSelection()},un.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)},un.prototype.showMultipleSelections=function(e){a(this.cm.display.cursorDiv,e.cursors),a(this.cm.display.selectionDiv,e.selection)},un.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},un.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return w(this.div,t)},un.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},un.prototype.blur=function(){this.div.blur()},un.prototype.getField=function(){return this.div},un.prototype.supportsTouch=function(){return!0},un.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():hi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},un.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},un.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(o&&i&&this.cm.display.gutterSpecs.length&&hu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var y=zi(t,e.anchorNode,e.anchorOffset),m=zi(t,e.focusNode,e.focusOffset);y&&m&&hi(t,function(){Zn(t.doc,ea(y,m),Ce),(y.bad||m.bad)&&(t.curOp.selectionChanged=!0)})},un.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,y=e.doc.sel.primary(),m=y.from(),I=y.to();if(m.ch==0&&m.line>e.firstLine()&&(m=he(m.line-1,jt(e.doc,m.line-1).length)),I.ch==jt(e.doc,I.line).text.length&&I.line<e.lastLine()&&(I=he(I.line+1,0)),m.line<t.viewFrom||I.line>t.viewTo-1)return!1;var V,oe,de;m.line==t.viewFrom||(V=Zi(e,m.line))==0?(oe=hr(t.view[0].line),de=t.view[0].node):(oe=hr(t.view[V].line),de=t.view[V-1].node.nextSibling);var fe=Zi(e,I.line),ye,Xe;if(fe==t.view.length-1?(ye=t.viewTo-1,Xe=t.lineDiv.lastChild):(ye=hr(t.view[fe+1].line)-1,Xe=t.view[fe+1].node.previousSibling),!de)return!1;for(var $e=e.doc.splitLines(wa(e,de,Xe,oe,ye)),yt=Ir(e.doc,he(oe,0),he(ye,jt(e.doc,ye).text.length));$e.length>1&&yt.length>1;)if(tt($e)==tt(yt))$e.pop(),yt.pop(),ye--;else if($e[0]==yt[0])$e.shift(),yt.shift(),oe++;else break;for(var ft=0,Ut=0,Nt=$e[0],Kt=yt[0],Vt=Math.min(Nt.length,Kt.length);ft<Vt&&Nt.charCodeAt(ft)==Kt.charCodeAt(ft);)++ft;for(var Jt=tt($e),Xt=tt(yt),ir=Math.min(Jt.length-($e.length==1?ft:0),Xt.length-(yt.length==1?ft:0));Ut<ir&&Jt.charCodeAt(Jt.length-Ut-1)==Xt.charCodeAt(Xt.length-Ut-1);)++Ut;if($e.length==1&&yt.length==1&&oe==m.line)for(;ft&&ft>m.ch&&Jt.charCodeAt(Jt.length-Ut-1)==Xt.charCodeAt(Xt.length-Ut-1);)ft--,Ut++;$e[$e.length-1]=Jt.slice(0,Jt.length-Ut).replace(/^\u200b+/,""),$e[0]=$e[0].slice(ft).replace(/\u200b+$/,"");var xr=he(oe,ft),mr=he(ye,yt.length?tt(yt).length-Ut:0);if($e.length>1||$e[0]||ge(xr,mr))return Ha(e.doc,$e,xr,mr,"+input"),!0},un.prototype.ensurePolled=function(){this.forceCompositionEnd()},un.prototype.reset=function(){this.forceCompositionEnd()},un.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},un.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)},un.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&hi(this.cm,function(){return ti(e.cm)})},un.prototype.setUneditable=function(e){e.contentEditable="false"},un.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Pn(this.cm,$s)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},un.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},un.prototype.onContextMenu=function(){},un.prototype.resetPosition=function(){},un.prototype.needsContentAttribute=!0;function xa(e,t){var y=ca(e,t.line);if(!y||y.hidden)return null;var m=jt(e.doc,t.line),I=Gn(y,m,t.line),V=Ft(m,e.doc.direction),oe="left";if(V){var de=pt(V,t.ch);oe=de%2?"right":"left"}var fe=gs(I.map,t.ch,oe);return fe.offset=fe.collapse=="right"?fe.end:fe.start,fe}function hu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function wn(e,t){return t&&(e.bad=!0),e}function wa(e,t,y,m,I){var V="",oe=!1,de=e.doc.lineSeparator(),fe=!1;function ye(ft){return function(Ut){return Ut.id==ft}}function Xe(){oe&&(V+=de,fe&&(V+=de),oe=fe=!1)}function $e(ft){ft&&(Xe(),V+=ft)}function yt(ft){if(ft.nodeType==1){var Ut=ft.getAttribute("cm-text");if(Ut){$e(Ut);return}var Nt=ft.getAttribute("cm-marker"),Kt;if(Nt){var Vt=e.findMarks(he(m,0),he(I+1,0),ye(+Nt));Vt.length&&(Kt=Vt[0].find(0))&&$e(Ir(e.doc,Kt.from,Kt.to).join(de));return}if(ft.getAttribute("contenteditable")=="false")return;var Jt=/^(pre|div|p|li|table|br)$/i.test(ft.nodeName);if(!/^br$/i.test(ft.nodeName)&&ft.textContent.length==0)return;Jt&&Xe();for(var Xt=0;Xt<ft.childNodes.length;Xt++)yt(ft.childNodes[Xt]);/^(pre|p)$/i.test(ft.nodeName)&&(fe=!0),Jt&&(oe=!0)}else ft.nodeType==3&&$e(ft.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(yt(t),t==y);)t=t.nextSibling,fe=!1;return V}function zi(e,t,y){var m;if(t==e.display.lineDiv){if(m=e.display.lineDiv.childNodes[y],!m)return wn(e.clipPos(he(e.display.viewTo-1)),!0);t=null,y=0}else for(m=t;;m=m.parentNode){if(!m||m==e.display.lineDiv)return null;if(m.parentNode&&m.parentNode==e.display.lineDiv)break}for(var I=0;I<e.display.view.length;I++){var V=e.display.view[I];if(V.node==m)return sa(V,t,y)}}function sa(e,t,y){var m=e.text.firstChild,I=!1;if(!t||!w(m,t))return wn(he(hr(e.line),0),!0);if(t==m&&(I=!0,t=m.childNodes[y],y=0,!t)){var V=e.rest?tt(e.rest):e.line;return wn(he(hr(V),V.text.length),I)}var oe=t.nodeType==3?t:null,de=t;for(!oe&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(oe=t.firstChild,y&&(y=oe.nodeValue.length));de.parentNode!=m;)de=de.parentNode;var fe=e.measure,ye=fe.maps;function Xe(Kt,Vt,Jt){for(var Xt=-1;Xt<(ye?ye.length:0);Xt++)for(var ir=Xt<0?fe.map:ye[Xt],xr=0;xr<ir.length;xr+=3){var mr=ir[xr+2];if(mr==Kt||mr==Vt){var Pr=hr(Xt<0?e.line:e.rest[Xt]),yn=ir[xr]+Jt;return(Jt<0||mr!=Kt)&&(yn=ir[xr+(Jt?1:0)]),he(Pr,yn)}}}var $e=Xe(oe,de,y);if($e)return wn($e,I);for(var yt=de.nextSibling,ft=oe?oe.nodeValue.length-y:0;yt;yt=yt.nextSibling){if($e=Xe(yt,yt.firstChild,0),$e)return wn(he($e.line,$e.ch-ft),I);ft+=yt.textContent.length}for(var Ut=de.previousSibling,Nt=y;Ut;Ut=Ut.previousSibling){if($e=Xe(Ut,Ut.firstChild,-1),$e)return wn(he($e.line,$e.ch+Nt),I);Nt+=Ut.textContent.length}}var fn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Y,this.hasSelection=!1,this.composing=null};fn.prototype.init=function(e){var t=this,y=this,m=this.cm;this.createField(e);var I=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),E&&(I.style.width="0px"),Pe(I,"input",function(){D&&f>=9&&t.hasSelection&&(t.hasSelection=null),y.poll()}),Pe(I,"paste",function(oe){if(At(m,oe)||wo(oe,m))return;m.state.pasteIncoming=+new Date,y.fastPoll()});function V(oe){if(At(m,oe))return;if(m.somethingSelected())xo({lineWise:!1,text:m.getSelections()});else if(m.options.lineWiseCopyCut){var de=qs(m);xo({lineWise:!0,text:de.text}),oe.type=="cut"?m.setSelections(de.ranges,null,Ce):(y.prevInput="",I.value=de.text.join(`
|
|
`),Z(I))}else return;oe.type=="cut"&&(m.state.cutIncoming=+new Date)}Pe(I,"cut",V),Pe(I,"copy",V),Pe(e.scroller,"paste",function(oe){if(Bi(e,oe)||At(m,oe))return;if(!I.dispatchEvent){m.state.pasteIncoming=+new Date,y.focus();return}var de=new Event("paste");de.clipboardData=oe.clipboardData,I.dispatchEvent(de)}),Pe(e.lineSpace,"selectstart",function(oe){Bi(e,oe)||me(oe)}),Pe(I,"compositionstart",function(){var oe=m.getCursor("from");y.composing&&y.composing.range.clear(),y.composing={start:oe,range:m.markText(oe,m.getCursor("to"),{className:"CodeMirror-composing"})}}),Pe(I,"compositionend",function(){y.composing&&(y.poll(),y.composing.range.clear(),y.composing=null)})},fn.prototype.createField=function(e){this.wrapper=Au(),this.textarea=this.wrapper.firstChild},fn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},fn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,y=e.doc,m=pl(e);if(e.options.moveInputWithCursor){var I=Ci(e,y.sel.primary().head,"div"),V=t.wrapper.getBoundingClientRect(),oe=t.lineDiv.getBoundingClientRect();m.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,I.top+oe.top-V.top)),m.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,I.left+oe.left-V.left))}return m},fn.prototype.showSelection=function(e){var t=this.cm,y=t.display;a(y.cursorDiv,e.cursors),a(y.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},fn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var y=t.getSelection();this.textarea.value=y,t.state.focused&&Z(this.textarea),D&&f>=9&&(this.hasSelection=y)}else e||(this.prevInput=this.textarea.value="",D&&f>=9&&(this.hasSelection=null))},fn.prototype.getField=function(){return this.textarea},fn.prototype.supportsTouch=function(){return!1},fn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||_()!=this.textarea))try{this.textarea.focus()}catch(e){}},fn.prototype.blur=function(){this.textarea.blur()},fn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},fn.prototype.receivedFocus=function(){this.slowPoll()},fn.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()})},fn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function y(){var m=t.poll();!m&&!e?(e=!0,t.polling.set(60,y)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,y)},fn.prototype.poll=function(){var e=this,t=this.cm,y=this.textarea,m=this.prevInput;if(this.contextMenuPending||!t.state.focused||it(y)&&!m&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var I=y.value;if(I==m&&!t.somethingSelected())return!1;if(D&&f>=9&&this.hasSelection===I||s&&/[\uf700-\uf7ff]/.test(I))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var V=I.charCodeAt(0);if(V==8203&&!m&&(m="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var oe=0,de=Math.min(m.length,I.length);oe<de&&m.charCodeAt(oe)==I.charCodeAt(oe);)++oe;return hi(t,function(){$s(t,I.slice(oe),m.length-oe,null,e.composing?"*compose":null),I.length>1e3||I.indexOf(`
|
|
`)>-1?y.value=e.prevInput="":e.prevInput=I,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},fn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},fn.prototype.onKeyPress=function(){D&&f>=9&&(this.hasSelection=null),this.fastPoll()},fn.prototype.onContextMenu=function(e){var t=this,y=t.cm,m=y.display,I=t.textarea;t.contextMenuPending&&t.contextMenuPending();var V=Ji(y,e),oe=m.scroller.scrollTop;if(!V||l)return;var de=y.options.resetSelectionOnContextMenu;de&&y.doc.sel.contains(V)==-1&&Pn(y,Zn)(y.doc,ea(V),Ce);var fe=I.style.cssText,ye=t.wrapper.style.cssText,Xe=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",I.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-Xe.top-5)+"px; left: "+(e.clientX-Xe.left-5)+`px;
|
|
z-index: 1000; background: `+(D?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var $e;b&&($e=window.scrollY),m.input.focus(),b&&window.scrollTo(null,$e),m.input.reset(),y.somethingSelected()||(I.value=t.prevInput=" "),t.contextMenuPending=ft,m.selForContextMenu=y.doc.sel,clearTimeout(m.detectingSelectAll);function yt(){if(I.selectionStart!=null){var Nt=y.somethingSelected(),Kt="\u200B"+(Nt?I.value:"");I.value="\u21DA",I.value=Kt,t.prevInput=Nt?"":"\u200B",I.selectionStart=1,I.selectionEnd=Kt.length,m.selForContextMenu=y.doc.sel}}function ft(){if(t.contextMenuPending!=ft)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=ye,I.style.cssText=fe,D&&f<9&&m.scrollbars.setScrollTop(m.scroller.scrollTop=oe),I.selectionStart!=null){(!D||D&&f<9)&&yt();var Nt=0,Kt=function(){m.selForContextMenu==y.doc.sel&&I.selectionStart==0&&I.selectionEnd>0&&t.prevInput=="\u200B"?Pn(y,Nl)(y):Nt++<10?m.detectingSelectAll=setTimeout(Kt,500):(m.selForContextMenu=null,m.input.reset())};m.detectingSelectAll=setTimeout(Kt,200)}}if(D&&f>=9&&yt(),M){Oe(e);var Ut=function(){vt(window,"mouseup",Ut),setTimeout(ft,20)};Pe(window,"mouseup",Ut)}else setTimeout(ft,50)},fn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},fn.prototype.setUneditable=function(){},fn.prototype.needsContentAttribute=!1;function So(e,t){if(t=t?G(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var y=_();t.autofocus=y==e||e.getAttribute("autofocus")!=null&&y==document.body}function m(){e.value=de.getValue()}var I;if(e.form&&(Pe(e.form,"submit",m),!t.leaveSubmitMethodAlone)){var V=e.form;I=V.submit;try{var oe=V.submit=function(){m(),V.submit=I,V.submit(),V.submit=oe}}catch(fe){}}t.finishInit=function(fe){fe.save=m,fe.getTextArea=function(){return e},fe.toTextArea=function(){fe.toTextArea=isNaN,m(),e.parentNode.removeChild(fe.getWrapperElement()),e.style.display="",e.form&&(vt(e.form,"submit",m),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=I))}},e.style.display="none";var de=En(function(fe){return e.parentNode.insertBefore(fe,e.nextSibling)},t);return de}function Wi(e){e.off=vt,e.on=Pe,e.wheelEventPixels=Ll,e.Doc=ni,e.splitLines=dt,e.countColumn=te,e.findColumn=Ve,e.isWordChar=$,e.Pass=Be,e.signal=et,e.Line=gn,e.changeEnd=ta,e.scrollbarModel=El,e.Pos=he,e.cmpPos=ge,e.modes=ht,e.mimeModes=ot,e.resolveMode=rt,e.getMode=st,e.modeExtensions=St,e.extendMode=It,e.copyState=Qt,e.startState=vr,e.innerMode=gr,e.commands=yo,e.keyMap=ji,e.keyName=zs,e.isModifierKey=Xl,e.lookupKey=Ea,e.normalizeKeyMap=Vu,e.StringStream=cr,e.SharedTextMarker=ja,e.TextMarker=_i,e.LineWidget=po,e.e_preventDefault=me,e.e_stopPropagation=ve,e.e_stop=Oe,e.addClass=j,e.contains=w,e.rmClass=c,e.keyNames=aa}eA(En),cu(En);var fu="iter insert remove copy getEditor constructor".split(" ");for(var To in ni.prototype)ni.prototype.hasOwnProperty(To)&&le(fu,To)<0&&(En.prototype[To]=function(e){return function(){return e.apply(this.doc,arguments)}}(ni.prototype[To]));return Ue(ni),En.inputStyles={textarea:fn,contenteditable:un},En.defineMode=function(e){!En.defaults.mode&&e!="null"&&(En.defaults.mode=e),Bt.apply(this,arguments)},En.defineMIME=wt,En.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),En.defineMIME("text/plain","null"),En.defineExtension=function(e,t){En.prototype[e]=t},En.defineDocExtension=function(e,t){ni.prototype[e]=t},En.fromTextArea=So,Wi(En),En.version="5.58.2",En})},WaYH:function(qe,ue,k){"use strict";var J=k("rePB"),N=k("Ff2n"),O=k("VTBJ"),Q=k("1OyB"),R=k("vuIU"),B=k("JX7q"),D=k("Ji7U"),f=k("LK+K"),b=k("q1tI"),g=k("TSYQ"),i=k.n(g),l=k("sboe"),v=k("OZM5"),h=function(M){var C=M.prefixCls,c=M.level,r=M.isStart,a=M.isEnd;if(!c)return null;for(var A="".concat(C,"-indent-unit"),L=[],T=0;T<c;T+=1){var w;L.push(b.createElement("span",{key:T,className:i()(A,(w={},Object(J.a)(w,"".concat(A,"-start"),r[T+1]),Object(J.a)(w,"".concat(A,"-end"),a[T+1]),Object(J.a)(w,"".concat(A,"-end-first-level"),!T&&a[0]),w))}))}return b.createElement("span",{"aria-hidden":"true",className:"".concat(C,"-indent")},L)},d=h,E=k("815F"),o="open",n="close",s="---",u=function(x){Object(D.a)(C,x);var M=Object(f.a)(C);function C(){var c;return Object(Q.a)(this,C),c=M.apply(this,arguments),c.state={dragNodeHighlight:!1},c.onSelectorClick=function(r){var a=c.props.context.onNodeClick;a(r,Object(E.b)(c.props)),c.isSelectable()?c.onSelect(r):c.onCheck(r)},c.onSelectorDoubleClick=function(r){var a=c.props.context.onNodeDoubleClick;a(r,Object(E.b)(c.props))},c.onSelect=function(r){if(c.isDisabled())return;var a=c.props.context.onNodeSelect;r.preventDefault(),a(r,Object(E.b)(c.props))},c.onCheck=function(r){if(c.isDisabled())return;var a=c.props,A=a.disableCheckbox,L=a.checked,T=c.props.context.onNodeCheck;if(!c.isCheckable()||A)return;r.preventDefault();var w=!L;T(r,Object(E.b)(c.props),w)},c.onMouseEnter=function(r){var a=c.props.context.onNodeMouseEnter;a(r,Object(E.b)(c.props))},c.onMouseLeave=function(r){var a=c.props.context.onNodeMouseLeave;a(r,Object(E.b)(c.props))},c.onContextMenu=function(r){var a=c.props.context.onNodeContextMenu;a(r,Object(E.b)(c.props))},c.onDragStart=function(r){var a=c.props.context.onNodeDragStart;r.stopPropagation(),c.setState({dragNodeHighlight:!0}),a(r,Object(B.a)(c));try{r.dataTransfer.setData("text/plain","")}catch(A){}},c.onDragEnter=function(r){var a=c.props.context.onNodeDragEnter;r.preventDefault(),r.stopPropagation(),a(r,Object(B.a)(c))},c.onDragOver=function(r){var a=c.props.context.onNodeDragOver;r.preventDefault(),r.stopPropagation(),a(r,Object(B.a)(c))},c.onDragLeave=function(r){var a=c.props.context.onNodeDragLeave;r.stopPropagation(),a(r,Object(B.a)(c))},c.onDragEnd=function(r){var a=c.props.context.onNodeDragEnd;r.stopPropagation(),c.setState({dragNodeHighlight:!1}),a(r,Object(B.a)(c))},c.onDrop=function(r){var a=c.props.context.onNodeDrop;r.preventDefault(),r.stopPropagation(),c.setState({dragNodeHighlight:!1}),a(r,Object(B.a)(c))},c.onExpand=function(r){var a=c.props.context.onNodeExpand;a(r,Object(E.b)(c.props))},c.setSelectHandle=function(r){c.selectHandle=r},c.getNodeState=function(){var r=c.props.expanded;return c.isLeaf()?null:r?o:n},c.hasChildren=function(){var r=c.props.eventKey,a=c.props.context.keyEntities,A=a[r]||{},L=A.children;return!!(L||[]).length},c.isLeaf=function(){var r=c.props,a=r.isLeaf,A=r.loaded,L=c.props.context.loadData,T=c.hasChildren();return a===!1?!1:a||!L&&!T||L&&A&&!T},c.isDisabled=function(){var r=c.props.disabled,a=c.props.context.disabled;return!!(a||r)},c.isCheckable=function(){var r=c.props.checkable,a=c.props.context.checkable;return!a||r===!1?!1:a},c.syncLoadData=function(r){var a=r.expanded,A=r.loading,L=r.loaded,T=c.props.context,w=T.loadData,_=T.onNodeLoad;if(A)return;w&&a&&!c.isLeaf()&&(!c.hasChildren()&&!L&&_(Object(E.b)(c.props)))},c.renderSwitcher=function(){var r=c.props,a=r.expanded,A=r.switcherIcon,L=c.props.context,T=L.prefixCls,w=L.switcherIcon,_=A||w;if(c.isLeaf())return b.createElement("span",{className:i()("".concat(T,"-switcher"),"".concat(T,"-switcher-noop"))},typeof _=="function"?_(Object(O.a)(Object(O.a)({},c.props),{},{isLeaf:!0})):_);var j=i()("".concat(T,"-switcher"),"".concat(T,"-switcher_").concat(a?o:n));return b.createElement("span",{onClick:c.onExpand,className:j},typeof _=="function"?_(Object(O.a)(Object(O.a)({},c.props),{},{isLeaf:!1})):_)},c.renderCheckbox=function(){var r=c.props,a=r.checked,A=r.halfChecked,L=r.disableCheckbox,T=c.props.context.prefixCls,w=c.isDisabled(),_=c.isCheckable();if(!_)return null;var j=typeof _!="boolean"?_:null;return b.createElement("span",{className:i()("".concat(T,"-checkbox"),a&&"".concat(T,"-checkbox-checked"),!a&&A&&"".concat(T,"-checkbox-indeterminate"),(w||L)&&"".concat(T,"-checkbox-disabled")),onClick:c.onCheck},j)},c.renderIcon=function(){var r=c.props.loading,a=c.props.context.prefixCls;return b.createElement("span",{className:i()("".concat(a,"-iconEle"),"".concat(a,"-icon__").concat(c.getNodeState()||"docu"),r&&"".concat(a,"-icon_loading"))})},c.renderSelector=function(){var r=c.state.dragNodeHighlight,a=c.props,A=a.title,L=a.selected,T=a.icon,w=a.loading,_=a.data,j=c.props.context,W=j.prefixCls,Z=j.showIcon,X=j.icon,G=j.draggable,te=j.loadData,Y=j.titleRender,le=c.isDisabled(),Ae="".concat(W,"-node-content-wrapper"),Be;if(Z){var Ce=T||X;Be=Ce?b.createElement("span",{className:i()("".concat(W,"-iconEle"),"".concat(W,"-icon__customize"))},typeof Ce=="function"?Ce(c.props):Ce):c.renderIcon()}else te&&w&&(Be=c.renderIcon());var Se;typeof A=="function"?Se=A(_):Y?Se=Y(_):Se=A;var Fe=b.createElement("span",{className:"".concat(W,"-title")},Se);return b.createElement("span",{ref:c.setSelectHandle,title:typeof A=="string"?A:"",className:i()("".concat(Ae),"".concat(Ae,"-").concat(c.getNodeState()||"normal"),!le&&(L||r)&&"".concat(W,"-node-selected"),!le&&G&&"draggable"),draggable:!le&&G||void 0,"aria-grabbed":!le&&G||void 0,onMouseEnter:c.onMouseEnter,onMouseLeave:c.onMouseLeave,onContextMenu:c.onContextMenu,onClick:c.onSelectorClick,onDoubleClick:c.onSelectorDoubleClick,onDragStart:G?c.onDragStart:void 0},Be,Fe)},c}return Object(R.a)(C,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var r=this.props.selectable,a=this.props.context.selectable;return typeof r=="boolean"?r:a}},{key:"render",value:function(){var r,a=this.props,A=a.eventKey,L=a.className,T=a.style,w=a.dragOver,_=a.dragOverGapTop,j=a.dragOverGapBottom,W=a.isLeaf,Z=a.isStart,X=a.isEnd,G=a.expanded,te=a.selected,Y=a.checked,le=a.halfChecked,Ae=a.loading,Be=a.domRef,Ce=a.active,Se=a.onMouseMove,Fe=Object(N.a)(a,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ve=this.props.context,De=Ve.prefixCls,Le=Ve.filterTreeNode,tt=Ve.draggable,Et=Ve.keyEntities,Ie=this.isDisabled(),Qe=Object(v.f)(Fe),xe=Et[A]||{},ie=xe.level,$=X[X.length-1];return b.createElement("div",Object.assign({ref:Be,className:i()(L,"".concat(De,"-treenode"),(r={},Object(J.a)(r,"".concat(De,"-treenode-disabled"),Ie),Object(J.a)(r,"".concat(De,"-treenode-switcher-").concat(G?"open":"close"),!W),Object(J.a)(r,"".concat(De,"-treenode-checkbox-checked"),Y),Object(J.a)(r,"".concat(De,"-treenode-checkbox-indeterminate"),le),Object(J.a)(r,"".concat(De,"-treenode-selected"),te),Object(J.a)(r,"".concat(De,"-treenode-loading"),Ae),Object(J.a)(r,"".concat(De,"-treenode-active"),Ce),Object(J.a)(r,"".concat(De,"-treenode-leaf-last"),$),Object(J.a)(r,"drag-over",!Ie&&w),Object(J.a)(r,"drag-over-gap-top",!Ie&&_),Object(J.a)(r,"drag-over-gap-bottom",!Ie&&j),Object(J.a)(r,"filter-node",Le&&Le(Object(E.b)(this.props))),r)),style:T,onDragEnter:tt?this.onDragEnter:void 0,onDragOver:tt?this.onDragOver:void 0,onDragLeave:tt?this.onDragLeave:void 0,onDrop:tt?this.onDrop:void 0,onDragEnd:tt?this.onDragEnd:void 0,onMouseMove:Se},Qe),b.createElement(d,{prefixCls:De,level:ie,isStart:Z,isEnd:X}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),C}(b.Component),p=function(M){return b.createElement(l.a.Consumer,null,function(C){return b.createElement(u,Object.assign({},M,{context:C}))})};p.displayName="TreeNode",p.defaultProps={title:s},p.isTreeNode=1;var S=ue.a=p},Xm8N:function(qe,ue,k){"use strict";var J=k("2qtc"),N=k("kLXV"),O=k("k1fw"),Q=k("miYZ"),R=k("tsqr"),B=k("9og8"),D=k("PpiC"),f=k("WmNS"),b=k.n(f),g=k("q1tI"),i=k.n(g),l=k("ErOA"),v=k("Ty5D"),h=k("9kvl"),d=function(o){var n=o.shixunHomeworks,s=o.dispatch,u=Object(D.a)(o,["shixunHomeworks","dispatch"]),p=Object(v.i)();return i.a.createElement(N.a,{centered:!0,title:"\u63D0\u793A",visible:n.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(B.a)(b.a.mark(function S(){var x;return b.a.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,Object(l.a)("/api/myshixuns/".concat(n.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:p.coursesId}});case 2:x=C.sent,x.shixun_identifier&&(R.b.success("\u64CD\u4F5C\u6210\u529F"),s({type:"shixunHomeworks/setActionTabs",payload:{}}),s({type:"shixunHomeworks/getWorkList",payload:Object(O.a)({},n.actionTabs.params)}));case 4:case"end":return C.stop()}},S)})),onCancel:function(){s({type:"shixunHomeworks/setActionTabs",payload:{}})}},i.a.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),i.a.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};ue.a=Object(h.a)(function(E){var o=E.shixunHomeworks;return{shixunHomeworks:o}})(d)},Xmg4:function(qe,ue,k){var J=k("bYtY"),N=k("LPTA"),O=N.devicePixelRatio,Q=k("K2GJ"),R=k("3C/r");function B(){return!1}function D(g,i,l){var v=J.createCanvas(),h=i.getWidth(),d=i.getHeight(),E=v.style;return E&&(E.position="absolute",E.left=0,E.top=0,E.width=h+"px",E.height=d+"px",v.setAttribute("data-zr-dom-id",g)),v.width=h*l,v.height=d*l,v}var f=function(g,i,l){var v;l=l||O,typeof g=="string"?v=D(g,i,l):J.isObject(g)&&(v=g,g=v.id),this.id=g,this.dom=v;var h=v.style;h&&(v.onselectstart=B,h["-webkit-user-select"]="none",h["user-select"]="none",h["-webkit-touch-callout"]="none",h["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",h.padding=0,h.margin=0,h["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=i,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=l};f.prototype={constructor:f,__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 g=this.dpr;this.domBack=D("back-"+this.id,this.painter,g),this.ctxBack=this.domBack.getContext("2d"),g!==1&&this.ctxBack.scale(g,g)},resize:function(g,i){var l=this.dpr,v=this.dom,h=v.style,d=this.domBack;h&&(h.width=g+"px",h.height=i+"px"),v.width=g*l,v.height=i*l,d&&(d.width=g*l,d.height=i*l,l!==1&&this.ctxBack.scale(l,l))},clear:function(g,i){var l=this.dom,v=this.ctx,h=l.width,d=l.height,i=i||this.clearColor,E=this.motionBlur&&!g,o=this.lastFrameAlpha,n=this.dpr;if(E&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(l,0,0,h/n,d/n)),v.clearRect(0,0,h,d),i&&i!=="transparent"){var s;i.colorStops?(s=i.__canvasGradient||Q.getGradient(v,i,{x:0,y:0,width:h,height:d}),i.__canvasGradient=s):i.image&&(s=R.prototype.getCanvasPattern.call(i,v)),v.save(),v.fillStyle=s||i,v.fillRect(0,0,h,d),v.restore()}if(E){var u=this.domBack;v.save(),v.globalAlpha=o,v.drawImage(u,0,0,h,d),v.restore()}}};var b=f;qe.exports=b},Xnb7:function(qe,ue,k){var J=k("1RvN"),N=new J(50);function O(D){if(typeof D=="string"){var f=N.get(D);return f&&f.image}else return D}function Q(D,f,b,g,i){if(D)if(typeof D=="string"){if(f&&f.__zrImageSrc===D||!b)return f;var l=N.get(D),v={hostEl:b,cb:g,cbPayload:i};return l?(f=l.image,!B(f)&&l.pending.push(v)):(f=new Image,f.onload=f.onerror=R,N.put(D,f.__cachedImgObj={image:f,pending:[v]}),f.src=f.__zrImageSrc=D),f}else return D;else return f}function R(){var D=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var f=0;f<D.pending.length;f++){var b=D.pending[f],g=b.cb;g&&g(this,b.cbPayload),b.hostEl.dirty()}D.pending.length=0}function B(D){return D&&D.width&&D.height}ue.findExistImage=O,ue.createOrUpdateImage=Q,ue.isImageReady=B},Y1PL:function(qe,ue,k){"use strict";k.r(ue),k.d(ue,"ResizableTextArea",function(){return le});var J=k("wx14"),N=k("1OyB"),O=k("vuIU"),Q=k("Ji7U"),R=k("LK+K"),B=k("q1tI"),D=k("VTBJ"),f=k("rePB"),b=k("Zm9Q"),g=k("Kwbf"),i=k("c+Xe"),l=k("m+aA"),v=k("bdgK"),h=new Map;function d(Ce){Ce.forEach(function(Se){var Fe,Ve=Se.target;(Fe=h.get(Ve))===null||Fe===void 0||Fe.forEach(function(De){return De(Ve)})})}var E=new v.default(d),o=null,n=null;function s(Ce,Se){h.has(Ce)||(h.set(Ce,new Set),E.observe(Ce)),h.get(Ce).add(Se)}function u(Ce,Se){h.has(Ce)&&(h.get(Ce).delete(Se),h.get(Ce).size||(E.unobserve(Ce),h.delete(Ce)))}var p=function(Ce){Object(Q.a)(Fe,Ce);var Se=Object(R.a)(Fe);function Fe(){return Object(N.a)(this,Fe),Se.apply(this,arguments)}return Object(O.a)(Fe,[{key:"render",value:function(){return this.props.children}}]),Fe}(B.Component),S=B.createContext(null);function x(Ce){var Se=Ce.children,Fe=Ce.onBatchResize,Ve=B.useRef(0),De=B.useRef([]),Le=B.useContext(S),tt=B.useCallback(function(Et,Ie,Qe){Ve.current+=1;var xe=Ve.current;De.current.push({size:Et,element:Ie,data:Qe}),Promise.resolve().then(function(){xe===Ve.current&&(Fe==null||Fe(De.current),De.current=[])}),Le==null||Le(Et,Ie,Qe)},[Fe,Le]);return B.createElement(S.Provider,{value:tt},Se)}function M(Ce){var Se=Ce.children,Fe=Ce.disabled,Ve=B.useRef(null),De=B.useRef(null),Le=B.useContext(S),tt=B.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Et=B.isValidElement(Se)&&Object(i.c)(Se),Ie=Et?Se.ref:null,Qe=B.useMemo(function(){return Object(i.a)(Ie,Ve)},[Ie,Ve]),xe=B.useRef(Ce);xe.current=Ce;var ie=B.useCallback(function($){var re=xe.current,ce=re.onResize,be=re.data,Me=$.getBoundingClientRect(),ke=Me.width,ct=Me.height,ut=$.offsetWidth,mt=$.offsetHeight,pt=Math.floor(ke),Ot=Math.floor(ct);if(tt.current.width!==pt||tt.current.height!==Ot||tt.current.offsetWidth!==ut||tt.current.offsetHeight!==mt){var Ft={width:pt,height:Ot,offsetWidth:ut,offsetHeight:mt};tt.current=Ft;var He=ut===Math.round(ke)?ke:ut,Pe=mt===Math.round(ct)?ct:mt,at=Object(D.a)(Object(D.a)({},Ft),{},{offsetWidth:He,offsetHeight:Pe});Le==null||Le(at,$,be),ce&&Promise.resolve().then(function(){ce(at,$)})}},[]);return B.useEffect(function(){var $=Object(l.a)(Ve.current)||Object(l.a)(De.current);return $&&!Fe&&s($,ie),function(){return u($,ie)}},[Ve.current,Fe]),B.createElement(p,{ref:De},Et?B.cloneElement(Se,{ref:Qe}):Se)}var C="rc-observer-key";function c(Ce){var Se=Ce.children,Fe=Object(b.a)(Se);return Fe.map(function(Ve,De){var Le=(Ve==null?void 0:Ve.key)||"".concat(C,"-").concat(De);return B.createElement(M,Object(J.a)({},Ce,{key:Le}),Ve)})}c.Collection=x;var r=c,a=k("bT9E"),A=k("TSYQ"),L=k.n(A),T=`
|
|
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
|
|
`,w=["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"],_={},j;function W(Ce){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Ce.getAttribute("id")||Ce.getAttribute("data-reactid")||Ce.getAttribute("name");if(Se&&_[Fe])return _[Fe];var Ve=window.getComputedStyle(Ce),De=Ve.getPropertyValue("box-sizing")||Ve.getPropertyValue("-moz-box-sizing")||Ve.getPropertyValue("-webkit-box-sizing"),Le=parseFloat(Ve.getPropertyValue("padding-bottom"))+parseFloat(Ve.getPropertyValue("padding-top")),tt=parseFloat(Ve.getPropertyValue("border-bottom-width"))+parseFloat(Ve.getPropertyValue("border-top-width")),Et=w.map(function(Qe){return"".concat(Qe,":").concat(Ve.getPropertyValue(Qe))}).join(";"),Ie={sizingStyle:Et,paddingSize:Le,borderSize:tt,boxSizing:De};return Se&&Fe&&(_[Fe]=Ie),Ie}function Z(Ce){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;j||(j=document.createElement("textarea"),j.setAttribute("tab-index","-1"),j.setAttribute("aria-hidden","true"),document.body.appendChild(j)),Ce.getAttribute("wrap")?j.setAttribute("wrap",Ce.getAttribute("wrap")):j.removeAttribute("wrap");var De=W(Ce,Se),Le=De.paddingSize,tt=De.borderSize,Et=De.boxSizing,Ie=De.sizingStyle;j.setAttribute("style","".concat(Ie,";").concat(T)),j.value=Ce.value||Ce.placeholder||"";var Qe=Number.MIN_SAFE_INTEGER,xe=Number.MAX_SAFE_INTEGER,ie=j.scrollHeight,$;if(Et==="border-box"?ie+=tt:Et==="content-box"&&(ie-=Le),Fe!==null||Ve!==null){j.value=" ";var re=j.scrollHeight-Le;Fe!==null&&(Qe=re*Fe,Et==="border-box"&&(Qe=Qe+Le+tt),ie=Math.max(Qe,ie)),Ve!==null&&(xe=re*Ve,Et==="border-box"&&(xe=xe+Le+tt),$=ie>xe?"":"hidden",ie=Math.min(xe,ie))}return{height:ie,minHeight:Qe,maxHeight:xe,overflowY:$,resize:"none"}}var X=k("Gytx"),G=k.n(X),te;(function(Ce){Ce[Ce.NONE=0]="NONE",Ce[Ce.RESIZING=1]="RESIZING",Ce[Ce.RESIZED=2]="RESIZED"})(te||(te={}));var Y=function(Ce){Object(Q.a)(Fe,Ce);var Se=Object(R.a)(Fe);function Fe(Ve){var De;return Object(N.a)(this,Fe),De=Se.call(this,Ve),De.nextFrameActionId=void 0,De.resizeFrameId=void 0,De.textArea=void 0,De.saveTextArea=function(Le){De.textArea=Le},De.handleResize=function(Le){var tt=De.state.resizeStatus,Et=De.props,Ie=Et.autoSize,Qe=Et.onResize;if(tt!==te.NONE)return;typeof Qe=="function"&&Qe(Le),Ie&&De.resizeOnNextFrame()},De.resizeOnNextFrame=function(){cancelAnimationFrame(De.nextFrameActionId),De.nextFrameActionId=requestAnimationFrame(De.resizeTextarea)},De.resizeTextarea=function(){var Le=De.props.autoSize;if(!Le||!De.textArea)return;var tt=Le.minRows,Et=Le.maxRows,Ie=Z(De.textArea,!1,tt,Et);De.setState({textareaStyles:Ie,resizeStatus:te.RESIZING},function(){cancelAnimationFrame(De.resizeFrameId),De.resizeFrameId=requestAnimationFrame(function(){De.setState({resizeStatus:te.RESIZED},function(){De.resizeFrameId=requestAnimationFrame(function(){De.setState({resizeStatus:te.NONE}),De.fixFirefoxAutoScroll()})})})})},De.renderTextArea=function(){var Le=De.props,tt=Le.prefixCls,Et=tt===void 0?"rc-textarea":tt,Ie=Le.autoSize,Qe=Le.onResize,xe=Le.className,ie=Le.disabled,$=De.state,re=$.textareaStyles,ce=$.resizeStatus,be=Object(a.a)(De.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Me=L()(Et,xe,Object(f.a)({},"".concat(Et,"-disabled"),ie));"value"in be&&(be.value=be.value||"");var ke=Object(D.a)(Object(D.a)(Object(D.a)({},De.props.style),re),ce===te.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return B.createElement(r,{onResize:De.handleResize,disabled:!(Ie||Qe)},B.createElement("textarea",Object(J.a)({},be,{className:Me,style:ke,ref:De.saveTextArea})))},De.state={textareaStyles:{},resizeStatus:te.NONE},De}return Object(O.a)(Fe,[{key:"componentDidUpdate",value:function(De){(De.value!==this.props.value||!G()(De.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 De=this.textArea.selectionStart,Le=this.textArea.selectionEnd;this.textArea.setSelectionRange(De,Le)}}catch(tt){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Fe}(B.Component),le=Y,Ae=function(Ce){Object(Q.a)(Fe,Ce);var Se=Object(R.a)(Fe);function Fe(Ve){var De;Object(N.a)(this,Fe),De=Se.call(this,Ve),De.resizableTextArea=void 0,De.focus=function(){De.resizableTextArea.textArea.focus()},De.saveTextArea=function(tt){De.resizableTextArea=tt},De.handleChange=function(tt){var Et=De.props.onChange;De.setValue(tt.target.value,function(){De.resizableTextArea.resizeTextarea()}),Et&&Et(tt)},De.handleKeyDown=function(tt){var Et=De.props,Ie=Et.onPressEnter,Qe=Et.onKeyDown;tt.keyCode===13&&Ie&&Ie(tt),Qe&&Qe(tt)};var Le=typeof Ve.value=="undefined"||Ve.value===null?Ve.defaultValue:Ve.value;return De.state={value:Le},De}return Object(O.a)(Fe,[{key:"setValue",value:function(De,Le){"value"in this.props||this.setState({value:De},Le)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return B.createElement(le,Object(J.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(De){return"value"in De?{value:De.value}:null}}]),Fe}(B.Component),Be=ue.default=Ae},YH21:function(qe,ue,k){var J=k("H6uX");ue.Dispatcher=J;var N=k("ItGF"),O=k("Ze12"),Q=O.isCanvasEl,R=O.transformCoordWithViewport,B=typeof window!="undefined"&&!!window.addEventListener,D=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,f=[];function b(n,s,u,p){return u=u||{},p||!N.canvasSupported?g(n,s,u):N.browser.firefox&&s.layerX!=null&&s.layerX!==s.offsetX?(u.zrX=s.layerX,u.zrY=s.layerY):s.offsetX!=null?(u.zrX=s.offsetX,u.zrY=s.offsetY):g(n,s,u),u}function g(n,s,u){if(N.domSupported&&n.getBoundingClientRect){var p=s.clientX,S=s.clientY;if(Q(n)){var x=n.getBoundingClientRect();u.zrX=p-x.left,u.zrY=S-x.top;return}else if(R(f,n,p,S)){u.zrX=f[0],u.zrY=f[1];return}}u.zrX=u.zrY=0}function i(n){return n||window.event}function l(n,s,u){if(s=i(s),s.zrX!=null)return s;var p=s.type,S=p&&p.indexOf("touch")>=0;if(!S)b(n,s,s,u),s.zrDelta=s.wheelDelta?s.wheelDelta/120:-(s.detail||0)/3;else{var x=p!=="touchend"?s.targetTouches[0]:s.changedTouches[0];x&&b(n,x,s,u)}var M=s.button;return s.which==null&&M!==void 0&&D.test(s.type)&&(s.which=M&1?1:M&2?3:M&4?2:0),s}function v(n,s,u,p){B?n.addEventListener(s,u,p):n.attachEvent("on"+s,u)}function h(n,s,u,p){B?n.removeEventListener(s,u,p):n.detachEvent("on"+s,u)}var d=B?function(n){n.preventDefault(),n.stopPropagation(),n.cancelBubble=!0}:function(n){n.returnValue=!1,n.cancelBubble=!0};function E(n){return n.which===2||n.which===3}function o(n){return n.which>1}ue.clientToLocal=b,ue.getNativeEvent=i,ue.normalizeEvent=l,ue.addEventListener=v,ue.removeEventListener=h,ue.stop=d,ue.isMiddleOrRightButtonOnMouseUpDown=E,ue.notLeftMouse=o},YgsL:function(qe,ue,k){var J=k("QBsz"),N=J.distance;function O(R,B,D,f,b,g,i){var l=(D-R)*.5,v=(f-B)*.5;return(2*(B-D)+l+v)*i+(-3*(B-D)-2*l-v)*g+l*b+B}function Q(R,B){for(var D=R.length,f=[],b=0,g=1;g<D;g++)b+=N(R[g-1],R[g]);var i=b/2;i=i<D?D:i;for(var g=0;g<i;g++){var l=g/(i-1)*(B?D:D-1),v=Math.floor(l),h=l-v,d,E=R[v%D],o,n;B?(d=R[(v-1+D)%D],o=R[(v+1)%D],n=R[(v+2)%D]):(d=R[v===0?v:v-1],o=R[v>D-2?D-1:v+1],n=R[v>D-3?D-1:v+2]);var s=h*h,u=h*s;f.push([O(d[0],E[0],o[0],n[0],h,s,u),O(d[1],E[1],o[1],n[1],h,s,u)])}return f}qe.exports=Q},ZW9T:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return r});var J=k("k1fw"),N=k("oBTY"),O=k("9og8"),Q=k("miYZ"),R=k("tsqr"),B=k("rAM+"),D=k("tJVT"),f=k("PpiC"),b=k("WmNS"),g=k.n(b),i=k("q1tI"),l=k.n(i),v=k("bdgK");function h(a,A,L,T,w){var _=A.getWordUntilPosition(L),j={startLineNumber:L.lineNumber,endLineNumber:L.lineNumber,startColumn:_.startColumn,endColumn:_.endColumn},W=T.map(function(Z){return{label:Z,kind:a.languages.CompletionItemKind.Keyword,insertText:Z,insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:j}});return w.map(function(Z){W.push(Object(J.a)(Object(J.a)({},Z),{},{range:j}))}),W}var d=function(a){var A={label:"ifelse",kind:a.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},L=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];a.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(j,W){var Z=h(a,j,W,L,[A]);return{suggestions:Z}}});var T=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];a.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(j,W){var Z=[{label:"print",kind:a.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet}],X=h(a,j,W,T,Z);return{suggestions:X}}});var w=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];a.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(j,W){var Z=[A,{label:"main",kind:a.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:a.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet}],X=h(a,j,W,w,Z);return{suggestions:X}}})},E="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",o=k("fjLI"),n=k("LvDl"),s=k("+ua5");function u(a){return/^\d+$/.test(a)?"".concat(a,"px"):a}function p(){}var S=!1,x={"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",Scala:"scale"};function M(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=a;if(Array.isArray(a)){for(var L=0;L<a.length;L++){var T=x[a[L]];if(T)return T}return A[0]}return x[A]||A}var C=null,c=ue.b=function(a){var A=a.width,L=A===void 0?"100%":A,T=a.height,w=T===void 0?"100%":T,_=a.value,j=a.language,W=j===void 0?"javascript":j,Z=a.style,X=Z===void 0?{}:Z,G=a.options,te=G===void 0?{}:G,Y=a.overrideServices,le=Y===void 0?{}:Y,Ae=a.theme,Be=Ae===void 0?"vs-dark":Ae,Ce=a.onEditBlur,Se=a.onSave,Fe=a.autoHeight,Ve=Fe===void 0?!1:Fe,De=a.forbidCopy,Le=De===void 0?!1:De,tt=a.onChange,Et=tt===void 0?p:tt,Ie=a.editorDidMount,Qe=Ie===void 0?p:Ie,xe=a.onFocus,ie=xe===void 0?p:xe,$=a.onBreakPoint,re=$===void 0?p:$,ce=a.breakPointValue,be=ce===void 0?[]:ce,Me=a.filename,ke=Me===void 0?"educoder.txt":Me,ct=a.errorLine,ut=a.errorContent,mt=ut===void 0?"":ut,pt=a.highlightLine,Ot=a.openBreakPoint,Ft=Ot===void 0?!1:Ot,He=Object(f.a)(a,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint"]),Pe=Object(i.useRef)(),at=Object(i.useRef)({}),vt=Object(i.useRef)(),et=Object(i.useRef)(),At=Object(i.useRef)([]),je=Object(i.useRef)(!1),_e=Object(i.useRef)(),Ue=Object(i.useState)(!1),me=Object(D.a)(Ue,2),ve=me[0],Ee=me[1];function Oe(){var st;return Pe.current&&(st=new v.default(function(St){var It=Object(B.a)(St),Qt;try{for(It.s();!(Qt=It.n()).done;){var gr=Qt.value;(gr.target.offsetHeight>0||gr.target.offsetWidth>0)&&at.current.instance.layout()}}catch(vr){It.e(vr)}finally{It.f()}}),st.observe(Pe.current)),st}function Ye(){R.b.warn({content:decodeURIComponent(E),key:"monaco-editor-tip"})}var ze=function(){var St=at.current.instance;if(_!=null&&St&&ve){var It=St.getModel();It&&_!==It.getValue()&&(S=!0,It.setValue(_),St.layout(),S=!1)}};Object(i.useEffect)(function(){try{var st,St=at.current.instance;et.current&&clearTimeout(et.current),et.current=setTimeout(function(){ze()},500),St==null||((st=St.updateOptions)===null||st===void 0)||st.call(St,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(_.split(/\r\n|\r|\n/g).length))+3,5)})}catch(It){debugger}},[_,ve,at.current]),Object(i.useEffect)(function(){try{if(ct&&at.current&&at.current.instance){var st=at.current.instance;st.changeViewZones(function(It){var Qt=document.createElement("div");Qt.style.padding="10px 20px",Qt.style.width="calc(100% - 20px)",Qt.className="my-error-line-wrp",Qt.innerHTML=mt,It.addZone({afterLineNumber:ct||11,heightInLines:3,domNode:Qt})});var St={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(St),st.revealPositionInCenter({lineNumber:20,column:1})}}catch(It){debugger}},[ct,at.current,ve]),Object(i.useEffect)(function(){var st;if((st=at.current)!==null&&st!==void 0&&st.instance&&ve&&Ft){var St=at.current.instance,It=St.getModel();if(!It)return;var Qt=function(){var ge=[],Re=[],Ze=It.getAllDecorations(),Je=Object(B.a)(Ze),Tt;try{for(Je.s();!(Tt=Je.n()).done;){var q=Tt.value;if(q.options.className==="highlighted-line"){var F;ge.push(q==null||((F=q.range)===null||F===void 0)?void 0:F.startLineNumber),Re.push(q==null?void 0:q.id)}}}catch(ee){Je.e(ee)}finally{Je.f()}It.deltaDecorations(Re,[]);var P=It.getLineCount();!!pt&&pt<=P&&(St.deltaDecorations([],[{range:new C.Range(pt,1,pt,It.getLineMaxColumn(pt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),St.revealLineInCenter(pt))};Qt();var gr=function(){var ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Re=[],Ze=[],Je=It.getAllDecorations(),Tt=Object(B.a)(Je),q;try{for(Tt.s();!(q=Tt.n()).done;){var F=q.value;if(F.options.linesDecorationsClassName==="breakpoints"){var P;Re.push(F==null||((P=F.range)===null||P===void 0)?void 0:P.startLineNumber),Ze.push(F==null?void 0:F.id)}}}catch(ee){Tt.e(ee)}finally{Tt.f()}if(ge)return{lines:Re,ids:Ze};re(Re)},vr=function(){var he=Object(O.a)(g.a.mark(function ge(Re){var Ze;return g.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:return Ze={range:new C.Range(Re,1,Re,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}},Tt.next=3,It.deltaDecorations([],[Ze]);case 3:gr();case 4:case"end":return Tt.stop()}},ge)}));return function(Re){return he.apply(this,arguments)}}(),cr=function(){var he=Object(O.a)(g.a.mark(function ge(Re){var Ze,Je,Tt,q,F;return g.a.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:Ze=[],Je=St.getLineDecorations(Re),Tt=Object(B.a)(Je);try{for(Tt.s();!(q=Tt.n()).done;)F=q.value,F.options.linesDecorationsClassName==="breakpoints"&&Ze.push(F.id)}catch(ae){Tt.e(ae)}finally{Tt.f()}return ee.next=6,It.deltaDecorations(Ze,[]);case 6:gr();case 7:case"end":return ee.stop()}},ge)}));return function(Re){return he.apply(this,arguments)}}(),jt=function(ge){var Re=St.getLineDecorations(ge),Ze=Object(B.a)(Re),Je;try{for(Ze.s();!(Je=Ze.n()).done;){var Tt=Je.value;if(Tt.options.linesDecorationsClassName==="breakpoints")return!0}}catch(q){Ze.e(q)}finally{Ze.f()}return!1};if(!Object(n.isEqual)(be,gr(!0).lines)){It.deltaDecorations(gr(!0).ids,[]);var Ir=be.map(function(he){return{range:new C.Range(he,1,he,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints"}}});It.deltaDecorations([],Ir)}var kr=St.onDidChangeModelContent(function(he){var ge=St.getPosition();if(ge){var Re=ge.lineNumber;It.getLineContent(Re).trim()===""?cr(Re):jt(Re)&&(cr(Re),vr(Re))}}),_r=St.onMouseDown(function(he){var ge,Re,Ze;if(he.target.detail&&(ge=he.target)!==null&&ge!==void 0&&(Re=ge.element)!==null&&Re!==void 0&&(Ze=Re.className)!==null&&Ze!==void 0&&Ze.includes("line-numbers")){var Je=he.target.position.lineNumber;if(It.getLineContent(Je).trim()==="")return;jt(Je)?cr(Je):vr(Je)}}),hr=function(ge){var Re={range:new C.Range(ge,1,ge,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};At.current=St.deltaDecorations(At.current,[Re])},Sr=function(){At.current=St.deltaDecorations(At.current,[])},sn=St.onMouseMove(function(he){var ge,Re,Ze;if(Sr(),he.target.detail&&(ge=he.target)!==null&&ge!==void 0&&(Re=ge.element)!==null&&Re!==void 0&&(Ze=Re.className)!==null&&Ze!==void 0&&Ze.includes("line-numbers")){var Je=he.target.position.lineNumber;if(It.getLineContent(Je).trim()==="")return;hr(Je)}}),en=St.onMouseLeave(function(){Sr()});return function(){kr.dispose(),_r.dispose(),sn.dispose(),en.dispose()}}},[at.current,ve,be,pt,Ft]);function gt(){var st=at.current.instance;if(st){var St=st.getSelection(),It=at.current.pastePos||{},Qt=new C.Range(It.startLineNumber||St.endLineNumber,It.startColumn||St.endColumn,It.endLineNumber||St.endLineNumber,It.endColumn||St.endColumn);setTimeout(function(){st.executeEdits("",[{range:Qt,text:""}])},300)}}function Lt(st){(window.navigator.platform.match("Mac")?st.metaKey:st.ctrlKey)&&st.keyCode==83&&(st.preventDefault(),Se())}var Pt=function(){if(Ve&&at.current.instance){var St=at.current.instance.getContentHeight();wt(St<w?w:St)}else wt(w)};function Rt(st){var St=document.createEvent("MouseEvents");St.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),st.dispatchEvent(St)}var Dt=function(St){var It=St.keyCode,Qt=St.ctrlKey,gr=St.metaKey,vr=St.target,cr=St.type;return(cr==="paste"||(It===67||It===86)&&(gr||Qt))&&vr.nodeName==="TEXTAREA"&&(Ye(),St.preventDefault()),!1};function dt(st,St){var It=window.URL||window.webkitURL||window,Qt=new Blob([St]),gr=document.createElementNS("http://www.w3.org/1999/xhtml","a");gr.href=It.createObjectURL(Qt),gr.download=st,Rt(gr)}Object(i.useEffect)(function(){Pt()},[Pt]),Object(i.useEffect)(function(){Pe.current&&!ve&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(st){try{C=st,at.current.instance=C.editor.create(Pe.current,{value:_,language:M(W),theme:Be,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},le);var St=at.current.instance,It=o.c._menuItems,Qt=Object(N.a)(It).find(function(vr){return vr[0]._debugName=="EditorContext"});if(Qe(St,C),setTimeout(function(){Pt(),at.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){dt(ke||"educoder.txt",St.getValue())}}),St.getDomNode().addEventListener("input",function(){vt.current.autoFormat&&St.getAction("editor.action.formatDocument").run()})},500),at.current.subscription=St.onDidChangeModelContent(function(vr){debugger;je.current?clearTimeout(_e.current):(Pt(),Et(St.getValue(),vr)),_e.current=setTimeout(function(){je.current=!1},500)}),window.Monaco||d(C,M(W)),Le&&(Pe.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Dt),window.removeEventListener("paste",Dt),window.addEventListener("keydown",Dt),window.addEventListener("paste",Dt)),window.Monaco=C,Ce&&St.onDidBlurEditorWidget(function(){Ce(St.getValue())}),ie&&St.onDidFocusEditorText(function(){ie(St.getValue())}),Le)try{window.addEventListener("paste",gt)}catch(vr){}var gr=Oe();return Ee(!0),function(){var vr=at.current.instance;vr.dispose();var cr=vr.getModel();cr&&cr.dispose(),at.current.subscription&&at.current.subscription.dispose(),Le&&window.removeEventListener("paste",gt),gr.unobserve(Pe.current)}}catch(vr){debugger}})},[]),Object(i.useEffect)(function(){var st=at.current.instance;if(st&&ve)return document.addEventListener("keydown",Lt,!1),function(){document.removeEventListener("keydown",Lt)}},[Se,ve]),Object(i.useEffect)(function(){var st=at.current.instance;if(st&&ve){var St=M(W);C.editor.setModelLanguage(st.getModel(),St)}},[W,ve]),Object(i.useEffect)(function(){var st=at.current.instance;st&&ve&&C.editor.setTheme(Be)},[Be,ve]),Object(i.useEffect)(function(){var st=at.current.instance;vt.current=te,st&&ve&&(st.updateOptions(Object(J.a)({},te)),setTimeout(function(){st.getModel().updateOptions(Object(J.a)({},te))},200))},[JSON.stringify(te),ve]),Object(i.useEffect)(function(){var st=at.current.instance;st&&ve&&st.layout()},[L,w,ve]);var it=Object(i.useState)(u(L)),nt=Object(D.a)(it,2),we=nt[0],Ne=nt[1],ht=Object(i.useState)(u(w)),ot=Object(D.a)(ht,2),Bt=ot[0],wt=ot[1],rt=Object(J.a)(Object(J.a)({},X),{},{width:we,height:Bt});return l.a.createElement("div",{className:"my-monaco-editor",ref:Pe,style:rt})};function r(a){var A=a.width,L=A===void 0?"100%":A,T=a.height,w=T===void 0?"100%":T,_=a.original,j=a.modified,W=a.language,Z=a.options,X=Z===void 0?{}:Z,G=Object(i.useRef)(),te=Object(i.useState)(null),Y=Object(D.a)(te,2),le=Y[0],Ae=Y[1];function Be(Ve){var De;return G.current&&(De=new v.default(function(Le){var tt=Object(B.a)(Le),Et;try{for(tt.s();!(Et=tt.n()).done;){var Ie=Et.value;(Ie.target.offsetHeight>0||Ie.target.offsetWidth>0)&&Ve.layout()}}catch(Qe){tt.e(Qe)}finally{tt.f()}}),De.observe(G.current)),De}Object(i.useEffect)(function(){return G.current&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(Ve){C=Ve;var De=C.editor.createDiffEditor(G.current,Object(J.a)(Object(J.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},X),{},{wordWrap:!0}));Ae(De);var Le=Be(De);return function(){De.dispose();var tt=De.getModel();tt&&tt.dispose(),Le.unobserve(G.current)}}),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}},[]),Object(i.useEffect)(function(){le&&le.setModel({original:C.editor.createModel(_,W),modified:C.editor.createModel(j,W)})},[_,j,W,le]);var Ce=u(L),Se=u(w),Fe={width:Ce,height:Se};return l.a.createElement("div",{className:"my-diff-editor",ref:G,style:Fe})}},Ze12:function(qe,ue,k){var J=k("ItGF"),N=k("hOwI"),O=N.buildTransformer,Q="___zrEVENTSAVED",R=[];function B(i,l,v,h,d){return D(R,l,h,d,!0)&&D(i,v,R[0],R[1])}function D(i,l,v,h,d){if(l.getBoundingClientRect&&J.domSupported&&!g(l)){var E=l[Q]||(l[Q]={}),o=f(l,E),n=b(o,E,d);if(n)return n(i,v,h),!0}return!1}function f(i,l){var v=l.markers;if(v)return v;v=l.markers=[];for(var h=["left","right"],d=["top","bottom"],E=0;E<4;E++){var o=document.createElement("div"),n=o.style,s=E%2,u=(E>>1)%2;n.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",h[s]+":0",d[u]+":0",h[1-s]+":auto",d[1-u]+":auto",""].join("!important;"),i.appendChild(o),v.push(o)}return v}function b(i,l,v){for(var h=v?"invTrans":"trans",d=l[h],E=l.srcCoords,o=!0,n=[],s=[],u=0;u<4;u++){var p=i[u].getBoundingClientRect(),S=2*u,x=p.left,M=p.top;n.push(x,M),o=o&&E&&x===E[S]&&M===E[S+1],s.push(i[u].offsetLeft,i[u].offsetTop)}return o&&d?d:(l.srcCoords=n,l[h]=v?O(s,n):O(n,s))}function g(i){return i.nodeName.toUpperCase()==="CANVAS"}ue.transformLocalCoord=B,ue.transformCoordWithViewport=D,ue.isCanvasEl=g},ZpRC:function(qe,ue,k){"use strict";function J(i){return typeof i=="object"&&i!=null&&i.nodeType===1}function N(i,l){return(!l||i!=="hidden")&&i!=="visible"&&i!=="clip"}function O(i,l){if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){var v=getComputedStyle(i,null);return N(v.overflowY,l)||N(v.overflowX,l)||function(h){var d=function(E){if(!E.ownerDocument||!E.ownerDocument.defaultView)return null;try{return E.ownerDocument.defaultView.frameElement}catch(o){return null}}(h);return!!d&&(d.clientHeight<h.scrollHeight||d.clientWidth<h.scrollWidth)}(i)}return!1}function Q(i,l,v,h,d,E,o,n){return E<i&&o>l||E>i&&o<l?0:E<=i&&n<=v||o>=l&&n>=v?E-i-h:o>l&&n<v||E<i&&n>v?o-l+d:0}var R=function(i,l){var v=window,h=l.scrollMode,d=l.block,E=l.inline,o=l.boundary,n=l.skipOverflowHiddenElements,s=typeof o=="function"?o:function(re){return re!==o};if(!J(i))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,p=[],S=i;J(S)&&s(S);){if((S=S.parentElement)===u){p.push(S);break}S!=null&&S===document.body&&O(S)&&!O(document.documentElement)||S!=null&&O(S,n)&&p.push(S)}for(var x=v.visualViewport?v.visualViewport.width:innerWidth,M=v.visualViewport?v.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,c=window.scrollY||pageYOffset,r=i.getBoundingClientRect(),a=r.height,A=r.width,L=r.top,T=r.right,w=r.bottom,_=r.left,j=d==="start"||d==="nearest"?L:d==="end"?w:L+a/2,W=E==="center"?_+A/2:E==="end"?T:_,Z=[],X=0;X<p.length;X++){var G=p[X],te=G.getBoundingClientRect(),Y=te.height,le=te.width,Ae=te.top,Be=te.right,Ce=te.bottom,Se=te.left;if(h==="if-needed"&&L>=0&&_>=0&&w<=M&&T<=x&&L>=Ae&&w<=Ce&&_>=Se&&T<=Be)return Z;var Fe=getComputedStyle(G),Ve=parseInt(Fe.borderLeftWidth,10),De=parseInt(Fe.borderTopWidth,10),Le=parseInt(Fe.borderRightWidth,10),tt=parseInt(Fe.borderBottomWidth,10),Et=0,Ie=0,Qe="offsetWidth"in G?G.offsetWidth-G.clientWidth-Ve-Le:0,xe="offsetHeight"in G?G.offsetHeight-G.clientHeight-De-tt:0;if(u===G)Et=d==="start"?j:d==="end"?j-M:d==="nearest"?Q(c,c+M,M,De,tt,c+j,c+j+a,a):j-M/2,Ie=E==="start"?W:E==="center"?W-x/2:E==="end"?W-x:Q(C,C+x,x,Ve,Le,C+W,C+W+A,A),Et=Math.max(0,Et+c),Ie=Math.max(0,Ie+C);else{Et=d==="start"?j-Ae-De:d==="end"?j-Ce+tt+xe:d==="nearest"?Q(Ae,Ce,Y,De,tt+xe,j,j+a,a):j-(Ae+Y/2)+xe/2,Ie=E==="start"?W-Se-Ve:E==="center"?W-(Se+le/2)+Qe/2:E==="end"?W-Be+Le+Qe:Q(Se,Be,le,Ve,Le+Qe,W,W+A,A);var ie=G.scrollLeft,$=G.scrollTop;j+=$-(Et=Math.max(0,Math.min($+Et,G.scrollHeight-Y+xe))),W+=ie-(Ie=Math.max(0,Math.min(ie+Ie,G.scrollWidth-le+Qe)))}Z.push({el:G,top:Et,left:Ie})}return Z};function B(i){return i===Object(i)&&Object.keys(i).length!==0}function D(i,l){l===void 0&&(l="auto");var v="scrollBehavior"in document.body.style;i.forEach(function(h){var d=h.el,E=h.top,o=h.left;d.scroll&&v?d.scroll({top:E,left:o,behavior:l}):(d.scrollTop=E,d.scrollLeft=o)})}function f(i){return i===!1?{block:"end",inline:"nearest"}:B(i)?i:{block:"start",inline:"nearest"}}function b(i,l){var v=!i.ownerDocument.documentElement.contains(i);if(B(l)&&typeof l.behavior=="function")return l.behavior(v?[]:R(i,l));if(v)return;var h=f(l);return D(R(i,h),h.behavior)}var g=ue.a=b},aKvl:function(qe,ue,k){var J=k("Sj9i"),N=J.quadraticProjectPoint;function O(Q,R,B,D,f,b,g,i,l){if(g===0)return!1;var v=g;if(l>R+v&&l>D+v&&l>b+v||l<R-v&&l<D-v&&l<b-v||i>Q+v&&i>B+v&&i>f+v||i<Q-v&&i<B-v&&i<f-v)return!1;var h=N(Q,R,B,D,f,b,i,l,null);return h<=v/2}ue.containStroke=O},aX58:function(qe,ue,k){var J=k("3gBT"),N=k("ItGF"),O=k("bYtY"),Q=k("0s+r"),R=k("r6Bn"),B=k("7SHv"),D=k("MKOG"),f=k("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 b=!N.canvasSupported,g={canvas:B},i={},l="4.3.1";function v(s,u){var p=new n(J(),s,u);return i[p.id]=p,p}function h(s){if(s)s.dispose();else{for(var u in i)i.hasOwnProperty(u)&&i[u].dispose();i={}}return this}function d(s){return i[s]}function E(s,u){g[s]=u}function o(s){delete i[s]}var n=function(s,u,p){p=p||{},this.dom=u,this.id=s;var S=this,x=new R,M=p.renderer;if(b){if(!g.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");M="vml"}else(!M||!g[M])&&(M="canvas");var C=new g[M](u,x,p,s);this.storage=x,this.painter=C;var c=!N.node&&!N.worker?new f(C.getViewportRoot(),C.root):null;this.handler=new Q(x,C,c,C.root),this.animation=new D({stage:{update:O.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var r=x.delFromStorage,a=x.addToStorage;x.delFromStorage=function(A){r.call(x,A),A&&A.removeSelfFromZr(S)},x.addToStorage=function(A){a.call(x,A),A.addSelfToZr(S)}};n.prototype={constructor:n,getId:function(){return this.id},add:function(s){this.storage.addRoot(s),this._needsRefresh=!0},remove:function(s){this.storage.delRoot(s),this._needsRefresh=!0},configLayer:function(s,u){this.painter.configLayer&&this.painter.configLayer(s,u),this._needsRefresh=!0},setBackgroundColor:function(s){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(s),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 s;this._needsRefresh&&(s=!0,this.refreshImmediately()),this._needsRefreshHover&&(s=!0,this.refreshHoverImmediately()),s&&this.trigger("rendered")},addHover:function(s,u){if(this.painter.addHover){var p=this.painter.addHover(s,u);return this.refreshHover(),p}},removeHover:function(s){this.painter.removeHover&&(this.painter.removeHover(s),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(s){s=s||{},this.painter.resize(s.width,s.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(s,u){return this.painter.pathToImage(s,u)},setCursorStyle:function(s){this.handler.setCursorStyle(s)},findHover:function(s,u){return this.handler.findHover(s,u)},on:function(s,u,p){this.handler.on(s,u,p)},off:function(s,u){this.handler.off(s,u)},trigger:function(s,u){this.handler.trigger(s,u)},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,o(this.id)}},ue.version=l,ue.init=v,ue.dispose=h,ue.getInstance=d,ue.registerPainter=E},bT9E:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return N});var J=k("VTBJ");function N(O,Q){var R=Object(J.a)({},O);return Array.isArray(Q)&&Q.forEach(function(B){delete R[B]}),R}},bYtY:function(qe,ue){var k={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},J={"[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},N=Object.prototype.toString,O=Array.prototype,Q=O.forEach,R=O.filter,B=O.slice,D=O.map,f=O.reduce,b={};function g(Ie,Qe){Ie==="createCanvas"&&(o=null),b[Ie]=Qe}function i(Ie){if(Ie==null||typeof Ie!="object")return Ie;var Qe=Ie,xe=N.call(Ie);if(xe==="[object Array]"){if(!Ve(Ie)){Qe=[];for(var ie=0,$=Ie.length;ie<$;ie++)Qe[ie]=i(Ie[ie])}}else if(J[xe]){if(!Ve(Ie)){var re=Ie.constructor;if(Ie.constructor.from)Qe=re.from(Ie);else{Qe=new re(Ie.length);for(var ie=0,$=Ie.length;ie<$;ie++)Qe[ie]=i(Ie[ie])}}}else if(!k[xe]&&!Ve(Ie)&&!Z(Ie)){Qe={};for(var ce in Ie)Ie.hasOwnProperty(ce)&&(Qe[ce]=i(Ie[ce]))}return Qe}function l(Ie,Qe,xe){if(!_(Qe)||!_(Ie))return xe?i(Qe):Ie;for(var ie in Qe)if(Qe.hasOwnProperty(ie)){var $=Ie[ie],re=Qe[ie];_(re)&&_($)&&!L(re)&&!L($)&&!Z(re)&&!Z($)&&!j(re)&&!j($)&&!Ve(re)&&!Ve($)?l($,re,xe):(xe||!(ie in Ie))&&(Ie[ie]=i(Qe[ie],!0))}return Ie}function v(Ie,Qe){for(var xe=Ie[0],ie=1,$=Ie.length;ie<$;ie++)xe=l(xe,Ie[ie],Qe);return xe}function h(Ie,Qe){for(var xe in Qe)Qe.hasOwnProperty(xe)&&(Ie[xe]=Qe[xe]);return Ie}function d(Ie,Qe,xe){for(var ie in Qe)Qe.hasOwnProperty(ie)&&(xe?Qe[ie]!=null:Ie[ie]==null)&&(Ie[ie]=Qe[ie]);return Ie}var E=function(){return b.createCanvas()};b.createCanvas=function(){return document.createElement("canvas")};var o;function n(){return o||(o=E().getContext("2d")),o}function s(Ie,Qe){if(Ie){if(Ie.indexOf)return Ie.indexOf(Qe);for(var xe=0,ie=Ie.length;xe<ie;xe++)if(Ie[xe]===Qe)return xe}return-1}function u(Ie,Qe){var xe=Ie.prototype;function ie(){}ie.prototype=Qe.prototype,Ie.prototype=new ie;for(var $ in xe)xe.hasOwnProperty($)&&(Ie.prototype[$]=xe[$]);Ie.prototype.constructor=Ie,Ie.superClass=Qe}function p(Ie,Qe,xe){Ie="prototype"in Ie?Ie.prototype:Ie,Qe="prototype"in Qe?Qe.prototype:Qe,d(Ie,Qe,xe)}function S(Ie){return Ie?typeof Ie=="string"?!1:typeof Ie.length=="number":void 0}function x(Ie,Qe,xe){if(!(Ie&&Qe))return;if(Ie.forEach&&Ie.forEach===Q)Ie.forEach(Qe,xe);else if(Ie.length===+Ie.length)for(var ie=0,$=Ie.length;ie<$;ie++)Qe.call(xe,Ie[ie],ie,Ie);else for(var re in Ie)Ie.hasOwnProperty(re)&&Qe.call(xe,Ie[re],re,Ie)}function M(Ie,Qe,xe){if(!(Ie&&Qe))return;if(Ie.map&&Ie.map===D)return Ie.map(Qe,xe);for(var ie=[],$=0,re=Ie.length;$<re;$++)ie.push(Qe.call(xe,Ie[$],$,Ie));return ie}function C(Ie,Qe,xe,ie){if(!(Ie&&Qe))return;if(Ie.reduce&&Ie.reduce===f)return Ie.reduce(Qe,xe,ie);for(var $=0,re=Ie.length;$<re;$++)xe=Qe.call(ie,xe,Ie[$],$,Ie);return xe}function c(Ie,Qe,xe){if(!(Ie&&Qe))return;if(Ie.filter&&Ie.filter===R)return Ie.filter(Qe,xe);for(var ie=[],$=0,re=Ie.length;$<re;$++)Qe.call(xe,Ie[$],$,Ie)&&ie.push(Ie[$]);return ie}function r(Ie,Qe,xe){if(!(Ie&&Qe))return;for(var ie=0,$=Ie.length;ie<$;ie++)if(Qe.call(xe,Ie[ie],ie,Ie))return Ie[ie]}function a(Ie,Qe){var xe=B.call(arguments,2);return function(){return Ie.apply(Qe,xe.concat(B.call(arguments)))}}function A(Ie){var Qe=B.call(arguments,1);return function(){return Ie.apply(this,Qe.concat(B.call(arguments)))}}function L(Ie){return N.call(Ie)==="[object Array]"}function T(Ie){return typeof Ie=="function"}function w(Ie){return N.call(Ie)==="[object String]"}function _(Ie){var Qe=typeof Ie;return Qe==="function"||!!Ie&&Qe==="object"}function j(Ie){return!!k[N.call(Ie)]}function W(Ie){return!!J[N.call(Ie)]}function Z(Ie){return typeof Ie=="object"&&typeof Ie.nodeType=="number"&&typeof Ie.ownerDocument=="object"}function X(Ie){return Ie!==Ie}function G(Ie){for(var Qe=0,xe=arguments.length;Qe<xe;Qe++)if(arguments[Qe]!=null)return arguments[Qe]}function te(Ie,Qe){return Ie!=null?Ie:Qe}function Y(Ie,Qe,xe){return Ie!=null?Ie:Qe!=null?Qe:xe}function le(){return Function.call.apply(B,arguments)}function Ae(Ie){if(typeof Ie=="number")return[Ie,Ie,Ie,Ie];var Qe=Ie.length;return Qe===2?[Ie[0],Ie[1],Ie[0],Ie[1]]:Qe===3?[Ie[0],Ie[1],Ie[2],Ie[1]]:Ie}function Be(Ie,Qe){if(!Ie)throw new Error(Qe)}function Ce(Ie){return Ie==null?null:typeof Ie.trim=="function"?Ie.trim():Ie.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Se="__ec_primitive__";function Fe(Ie){Ie[Se]=!0}function Ve(Ie){return Ie[Se]}function De(Ie){var Qe=L(Ie);this.data={};var xe=this;Ie instanceof De?Ie.each(ie):Ie&&x(Ie,ie);function ie($,re){Qe?xe.set($,re):xe.set(re,$)}}De.prototype={constructor:De,get:function(Ie){return this.data.hasOwnProperty(Ie)?this.data[Ie]:null},set:function(Ie,Qe){return this.data[Ie]=Qe},each:function(Ie,Qe){Qe!==void 0&&(Ie=a(Ie,Qe));for(var xe in this.data)this.data.hasOwnProperty(xe)&&Ie(this.data[xe],xe)},removeKey:function(Ie){delete this.data[Ie]}};function Le(Ie){return new De(Ie)}function tt(Ie,Qe){for(var xe=new Ie.constructor(Ie.length+Qe.length),ie=0;ie<Ie.length;ie++)xe[ie]=Ie[ie];var $=Ie.length;for(ie=0;ie<Qe.length;ie++)xe[ie+$]=Qe[ie];return xe}function Et(){}ue.$override=g,ue.clone=i,ue.merge=l,ue.mergeAll=v,ue.extend=h,ue.defaults=d,ue.createCanvas=E,ue.getContext=n,ue.indexOf=s,ue.inherits=u,ue.mixin=p,ue.isArrayLike=S,ue.each=x,ue.map=M,ue.reduce=C,ue.filter=c,ue.find=r,ue.bind=a,ue.curry=A,ue.isArray=L,ue.isFunction=T,ue.isString=w,ue.isObject=_,ue.isBuiltInObject=j,ue.isTypedArray=W,ue.isDom=Z,ue.eqNaN=X,ue.retrieve=G,ue.retrieve2=te,ue.retrieve3=Y,ue.slice=le,ue.normalizeCssArray=Ae,ue.assert=Be,ue.trim=Ce,ue.setAsPrimitive=Fe,ue.isPrimitive=Ve,ue.createHashMap=Le,ue.concatArray=tt,ue.noop=Et},biw7:function(qe,ue,k){"use strict";var J=k("q1tI"),N=k.n(J),O=J.createContext(null);ue.a=O},c5Ni:function(qe,ue,k){},chpo:function(qe,ue,k){"use strict";Object.defineProperty(ue,"__esModule",{value:!0}),ue.default=void 0;var J=1,N=function(){return"".concat(J++)};ue.default=N},crp1:function(qe,ue,k){"use strict";k.d(ue,"b",function(){return Ne}),k.d(ue,"a",function(){return wt});var J={},N=function(he,ge,Re,Ze,Je){var Tt=J[ge]||(J[ge]=URL.createObjectURL(new Blob([he],{type:"text/javascript"}))),q=new Worker(Tt);return q.onerror=function(F){return Je(F.error,null)},q.onmessage=function(F){return Je(null,F.data)},q.postMessage(Re,Ze),q},O=Uint8Array,Q=Uint16Array,R=Uint32Array,B=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]),D=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]),f=new O([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),b=function(he,ge){for(var Re=new Q(31),Ze=0;Ze<31;++Ze)Re[Ze]=ge+=1<<he[Ze-1];for(var Je=new R(Re[30]),Ze=1;Ze<30;++Ze)for(var Tt=Re[Ze];Tt<Re[Ze+1];++Tt)Je[Tt]=Tt-Re[Ze]<<5|Ze;return[Re,Je]},g=b(B,2),i=g[0],l=g[1];i[28]=258,l[258]=28;for(var v=b(D,0),h=v[0],d=v[1],E=new Q(32768),o=0;o<32768;++o){var n=(o&43690)>>>1|(o&21845)<<1;n=(n&52428)>>>2|(n&13107)<<2,n=(n&61680)>>>4|(n&3855)<<4,E[o]=((n&65280)>>>8|(n&255)<<8)>>>1}for(var s=function(he,ge,Re){for(var Ze=he.length,Je=0,Tt=new Q(ge);Je<Ze;++Je)++Tt[he[Je]-1];var q=new Q(ge);for(Je=0;Je<ge;++Je)q[Je]=q[Je-1]+Tt[Je-1]<<1;var F;if(Re){F=new Q(1<<ge);var P=15-ge;for(Je=0;Je<Ze;++Je)if(he[Je])for(var ee=Je<<4|he[Je],ae=ge-he[Je],ne=q[he[Je]-1]++<<ae,Ke=ne|(1<<ae)-1;ne<=Ke;++ne)F[E[ne]>>>P]=ee}else for(F=new Q(Ze),Je=0;Je<Ze;++Je)F[Je]=E[q[he[Je]-1]++]>>>15-he[Je];return F},u=new O(288),o=0;o<144;++o)u[o]=8;for(var o=144;o<256;++o)u[o]=9;for(var o=256;o<280;++o)u[o]=7;for(var o=280;o<288;++o)u[o]=8;for(var p=new O(32),o=0;o<32;++o)p[o]=5;var S=s(u,9,0),x=s(u,9,1),M=s(p,5,0),C=s(p,5,1),c=function(he){for(var ge=he[0],Re=1;Re<he.length;++Re)he[Re]>ge&&(ge=he[Re]);return ge},r=function(he,ge,Re){var Ze=ge/8>>0;return(he[Ze]|he[Ze+1]<<8)>>>(ge&7)&Re},a=function(he,ge){var Re=ge/8>>0;return(he[Re]|he[Re+1]<<8|he[Re+2]<<16)>>>(ge&7)},A=function(he){return(he/8>>0)+(he&7&&1)},L=function(he,ge,Re){(ge==null||ge<0)&&(ge=0),(Re==null||Re>he.length)&&(Re=he.length);var Ze=new(he instanceof Q?Q:he instanceof R?R:O)(Re-ge);return Ze.set(he.subarray(ge,Re)),Ze},T=function(he,ge,Re){var Ze=he.length,Je=!ge||Re,Tt=!Re||Re.i;Re||(Re={}),ge||(ge=new O(Ze*3));var q=function(Cr){var Tr=ge.length;if(Cr>Tr){var Er=new O(Math.max(Tr*2,Cr));Er.set(ge),ge=Er}},F=Re.f||0,P=Re.p||0,ee=Re.b||0,ae=Re.l,ne=Re.d,Ke=Re.m,xt=Re.n,kt=Ze*8;do{if(!ae){Re.f=F=r(he,P,1);var Ht=r(he,P+1,3);if(P+=3,Ht)if(Ht==1)ae=x,ne=C,Ke=9,xt=5;else if(Ht==2){var $t=r(he,P,31)+257,fr=r(he,P+10,15)+4,Fr=$t+r(he,P+5,31)+1;P+=14;for(var yr=new O(Fr),Rr=new O(19),pr=0;pr<fr;++pr)Rr[f[pr]]=r(he,P+pr*3,7);P+=fr*3;var Nr=c(Rr),Hr=(1<<Nr)-1;if(!Tt&&P+Fr*(Nr+7)>kt)break;for(var qr=s(Rr,Nr,1),pr=0;pr<Fr;){var Yr=qr[r(he,P,Hr)];P+=Yr&15;var Ct=Yr>>>4;if(Ct<16)yr[pr++]=Ct;else{var nn=0,cn=0;for(Ct==16?(cn=3+r(he,P,3),P+=2,nn=yr[pr-1]):Ct==17?(cn=3+r(he,P,7),P+=3):Ct==18&&(cn=11+r(he,P,127),P+=7);cn--;)yr[pr++]=nn}}var $r=yr.subarray(0,$t),an=yr.subarray($t);Ke=c($r),xt=c(an),ae=s($r,Ke,1),ne=s(an,xt,1)}else throw"invalid block type";else{var Ct=A(P)+4,Yt=he[Ct-4]|he[Ct-3]<<8,Wt=Ct+Yt;if(Wt>Ze){if(Tt)throw"unexpected EOF";break}Je&&q(ee+Yt),ge.set(he.subarray(Ct,Wt),ee),Re.b=ee+=Yt,Re.p=P=Wt*8;continue}if(P>kt)throw"unexpected EOF"}Je&&q(ee+131072);for(var ln=(1<<Ke)-1,dn=(1<<xt)-1,hn=Ke+xt+18;Tt||P+hn<kt;){var nn=ae[a(he,P)&ln],wr=nn>>>4;if(P+=nn&15,P>kt)throw"unexpected EOF";if(!nn)throw"invalid length/literal";if(wr<256)ge[ee++]=wr;else if(wr==256){ae=null;break}else{var dr=wr-254;if(wr>264){var pr=wr-257,sr=B[pr];dr=r(he,P,(1<<sr)-1)+i[pr],P+=sr}var nr=ne[a(he,P)&dn],Zt=nr>>>4;if(!nr)throw"invalid distance";P+=nr&15;var an=h[Zt];if(Zt>3){var sr=D[Zt];an+=a(he,P)&(1<<sr)-1,P+=sr}if(P>kt)throw"unexpected EOF";Je&&q(ee+131072);for(var br=ee+dr;ee<br;ee+=4)ge[ee]=ge[ee-an],ge[ee+1]=ge[ee+1-an],ge[ee+2]=ge[ee+2-an],ge[ee+3]=ge[ee+3-an];ee=br}}Re.l=ae,Re.p=P,Re.b=ee,ae&&(F=1,Re.m=Ke,Re.d=ne,Re.n=xt)}while(!F);return ee==ge.length?ge:L(ge,0,ee)},w=function(he,ge,Re){Re<<=ge&7;var Ze=ge/8>>0;he[Ze]|=Re,he[Ze+1]|=Re>>>8},_=function(he,ge,Re){Re<<=ge&7;var Ze=ge/8>>0;he[Ze]|=Re,he[Ze+1]|=Re>>>8,he[Ze+2]|=Re>>>16},j=function(he,ge){for(var Re=[],Ze=0;Ze<he.length;++Ze)he[Ze]&&Re.push({s:Ze,f:he[Ze]});var Je=Re.length,Tt=Re.slice();if(!Je)return[new O(0),0];if(Je==1){var q=new O(Re[0].s+1);return q[Re[0].s]=1,[q,1]}Re.sort(function(Fr,yr){return Fr.f-yr.f}),Re.push({s:-1,f:25001});var F=Re[0],P=Re[1],ee=0,ae=1,ne=2;for(Re[0]={s:-1,f:F.f+P.f,l:F,r:P};ae!=Je-1;)F=Re[Re[ee].f<Re[ne].f?ee++:ne++],P=Re[ee!=ae&&Re[ee].f<Re[ne].f?ee++:ne++],Re[ae++]={s:-1,f:F.f+P.f,l:F,r:P};for(var Ke=Tt[0].s,Ze=1;Ze<Je;++Ze)Tt[Ze].s>Ke&&(Ke=Tt[Ze].s);var xt=new Q(Ke+1),kt=W(Re[ae-1],xt,0);if(kt>ge){var Ze=0,Ht=0,Ct=kt-ge,Yt=1<<Ct;for(Tt.sort(function(yr,Rr){return xt[Rr.s]-xt[yr.s]||yr.f-Rr.f});Ze<Je;++Ze){var Wt=Tt[Ze].s;if(xt[Wt]>ge)Ht+=Yt-(1<<kt-xt[Wt]),xt[Wt]=ge;else break}for(Ht>>>=Ct;Ht>0;){var $t=Tt[Ze].s;xt[$t]<ge?Ht-=1<<ge-xt[$t]++-1:++Ze}for(;Ze>=0&&Ht;--Ze){var fr=Tt[Ze].s;xt[fr]==ge&&(--xt[fr],++Ht)}kt=ge}return[new O(xt),kt]},W=function(he,ge,Re){return he.s==-1?Math.max(W(he.l,ge,Re+1),W(he.r,ge,Re+1)):ge[he.s]=Re},Z=function(he){for(var ge=he.length;ge&&!he[--ge];);for(var Re=new Q(++ge),Ze=0,Je=he[0],Tt=1,q=function(P){Re[Ze++]=P},F=1;F<=ge;++F)if(he[F]==Je&&F!=ge)++Tt;else{if(!Je&&Tt>2){for(;Tt>138;Tt-=138)q(32754);Tt>2&&(q(Tt>10?Tt-11<<5|28690:Tt-3<<5|12305),Tt=0)}else if(Tt>3){for(q(Je),--Tt;Tt>6;Tt-=6)q(8304);Tt>2&&(q(Tt-3<<5|8208),Tt=0)}for(;Tt--;)q(Je);Tt=1,Je=he[F]}return[Re.subarray(0,Ze),ge]},X=function(he,ge){for(var Re=0,Ze=0;Ze<ge.length;++Ze)Re+=he[Ze]*ge[Ze];return Re},G=function(he,ge,Re){var Ze=Re.length,Je=A(ge+2);he[Je]=Ze&255,he[Je+1]=Ze>>>8,he[Je+2]=he[Je]^255,he[Je+3]=he[Je+1]^255;for(var Tt=0;Tt<Ze;++Tt)he[Je+Tt+4]=Re[Tt];return(Je+4+Ze)*8},te=function(he,ge,Re,Ze,Je,Tt,q,F,P,ee,ae){w(ge,ae++,Re),++Je[256];for(var ne=j(Je,15),Ke=ne[0],xt=ne[1],kt=j(Tt,15),Ht=kt[0],Ct=kt[1],Yt=Z(Ke),Wt=Yt[0],$t=Yt[1],fr=Z(Ht),Fr=fr[0],yr=fr[1],Rr=new Q(19),pr=0;pr<Wt.length;++pr)Rr[Wt[pr]&31]++;for(var pr=0;pr<Fr.length;++pr)Rr[Fr[pr]&31]++;for(var Nr=j(Rr,7),Hr=Nr[0],qr=Nr[1],Yr=19;Yr>4&&!Hr[f[Yr-1]];--Yr);var nn=ee+5<<3,cn=X(Je,u)+X(Tt,p)+q,$r=X(Je,Ke)+X(Tt,Ht)+q+14+3*Yr+X(Rr,Hr)+(2*Rr[16]+3*Rr[17]+7*Rr[18]);if(nn<=cn&&nn<=$r)return G(ge,ae,he.subarray(P,P+ee));var an,ln,dn,hn;if(w(ge,ae,1+($r<cn)),ae+=2,$r<cn){an=s(Ke,xt,0),ln=Ke,dn=s(Ht,Ct,0),hn=Ht;var wr=s(Hr,qr,0);w(ge,ae,$t-257),w(ge,ae+5,yr-1),w(ge,ae+10,Yr-4),ae+=14;for(var pr=0;pr<Yr;++pr)w(ge,ae+3*pr,Hr[f[pr]]);ae+=3*Yr;for(var dr=[Wt,Fr],sr=0;sr<2;++sr)for(var nr=dr[sr],pr=0;pr<nr.length;++pr){var Zt=nr[pr]&31;w(ge,ae,wr[Zt]),ae+=Hr[Zt],Zt>15&&(w(ge,ae,nr[pr]>>>5&127),ae+=nr[pr]>>>12)}}else an=S,ln=u,dn=M,hn=p;for(var pr=0;pr<F;++pr)if(Ze[pr]>255){var Zt=Ze[pr]>>>18&31;_(ge,ae,an[Zt+257]),ae+=ln[Zt+257],Zt>7&&(w(ge,ae,Ze[pr]>>>23&31),ae+=B[Zt]);var br=Ze[pr]&31;_(ge,ae,dn[br]),ae+=hn[br],br>3&&(_(ge,ae,Ze[pr]>>>5&8191),ae+=D[br])}else _(ge,ae,an[Ze[pr]]),ae+=ln[Ze[pr]];return _(ge,ae,an[256]),ae+ln[256]},Y=new R([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),le=new O(0),Ae=function(he,ge,Re,Ze,Je,Tt){var q=he.length,F=new O(Ze+q+5*(1+Math.floor(q/7e3))+Je),P=F.subarray(Ze,F.length-Je),ee=0;if(!ge||q<8)for(var ae=0;ae<=q;ae+=65535){var ne=ae+65535;ne<q?ee=G(P,ee,he.subarray(ae,ne)):(P[ae]=Tt,ee=G(P,ee,he.subarray(ae,q)))}else{for(var Ke=Y[ge-1],xt=Ke>>>13,kt=Ke&8191,Ht=(1<<Re)-1,Ct=new Q(32768),Yt=new Q(Ht+1),Wt=Math.ceil(Re/3),$t=2*Wt,fr=function(Jr){return(he[Jr]^he[Jr+1]<<Wt^he[Jr+2]<<$t)&Ht},Fr=new R(25e3),yr=new Q(288),Rr=new Q(32),pr=0,Nr=0,ae=0,Hr=0,qr=0,Yr=0;ae<q;++ae){var nn=fr(ae),cn=ae&32767,$r=Yt[nn];if(Ct[cn]=$r,Yt[nn]=cn,qr<=ae){var an=q-ae;if((pr>7e3||Hr>24576)&&an>423){ee=te(he,P,0,Fr,yr,Rr,Nr,Hr,Yr,ae-Yr,ee),Hr=pr=Nr=0,Yr=ae;for(var ln=0;ln<286;++ln)yr[ln]=0;for(var ln=0;ln<30;++ln)Rr[ln]=0}var dn=2,hn=0,wr=kt,dr=cn-$r&32767;if(an>2&&nn==fr(ae-dr))for(var sr=Math.min(xt,an)-1,nr=Math.min(32767,ae),Zt=Math.min(258,an);dr<=nr&&--wr&&cn!=$r;){if(he[ae+dn]==he[ae+dn-dr]){for(var br=0;br<Zt&&he[ae+br]==he[ae+br-dr];++br);if(br>dn){if(dn=br,hn=dr,br>sr)break;for(var Cr=Math.min(dr,br-2),Tr=0,ln=0;ln<Cr;++ln){var Er=ae-dr+ln+32768&32767,Dn=Ct[Er],Qr=Er-Dn+32768&32767;Qr>Tr&&(Tr=Qr,$r=Er)}}}cn=$r,$r=Ct[cn],dr+=cn-$r+32768&32767}if(hn){Fr[Hr++]=268435456|l[dn]<<18|d[hn];var Cn=l[dn]&31,Hn=d[hn]&31;Nr+=B[Cn]+D[Hn],++yr[257+Cn],++Rr[Hn],qr=ae+dn,++pr}else Fr[Hr++]=he[ae],++yr[he[ae]]}}ee=te(he,P,Tt,Fr,yr,Rr,Nr,Hr,Yr,ae-Yr,ee),Tt||(ee=G(P,ee,le))}return L(F,0,Ze+A(ee)+Je)},Be=function(){for(var he=new R(256),ge=0;ge<256;++ge){for(var Re=ge,Ze=9;--Ze;)Re=(Re&1&&3988292384)^Re>>>1;he[ge]=Re}return he}(),Ce=function(){var he=4294967295;return{p:function(ge){for(var Re=he,Ze=0;Ze<ge.length;++Ze)Re=Be[Re&255^ge[Ze]]^Re>>>8;he=Re},d:function(){return he^4294967295}}},Se=function(){var he=1,ge=0;return{p:function(Re){for(var Ze=he,Je=ge,Tt=Re.length,q=0;q!=Tt;){for(var F=Math.min(q+5552,Tt);q<F;++q)Ze+=Re[q],Je+=Ze;Ze%=65521,Je%=65521}he=Ze,ge=Je},d:function(){return(he>>>8<<16|(ge&255)<<8|ge>>>8)+((he&255)<<23)*2}}},Fe=function(he,ge,Re,Ze,Je){return Ae(he,ge.level==null?6:ge.level,ge.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(he.length)))*1.5):12+ge.mem,Re,Ze,!Je)},Ve=function(he,ge){var Re={};for(var Ze in he)Re[Ze]=he[Ze];for(var Ze in ge)Re[Ze]=ge[Ze];return Re},De=function(he,ge,Re){for(var Ze=he(),Je=he.toString(),Tt=Je.slice(Je.indexOf("[")+1,Je.lastIndexOf("]")).replace(/ /g,"").split(","),q=0;q<Ze.length;++q){var F=Ze[q],P=Tt[q];if(typeof F=="function"){ge+=";"+P+"=";var ee=F.toString();if(F.prototype)if(ee.indexOf("[native code]")!=-1){var ae=ee.indexOf(" ",8)+1;ge+=ee.slice(ae,ee.indexOf("(",ae))}else{ge+=ee;for(var ne in F.prototype)ge+=";"+P+".prototype."+ne+"="+F.prototype[ne].toString()}else ge+=ee}else Re[P]=F}return[ge,Re]},Le=[],tt=function(he){var ge=[];for(var Re in he)(he[Re]instanceof O||he[Re]instanceof Q||he[Re]instanceof R)&&ge.push((he[Re]=new he[Re].constructor(he[Re])).buffer);return ge},Et=function(he,ge,Re,Ze){var Je;if(!Le[Re]){for(var Tt="",q={},F=he.length-1,P=0;P<F;++P)Je=De(he[P],Tt,q),Tt=Je[0],q=Je[1];Le[Re]=De(he[F],Tt,q)}var ee=Ve({},Le[Re][1]);return N(Le[Re][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+ge.toString()+"}",Re,ee,tt(ee),Ze)},Ie=function(){return[O,Q,R,B,D,f,i,h,x,C,E,s,c,r,a,A,L,T,Oe,ce,be]},Qe=function(){return[O,Q,R,B,D,f,l,d,S,u,M,p,E,Y,le,s,w,_,j,W,Z,X,G,te,A,L,Ae,Fe,Ue,ce]},xe=function(){return[Ot,Pe,pt,Ce,Be]},ie=function(){return[Ft,He]},$=function(){return[at,pt,Se]},re=function(){return[vt]},ce=function(he){return postMessage(he,[he.buffer])},be=function(he){return he&&he.size&&new O(he.size)},Me=function(he,ge,Re,Ze,Je,Tt){var q=Et(Re,Ze,Je,function(F,P){q.terminate(),Tt(F,P)});return ge.consume||(he=new O(he)),q.postMessage([he,ge],[he.buffer]),function(){q.terminate()}},ke=function(he){return he.ondata=function(ge,Re){return postMessage([ge,Re],[ge.buffer])},function(ge){return he.push(ge.data[0],ge.data[1])}},ct=function(he,ge,Re,Ze,Je){var Tt,q=Et(he,Ze,Je,function(F,P){F?(q.terminate(),ge.ondata.call(ge,F)):(P[1]&&q.terminate(),ge.ondata.call(ge,F,P[0],P[1]))});q.postMessage(Re),ge.push=function(F,P){if(Tt)throw"stream finished";if(!ge.ondata)throw"no stream handler";q.postMessage([F,Tt=P],[F.buffer])},ge.terminate=function(){q.terminate()}},ut=function(he,ge){return he[ge]|he[ge+1]<<8},mt=function(he,ge){return(he[ge]|he[ge+1]<<8|he[ge+2]<<16)+(he[ge+3]<<23)*2},pt=function(he,ge,Re){for(;Re;++ge)he[ge]=Re,Re>>>=8},Ot=function(he,ge){var Re=ge.filename;if(he[0]=31,he[1]=139,he[2]=8,he[8]=ge.level<2?4:ge.level==9?2:0,he[9]=3,ge.mtime!=0&&pt(he,4,Math.floor(new Date(ge.mtime||Date.now())/1e3)),Re){he[3]=8;for(var Ze=0;Ze<=Re.length;++Ze)he[Ze+10]=Re.charCodeAt(Ze)}},Ft=function(he){if(he[0]!=31||he[1]!=139||he[2]!=8)throw"invalid gzip data";var ge=he[3],Re=10;ge&4&&(Re+=he[10]|(he[11]<<8)+2);for(var Ze=(ge>>3&1)+(ge>>4&1);Ze>0;Ze-=!he[Re++]);return Re+(ge&2)},He=function(he){var ge=he.length;return(he[ge-4]|he[ge-3]<<8|he[ge-2]<<16)+2*(he[ge-1]<<23)},Pe=function(he){return 10+(he.filename&&he.filename.length+1||0)},at=function(he,ge){var Re=ge.level,Ze=Re==0?0:Re<6?1:Re==9?3:2;he[0]=120,he[1]=Ze<<6|(Ze?32-2*Ze:1)},vt=function(he){if((he[0]&15)!=8||he[0]>>>4>7||(he[0]<<8|he[1])%31)throw"invalid zlib data";if(he[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function et(he,ge){return!ge&&typeof he=="function"&&(ge=he,he={}),this.ondata=ge,he}var At=function(){function he(ge,Re){!Re&&typeof ge=="function"&&(Re=ge,ge={}),this.ondata=Re,this.o=ge||{}}return he.prototype.p=function(ge,Re){this.ondata(Fe(ge,this.o,0,0,!Re),Re)},he.prototype.push=function(ge,Re){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=Re,this.p(ge,Re||!1)},he}(),je=function(){function he(ge,Re){ct([Qe,function(){return[ke,At]}],this,et.call(this,ge,Re),function(Ze){var Je=new At(Ze.data);onmessage=ke(Je)},6)}return he}();function _e(he,ge,Re){if(Re||(Re=ge,ge={}),typeof Re!="function")throw"no callback";return Me(he,ge,[Qe],function(Ze){return ce(Ue(Ze.data[0],Ze.data[1]))},0,Re)}function Ue(he,ge){return ge===void 0&&(ge={}),Fe(he,ge,0,0)}var me=function(){function he(ge){this.s={},this.p=new O(0),this.ondata=ge}return he.prototype.e=function(ge){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var Re=this.p.length,Ze=new O(Re+ge.length);Ze.set(this.p),Ze.set(ge,Re),this.p=Ze},he.prototype.c=function(ge){this.d=this.s.i=ge||!1;var Re=this.s.b,Ze=T(this.p,this.o,this.s);this.ondata(L(Ze,Re,this.s.b),this.d),this.o=L(Ze,this.s.b-32768),this.s.b=this.o.length,this.p=L(this.p,this.s.p/8>>0),this.s.p&=7},he.prototype.push=function(ge,Re){this.e(ge),this.c(Re)},he}(),ve=function(){function he(ge){this.ondata=ge,ct([Ie,function(){return[ke,me]}],this,0,function(){var Re=new me;onmessage=ke(Re)},7)}return he}();function Ee(he,ge,Re){if(Re||(Re=ge,ge={}),typeof Re!="function")throw"no callback";return Me(he,ge,[Ie],function(Ze){return ce(Oe(Ze.data[0],be(Ze.data[1])))},1,Re)}function Oe(he,ge){return T(he,ge)}var Ye=function(){function he(ge,Re){this.c=Ce(),this.l=0,this.v=1,At.call(this,ge,Re)}return he.prototype.push=function(ge,Re){At.prototype.push.call(this,ge,Re)},he.prototype.p=function(ge,Re){this.c.p(ge),this.l+=ge.length;var Ze=Fe(ge,this.o,this.v&&Pe(this.o),Re&&8,!Re);this.v&&(Ot(Ze,this.o),this.v=0),Re&&(pt(Ze,Ze.length-8,this.c.d()),pt(Ze,Ze.length-4,this.l)),this.ondata(Ze,Re)},he}(),ze=function(){function he(ge,Re){ct([Qe,xe,function(){return[ke,At,Ye]}],this,et.call(this,ge,Re),function(Ze){var Je=new Ye(Ze.data);onmessage=ke(Je)},8)}return he}();function gt(he,ge,Re){if(Re||(Re=ge,ge={}),typeof Re!="function")throw"no callback";return Me(he,ge,[Qe,xe,function(){return[Lt]}],function(Ze){return ce(Lt(Ze.data[0],Ze.data[1]))},2,Re)}function Lt(he,ge){ge===void 0&&(ge={});var Re=Ce(),Ze=he.length;Re.p(he);var Je=Fe(he,ge,Pe(ge),8),Tt=Je.length;return Ot(Je,ge),pt(Je,Tt-8,Re.d()),pt(Je,Tt-4,Ze),Je}var Pt=function(){function he(ge){this.v=1,me.call(this,ge)}return he.prototype.push=function(ge,Re){if(me.prototype.e.call(this,ge),this.v){var Ze=Ft(this.p);if(Ze>=this.p.length&&!Re)return;this.p=this.p.subarray(Ze),this.v=0}if(Re){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}me.prototype.c.call(this,Re)},he}(),Rt=function(){function he(ge){this.ondata=ge,ct([Ie,ie,function(){return[ke,me,Pt]}],this,0,function(){var Re=new Pt;onmessage=ke(Re)},9)}return he}();function Dt(he,ge,Re){if(Re||(Re=ge,ge={}),typeof Re!="function")throw"no callback";return Me(he,ge,[Ie,ie,function(){return[dt]}],function(Ze){return ce(dt(Ze.data[0]))},3,Re)}function dt(he,ge){return T(he.subarray(Ft(he),-8),ge||new O(He(he)))}var it=function(){function he(ge,Re){this.c=Se(),this.v=1,At.call(this,ge,Re)}return he.prototype.push=function(ge,Re){At.prototype.push.call(this,ge,Re)},he.prototype.p=function(ge,Re){this.c.p(ge);var Ze=Fe(ge,this.o,this.v&&2,Re&&4,!Re);this.v&&(at(Ze,this.o),this.v=0),Re&&pt(Ze,Ze.length-4,this.c.d()),this.ondata(Ze,Re)},he}(),nt=function(){function he(ge,Re){ct([Qe,$,function(){return[ke,At,it]}],this,et.call(this,ge,Re),function(Ze){var Je=new it(Ze.data);onmessage=ke(Je)},10)}return he}();function we(he,ge,Re){if(Re||(Re=ge,ge={}),typeof Re!="function")throw"no callback";return Me(he,ge,[Qe,$,function(){return[Ne]}],function(Ze){return ce(Ne(Ze.data[0],Ze.data[1]))},4,Re)}function Ne(he,ge){ge===void 0&&(ge={});var Re=Se();Re.p(he);var Ze=Fe(he,ge,2,4);return at(Ze,ge),pt(Ze,Ze.length-4,Re.d()),Ze}var ht=function(){function he(ge){this.v=1,me.call(this,ge)}return he.prototype.push=function(ge,Re){if(me.prototype.e.call(this,ge),this.v){if(this.p.length<2&&!Re)return;this.p=this.p.subarray(2),this.v=0}if(Re){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}me.prototype.c.call(this,Re)},he}(),ot=function(){function he(ge){this.ondata=ge,ct([Ie,re,function(){return[ke,me,ht]}],this,0,function(){var Re=new ht;onmessage=ke(Re)},11)}return he}();function Bt(he,ge,Re){if(Re||(Re=ge,ge={}),typeof Re!="function")throw"no callback";return Me(he,ge,[Ie,re,function(){return[wt]}],function(Ze){return ce(wt(Ze.data[0],be(Ze.data[1])))},5,Re)}function wt(he,ge){return T((vt(he),he.subarray(2,-4)),ge)}var rt=function(){function he(ge){this.G=Pt,this.I=me,this.Z=ht,this.ondata=ge}return he.prototype.push=function(ge,Re){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(ge,Re);else{if(this.p&&this.p.length){var Ze=new O(this.p.length+ge.length);Ze.set(this.p),Ze.set(ge,this.p.length)}else this.p=ge;if(this.p.length>2){var Je=this,Tt=function(){Je.ondata.apply(Je,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(Tt):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(Tt):new this.Z(Tt),this.s.push(this.p,Re),this.p=null}}},he}(),st=function(){function he(ge){this.G=Rt,this.I=ve,this.Z=ot,this.ondata=ge}return he.prototype.push=function(ge,Re){rt.prototype.push.call(this,ge,Re)},he}();function St(he,ge,Re){if(Re||(Re=ge,ge={}),typeof Re!="function")throw"no callback";return he[0]==31&&he[1]==139&&he[2]==8?Dt(he,ge,Re):(he[0]&15)!=8||he[0]>>4>7||(he[0]<<8|he[1])%31?Ee(he,ge,Re):Bt(he,ge,Re)}function It(he,ge){return he[0]==31&&he[1]==139&&he[2]==8?dt(he,ge):(he[0]&15)!=8||he[0]>>4>7||(he[0]<<8|he[1])%31?Oe(he,ge):wt(he,ge)}var Qt=function(he,ge,Re,Ze){for(var Je in he){var Tt=he[Je],q=ge+Je;Tt instanceof O?Re[q]=[Tt,Ze]:Array.isArray(Tt)?Re[q]=[Tt[0],Ve(Ze,Tt[1])]:Qt(Tt,q+"/",Re,Ze)}};function gr(he,ge){var Re=he.length;if(!ge&&typeof TextEncoder!="undefined")return new TextEncoder().encode(he);for(var Ze=new O(he.length+(he.length>>>1)),Je=0,Tt=function(ee){Ze[Je++]=ee},q=0;q<Re;++q){if(Je+5>Ze.length){var F=new O(Je+8+(Re-q<<1));F.set(Ze),Ze=F}var P=he.charCodeAt(q);P<128||ge?Tt(P):P<2048?(Tt(192|P>>>6),Tt(128|P&63)):P>55295&&P<57344?(P=65536+(P&1023<<10)|he.charCodeAt(++q)&1023,Tt(240|P>>>18),Tt(128|P>>>12&63),Tt(128|P>>>6&63),Tt(128|P&63)):(Tt(224|P>>>12),Tt(128|P>>>6&63),Tt(128|P&63))}return L(Ze,0,Je)}function vr(he,ge){var Re="";if(!ge&&typeof TextDecoder!="undefined")return new TextDecoder().decode(he);for(var Ze=0;Ze<he.length;){var Je=he[Ze++];Je<128||ge?Re+=String.fromCharCode(Je):Je<224?Re+=String.fromCharCode((Je&31)<<6|he[Ze++]&63):Je<240?Re+=String.fromCharCode((Je&15)<<12|(he[Ze++]&63)<<6|he[Ze++]&63):(Je=((Je&15)<<18|(he[Ze++]&63)<<12|(he[Ze++]&63)<<6|he[Ze++]&63)-65536,Re+=String.fromCharCode(55296|Je>>10,56320|Je&1023))}return Re}var cr=function(he,ge){return ge+30+ut(he,ge+26)+ut(he,ge+28)},jt=function(he,ge,Re){var Ze=ut(he,ge+28),Je=vr(he.subarray(ge+46,ge+46+Ze),!(ut(he,ge+8)&2048)),Tt=ge+46+Ze,q=Re?Ir(he,Tt):[mt(he,ge+20),mt(he,ge+24),mt(he,ge+42)],F=q[0],P=q[1],ee=q[2];return[ut(he,ge+10),F,P,Je,Tt+ut(he,ge+30)+ut(he,ge+32),ee]},Ir=function(he,ge){for(;ut(he,ge)!=1;ge+=4+ut(he,ge+2));return[mt(he,ge+12),mt(he,ge+4),mt(he,ge+20)]},kr=function(he,ge,Re,Ze,Je,Tt,q,F,P,ee){var ae=Tt.length,ne=Ze.length;pt(he,ge,P!=null?33639248:67324752),ge+=4,P!=null&&(he[ge]=20,ge+=2),he[ge]=20,ge+=2,he[ge++]=ee==8&&(F.level==1?6:F.level<6?4:F.level==9?2:0),he[ge++]=q&&8,he[ge]=ee,ge+=2;var Ke=new Date(F.mtime||Date.now()),xt=Ke.getFullYear()-1980;if(xt<0||xt>119)throw"date not in range 1980-2099";pt(he,ge,(xt<<24)*2|Ke.getMonth()+1<<21|Ke.getDate()<<16|Ke.getHours()<<11|Ke.getMinutes()<<5|Ke.getSeconds()>>>1),ge+=4,pt(he,ge,Re),pt(he,ge+4,ne),pt(he,ge+8,Je),pt(he,ge+12,ae),ge+=16,P!=null&&(pt(he,ge+=10,P),ge+=4),he.set(Tt,ge),ge+=ae,P==null&&he.set(Ze,ge)},_r=function(he,ge,Re,Ze,Je){pt(he,ge,101010256),pt(he,ge+8,Re),pt(he,ge+10,Re),pt(he,ge+12,Ze),pt(he,ge+16,Je)};function hr(he,ge,Re){if(Re||(Re=ge,ge={}),typeof Re!="function")throw"no callback";var Ze={};Qt(he,"",Ze,ge);var Je=Object.keys(Ze),Tt=Je.length,q=0,F=0,P=Tt,ee=new Array(Tt),ae=[],ne=function(){for(var Ht=0;Ht<ae.length;++Ht)ae[Ht]()},Ke=function(){var Ht=new O(F+22),Ct=q,Yt=F-q;F=0;for(var Wt=0;Wt<P;++Wt){var $t=ee[Wt];try{kr(Ht,F,$t.c,$t.d,$t.m,$t.n,$t.u,$t.p,null,$t.t),kr(Ht,q,$t.c,$t.d,$t.m,$t.n,$t.u,$t.p,F,$t.t),q+=46+$t.n.length,F+=30+$t.n.length+$t.d.length}catch(fr){return Re(fr,null)}}_r(Ht,q,ee.length,Yt,Ct),Re(null,Ht)};Tt||Ke();for(var xt=function(Ht){var Ct=Je[Ht],Yt=Ze[Ct],Wt=Yt[0],$t=Yt[1],fr=Ce(),Fr=Wt.length;fr.p(Wt);var yr=gr(Ct),Rr=yr.length,pr=$t.level==0?0:8,Nr=function(Hr,qr){if(Hr)ne(),Re(Hr,null);else{var Yr=qr.length;ee[Ht]={t:pr,d:qr,m:Fr,c:fr.d(),u:Ct.length!=Yr,n:yr,p:$t},q+=30+Rr+Yr,F+=76+2*Rr+Yr,--Tt||Ke()}};if(yr.length>65535&&Nr("filename too long",null),!pr)Nr(null,Wt);else if(Fr<16e4)try{Nr(null,Ue(Wt,$t))}catch(Hr){Nr(Hr,null)}else ae.push(_e(Wt,$t,Nr))},kt=0;kt<P;++kt)xt(kt);return ne}function Sr(he,ge){ge===void 0&&(ge={});var Re={},Ze=[];Qt(he,"",Re,ge);var Je=0,Tt=0;for(var q in Re){var F=Re[q],P=F[0],ee=F[1],ae=ee.level==0?0:8,ne=gr(q),Ke=ne.length;if(ne.length>65535)throw"filename too long";var xt=ae?Ue(P,ee):P,kt=xt.length,Ht=Ce();Ht.p(P),Ze.push({t:ae,d:xt,m:P.length,c:Ht.d(),u:q.length!=Ke,n:ne,o:Je,p:ee}),Je+=30+Ke+kt,Tt+=76+2*Ke+kt}for(var Ct=new O(Tt+22),Yt=Je,Wt=Tt-Je,$t=0;$t<Ze.length;++$t){var fr=Ze[$t];kr(Ct,fr.o,fr.c,fr.d,fr.m,fr.n,fr.u,fr.p,null,fr.t),kr(Ct,Je,fr.c,fr.d,fr.m,fr.n,fr.u,fr.p,fr.o,fr.t),Je+=46+fr.n.length}return _r(Ct,Je,Ze.length,Wt,Yt),Ct}function sn(he,ge){if(typeof ge!="function")throw"no callback";for(var Re=[],Ze=function(){for(var Ke=0;Ke<Re.length;++Ke)Re[Ke]()},Je={},Tt=he.length-22;mt(he,Tt)!=101010256;--Tt)if(!Tt||he.length-Tt>65558){ge("invalid zip file",null);return}var q=ut(he,Tt+8);q||ge(null,{});var F=q,P=mt(he,Tt+16),ee=P==4294967295;if(ee){if(Tt=mt(he,Tt-12),mt(he,Tt)!=101075792)throw"invalid zip file";F=q=mt(he,Tt+32),P=mt(he,Tt+48)}for(var ae=function(Ke){var xt=jt(he,P,ee),kt=xt[0],Ht=xt[1],Ct=xt[2],Yt=xt[3],Wt=xt[4],$t=xt[5],fr=cr(he,$t);P=Wt;var Fr=function(Rr,pr){Rr?(Ze(),ge(Rr,null)):(Je[Yt]=pr,--q||ge(null,Je))};if(!kt)Fr(null,L(he,fr,fr+Ht));else if(kt==8){var yr=he.subarray(fr,fr+Ht);if(Ht<32e4)try{Fr(null,Oe(yr,new O(Ct)))}catch(Rr){Fr(Rr,null)}else Re.push(Ee(yr,{size:Ct},Fr))}else Fr("unknown compression type "+kt,null)},ne=0;ne<F;++ne)ae(ne);return Ze}function en(he){for(var ge={},Re=he.length-22;mt(he,Re)!=101010256;--Re)if(!Re||he.length-Re>65558)throw"invalid zip file";var Ze=ut(he,Re+8);if(!Ze)return{};var Je=mt(he,Re+16),Tt=Je==4294967295;if(Tt){if(Re=mt(he,Re-12),mt(he,Re)!=101075792)throw"invalid zip file";Ze=mt(he,Re+32),Je=mt(he,Re+48)}for(var q=0;q<Ze;++q){var F=jt(he,Je,Tt),P=F[0],ee=F[1],ae=F[2],ne=F[3],Ke=F[4],xt=F[5],kt=cr(he,xt);if(Je=Ke,!P)ge[ne]=L(he,kt,kt+ee);else if(P==8)ge[ne]=Oe(he.subarray(kt,kt+ee),new O(ae));else throw"unknown compression type "+P}return ge}},dMvE:function(qe,ue){var k={linear:function(N){return N},quadraticIn:function(N){return N*N},quadraticOut:function(N){return N*(2-N)},quadraticInOut:function(N){return(N*=2)<1?.5*N*N:-.5*(--N*(N-2)-1)},cubicIn:function(N){return N*N*N},cubicOut:function(N){return--N*N*N+1},cubicInOut:function(N){return(N*=2)<1?.5*N*N*N:.5*((N-=2)*N*N+2)},quarticIn:function(N){return N*N*N*N},quarticOut:function(N){return 1- --N*N*N*N},quarticInOut:function(N){return(N*=2)<1?.5*N*N*N*N:-.5*((N-=2)*N*N*N-2)},quinticIn:function(N){return N*N*N*N*N},quinticOut:function(N){return--N*N*N*N*N+1},quinticInOut:function(N){return(N*=2)<1?.5*N*N*N*N*N:.5*((N-=2)*N*N*N*N+2)},sinusoidalIn:function(N){return 1-Math.cos(N*Math.PI/2)},sinusoidalOut:function(N){return Math.sin(N*Math.PI/2)},sinusoidalInOut:function(N){return .5*(1-Math.cos(Math.PI*N))},exponentialIn:function(N){return N===0?0:Math.pow(1024,N-1)},exponentialOut:function(N){return N===1?1:1-Math.pow(2,-10*N)},exponentialInOut:function(N){return N===0?0:N===1?1:(N*=2)<1?.5*Math.pow(1024,N-1):.5*(-Math.pow(2,-10*(N-1))+2)},circularIn:function(N){return 1-Math.sqrt(1-N*N)},circularOut:function(N){return Math.sqrt(1- --N*N)},circularInOut:function(N){return(N*=2)<1?-.5*(Math.sqrt(1-N*N)-1):.5*(Math.sqrt(1-(N-=2)*N)+1)},elasticIn:function(N){var O,Q=.1,R=.4;return N===0?0:N===1?1:(!Q||Q<1?(Q=1,O=R/4):O=R*Math.asin(1/Q)/(2*Math.PI),-(Q*Math.pow(2,10*(N-=1))*Math.sin((N-O)*(2*Math.PI)/R)))},elasticOut:function(N){var O,Q=.1,R=.4;return N===0?0:N===1?1:(!Q||Q<1?(Q=1,O=R/4):O=R*Math.asin(1/Q)/(2*Math.PI),Q*Math.pow(2,-10*N)*Math.sin((N-O)*(2*Math.PI)/R)+1)},elasticInOut:function(N){var O,Q=.1,R=.4;return N===0?0:N===1?1:(!Q||Q<1?(Q=1,O=R/4):O=R*Math.asin(1/Q)/(2*Math.PI),(N*=2)<1?-.5*(Q*Math.pow(2,10*(N-=1))*Math.sin((N-O)*(2*Math.PI)/R)):Q*Math.pow(2,-10*(N-=1))*Math.sin((N-O)*(2*Math.PI)/R)*.5+1)},backIn:function(N){var O=1.70158;return N*N*((O+1)*N-O)},backOut:function(N){var O=1.70158;return--N*N*((O+1)*N+O)+1},backInOut:function(N){var O=1.70158*1.525;return(N*=2)<1?.5*(N*N*((O+1)*N-O)):.5*((N-=2)*N*((O+1)*N+O)+2)},bounceIn:function(N){return 1-k.bounceOut(1-N)},bounceOut:function(N){return N<1/2.75?7.5625*N*N:N<2/2.75?7.5625*(N-=1.5/2.75)*N+.75:N<2.5/2.75?7.5625*(N-=2.25/2.75)*N+.9375:7.5625*(N-=2.625/2.75)*N+.984375},bounceInOut:function(N){return N<.5?k.bounceIn(N*2)*.5:k.bounceOut(N*2-1)*.5+.5}},J=k;qe.exports=J},dejd:function(qe,ue,k){},dmUQ:function(qe,ue,k){"use strict";var J=k("Ff2n"),N=k("rePB"),O=k("1OyB"),Q=k("vuIU"),R=k("Ji7U"),B=k("md7G"),D=k("foSv"),f=k("q1tI"),b=k.n(f),g=k("TSYQ"),i=k.n(g),l=k("4IlW");function v(a,A){var L=Object.keys(a);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(a);A&&(T=T.filter(function(w){return Object.getOwnPropertyDescriptor(a,w).enumerable})),L.push.apply(L,T)}return L}function h(a){for(var A=1;A<arguments.length;A++){var L=arguments[A]!=null?arguments[A]:{};A%2?v(Object(L),!0).forEach(function(T){Object(N.a)(a,T,L[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(L)):v(Object(L)).forEach(function(T){Object.defineProperty(a,T,Object.getOwnPropertyDescriptor(L,T))})}return a}function d(a){var A=E();return function(){var T=Object(D.a)(a),w;if(A){var _=Object(D.a)(this).constructor;w=Reflect.construct(T,arguments,_)}else w=T.apply(this,arguments);return Object(B.a)(this,w)}}function E(){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(a){return!1}}function o(){}function n(a){a.preventDefault()}var s=function(A){return A.replace(/[^\w.-]+/g,"")},u=200,p=600,S=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,x=function(A){return A!=null},M=function(A,L){return L===A||typeof L=="number"&&typeof A=="number"&&isNaN(L)&&isNaN(A)},C=function(a){Object(R.a)(L,a);var A=d(L);function L(T){var w;Object(O.a)(this,L),w=A.call(this,T),w.onKeyDown=function(W){var Z=w.props,X=Z.onKeyDown,G=Z.onPressEnter;if(W.keyCode===l.a.UP){var te=w.getRatio(W);w.up(W,te,null),w.stop()}else if(W.keyCode===l.a.DOWN){var Y=w.getRatio(W);w.down(W,Y,null),w.stop()}else W.keyCode===l.a.ENTER&&G&&G(W);if(w.recordCursorPosition(),w.lastKeyCode=W.keyCode,X){for(var le=arguments.length,Ae=new Array(le>1?le-1:0),Be=1;Be<le;Be++)Ae[Be-1]=arguments[Be];X.apply(void 0,[W].concat(Ae))}},w.onKeyUp=function(W){var Z=w.props.onKeyUp;if(w.stop(),w.recordCursorPosition(),Z){for(var X=arguments.length,G=new Array(X>1?X-1:0),te=1;te<X;te++)G[te-1]=arguments[te];Z.apply(void 0,[W].concat(G))}},w.onChange=function(W){var Z=w.props.onChange;w.state.focused&&(w.inputting=!0),w.rawInput=w.props.parser(w.getValueFromEvent(W)),w.setState({inputValue:w.rawInput}),Z(w.toNumber(w.rawInput))},w.onMouseUp=function(){var W=w.props.onMouseUp;w.recordCursorPosition(),W&&W.apply(void 0,arguments)},w.onFocus=function(){var W;w.setState({focused:!0}),(W=w.props).onFocus.apply(W,arguments)},w.onBlur=function(){var W=w.props.onBlur;w.inputting=!1,w.setState({focused:!1});var Z=w.getCurrentValidValue(w.state.inputValue),X=w.setValue(Z,o);if(W){var G=w.input.value,te=w.getInputDisplayValue({focus:!1,value:X});w.input.value=te&&Number(te),W.apply(void 0,arguments),w.input.value=G}},w.getRatio=function(W){var Z=1;return W.metaKey||W.ctrlKey?Z=.1:W.shiftKey&&(Z=10),Z},w.getFullNum=function(W){return isNaN(W)?W:/e/i.test(String(W))?Number(W).toFixed(18).replace(/\.?0+$/,""):W},w.getPrecision=function(W){if(x(w.props.precision))return w.props.precision;var Z=String(W);if(Z.indexOf("e-")>=0)return parseInt(Z.slice(Z.indexOf("e-")+2),10);var X=0;return Z.indexOf(".")>=0&&(X=Z.length-Z.indexOf(".")-1),X},w.getInputDisplayValue=function(W){var Z=W||w.state,X=Z.focused,G=Z.inputValue,te=Z.value,Y;X?Y=G:Y=w.toPrecisionAsStep(te),Y==null&&(Y="");var le=w.formatWrapper(Y);return x(w.props.decimalSeparator)&&(le=le.toString().replace(".",w.props.decimalSeparator)),le},w.recordCursorPosition=function(){try{w.cursorStart=w.input.selectionStart,w.cursorEnd=w.input.selectionEnd,w.currentValue=w.input.value,w.cursorBefore=w.input.value.substring(0,w.cursorStart),w.cursorAfter=w.input.value.substring(w.cursorEnd)}catch(W){}},w.restoreByAfter=function(W){if(W===void 0)return!1;var Z=w.input.value,X=Z.lastIndexOf(W);if(X===-1)return!1;var G=w.cursorBefore.length;return w.lastKeyCode===l.a.DELETE&&w.cursorBefore.charAt(G-1)===W[0]?(w.fixCaret(G,G),!0):X+W.length===Z.length?(w.fixCaret(X,X),!0):!1},w.partRestoreByAfter=function(W){return W===void 0?!1:Array.prototype.some.call(W,function(Z,X){var G=W.substring(X);return w.restoreByAfter(G)})},w.isNotCompleteNumber=function(W){return isNaN(W)||W===""||W===null||W&&W.toString().indexOf(".")===W.toString().length-1},w.stop=function(){w.autoStepTimer&&clearTimeout(w.autoStepTimer)},w.down=function(W,Z,X){w.pressingUpOrDown=!0,w.step("down",W,Z,X)},w.up=function(W,Z,X){w.pressingUpOrDown=!0,w.step("up",W,Z,X)},w.saveInput=function(W){w.input=W};var _=T.value;_===void 0&&(_=T.defaultValue),w.state={focused:T.autoFocus};var j=w.getValidValue(w.toNumber(_));return w.state=h(h({},w.state),{},{inputValue:w.toPrecisionAsStep(j),value:j}),w}return Object(Q.a)(L,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(w){var _=this.props,j=_.value,W=_.onChange,Z=_.max,X=_.min,G=this.state.focused;if(w){if(!M(w.value,j)||!M(w.max,Z)||!M(w.min,X)){var te=G?j:this.getValidValue(j),Y;this.pressingUpOrDown?Y=te:this.inputting?Y=this.rawInput:Y=this.toPrecisionAsStep(te),this.setState({value:te,inputValue:Y})}var le="value"in this.props?j:this.state.value;"max"in this.props&&w.max!==Z&&typeof le=="number"&&le>Z&&W&&W(Z),"min"in this.props&&w.min!==X&&typeof le=="number"&&le<X&&W&&W(X)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Ae=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===l.a.BACKSPACE?Ae=this.cursorStart-1:this.lastKeyCode===l.a.DELETE&&(Ae=this.cursorStart):Ae=this.input.value.length,this.fixCaret(Ae,Ae)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case l.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case l.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Be){}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(w){var _=w;return _===""?_="":this.isNotCompleteNumber(parseFloat(_))?_=this.state.value:_=this.getValidValue(_),this.toNumber(_)}},{key:"getValueFromEvent",value:function(w){var _=w.target.value.trim().replace(/。/g,".");return x(this.props.decimalSeparator)&&(_=_.replace(this.props.decimalSeparator,".")),_}},{key:"getValidValue",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,W=parseFloat(w);return isNaN(W)?w:(W<_&&(W=_),W>j&&(W=j),W)}},{key:"setValue",value:function(w,_){var j=this.props.precision,W=this.isNotCompleteNumber(parseFloat(w))?null:parseFloat(w),Z=this.state.value,X=Z===void 0?null:Z,G=this.state.inputValue,te=G===void 0?null:G,Y=typeof W=="number"?W.toFixed(j):"".concat(W),le=W!==X||Y!=="".concat(te);return"value"in this.props?(te=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:te},_)):this.setState({value:W,inputValue:this.toPrecisionAsStep(w)},_),le&&this.props.onChange(W),W}},{key:"getMaxPrecision",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,j=this.props,W=j.precision,Z=j.step;if(x(W))return W;var X=this.getPrecision(_),G=this.getPrecision(Z),te=this.getPrecision(w);return w?Math.max(te,X+G):X+G}},{key:"getPrecisionFactor",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,j=this.getMaxPrecision(w,_);return Math.pow(10,j)}},{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(w){return this.props.formatter?this.props.formatter(w):w}},{key:"toPrecisionAsStep",value:function(w){if(this.isNotCompleteNumber(w)||w==="")return w;var _=Math.abs(this.getMaxPrecision(w));return isNaN(_)?w.toString():Number(w).toFixed(_)}},{key:"toNumber",value:function(w){var _=this.props.precision,j=this.state.focused,W=w&&w.length>16&&j;return this.isNotCompleteNumber(w)||W?w:x(_)?Math.round(w*Math.pow(10,_))/Math.pow(10,_):Number(w)}},{key:"upStep",value:function(w,_){var j=this.props.step,W=this.getPrecisionFactor(w,_),Z=Math.abs(this.getMaxPrecision(w,_)),X=((W*w+W*j*_)/W).toFixed(Z);return this.toNumber(X)}},{key:"downStep",value:function(w,_){var j=this.props.step,W=this.getPrecisionFactor(w,_),Z=Math.abs(this.getMaxPrecision(w,_)),X=((W*w-W*j*_)/W).toFixed(Z);return this.toNumber(X)}},{key:"step",value:function(w,_){var j=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Z=arguments.length>3?arguments[3]:void 0;this.stop(),_&&(_.persist(),_.preventDefault());var X=this.props;if(X.disabled)return;var G=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(G))return;var te=this["".concat(w,"Step")](G,W),Y=te>X.max||te<X.min;if(te>X.max?te=X.max:te<X.min&&(te=X.min),this.setValue(te,null),this.setState({focused:!0},function(){j.pressingUpOrDown=!1}),Y)return;this.autoStepTimer=setTimeout(function(){j[w](_,W,!0)},Z?u:p)}},{key:"fixCaret",value:function(w,_){if(w===void 0||_===void 0||!this.input||!this.input.value)return;try{var j=this.input.selectionStart,W=this.input.selectionEnd;(w!==j||_!==W)&&this.input.setSelectionRange(w,_)}catch(Z){}}},{key:"render",value:function(){var w,_=this.props,j=_.prefixCls,W=_.disabled,Z=_.readOnly,X=_.useTouch,G=_.autoComplete,te=_.upHandler,Y=_.downHandler,le=_.className,Ae=_.max,Be=_.min,Ce=_.style,Se=_.title,Fe=_.onMouseEnter,Ve=_.onMouseLeave,De=_.onMouseOver,Le=_.onMouseOut,tt=_.required,Et=_.onClick,Ie=_.tabIndex,Qe=_.type,xe=_.placeholder,ie=_.id,$=_.inputMode,re=_.pattern,ce=_.step,be=_.maxLength,Me=_.autoFocus,ke=_.name,ct=_.onPaste,ut=_.onInput,mt=Object(J.a)(_,["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"]),pt=this.state,Ot=pt.value,Ft=pt.focused,He=i()(j,(w={},Object(N.a)(w,le,!!le),Object(N.a)(w,"".concat(j,"-disabled"),W),Object(N.a)(w,"".concat(j,"-focused"),Ft),w)),Pe={};Object.keys(mt).forEach(function(Oe){(Oe.substr(0,5)==="data-"||Oe.substr(0,5)==="aria-"||Oe==="role")&&(Pe[Oe]=mt[Oe])});var at=!Z&&!W,vt=this.getInputDisplayValue(null),et=(Ot||Ot===0)&&(isNaN(Ot)||Number(Ot)>=Ae),At=(Ot||Ot===0)&&(isNaN(Ot)||Number(Ot)<=Be),je=et||W||Z,_e=At||W||Z,Ue=i()("".concat(j,"-handler"),"".concat(j,"-handler-up"),Object(N.a)({},"".concat(j,"-handler-up-disabled"),je)),me=i()("".concat(j,"-handler"),"".concat(j,"-handler-down"),Object(N.a)({},"".concat(j,"-handler-down-disabled"),_e)),ve=X?{onTouchStart:je?o:this.up,onTouchEnd:this.stop}:{onMouseDown:je?o:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ee=X?{onTouchStart:_e?o:this.down,onTouchEnd:this.stop}:{onMouseDown:_e?o:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return b.a.createElement("div",{className:He,style:Ce,title:Se,onMouseEnter:Fe,onMouseLeave:Ve,onMouseOver:De,onMouseOut:Le,onFocus:function(){return null},onBlur:function(){return null}},b.a.createElement("div",{className:"".concat(j,"-handler-wrap")},b.a.createElement("span",Object.assign({unselectable:"on"},ve,{role:"button","aria-label":"Increase Value","aria-disabled":je,className:Ue}),te||b.a.createElement("span",{unselectable:"on",className:"".concat(j,"-handler-up-inner"),onClick:n})),b.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Decrease Value","aria-disabled":_e,className:me}),Y||b.a.createElement("span",{unselectable:"on",className:"".concat(j,"-handler-down-inner"),onClick:n}))),b.a.createElement("div",{className:"".concat(j,"-input-wrap")},b.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Be,"aria-valuemax":Ae,"aria-valuenow":Ot,required:tt,type:Qe,placeholder:xe,onPaste:ct,onClick:Et,onMouseUp:this.onMouseUp,className:"".concat(j,"-input"),tabIndex:Ie,autoComplete:G,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:at?this.onKeyDown:o,onKeyUp:at?this.onKeyUp:o,autoFocus:Me,maxLength:be,readOnly:Z,disabled:W,max:Ae,min:Be,step:ce,name:ke,title:Se,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(vt),pattern:re,inputMode:$,onInput:ut},Pe))))}}]),L}(b.a.Component);C.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:S,min:-S,step:1,style:{},onChange:o,onKeyDown:o,onPressEnter:o,onFocus:o,onBlur:o,parser:s,required:!1,autoComplete:"off"};var c=C,r=ue.a=c},dqUG:function(qe,ue,k){var J=k("Gev7"),N=k("bYtY"),O=k("6GrX"),Q=k("pzxd"),R=k("gut8"),B=R.ContextCachedBy,D=function(b){J.call(this,b)};D.prototype={constructor:D,type:"text",brush:function(b,g){var i=this.style;this.__dirty&&Q.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var l=i.text;if(l!=null&&(l+=""),!Q.needDrawText(l,i)){b.__attrCachedBy=B.NONE;return}this.setTransform(b),Q.renderText(this,b,l,i,null,g),this.restoreTransform(b)},getBoundingRect:function(){var b=this.style;if(this.__dirty&&Q.normalizeTextStyle(b,!0),!this._rect){var g=b.text;g!=null?g+="":g="";var i=O.getBoundingRect(b.text+"",b.font,b.textAlign,b.textVerticalAlign,b.textPadding,b.textLineHeight,b.rich);if(i.x+=b.x||0,i.y+=b.y||0,Q.getStroke(b.textStroke,b.textStrokeWidth)){var l=b.textStrokeWidth;i.x-=l/2,i.y-=l/2,i.width+=l,i.height+=l}this._rect=i}return this._rect}},N.inherits(D,J);var f=D;qe.exports=f},fW2E:function(qe,ue){var k={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};function J(N,O,Q){return k.hasOwnProperty(O)?Q*=N.dpr:Q}qe.exports=J},fjLI:function(qe,ue,k){"use strict";k.d(ue,"e",function(){return g}),k.d(ue,"a",function(){return i}),k.d(ue,"c",function(){return l}),k.d(ue,"d",function(){return h}),k.d(ue,"b",function(){return d});var J=k("8HAY"),N=k("Cg/j"),O=k("T8No"),Q=k("nnTU"),R=k("MI8n"),B=function(){var E=function(o,n){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var p in u)u.hasOwnProperty(p)&&(s[p]=u[p])},E(o,n)};return function(o,n){E(o,n);function s(){this.constructor=o}o.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}}(),D=function(E,o,n,s){var u=arguments.length,p=u<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,n):s,S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(E,o,n,s);else for(var x=E.length-1;x>=0;x--)(S=E[x])&&(p=(u<3?S(p):u>3?S(o,n,p):S(o,n))||p);return u>3&&p&&Object.defineProperty(o,n,p),p},f=function(E,o){return function(n,s){o(n,s,E)}},b=function(){for(var E=0,o=0,n=arguments.length;o<n;o++)E+=arguments[o].length;for(var s=Array(E),u=0,o=0;o<n;o++)for(var p=arguments[o],S=0,x=p.length;S<x;S++,u++)s[u]=p[S];return s};function g(E){return E.command!==void 0}var i=Object(N.c)("menuService"),l=new(function(){function E(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new R.a,this.onDidChangeMenu=this._onDidChangeMenu.event}return E.prototype.addCommand=function(o){var n=this;return this._commands.set(o.id,o),this._onDidChangeMenu.fire(0),{dispose:function(){n._commands.delete(o.id)&&n._onDidChangeMenu.fire(0)}}},E.prototype.getCommand=function(o){return this._commands.get(o)},E.prototype.getCommands=function(){var o=new Map;return this._commands.forEach(function(n,s){return o.set(s,n)}),o},E.prototype.appendMenuItem=function(o,n){var s=this,u=this._menuItems.get(o);return u?u.push(n):(u=[n],this._menuItems.set(o,u)),this._onDidChangeMenu.fire(o),{dispose:function(){var p=u.indexOf(n);p>=0&&(u.splice(p,1),s._onDidChangeMenu.fire(o))}}},E.prototype.getMenuItems=function(o){var n=(this._menuItems.get(o)||[]).slice(0);return o===0&&this._appendImplicitItems(n),n},E.prototype._appendImplicitItems=function(o){for(var n=new Set,s=o.filter(function(C){return g(C)}),u=0,p=s;u<p.length;u++){var S=p[u],x=S.command,M=S.alt;n.add(x.id),M&&n.add(M.id)}this._commands.forEach(function(C,c){n.has(c)||o.push({command:C})})},E}()),v=function(E){B(o,E);function o(n,s,u){var p=E.call(this,n,s)||this;return p._commandService=u,p}return o.prototype.run=function(){for(var n,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return(n=this._commandService).executeCommand.apply(n,b([this.id],s))},o=D([f(2,Q.b)],o),o}(J.a),h=function(E){B(o,E);function o(n){var s=this;return typeof n.title=="string"?s=E.call(this,"",n.title,"submenu")||this:s=E.call(this,"",n.title.value,"submenu")||this,s.item=n,s}return o}(J.a),d=function(E){B(o,E);function o(n,s,u,p,S){var x=this;return typeof n.title=="string"?x=E.call(this,n.id,n.title,S)||this:x=E.call(this,n.id,n.title.value,S)||this,x._cssClass=void 0,x._enabled=!n.precondition||p.contextMatchesRules(n.precondition),x._checked=Boolean(n.toggled&&p.contextMatchesRules(n.toggled)),x._options=u||{},x.item=n,x.alt=s?new o(s,void 0,x._options,p,S):void 0,x}return o.prototype.dispose=function(){this.alt&&this.alt.dispose(),E.prototype.dispose.call(this)},o.prototype.run=function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];var u=[];return this._options.arg&&(u=b(u,[this._options.arg])),this._options.shouldForwardArgs&&(u=b(u,n)),E.prototype.run.apply(this,u)},o=D([f(3,O.c),f(4,Q.b)],o),o}(v)},fyJ8:function(qe,ue,k){"use strict";var J=k("rePB"),N=k("VTBJ"),O=k("Ff2n"),Q=k("U8pU"),R=k("q1tI"),B=k.n(R),D=k("TSYQ"),f=k.n(D),b=k("c+Xe"),g=k("sR1s");function i(E){return E&&Object(Q.a)(E)==="object"&&!Array.isArray(E)&&!R.isValidElement(E)}function l(E){return typeof E=="string"?!0:Object(b.c)(E)}function v(E,o){var n,s=E.prefixCls,u=E.className,p=E.record,S=E.index,x=E.dataIndex,M=E.render,C=E.children,c=E.component,r=c===void 0?"td":c,a=E.colSpan,A=E.rowSpan,L=E.fixLeft,T=E.fixRight,w=E.firstFixLeft,_=E.lastFixLeft,j=E.firstFixRight,W=E.lastFixRight,Z=E.appendNode,X=E.additionalProps,G=X===void 0?{}:X,te=E.ellipsis,Y=E.align,le=E.rowType,Ae=E.isSticky,Be="".concat(s,"-cell"),Ce,Se;if(C)Se=C;else{var Fe=Object(g.b)(p,x);if(Se=Fe,M){var Ve=M(Fe,p,S);i(Ve)?(Se=Ve.children,Ce=Ve.props):Se=Ve}}Object(Q.a)(Se)==="object"&&!Array.isArray(Se)&&!R.isValidElement(Se)&&(Se=null),te&&(_||j)&&(Se=R.createElement("span",{className:"".concat(Be,"-content")},Se));var De=Ce||{},Le=De.colSpan,tt=De.rowSpan,Et=De.style,Ie=De.className,Qe=Object(O.a)(De,["colSpan","rowSpan","style","className"]),xe=Le!==void 0?Le:a,ie=tt!==void 0?tt:A;if(xe===0||ie===0)return null;var $={},re=typeof L=="number",ce=typeof T=="number";re&&($.position="sticky",$.left=L),ce&&($.position="sticky",$.right=T);var be={};Y&&(be.textAlign=Y);var Me,ke=te===!0?{showTitle:!0}:te;ke&&(ke.showTitle||le==="header")&&(typeof Se=="string"||typeof Se=="number"?Me=Se.toString():R.isValidElement(Se)&&typeof Se.props.children=="string"&&(Me=Se.props.children));var ct=Object(N.a)(Object(N.a)(Object(N.a)({title:Me},Qe),G),{},{colSpan:xe&&xe!==1?xe:null,rowSpan:ie&&ie!==1?ie:null,className:f()(Be,u,(n={},Object(J.a)(n,"".concat(Be,"-fix-left"),re),Object(J.a)(n,"".concat(Be,"-fix-left-first"),w),Object(J.a)(n,"".concat(Be,"-fix-left-last"),_),Object(J.a)(n,"".concat(Be,"-fix-right"),ce),Object(J.a)(n,"".concat(Be,"-fix-right-first"),j),Object(J.a)(n,"".concat(Be,"-fix-right-last"),W),Object(J.a)(n,"".concat(Be,"-ellipsis"),te),Object(J.a)(n,"".concat(Be,"-with-append"),Z),Object(J.a)(n,"".concat(Be,"-fix-sticky"),(re||ce)&&Ae),n),G.className,Ie),style:Object(N.a)(Object(N.a)(Object(N.a)(Object(N.a)({},G.style),be),$),Et),ref:l(r)?o:null});return R.createElement(r,Object.assign({},ct),Z,Se)}var h=R.forwardRef(v);h.displayName="Cell";var d=R.memo(h,function(E,o){return o.shouldCellUpdate?!o.shouldCellUpdate(o.record,E.record):!1});ue.a=d},gut8:function(qe,ue){var k={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},J=9;ue.ContextCachedBy=k,ue.WILL_BE_RESTORED=J},h7HQ:function(qe,ue,k){var J=k("y+Vt"),N=k("T6xi"),O=J.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(Q,R){N.buildPath(Q,R,!0)}});qe.exports=O},hOwI:function(qe,ue){var k=Math.log(2);function J(O,Q,R,B,D,f){var b=B+"-"+D,g=O.length;if(f.hasOwnProperty(b))return f[b];if(Q===1){var i=Math.round(Math.log((1<<g)-1&~D)/k);return O[R][i]}for(var l=B|1<<R,v=R+1;B&1<<v;)v++;for(var h=0,d=0,E=0;d<g;d++){var o=1<<d;o&D||(h+=(E%2?-1:1)*O[R][d]*J(O,Q-1,v,l,D|o,f),E++)}return f[b]=h,h}function N(O,Q){var R=[[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]]],B={},D=J(R,8,0,0,0,B);if(D===0)return;for(var f=[],b=0;b<8;b++)for(var g=0;g<8;g++)f[g]==null&&(f[g]=0),f[g]+=((b+g)%2?-1:1)*J(R,7,b===0?1:0,1<<b,1<<g,B)/D*Q[b];return function(i,l,v){var h=l*f[6]+v*f[7]+1;i[0]=(l*f[0]+v*f[1]+f[2])/h,i[1]=(l*f[3]+v*f[4]+f[5])/h}}ue.buildTransformer=N},hW8S:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return Q}),k.d(ue,"c",function(){return R}),k.d(ue,"b",function(){return B});var J=k("VTBJ"),N=k("Ff2n"),O=k("Kwbf"),Q="RC_TABLE_INTERNAL_COL_DEFINE";function R(D){var f=D.expandable,b=Object(N.a)(D,["expandable"]);return"expandable"in D?Object(J.a)(Object(J.a)({},b),f):b}function B(D){return Object.keys(D).reduce(function(f,b){return(b.substr(0,5)==="data-"||b.substr(0,5)==="aria-")&&(f[b]=D[b]),f},{})}},hX1E:function(qe,ue){var k=Math.PI*2;function J(N){return N%=k,N<0&&(N+=k),N}ue.normalizeRadian=J},hydK:function(qe,ue){var k="http://www.w3.org/2000/svg";function J(N){return document.createElementNS(k,N)}ue.createElement=J},hyiK:function(qe,ue){function k(J,N,O,Q,R,B){if(B>N&&B>Q||B<N&&B<Q)return 0;if(Q===N)return 0;var D=Q<N?1:-1,f=(B-N)/(Q-N);(f===1||f===0)&&(D=Q<N?.5:-.5);var b=f*(O-J)+J;return b===R?Infinity:b>R?D:0}qe.exports=k},iXp4:function(qe,ue,k){var J=k("ItGF"),N=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];function O(Q){return J.browser.ie&&J.browser.version>=11?function(){var R=this.__clipPaths,B=this.style,D;if(R)for(var f=0;f<R.length;f++){var b=R[f],g=b&&b.shape,i=b&&b.type;if(g&&(i==="sector"&&g.startAngle===g.endAngle||i==="rect"&&(!g.width||!g.height))){for(var l=0;l<N.length;l++)N[l][2]=B[N[l][0]],B[N[l][0]]=N[l][1];D=!0;break}}if(Q.apply(this,arguments),D)for(var l=0;l<N.length;l++)B[N[l][0]]=N[l][2]}:Q}qe.exports=O},j5sG:function(qe,ue,k){"use strict";Object.defineProperty(ue,"__esModule",{value:!0}),ue.createSensor=void 0;var J=N(k("NohK"));function N(Q){return Q&&Q.__esModule?Q:{default:Q}}var O=function(R){var B=void 0,D=[],f=(0,J.default)(function(){D.forEach(function(v){v(R)})}),b=function(){var h=new ResizeObserver(f);return h.observe(R),f(),h},g=function(h){B||(B=b()),D.indexOf(h)===-1&&D.push(h)},i=function(){B.disconnect(),D=[],B=void 0},l=function(h){var d=D.indexOf(h);d!==-1&&D.splice(d,1),D.length===0&&B&&i()};return{element:R,bind:g,destroy:i,unbind:l}};ue.createSensor=O},jTL6:function(qe,ue,k){var J=k("y+Vt"),N=J.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 R=Q.cx,B=Q.cy,D=Math.max(Q.r,0),f=Q.startAngle,b=Q.endAngle,g=Q.clockwise,i=Math.cos(f),l=Math.sin(f);O.moveTo(i*D+R,l*D+B),O.arc(R,B,D,f,b,!g)}});qe.exports=N},juDX:function(qe,ue,k){k("P47w");var J=k("aX58"),N=J.registerPainter,O=k("3CBa");N("svg",O)},kSUc:function(qe,ue,k){},"kVK+":function(qe,ue){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ue.read=function(k,J,N,O,Q){var R,B,D=Q*8-O-1,f=(1<<D)-1,b=f>>1,g=-7,i=N?Q-1:0,l=N?-1:1,v=k[J+i];for(i+=l,R=v&(1<<-g)-1,v>>=-g,g+=D;g>0;R=R*256+k[J+i],i+=l,g-=8);for(B=R&(1<<-g)-1,R>>=-g,g+=O;g>0;B=B*256+k[J+i],i+=l,g-=8);if(R===0)R=1-b;else{if(R===f)return B?NaN:(v?-1:1)*Infinity;B=B+Math.pow(2,O),R=R-b}return(v?-1:1)*B*Math.pow(2,R-O)},ue.write=function(k,J,N,O,Q,R){var B,D,f,b=R*8-Q-1,g=(1<<b)-1,i=g>>1,l=Q===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=O?0:R-1,h=O?1:-1,d=J<0||J===0&&1/J<0?1:0;for(J=Math.abs(J),isNaN(J)||J===Infinity?(D=isNaN(J)?1:0,B=g):(B=Math.floor(Math.log(J)/Math.LN2),J*(f=Math.pow(2,-B))<1&&(B--,f*=2),B+i>=1?J+=l/f:J+=l*Math.pow(2,1-i),J*f>=2&&(B++,f/=2),B+i>=g?(D=0,B=g):B+i>=1?(D=(J*f-1)*Math.pow(2,Q),B=B+i):(D=J*Math.pow(2,i-1)*Math.pow(2,Q),B=0));Q>=8;k[N+v]=D&255,v+=h,D/=256,Q-=8);for(B=B<<Q|D,b+=Q;b>0;k[N+v]=B&255,v+=h,B/=256,b-=8);k[N+v-h]|=d*128}},lZu9:function(qe,ue,k){(function(J){J(k("VrN/"),k("1eCo"),k("8EBN"))})(function(J){"use strict";J.defineMode("markdown",function(N,O){var Q=J.getMode(N,"text/html"),R=Q.name=="null";function B(X){if(J.findModeByName){var G=J.findModeByName(X);G&&(X=G.mime||G.mimes[0])}var te=J.getMode(N,X);return te.name=="null"?null:te}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 D={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 f in D)D.hasOwnProperty(f)&&O.tokenTypeOverrides[f]&&(D[f]=O.tokenTypeOverrides[f]);var b=/^([*\-_])(?:\s*\1){2,}\s*$/,g=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,i=/^\[(x| )\](?=\s)/i,l=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,v=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,d=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,E=/^\s*\[[^\]]+?\]:.*$/,o=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,n=" ";function s(X,G,te){return G.f=G.inline=te,te(X,G)}function u(X,G,te){return G.f=G.block=te,te(X,G)}function p(X){return!X||!/\S/.test(X.string)}function S(X){if(X.linkTitle=!1,X.linkHref=!1,X.linkText=!1,X.em=!1,X.strong=!1,X.strikethrough=!1,X.quote=0,X.indentedCode=!1,X.f==M){var G=R;if(!G){var te=J.innerMode(Q,X.htmlState);G=te.mode.name=="xml"&&te.state.tagStart===null&&!te.state.context&&te.state.tokenize.isInText}G&&(X.f=a,X.block=x,X.htmlState=null)}return X.trailingSpace=0,X.trailingSpaceNewLine=!1,X.prevLine=X.thisLine,X.thisLine={stream:null},null}function x(X,G){var te=X.column()===G.indentation,Y=p(G.prevLine.stream),le=G.indentedCode,Ae=G.prevLine.hr,Be=G.list!==!1,Ce=(G.listStack[G.listStack.length-1]||0)+3;G.indentedCode=!1;var Se=G.indentation;if(G.indentationDiff===null&&(G.indentationDiff=G.indentation,Be)){for(G.list=null;Se<G.listStack[G.listStack.length-1];)G.listStack.pop(),G.listStack.length?G.indentation=G.listStack[G.listStack.length-1]:G.list=!1;G.list!==!1&&(G.indentationDiff=Se-G.listStack[G.listStack.length-1])}var Fe=!Y&&!Ae&&!G.prevLine.header&&(!Be||!le)&&!G.prevLine.fencedCodeEnd,Ve=(G.list===!1||Ae||Y)&&G.indentation<=Ce&&X.match(b),De=null;if(G.indentationDiff>=4&&(le||G.prevLine.fencedCodeEnd||G.prevLine.header||Y))return X.skipToEnd(),G.indentedCode=!0,D.code;if(X.eatSpace())return null;if(te&&G.indentation<=Ce&&(De=X.match(l))&&De[1].length<=6)return G.quote=0,G.header=De[1].length,G.thisLine.header=!0,O.highlightFormatting&&(G.formatting="header"),G.f=G.inline,c(G);if(G.indentation<=Ce&&X.eat(">"))return G.quote=te?1:G.quote+1,O.highlightFormatting&&(G.formatting="quote"),X.eatSpace(),c(G);if(!Ve&&!G.setext&&te&&G.indentation<=Ce&&(De=X.match(g))){var Le=De[1]?"ol":"ul";return G.indentation=Se+X.current().length,G.list=!0,G.quote=0,G.listStack.push(G.indentation),G.em=!1,G.strong=!1,G.code=!1,G.strikethrough=!1,O.taskLists&&X.match(i,!1)&&(G.taskList=!0),G.f=G.inline,O.highlightFormatting&&(G.formatting=["list","list-"+Le]),c(G)}else{if(te&&G.indentation<=Ce&&(De=X.match(d,!0)))return G.quote=0,G.fencedEndRE=new RegExp(De[1]+"+ *$"),G.localMode=O.fencedCodeBlockHighlighting&&B(De[2]||O.fencedCodeBlockDefaultMode),G.localMode&&(G.localState=J.startState(G.localMode)),G.f=G.block=C,O.highlightFormatting&&(G.formatting="code-block"),G.code=-1,c(G);if(G.setext||(!Fe||!Be)&&!G.quote&&G.list===!1&&!G.code&&!Ve&&!E.test(X.string)&&(De=X.lookAhead(1))&&(De=De.match(v)))return G.setext?(G.header=G.setext,G.setext=0,X.skipToEnd(),O.highlightFormatting&&(G.formatting="header")):(G.header=De[0].charAt(0)=="="?1:2,G.setext=G.header),G.thisLine.header=!0,G.f=G.inline,c(G);if(Ve)return X.skipToEnd(),G.hr=!0,G.thisLine.hr=!0,D.hr;if(X.peek()==="[")return s(X,G,_)}return s(X,G,G.inline)}function M(X,G){var te=Q.token(X,G.htmlState);if(!R){var Y=J.innerMode(Q,G.htmlState);(Y.mode.name=="xml"&&Y.state.tagStart===null&&!Y.state.context&&Y.state.tokenize.isInText||G.md_inside&&X.current().indexOf(">")>-1)&&(G.f=a,G.block=x,G.htmlState=null)}return te}function C(X,G){var te=G.listStack[G.listStack.length-1]||0,Y=G.indentation<te,le=te+3;if(G.fencedEndRE&&G.indentation<=le&&(Y||X.match(G.fencedEndRE))){O.highlightFormatting&&(G.formatting="code-block");var Ae;return Y||(Ae=c(G)),G.localMode=G.localState=null,G.block=x,G.f=a,G.fencedEndRE=null,G.code=0,G.thisLine.fencedCodeEnd=!0,Y?u(X,G,G.block):Ae}else return G.localMode?G.localMode.token(X,G.localState):(X.skipToEnd(),D.code)}function c(X){var G=[];if(X.formatting){G.push(D.formatting),typeof X.formatting=="string"&&(X.formatting=[X.formatting]);for(var te=0;te<X.formatting.length;te++)G.push(D.formatting+"-"+X.formatting[te]),X.formatting[te]==="header"&&G.push(D.formatting+"-"+X.formatting[te]+"-"+X.header),X.formatting[te]==="quote"&&(!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=X.quote?G.push(D.formatting+"-"+X.formatting[te]+"-"+X.quote):G.push("error"))}if(X.taskOpen)return G.push("meta"),G.length?G.join(" "):null;if(X.taskClosed)return G.push("property"),G.length?G.join(" "):null;if(X.linkHref?G.push(D.linkHref,"url"):(X.strong&&G.push(D.strong),X.em&&G.push(D.em),X.strikethrough&&G.push(D.strikethrough),X.emoji&&G.push(D.emoji),X.linkText&&G.push(D.linkText),X.code&&G.push(D.code),X.image&&G.push(D.image),X.imageAltText&&G.push(D.imageAltText,"link"),X.imageMarker&&G.push(D.imageMarker)),X.header&&G.push(D.header,D.header+"-"+X.header),X.quote&&(G.push(D.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=X.quote?G.push(D.quote+"-"+X.quote):G.push(D.quote+"-"+O.maxBlockquoteDepth)),X.list!==!1){var Y=(X.listStack.length-1)%3;Y?Y===1?G.push(D.list2):G.push(D.list3):G.push(D.list1)}return X.trailingSpaceNewLine?G.push("trailing-space-new-line"):X.trailingSpace&&G.push("trailing-space-"+(X.trailingSpace%2?"a":"b")),G.length?G.join(" "):null}function r(X,G){return X.match(h,!0)?c(G):void 0}function a(X,G){var te=G.text(X,G);if(typeof te!="undefined")return te;if(G.list)return G.list=null,c(G);if(G.taskList){var Y=X.match(i,!0)[1]===" ";return Y?G.taskOpen=!0:G.taskClosed=!0,O.highlightFormatting&&(G.formatting="task"),G.taskList=!1,c(G)}if(G.taskOpen=!1,G.taskClosed=!1,G.header&&X.match(/^#+$/,!0))return O.highlightFormatting&&(G.formatting="header"),c(G);var le=X.next();if(G.linkTitle){G.linkTitle=!1;var Ae=le;le==="("&&(Ae=")"),Ae=(Ae+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Be="^\\s*(?:[^"+Ae+"\\\\]+|\\\\\\\\|\\\\.)"+Ae;if(X.match(new RegExp(Be),!0))return D.linkHref}if(le==="`"){var Ce=G.formatting;O.highlightFormatting&&(G.formatting="code"),X.eatWhile("`");var Se=X.current().length;if(G.code==0&&(!G.quote||Se==1))return G.code=Se,c(G);if(Se==G.code){var Fe=c(G);return G.code=0,Fe}else return G.formatting=Ce,c(G)}else if(G.code)return c(G);if(le==="\\"&&(X.next(),O.highlightFormatting)){var Ve=c(G),De=D.formatting+"-escape";return Ve?Ve+" "+De:De}if(le==="!"&&X.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return G.imageMarker=!0,G.image=!0,O.highlightFormatting&&(G.formatting="image"),c(G);if(le==="["&&G.imageMarker&&X.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return G.imageMarker=!1,G.imageAltText=!0,O.highlightFormatting&&(G.formatting="image"),c(G);if(le==="]"&&G.imageAltText){O.highlightFormatting&&(G.formatting="image");var Ve=c(G);return G.imageAltText=!1,G.image=!1,G.inline=G.f=L,Ve}if(le==="["&&!G.image)return G.linkText&&X.match(/^.*?\]/)||(G.linkText=!0,O.highlightFormatting&&(G.formatting="link")),c(G);if(le==="]"&&G.linkText){O.highlightFormatting&&(G.formatting="link");var Ve=c(G);return G.linkText=!1,G.inline=G.f=X.match(/\(.*?\)| ?\[.*?\]/,!1)?L:a,Ve}if(le==="<"&&X.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=A,O.highlightFormatting&&(G.formatting="link");var Ve=c(G);return Ve?Ve+=" ":Ve="",Ve+D.linkInline}if(le==="<"&&X.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=A,O.highlightFormatting&&(G.formatting="link");var Ve=c(G);return Ve?Ve+=" ":Ve="",Ve+D.linkEmail}if(O.xml&&le==="<"&&X.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Le=X.string.indexOf(">",X.pos);if(Le!=-1){var tt=X.string.substring(X.start,Le);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(tt)&&(G.md_inside=!0)}return X.backUp(1),G.htmlState=J.startState(Q),u(X,G,M)}if(O.xml&&le==="<"&&X.match(/^\/\w*?>/))return G.md_inside=!1,"tag";if(le==="*"||le==="_"){for(var Et=1,Ie=X.pos==1?" ":X.string.charAt(X.pos-2);Et<3&&X.eat(le);)Et++;var Qe=X.peek()||" ",xe=!/\s/.test(Qe)&&(!o.test(Qe)||/\s/.test(Ie)||o.test(Ie)),ie=!/\s/.test(Ie)&&(!o.test(Ie)||/\s/.test(Qe)||o.test(Qe)),$=null,re=null;if(Et%2&&(!G.em&&xe&&(le==="*"||!ie||o.test(Ie))?$=!0:G.em==le&&ie&&(le==="*"||!xe||o.test(Qe))&&($=!1)),Et>1&&(!G.strong&&xe&&(le==="*"||!ie||o.test(Ie))?re=!0:G.strong==le&&ie&&(le==="*"||!xe||o.test(Qe))&&(re=!1)),re!=null||$!=null){O.highlightFormatting&&(G.formatting=$==null?"strong":re==null?"em":"strong em"),$===!0&&(G.em=le),re===!0&&(G.strong=le);var Fe=c(G);return $===!1&&(G.em=!1),re===!1&&(G.strong=!1),Fe}}else if(le===" "&&(X.eat("*")||X.eat("_"))){if(X.peek()===" ")return c(G);X.backUp(1)}if(O.strikethrough){if(le==="~"&&X.eatWhile(le)){if(G.strikethrough){O.highlightFormatting&&(G.formatting="strikethrough");var Fe=c(G);return G.strikethrough=!1,Fe}else if(X.match(/^[^\s]/,!1))return G.strikethrough=!0,O.highlightFormatting&&(G.formatting="strikethrough"),c(G)}else if(le===" "&&X.match(/^~~/,!0)){if(X.peek()===" ")return c(G);X.backUp(2)}}if(O.emoji&&le===":"&&X.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){G.emoji=!0,O.highlightFormatting&&(G.formatting="emoji");var ce=c(G);return G.emoji=!1,ce}return le===" "&&(X.match(/^ +$/,!1)?G.trailingSpace++:G.trailingSpace&&(G.trailingSpaceNewLine=!0)),c(G)}function A(X,G){var te=X.next();if(te===">"){G.f=G.inline=a,O.highlightFormatting&&(G.formatting="link");var Y=c(G);return Y?Y+=" ":Y="",Y+D.linkInline}return X.match(/^[^>]+/,!0),D.linkInline}function L(X,G){if(X.eatSpace())return null;var te=X.next();return te==="("||te==="["?(G.f=G.inline=w(te==="("?")":"]"),O.highlightFormatting&&(G.formatting="link-string"),G.linkHref=!0,c(G)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function w(X){return function(G,te){var Y=G.next();if(Y===X){te.f=te.inline=a,O.highlightFormatting&&(te.formatting="link-string");var le=c(te);return te.linkHref=!1,le}return G.match(T[X]),te.linkHref=!0,c(te)}}function _(X,G){return X.match(/^([^\]\\]|\\.)*\]:/,!1)?(G.f=j,X.next(),O.highlightFormatting&&(G.formatting="link"),G.linkText=!0,c(G)):s(X,G,a)}function j(X,G){if(X.match(/^\]:/,!0)){G.f=G.inline=W,O.highlightFormatting&&(G.formatting="link");var te=c(G);return G.linkText=!1,te}return X.match(/^([^\]\\]|\\.)+/,!0),D.linkText}function W(X,G){return X.eatSpace()?null:(X.match(/^[^\s]+/,!0),X.peek()===void 0?G.linkTitle=!0:X.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),G.f=G.inline=a,D.linkHref+" url")}var Z={startState:function(){return{f:x,prevLine:{stream:null},thisLine:{stream:null},block:x,htmlState:null,indentation:0,inline:a,text:r,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(X){return{f:X.f,prevLine:X.prevLine,thisLine:X.thisLine,block:X.block,htmlState:X.htmlState&&J.copyState(Q,X.htmlState),indentation:X.indentation,localMode:X.localMode,localState:X.localMode?J.copyState(X.localMode,X.localState):null,inline:X.inline,text:X.text,formatting:!1,linkText:X.linkText,linkTitle:X.linkTitle,linkHref:X.linkHref,code:X.code,em:X.em,strong:X.strong,strikethrough:X.strikethrough,emoji:X.emoji,header:X.header,setext:X.setext,hr:X.hr,taskList:X.taskList,list:X.list,listStack:X.listStack.slice(0),quote:X.quote,indentedCode:X.indentedCode,trailingSpace:X.trailingSpace,trailingSpaceNewLine:X.trailingSpaceNewLine,md_inside:X.md_inside,fencedEndRE:X.fencedEndRE}},token:function(X,G){if(G.formatting=!1,X!=G.thisLine.stream){if(G.header=0,G.hr=!1,X.match(/^\s*$/,!0))return S(G),null;if(G.prevLine=G.thisLine,G.thisLine={stream:X},G.taskList=!1,G.trailingSpace=0,G.trailingSpaceNewLine=!1,!G.localState&&(G.f=G.block,G.f!=M)){var te=X.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(G.indentation=te,G.indentationDiff=null,te>0)return null}}return G.f(X,G)},innerMode:function(X){return X.block==M?{state:X.htmlState,mode:Q}:X.localState?{state:X.localState,mode:X.localMode}:{state:X,mode:Z}},indent:function(X,G,te){return X.block==M&&Q.indent?Q.indent(X.htmlState,G,te):X.localState&&X.localMode.indent?X.localMode.indent(X.localState,G,te):J.Pass},blankLine:S,getType:c,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Z},"xml"),J.defineMIME("text/markdown","markdown"),J.defineMIME("text/x-markdown","markdown")})},loD1:function(qe,ue){function k(J,N,O,Q,R,B,D){if(R===0)return!1;var f=R,b=0,g=J;if(D>N+f&&D>Q+f||D<N-f&&D<Q-f||B>J+f&&B>O+f||B<J-f&&B<O-f)return!1;if(J!==O)b=(N-Q)/(J-O),g=(J*Q-O*N)/(J-O);else return Math.abs(B-J)<=f/2;var i=b*B-D+g,l=i*i/(b*b+1);return l<=f/2*f/2}ue.containStroke=k},mFDi:function(qe,ue,k){var J=k("QBsz"),N=k("Fofx"),O=J.applyTransform,Q=Math.min,R=Math.max;function B(f,b,g,i){g<0&&(f=f+g,g=-g),i<0&&(b=b+i,i=-i),this.x=f,this.y=b,this.width=g,this.height=i}B.prototype={constructor:B,union:function(f){var b=Q(f.x,this.x),g=Q(f.y,this.y);this.width=R(f.x+f.width,this.x+this.width)-b,this.height=R(f.y+f.height,this.y+this.height)-g,this.x=b,this.y=g},applyTransform:function(){var f=[],b=[],g=[],i=[];return function(l){if(!l)return;f[0]=g[0]=this.x,f[1]=i[1]=this.y,b[0]=i[0]=this.x+this.width,b[1]=g[1]=this.y+this.height,O(f,f,l),O(b,b,l),O(g,g,l),O(i,i,l),this.x=Q(f[0],b[0],g[0],i[0]),this.y=Q(f[1],b[1],g[1],i[1]);var v=R(f[0],b[0],g[0],i[0]),h=R(f[1],b[1],g[1],i[1]);this.width=v-this.x,this.height=h-this.y}}(),calculateTransform:function(f){var b=this,g=f.width/b.width,i=f.height/b.height,l=N.create();return N.translate(l,l,[-b.x,-b.y]),N.scale(l,l,[g,i]),N.translate(l,l,[f.x,f.y]),l},intersect:function(f){if(!f)return!1;f instanceof B||(f=B.create(f));var b=this,g=b.x,i=b.x+b.width,l=b.y,v=b.y+b.height,h=f.x,d=f.x+f.width,E=f.y,o=f.y+f.height;return!(i<h||d<g||v<E||o<l)},contain:function(f,b){var g=this;return f>=g.x&&f<=g.x+g.width&&b>=g.y&&b<=g.y+g.height},clone:function(){return new B(this.x,this.y,this.width,this.height)},copy:function(f){this.x=f.x,this.y=f.y,this.width=f.width,this.height=f.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},B.create=function(f){return new B(f.x,f.y,f.width,f.height)};var D=B;qe.exports=D},mLcG:function(qe,ue){var k=typeof window!="undefined"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(J){setTimeout(J,16)};qe.exports=k},n1HI:function(qe,ue,k){var J=k("hX1E"),N=J.normalizeRadian,O=Math.PI*2;function Q(R,B,D,f,b,g,i,l,v){if(i===0)return!1;var h=i;l-=R,v-=B;var d=Math.sqrt(l*l+v*v);if(d-h>D||d+h<D)return!1;if(Math.abs(f-b)%O<1e-4)return!0;if(g){var E=f;f=N(b),b=N(E)}else f=N(f),b=N(b);f>b&&(b+=O);var o=Math.atan2(v,l);return o<0&&(o+=O),o>=f&&o<=b||o+O>=f&&o+O<=b}ue.containStroke=Q},n6Mw:function(qe,ue,k){var J=k("SrGk"),N=k("bYtY"),O=k("Fofx");function Q(B,D){J.call(this,B,D,"clipPath","__clippath_in_use__")}N.inherits(Q,J),Q.prototype.update=function(B){var D=this.getSvgElement(B);D&&this.updateDom(D,B.__clipPaths,!1);var f=this.getTextSvgElement(B);f&&this.updateDom(f,B.__clipPaths,!0),this.markUsed(B)},Q.prototype.updateDom=function(B,D,f){if(D&&D.length>0){var b=this.getDefs(!0),g=D[0],i,l,v=f?"_textDom":"_dom";g[v]?(l=g[v].getAttribute("id"),i=g[v],b.contains(i)||b.appendChild(i)):(l="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,i=this.createElement("clipPath"),i.setAttribute("id",l),b.appendChild(i),g[v]=i);var h=this.getSvgProxy(g);if(g.transform&&g.parent.invTransform&&!f){var d=Array.prototype.slice.call(g.transform);O.mul(g.transform,g.parent.invTransform,g.transform),h.brush(g),g.transform=d}else h.brush(g);var E=this.getSvgElement(g);i.innerHTML="",i.appendChild(E.cloneNode()),B.setAttribute("clip-path","url(#"+l+")"),D.length>1&&this.updateDom(i,D.slice(1),f)}else B&&B.setAttribute("clip-path","none")},Q.prototype.markUsed=function(B){var D=this;B.__clipPaths&&N.each(B.__clipPaths,function(f){f._dom&&J.prototype.markUsed.call(D,f._dom),f._textDom&&J.prototype.markUsed.call(D,f._textDom)})};var R=Q;qe.exports=R},n6Qo:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return f});var J=k("q1tI"),N=k("biw7"),O=k("fyJ8");function Q(b){var g=b.className,i=b.index,l=b.children,v=b.colSpan,h=b.rowSpan,d=J.useContext(N.a),E=d.prefixCls,o=d.fixedInfoList,n=o[i];return J.createElement(O.a,Object.assign({className:g,index:i,component:"td",prefixCls:E,record:null,dataIndex:null,render:function(){return{children:l,props:{colSpan:v,rowSpan:h}}}},n))}function R(b){return J.createElement("tr",Object.assign({},b))}function B(b){var g=b.children,i=J.useContext(N.a),l=i.prefixCls;return J.createElement("tfoot",{className:"".concat(l,"-summary")},g)}var D=ue.b=B,f={Cell:Q,Row:R}},nCxF:function(qe,ue,k){var J=k("QBsz"),N=J.min,O=J.max,Q=J.scale,R=J.distance,B=J.add,D=J.clone,f=J.sub;function b(g,i,l,v){var h=[],d=[],E=[],o=[],n,s,u,p;if(v){u=[Infinity,Infinity],p=[-Infinity,-Infinity];for(var S=0,x=g.length;S<x;S++)N(u,u,g[S]),O(p,p,g[S]);N(u,u,v[0]),O(p,p,v[1])}for(var S=0,x=g.length;S<x;S++){var M=g[S];if(l)n=g[S?S-1:x-1],s=g[(S+1)%x];else if(S===0||S===x-1){h.push(D(g[S]));continue}else n=g[S-1],s=g[S+1];f(d,s,n),Q(d,d,i);var C=R(M,n),c=R(M,s),r=C+c;r!==0&&(C/=r,c/=r),Q(E,d,-C),Q(o,d,c);var a=B([],M,E),A=B([],M,o);v&&(O(a,a,u),N(a,a,p),O(A,A,u),N(A,A,p)),h.push(a),h.push(A)}return l&&h.push(h.shift()),h}qe.exports=b},nPnh:function(qe,ue){var k=Math.round;function J(Q,R,B){if(!R)return;var D=R.x1,f=R.x2,b=R.y1,g=R.y2;Q.x1=D,Q.x2=f,Q.y1=b,Q.y2=g;var i=B&&B.lineWidth;if(!i)return;k(D*2)===k(f*2)&&(Q.x1=Q.x2=O(D,i,!0)),k(b*2)===k(g*2)&&(Q.y1=Q.y2=O(b,i,!0))}function N(Q,R,B){if(!R)return;var D=R.x,f=R.y,b=R.width,g=R.height;Q.x=D,Q.y=f,Q.width=b,Q.height=g;var i=B&&B.lineWidth;if(!i)return;Q.x=O(D,i,!0),Q.y=O(f,i,!0),Q.width=Math.max(O(D+b,i,!1)-Q.x,b===0?0:1),Q.height=Math.max(O(f+g,i,!1)-Q.y,g===0?0:1)}function O(Q,R,B){if(!R)return Q;var D=k(Q*2);return(D+k(R))%2===0?D/2:(D+(B?1:-1))/2}ue.subPixelOptimizeLine=J,ue.subPixelOptimizeRect=N,ue.subPixelOptimize=O},ni6a:function(qe,ue,k){var J=k("pzxd"),N=k("mFDi"),O=k("gut8"),Q=O.WILL_BE_RESTORED,R=new N,B=function(){};B.prototype={constructor:B,drawRectText:function(f,b){var g=this.style;b=g.textRect||b,this.__dirty&&J.normalizeTextStyle(g,!0);var i=g.text;if(i!=null&&(i+=""),!J.needDrawText(i,g))return;f.save();var l=this.transform;g.transformText?this.setTransform(f):l&&(R.copy(b),R.applyTransform(l),b=R),J.renderText(this,f,i,g,b,Q),f.restore()}};var D=B;qe.exports=D},nnTU:function(qe,ue,k){"use strict";k.d(ue,"b",function(){return f}),k.d(ue,"a",function(){return b});var J=k("pmY6"),N=k("746U"),O=k("Cg/j"),Q=k("MI8n"),R=k("24hK"),B=k("QDVR"),D=function(){for(var g=0,i=0,l=arguments.length;i<l;i++)g+=arguments[i].length;for(var v=Array(g),h=0,i=0;i<l;i++)for(var d=arguments[i],E=0,o=d.length;E<o;E++,h++)v[h]=d[E];return v},f=Object(O.c)("commandService"),b=new(function(){function g(){this._commands=new Map,this._onDidRegisterCommand=new Q.a,this.onDidRegisterCommand=this._onDidRegisterCommand.event}return g.prototype.registerCommand=function(i,l){var v=this;if(!i)throw new Error("invalid command");if(typeof i=="string"){if(!l)throw new Error("invalid command");return this.registerCommand({id:i,handler:l})}if(i.description){for(var h=[],d=0,E=i.description.args;d<E.length;d++){var o=E[d];h.push(o.constraint)}var n=i.handler;i.handler=function(x){for(var M=[],C=1;C<arguments.length;C++)M[C-1]=arguments[C];return Object(N.m)(M,h),n.apply(void 0,D([x],M))}}var s=i.id,u=this._commands.get(s);u||(u=new R.a,this._commands.set(s,u));var p=u.unshift(i),S=Object(J.h)(function(){p();var x=v._commands.get(s);(x==null?void 0:x.isEmpty())&&v._commands.delete(s)});return this._onDidRegisterCommand.fire(s),S},g.prototype.registerCommandAlias=function(i,l){return b.registerCommand(i,function(v){for(var h,d=[],E=1;E<arguments.length;E++)d[E-1]=arguments[E];return(h=v.get(f)).executeCommand.apply(h,D([l],d))})},g.prototype.getCommand=function(i){var l=this._commands.get(i);return!l||l.isEmpty()?void 0:l.iterator().next().value},g.prototype.getCommands=function(){for(var i=new Map,l=0,v=Object(B.d)(this._commands);l<v.length;l++){var h=v[l],d=this.getCommand(h);d&&i.set(h,d)}return i},g}())},osHv:function(qe,ue,k){(function(J){J(k("VrN/"))})(function(J){"use strict";var N=J.Pos;function O(o,n){return o.line-n.line||o.ch-n.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",R=Q+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",B=new RegExp("<(/?)(["+Q+"]["+R+"]*)","g");function D(o,n,s,u){this.line=n,this.ch=s,this.cm=o,this.text=o.getLine(n),this.min=u?Math.max(u.from,o.firstLine()):o.firstLine(),this.max=u?Math.min(u.to-1,o.lastLine()):o.lastLine()}function f(o,n){var s=o.cm.getTokenTypeAt(N(o.line,n));return s&&/\btag\b/.test(s)}function b(o){return o.line>=o.max?void 0:(o.ch=0,o.text=o.cm.getLine(++o.line),!0)}function g(o){return o.line<=o.min?void 0:(o.text=o.cm.getLine(--o.line),o.ch=o.text.length,!0)}function i(o){for(;;){var n=o.text.indexOf(">",o.ch);if(n==-1){if(b(o))continue;return}if(!f(o,n+1)){o.ch=n+1;continue}var s=o.text.lastIndexOf("/",n),u=s>-1&&!/\S/.test(o.text.slice(s+1,n));return o.ch=n+1,u?"selfClose":"regular"}}function l(o){for(;;){var n=o.ch?o.text.lastIndexOf("<",o.ch-1):-1;if(n==-1){if(g(o))continue;return}if(!f(o,n+1)){o.ch=n;continue}B.lastIndex=n,o.ch=n;var s=B.exec(o.text);if(s&&s.index==n)return s}}function v(o){for(;;){B.lastIndex=o.ch;var n=B.exec(o.text);if(!n){if(b(o))continue;return}if(!f(o,n.index+1)){o.ch=n.index+1;continue}return o.ch=n.index+n[0].length,n}}function h(o){for(;;){var n=o.ch?o.text.lastIndexOf(">",o.ch-1):-1;if(n==-1){if(g(o))continue;return}if(!f(o,n+1)){o.ch=n;continue}var s=o.text.lastIndexOf("/",n),u=s>-1&&!/\S/.test(o.text.slice(s+1,n));return o.ch=n+1,u?"selfClose":"regular"}}function d(o,n){for(var s=[];;){var u=v(o),p,S=o.line,x=o.ch-(u?u[0].length:0);if(!u||!(p=i(o)))return;if(p=="selfClose")continue;if(u[1]){for(var M=s.length-1;M>=0;--M)if(s[M]==u[2]){s.length=M;break}if(M<0&&(!n||n==u[2]))return{tag:u[2],from:N(S,x),to:N(o.line,o.ch)}}else s.push(u[2])}}function E(o,n){for(var s=[];;){var u=h(o);if(!u)return;if(u=="selfClose"){l(o);continue}var p=o.line,S=o.ch,x=l(o);if(!x)return;if(x[1])s.push(x[2]);else{for(var M=s.length-1;M>=0;--M)if(s[M]==x[2]){s.length=M;break}if(M<0&&(!n||n==x[2]))return{tag:x[2],from:N(o.line,o.ch),to:N(p,S)}}}}J.registerHelper("fold","xml",function(o,n){for(var s=new D(o,n.line,0);;){var u=v(s);if(!u||s.line!=n.line)return;var p=i(s);if(!p)return;if(!u[1]&&p!="selfClose"){var S=N(s.line,s.ch),x=d(s,u[2]);return x&&O(x.from,S)>0?{from:S,to:x.from}:null}}}),J.findMatchingTag=function(o,n,s){var u=new D(o,n.line,n.ch,s);if(u.text.indexOf(">")==-1&&u.text.indexOf("<")==-1)return;var p=i(u),S=p&&N(u.line,u.ch),x=p&&l(u);if(!p||!x||O(u,n)>0)return;var M={from:N(u.line,u.ch),to:S,tag:x[2]};return p=="selfClose"?{open:M,close:null,at:"open"}:x[1]?{open:E(u,x[2]),close:M,at:"close"}:(u=new D(o,S.line,S.ch,s),{open:M,close:d(u,x[2]),at:"open"})},J.findEnclosingTag=function(o,n,s,u){for(var p=new D(o,n.line,n.ch,s);;){var S=E(p,u);if(!S)break;var x=new D(o,n.line,n.ch,s),M=d(x,S.tag);if(M)return{open:S,close:M}}},J.scanForClosingTag=function(o,n,s,u){var p=new D(o,n.line,n.ch,u?{from:0,to:u}:null);return d(p,s)}})},p5ED:function(qe,ue,k){"use strict";var J=k("+L6B"),N=k("2/Rp"),O=k("5Dmo"),Q=k("3S7+"),R=k("k1fw"),B=k("9og8"),D=k("tJVT"),f=k("WmNS"),b=k.n(f),g=k("q1tI"),i=k.n(g),l=k("vHTk"),v=k.n(l),h=k("yEEn"),d=k("ZW9T"),E=k("1vsH"),o=k("V0Rq"),n=k("m3rI");ue.a=function(s){var u,p,S,x,M,C,c=s.editOffice,r=c===void 0?"view":c,a=s.name,A=s.data,L=s.theme,T=s.type,w=s.filename,_=s.monacoEditor,j=s.className,W=s.style,Z=s.close,X=s.onClose,G=s.hasMask,te=s.disabledDownload,Y=s.onImgDimensions,le=s.otherData,Ae=Object(g.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Be=Object(D.a)(Ae,2),Ce=Be[0],Se=Be[1],Fe=Object(g.useState)(""),Ve=Object(D.a)(Fe,2),De=Ve[0],Le=Ve[1],tt=Object(g.useState)(),Et=Object(D.a)(tt,2),Ie=Et[0],Qe=Et[1],xe=window.ENV==="build"?"/react/build":"",ie=location.host.startsWith("localhost")?n.a.PROXY_SERVER:n.a.API_SERVER,$,re=1024*1024,ce=10*re,be=Object(g.useRef)();(u=A)!==null&&u!==void 0&&u.startsWith("/api")&&T!=="txt"&&(A=n.a.API_SERVER+A),T==="office"&&($=Object(E.P)(A).filesize,$>ce&&(T="other")),w&&(_.filename=w),Object(g.useEffect)(function(){var ut,mt,pt=(ut=document.cookie)===null||ut===void 0||((mt=ut.replace(/\s/g,""))===null||mt===void 0)?void 0:mt.split(";");pt==null||pt.map(function(Ot){var Ft=Ot.split("=");Ft[0]==="_educoder_session"&&Le(Ft[1])})},[]),Object(g.useEffect)(function(){T==="office"&&Me()},[T,A]);var Me=function(){var ut=Object(B.a)(b.a.mark(function mt(){var pt,Ot,Ft;return b.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return console.log("data:",A),pt=A,A.startsWith("http")||(pt=location.origin+pt),Ot=new URL(pt).pathname.split("/").pop(),Pe.next=6,Object(o.U)({attachment_id:Ot});case 6:Ft=Pe.sent,Qe(Ft);case 8:case"end":return Pe.stop()}},mt)}));return function(){return ut.apply(this,arguments)}}(),ke=function(){if(A.startsWith("http")||A.startsWith("blob:")){ct();return}Object(E.x)(w||"educoder",A,w)},ct=function(){Object(E.v)(w||"educoder",decodeURIComponent(A))};return i.a.createElement("div",{style:Object(R.a)({},W||{}),className:"".concat(G&&v.a.bgBlack," ").concat(T?v.a.wrp:"hide")},Z&&i.a.createElement("div",{className:v.a.close,ref:be},!!Y&&i.a.createElement(Q.a,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:function(){return be.current}},i.a.createElement("span",{onClick:function(){X(),Y()}},i.a.createElement("i",{className:"icon-yulanpizhu"}))),!te&&i.a.createElement(Q.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return be.current}},i.a.createElement("span",{onClick:ct},i.a.createElement("i",{className:"icon-quxiaozhiding"}))),i.a.createElement(Q.a,{title:"\u5173\u95ED",getPopupContainer:function(){return be.current}},i.a.createElement("span",{className:"",onClick:X},i.a.createElement("i",{className:"icon-guanbi1"})))),i.a.createElement("div",{className:"".concat(v.a[j]," ").concat(j," ").concat(v.a.monaco," ").concat(T==="txt"?"show":"hide")},T==="txt"&&i.a.createElement(d.b,_)),T==="audio"&&i.a.createElement("audio",{src:"".concat(((p=A)===null||p===void 0?void 0:p.indexOf("http://"))>-1||((S=A)===null||S===void 0?void 0:S.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(A),autoPlay:!0}),T==="video"&&i.a.createElement(i.a.Fragment,null,((x=A)===null||x===void 0?void 0:x.indexOf("http"))>-1?i.a.createElement("video",{controls:!0,src:"".concat(A),autoPlay:!0}):i.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(A),autoPlay:!0})),T==="office"&&Ie&&i.a.createElement("iframe",{src:"".concat(xe,"/office.html?key=").concat(Ie.key,"&url=").concat(ie+Ie.url,"&callbackUrl=").concat(ie+Ie.callbackUrl,"&fileType=").concat(Ie.fileType,"&title=").concat(Ie.title,"&model=").concat(r,"&officeServer=").concat(n.a.OFFICE_SERVER,"&disabledDownload=").concat(!!te)}),(T==="xlsx"||T==="doc"||T==="pptx"||T==="docx")&&i.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(le.key,"&url=").concat(n.a.API_SERVER+le.url,"&callbackUrl=").concat(n.a.API_SERVER+le.callbackUrl,"&fileType=").concat(le.fileType,"&title=").concat(le.title,"&model=").concat(le.model)}),T==="html"&&i.a.createElement("iframe",{src:A+"&disposition=inline"}),T==="pdf"&&i.a.createElement("embed",{className:v.a.embed,src:A}),T==="image"&&i.a.createElement("img",{src:"".concat(((M=A)===null||M===void 0?void 0:M.indexOf("http://"))>-1||((C=A)===null||C===void 0?void 0:C.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(A)}),T==="other"&&i.a.createElement("div",null,i.a.createElement(N.a,{type:"primary",size:"large",onClick:ke},i.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),T==="download"&&i.a.createElement(N.a,{type:"primary",size:"large",onClick:ke},i.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(qe,ue,k){},pmY6:function(qe,ue,k){"use strict";k.d(ue,"g",function(){return R}),k.d(ue,"f",function(){return B}),k.d(ue,"e",function(){return D}),k.d(ue,"h",function(){return f}),k.d(ue,"b",function(){return b}),k.d(ue,"a",function(){return g}),k.d(ue,"d",function(){return i}),k.d(ue,"c",function(){return l});var J=!1,N="__is_disposable_tracked__";function O(v){if(!J)return;if(v&&v!==g.None)try{v[N]=!0}catch(h){}}function Q(v){if(!J)return v;var h=new Error("Potentially leaked disposable").stack;return setTimeout(function(){v[N]||console.log(h)},3e3),v}function R(v){return typeof v.dispose=="function"&&v.dispose.length===0}function B(v){return Array.isArray(v)?(v.forEach(function(h){h&&(O(h),h.dispose())}),[]):v?(O(v),v.dispose(),v):void 0}function D(){for(var v=[],h=0;h<arguments.length;h++)v[h]=arguments[h];return v.forEach(O),Q({dispose:function(){return B(v)}})}function f(v){var h=Q({dispose:function(){O(h),v()}});return h}var b=function(){function v(){this._toDispose=new Set,this._isDisposed=!1}return v.prototype.dispose=function(){if(this._isDisposed)return;O(this),this._isDisposed=!0,this.clear()},v.prototype.clear=function(){this._toDispose.forEach(function(h){return h.dispose()}),this._toDispose.clear()},v.prototype.add=function(h){if(!h)return h;if(h===this)throw new Error("Cannot register a disposable on itself!");return O(h),this._isDisposed?console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(h),h},v}(),g=function(){function v(){this._store=new b,Q(this)}return v.prototype.dispose=function(){O(this),this._store.dispose()},v.prototype._register=function(h){if(h===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(h)},v.None=Object.freeze({dispose:function(){}}),v}(),i=function(){function v(){this._isDisposed=!1,Q(this)}return Object.defineProperty(v.prototype,"value",{get:function(){return this._isDisposed?void 0:this._value},set:function(h){if(this._isDisposed||h===this._value)return;this._value&&this._value.dispose(),h&&O(h),this._value=h},enumerable:!0,configurable:!0}),v.prototype.clear=function(){this.value=void 0},v.prototype.dispose=function(){this._isDisposed=!0,O(this),this._value&&this._value.dispose(),this._value=void 0},v}(),l=function(){function v(h){this.object=h}return v.prototype.dispose=function(){},v}()},pzxd:function(qe,ue,k){var J=k("bYtY"),N=J.retrieve2,O=J.retrieve3,Q=J.each,R=J.normalizeCssArray,B=J.isString,D=J.isObject,f=k("6GrX"),b=k("VpOo"),g=k("Xnb7"),i=k("fW2E"),l=k("gut8"),v=l.ContextCachedBy,h=l.WILL_BE_RESTORED,d=f.DEFAULT_FONT,E={left:1,right:1,center:1},o={top:1,bottom:1,middle:1},n=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],s={},u={};function p(te){return S(te),Q(te.rich,S),te}function S(te){if(te){te.font=f.makeFont(te);var Y=te.textAlign;Y==="middle"&&(Y="center"),te.textAlign=Y==null||E[Y]?Y:"left";var le=te.textVerticalAlign||te.textBaseline;le==="center"&&(le="middle"),te.textVerticalAlign=le==null||o[le]?le:"top";var Ae=te.textPadding;Ae&&(te.textPadding=R(te.textPadding))}}function x(te,Y,le,Ae,Be,Ce){Ae.rich?C(te,Y,le,Ae,Be,Ce):M(te,Y,le,Ae,Be,Ce)}function M(te,Y,le,Ae,Be,Ce){"use strict";var Se=A(Ae),Fe,Ve=!1,De=Y.__attrCachedBy===v.PLAIN_TEXT;Ce!==h?(Ce&&(Fe=Ce.style,Ve=!Se&&De&&Fe),Y.__attrCachedBy=Se?v.NONE:v.PLAIN_TEXT):De&&(Y.__attrCachedBy=v.NONE);var Le=Ae.font||d;(!Ve||Le!==(Fe.font||d))&&(Y.font=Le);var tt=te.__computedFont;te.__styleFont!==Le&&(te.__styleFont=Le,tt=te.__computedFont=Y.font);var Et=Ae.textPadding,Ie=Ae.textLineHeight,Qe=te.__textCotentBlock;(!Qe||te.__dirtyText)&&(Qe=te.__textCotentBlock=f.parsePlainText(le,tt,Et,Ie,Ae.truncate));var xe=Qe.outerHeight,ie=Qe.lines,$=Qe.lineHeight,re=w(u,te,Ae,Be),ce=re.baseX,be=re.baseY,Me=re.textAlign||"left",ke=re.textVerticalAlign;r(Y,Ae,Be,ce,be);var ct=f.adjustTextY(be,xe,ke),ut=ce,mt=ct;if(Se||Et){var pt=f.getWidth(le,tt),Ot=pt;Et&&(Ot+=Et[1]+Et[3]);var Ft=f.adjustTextX(ce,Ot,Me);Se&&L(te,Y,Ae,Ft,ct,Ot,xe),Et&&(ut=X(ce,Me,Et),mt+=Et[0])}Y.textAlign=Me,Y.textBaseline="middle",Y.globalAlpha=Ae.opacity||1;for(var He=0;He<n.length;He++){var Pe=n[He],at=Pe[0],vt=Pe[1],et=Ae[at];(!Ve||et!==Fe[at])&&(Y[vt]=i(Y,vt,et||Pe[2]))}mt+=$/2;var At=Ae.textStrokeWidth,je=Ve?Fe.textStrokeWidth:null,_e=!Ve||At!==je,Ue=!Ve||_e||Ae.textStroke!==Fe.textStroke,me=j(Ae.textStroke,At),ve=W(Ae.textFill);if(me&&(_e&&(Y.lineWidth=At),Ue&&(Y.strokeStyle=me)),ve&&((!Ve||Ae.textFill!==Fe.textFill)&&(Y.fillStyle=ve)),ie.length===1)me&&Y.strokeText(ie[0],ut,mt),ve&&Y.fillText(ie[0],ut,mt);else for(var He=0;He<ie.length;He++)me&&Y.strokeText(ie[He],ut,mt),ve&&Y.fillText(ie[He],ut,mt),mt+=$}function C(te,Y,le,Ae,Be,Ce){Ce!==h&&(Y.__attrCachedBy=v.NONE);var Se=te.__textCotentBlock;(!Se||te.__dirtyText)&&(Se=te.__textCotentBlock=f.parseRichText(le,Ae)),c(te,Y,Se,Ae,Be)}function c(te,Y,le,Ae,Be){var Ce=le.width,Se=le.outerWidth,Fe=le.outerHeight,Ve=Ae.textPadding,De=w(u,te,Ae,Be),Le=De.baseX,tt=De.baseY,Et=De.textAlign,Ie=De.textVerticalAlign;r(Y,Ae,Be,Le,tt);var Qe=f.adjustTextX(Le,Se,Et),xe=f.adjustTextY(tt,Fe,Ie),ie=Qe,$=xe;Ve&&(ie+=Ve[3],$+=Ve[0]);var re=ie+Ce;A(Ae)&&L(te,Y,Ae,Qe,xe,Se,Fe);for(var ce=0;ce<le.lines.length;ce++){for(var be=le.lines[ce],Me=be.tokens,ke=Me.length,ct=be.lineHeight,ut=be.width,mt=0,pt=ie,Ot=re,Ft=ke-1,He;mt<ke&&(He=Me[mt],!He.textAlign||He.textAlign==="left");)a(te,Y,He,Ae,ct,$,pt,"left"),ut-=He.width,pt+=He.width,mt++;for(;Ft>=0&&(He=Me[Ft],He.textAlign==="right");)a(te,Y,He,Ae,ct,$,Ot,"right"),ut-=He.width,Ot-=He.width,Ft--;for(pt+=(Ce-(pt-ie)-(re-Ot)-ut)/2;mt<=Ft;)He=Me[mt],a(te,Y,He,Ae,ct,$,pt+He.width/2,"center"),pt+=He.width,mt++;$+=ct}}function r(te,Y,le,Ae,Be){if(le&&Y.textRotation){var Ce=Y.textOrigin;Ce==="center"?(Ae=le.width/2+le.x,Be=le.height/2+le.y):Ce&&(Ae=Ce[0]+le.x,Be=Ce[1]+le.y),te.translate(Ae,Be),te.rotate(-Y.textRotation),te.translate(-Ae,-Be)}}function a(te,Y,le,Ae,Be,Ce,Se,Fe){var Ve=Ae.rich[le.styleName]||{};Ve.text=le.text;var De=le.textVerticalAlign,Le=Ce+Be/2;De==="top"?Le=Ce+le.height/2:De==="bottom"&&(Le=Ce+Be-le.height/2),!le.isLineHolder&&A(Ve)&&L(te,Y,Ve,Fe==="right"?Se-le.width:Fe==="center"?Se-le.width/2:Se,Le-le.height/2,le.width,le.height);var tt=le.textPadding;tt&&(Se=X(Se,Fe,tt),Le-=le.height/2-tt[2]-le.textHeight/2),_(Y,"shadowBlur",O(Ve.textShadowBlur,Ae.textShadowBlur,0)),_(Y,"shadowColor",Ve.textShadowColor||Ae.textShadowColor||"transparent"),_(Y,"shadowOffsetX",O(Ve.textShadowOffsetX,Ae.textShadowOffsetX,0)),_(Y,"shadowOffsetY",O(Ve.textShadowOffsetY,Ae.textShadowOffsetY,0)),_(Y,"textAlign",Fe),_(Y,"textBaseline","middle"),_(Y,"font",le.font||d);var Et=j(Ve.textStroke||Ae.textStroke,Qe),Ie=W(Ve.textFill||Ae.textFill),Qe=N(Ve.textStrokeWidth,Ae.textStrokeWidth);Et&&(_(Y,"lineWidth",Qe),_(Y,"strokeStyle",Et),Y.strokeText(le.text,Se,Le)),Ie&&(_(Y,"fillStyle",Ie),Y.fillText(le.text,Se,Le))}function A(te){return!!(te.textBackgroundColor||te.textBorderWidth&&te.textBorderColor)}function L(te,Y,le,Ae,Be,Ce,Se){var Fe=le.textBackgroundColor,Ve=le.textBorderWidth,De=le.textBorderColor,Le=B(Fe);if(_(Y,"shadowBlur",le.textBoxShadowBlur||0),_(Y,"shadowColor",le.textBoxShadowColor||"transparent"),_(Y,"shadowOffsetX",le.textBoxShadowOffsetX||0),_(Y,"shadowOffsetY",le.textBoxShadowOffsetY||0),Le||Ve&&De){Y.beginPath();var tt=le.textBorderRadius;tt?b.buildPath(Y,{x:Ae,y:Be,width:Ce,height:Se,r:tt}):Y.rect(Ae,Be,Ce,Se),Y.closePath()}if(Le)if(_(Y,"fillStyle",Fe),le.fillOpacity!=null){var Et=Y.globalAlpha;Y.globalAlpha=le.fillOpacity*le.opacity,Y.fill(),Y.globalAlpha=Et}else Y.fill();else if(D(Fe)){var Ie=Fe.image;Ie=g.createOrUpdateImage(Ie,null,te,T,Fe),Ie&&g.isImageReady(Ie)&&Y.drawImage(Ie,Ae,Be,Ce,Se)}if(Ve&&De)if(_(Y,"lineWidth",Ve),_(Y,"strokeStyle",De),le.strokeOpacity!=null){var Et=Y.globalAlpha;Y.globalAlpha=le.strokeOpacity*le.opacity,Y.stroke(),Y.globalAlpha=Et}else Y.stroke()}function T(te,Y){Y.image=te}function w(te,Y,le,Ae){var Be=le.x||0,Ce=le.y||0,Se=le.textAlign,Fe=le.textVerticalAlign;if(Ae){var Ve=le.textPosition;if(Ve instanceof Array)Be=Ae.x+Z(Ve[0],Ae.width),Ce=Ae.y+Z(Ve[1],Ae.height);else{var De=Y&&Y.calculateTextPosition?Y.calculateTextPosition(s,le,Ae):f.calculateTextPosition(s,le,Ae);Be=De.x,Ce=De.y,Se=Se||De.textAlign,Fe=Fe||De.textVerticalAlign}var Le=le.textOffset;Le&&(Be+=Le[0],Ce+=Le[1])}return te=te||{},te.baseX=Be,te.baseY=Ce,te.textAlign=Se,te.textVerticalAlign=Fe,te}function _(te,Y,le){return te[Y]=i(te,Y,le),te[Y]}function j(te,Y){return te==null||Y<=0||te==="transparent"||te==="none"?null:te.image||te.colorStops?"#000":te}function W(te){return te==null||te==="none"?null:te.image||te.colorStops?"#000":te}function Z(te,Y){return typeof te=="string"?te.lastIndexOf("%")>=0?parseFloat(te)/100*Y:parseFloat(te):te}function X(te,Y,le){return Y==="right"?te-le[1]:Y==="center"?te+le[3]/2-le[1]/2:te+le[3]}function G(te,Y){return te!=null&&(te||Y.textBackgroundColor||Y.textBorderWidth&&Y.textBorderColor||Y.textPadding)}ue.normalizeTextStyle=p,ue.renderText=x,ue.getBoxPosition=w,ue.getStroke=j,ue.getFill=W,ue.parsePercent=Z,ue.needDrawText=G},qH13:function(qe,ue,k){var J=k("ItGF"),N=k("QBsz"),O=N.applyTransform,Q=k("mFDi"),R=k("Qe9p"),B=k("6GrX"),D=k("pzxd"),f=k("ni6a"),b=k("Gev7"),g=k("Dagg"),i=k("dqUG"),l=k("y+Vt"),v=k("IMiH"),h=k("QuXc"),d=k("06Qe"),E=v.CMD,o=Math.round,n=Math.sqrt,s=Math.abs,u=Math.cos,p=Math.sin,S=Math.max;if(!J.canvasSupported){var x=",",M="progid:DXImageTransform.Microsoft",C=21600,c=C/2,r=1e5,a=1e3,A=function(ce){ce.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",ce.coordsize=C+","+C,ce.coordorigin="0,0"},L=function(ce){return String(ce).replace(/&/g,"&").replace(/"/g,""")},T=function(ce,be,Me){return"rgb("+[ce,be,Me].join(",")+")"},w=function(ce,be){be&&ce&&be.parentNode!==ce&&ce.appendChild(be)},_=function(ce,be){be&&ce&&be.parentNode===ce&&ce.removeChild(be)},j=function(ce,be,Me){return(parseFloat(ce)||0)*r+(parseFloat(be)||0)*a+Me},W=D.parsePercent,Z=function(ce,be,Me){var ke=R.parse(be);Me=+Me,isNaN(Me)&&(Me=1),ke&&(ce.color=T(ke[0],ke[1],ke[2]),ce.opacity=Me*ke[3])},X=function(ce){var be=R.parse(ce);return[T(be[0],be[1],be[2]),be[3]]},G=function(ce,be,Me){var ke=be.fill;if(ke!=null)if(ke instanceof h){var ct,ut=0,mt=[0,0],pt=0,Ot=1,Ft=Me.getBoundingRect(),He=Ft.width,Pe=Ft.height;if(ke.type==="linear"){ct="gradient";var at=Me.transform,vt=[ke.x*He,ke.y*Pe],et=[ke.x2*He,ke.y2*Pe];at&&(O(vt,vt,at),O(et,et,at));var At=et[0]-vt[0],je=et[1]-vt[1];ut=Math.atan2(At,je)*180/Math.PI,ut<0&&(ut+=360),ut<1e-6&&(ut=0)}else{ct="gradientradial";var vt=[ke.x*He,ke.y*Pe],at=Me.transform,_e=Me.scale,Ue=He,me=Pe;mt=[(vt[0]-Ft.x)/Ue,(vt[1]-Ft.y)/me],at&&O(vt,vt,at),Ue/=_e[0]*C,me/=_e[1]*C;var ve=S(Ue,me);pt=2*0/ve,Ot=2*ke.r/ve-pt}var Ee=ke.colorStops.slice();Ee.sort(function(nt,we){return nt.offset-we.offset});for(var Oe=Ee.length,Ye=[],ze=[],gt=0;gt<Oe;gt++){var Lt=Ee[gt],Pt=X(Lt.color);ze.push(Lt.offset*Ot+pt+" "+Pt[0]),(gt===0||gt===Oe-1)&&Ye.push(Pt)}if(Oe>=2){var Rt=Ye[0][0],Dt=Ye[1][0],dt=Ye[0][1]*be.opacity,it=Ye[1][1]*be.opacity;ce.type=ct,ce.method="none",ce.focus="100%",ce.angle=ut,ce.color=Rt,ce.color2=Dt,ce.colors=ze.join(","),ce.opacity=it,ce.opacity2=dt}ct==="radial"&&(ce.focusposition=mt.join(","))}else Z(ce,ke,be.opacity)},te=function(ce,be){be.lineDash&&(ce.dashstyle=be.lineDash.join(" ")),be.stroke!=null&&!(be.stroke instanceof h)&&Z(ce,be.stroke,be.opacity)},Y=function(ce,be,Me,ke){var ct=be==="fill",ut=ce.getElementsByTagName(be)[0];Me[be]!=null&&Me[be]!=="none"&&(ct||!ct&&Me.lineWidth)?(ce[ct?"filled":"stroked"]="true",Me[be]instanceof h&&_(ce,ut),ut||(ut=d.createNode(be)),ct?G(ut,Me,ke):te(ut,Me),w(ce,ut)):(ce[ct?"filled":"stroked"]="false",_(ce,ut))},le=[[],[],[]],Ae=function(ce,be){var Me=E.M,ke=E.C,ct=E.L,ut=E.A,mt=E.Q,pt=[],Ot,Ft,He,Pe,at,vt,et=ce.data,At=ce.len();for(Pe=0;Pe<At;){He=et[Pe++],Ft="",Ot=0;switch(He){case Me:Ft=" m ",Ot=1,at=et[Pe++],vt=et[Pe++],le[0][0]=at,le[0][1]=vt;break;case ct:Ft=" l ",Ot=1,at=et[Pe++],vt=et[Pe++],le[0][0]=at,le[0][1]=vt;break;case mt:case ke:Ft=" c ",Ot=3;var je=et[Pe++],_e=et[Pe++],Ue=et[Pe++],me=et[Pe++],ve,Ee;He===mt?(ve=Ue,Ee=me,Ue=(Ue+2*je)/3,me=(me+2*_e)/3,je=(at+2*je)/3,_e=(vt+2*_e)/3):(ve=et[Pe++],Ee=et[Pe++]),le[0][0]=je,le[0][1]=_e,le[1][0]=Ue,le[1][1]=me,le[2][0]=ve,le[2][1]=Ee,at=ve,vt=Ee;break;case ut:var Oe=0,Ye=0,ze=1,gt=1,Lt=0;be&&(Oe=be[4],Ye=be[5],ze=n(be[0]*be[0]+be[1]*be[1]),gt=n(be[2]*be[2]+be[3]*be[3]),Lt=Math.atan2(-be[1]/gt,be[0]/ze));var Pt=et[Pe++],Rt=et[Pe++],Dt=et[Pe++],dt=et[Pe++],it=et[Pe++]+Lt,nt=et[Pe++]+it+Lt;Pe++;var we=et[Pe++],Ne=Pt+u(it)*Dt,ht=Rt+p(it)*dt,je=Pt+u(nt)*Dt,_e=Rt+p(nt)*dt,ot=we?" wa ":" at ";Math.abs(Ne-je)<1e-4&&(Math.abs(nt-it)>.01?we&&(Ne+=270/C):Math.abs(ht-Rt)<1e-4?we&&Ne<Pt||!we&&Ne>Pt?_e-=270/C:_e+=270/C:we&&ht<Rt||!we&&ht>Rt?je+=270/C:je-=270/C),pt.push(ot,o(((Pt-Dt)*ze+Oe)*C-c),x,o(((Rt-dt)*gt+Ye)*C-c),x,o(((Pt+Dt)*ze+Oe)*C-c),x,o(((Rt+dt)*gt+Ye)*C-c),x,o((Ne*ze+Oe)*C-c),x,o((ht*gt+Ye)*C-c),x,o((je*ze+Oe)*C-c),x,o((_e*gt+Ye)*C-c)),at=je,vt=_e;break;case E.R:var Bt=le[0],wt=le[1];Bt[0]=et[Pe++],Bt[1]=et[Pe++],wt[0]=Bt[0]+et[Pe++],wt[1]=Bt[1]+et[Pe++],be&&(O(Bt,Bt,be),O(wt,wt,be)),Bt[0]=o(Bt[0]*C-c),wt[0]=o(wt[0]*C-c),Bt[1]=o(Bt[1]*C-c),wt[1]=o(wt[1]*C-c),pt.push(" m ",Bt[0],x,Bt[1]," l ",wt[0],x,Bt[1]," l ",wt[0],x,wt[1]," l ",Bt[0],x,wt[1]);break;case E.Z:pt.push(" x ")}if(Ot>0){pt.push(Ft);for(var rt=0;rt<Ot;rt++){var st=le[rt];be&&O(st,st,be),pt.push(o(st[0]*C-c),x,o(st[1]*C-c),rt<Ot-1?x:"")}}}return pt.join("")};l.prototype.brushVML=function(ce){var be=this.style,Me=this._vmlEl;Me||(Me=d.createNode("shape"),A(Me),this._vmlEl=Me),Y(Me,"fill",be,this),Y(Me,"stroke",be,this);var ke=this.transform,ct=ke!=null,ut=Me.getElementsByTagName("stroke")[0];if(ut){var mt=be.lineWidth;if(ct&&!be.strokeNoScale){var pt=ke[0]*ke[3]-ke[1]*ke[2];mt*=n(s(pt))}ut.weight=mt+"px"}var Ot=this.path||(this.path=new v);this.__dirtyPath&&(Ot.beginPath(),Ot.subPixelOptimize=!1,this.buildPath(Ot,this.shape),Ot.toStatic(),this.__dirtyPath=!1),Me.path=Ae(Ot,this.transform),Me.style.zIndex=j(this.zlevel,this.z,this.z2),w(ce,Me),be.text!=null?this.drawRectText(ce,this.getBoundingRect()):this.removeRectText(ce)},l.prototype.onRemove=function(ce){_(ce,this._vmlEl),this.removeRectText(ce)},l.prototype.onAdd=function(ce){w(ce,this._vmlEl),this.appendRectText(ce)};var Be=function(ce){return typeof ce=="object"&&ce.tagName&&ce.tagName.toUpperCase()==="IMG"};g.prototype.brushVML=function(ce){var be=this.style,Me=be.image,ke,ct;if(Be(Me)){var ut=Me.src;if(ut===this._imageSrc)ke=this._imageWidth,ct=this._imageHeight;else{var mt=Me.runtimeStyle,pt=mt.width,Ot=mt.height;mt.width="auto",mt.height="auto",ke=Me.width,ct=Me.height,mt.width=pt,mt.height=Ot,this._imageSrc=ut,this._imageWidth=ke,this._imageHeight=ct}Me=ut}else Me===this._imageSrc&&(ke=this._imageWidth,ct=this._imageHeight);if(!Me)return;var Ft=be.x||0,He=be.y||0,Pe=be.width,at=be.height,vt=be.sWidth,et=be.sHeight,At=be.sx||0,je=be.sy||0,_e=vt&&et,Ue=this._vmlEl;Ue||(Ue=d.doc.createElement("div"),A(Ue),this._vmlEl=Ue);var me=Ue.style,ve=!1,Ee,Oe=1,Ye=1;if(this.transform&&(Ee=this.transform,Oe=n(Ee[0]*Ee[0]+Ee[1]*Ee[1]),Ye=n(Ee[2]*Ee[2]+Ee[3]*Ee[3]),ve=Ee[1]||Ee[2]),ve){var ze=[Ft,He],gt=[Ft+Pe,He],Lt=[Ft,He+at],Pt=[Ft+Pe,He+at];O(ze,ze,Ee),O(gt,gt,Ee),O(Lt,Lt,Ee),O(Pt,Pt,Ee);var Rt=S(ze[0],gt[0],Lt[0],Pt[0]),Dt=S(ze[1],gt[1],Lt[1],Pt[1]),dt=[];dt.push("M11=",Ee[0]/Oe,x,"M12=",Ee[2]/Ye,x,"M21=",Ee[1]/Oe,x,"M22=",Ee[3]/Ye,x,"Dx=",o(Ft*Oe+Ee[4]),x,"Dy=",o(He*Ye+Ee[5])),me.padding="0 "+o(Rt)+"px "+o(Dt)+"px 0",me.filter=M+".Matrix("+dt.join("")+", SizingMethod=clip)"}else Ee&&(Ft=Ft*Oe+Ee[4],He=He*Ye+Ee[5]),me.filter="",me.left=o(Ft)+"px",me.top=o(He)+"px";var it=this._imageEl,nt=this._cropEl;it||(it=d.doc.createElement("div"),this._imageEl=it);var we=it.style;if(_e){if(ke&&ct)we.width=o(Oe*ke*Pe/vt)+"px",we.height=o(Ye*ct*at/et)+"px";else{var Ne=new Image,ht=this;Ne.onload=function(){Ne.onload=null,ke=Ne.width,ct=Ne.height,we.width=o(Oe*ke*Pe/vt)+"px",we.height=o(Ye*ct*at/et)+"px",ht._imageWidth=ke,ht._imageHeight=ct,ht._imageSrc=Me},Ne.src=Me}nt||(nt=d.doc.createElement("div"),nt.style.overflow="hidden",this._cropEl=nt);var ot=nt.style;ot.width=o((Pe+At*Pe/vt)*Oe),ot.height=o((at+je*at/et)*Ye),ot.filter=M+".Matrix(Dx="+-At*Pe/vt*Oe+",Dy="+-je*at/et*Ye+")",nt.parentNode||Ue.appendChild(nt),it.parentNode!==nt&&nt.appendChild(it)}else we.width=o(Oe*Pe)+"px",we.height=o(Ye*at)+"px",Ue.appendChild(it),nt&&nt.parentNode&&(Ue.removeChild(nt),this._cropEl=null);var Bt="",wt=be.opacity;wt<1&&(Bt+=".Alpha(opacity="+o(wt*100)+") "),Bt+=M+".AlphaImageLoader(src="+Me+", SizingMethod=scale)",we.filter=Bt,Ue.style.zIndex=j(this.zlevel,this.z,this.z2),w(ce,Ue),be.text!=null&&this.drawRectText(ce,this.getBoundingRect())},g.prototype.onRemove=function(ce){_(ce,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(ce)},g.prototype.onAdd=function(ce){w(ce,this._vmlEl),this.appendRectText(ce)};var Ce="normal",Se={},Fe=0,Ve=100,De=document.createElement("div"),Le=function(ce){var be=Se[ce];if(!be){Fe>Ve&&(Fe=0,Se={});var Me=De.style,ke;try{Me.font=ce,ke=Me.fontFamily.split(",")[0]}catch(ct){}be={style:Me.fontStyle||Ce,variant:Me.fontVariant||Ce,weight:Me.fontWeight||Ce,size:parseFloat(Me.fontSize||12)|0,family:ke||"Microsoft YaHei"},Se[ce]=be,Fe++}return be},tt;B.$override("measureText",function(ce,be){var Me=d.doc;tt||(tt=Me.createElement("div"),tt.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",d.doc.body.appendChild(tt));try{tt.style.font=be}catch(ke){}return tt.innerHTML="",tt.appendChild(Me.createTextNode(ce)),{width:tt.offsetWidth}});for(var Et=new Q,Ie=function(ce,be,Me,ke){var ct=this.style;this.__dirty&&D.normalizeTextStyle(ct,!0);var ut=ct.text;if(ut!=null&&(ut+=""),!ut)return;if(ct.rich){var mt=B.parseRichText(ut,ct);ut=[];for(var pt=0;pt<mt.lines.length;pt++){for(var Ot=mt.lines[pt].tokens,Ft=[],He=0;He<Ot.length;He++)Ft.push(Ot[He].text);ut.push(Ft.join(""))}ut=ut.join(`
|
|
`)}var Pe,at,vt=ct.textAlign,et=ct.textVerticalAlign,At=Le(ct.font),je=At.style+" "+At.variant+" "+At.weight+" "+At.size+'px "'+At.family+'"';Me=Me||B.getBoundingRect(ut,je,vt,et,ct.textPadding,ct.textLineHeight);var _e=this.transform;if(_e&&!ke&&(Et.copy(be),Et.applyTransform(_e),be=Et),ke)Pe=be.x,at=be.y;else{var Ue=ct.textPosition;if(Ue instanceof Array)Pe=be.x+W(Ue[0],be.width),at=be.y+W(Ue[1],be.height),vt=vt||"left";else{var me=this.calculateTextPosition?this.calculateTextPosition({},ct,be):B.calculateTextPosition({},ct,be);Pe=me.x,at=me.y,vt=vt||me.textAlign,et=et||me.textVerticalAlign}}Pe=B.adjustTextX(Pe,Me.width,vt),at=B.adjustTextY(at,Me.height,et),at+=Me.height/2;var ve=d.createNode,Ee=this._textVmlEl,Oe,Ye,ze;Ee?(ze=Ee.firstChild,Oe=ze.nextSibling,Ye=Oe.nextSibling):(Ee=ve("line"),Oe=ve("path"),Ye=ve("textpath"),ze=ve("skew"),Ye.style["v-text-align"]="left",A(Ee),Oe.textpathok=!0,Ye.on=!0,Ee.from="0 0",Ee.to="1000 0.05",w(Ee,ze),w(Ee,Oe),w(Ee,Ye),this._textVmlEl=Ee);var gt=[Pe,at],Lt=Ee.style;_e&&ke?(O(gt,gt,_e),ze.on=!0,ze.matrix=_e[0].toFixed(3)+x+_e[2].toFixed(3)+x+_e[1].toFixed(3)+x+_e[3].toFixed(3)+",0,0",ze.offset=(o(gt[0])||0)+","+(o(gt[1])||0),ze.origin="0 0",Lt.left="0px",Lt.top="0px"):(ze.on=!1,Lt.left=o(Pe)+"px",Lt.top=o(at)+"px"),Ye.string=L(ut);try{Ye.style.font=je}catch(Pt){}Y(Ee,"fill",{fill:ct.textFill,opacity:ct.opacity},this),Y(Ee,"stroke",{stroke:ct.textStroke,opacity:ct.opacity,lineDash:ct.lineDash||null},this),Ee.style.zIndex=j(this.zlevel,this.z,this.z2),w(ce,Ee)},Qe=function(ce){_(ce,this._textVmlEl),this._textVmlEl=null},xe=function(ce){w(ce,this._textVmlEl)},ie=[f,b,g,l,i],$=0;$<ie.length;$++){var re=ie[$].prototype;re.drawRectText=Ie,re.removeRectText=Qe,re.appendRectText=xe}i.prototype.brushVML=function(ce){var be=this.style;be.text!=null?this.drawRectText(ce,{x:be.x||0,y:be.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(ce)},i.prototype.onRemove=function(ce){this.removeRectText(ce)},i.prototype.onAdd=function(ce){this.appendRectText(ce)}}},r6Bn:function(qe,ue,k){var J=k("bYtY"),N=k("ItGF"),O=k("4fz+"),Q=k("BPZU");function R(f,b){return f.zlevel===b.zlevel?f.z===b.z?f.z2-b.z2:f.z-b.z:f.zlevel-b.zlevel}var B=function(){this._roots=[],this._displayList=[],this._displayListLen=0};B.prototype={constructor:B,traverse:function(f,b){for(var g=0;g<this._roots.length;g++)this._roots[g].traverse(f,b)},getDisplayList:function(f,b){return b=b||!1,f&&this.updateDisplayList(b),this._displayList},updateDisplayList:function(f){this._displayListLen=0;for(var b=this._roots,g=this._displayList,i=0,l=b.length;i<l;i++)this._updateAndAddDisplayable(b[i],null,f);g.length=this._displayListLen,N.canvasSupported&&Q(g,R)},_updateAndAddDisplayable:function(f,b,g){if(f.ignore&&!g)return;f.beforeUpdate(),f.__dirty&&f.update(),f.afterUpdate();var i=f.clipPath;if(i){b?b=b.slice():b=[];for(var l=i,v=f;l;)l.parent=v,l.updateTransform(),b.push(l),v=l,l=l.clipPath}if(f.isGroup){for(var h=f._children,d=0;d<h.length;d++){var E=h[d];f.__dirty&&(E.__dirty=!0),this._updateAndAddDisplayable(E,b,g)}f.__dirty=!1}else f.__clipPaths=b,this._displayList[this._displayListLen++]=f},addRoot:function(f){if(f.__storage===this)return;f instanceof O&&f.addChildrenToStorage(this),this.addToStorage(f),this._roots.push(f)},delRoot:function(f){if(f==null){for(var b=0;b<this._roots.length;b++){var g=this._roots[b];g instanceof O&&g.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(f instanceof Array){for(var b=0,i=f.length;b<i;b++)this.delRoot(f[b]);return}var l=J.indexOf(this._roots,f);l>=0&&(this.delFromStorage(f),this._roots.splice(l,1),f instanceof O&&f.delChildrenFromStorage(this))},addToStorage:function(f){return f&&(f.__storage=this,f.dirty(!1)),this},delFromStorage:function(f){return f&&(f.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:R};var D=B;qe.exports=D},rA99:function(qe,ue,k){var J=k("y+Vt"),N=k("QBsz"),O=k("Sj9i"),Q=O.quadraticSubdivide,R=O.cubicSubdivide,B=O.quadraticAt,D=O.cubicAt,f=O.quadraticDerivativeAt,b=O.cubicDerivativeAt,g=[];function i(v,h,d){var E=v.cpx2,o=v.cpy2;return E===null||o===null?[(d?b:D)(v.x1,v.cpx1,v.cpx2,v.x2,h),(d?b:D)(v.y1,v.cpy1,v.cpy2,v.y2,h)]:[(d?f:B)(v.x1,v.cpx1,v.x2,h),(d?f:B)(v.y1,v.cpy1,v.y2,h)]}var l=J.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(v,h){var d=h.x1,E=h.y1,o=h.x2,n=h.y2,s=h.cpx1,u=h.cpy1,p=h.cpx2,S=h.cpy2,x=h.percent;if(x===0)return;v.moveTo(d,E),p==null||S==null?(x<1&&(Q(d,s,o,x,g),s=g[1],o=g[2],Q(E,u,n,x,g),u=g[1],n=g[2]),v.quadraticCurveTo(s,u,o,n)):(x<1&&(R(d,s,p,o,x,g),s=g[1],p=g[2],o=g[3],R(E,u,S,n,x,g),u=g[1],S=g[2],n=g[3]),v.bezierCurveTo(s,u,p,S,o,n))},pointAt:function(v){return i(this.shape,v,!1)},tangentAt:function(v){var h=i(this.shape,v,!0);return N.normalize(h,h)}});qe.exports=l},"rAM+":function(qe,ue,k){"use strict";k.d(ue,"a",function(){return N});var J=k("Qw5x");function N(O,Q){var R;if(typeof Symbol=="undefined"||O[Symbol.iterator]==null){if(Array.isArray(O)||(R=Object(J.a)(O))||Q&&O&&typeof O.length=="number"){R&&(O=R);var B=0,D=function(){};return{s:D,n:function(){return B>=O.length?{done:!0}:{done:!1,value:O[B++]}},e:function(l){throw l},f:D}}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 f=!0,b=!1,g;return{s:function(){R=O[Symbol.iterator]()},n:function(){var l=R.next();return f=l.done,l},e:function(l){b=!0,g=l},f:function(){try{!f&&R.return!=null&&R.return()}finally{if(b)throw g}}}}},rUJ1:function(qe,ue){const k=/[&<>"']/,J=/[&<>"']/g,N=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,Q={"&":"&","<":"<",">":">",'"':""","'":"'"},R=C=>Q[C];function B(C,c){if(c){if(k.test(C))return C.replace(J,R)}else if(N.test(C))return C.replace(O,R);return C}const D=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function f(C){return C.replace(D,(c,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const b=/(^|[^\[])\^/g;function g(C,c){C=C.source||C,c=c||"";const r={replace:(a,A)=>(A=A.source||A,A=A.replace(b,"$1"),C=C.replace(a,A),r),getRegex:()=>new RegExp(C,c)};return r}const i=/[^\w:]/g,l=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function v(C,c,r){if(C){let a;try{a=decodeURIComponent(f(r)).replace(i,"").toLowerCase()}catch(A){return null}if(a.indexOf("javascript:")===0||a.indexOf("vbscript:")===0||a.indexOf("data:")===0)return null}c&&!l.test(r)&&(r=n(c,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(a){return null}return r}const h={},d=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(C,c){h[" "+C]||(d.test(C)?h[" "+C]=C+"/":h[" "+C]=S(C,"/",!0)),C=h[" "+C];const r=C.indexOf(":")===-1;return c.substring(0,2)==="//"?r?c:C.replace(E,"$1")+c:c.charAt(0)==="/"?r?c:C.replace(o,"$1")+c:C+c}const s={exec:function(){}};function u(C){let c=1,r,a;for(;c<arguments.length;c++){r=arguments[c];for(a in r)Object.prototype.hasOwnProperty.call(r,a)&&(C[a]=r[a])}return C}function p(C,c){const r=C.replace(/\|/g,(L,T,w)=>{let _=!1,j=T;for(;--j>=0&&w[j]==="\\";)_=!_;return _?"|":" |"}),a=r.split(/ \|/);let A=0;if(a.length>c)a.splice(c);else for(;a.length<c;)a.push("");for(;A<a.length;A++)a[A]=a[A].trim().replace(/\\\|/g,"|");return a}function S(C,c,r){const a=C.length;if(a===0)return"";let A=0;for(;A<a;){const L=C.charAt(a-A-1);if(L===c&&!r)A++;else if(L!==c&&r)A++;else break}return C.substr(0,a-A)}function x(C,c){if(C.indexOf(c[1])===-1)return-1;const r=C.length;let a=0,A=0;for(;A<r;A++)if(C[A]==="\\")A++;else if(C[A]===c[0])a++;else if(C[A]===c[1]&&(a--,a<0))return A;return-1}function M(C){C&&C.sanitize&&!C.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")}qe.exports={escape:B,unescape:f,edit:g,cleanUrl:v,resolveUrl:n,noopTest:s,merge:u,splitCells:p,rtrim:S,findClosingBracket:x,checkSanitizeDeprecation:M}},rmlV:function(qe,ue,k){var J=k("y+Vt"),N=J.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(O,Q){var R=.5522848,B=Q.cx,D=Q.cy,f=Q.rx,b=Q.ry,g=f*R,i=b*R;O.moveTo(B-f,D),O.bezierCurveTo(B-f,D-i,B-g,D-b,B,D-b),O.bezierCurveTo(B+g,D-b,B+f,D-i,B+f,D),O.bezierCurveTo(B+f,D+i,B+g,D+b,B,D+b),O.bezierCurveTo(B-g,D+b,B-f,D+i,B-f,D),O.closePath()}});qe.exports=N},sR1s:function(qe,ue,k){"use strict";k.d(ue,"b",function(){return Q}),k.d(ue,"a",function(){return R}),k.d(ue,"c",function(){return B}),k.d(ue,"d",function(){return D});var J=k("U8pU"),N="RC_TABLE_KEY";function O(f){return f==null?[]:Array.isArray(f)?f:[f]}function Q(f,b){if(!b&&typeof b!="number")return f;for(var g=O(b),i=f,l=0;l<g.length;l+=1){if(!i)return null;var v=g[l];i=i[v]}return i}function R(f){var b=[],g={};return f.forEach(function(i){for(var l=i||{},v=l.key,h=l.dataIndex,d=v||O(h).join("-")||N;g[d];)d="".concat(d,"_next");g[d]=!0,b.push(d)}),b}function B(){var f={};function b(v,h){h&&Object.keys(h).forEach(function(d){var E=h[d];E&&Object(J.a)(E)==="object"?(v[d]=v[d]||{},b(v[d],E)):v[d]=E})}for(var g=arguments.length,i=new Array(g),l=0;l<g;l++)i[l]=arguments[l];return i.forEach(function(v){b(f,v)}),f}function D(f){return f!=null}},"sW+o":function(qe,ue,k){var J=k("SrGk"),N=k("bYtY"),O=k("SUKs"),Q=k("Qe9p");function R(D,f){J.call(this,D,f,["linearGradient","radialGradient"],"__gradient_in_use__")}N.inherits(R,J),R.prototype.addWithoutUpdate=function(D,f){if(f&&f.style){var b=this;N.each(["fill","stroke"],function(g){if(f.style[g]&&(f.style[g].type==="linear"||f.style[g].type==="radial")){var i=f.style[g],l=b.getDefs(!0),v;i._dom?(v=i._dom,l.contains(i._dom)||b.addDom(v)):v=b.add(i),b.markUsed(f);var h=v.getAttribute("id");D.setAttribute(g,"url(#"+h+")")}})}},R.prototype.add=function(D){var f;if(D.type==="linear")f=this.createElement("linearGradient");else if(D.type==="radial")f=this.createElement("radialGradient");else return O("Illegal gradient type."),null;return D.id=D.id||this.nextId++,f.setAttribute("id","zr"+this._zrId+"-gradient-"+D.id),this.updateDom(D,f),this.addDom(f),f},R.prototype.update=function(D){var f=this;J.prototype.update.call(this,D,function(){var b=D.type,g=D._dom.tagName;b==="linear"&&g==="linearGradient"||b==="radial"&&g==="radialGradient"?f.updateDom(D,D._dom):(f.removeDom(D),f.add(D))})},R.prototype.updateDom=function(D,f){if(D.type==="linear")f.setAttribute("x1",D.x),f.setAttribute("y1",D.y),f.setAttribute("x2",D.x2),f.setAttribute("y2",D.y2);else if(D.type==="radial")f.setAttribute("cx",D.x),f.setAttribute("cy",D.y),f.setAttribute("r",D.r);else{O("Illegal gradient type.");return}D.global?f.setAttribute("gradientUnits","userSpaceOnUse"):f.setAttribute("gradientUnits","objectBoundingBox"),f.innerHTML="";for(var b=D.colorStops,g=0,i=b.length;g<i;++g){var l=this.createElement("stop");l.setAttribute("offset",b[g].offset*100+"%");var v=b[g].color;if(v.indexOf("rgba">-1)){var h=Q.parse(v)[3],d=Q.toHex(v);l.setAttribute("stop-color","#"+d),l.setAttribute("stop-opacity",h)}else l.setAttribute("stop-color",b[g].color);f.appendChild(l)}D._dom=f},R.prototype.markUsed=function(D){if(D.style){var f=D.style.fill;f&&f._dom&&J.prototype.markUsed.call(this,f._dom),f=D.style.stroke,f&&f._dom&&J.prototype.markUsed.call(this,f._dom)}};var B=R;qe.exports=B},sboe:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return O});var J=k("q1tI"),N=k.n(J),O=J.createContext(null)},t23M:function(qe,ue,k){"use strict";var J=k("VTBJ"),N=k("1OyB"),O=k("vuIU"),Q=k("Ji7U"),R=k("LK+K"),B=k("q1tI"),D=k.n(B),f=k("m+aA"),b=k("Zm9Q"),g=k("Kwbf"),i=k("c+Xe"),l=k("bdgK"),v="rc-observer-key",h=function(d){Object(Q.a)(o,d);var E=Object(R.a)(o);function o(){var n;return Object(N.a)(this,o),n=E.apply(this,arguments),n.resizeObserver=null,n.childNode=null,n.currentElement=null,n.state={width:0,height:0,offsetHeight:0,offsetWidth:0},n.onResize=function(s){var u=n.props.onResize,p=s[0].target,S=p.getBoundingClientRect(),x=S.width,M=S.height,C=p.offsetWidth,c=p.offsetHeight,r=Math.floor(x),a=Math.floor(M);if(n.state.width!==r||n.state.height!==a||n.state.offsetWidth!==C||n.state.offsetHeight!==c){var A={width:r,height:a,offsetWidth:C,offsetHeight:c};n.setState(A),u&&Promise.resolve().then(function(){u(Object(J.a)(Object(J.a)({},A),{},{offsetWidth:C,offsetHeight:c}))})}},n.setChildNode=function(s){n.childNode=s},n}return Object(O.a)(o,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var s=this.props.disabled;if(s){this.destroyObserver();return}var u=Object(f.a)(this.childNode||this),p=u!==this.currentElement;p&&(this.destroyObserver(),this.currentElement=u),!this.resizeObserver&&u&&(this.resizeObserver=new l.default(this.onResize),this.resizeObserver.observe(u))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var s=this.props.children,u=Object(b.a)(s);if(u.length>1)Object(g.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(u.length===0)return Object(g.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var p=u[0];if(B.isValidElement(p)&&Object(i.c)(p)){var S=p.ref;u[0]=B.cloneElement(p,{ref:Object(i.a)(S,this.setChildNode)})}return u.length===1?u[0]:u.map(function(x,M){return!B.isValidElement(x)||"key"in x&&x.key!==null?x:B.cloneElement(x,{key:"".concat(v,"-").concat(M)})})}}]),o}(B.Component);h.displayName="ResizeObserver",ue.a=h},u3os:function(qe,ue,k){"use strict";Object.defineProperty(ue,"__esModule",{value:!0}),ue.ver=ue.clear=ue.bind=void 0;var J=k("P4Qj"),N=function(B,D){var f=(0,J.getSensor)(B);return f.bind(D),function(){f.unbind(D)}};ue.bind=N;var O=function(B){var D=(0,J.getSensor)(B);(0,J.removeSensor)(D)};ue.clear=O;var Q="1.0.1";ue.ver=Q},ulZh:function(qe,ue,k){typeof window!="undefined"&&function(N,O){qe.exports=O()}(this,function(){return function(J){var N={};function O(Q){if(N[Q])return N[Q].exports;var R=N[Q]={i:Q,l:!1,exports:{}};return J[Q].call(R.exports,R,R.exports,O),R.l=!0,R.exports}return O.m=J,O.c=N,O.d=function(Q,R,B){O.o(Q,R)||Object.defineProperty(Q,R,{enumerable:!0,get:B})},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,R){if(R&1&&(Q=O(Q)),R&8)return Q;if(R&4&&typeof Q=="object"&&Q&&Q.__esModule)return Q;var B=Object.create(null);if(O.r(B),Object.defineProperty(B,"default",{enumerable:!0,value:Q}),R&2&&typeof Q!="string")for(var D in Q)O.d(B,D,function(f){return Q[f]}.bind(null,D));return B},O.n=function(Q){var R=Q&&Q.__esModule?function(){return Q.default}:function(){return Q};return O.d(R,"a",R),R},O.o=function(Q,R){return Object.prototype.hasOwnProperty.call(Q,R)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(J,N,O){"use strict";var Q=Object.prototype.hasOwnProperty,R="~";function B(){}Object.create&&(B.prototype=Object.create(null),new B().__proto__||(R=!1));function D(i,l,v){this.fn=i,this.context=l,this.once=v||!1}function f(i,l,v,h,d){if(typeof v!="function")throw new TypeError("The listener must be a function");var E=new D(v,h||i,d),o=R?R+l:l;return i._events[o]?i._events[o].fn?i._events[o]=[i._events[o],E]:i._events[o].push(E):(i._events[o]=E,i._eventsCount++),i}function b(i,l){--i._eventsCount===0?i._events=new B:delete i._events[l]}function g(){this._events=new B,this._eventsCount=0}g.prototype.eventNames=function(){var l=[],v,h;if(this._eventsCount===0)return l;for(h in v=this._events)Q.call(v,h)&&l.push(R?h.slice(1):h);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(v)):l},g.prototype.listeners=function(l){var v=R?R+l:l,h=this._events[v];if(!h)return[];if(h.fn)return[h.fn];for(var d=0,E=h.length,o=new Array(E);d<E;d++)o[d]=h[d].fn;return o},g.prototype.listenerCount=function(l){var v=R?R+l:l,h=this._events[v];return h?h.fn?1:h.length:0},g.prototype.emit=function(l,v,h,d,E,o){var n=R?R+l:l;if(!this._events[n])return!1;var s=this._events[n],u=arguments.length,p,S;if(s.fn){s.once&&this.removeListener(l,s.fn,void 0,!0);switch(u){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,v),!0;case 3:return s.fn.call(s.context,v,h),!0;case 4:return s.fn.call(s.context,v,h,d),!0;case 5:return s.fn.call(s.context,v,h,d,E),!0;case 6:return s.fn.call(s.context,v,h,d,E,o),!0}for(S=1,p=new Array(u-1);S<u;S++)p[S-1]=arguments[S];s.fn.apply(s.context,p)}else{var x=s.length,M;for(S=0;S<x;S++){s[S].once&&this.removeListener(l,s[S].fn,void 0,!0);switch(u){case 1:s[S].fn.call(s[S].context);break;case 2:s[S].fn.call(s[S].context,v);break;case 3:s[S].fn.call(s[S].context,v,h);break;case 4:s[S].fn.call(s[S].context,v,h,d);break;default:if(!p)for(M=1,p=new Array(u-1);M<u;M++)p[M-1]=arguments[M];s[S].fn.apply(s[S].context,p)}}}return!0},g.prototype.on=function(l,v,h){return f(this,l,v,h,!1)},g.prototype.once=function(l,v,h){return f(this,l,v,h,!0)},g.prototype.removeListener=function(l,v,h,d){var E=R?R+l:l;if(!this._events[E])return this;if(!v)return b(this,E),this;var o=this._events[E];if(o.fn)o.fn===v&&(!d||o.once)&&(!h||o.context===h)&&b(this,E);else{for(var n=0,s=[],u=o.length;n<u;n++)(o[n].fn!==v||d&&!o[n].once||h&&o[n].context!==h)&&s.push(o[n]);s.length?this._events[E]=s.length===1?s[0]:s:b(this,E)}return this},g.prototype.removeAllListeners=function(l){var v;return l?(v=R?R+l:l,this._events[v]&&b(this,v)):(this._events=new B,this._eventsCount=0),this},g.prototype.off=g.prototype.removeListener,g.prototype.addListener=g.prototype.on,g.prefixed=R,g.EventEmitter=g,J.exports=g},"./node_modules/url-toolkit/src/url-toolkit.js":function(J,N,O){(function(Q){var R=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,B=/^([^\/?#]*)([^]*)$/,D=/(?:\/|^)\.(?=\/)/g,f=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,b={buildAbsoluteURL:function(g,i,l){if(l=l||{},g=g.trim(),i=i.trim(),!i){if(!l.alwaysNormalize)return g;var v=b.parseURL(g);if(!v)throw new Error("Error trying to parse base URL.");return v.path=b.normalizePath(v.path),b.buildURLFromParts(v)}var h=b.parseURL(i);if(!h)throw new Error("Error trying to parse relative URL.");if(h.scheme)return l.alwaysNormalize?(h.path=b.normalizePath(h.path),b.buildURLFromParts(h)):i;var d=b.parseURL(g);if(!d)throw new Error("Error trying to parse base URL.");if(!d.netLoc&&d.path&&d.path[0]!=="/"){var E=B.exec(d.path);d.netLoc=E[1],d.path=E[2]}d.netLoc&&!d.path&&(d.path="/");var o={scheme:d.scheme,netLoc:h.netLoc,path:null,params:h.params,query:h.query,fragment:h.fragment};if(!h.netLoc&&(o.netLoc=d.netLoc,h.path[0]!=="/"))if(!h.path)o.path=d.path,h.params||(o.params=d.params,h.query||(o.query=d.query));else{var n=d.path,s=n.substring(0,n.lastIndexOf("/")+1)+h.path;o.path=b.normalizePath(s)}return o.path===null&&(o.path=l.alwaysNormalize?b.normalizePath(h.path):h.path),b.buildURLFromParts(o)},parseURL:function(g){var i=R.exec(g);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(g){for(g=g.split("").reverse().join("").replace(D,"");g.length!==(g=g.replace(f,"")).length;);return g.split("").reverse().join("")},buildURLFromParts:function(g){return g.scheme+g.netLoc+g.path+g.params+g.query+g.fragment}};J.exports=b})(this)},"./node_modules/webworkify-webpack/index.js":function(J,N,O){function Q(l){var v={};function h(E){if(v[E])return v[E].exports;var o=v[E]={i:E,l:!1,exports:{}};return l[E].call(o.exports,o,o.exports,h),o.l=!0,o.exports}h.m=l,h.c=v,h.i=function(E){return E},h.d=function(E,o,n){h.o(E,o)||Object.defineProperty(E,o,{configurable:!1,enumerable:!0,get:n})},h.r=function(E){Object.defineProperty(E,"__esModule",{value:!0})},h.n=function(E){var o=E&&E.__esModule?function(){return E.default}:function(){return E};return h.d(o,"a",o),o},h.o=function(E,o){return Object.prototype.hasOwnProperty.call(E,o)},h.p="/",h.oe=function(E){throw console.error(E),E};var d=h(h.s=ENTRY_MODULE);return d.default||d}var R="[\\.|\\-|\\+|\\w|/|@]+",B="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+R+").*?\\)";function D(l){return(l+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function f(l){return!isNaN(1*l)}function b(l,v,h){var d={};d[h]=[];var E=v.toString(),o=E.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!o)return d;for(var n=o[1],s=new RegExp("(\\\\n|\\W)"+D(n)+B,"g"),u;u=s.exec(E);){if(u[3]==="dll-reference")continue;d[h].push(u[3])}for(s=new RegExp("\\("+D(n)+'\\("(dll-reference\\s('+R+'))"\\)\\)'+B,"g");u=s.exec(E);)l[u[2]]||(d[h].push(u[1]),l[u[2]]=O(u[1]).m),d[u[2]]=d[u[2]]||[],d[u[2]].push(u[4]);for(var p=Object.keys(d),S=0;S<p.length;S++)for(var x=0;x<d[p[S]].length;x++)f(d[p[S]][x])&&(d[p[S]][x]=1*d[p[S]][x]);return d}function g(l){var v=Object.keys(l);return v.reduce(function(h,d){return h||l[d].length>0},!1)}function i(l,v){for(var h={main:[v]},d={main:[]},E={main:{}};g(h);)for(var o=Object.keys(h),n=0;n<o.length;n++){var s=o[n],u=h[s],p=u.pop();if(E[s]=E[s]||{},E[s][p]||!l[s][p])continue;E[s][p]=!0,d[s]=d[s]||[],d[s].push(p);for(var S=b(l,l[s][p],s),x=Object.keys(S),M=0;M<x.length;M++)h[x[M]]=h[x[M]]||[],h[x[M]]=h[x[M]].concat(S[x[M]])}return d}J.exports=function(l,v){v=v||{};var h={main:O.m},d=v.all?{main:Object.keys(h.main)}:i(h,l),E="";Object.keys(d).filter(function(p){return p!=="main"}).forEach(function(p){for(var S=0;d[p][S];)S++;d[p].push(S),h[p][S]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",E=E+"var "+p+" = ("+Q.toString().replace("ENTRY_MODULE",JSON.stringify(S))+")({"+d[p].map(function(x){return""+JSON.stringify(x)+": "+h[p][x].toString()}).join(",")+`});
|
|
`}),E=E+"new (("+Q.toString().replace("ENTRY_MODULE",JSON.stringify(l))+")({"+d.main.map(function(p){return""+JSON.stringify(p)+": "+h.main[p].toString()}).join(",")+"}))(self);";var o=new window.Blob([E],{type:"text/javascript"});if(v.bare)return o;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,s=n.createObjectURL(o),u=new window.Worker(s);return u.objectURL=s,u}},"./src/config.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"hlsDefaultConfig",function(){return M}),O.d(N,"mergeConfig",function(){return c}),O.d(N,"enableStreamingMode",function(){return r});var Q=O("./src/controller/abr-controller.ts"),R=O("./src/controller/audio-stream-controller.ts"),B=O("./src/controller/audio-track-controller.ts"),D=O("./src/controller/subtitle-stream-controller.ts"),f=O("./src/controller/subtitle-track-controller.ts"),b=O("./src/controller/buffer-controller.ts"),g=O("./src/controller/timeline-controller.ts"),i=O("./src/controller/cap-level-controller.ts"),l=O("./src/controller/fps-controller.ts"),v=O("./src/controller/eme-controller.ts"),h=O("./src/controller/cmcd-controller.ts"),d=O("./src/utils/xhr-loader.ts"),E=O("./src/utils/fetch-loader.ts"),o=O("./src/utils/cues.ts"),n=O("./src/utils/mediakeys-helper.ts"),s=O("./src/utils/logger.ts");function u(){return u=Object.assign||function(a){for(var A=1;A<arguments.length;A++){var L=arguments[A];for(var T in L)Object.prototype.hasOwnProperty.call(L,T)&&(a[T]=L[T])}return a},u.apply(this,arguments)}function p(a,A){var L=Object.keys(a);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(a);A&&(T=T.filter(function(w){return Object.getOwnPropertyDescriptor(a,w).enumerable})),L.push.apply(L,T)}return L}function S(a){for(var A=1;A<arguments.length;A++){var L=arguments[A]!=null?arguments[A]:{};A%2?p(Object(L),!0).forEach(function(T){x(a,T,L[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(L)):p(Object(L)).forEach(function(T){Object.defineProperty(a,T,Object.getOwnPropertyDescriptor(L,T))})}return a}function x(a,A,L){return A in a?Object.defineProperty(a,A,{value:L,enumerable:!0,configurable:!0,writable:!0}):a[A]=L,a}var M=S(S({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:d.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Q.default,bufferController:b.default,capLevelController:i.default,fpsController:l.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:n.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},C()),{},{subtitleStreamController:D.SubtitleStreamController,subtitleTrackController:f.default,timelineController:g.TimelineController,audioStreamController:R.default,audioTrackController:B.default,emeController:v.default,cmcdController:h.default});function C(){return{cueHandler:o.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 c(a,A){if((A.liveSyncDurationCount||A.liveMaxLatencyDurationCount)&&(A.liveSyncDuration||A.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(A.liveMaxLatencyDurationCount!==void 0&&(A.liveSyncDurationCount===void 0||A.liveMaxLatencyDurationCount<=A.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(A.liveMaxLatencyDuration!==void 0&&(A.liveSyncDuration===void 0||A.liveMaxLatencyDuration<=A.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return u({},a,A)}function r(a){var A=a.loader;if(A!==E.default&&A!==d.default)s.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1;else{var L=Object(E.fetchSupported)();L&&(a.loader=E.default,a.progressive=!0,a.enableSoftwareAES=!0,s.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/polyfills/number.ts"),R=O("./src/utils/ewma-bandwidth-estimator.ts"),B=O("./src/events.ts"),D=O("./src/utils/buffer-helper.ts"),f=O("./src/errors.ts"),b=O("./src/types/loader.ts"),g=O("./src/utils/logger.ts");function i(h,d){for(var E=0;E<d.length;E++){var o=d[E];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(h,o.key,o)}}function l(h,d,E){return d&&i(h.prototype,d),E&&i(h,E),h}var v=function(){function h(E){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=E;var o=E.config;this.bwEstimator=new R.default(o.abrEwmaSlowVoD,o.abrEwmaFastVoD,o.abrEwmaDefaultEstimate),this.registerListeners()}var d=h.prototype;return d.registerListeners=function(){var o=this.hls;o.on(B.Events.FRAG_LOADING,this.onFragLoading,this),o.on(B.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.on(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.on(B.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var o=this.hls;o.off(B.Events.FRAG_LOADING,this.onFragLoading,this),o.off(B.Events.FRAG_LOADED,this.onFragLoaded,this),o.off(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.off(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.off(B.Events.ERROR,this.onError,this)},d.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},d.onFragLoading=function(o,n){var s=n.frag;if(s.type===b.PlaylistLevelType.MAIN&&!this.timer){var u;this.fragCurrent=s,this.partCurrent=(u=n.part)!=null?u:null,this.timer=self.setInterval(this.onCheck,100)}},d.onLevelLoaded=function(o,n){var s=this.hls.config;n.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)},d._abandonRulesCheck=function(){var o=this.fragCurrent,n=this.partCurrent,s=this.hls,u=s.autoLevelEnabled,p=s.config,S=s.media;if(!o||!S)return;var x=n?n.stats:o.stats,M=n?n.duration:o.duration;if(x.aborted){g.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!u||S.paused||!S.playbackRate||!S.readyState)return;var C=performance.now()-x.loading.start,c=Math.abs(S.playbackRate);if(C<=500*M/c)return;var r=s.levels,a=s.minAutoLevel,A=r[o.level],L=x.total||Math.max(x.loaded,Math.round(M*A.maxBitrate/8)),T=Math.max(1,x.bwEstimate?x.bwEstimate/8:x.loaded*1e3/C),w=(L-x.loaded)/T,_=S.currentTime,j=(D.BufferHelper.bufferInfo(S,_,p.maxBufferHole).end-_)/c;if(j>=2*M/c||w<=j)return;var W=Number.POSITIVE_INFINITY,Z;for(Z=o.level-1;Z>a;Z--){var X=r[Z].maxBitrate;if(W=M*X/(8*.8*T),W<j)break}if(W>=w)return;var G=this.bwEstimator.getEstimate();g.logger.warn("Fragment "+o.sn+(n?" part "+n.index:"")+" of level "+o.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+Z+`
|
|
Current BW estimate: `+(Object(Q.isFiniteNumber)(G)?(G/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+w.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+W.toFixed(3)+` s
|
|
Time to underbuffer: `+j.toFixed(3)+" s"),s.nextLoadLevel=Z,this.bwEstimator.sample(C,x.loaded),this.clearTimer(),o.loader&&(this.fragCurrent=this.partCurrent=null,o.loader.abort()),s.trigger(B.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:o,part:n,stats:x})},d.onFragLoaded=function(o,n){var s=n.frag,u=n.part;if(s.type===b.PlaylistLevelType.MAIN&&Object(Q.isFiniteNumber)(s.sn)){var p=u?u.stats:s.stats,S=u?u.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var x=this.hls.levels[s.level],M=(x.loaded?x.loaded.bytes:0)+p.loaded,C=(x.loaded?x.loaded.duration:0)+S;x.loaded={bytes:M,duration:C},x.realBitrate=Math.round(8*M/C)}if(s.bitrateTest){var c={stats:p,frag:s,part:u,id:s.type};this.onFragBuffered(B.Events.FRAG_BUFFERED,c),s.bitrateTest=!1}}},d.onFragBuffered=function(o,n){var s=n.frag,u=n.part,p=u?u.stats:s.stats;if(p.aborted)return;if(s.type!==b.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var S=p.parsing.end-p.loading.start;this.bwEstimator.sample(S,p.loaded),p.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=S/1e3:this.bitrateTestDelay=0},d.onError=function(o,n){switch(n.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},d.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},d.getNextABRAutoLevel=function(){var o=this.fragCurrent,n=this.partCurrent,s=this.hls,u=s.maxAutoLevel,p=s.config,S=s.minAutoLevel,x=s.media,M=n?n.duration:o?o.duration:0,C=x?x.currentTime:0,c=x&&x.playbackRate!==0?Math.abs(x.playbackRate):1,r=this.bwEstimator?this.bwEstimator.getEstimate():p.abrEwmaDefaultEstimate,a=(D.BufferHelper.bufferInfo(x,C,p.maxBufferHole).end-C)/c,A=this.findBestLevel(r,S,u,a,p.abrBandWidthFactor,p.abrBandWidthUpFactor);if(A>=0)return A;g.logger.trace((a?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var L=M?Math.min(M,p.maxStarvationDelay):p.maxStarvationDelay,T=p.abrBandWidthFactor,w=p.abrBandWidthUpFactor;if(!a){var _=this.bitrateTestDelay;if(_){var j=M?Math.min(M,p.maxLoadingDelay):p.maxLoadingDelay;L=j-_,g.logger.trace("bitrate test took "+Math.round(1e3*_)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*L)+" ms"),T=w=1}}return A=this.findBestLevel(r,S,u,a+L,T,w),Math.max(A,0)},d.findBestLevel=function(o,n,s,u,p,S){for(var x,M=this.fragCurrent,C=this.partCurrent,c=this.lastLoadedFragLevel,r=this.hls.levels,a=r[c],A=!!(a!=null&&(x=a.details)!==null&&x!==void 0&&x.live),L=a==null?void 0:a.codecSet,T=C?C.duration:M?M.duration:0,w=s;w>=n;w--){var _=r[w];if(!_||L&&_.codecSet!==L)continue;var j=_.details,W=(C?j==null?void 0:j.partTarget:j==null?void 0:j.averagetargetduration)||T,Z=void 0;w<=c?Z=p*o:Z=S*o;var X=r[w].maxBitrate,G=X*W/Z;if(g.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+w+"/"+Math.round(Z)+"/"+X+"/"+W+"/"+u+"/"+G),Z>X&&(!G||A&&!this.bitrateTestDelay||G<u))return w}return-1},l(h,[{key:"nextAutoLevel",get:function(){var o=this._nextAutoLevel,n=this.bwEstimator;if(o!==-1&&(!n||!n.canEstimate()))return o;var s=this.getNextABRAutoLevel();return o!==-1&&(s=Math.min(o,s)),s},set:function(o){this._nextAutoLevel=o}}]),h}();N.default=v},"./src/controller/audio-stream-controller.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/polyfills/number.ts"),R=O("./src/controller/base-stream-controller.ts"),B=O("./src/events.ts"),D=O("./src/utils/buffer-helper.ts"),f=O("./src/controller/fragment-tracker.ts"),b=O("./src/types/level.ts"),g=O("./src/types/loader.ts"),i=O("./src/loader/fragment.ts"),l=O("./src/demux/chunk-cache.ts"),v=O("./src/demux/transmuxer-interface.ts"),h=O("./src/types/transmuxer.ts"),d=O("./src/controller/fragment-finders.ts"),E=O("./src/utils/discontinuities.ts"),o=O("./src/errors.ts"),n=O("./src/utils/logger.ts");function s(){return s=Object.assign||function(M){for(var C=1;C<arguments.length;C++){var c=arguments[C];for(var r in c)Object.prototype.hasOwnProperty.call(c,r)&&(M[r]=c[r])}return M},s.apply(this,arguments)}function u(M,C){M.prototype=Object.create(C.prototype),M.prototype.constructor=M,p(M,C)}function p(M,C){return p=Object.setPrototypeOf||function(r,a){return r.__proto__=a,r},p(M,C)}var S=100,x=function(M){u(C,M);function C(r,a){var A;return A=M.call(this,r,a,"[audio-stream-controller]")||this,A.videoBuffer=null,A.videoTrackCC=-1,A.waitingVideoCC=-1,A.audioSwitch=!1,A.trackId=-1,A.waitingData=null,A.mainDetails=null,A.bufferFlushed=!1,A._registerListeners(),A}var c=C.prototype;return c.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},c._registerListeners=function(){var a=this.hls;a.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),a.on(B.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),a.on(B.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),a.on(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),a.on(B.Events.ERROR,this.onError,this),a.on(B.Events.BUFFER_RESET,this.onBufferReset,this),a.on(B.Events.BUFFER_CREATED,this.onBufferCreated,this),a.on(B.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),a.on(B.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.on(B.Events.FRAG_BUFFERED,this.onFragBuffered,this)},c._unregisterListeners=function(){var a=this.hls;a.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),a.off(B.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),a.off(B.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),a.off(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),a.off(B.Events.ERROR,this.onError,this),a.off(B.Events.BUFFER_RESET,this.onBufferReset,this),a.off(B.Events.BUFFER_CREATED,this.onBufferCreated,this),a.off(B.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),a.off(B.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),a.off(B.Events.FRAG_BUFFERED,this.onFragBuffered,this)},c.onInitPtsFound=function(a,A){var L=A.frag,T=A.id,w=A.initPTS;if(T==="main"){var _=L.cc;this.initPTS[L.cc]=w,this.log("InitPTS for cc: "+_+" found from main: "+w),this.videoTrackCC=_,this.state===R.State.WAITING_INIT_PTS&&this.tick()}},c.startLoad=function(a){if(!this.levels){this.startPosition=a,this.state=R.State.STOPPED;return}var A=this.lastCurrentTime;this.stopLoad(),this.setInterval(S),this.fragLoadError=0,A>0&&a===-1?(this.log("Override startPosition with lastCurrentTime @"+A.toFixed(3)),this.state=R.State.IDLE):(this.loadedmetadata=!1,this.state=R.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=a,this.tick()},c.doTick=function(){switch(this.state){case R.State.IDLE:this.doTickIdle();break;case R.State.WAITING_TRACK:{var a,A=this.levels,L=this.trackId,T=A==null||((a=A[L])===null||a===void 0)?void 0:a.details;if(T){if(this.waitForCdnTuneIn(T))break;this.state=R.State.WAITING_INIT_PTS}break}case R.State.FRAG_LOADING_WAITING_RETRY:{var w,_=performance.now(),j=this.retryDate;(!j||_>=j||(w=this.media)!==null&&w!==void 0&&w.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=R.State.IDLE);break}case R.State.WAITING_INIT_PTS:{var W=this.waitingData;if(W){var Z=W.frag,X=W.part,G=W.cache,te=W.complete;if(this.initPTS[Z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=R.State.FRAG_LOADING;var Y=G.flush(),le={frag:Z,part:X,payload:Y,networkDetails:null};this._handleFragmentLoadProgress(le),te&&M.prototype._handleFragmentLoadComplete.call(this,le)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+Z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Ae=this.getLoadPosition(),Be=D.BufferHelper.bufferInfo(this.mediaBuffer,Ae,this.config.maxBufferHole),Ce=Object(d.fragmentWithinToleranceTest)(Be.end,this.config.maxFragLookUpTolerance,Z);Ce<0&&(n.logger.log("Waiting fragment cc ("+Z.cc+") @ "+Z.start+" cancelled because another fragment at "+Be.end+" is needed"),this.clearWaitingFragment())}}else this.state=R.State.IDLE}}this.onTickEnd()},c.clearWaitingFragment=function(){var a=this.waitingData;a&&(this.fragmentTracker.removeFragment(a.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=R.State.IDLE)},c.onTickEnd=function(){var a=this.media;if(!a||!a.readyState)return;var A=this.mediaBuffer?this.mediaBuffer:a,L=A.buffered;!this.loadedmetadata&&L.length&&(this.loadedmetadata=!0),this.lastCurrentTime=a.currentTime},c.doTickIdle=function(){var a,A,L=this.hls,T=this.levels,w=this.media,_=this.trackId,j=L.config;if(!T||!T[_])return;if(!w&&(this.startFragRequested||!j.startFragPrefetch))return;var W=T[_],Z=W.details;if(!Z||Z.live&&this.levelLastLoaded!==_||this.waitForCdnTuneIn(Z)){this.state=R.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,i.ElementaryStreamTypes.AUDIO,g.PlaylistLevelType.AUDIO));var X=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,g.PlaylistLevelType.AUDIO);if(X===null)return;var G=X.len,te=this.getMaxBufferLength(),Y=this.audioSwitch;if(G>=te&&!Y)return;if(!Y&&this._streamEnded(X,Z)){L.trigger(B.Events.BUFFER_EOS,{type:"audio"}),this.state=R.State.ENDED;return}var le=Z.fragments,Ae=le[0].start,Be=X.end;if(Y){var Ce=this.getLoadPosition();Be=Ce,Z.PTSKnown&&Ce<Ae&&((X.end>Ae||X.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),w.currentTime=Ae+.05))}var Se=this.getNextFragment(Be,Z);if(!Se){this.bufferFlushed=!0;return}((a=Se.decryptdata)===null||a===void 0?void 0:a.keyFormat)==="identity"&&!((A=Se.decryptdata)!==null&&A!==void 0&&A.key)?this.loadKey(Se,Z):this.loadFragment(Se,Z,Be)},c.getMaxBufferLength=function(){var a=M.prototype.getMaxBufferLength.call(this),A=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,g.PlaylistLevelType.MAIN);return A===null?a:Math.max(a,A.len)},c.onMediaDetaching=function(){this.videoBuffer=null,M.prototype.onMediaDetaching.call(this)},c.onAudioTracksUpdated=function(a,A){var L=A.audioTracks;this.resetTransmuxer(),this.levels=L.map(function(T){return new b.Level(T)})},c.onAudioTrackSwitching=function(a,A){var L=!!A.url;this.trackId=A.id;var T=this.fragCurrent;T!=null&&T.loader&&T.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),L?this.setInterval(S):this.resetTransmuxer(),L?(this.audioSwitch=!0,this.state=R.State.IDLE):this.state=R.State.STOPPED,this.tick()},c.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},c.onLevelLoaded=function(a,A){this.mainDetails=A.details},c.onAudioTrackLoaded=function(a,A){var L,T=this.levels,w=A.details,_=A.id;if(!T){this.warn("Audio tracks were reset while loading level "+_);return}this.log("Track "+_+" loaded ["+w.startSN+","+w.endSN+"],duration:"+w.totalduration);var j=T[_],W=0;if(w.live||(L=j.details)!==null&&L!==void 0&&L.live){var Z=this.mainDetails;if(w.fragments[0]||(w.deltaUpdateFailed=!0),w.deltaUpdateFailed||!Z)return;!j.details&&w.hasProgramDateTime&&Z.hasProgramDateTime?(Object(E.alignMediaPlaylistByPDT)(w,Z),W=w.fragments[0].start):W=this.alignPlaylists(w,j.details)}j.details=w,this.levelLastLoaded=_,!this.startFragRequested&&(this.mainDetails||!w.live)&&this.setStartPosition(j.details,W),this.state===R.State.WAITING_TRACK&&!this.waitForCdnTuneIn(w)&&(this.state=R.State.IDLE),this.tick()},c._handleFragmentLoadProgress=function(a){var A,L=a.frag,T=a.part,w=a.payload,_=this.config,j=this.trackId,W=this.levels;if(!W){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+L.sn+" of level "+L.level+" will not be buffered");return}var Z=W[j];console.assert(Z,"Audio track is defined on fragment load progress");var X=Z.details;console.assert(X,"Audio track details are defined on fragment load progress");var G=_.defaultAudioCodec||Z.audioCodec||"mp4a.40.2",te=this.transmuxer;te||(te=this.transmuxer=new v.default(this.hls,g.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Y=this.initPTS[L.cc],le=(A=L.initSegment)===null||A===void 0?void 0:A.data;if(Y!==void 0){var Ae=!1,Be=T?T.index:-1,Ce=Be!==-1,Se=new h.ChunkMetadata(L.level,L.sn,L.stats.chunkCount,w.byteLength,Be,Ce);te.push(w,le,G,"",L,T,X.totalduration,Ae,Se,Y)}else{n.logger.log("Unknown video PTS for cc "+L.cc+", waiting for video PTS before demuxing audio frag "+L.sn+" of ["+X.startSN+" ,"+X.endSN+"],track "+j);var Fe=this.waitingData=this.waitingData||{frag:L,part:T,cache:new l.default,complete:!1},Ve=Fe.cache;Ve.push(new Uint8Array(w)),this.waitingVideoCC=this.videoTrackCC,this.state=R.State.WAITING_INIT_PTS}},c._handleFragmentLoadComplete=function(a){if(this.waitingData){this.waitingData.complete=!0;return}M.prototype._handleFragmentLoadComplete.call(this,a)},c.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},c.onBufferCreated=function(a,A){var L=A.tracks.audio;L&&(this.mediaBuffer=L.buffer),A.tracks.video&&(this.videoBuffer=A.tracks.video.buffer)},c.onFragBuffered=function(a,A){var L=A.frag,T=A.part;if(L.type!==g.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(L)){this.warn("Fragment "+L.sn+(T?" p: "+T.index:"")+" of level "+L.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}L.sn!=="initSegment"&&(this.fragPrevious=L,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(B.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(L,T)},c.onError=function(a,A){switch(A.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(g.PlaylistLevelType.AUDIO,A);break;case o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==R.State.ERROR&&this.state!==R.State.STOPPED&&(this.state=A.fatal?R.State.ERROR:R.State.IDLE,this.warn(A.details+" while loading frag, switching to "+this.state+" state"));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(A.parent==="audio"&&(this.state===R.State.PARSING||this.state===R.State.PARSED)){var L=!0,T=this.getFwdBufferInfo(this.mediaBuffer,g.PlaylistLevelType.AUDIO);T&&T.len>.5&&(L=!this.reduceMaxBufferLength(T.len)),L&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,M.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},c.onBufferFlushed=function(a,A){var L=A.type;L===i.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},c._handleTransmuxComplete=function(a){var A,L="audio",T=this.hls,w=a.remuxResult,_=a.chunkMeta,j=this.getCurrentContext(_);if(!j){this.warn("The loading context changed while buffering fragment "+_.sn+" of level "+_.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(_.level);return}var W=j.frag,Z=j.part,X=w.audio,G=w.text,te=w.id3,Y=w.initSegment;if(this.fragContextChanged(W))return;if(this.state=R.State.PARSING,this.audioSwitch&&X&&this.completeAudioSwitch(),Y!=null&&Y.tracks&&(this._bufferInitSegment(Y.tracks,W,_),T.trigger(B.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:L,tracks:Y.tracks})),X){var le=X.startPTS,Ae=X.endPTS,Be=X.startDTS,Ce=X.endDTS;Z&&(Z.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:le,endPTS:Ae,startDTS:Be,endDTS:Ce}),W.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,le,Ae,Be,Ce),this.bufferFragmentData(X,W,Z,_)}if(te!=null&&(A=te.samples)!==null&&A!==void 0&&A.length){var Se=s({frag:W,id:L},te);T.trigger(B.Events.FRAG_PARSING_METADATA,Se)}if(G){var Fe=s({frag:W,id:L},G);T.trigger(B.Events.FRAG_PARSING_USERDATA,Fe)}},c._bufferInitSegment=function(a,A,L){if(this.state!==R.State.PARSING)return;a.video&&delete a.video;var T=a.audio;if(!T)return;T.levelCodec=T.codec,T.id="audio",this.log("Init audio buffer, container:"+T.container+", codecs[parsed]=["+T.codec+"]"),this.hls.trigger(B.Events.BUFFER_CODECS,a);var w=T.initSegment;if(w!=null&&w.byteLength){var _={type:"audio",frag:A,part:null,chunkMeta:L,parent:A.type,data:w};this.hls.trigger(B.Events.BUFFER_APPENDING,_)}this.tick()},c.loadFragment=function(a,A,L){var T=this.fragmentTracker.getState(a);this.fragCurrent=a,(this.audioSwitch||T===f.FragmentState.NOT_LOADED||T===f.FragmentState.PARTIAL)&&(a.sn==="initSegment"?this._loadInitSegment(a):A.live&&!Object(Q.isFiniteNumber)(this.initPTS[a.cc])?(this.log("Waiting for video PTS in continuity counter "+a.cc+" of live stream before loading audio fragment "+a.sn+" of level "+this.trackId),this.state=R.State.WAITING_INIT_PTS):(this.startFragRequested=!0,M.prototype.loadFragment.call(this,a,A,L)))},c.completeAudioSwitch=function(){var a=this.hls,A=this.media,L=this.trackId;A&&(this.log("Switching audio track : flushing all audio"),M.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,a.trigger(B.Events.AUDIO_TRACK_SWITCHED,{id:L})},C}(R.default);N.default=x},"./src/controller/audio-track-controller.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/events.ts"),R=O("./src/errors.ts"),B=O("./src/controller/base-playlist-controller.ts"),D=O("./src/types/loader.ts");function f(v,h){for(var d=0;d<h.length;d++){var E=h[d];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(v,E.key,E)}}function b(v,h,d){return h&&f(v.prototype,h),d&&f(v,d),v}function g(v,h){v.prototype=Object.create(h.prototype),v.prototype.constructor=v,i(v,h)}function i(v,h){return i=Object.setPrototypeOf||function(E,o){return E.__proto__=o,E},i(v,h)}var l=function(v){g(h,v);function h(E){var o;return o=v.call(this,E,"[audio-track-controller]")||this,o.tracks=[],o.groupId=null,o.tracksInGroup=[],o.trackId=-1,o.trackName="",o.selectDefaultTrack=!0,o.registerListeners(),o}var d=h.prototype;return d.registerListeners=function(){var o=this.hls;o.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.on(Q.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(Q.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var o=this.hls;o.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.off(Q.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(Q.Events.ERROR,this.onError,this)},d.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,v.prototype.destroy.call(this)},d.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},d.onManifestParsed=function(o,n){this.tracks=n.audioTracks||[]},d.onAudioTrackLoaded=function(o,n){var s=n.id,u=n.details,p=this.tracksInGroup[s];if(!p){this.warn("Invalid audio track id "+s);return}var S=p.details;p.details=n.details,this.log("audioTrack "+s+" loaded ["+u.startSN+"-"+u.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,n,S))},d.onLevelLoading=function(o,n){this.switchLevel(n.level)},d.onLevelSwitching=function(o,n){this.switchLevel(n.level)},d.switchLevel=function(o){var n=this.hls.levels[o];if(!(n!=null&&n.audioGroupIds))return;var s=n.audioGroupIds[n.urlId];if(this.groupId!==s){this.groupId=s;var u=this.tracks.filter(function(S){return!s||S.groupId===s});this.selectDefaultTrack&&!u.some(function(S){return S.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=u;var p={audioTracks:u};this.log("Updating audio tracks, "+u.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(Q.Events.AUDIO_TRACKS_UPDATED,p),this.selectInitialTrack()}},d.onError=function(o,n){if(v.prototype.onError.call(this,o,n),n.fatal||!n.context)return;n.context.type===D.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},d.setAudioTrack=function(o){var n=this.tracksInGroup;if(o<0||o>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=n[this.trackId];this.log("Now switching to audio-track index "+o);var u=n[o],p=u.id,S=u.groupId,x=S===void 0?"":S,M=u.name,C=u.type,c=u.url;if(this.trackId=o,this.trackName=M,this.selectDefaultTrack=!1,this.hls.trigger(Q.Events.AUDIO_TRACK_SWITCHING,{id:p,groupId:x,name:M,type:C,url:c}),u.details&&!u.details.live)return;var r=this.switchParams(u.url,s==null?void 0:s.details);this.loadPlaylist(r)},d.selectInitialTrack=function(){var o=this.tracksInGroup;console.assert(o.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,s=this.findTrackId(n)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},d.findTrackId=function(o){for(var n=this.tracksInGroup,s=0;s<n.length;s++){var u=n[s];if((!this.selectDefaultTrack||u.default)&&(!o||o===u.name))return u.id}return-1},d.loadPlaylist=function(o){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var s=n.id,u=n.groupId,p=n.url;if(o)try{p=o.addDirectives(p)}catch(S){this.warn("Could not construct new URL with HLS Delivery Directives: "+S)}this.log("loading audio-track playlist for id: "+s),this.clearTimer(),this.hls.trigger(Q.Events.AUDIO_TRACK_LOADING,{url:p,id:s,groupId:u,deliveryDirectives:o||null})}},b(h,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(o){this.selectDefaultTrack=!1,this.setAudioTrack(o)}}]),h}(B.default);N.default=l},"./src/controller/base-playlist-controller.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return b});var Q=O("./src/polyfills/number.ts"),R=O("./src/types/level.ts"),B=O("./src/controller/level-helper.ts"),D=O("./src/utils/logger.ts"),f=O("./src/errors.ts"),b=function(){function g(l,v){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=D.logger.log.bind(D.logger,v+":"),this.warn=D.logger.warn.bind(D.logger,v+":"),this.hls=l}var i=g.prototype;return i.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},i.onError=function(v,h){h.fatal&&h.type===f.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},i.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},i.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},i.stopLoad=function(){this.canLoad=!1,this.clearTimer()},i.switchParams=function(v,h){var d=h==null?void 0:h.renditionReports;if(d)for(var E=0;E<d.length;E++){var o=d[E],n=""+o.URI;if(n===v.substr(-n.length)){var s=parseInt(o["LAST-MSN"]),u=parseInt(o["LAST-PART"]);if(h&&this.hls.config.lowLatencyMode){var p=Math.min(h.age-h.partTarget,h.targetduration);u!==void 0&&p>h.partTarget&&(u+=1)}if(Object(Q.isFiniteNumber)(s))return new R.HlsUrlParameters(s,Object(Q.isFiniteNumber)(u)?u:void 0,R.HlsSkip.No)}}},i.loadPlaylist=function(v){},i.shouldLoadTrack=function(v){return this.canLoad&&v&&!!v.url&&(!v.details||v.details.live)},i.playlistLoaded=function(v,h,d){var E=this,o=h.details,n=h.stats,s=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(o.advancedDateTime=Date.now()-s,o.live||d!=null&&d.live){if(o.reloaded(d),d&&this.log("live playlist "+v+" "+(o.advanced?"REFRESHED "+o.lastPartSn+"-"+o.lastPartIndex:"MISSED")),d&&o.fragments.length>0&&Object(B.mergeDetails)(d,o),!this.canLoad||!o.live)return;var u,p=void 0,S=void 0;if(o.canBlockReload&&o.endSN&&o.advanced){var x=this.hls.config.lowLatencyMode,M=o.lastPartSn,C=o.endSN,c=o.lastPartIndex,r=c!==-1,a=M===C,A=x?0:c;r?(p=a?C+1:M,S=a?A:c+1):p=C+1;var L=o.age,T=L+o.ageHeader,w=Math.min(T-o.partTarget,o.targetduration*1.5);if(w>0){if(d&&w>d.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+d.tuneInGoal+" to: "+w+" with playlist age: "+o.age),w=0;else{var _=Math.floor(w/o.targetduration);if(p+=_,S!==void 0){var j=Math.round(w%o.targetduration/o.partTarget);S+=j}this.log("CDN Tune-in age: "+o.ageHeader+"s last advanced "+L.toFixed(2)+"s goal: "+w+" skip sn "+_+" to part "+S)}o.tuneInGoal=w}if(u=this.getDeliveryDirectives(o,h.deliveryDirectives,p,S),x||!a){this.loadPlaylist(u);return}}else u=this.getDeliveryDirectives(o,h.deliveryDirectives,p,S);var W=Object(B.computeReloadInterval)(o,n);p!==void 0&&o.canBlockReload&&(W-=o.partTarget||1),this.log("reload live playlist "+v+" in "+Math.round(W)+" ms"),this.timer=self.setTimeout(function(){return E.loadPlaylist(u)},W)}else this.clearTimer()},i.getDeliveryDirectives=function(v,h,d,E){var o=Object(R.getSkipValue)(v,d);return h!=null&&h.skip&&v.deltaUpdateFailed&&(d=h.msn,E=h.part,o=R.HlsSkip.No),new R.HlsUrlParameters(d,E,o)},i.retryLoadingOrFail=function(v){var h=this,d=this.hls.config,E=this.retryCount<d.levelLoadingMaxRetry;if(E){var o;if(this.retryCount++,v.details.indexOf("LoadTimeOut")>-1&&(o=v.context)!==null&&o!==void 0&&o.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+v.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*d.levelLoadingRetryDelay,d.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return h.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+v.details+'"')}}else this.warn('cannot recover from error "'+v.details+'"'),this.clearTimer(),v.fatal=!0;return E},g}()},"./src/controller/base-stream-controller.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"State",function(){return C}),O.d(N,"default",function(){return c});var Q=O("./src/polyfills/number.ts"),R=O("./src/task-loop.ts"),B=O("./src/controller/fragment-tracker.ts"),D=O("./src/utils/buffer-helper.ts"),f=O("./src/utils/logger.ts"),b=O("./src/events.ts"),g=O("./src/errors.ts"),i=O("./src/types/transmuxer.ts"),l=O("./src/utils/mp4-tools.ts"),v=O("./src/utils/discontinuities.ts"),h=O("./src/controller/fragment-finders.ts"),d=O("./src/controller/level-helper.ts"),E=O("./src/loader/fragment-loader.ts"),o=O("./src/crypt/decrypter.ts"),n=O("./src/utils/time-ranges.ts"),s=O("./src/types/loader.ts");function u(r,a){for(var A=0;A<a.length;A++){var L=a[A];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(r,L.key,L)}}function p(r,a,A){return a&&u(r.prototype,a),A&&u(r,A),r}function S(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function x(r,a){r.prototype=Object.create(a.prototype),r.prototype.constructor=r,M(r,a)}function M(r,a){return M=Object.setPrototypeOf||function(L,T){return L.__proto__=T,L},M(r,a)}var C={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"},c=function(r){x(a,r);function a(L,T,w){var _;return _=r.call(this)||this,_.hls=void 0,_.fragPrevious=null,_.fragCurrent=null,_.fragmentTracker=void 0,_.transmuxer=null,_._state=C.STOPPED,_.media=void 0,_.mediaBuffer=void 0,_.config=void 0,_.bitrateTest=!1,_.lastCurrentTime=0,_.nextLoadPosition=0,_.startPosition=0,_.loadedmetadata=!1,_.fragLoadError=0,_.retryDate=0,_.levels=null,_.fragmentLoader=void 0,_.levelLastLoaded=null,_.startFragRequested=!1,_.decrypter=void 0,_.initPTS=[],_.onvseeking=null,_.onvended=null,_.logPrefix="",_.log=void 0,_.warn=void 0,_.logPrefix=w,_.log=f.logger.log.bind(f.logger,w+":"),_.warn=f.logger.warn.bind(f.logger,w+":"),_.hls=L,_.fragmentLoader=new E.default(L.config),_.fragmentTracker=T,_.config=L.config,_.decrypter=new o.default(L,L.config),L.on(b.Events.KEY_LOADED,_.onKeyLoaded,S(_)),_}var A=a.prototype;return A.doTick=function(){this.onTickEnd()},A.onTickEnd=function(){},A.startLoad=function(T){},A.stopLoad=function(){this.fragmentLoader.abort();var T=this.fragCurrent;T&&this.fragmentTracker.removeFragment(T),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=C.STOPPED},A._streamEnded=function(T,w){var _=this.fragCurrent,j=this.fragmentTracker;if(!w.live&&_&&_.sn===w.endSN&&!T.nextStart){var W=j.getState(_);return W===B.FragmentState.PARTIAL||W===B.FragmentState.OK}return!1},A.onMediaAttached=function(T,w){var _=this.media=this.mediaBuffer=w.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),_.addEventListener("seeking",this.onvseeking),_.addEventListener("ended",this.onvended);var j=this.config;this.levels&&j.autoStartLoad&&this.state===C.STOPPED&&this.startLoad(j.startPosition)},A.onMediaDetaching=function(){var T=this.media;T!=null&&T.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),T&&(T.removeEventListener("seeking",this.onvseeking),T.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},A.onMediaSeeking=function(){var T=this.config,w=this.fragCurrent,_=this.media,j=this.mediaBuffer,W=this.state,Z=_?_.currentTime:0,X=D.BufferHelper.bufferInfo(j||_,Z,T.maxBufferHole);if(this.log("media seeking to "+(Object(Q.isFiniteNumber)(Z)?Z.toFixed(3):Z)+", state: "+W),W===C.ENDED)this.resetLoadingState();else if(w&&!X.len){var G=T.maxFragLookUpTolerance,te=w.start-G,Y=w.start+w.duration+G,le=Z>Y;(Z<te||le)&&(le&&w.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),w.loader.abort()),this.resetLoadingState())}_&&(this.lastCurrentTime=Z),!this.loadedmetadata&&!X.len&&(this.nextLoadPosition=this.startPosition=Z),this.tickImmediate()},A.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},A.onKeyLoaded=function(T,w){if(this.state!==C.KEY_LOADING||w.frag!==this.fragCurrent||!this.levels)return;this.state=C.IDLE;var _=this.levels[w.frag.level].details;_&&this.loadFragment(w.frag,_,w.frag.start)},A.onHandlerDestroying=function(){this.stopLoad(),r.prototype.onHandlerDestroying.call(this)},A.onHandlerDestroyed=function(){this.state=C.STOPPED,this.hls.off(b.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,r.prototype.onHandlerDestroyed.call(this)},A.loadKey=function(T,w){this.log("Loading key for "+T.sn+" of ["+w.startSN+"-"+w.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+T.level),this.state=C.KEY_LOADING,this.fragCurrent=T,this.hls.trigger(b.Events.KEY_LOADING,{frag:T})},A.loadFragment=function(T,w,_){this._loadFragForPlayback(T,w,_)},A._loadFragForPlayback=function(T,w,_){var j=this,W=function(X){if(j.fragContextChanged(T)){j.warn("Fragment "+T.sn+(X.part?" p: "+X.part.index:"")+" of level "+T.level+" was dropped during download."),j.fragmentTracker.removeFragment(T);return}T.stats.chunkCount++,j._handleFragmentLoadProgress(X)};this._doFragLoad(T,w,_,W).then(function(Z){if(!Z)return;j.fragLoadError=0;var X=j.state;if(j.fragContextChanged(T)){(X===C.FRAG_LOADING||X===C.BACKTRACKING||!j.fragCurrent&&X===C.PARSING)&&(j.fragmentTracker.removeFragment(T),j.state=C.IDLE);return}if("payload"in Z&&(j.log("Loaded fragment "+T.sn+" of level "+T.level),j.hls.trigger(b.Events.FRAG_LOADED,Z),j.state===C.BACKTRACKING)){j.fragmentTracker.backtrack(T,Z),j.resetFragmentLoading(T);return}j._handleFragmentLoadComplete(Z)}).catch(function(Z){j.warn(Z),j.resetFragmentLoading(T)})},A.flushMainBuffer=function(T,w,_){if(_===void 0&&(_=null),!(T-w))return;var j={startOffset:T,endOffset:w,type:_};this.fragLoadError=0,this.hls.trigger(b.Events.BUFFER_FLUSHING,j)},A._loadInitSegment=function(T){var w=this;this._doFragLoad(T).then(function(_){if(!_||w.fragContextChanged(T)||!w.levels)throw new Error("init load aborted");return _}).then(function(_){var j=w.hls,W=_.payload,Z=T.decryptdata;if(W&&W.byteLength>0&&Z&&Z.key&&Z.iv&&Z.method==="AES-128"){var X=self.performance.now();return w.decrypter.webCryptoDecrypt(new Uint8Array(W),Z.key.buffer,Z.iv.buffer).then(function(G){var te=self.performance.now();return j.trigger(b.Events.FRAG_DECRYPTED,{frag:T,payload:G,stats:{tstart:X,tdecrypt:te}}),_.payload=G,_})}return _}).then(function(_){var j=w.fragCurrent,W=w.hls,Z=w.levels;if(!Z)throw new Error("init load aborted, missing levels");var X=Z[T.level].details;console.assert(X,"Level details are defined when init segment is loaded");var G=T.stats;w.state=C.IDLE,w.fragLoadError=0,T.data=new Uint8Array(_.payload),G.parsing.start=G.buffering.start=self.performance.now(),G.parsing.end=G.buffering.end=self.performance.now(),_.frag===j&&W.trigger(b.Events.FRAG_BUFFERED,{stats:G,frag:j,part:null,id:T.type}),w.tick()}).catch(function(_){w.warn(_),w.resetFragmentLoading(T)})},A.fragContextChanged=function(T){var w=this.fragCurrent;return!T||!w||T.level!==w.level||T.sn!==w.sn||T.urlId!==w.urlId},A.fragBufferedComplete=function(T,w){var _=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+T.type+" sn: "+T.sn+(w?" part: "+w.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+T.level+" "+n.default.toString(D.BufferHelper.getBuffered(_))),this.state=C.IDLE,this.tick()},A._handleFragmentLoadComplete=function(T){var w=this.transmuxer;if(!w)return;var _=T.frag,j=T.part,W=T.partsLoaded,Z=!W||W.length===0||W.some(function(G){return!G}),X=new i.ChunkMetadata(_.level,_.sn,_.stats.chunkCount+1,0,j?j.index:-1,!Z);w.flush(X)},A._handleFragmentLoadProgress=function(T){},A._doFragLoad=function(T,w,_,j){var W=this;if(_===void 0&&(_=null),!this.levels)throw new Error("frag load aborted, missing levels");if(_=Math.max(T.start,_||0),this.config.lowLatencyMode&&w){var Z=w.partList;if(Z&&j){_>T.end&&w.fragmentHint&&(T=w.fragmentHint);var X=this.getNextPart(Z,T,_);if(X>-1){var G=Z[X];return this.log("Loading part sn: "+T.sn+" p: "+G.index+" cc: "+T.cc+" of playlist ["+w.startSN+"-"+w.endSN+"] parts [0-"+X+"-"+(Z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+T.level+", target: "+parseFloat(_.toFixed(3))),this.nextLoadPosition=G.start+G.duration,this.state=C.FRAG_LOADING,this.hls.trigger(b.Events.FRAG_LOADING,{frag:T,part:Z[X],targetBufferTime:_}),this.doFragPartsLoad(T,Z,X,j).catch(function(te){return W.handleFragLoadError(te)})}else if(!T.url||this.loadedEndOfParts(Z,_))return Promise.resolve(null)}}return this.log("Loading fragment "+T.sn+" cc: "+T.cc+" "+(w?"of ["+w.startSN+"-"+w.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+T.level+", target: "+parseFloat(_.toFixed(3))),Object(Q.isFiniteNumber)(T.sn)&&!this.bitrateTest&&(this.nextLoadPosition=T.start+T.duration),this.state=C.FRAG_LOADING,this.hls.trigger(b.Events.FRAG_LOADING,{frag:T,targetBufferTime:_}),this.fragmentLoader.load(T,j).catch(function(te){return W.handleFragLoadError(te)})},A.doFragPartsLoad=function(T,w,_,j){var W=this;return new Promise(function(Z,X){var G=[],te=function Y(le){var Ae=w[le];W.fragmentLoader.loadPart(T,Ae,j).then(function(Be){G[Ae.index]=Be;var Ce=Be.part;W.hls.trigger(b.Events.FRAG_LOADED,Be);var Se=w[le+1];if(Se&&Se.fragment===T)Y(le+1);else return Z({frag:T,part:Ce,partsLoaded:G})}).catch(X)};te(_)})},A.handleFragLoadError=function(T){var w=T.data;return w&&w.details===g.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(w.frag,w.part):this.hls.trigger(b.Events.ERROR,w),null},A._handleTransmuxerFlush=function(T){var w=this.getCurrentContext(T);if(!w||this.state!==C.PARSING){this.fragCurrent||(this.state=C.IDLE);return}var _=w.frag,j=w.part,W=w.level,Z=self.performance.now();_.stats.parsing.end=Z,j&&(j.stats.parsing.end=Z),this.updateLevelTiming(_,j,W,T.partial)},A.getCurrentContext=function(T){var w=this.levels,_=T.level,j=T.sn,W=T.part;if(!w||!w[_])return this.warn("Levels object was unset while buffering fragment "+j+" of level "+_+". The current chunk will not be buffered."),null;var Z=w[_],X=W>-1?Object(d.getPartWith)(Z,j,W):null,G=X?X.fragment:Object(d.getFragmentWithSN)(Z,j,this.fragCurrent);return G?{frag:G,part:X,level:Z}:null},A.bufferFragmentData=function(T,w,_,j){if(!T||this.state!==C.PARSING)return;var W=T.data1,Z=T.data2,X=W;if(W&&Z&&(X=Object(l.appendUint8Array)(W,Z)),!X||!X.length)return;var G={type:T.type,frag:w,part:_,chunkMeta:j,parent:w.type,data:X};this.hls.trigger(b.Events.BUFFER_APPENDING,G),T.dropped&&T.independent&&!_&&this.flushBufferGap(w)},A.flushBufferGap=function(T){var w=this.media;if(!w)return;if(!D.BufferHelper.isBuffered(w,w.currentTime)){this.flushMainBuffer(0,T.start);return}var _=w.currentTime,j=D.BufferHelper.bufferInfo(w,_,0),W=T.duration,Z=Math.min(this.config.maxFragLookUpTolerance*2,W*.25),X=Math.max(Math.min(T.start-Z,j.end-Z),_+Z);T.start-X>Z&&this.flushMainBuffer(X,T.start)},A.getFwdBufferInfo=function(T,w){var _=this.config,j=this.getLoadPosition();if(!Object(Q.isFiniteNumber)(j))return null;var W=D.BufferHelper.bufferInfo(T,j,_.maxBufferHole);if(W.len===0&&W.nextStart!==void 0){var Z=this.fragmentTracker.getBufferedFrag(j,w);if(Z&&W.nextStart<Z.end)return D.BufferHelper.bufferInfo(T,j,Math.max(W.nextStart,_.maxBufferHole))}return W},A.getMaxBufferLength=function(T){var w=this.config,_;return T?_=Math.max(8*w.maxBufferSize/T,w.maxBufferLength):_=w.maxBufferLength,Math.min(_,w.maxMaxBufferLength)},A.reduceMaxBufferLength=function(T){var w=this.config,_=T||w.maxBufferLength;return w.maxMaxBufferLength>=_?(w.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+w.maxMaxBufferLength+"s"),!0):!1},A.getNextFragment=function(T,w){var _,j,W=w.fragments,Z=W.length;if(!Z)return null;var X=this.config,G=W[0].start,te;if(w.live){var Y=X.initialLiveManifestSize;if(Z<Y)return this.warn("Not enough fragments to start playback (have: "+Z+", need: "+Y+")"),null;!w.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(te=this.getInitialLiveFragment(w,W),this.startPosition=te?this.hls.liveSyncPosition||te.start:T)}else T<=G&&(te=W[0]);if(!te){var le=X.lowLatencyMode?w.partEnd:w.fragmentEnd;te=this.getFragmentAtPosition(T,le,w)}return(_=te)!==null&&_!==void 0&&_.initSegment&&!((j=te)!==null&&j!==void 0&&j.initSegment.data)&&!this.bitrateTest&&(te=te.initSegment),te},A.getNextPart=function(T,w,_){for(var j=-1,W=!1,Z=!0,X=0,G=T.length;X<G;X++){var te=T[X];if(Z=Z&&!te.independent,j>-1&&_<te.start)break;var Y=te.loaded;!Y&&(W||te.independent||Z)&&te.fragment===w&&(j=X),W=Y}return j},A.loadedEndOfParts=function(T,w){var _=T[T.length-1];return _&&w>_.start&&_.loaded},A.getInitialLiveFragment=function(T,w){var _=this.fragPrevious,j=null;if(_){if(T.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+_.programDateTime),j=Object(h.findFragmentByPDT)(w,_.endProgramDateTime,this.config.maxFragLookUpTolerance)),!j){var W=_.sn+1;if(W>=T.startSN&&W<=T.endSN){var Z=w[W-T.startSN];_.cc===Z.cc&&(j=Z,this.log("Live playlist, switching playlist, load frag with next SN: "+j.sn))}j||(j=Object(h.findFragWithCC)(w,_.cc),j&&this.log("Live playlist, switching playlist, load frag with same CC: "+j.sn))}}else{var X=this.hls.liveSyncPosition;X!==null&&(j=this.getFragmentAtPosition(X,this.bitrateTest?T.fragmentEnd:T.edge,T))}return j},A.getFragmentAtPosition=function(T,w,_){var j=this.config,W=this.fragPrevious,Z=_.fragments,X=_.endSN,G=_.fragmentHint,te=j.maxFragLookUpTolerance,Y=!!(j.lowLatencyMode&&_.partList&&G);Y&&G&&!this.bitrateTest&&(Z=Z.concat(G),X=G.sn);var le;if(T<w){var Ae=T>w-te?0:te;le=Object(h.findFragmentByPTS)(W,Z,T,Ae)}else le=Z[Z.length-1];if(le){var Be=le.sn-_.startSN,Ce=W&&le.level===W.level,Se=Z[Be+1],Fe=this.fragmentTracker.getState(le);if(Fe===B.FragmentState.BACKTRACKED){le=null;for(var Ve=Be;Z[Ve]&&this.fragmentTracker.getState(Z[Ve])===B.FragmentState.BACKTRACKED;)W?le=Z[Ve--]:le=Z[--Ve];le||(le=Se)}else W&&le.sn===W.sn&&!Y&&(Ce&&(le.sn<X&&this.fragmentTracker.getState(Se)!==B.FragmentState.OK?(this.log("SN "+le.sn+" just loaded, load next one: "+Se.sn),le=Se):le=null))}return le},A.synchronizeToLiveEdge=function(T){var w=this.config,_=this.media;if(!_)return;var j=this.hls.liveSyncPosition,W=_.currentTime,Z=T.fragments[0].start,X=T.edge,G=W>=Z-w.maxFragLookUpTolerance&&W<=X;if(j!==null&&_.duration>j&&(W<j||!G)){var te=w.liveMaxLatencyDuration!==void 0?w.liveMaxLatencyDuration:w.liveMaxLatencyDurationCount*T.targetduration;(!G&&_.readyState<4||W<X-te)&&(this.loadedmetadata||(this.nextLoadPosition=j),_.readyState&&(this.warn("Playback: "+W.toFixed(3)+" is located too far from the end of live sliding playlist: "+X+", reset currentTime to : "+j.toFixed(3)),_.currentTime=j))}},A.alignPlaylists=function(T,w){var _=this.levels,j=this.levelLastLoaded,W=this.fragPrevious,Z=j!==null?_[j]:null,X=T.fragments.length;if(!X)return this.warn("No fragments in live playlist"),0;var G=T.fragments[0].start,te=!w,Y=T.alignedSliding&&Object(Q.isFiniteNumber)(G);if(te||!Y&&!G){Object(v.alignStream)(W,Z,T);var le=T.fragments[0].start;return this.log("Live playlist sliding: "+le.toFixed(2)+" start-sn: "+(w?w.startSN:"na")+"->"+T.startSN+" prev-sn: "+(W?W.sn:"na")+" fragments: "+X),le}return G},A.waitForCdnTuneIn=function(T){var w=3;return T.live&&T.canBlockReload&&T.tuneInGoal>Math.max(T.partHoldBack,T.partTarget*w)},A.setStartPosition=function(T,w){var _=this.startPosition;if(_<w&&(_=-1),_===-1||this.lastCurrentTime===-1){var j=T.startTimeOffset;Object(Q.isFiniteNumber)(j)?(_=w+j,j<0&&(_+=T.totalduration),_=Math.min(Math.max(w,_),w+T.totalduration),this.log("Start time offset "+j+" found in playlist, adjust startPosition to "+_),this.startPosition=_):T.live?_=this.hls.liveSyncPosition||w:this.startPosition=_=0,this.lastCurrentTime=_}this.nextLoadPosition=_},A.getLoadPosition=function(){var T=this.media,w=0;return this.loadedmetadata&&T?w=T.currentTime:this.nextLoadPosition&&(w=this.nextLoadPosition),w},A.handleFragLoadAborted=function(T,w){this.transmuxer&&T.sn!=="initSegment"&&T.stats.aborted&&(this.warn("Fragment "+T.sn+(w?" part"+w.index:"")+" of level "+T.level+" was aborted"),this.resetFragmentLoading(T))},A.resetFragmentLoading=function(T){(!this.fragCurrent||!this.fragContextChanged(T))&&(this.state=C.IDLE)},A.onFragmentOrKeyLoadError=function(T,w){if(w.fatal)return;var _=w.frag;if(!_||_.type!==T)return;var j=this.fragCurrent;console.assert(j&&_.sn===j.sn&&_.level===j.level&&_.urlId===j.urlId,"Frag load error must match current frag to retry");var W=this.config;if(this.fragLoadError+1<=W.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(_.level))return;var Z=Math.min(Math.pow(2,this.fragLoadError)*W.fragLoadingRetryDelay,W.fragLoadingMaxRetryTimeout);this.warn("Fragment "+_.sn+" of "+T+" "+_.level+" failed to load, retrying in "+Z+"ms"),this.retryDate=self.performance.now()+Z,this.fragLoadError++,this.state=C.FRAG_LOADING_WAITING_RETRY}else w.levelRetry?(T===s.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=C.IDLE):(f.logger.error(w.details+" reaches max retry, redispatch as fatal ..."),w.fatal=!0,this.hls.stopLoad(),this.state=C.ERROR)},A.afterBufferFlushed=function(T,w,_){if(!T)return;var j=D.BufferHelper.getBuffered(T);this.fragmentTracker.detectEvictedFragments(w,j,_),this.state===C.ENDED&&this.resetLoadingState()},A.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=C.IDLE},A.resetLiveStartWhenNotLoaded=function(T){if(!this.loadedmetadata){this.startFragRequested=!1;var w=this.levels?this.levels[T].details:null;if(w!=null&&w.live)return this.startPosition=-1,this.setStartPosition(w,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},A.updateLevelTiming=function(T,w,_,j){var W=this,Z=_.details;console.assert(!!Z,"level.details must be defined");var X=Object.keys(T.elementaryStreams).reduce(function(G,te){var Y=T.elementaryStreams[te];if(Y){var le=Y.endPTS-Y.startPTS;if(le<=0)return W.warn("Could not parse fragment "+T.sn+" "+te+" duration reliably ("+le+") resetting transmuxer to fallback to playlist timing"),W.resetTransmuxer(),G||!1;var Ae=j?0:Object(d.updateFragPTSDTS)(Z,T,Y.startPTS,Y.endPTS,Y.startDTS,Y.endDTS);return W.hls.trigger(b.Events.LEVEL_PTS_UPDATED,{details:Z,level:_,drift:Ae,type:te,frag:T,start:Y.startPTS,end:Y.endPTS}),!0}return G},!1);X?(this.state=C.PARSED,this.hls.trigger(b.Events.FRAG_PARSED,{frag:T,part:w})):this.resetLoadingState()},A.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},p(a,[{key:"state",get:function(){return this._state},set:function(T){var w=this._state;w!==T&&(this._state=T,this.log(w+"->"+T))}}]),a}(R.default)},"./src/controller/buffer-controller.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return h});var Q=O("./src/polyfills/number.ts"),R=O("./src/events.ts"),B=O("./src/utils/logger.ts"),D=O("./src/errors.ts"),f=O("./src/utils/buffer-helper.ts"),b=O("./src/utils/mediasource-helper.ts"),g=O("./src/loader/fragment.ts"),i=O("./src/controller/buffer-operation-queue.ts"),l=Object(b.getMediaSource)(),v=/([ha]vc.)(?:\.[^.,]+)+/,h=function(){function d(o){var n=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var s=n.hls,u=n.media,p=n.mediaSource;B.logger.log("[buffer-controller]: Media source opened"),u&&(n.updateMediaElementDuration(),s.trigger(R.Events.MEDIA_ATTACHED,{media:u})),p&&p.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){B.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){B.logger.log("[buffer-controller]: Media source ended")},this.hls=o,this._initSourceBuffer(),this.registerListeners()}var E=d.prototype;return E.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},E.destroy=function(){this.unregisterListeners(),this.details=null},E.registerListeners=function(){var n=this.hls;n.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(R.Events.BUFFER_RESET,this.onBufferReset,this),n.on(R.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(R.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(R.Events.BUFFER_EOS,this.onBufferEos,this),n.on(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(R.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(R.Events.FRAG_PARSED,this.onFragParsed,this),n.on(R.Events.FRAG_CHANGED,this.onFragChanged,this)},E.unregisterListeners=function(){var n=this.hls;n.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(R.Events.BUFFER_RESET,this.onBufferReset,this),n.off(R.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(R.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(R.Events.BUFFER_EOS,this.onBufferEos,this),n.off(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(R.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(R.Events.FRAG_PARSED,this.onFragParsed,this),n.off(R.Events.FRAG_CHANGED,this.onFragChanged,this)},E._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new i.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},E.onManifestParsed=function(n,s){var u=2;(s.audio&&!s.video||!s.altAudio)&&(u=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=u,this.details=null,B.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},E.onMediaAttaching=function(n,s){var u=this.media=s.media;if(u&&l){var p=this.mediaSource=new l;p.addEventListener("sourceopen",this._onMediaSourceOpen),p.addEventListener("sourceended",this._onMediaSourceEnded),p.addEventListener("sourceclose",this._onMediaSourceClose),u.src=self.URL.createObjectURL(p),this._objectUrl=u.src}},E.onMediaDetaching=function(){var n=this.media,s=this.mediaSource,u=this._objectUrl;if(s){if(B.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(p){B.logger.warn("[buffer-controller]: onMediaDetaching: "+p.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(u&&self.URL.revokeObjectURL(u),n.src===u?(n.removeAttribute("src"),n.load()):B.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(R.Events.MEDIA_DETACHED,void 0)},E.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(s){var u=n.sourceBuffer[s];try{u&&(n.removeBufferListeners(s),n.mediaSource&&n.mediaSource.removeSourceBuffer(u),n.sourceBuffer[s]=void 0)}catch(p){B.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",p)}}),this._initSourceBuffer()},E.onBufferCodecs=function(n,s){var u=this,p=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(S){if(p){var x=u.tracks[S];if(x&&typeof x.buffer.changeType=="function"){var M=s[S],C=M.codec,c=M.levelCodec,r=M.container,a=(x.levelCodec||x.codec).replace(v,"$1"),A=(c||C).replace(v,"$1");if(a!==A){var L=r+";codecs="+(c||C);u.appendChangeType(S,L)}}}else u.pendingTracks[S]=s[S]}),p)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},E.appendChangeType=function(n,s){var u=this,p=this.operationQueue,S={execute:function(){var M=u.sourceBuffer[n];M&&(B.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+s),M.changeType(s)),p.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(M){B.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",M)}};p.append(S,n)},E.onBufferAppending=function(n,s){var u=this,p=this.hls,S=this.operationQueue,x=this.tracks,M=s.data,C=s.type,c=s.frag,r=s.part,a=s.chunkMeta,A=a.buffering[C],L=self.performance.now();A.start=L;var T=c.stats.buffering,w=r?r.stats.buffering:null;T.start===0&&(T.start=L),w&&w.start===0&&(w.start=L);var _=x.audio,j=C==="audio"&&a.id===1&&(_==null?void 0:_.container)==="audio/mpeg",W={execute:function(){if(A.executeStart=self.performance.now(),j){var X=u.sourceBuffer[C];if(X){var G=c.start-X.timestampOffset;Math.abs(G)>=.1&&(B.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+c.start+" (delta: "+G+") sn: "+c.sn+")"),X.timestampOffset=c.start)}}u.appendExecutor(M,C)},onStart:function(){},onComplete:function(){var X=self.performance.now();A.executeEnd=A.end=X,T.first===0&&(T.first=X),w&&w.first===0&&(w.first=X);var G=u.sourceBuffer,te={};for(var Y in G)te[Y]=f.BufferHelper.getBuffered(G[Y]);u.appendError=0,u.hls.trigger(R.Events.BUFFER_APPENDED,{type:C,frag:c,part:r,chunkMeta:a,parent:c.type,timeRanges:te})},onError:function(X){B.logger.error("[buffer-controller]: Error encountered while trying to append to the "+C+" SourceBuffer",X);var G={type:D.ErrorTypes.MEDIA_ERROR,parent:c.type,details:D.ErrorDetails.BUFFER_APPEND_ERROR,err:X,fatal:!1};X.code===DOMException.QUOTA_EXCEEDED_ERR?G.details=D.ErrorDetails.BUFFER_FULL_ERROR:(u.appendError++,G.details=D.ErrorDetails.BUFFER_APPEND_ERROR,u.appendError>p.config.appendErrorMaxRetry&&(B.logger.error("[buffer-controller]: Failed "+p.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),G.fatal=!0)),p.trigger(R.Events.ERROR,G)}};S.append(W,C)},E.onBufferFlushing=function(n,s){var u=this,p=this.operationQueue,S=function(M){return{execute:u.removeExecutor.bind(u,M,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){u.hls.trigger(R.Events.BUFFER_FLUSHED,{type:M})},onError:function(c){B.logger.warn("[buffer-controller]: Failed to remove from "+M+" SourceBuffer",c)}}};s.type?p.append(S(s.type),s.type):this.getSourceBufferTypes().forEach(function(x){p.append(S(x),x)})},E.onFragParsed=function(n,s){var u=this,p=s.frag,S=s.part,x=[],M=S?S.elementaryStreams:p.elementaryStreams;M[g.ElementaryStreamTypes.AUDIOVIDEO]?x.push("audiovideo"):(M[g.ElementaryStreamTypes.AUDIO]&&x.push("audio"),M[g.ElementaryStreamTypes.VIDEO]&&x.push("video"));var C=function(){var r=self.performance.now();p.stats.buffering.end=r,S&&(S.stats.buffering.end=r);var a=S?S.stats:p.stats;u.hls.trigger(R.Events.FRAG_BUFFERED,{frag:p,part:S,stats:a,id:p.type})};x.length===0&&B.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+p.type+" level: "+p.level+" sn: "+p.sn),this.blockBuffers(C,x)},E.onFragChanged=function(n,s){this.flushBackBuffer()},E.onBufferEos=function(n,s){var u=this,p=this.getSourceBufferTypes().reduce(function(S,x){var M=u.sourceBuffer[x];return(!s.type||s.type===x)&&(M&&!M.ended&&(M.ended=!0,B.logger.log("[buffer-controller]: "+x+" sourceBuffer now EOS"))),S&&!!(!M||M.ended)},!0);p&&this.blockBuffers(function(){var S=u.mediaSource;if(!S||S.readyState!=="open")return;S.endOfStream()})},E.onLevelUpdated=function(n,s){var u=s.details;if(!u.fragments.length)return;this.details=u,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},E.flushBackBuffer=function(){var n=this.hls,s=this.details,u=this.media,p=this.sourceBuffer;if(!u||s===null)return;var S=this.getSourceBufferTypes();if(!S.length)return;var x=s.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(Q.isFiniteNumber)(x)||x<0)return;var M=u.currentTime,C=s.levelTargetDuration,c=Math.max(x,C),r=Math.floor(M/C)*C-c;S.forEach(function(a){var A=p[a];if(A){var L=f.BufferHelper.getBuffered(A);L.length>0&&r>L.start(0)&&(n.trigger(R.Events.BACK_BUFFER_REACHED,{bufferEnd:r}),s.live&&n.trigger(R.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r}),n.trigger(R.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:a}))}})},E.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,s=this.hls,u=this.media,p=this.mediaSource,S=n.fragments[0].start+n.totalduration,x=u.duration,M=Object(Q.isFiniteNumber)(p.duration)?p.duration:0;n.live&&s.config.liveDurationInfinity?(B.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),p.duration=Infinity,this.updateSeekableRange(n)):(S>M&&S>x||!Object(Q.isFiniteNumber)(x))&&(B.logger.log("[buffer-controller]: Updating Media Source duration to "+S.toFixed(3)),p.duration=S)},E.updateSeekableRange=function(n){var s=this.mediaSource,u=n.fragments,p=u.length;if(p&&n.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var S=Math.max(0,u[0].start),x=Math.max(S,S+n.totalduration);s.setLiveSeekableRange(S,x)}},E.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,s=this.operationQueue,u=this.pendingTracks,p=Object.keys(u).length;if(p&&!n||p===2){this.createSourceBuffers(u),this.pendingTracks={};var S=this.getSourceBufferTypes();if(S.length===0){this.hls.trigger(R.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}S.forEach(function(x){s.executeNext(x)})}},E.createSourceBuffers=function(n){var s=this.sourceBuffer,u=this.mediaSource;if(!u)throw Error("createSourceBuffers called when mediaSource was null");var p=0;for(var S in n)if(!s[S]){var x=n[S];if(!x)throw Error("source buffer exists for track "+S+", however track does not");var M=x.levelCodec||x.codec,C=x.container+";codecs="+M;B.logger.log("[buffer-controller]: creating sourceBuffer("+C+")");try{var c=s[S]=u.addSourceBuffer(C),r=S;this.addBufferListener(r,"updatestart",this._onSBUpdateStart),this.addBufferListener(r,"updateend",this._onSBUpdateEnd),this.addBufferListener(r,"error",this._onSBUpdateError),this.tracks[S]={buffer:c,codec:M,container:x.container,levelCodec:x.levelCodec,id:x.id},p++}catch(a){B.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+a.message),this.hls.trigger(R.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:a,mimeType:C})}}p&&this.hls.trigger(R.Events.BUFFER_CREATED,{tracks:this.tracks})},E._onSBUpdateStart=function(n){var s=this.operationQueue,u=s.current(n);u.onStart()},E._onSBUpdateEnd=function(n){var s=this.operationQueue,u=s.current(n);u.onComplete(),s.shiftAndExecuteNext(n)},E._onSBUpdateError=function(n,s){B.logger.error("[buffer-controller]: "+n+" SourceBuffer error",s),this.hls.trigger(R.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var u=this.operationQueue.current(n);u&&u.onError(s)},E.removeExecutor=function(n,s,u){var p=this.media,S=this.mediaSource,x=this.operationQueue,M=this.sourceBuffer,C=M[n];if(!p||!S||!C){B.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),x.shiftAndExecuteNext(n);return}var c=Object(Q.isFiniteNumber)(p.duration)?p.duration:Infinity,r=Object(Q.isFiniteNumber)(S.duration)?S.duration:Infinity,a=Math.max(0,s),A=Math.min(u,c,r);A>a?(B.logger.log("[buffer-controller]: Removing ["+a+","+A+"] from the "+n+" SourceBuffer"),console.assert(!C.updating,n+" sourceBuffer must not be updating"),C.remove(a,A)):x.shiftAndExecuteNext(n)},E.appendExecutor=function(n,s){var u=this.operationQueue,p=this.sourceBuffer,S=p[s];if(!S){B.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),u.shiftAndExecuteNext(s);return}S.ended=!1,console.assert(!S.updating,s+" sourceBuffer must not be updating"),S.appendBuffer(n)},E.blockBuffers=function(n,s){var u=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){B.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var p=this.operationQueue,S=s.map(function(x){return p.appendBlocker(x)});Promise.all(S).then(function(){n(),s.forEach(function(x){var M=u.sourceBuffer[x];(!M||!M.updating)&&p.shiftAndExecuteNext(x)})})},E.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},E.addBufferListener=function(n,s,u){var p=this.sourceBuffer[n];if(!p)return;var S=u.bind(this,n);this.listeners[n].push({event:s,listener:S}),p.addEventListener(s,S)},E.removeBufferListeners=function(n){var s=this.sourceBuffer[n];if(!s)return;this.listeners[n].forEach(function(u){s.removeEventListener(u.event,u.listener)})},d}()},"./src/controller/buffer-operation-queue.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return R});var Q=O("./src/utils/logger.ts"),R=function(){function B(f){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=f}var D=B.prototype;return D.append=function(b,g){var i=this.queues[g];i.push(b),i.length===1&&this.buffers[g]&&this.executeNext(g)},D.insertAbort=function(b,g){var i=this.queues[g];i.unshift(b),this.executeNext(g)},D.appendBlocker=function(b){var g,i=new Promise(function(v){g=v}),l={execute:g,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(l,b),i},D.executeNext=function(b){var g=this.buffers,i=this.queues,l=g[b],v=i[b];if(v.length){var h=v[0];try{h.execute()}catch(d){Q.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),h.onError(d),(!l||!l.updating)&&(v.shift(),this.executeNext(b))}}},D.shiftAndExecuteNext=function(b){this.queues[b].shift(),this.executeNext(b)},D.current=function(b){return this.queues[b][0]},B}()},"./src/controller/cap-level-controller.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/events.ts");function R(f,b){for(var g=0;g<b.length;g++){var i=b[g];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(f,i.key,i)}}function B(f,b,g){return b&&R(f.prototype,b),g&&R(f,g),f}var D=function(){function f(g){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=g,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var b=f.prototype;return b.setStreamController=function(i){this.streamController=i},b.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},b.registerListeners=function(){var i=this.hls;i.on(Q.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.on(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(Q.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},b.unregisterListener=function(){var i=this.hls;i.off(Q.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),i.off(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(Q.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},b.onFpsDropLevelCapping=function(i,l){f.isLevelAllowed(l.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(l.droppedLevel)},b.onMediaAttaching=function(i,l){this.media=l.media instanceof HTMLVideoElement?l.media:null},b.onManifestParsed=function(i,l){var v=this.hls;this.restrictedLevels=[],this.firstLevel=l.firstLevel,v.config.capLevelToPlayerSize&&l.video&&this.startCapping()},b.onBufferCodecs=function(i,l){var v=this.hls;v.config.capLevelToPlayerSize&&l.video&&this.startCapping()},b.onMediaDetaching=function(){this.stopCapping()},b.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var i=this.hls.levels;if(i.length){var l=this.hls;l.autoLevelCapping=this.getMaxLevel(i.length-1),l.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=l.autoLevelCapping}}},b.getMaxLevel=function(i){var l=this,v=this.hls.levels;if(!v.length)return-1;var h=v.filter(function(d,E){return f.isLevelAllowed(E,l.restrictedLevels)&&E<=i});return this.clientRect=null,f.getMaxLevelByMediaSize(h,this.mediaWidth,this.mediaHeight)},b.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()},b.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},b.getDimensions=function(){if(this.clientRect)return this.clientRect;var i=this.media,l={width:0,height:0};if(i){var v=i.getBoundingClientRect();l.width=v.width,l.height=v.height,!l.width&&!l.height&&(l.width=v.right-v.left||i.width||0,l.height=v.bottom-v.top||i.height||0)}return this.clientRect=l,l},f.isLevelAllowed=function(i,l){return l===void 0&&(l=[]),l.indexOf(i)===-1},f.getMaxLevelByMediaSize=function(i,l,v){if(!i||!i.length)return-1;for(var h=function(s,u){return u?s.width!==u.width||s.height!==u.height:!0},d=i.length-1,E=0;E<i.length;E+=1){var o=i[E];if((o.width>=l||o.height>=v)&&h(o,i[E+1])){d=E;break}}return d},B(f,[{key:"mediaWidth",get:function(){return this.getDimensions().width*f.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*f.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var i=1;try{i=self.devicePixelRatio}catch(l){}return i}}]),f}();N.default=D},"./src/controller/cmcd-controller.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return h});var Q=O("./src/events.ts"),R=O("./src/types/cmcd.ts"),B=O("./src/utils/buffer-helper.ts"),D=O("./src/utils/logger.ts");function f(d,E){for(var o=0;o<E.length;o++){var n=E[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(d,n.key,n)}}function b(d,E,o){return E&&f(d.prototype,E),o&&f(d,o),d}function g(d,E){var o=typeof Symbol!="undefined"&&d[Symbol.iterator]||d["@@iterator"];if(o)return(o=o.call(d)).next.bind(o);if(Array.isArray(d)||(o=i(d))||E&&d&&typeof d.length=="number"){o&&(d=o);var n=0;return function(){return n>=d.length?{done:!0}:{done:!1,value:d[n++]}}}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 i(d,E){if(!d)return;if(typeof d=="string")return l(d,E);var o=Object.prototype.toString.call(d).slice(8,-1);if(o==="Object"&&d.constructor&&(o=d.constructor.name),o==="Map"||o==="Set")return Array.from(d);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return l(d,E)}function l(d,E){(E==null||E>d.length)&&(E=d.length);for(var o=0,n=new Array(E);o<E;o++)n[o]=d[o];return n}function v(){return v=Object.assign||function(d){for(var E=1;E<arguments.length;E++){var o=arguments[E];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(d[n]=o[n])}return d},v.apply(this,arguments)}var h=function(){function d(o){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(p){try{n.apply(p,{ot:R.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(S){D.logger.warn("Could not generate manifest CMCD data.",S)}},this.applyFragmentData=function(p){try{var S=p.frag,x=n.hls.levels[S.level],M=n.getObjectType(S),C={d:S.duration*1e3,ot:M};(M===R.CMCDObjectType.VIDEO||M===R.CMCDObjectType.AUDIO||M==R.CMCDObjectType.MUXED)&&(C.br=x.bitrate/1e3,C.tb=n.getTopBandwidth(M),C.bl=n.getBufferLength(M)),n.apply(p,C)}catch(c){D.logger.warn("Could not generate segment CMCD data.",c)}},this.hls=o;var s=this.config=o.config,u=s.cmcd;u!=null&&(s.pLoader=this.createPlaylistLoader(),s.fLoader=this.createFragmentLoader(),this.sid=u.sessionId||d.uuid(),this.cid=u.contentId,this.useHeaders=u.useHeaders===!0,this.registerListeners())}var E=d.prototype;return E.registerListeners=function(){var n=this.hls;n.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(Q.Events.BUFFER_CREATED,this.onBufferCreated,this)},E.unregisterListeners=function(){var n=this.hls;n.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(Q.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(Q.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},E.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},E.onMediaAttached=function(n,s){this.media=s.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},E.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},E.onBufferCreated=function(n,s){var u,p;this.audioBuffer=(u=s.tracks.audio)===null||u===void 0?void 0:u.buffer,this.videoBuffer=(p=s.tracks.video)===null||p===void 0?void 0:p.buffer},E.createData=function(){var n;return{v:R.CMCDVersion,sf:R.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(n=this.media)===null||n===void 0?void 0:n.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},E.apply=function(n,s){s===void 0&&(s={}),v(s,this.createData());var u=s.ot===R.CMCDObjectType.INIT||s.ot===R.CMCDObjectType.VIDEO||s.ot===R.CMCDObjectType.MUXED;if(this.starved&&u&&(s.bs=!0,s.su=!0,this.starved=!1),s.su==null&&(s.su=this.buffering),this.useHeaders){var p=d.toHeaders(s);if(!Object.keys(p).length)return;n.headers||(n.headers={}),v(n.headers,p)}else{var S=d.toQuery(s);if(!S)return;n.url=d.appendQueryToUri(n.url,S)}},E.getObjectType=function(n){var s=n.type;return s==="subtitle"?R.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?R.CMCDObjectType.INIT:s==="audio"?R.CMCDObjectType.AUDIO:s==="main"?this.hls.audioTracks.length?R.CMCDObjectType.VIDEO:R.CMCDObjectType.MUXED:void 0},E.getTopBandwidth=function(n){for(var s=0,u=n===R.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,p=g(u),S;!(S=p()).done;){var x=S.value;x.bitrate>s&&(s=x.bitrate)}return s>0?s:NaN},E.getBufferLength=function(n){var s=this.hls.media,u=n===R.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!u||!s)return NaN;var p=B.BufferHelper.bufferInfo(u,s.currentTime,this.config.maxBufferHole);return p.len*1e3},E.createPlaylistLoader=function(){var n=this.config.pLoader,s=this.applyPlaylistData,u=n||this.config.loader;return function(){function p(x){this.loader=void 0,this.loader=new u(x)}var S=p.prototype;return S.destroy=function(){this.loader.destroy()},S.abort=function(){this.loader.abort()},S.load=function(M,C,c){s(M),this.loader.load(M,C,c)},b(p,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),p}()},E.createFragmentLoader=function(){var n=this.config.fLoader,s=this.applyFragmentData,u=n||this.config.loader;return function(){function p(x){this.loader=void 0,this.loader=new u(x)}var S=p.prototype;return S.destroy=function(){this.loader.destroy()},S.abort=function(){this.loader.abort()},S.load=function(M,C,c){s(M),this.loader.load(M,C,c)},b(p,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),p}()},d.uuid=function(){var n=URL.createObjectURL(new Blob),s=n.toString();return URL.revokeObjectURL(n),s.substr(s.lastIndexOf("/")+1)},d.serialize=function(n){for(var s=[],u=function(j){return!Number.isNaN(j)&&j!=null&&j!==""&&j!==!1},p=function(j){return Math.round(j)},S=function(j){return p(j/100)*100},x=function(j){return encodeURIComponent(j)},M={br:p,d:p,bl:S,dl:S,mtp:S,nor:x,rtp:S,tb:p},C=Object.keys(n||{}).sort(),c=g(C),r;!(r=c()).done;){var a=r.value,A=n[a];if(!u(A))continue;if(a==="v"&&A===1)continue;if(a=="pr"&&A===1)continue;var L=M[a];L&&(A=L(A));var T=typeof A,w=void 0;a==="ot"||a==="sf"||a==="st"?w=a+"="+A:T==="boolean"?w=a:T==="number"?w=a+"="+A:w=a+"="+JSON.stringify(A),s.push(w)}return s.join(",")},d.toHeaders=function(n){for(var s=Object.keys(n),u={},p=["Object","Request","Session","Status"],S=[{},{},{},{}],x={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},M=0,C=s;M<C.length;M++){var c=C[M],r=x[c]!=null?x[c]:1;S[r][c]=n[c]}for(var a=0;a<S.length;a++){var A=d.serialize(S[a]);A&&(u["CMCD-"+p[a]]=A)}return u},d.toQuery=function(n){return"CMCD="+encodeURIComponent(d.serialize(n))},d.appendQueryToUri=function(n,s){if(!s)return n;var u=n.includes("?")?"&":"?";return""+n+u+s},d}()},"./src/controller/eme-controller.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/events.ts"),R=O("./src/errors.ts"),B=O("./src/utils/logger.ts"),D=O("./src/utils/mediakeys-helper.ts");function f(h,d){for(var E=0;E<d.length;E++){var o=d[E];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(h,o.key,o)}}function b(h,d,E){return d&&f(h.prototype,d),E&&f(h,E),h}var g=3,i=function(d,E,o){var n={audioCapabilities:[],videoCapabilities:[]};return d.forEach(function(s){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+s+'"',robustness:o.audioRobustness||""})}),E.forEach(function(s){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+s+'"',robustness:o.videoRobustness||""})}),[n]},l=function(d,E,o,n){switch(d){case D.KeySystems.WIDEVINE:return i(E,o,n);default:throw new Error("Unknown key-system: "+d)}},v=function(){function h(E){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=E,this._config=E.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var d=h.prototype;return d.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},d._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)},d._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)},d.getLicenseServerUrl=function(o){switch(o){case D.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+o+'"')},d._attemptKeySystemAccess=function(o,n,s){var u=this,p=l(o,n,s,this._drmSystemOptions);B.logger.log("Requesting encrypted media key-system access");var S=this.requestMediaKeySystemAccess(o,p);this.mediaKeysPromise=S.then(function(x){return u._onMediaKeySystemAccessObtained(o,x)}),S.catch(function(x){B.logger.error('Failed to obtain key-system "'+o+'" access:',x)})},d._onMediaKeySystemAccessObtained=function(o,n){var s=this;B.logger.log('Access for key-system "'+o+'" obtained');var u={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:o};this._mediaKeysList.push(u);var p=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(S){return u.mediaKeys=S,B.logger.log('Media-keys created for key-system "'+o+'"'),s._onMediaKeysCreated(),S});return p.catch(function(S){B.logger.error("Failed to create media-keys:",S)}),p},d._onMediaKeysCreated=function(){var o=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),o._onNewMediaKeySession(n.mediaKeysSession))})},d._onNewMediaKeySession=function(o){var n=this;B.logger.log("New key-system session "+o.sessionId),o.addEventListener("message",function(s){n._onKeySessionMessage(o,s.message)},!1)},d._onKeySessionMessage=function(o,n){B.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(s){B.logger.log("Received license data (length: "+(s&&s.byteLength)+"), updating key-session"),o.update(s)})},d.onMediaEncrypted=function(o){var n=this;if(B.logger.log('Media is encrypted using "'+o.initDataType+'" init data type'),!this.mediaKeysPromise){B.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var s=function(p){if(!n._media)return;n._attemptSetMediaKeys(p),n._generateRequestWithPreferredKeySession(o.initDataType,o.initData)};this.mediaKeysPromise.then(s).catch(s)},d._attemptSetMediaKeys=function(o){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var n=this._mediaKeysList[0];if(!n||!n.mediaKeys){B.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}B.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},d._generateRequestWithPreferredKeySession=function(o,n){var s=this,u=this._mediaKeysList[0];if(!u){B.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(u.mediaKeysSessionInitialized){B.logger.warn("Key-Session already initialized but requested again");return}var p=u.mediaKeysSession;if(!p){B.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){B.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}B.logger.log('Generating key-session request for "'+o+'" init data type'),u.mediaKeysSessionInitialized=!0,p.generateRequest(o,n).then(function(){B.logger.debug("Key-session generation succeeded")}).catch(function(S){B.logger.error("Error generating key-session request:",S),s.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},d._createLicenseXhr=function(o,n,s){var u=new XMLHttpRequest;u.responseType="arraybuffer",u.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,u,o,n,s);var p=this._licenseXhrSetup;if(p)try{p.call(this.hls,u,o),p=void 0}catch(S){B.logger.error(S)}try{u.readyState||u.open("POST",o,!0),p&&p.call(this.hls,u,o)}catch(S){throw new Error("issue setting up KeySystem license XHR "+S)}return u},d._onLicenseRequestReadyStageChange=function(o,n,s,u){switch(o.readyState){case 4:if(o.status===200){this._requestLicenseFailureCount=0,B.logger.log("License request succeeded");var p=o.response,S=this._licenseResponseCallback;if(S)try{p=S.call(this.hls,o,n)}catch(M){B.logger.error(M)}u(p)}else{if(B.logger.error("License Request XHR failed ("+n+"). Status: "+o.status+" ("+o.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>g){this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var x=g-this._requestLicenseFailureCount+1;B.logger.warn("Retrying license request, "+x+" attempts left"),this._requestLicense(s,u)}break}},d._generateLicenseRequestChallenge=function(o,n){switch(o.mediaKeySystemDomain){case D.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},d._requestLicense=function(o,n){B.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){B.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var u=this.getLicenseServerUrl(s.mediaKeySystemDomain),p=this._createLicenseXhr(u,o,n);B.logger.log("Sending license request to URL: "+u);var S=this._generateLicenseRequestChallenge(s,o);p.send(S)}catch(x){B.logger.error("Failure requesting DRM license: "+x),this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.KEY_SYSTEM_ERROR,details:R.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},d.onMediaAttached=function(o,n){if(!this._emeEnabled)return;var s=n.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},d.onMediaDetached=function(){var o=this._media,n=this._mediaKeysList;if(!o)return;o.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return o.setMediaKeys(null)}).catch(function(){})},d.onManifestParsed=function(o,n){if(!this._emeEnabled)return;var s=n.levels.map(function(p){return p.audioCodec}).filter(function(p){return!!p}),u=n.levels.map(function(p){return p.videoCodec}).filter(function(p){return!!p});this._attemptKeySystemAccess(D.KeySystems.WIDEVINE,s,u)},b(h,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),h}();N.default=v},"./src/controller/fps-controller.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/events.ts"),R=O("./src/utils/logger.ts"),B=function(){function D(b){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=b,this.registerListeners()}var f=D.prototype;return f.setStreamController=function(g){this.streamController=g},f.registerListeners=function(){this.hls.on(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},f.unregisterListeners=function(){this.hls.off(Q.Events.MEDIA_ATTACHING,this.onMediaAttaching)},f.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},f.onMediaAttaching=function(g,i){var l=this.hls.config;if(l.capLevelOnFPSDrop){var v=i.media instanceof self.HTMLVideoElement?i.media:null;this.media=v,v&&typeof v.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),l.fpsDroppedMonitoringPeriod)}},f.checkFPS=function(g,i,l){var v=performance.now();if(i){if(this.lastTime){var h=v-this.lastTime,d=l-this.lastDroppedFrames,E=i-this.lastDecodedFrames,o=1e3*d/h,n=this.hls;if(n.trigger(Q.Events.FPS_DROP,{currentDropped:d,currentDecoded:E,totalDroppedFrames:l}),o>0&&d>n.config.fpsDroppedMonitoringThreshold*E){var s=n.currentLevel;R.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=s)&&(s=s-1,n.trigger(Q.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:n.currentLevel}),n.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=v,this.lastDroppedFrames=l,this.lastDecodedFrames=i}},f.checkFPSInterval=function(){var g=this.media;if(g)if(this.isVideoPlaybackQualityAvailable){var i=g.getVideoPlaybackQuality();this.checkFPS(g,i.totalVideoFrames,i.droppedVideoFrames)}else this.checkFPS(g,g.webkitDecodedFrameCount,g.webkitDroppedFrameCount)},D}();N.default=B},"./src/controller/fragment-finders.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"findFragmentByPDT",function(){return B}),O.d(N,"findFragmentByPTS",function(){return D}),O.d(N,"fragmentWithinToleranceTest",function(){return f}),O.d(N,"pdtWithinToleranceTest",function(){return b}),O.d(N,"findFragWithCC",function(){return g});var Q=O("./src/polyfills/number.ts"),R=O("./src/utils/binary-search.ts");function B(i,l,v){if(l===null||!Array.isArray(i)||!i.length||!Object(Q.isFiniteNumber)(l))return null;var h=i[0].programDateTime;if(l<(h||0))return null;var d=i[i.length-1].endProgramDateTime;if(l>=(d||0))return null;v=v||0;for(var E=0;E<i.length;++E){var o=i[E];if(b(l,v,o))return o}return null}function D(i,l,v,h){v===void 0&&(v=0),h===void 0&&(h=0);var d=null;if(i?d=l[i.sn-l[0].sn+1]||null:v===0&&l[0].start===0&&(d=l[0]),d&&f(v,h,d)===0)return d;var E=R.default.search(l,f.bind(null,v,h));return E||d}function f(i,l,v){i===void 0&&(i=0),l===void 0&&(l=0);var h=Math.min(l,v.duration+(v.deltaPTS?v.deltaPTS:0));return v.start+v.duration-h<=i?1:v.start-h>i&&v.start?-1:0}function b(i,l,v){var h=Math.min(l,v.duration+(v.deltaPTS?v.deltaPTS:0))*1e3,d=v.endProgramDateTime||0;return d-h>i}function g(i,l){return R.default.search(i,function(v){return v.cc<l?1:v.cc>l?-1:0})}},"./src/controller/fragment-tracker.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"FragmentState",function(){return B}),O.d(N,"FragmentTracker",function(){return D});var Q=O("./src/events.ts"),R=O("./src/types/loader.ts"),B;(function(g){g.NOT_LOADED="NOT_LOADED",g.BACKTRACKED="BACKTRACKED",g.APPENDING="APPENDING",g.PARTIAL="PARTIAL",g.OK="OK"})(B||(B={}));var D=function(){function g(l){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=l,this._registerListeners()}var i=g.prototype;return i._registerListeners=function(){var v=this.hls;v.on(Q.Events.BUFFER_APPENDED,this.onBufferAppended,this),v.on(Q.Events.FRAG_BUFFERED,this.onFragBuffered,this),v.on(Q.Events.FRAG_LOADED,this.onFragLoaded,this)},i._unregisterListeners=function(){var v=this.hls;v.off(Q.Events.BUFFER_APPENDED,this.onBufferAppended,this),v.off(Q.Events.FRAG_BUFFERED,this.onFragBuffered,this),v.off(Q.Events.FRAG_LOADED,this.onFragLoaded,this)},i.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},i.getAppendedFrag=function(v,h){if(h===R.PlaylistLevelType.MAIN){var d=this.activeFragment,E=this.activeParts;if(!d)return null;if(E)for(var o=E.length;o--;){var n=E[o],s=n?n.end:d.appendedPTS;if(n.start<=v&&s!==void 0&&v<=s)return o>9&&(this.activeParts=E.slice(o-9)),n}else if(d.start<=v&&d.appendedPTS!==void 0&&v<=d.appendedPTS)return d}return this.getBufferedFrag(v,h)},i.getBufferedFrag=function(v,h){for(var d=this.fragments,E=Object.keys(d),o=E.length;o--;){var n=d[E[o]];if((n==null?void 0:n.body.type)===h&&n.buffered){var s=n.body;if(s.start<=v&&v<=s.end)return s}}return null},i.detectEvictedFragments=function(v,h,d){var E=this;Object.keys(this.fragments).forEach(function(o){var n=E.fragments[o];if(!n)return;if(!n.buffered){n.body.type===d&&E.removeFragment(n.body);return}var s=n.range[v];if(!s)return;s.time.some(function(u){var p=!E.isTimeBuffered(u.startPTS,u.endPTS,h);return p&&E.removeFragment(n.body),p})})},i.detectPartialFragments=function(v){var h=this,d=this.timeRanges,E=v.frag,o=v.part;if(!d||E.sn==="initSegment")return;var n=b(E),s=this.fragments[n];if(!s)return;Object.keys(d).forEach(function(u){var p=E.elementaryStreams[u];if(!p)return;var S=d[u],x=o!==null||p.partial===!0;s.range[u]=h.getBufferedTimes(E,o,x,S)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},i.fragBuffered=function(v){var h=b(v),d=this.fragments[h];d&&(d.backtrack=d.loaded=null,d.buffered=!0)},i.getBufferedTimes=function(v,h,d,E){for(var o={time:[],partial:d},n=h?h.start:v.start,s=h?h.end:v.end,u=v.minEndPTS||s,p=v.maxStartPTS||n,S=0;S<E.length;S++){var x=E.start(S)-this.bufferPadding,M=E.end(S)+this.bufferPadding;if(p>=x&&u<=M){o.time.push({startPTS:Math.max(n,E.start(S)),endPTS:Math.min(s,E.end(S))});break}else if(n<M&&s>x)o.partial=!0,o.time.push({startPTS:Math.max(n,E.start(S)),endPTS:Math.min(s,E.end(S))});else if(s<=x)break}return o},i.getPartialFragment=function(v){var h=null,d,E,o,n=0,s=this.bufferPadding,u=this.fragments;return Object.keys(u).forEach(function(p){var S=u[p];if(!S)return;f(S)&&(E=S.body.start-s,o=S.body.end+s,v>=E&&v<=o&&(d=Math.min(v-E,o-v),n<=d&&(h=S.body,n=d)))}),h},i.getState=function(v){var h=b(v),d=this.fragments[h];return d?d.buffered?f(d)?B.PARTIAL:B.OK:d.backtrack?B.BACKTRACKED:B.APPENDING:B.NOT_LOADED},i.backtrack=function(v,h){var d=b(v),E=this.fragments[d];if(!E||E.backtrack)return null;var o=E.backtrack=h||E.loaded;return E.loaded=null,o},i.getBacktrackData=function(v){var h=b(v),d=this.fragments[h];if(d){var E,o=d.backtrack;if(o!=null&&(E=o.payload)!==null&&E!==void 0&&E.byteLength)return o;this.removeFragment(v)}return null},i.isTimeBuffered=function(v,h,d){for(var E,o,n=0;n<d.length;n++){if(E=d.start(n)-this.bufferPadding,o=d.end(n)+this.bufferPadding,v>=E&&h<=o)return!0;if(h<=E)return!1}return!1},i.onFragLoaded=function(v,h){var d=h.frag,E=h.part;if(d.sn==="initSegment"||d.bitrateTest||E)return;var o=b(d);this.fragments[o]={body:d,loaded:h,backtrack:null,buffered:!1,range:Object.create(null)}},i.onBufferAppended=function(v,h){var d=this,E=h.frag,o=h.part,n=h.timeRanges;if(E.type===R.PlaylistLevelType.MAIN)if(this.activeFragment=E,o){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(o)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(u){var p=n[u];if(d.detectEvictedFragments(u,p),!o)for(var S=0;S<p.length;S++)E.appendedPTS=Math.max(p.end(S),E.appendedPTS||0)})},i.onFragBuffered=function(v,h){this.detectPartialFragments(h)},i.hasFragment=function(v){var h=b(v);return!!this.fragments[h]},i.removeFragmentsInRange=function(v,h,d){var E=this;Object.keys(this.fragments).forEach(function(o){var n=E.fragments[o];if(!n)return;if(n.buffered){var s=n.body;s.type===d&&s.start<h&&s.end>v&&E.removeFragment(s)}})},i.removeFragment=function(v){var h=b(v);v.stats.loaded=0,v.clearElementaryStreamInfo(),delete this.fragments[h]},i.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},g}();function f(g){var i,l;return g.buffered&&(((i=g.range.video)===null||i===void 0?void 0:i.partial)||((l=g.range.audio)===null||l===void 0?void 0:l.partial))}function b(g){return g.type+"_"+g.level+"_"+g.urlId+"_"+g.sn}},"./src/controller/gap-controller.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"STALL_MINIMUM_DURATION_MS",function(){return f}),O.d(N,"MAX_START_GAP_JUMP",function(){return b}),O.d(N,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return g}),O.d(N,"SKIP_BUFFER_RANGE_START",function(){return i}),O.d(N,"default",function(){return l});var Q=O("./src/utils/buffer-helper.ts"),R=O("./src/errors.ts"),B=O("./src/events.ts"),D=O("./src/utils/logger.ts"),f=250,b=2,g=.1,i=.05,l=function(){function v(d,E,o,n){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=d,this.media=E,this.fragmentTracker=o,this.hls=n}var h=v.prototype;return h.destroy=function(){this.hls=this.fragmentTracker=this.media=null},h.poll=function(E){var o=this.config,n=this.media,s=this.stalled,u=n.currentTime,p=n.seeking,S=this.seeking&&!p,x=!this.seeking&&p;if(this.seeking=p,u!==E){if(this.moved=!0,s!==null){if(this.stallReported){var M=self.performance.now()-s;D.logger.warn("playback not stuck anymore @"+u+", after "+Math.round(M)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((x||S)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!Q.BufferHelper.getBuffered(n).length)return;var C=Q.BufferHelper.bufferInfo(n,u,0),c=C.len>0,r=C.nextStart||0;if(!c&&!r)return;if(p){var a=C.len>b,A=!r||r-u>b&&!this.fragmentTracker.getPartialFragment(u);if(a||A)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var L,T=Math.max(r,C.start||0)-u,w=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,_=w==null||((L=w.details)===null||L===void 0)?void 0:L.live,j=_?w.details.targetduration*2:b;if(T>0&&T<=j){this._trySkipBufferHole(null);return}}var W=self.performance.now();if(s===null){this.stalled=W;return}var Z=W-s;!p&&Z>=f&&this._reportStall(C.len);var X=Q.BufferHelper.bufferInfo(n,u,o.maxBufferHole);this._tryFixBufferStall(X,Z)},h._tryFixBufferStall=function(E,o){var n=this.config,s=this.fragmentTracker,u=this.media,p=u.currentTime,S=s.getPartialFragment(p);if(S){var x=this._trySkipBufferHole(S);if(x)return}E.len>n.maxBufferHole&&o>n.highBufferWatchdogPeriod*1e3&&(D.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},h._reportStall=function(E){var o=this.hls,n=this.media,s=this.stallReported;s||(this.stallReported=!0,D.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+E+")"),o.trigger(B.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:E}))},h._trySkipBufferHole=function(E){for(var o=this.config,n=this.hls,s=this.media,u=s.currentTime,p=0,S=Q.BufferHelper.getBuffered(s),x=0;x<S.length;x++){var M=S.start(x);if(u+o.maxBufferHole>=p&&u<M){var C=Math.max(M+i,s.currentTime+g);return D.logger.warn("skipping hole, adjusting currentTime from "+u+" to "+C),this.moved=!0,this.stalled=null,s.currentTime=C,E&&n.trigger(B.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+u+" to "+C,frag:E}),C}p=S.end(x)}return 0},h._tryNudgeBuffer=function(){var E=this.config,o=this.hls,n=this.media,s=n.currentTime,u=(this.nudgeRetry||0)+1;if(this.nudgeRetry=u,u<E.nudgeMaxRetry){var p=s+u*E.nudgeOffset;D.logger.warn("Nudging 'currentTime' from "+s+" to "+p),n.currentTime=p,o.trigger(B.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else D.logger.error("Playhead still not moving while enough data buffered @"+s+" after "+E.nudgeMaxRetry+" nudges"),o.trigger(B.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},v}()},"./src/controller/id3-track-controller.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/events.ts"),R=O("./src/utils/texttrack-utils.ts"),B=O("./src/demux/id3.ts"),D=.25,f=function(){function b(i){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=i,this._registerListeners()}var g=b.prototype;return g.destroy=function(){this._unregisterListeners()},g._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.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),l.on(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},g._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.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),l.off(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},g.onMediaAttached=function(l,v){this.media=v.media},g.onMediaDetaching=function(){if(!this.id3Track)return;Object(R.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},g.getID3Track=function(l){if(!this.media)return;for(var v=0;v<l.length;v++){var h=l[v];if(h.kind==="metadata"&&h.label==="id3")return Object(R.sendAddTrackEvent)(h,this.media),h}return this.media.addTextTrack("metadata","id3")},g.onFragParsingMetadata=function(l,v){if(!this.media)return;var h=v.frag,d=v.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var E=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,o=0;o<d.length;o++){var n=B.getID3Frames(d[o].data);if(n){var s=d[o].pts,u=o<d.length-1?d[o+1].pts:h.end,p=u-s;p<=0&&(u=s+D);for(var S=0;S<n.length;S++){var x=n[S];if(!B.isTimeStampFrame(x)){var M=new E(s,u,"");M.value=x,this.id3Track.addCue(M)}}}}},g.onBufferFlushing=function(l,v){var h=v.startOffset,d=v.endOffset,E=v.type;if(!E||E==="audio"){var o=this.id3Track;o&&Object(R.removeCuesInRange)(o,h,d)}},b}();N.default=f},"./src/controller/latency-controller.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return b});var Q=O("./src/errors.ts"),R=O("./src/events.ts"),B=O("./src/utils/logger.ts");function D(g,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(g,v.key,v)}}function f(g,i,l){return i&&D(g.prototype,i),l&&D(g,l),g}var b=function(){function g(l){var v=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 v.timeupdate()},this.hls=l,this.config=l.config,this.registerListeners()}var i=g.prototype;return i.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},i.registerListeners=function(){this.hls.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(R.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(R.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){this.hls.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(R.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(R.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(R.Events.ERROR,this.onError)},i.onMediaAttached=function(v,h){this.media=h.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},i.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},i.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},i.onLevelUpdated=function(v,h){var d=h.details;this.levelDetails=d,d.advanced&&this.timeupdate(),!d.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},i.onError=function(v,h){if(h.details!==Q.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,B.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},i.timeupdate=function(){var v=this.media,h=this.levelDetails;if(!v||!h)return;this.currentTime=v.currentTime;var d=this.computeLatency();if(d===null)return;this._latency=d;var E=this.config,o=E.lowLatencyMode,n=E.maxLiveSyncPlaybackRate;if(!o||n===1)return;var s=this.targetLatency;if(s===null)return;var u=d-s,p=Math.min(this.maxLatency,s+h.targetduration),S=u<p;if(h.live&&S&&u>.05&&this.forwardBufferLength>1){var x=Math.min(2,Math.max(1,n)),M=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;v.playbackRate=Math.min(x,Math.max(1,M))}else v.playbackRate!==1&&v.playbackRate!==0&&(v.playbackRate=1)},i.estimateLiveEdge=function(){var v=this.levelDetails;return v===null?null:v.edge+v.age},i.computeLatency=function(){var v=this.estimateLiveEdge();return v===null?null:v-this.currentTime},f(g,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var v=this.config,h=this.levelDetails;return v.liveMaxLatencyDuration!==void 0?v.liveMaxLatencyDuration:h?v.liveMaxLatencyDurationCount*h.targetduration:0}},{key:"targetLatency",get:function(){var v=this.levelDetails;if(v===null)return null;var h=v.holdBack,d=v.partHoldBack,E=v.targetduration,o=this.config,n=o.liveSyncDuration,s=o.liveSyncDurationCount,u=o.lowLatencyMode,p=this.hls.userConfig,S=u&&d||h;(p.liveSyncDuration||p.liveSyncDurationCount||S===0)&&(S=n!==void 0?n:s*E);var x=E,M=1;return S+Math.min(this.stallCount*M,x)}},{key:"liveSyncPosition",get:function(){var v=this.estimateLiveEdge(),h=this.targetLatency,d=this.levelDetails;if(v===null||h===null||d===null)return null;var E=d.edge,o=v-h-this.edgeStalled,n=E-d.totalduration,s=E-(this.config.lowLatencyMode&&d.partTarget||d.targetduration);return Math.min(Math.max(n,o),s)}},{key:"drift",get:function(){var v=this.levelDetails;return v===null?1:v.drift}},{key:"edgeStalled",get:function(){var v=this.levelDetails;if(v===null)return 0;var h=(this.config.lowLatencyMode&&v.partTarget||v.targetduration)*3;return Math.max(v.age-h,0)}},{key:"forwardBufferLength",get:function(){var v=this.media,h=this.levelDetails;if(!v||!h)return 0;var d=v.buffered.length;return d?v.buffered.end(d-1):h.edge-this.currentTime}}]),g}()},"./src/controller/level-controller.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return o});var Q=O("./src/types/level.ts"),R=O("./src/events.ts"),B=O("./src/errors.ts"),D=O("./src/utils/codecs.ts"),f=O("./src/controller/level-helper.ts"),b=O("./src/controller/base-playlist-controller.ts"),g=O("./src/types/loader.ts");function i(){return i=Object.assign||function(n){for(var s=1;s<arguments.length;s++){var u=arguments[s];for(var p in u)Object.prototype.hasOwnProperty.call(u,p)&&(n[p]=u[p])}return n},i.apply(this,arguments)}function l(n,s){for(var u=0;u<s.length;u++){var p=s[u];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(n,p.key,p)}}function v(n,s,u){return s&&l(n.prototype,s),u&&l(n,u),n}function h(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,d(n,s)}function d(n,s){return d=Object.setPrototypeOf||function(p,S){return p.__proto__=S,p},d(n,s)}var E=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),o=function(n){h(s,n);function s(p){var S;return S=n.call(this,p,"[level-controller]")||this,S._levels=[],S._firstLevel=-1,S._startLevel=void 0,S.currentLevelIndex=-1,S.manualLevelIndex=-1,S.onParsedComplete=void 0,S._registerListeners(),S}var u=s.prototype;return u._registerListeners=function(){var S=this.hls;S.on(R.Events.MANIFEST_LOADED,this.onManifestLoaded,this),S.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.on(R.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.on(R.Events.FRAG_LOADED,this.onFragLoaded,this),S.on(R.Events.ERROR,this.onError,this)},u._unregisterListeners=function(){var S=this.hls;S.off(R.Events.MANIFEST_LOADED,this.onManifestLoaded,this),S.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.off(R.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.off(R.Events.FRAG_LOADED,this.onFragLoaded,this),S.off(R.Events.ERROR,this.onError,this)},u.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},u.startLoad=function(){var S=this._levels;S.forEach(function(x){x.loadError=0}),n.prototype.startLoad.call(this)},u.onManifestLoaded=function(S,x){var M=[],C=[],c=[],r,a={},A,L=!1,T=!1,w=!1;if(x.levels.forEach(function(Z){var X=Z.attrs;L=L||!!(Z.width&&Z.height),T=T||!!Z.videoCodec,w=w||!!Z.audioCodec,E&&Z.audioCodec&&Z.audioCodec.indexOf("mp4a.40.34")!==-1&&(Z.audioCodec=void 0);var G=Z.bitrate+"-"+Z.attrs.RESOLUTION+"-"+Z.attrs.CODECS;A=a[G],A?A.url.push(Z.url):(A=new Q.Level(Z),a[G]=A,M.push(A)),X&&(X.AUDIO&&Object(f.addGroupId)(A,"audio",X.AUDIO),X.SUBTITLES&&Object(f.addGroupId)(A,"text",X.SUBTITLES))}),(L||T)&&w&&(M=M.filter(function(Z){var X=Z.videoCodec,G=Z.width,te=Z.height;return!!X||!!(G&&te)})),M=M.filter(function(Z){var X=Z.audioCodec,G=Z.videoCodec;return(!X||Object(D.isCodecSupportedInMp4)(X,"audio"))&&(!G||Object(D.isCodecSupportedInMp4)(G,"video"))}),x.audioTracks&&(C=x.audioTracks.filter(function(Z){return!Z.audioCodec||Object(D.isCodecSupportedInMp4)(Z.audioCodec,"audio")}),Object(f.assignTrackIdsByGroup)(C)),x.subtitles&&(c=x.subtitles,Object(f.assignTrackIdsByGroup)(c)),M.length>0){r=M[0].bitrate,M.sort(function(Z,X){return Z.bitrate-X.bitrate}),this._levels=M;for(var _=0;_<M.length;_++)if(M[_].bitrate===r){this._firstLevel=_,this.log("manifest loaded, "+M.length+" level(s) found, first bitrate: "+r);break}var j=w&&!T,W={levels:M,audioTracks:C,subtitleTracks:c,firstLevel:this._firstLevel,stats:x.stats,audio:w,video:T,altAudio:!j&&C.some(function(Z){return!!Z.url})};this.hls.trigger(R.Events.MANIFEST_PARSED,W),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(R.Events.ERROR,{type:B.ErrorTypes.MEDIA_ERROR,details:B.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:x.url,reason:"no level with compatible codecs found in manifest"})},u.onError=function(S,x){if(n.prototype.onError.call(this,S,x),x.fatal)return;var M=x.context,C=this._levels[this.currentLevelIndex];if(M&&(M.type===g.PlaylistContextType.AUDIO_TRACK&&C.audioGroupIds&&M.groupId===C.audioGroupIds[C.urlId]||M.type===g.PlaylistContextType.SUBTITLE_TRACK&&C.textGroupIds&&M.groupId===C.textGroupIds[C.urlId])){this.redundantFailover(this.currentLevelIndex);return}var c=!1,r=!0,a;switch(x.details){case B.ErrorDetails.FRAG_LOAD_ERROR:case B.ErrorDetails.FRAG_LOAD_TIMEOUT:case B.ErrorDetails.KEY_LOAD_ERROR:case B.ErrorDetails.KEY_LOAD_TIMEOUT:if(x.frag){var A=this._levels[x.frag.level];A?(A.fragmentError++,A.fragmentError>this.hls.config.fragLoadingMaxRetry&&(a=x.frag.level)):a=x.frag.level}break;case B.ErrorDetails.LEVEL_LOAD_ERROR:case B.ErrorDetails.LEVEL_LOAD_TIMEOUT:M&&(M.deliveryDirectives&&(r=!1),a=M.level),c=!0;break;case B.ErrorDetails.REMUX_ALLOC_ERROR:a=x.level,c=!0;break}a!==void 0&&this.recoverLevel(x,a,c,r)},u.recoverLevel=function(S,x,M,C){var c=S.details,r=this._levels[x];if(r.loadError++,M){var a=this.retryLoadingOrFail(S);if(a)S.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(C){var A=r.url.length;if(A>1&&r.loadError<A)S.levelRetry=!0,this.redundantFailover(x);else if(this.manualLevelIndex===-1){var L=x===0?this._levels.length-1:x-1;this.currentLevelIndex!==L&&this._levels[L].loadError===0&&(this.warn(c+": switch to "+L),S.levelRetry=!0,this.hls.nextAutoLevel=L)}}},u.redundantFailover=function(S){var x=this._levels[S],M=x.url.length;if(M>1){var C=(x.urlId+1)%M;this.warn("Switching to redundant URL-id "+C),this._levels.forEach(function(c){c.urlId=C}),this.level=S}},u.onFragLoaded=function(S,x){var M=x.frag;if(M!==void 0&&M.type===g.PlaylistLevelType.MAIN){var C=this._levels[M.level];C!==void 0&&(C.fragmentError=0,C.loadError=0)}},u.onLevelLoaded=function(S,x){var M,C=x.level,c=x.details,r=this._levels[C];if(!r){var a;this.warn("Invalid level index "+C),(a=x.deliveryDirectives)!==null&&a!==void 0&&a.skip&&(c.deltaUpdateFailed=!0);return}C===this.currentLevelIndex?(r.fragmentError===0&&(r.loadError=0,this.retryCount=0),this.playlistLoaded(C,x,r.details)):(M=x.deliveryDirectives)!==null&&M!==void 0&&M.skip&&(c.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(S,x){var M=this.hls.levels[this.currentLevelIndex];if(!M)return;if(M.audioGroupIds){for(var C=-1,c=this.hls.audioTracks[x.id].groupId,r=0;r<M.audioGroupIds.length;r++)if(M.audioGroupIds[r]===c){C=r;break}C!==M.urlId&&(M.urlId=C,this.startLoad())}},u.loadPlaylist=function(S){var x=this.currentLevelIndex,M=this._levels[x];if(this.canLoad&&M&&M.url.length>0){var C=M.urlId,c=M.url[C];if(S)try{c=S.addDirectives(c)}catch(r){this.warn("Could not construct new URL with HLS Delivery Directives: "+r)}this.log("Attempt loading level index "+x+(S?" at sn "+S.msn+" part "+S.part:"")+" with URL-id "+C+" "+c),this.clearTimer(),this.hls.trigger(R.Events.LEVEL_LOADING,{url:c,level:x,id:C,deliveryDirectives:S||null})}},u.removeLevel=function(S,x){var M=function(r,a){return a!==x},C=this._levels.filter(function(c,r){return r!==S?!0:c.url.length>1&&x!==void 0?(c.url=c.url.filter(M),c.audioGroupIds&&(c.audioGroupIds=c.audioGroupIds.filter(M)),c.textGroupIds&&(c.textGroupIds=c.textGroupIds.filter(M)),c.urlId=0,!0):!1}).map(function(c,r){var a=c.details;return a!=null&&a.fragments&&a.fragments.forEach(function(A){A.level=r}),c});this._levels=C,this.hls.trigger(R.Events.LEVELS_UPDATED,{levels:C})},v(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(S){var x,M=this._levels;if(M.length===0)return;if(this.currentLevelIndex===S&&(x=M[S])!==null&&x!==void 0&&x.details)return;if(S<0||S>=M.length){var C=S<0;if(this.hls.trigger(R.Events.ERROR,{type:B.ErrorTypes.OTHER_ERROR,details:B.ErrorDetails.LEVEL_SWITCH_ERROR,level:S,fatal:C,reason:"invalid level idx"}),C)return;S=Math.min(S,M.length-1)}this.clearTimer();var c=this.currentLevelIndex,r=M[c],a=M[S];this.log("switching to level "+S+" from "+c),this.currentLevelIndex=S;var A=i({},a,{level:S,maxBitrate:a.maxBitrate,uri:a.uri,urlId:a.urlId});delete A._urlId,this.hls.trigger(R.Events.LEVEL_SWITCHING,A);var L=a.details;if(!L||L.live){var T=this.switchParams(a.uri,r==null?void 0:r.details);this.loadPlaylist(T)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(S){this.manualLevelIndex=S,this._startLevel===void 0&&(this._startLevel=S),S!==-1&&(this.level=S)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(S){this._firstLevel=S}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var S=this.hls.config.startLevel;return S!==void 0?S:this._firstLevel}else return this._startLevel},set:function(S){this._startLevel=S}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(S){this.level=S,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=S)}}]),s}(b.default)},"./src/controller/level-helper.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"addGroupId",function(){return B}),O.d(N,"assignTrackIdsByGroup",function(){return D}),O.d(N,"updatePTS",function(){return f}),O.d(N,"updateFragPTSDTS",function(){return g}),O.d(N,"mergeDetails",function(){return i}),O.d(N,"mapPartIntersection",function(){return l}),O.d(N,"mapFragmentIntersection",function(){return v}),O.d(N,"adjustSliding",function(){return h}),O.d(N,"addSliding",function(){return d}),O.d(N,"computeReloadInterval",function(){return E}),O.d(N,"getFragmentWithSN",function(){return o}),O.d(N,"getPartWith",function(){return n});var Q=O("./src/polyfills/number.ts"),R=O("./src/utils/logger.ts");function B(s,u,p){switch(u){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(p);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(p);break}}function D(s){var u={};s.forEach(function(p){var S=p.groupId||"";p.id=u[S]=u[S]||0,u[S]++})}function f(s,u,p){var S=s[u],x=s[p];b(S,x)}function b(s,u){var p=u.startPTS;if(Object(Q.isFiniteNumber)(p)){var S=0,x;u.sn>s.sn?(S=p-s.start,x=s):(S=s.start-p,x=u),x.duration!==S&&(x.duration=S)}else if(u.sn>s.sn){var M=s.cc===u.cc;M&&s.minEndPTS?u.start=s.start+(s.minEndPTS-s.start):u.start=s.start+s.duration}else u.start=Math.max(s.start-u.duration,0)}function g(s,u,p,S,x,M){var C=S-p;C<=0&&(R.logger.warn("Fragment should have a positive duration",u),S=p+u.duration,M=x+u.duration);var c=p,r=S,a=u.startPTS,A=u.endPTS;if(Object(Q.isFiniteNumber)(a)){var L=Math.abs(a-p);Object(Q.isFiniteNumber)(u.deltaPTS)?u.deltaPTS=Math.max(L,u.deltaPTS):u.deltaPTS=L,c=Math.max(p,a),p=Math.min(p,a),x=Math.min(x,u.startDTS),r=Math.min(S,A),S=Math.max(S,A),M=Math.max(M,u.endDTS)}u.duration=S-p;var T=p-u.start;u.appendedPTS=S,u.start=u.startPTS=p,u.maxStartPTS=c,u.startDTS=x,u.endPTS=S,u.minEndPTS=r,u.endDTS=M;var w=u.sn;if(!s||w<s.startSN||w>s.endSN)return 0;var _,j=w-s.startSN,W=s.fragments;for(W[j]=u,_=j;_>0;_--)b(W[_],W[_-1]);for(_=j;_<W.length-1;_++)b(W[_],W[_+1]);return s.fragmentHint&&b(W[W.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,T}function i(s,u){for(var p=null,S=s.fragments,x=S.length-1;x>=0;x--){var M=S[x].initSegment;if(M){p=M;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var C=0,c;if(v(s,u,function(_,j){_.relurl&&(C=_.cc-j.cc),Object(Q.isFiniteNumber)(_.startPTS)&&Object(Q.isFiniteNumber)(_.endPTS)&&(j.start=j.startPTS=_.startPTS,j.startDTS=_.startDTS,j.appendedPTS=_.appendedPTS,j.maxStartPTS=_.maxStartPTS,j.endPTS=_.endPTS,j.endDTS=_.endDTS,j.minEndPTS=_.minEndPTS,j.duration=_.endPTS-_.startPTS,j.duration&&(c=j),u.PTSKnown=u.alignedSliding=!0),j.elementaryStreams=_.elementaryStreams,j.loader=_.loader,j.stats=_.stats,j.urlId=_.urlId,_.initSegment&&(j.initSegment=_.initSegment,p=_.initSegment)}),p){var r=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments;r.forEach(function(_){var j;(!_.initSegment||_.initSegment.relurl===((j=p)===null||j===void 0?void 0:j.relurl))&&(_.initSegment=p)})}if(u.skippedSegments&&(u.deltaUpdateFailed=u.fragments.some(function(_){return!_}),u.deltaUpdateFailed)){R.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var a=u.skippedSegments;a--;)u.fragments.shift();u.startSN=u.fragments[0].sn,u.startCC=u.fragments[0].cc}var A=u.fragments;if(C){R.logger.warn("discontinuity sliding from playlist, take drift into account");for(var L=0;L<A.length;L++)A[L].cc+=C}u.skippedSegments&&(u.startCC=u.fragments[0].cc),l(s.partList,u.partList,function(_,j){j.elementaryStreams=_.elementaryStreams,j.stats=_.stats}),c?g(u,c,c.startPTS,c.endPTS,c.startDTS,c.endDTS):h(s,u),A.length&&(u.totalduration=u.edge-A[0].start),u.driftStartTime=s.driftStartTime,u.driftStart=s.driftStart;var T=u.advancedDateTime;if(u.advanced&&T){var w=u.edge;u.driftStart||(u.driftStartTime=T,u.driftStart=w),u.driftEndTime=T,u.driftEnd=w}else u.driftEndTime=s.driftEndTime,u.driftEnd=s.driftEnd,u.advancedDateTime=s.advancedDateTime}function l(s,u,p){if(s&&u)for(var S=0,x=0,M=s.length;x<=M;x++){var C=s[x],c=u[x+S];C&&c&&C.index===c.index&&C.fragment.sn===c.fragment.sn?p(C,c):S--}}function v(s,u,p){for(var S=u.skippedSegments,x=Math.max(s.startSN,u.startSN)-u.startSN,M=(s.fragmentHint?1:0)+(S?u.endSN:Math.min(s.endSN,u.endSN))-u.startSN,C=u.startSN-s.startSN,c=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments,r=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,a=x;a<=M;a++){var A=r[C+a],L=c[a];S&&!L&&a<S&&(L=u.fragments[a]=A),A&&L&&p(A,L)}}function h(s,u){var p=u.startSN+u.skippedSegments-s.startSN,S=s.fragments;if(p<0||p>=S.length)return;d(u,S[p].start)}function d(s,u){if(u){for(var p=s.fragments,S=s.skippedSegments;S<p.length;S++)p[S].start+=u;s.fragmentHint&&(s.fragmentHint.start+=u)}}function E(s,u){var p=1e3*s.levelTargetDuration,S=p/2,x=s.age,M=x>0&&x<p*3,C=u.loading.end-u.loading.start,c,r=s.availabilityDelay;if(s.updated===!1)if(M){var a=333*s.misses;c=Math.max(Math.min(S,C*2),a),s.availabilityDelay=(s.availabilityDelay||0)+c}else c=S;else M?(r=Math.min(r||p/2,x),s.availabilityDelay=r,c=r+p-x):c=p-C;return Math.round(c)}function o(s,u,p){if(!s||!s.details)return null;var S=s.details,x=S.fragments[u-S.startSN];return x||(x=S.fragmentHint,x&&x.sn===u?x:u<S.startSN&&p&&p.sn===u?p:null)}function n(s,u,p){if(!s||!s.details)return null;var S=s.details.partList;if(S)for(var x=S.length;x--;){var M=S[x];if(M.index===p&&M.fragment.sn===u)return M}return null}},"./src/controller/stream-controller.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return S});var Q=O("./src/polyfills/number.ts"),R=O("./src/controller/base-stream-controller.ts"),B=O("./src/is-supported.ts"),D=O("./src/events.ts"),f=O("./src/utils/buffer-helper.ts"),b=O("./src/controller/fragment-tracker.ts"),g=O("./src/types/loader.ts"),i=O("./src/loader/fragment.ts"),l=O("./src/demux/transmuxer-interface.ts"),v=O("./src/types/transmuxer.ts"),h=O("./src/controller/gap-controller.ts"),d=O("./src/errors.ts"),E=O("./src/utils/logger.ts");function o(x,M){for(var C=0;C<M.length;C++){var c=M[C];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(x,c.key,c)}}function n(x,M,C){return M&&o(x.prototype,M),C&&o(x,C),x}function s(x,M){x.prototype=Object.create(M.prototype),x.prototype.constructor=x,u(x,M)}function u(x,M){return u=Object.setPrototypeOf||function(c,r){return c.__proto__=r,c},u(x,M)}var p=100,S=function(x){s(M,x);function M(c,r){var a;return a=x.call(this,c,r,"[stream-controller]")||this,a.audioCodecSwap=!1,a.gapController=null,a.level=-1,a._forceStartLoad=!1,a.altAudio=!1,a.audioOnly=!1,a.fragPlaying=null,a.onvplaying=null,a.onvseeked=null,a.fragLastKbps=0,a.stalled=!1,a.couldBacktrack=!1,a.audioCodecSwitch=!1,a.videoBuffer=null,a._registerListeners(),a}var C=M.prototype;return C._registerListeners=function(){var r=this.hls;r.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.on(D.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.on(D.Events.ERROR,this.onError,this),r.on(D.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.on(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.on(D.Events.BUFFER_CREATED,this.onBufferCreated,this),r.on(D.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.on(D.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.on(D.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C._unregisterListeners=function(){var r=this.hls;r.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.off(D.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),r.off(D.Events.ERROR,this.onError,this),r.off(D.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),r.off(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),r.off(D.Events.BUFFER_CREATED,this.onBufferCreated,this),r.off(D.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),r.off(D.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),r.off(D.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},C.startLoad=function(r){if(this.levels){var a=this.lastCurrentTime,A=this.hls;if(this.stopLoad(),this.setInterval(p),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var L=A.startLevel;L===-1&&(A.config.testBandwidth?(L=0,this.bitrateTest=!0):L=A.nextAutoLevel),this.level=A.nextLoadLevel=L,this.loadedmetadata=!1}a>0&&r===-1&&(this.log("Override startPosition with lastCurrentTime @"+a.toFixed(3)),r=a),this.state=R.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=r,this.tick()}else this._forceStartLoad=!0,this.state=R.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,x.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case R.State.IDLE:this.doTickIdle();break;case R.State.WAITING_LEVEL:{var r,a=this.levels,A=this.level,L=a==null||((r=a[A])===null||r===void 0)?void 0:r.details;if(L&&(!L.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(L))break;this.state=R.State.IDLE;break}break}case R.State.FRAG_LOADING_WAITING_RETRY:{var T,w=self.performance.now(),_=this.retryDate;(!_||w>=_||(T=this.media)!==null&&T!==void 0&&T.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=R.State.IDLE)}break;default:break}this.onTickEnd()},C.onTickEnd=function(){x.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var r,a,A=this.hls,L=this.levelLastLoaded,T=this.levels,w=this.media,_=A.config,j=A.nextLoadLevel;if(L===null||!w&&(this.startFragRequested||!_.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!T||!T[j])return;var W=T[j];this.level=A.nextLoadLevel=j;var Z=W.details;if(!Z||this.state===R.State.WAITING_LEVEL||Z.live&&this.levelLastLoaded!==j){this.state=R.State.WAITING_LEVEL;return}var X=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:w,g.PlaylistLevelType.MAIN);if(X===null)return;var G=X.len,te=this.getMaxBufferLength(W.maxBitrate);if(G>=te)return;if(this._streamEnded(X,Z)){var Y={};this.altAudio&&(Y.type="video"),this.hls.trigger(D.Events.BUFFER_EOS,Y),this.state=R.State.ENDED;return}var le=X.end,Ae=this.getNextFragment(le,Z);if(this.couldBacktrack&&!this.fragPrevious&&Ae&&Ae.sn!=="initSegment"){var Be=Ae.sn-Z.startSN;Be>1&&(Ae=Z.fragments[Be-1],this.fragmentTracker.removeFragment(Ae))}if(Ae&&this.fragmentTracker.getState(Ae)===b.FragmentState.OK&&this.nextLoadPosition>le){var Ce=this.audioOnly&&!this.altAudio?i.ElementaryStreamTypes.AUDIO:i.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(w,Ce,g.PlaylistLevelType.MAIN),Ae=this.getNextFragment(this.nextLoadPosition,Z)}if(!Ae)return;Ae.initSegment&&!Ae.initSegment.data&&!this.bitrateTest&&(Ae=Ae.initSegment),((r=Ae.decryptdata)===null||r===void 0?void 0:r.keyFormat)==="identity"&&!((a=Ae.decryptdata)!==null&&a!==void 0&&a.key)?this.loadKey(Ae,Z):this.loadFragment(Ae,Z,le)},C.loadFragment=function(r,a,A){var L,T=this.fragmentTracker.getState(r);if(this.fragCurrent=r,T===b.FragmentState.BACKTRACKED){var w=this.fragmentTracker.getBacktrackData(r);if(w){this._handleFragmentLoadProgress(w),this._handleFragmentLoadComplete(w);return}else T=b.FragmentState.NOT_LOADED}T===b.FragmentState.NOT_LOADED||T===b.FragmentState.PARTIAL?r.sn==="initSegment"?this._loadInitSegment(r):this.bitrateTest?(r.bitrateTest=!0,this.log("Fragment "+r.sn+" of level "+r.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(r)):(this.startFragRequested=!0,x.prototype.loadFragment.call(this,r,a,A)):T===b.FragmentState.APPENDING?this.reduceMaxBufferLength(r.duration)&&this.fragmentTracker.removeFragment(r):((L=this.media)===null||L===void 0?void 0:L.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(r){var a=this.fragmentTracker.getAppendedFrag(r,g.PlaylistLevelType.MAIN);return a&&"fragment"in a?a.fragment:a},C.getBufferedFrag=function(r){return this.fragmentTracker.getBufferedFrag(r,g.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(r){return r?this.getBufferedFrag(r.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var r=this.levels,a=this.media;if(a!=null&&a.readyState){var A,L=this.getAppendedFrag(a.currentTime);if(L&&L.start>1&&this.flushMainBuffer(0,L.start-1),!a.paused&&r){var T=this.hls.nextLoadLevel,w=r[T],_=this.fragLastKbps;_&&this.fragCurrent?A=this.fragCurrent.duration*w.maxBitrate/(1e3*_)+1:A=0}else A=0;var j=this.getBufferedFrag(a.currentTime+A);if(j){var W=this.followingBufferedFrag(j);if(W){this.abortCurrentFrag();var Z=W.maxStartPTS?W.maxStartPTS:W.start,X=W.duration,G=Math.max(j.end,Z+Math.min(Math.max(X-this.config.maxFragLookUpTolerance,X*.5),X*.75));this.flushMainBuffer(G,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var r=this.fragCurrent;this.fragCurrent=null,r!=null&&r.loader&&r.loader.abort(),this.state===R.State.KEY_LOADING&&(this.state=R.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(r,a){x.prototype.flushMainBuffer.call(this,r,a,this.altAudio?"video":null)},C.onMediaAttached=function(r,a){x.prototype.onMediaAttached.call(this,r,a);var A=a.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),A.addEventListener("playing",this.onvplaying),A.addEventListener("seeked",this.onvseeked),this.gapController=new h.default(this.config,A,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var r=this.media;r&&(r.removeEventListener("playing",this.onvplaying),r.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),x.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var r=this.media,a=r?r.currentTime:null;Object(Q.isFiniteNumber)(a)&&this.log("Media seeked to "+a.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(D.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(r,a){var A=!1,L=!1,T;a.levels.forEach(function(w){T=w.audioCodec,T&&(T.indexOf("mp4a.40.2")!==-1&&(A=!0),T.indexOf("mp4a.40.5")!==-1&&(L=!0))}),this.audioCodecSwitch=A&&L&&!Object(B.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=a.levels,this.startFragRequested=!1},C.onLevelLoading=function(r,a){var A=this.levels;if(!A||this.state!==R.State.IDLE)return;var L=A[a.level];(!L.details||L.details.live&&this.levelLastLoaded!==a.level||this.waitForCdnTuneIn(L.details))&&(this.state=R.State.WAITING_LEVEL)},C.onLevelLoaded=function(r,a){var A,L=this.levels,T=a.level,w=a.details,_=w.totalduration;if(!L){this.warn("Levels were reset while loading level "+T);return}this.log("Level "+T+" loaded ["+w.startSN+","+w.endSN+"], cc ["+w.startCC+", "+w.endCC+"] duration:"+_);var j=this.fragCurrent;j&&(this.state===R.State.FRAG_LOADING||this.state===R.State.FRAG_LOADING_WAITING_RETRY)&&(j.level!==a.level&&j.loader&&(this.state=R.State.IDLE,j.loader.abort()));var W=L[T],Z=0;if(w.live||(A=W.details)!==null&&A!==void 0&&A.live){if(w.fragments[0]||(w.deltaUpdateFailed=!0),w.deltaUpdateFailed)return;Z=this.alignPlaylists(w,W.details)}if(W.details=w,this.levelLastLoaded=T,this.hls.trigger(D.Events.LEVEL_UPDATED,{details:w,level:T}),this.state===R.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(w))return;this.state=R.State.IDLE}this.startFragRequested?w.live&&this.synchronizeToLiveEdge(w):this.setStartPosition(w,Z),this.tick()},C._handleFragmentLoadProgress=function(r){var a,A=r.frag,L=r.part,T=r.payload,w=this.levels;if(!w){this.warn("Levels were reset while fragment load was in progress. Fragment "+A.sn+" of level "+A.level+" will not be buffered");return}var _=w[A.level],j=_.details;if(!j){this.warn("Dropping fragment "+A.sn+" of level "+A.level+" after level details were reset");return}var W=_.videoCodec,Z=j.PTSKnown||!j.live,X=(a=A.initSegment)===null||a===void 0?void 0:a.data,G=this._getAudioCodec(_),te=this.transmuxer=this.transmuxer||new l.default(this.hls,g.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Y=L?L.index:-1,le=Y!==-1,Ae=new v.ChunkMetadata(A.level,A.sn,A.stats.chunkCount,T.byteLength,Y,le),Be=this.initPTS[A.cc];te.push(T,X,G,W,A,L,j.totalduration,Z,Ae,Be)},C.onAudioTrackSwitching=function(r,a){var A=this.altAudio,L=!!a.url,T=a.id;if(!L){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var w=this.fragCurrent;w!=null&&w.loader&&(this.log("Switching to main audio track, cancel main fragment load"),w.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var _=this.hls;A&&_.trigger(D.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),_.trigger(D.Events.AUDIO_TRACK_SWITCHED,{id:T})}},C.onAudioTrackSwitched=function(r,a){var A=a.id,L=!!this.hls.audioTracks[A].url;if(L){var T=this.videoBuffer;T&&this.mediaBuffer!==T&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=T)}this.altAudio=L,this.tick()},C.onBufferCreated=function(r,a){var A=a.tracks,L,T,w=!1;for(var _ in A){var j=A[_];if(j.id==="main"){if(T=_,L=j,_==="video"){var W=A[_];W&&(this.videoBuffer=W.buffer)}}else w=!0}w&&L?(this.log("Alternate track found, use "+T+".buffered to schedule main fragment loading"),this.mediaBuffer=L.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(r,a){var A=a.frag,L=a.part;if(A&&A.type!==g.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(A)){this.warn("Fragment "+A.sn+(L?" p: "+L.index:"")+" of level "+A.level+" finished buffering, but was aborted. state: "+this.state),this.state===R.State.PARSED&&(this.state=R.State.IDLE);return}var T=L?L.stats:A.stats;this.fragLastKbps=Math.round(8*T.total/(T.buffering.end-T.loading.first)),A.sn!=="initSegment"&&(this.fragPrevious=A),this.fragBufferedComplete(A,L)},C.onError=function(r,a){switch(a.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(g.PlaylistLevelType.MAIN,a);break;case d.ErrorDetails.LEVEL_LOAD_ERROR:case d.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==R.State.ERROR&&(a.fatal?(this.warn(""+a.details),this.state=R.State.ERROR):!a.levelRetry&&this.state===R.State.WAITING_LEVEL&&(this.state=R.State.IDLE));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if(a.parent==="main"&&(this.state===R.State.PARSING||this.state===R.State.PARSED)){var A=!0,L=this.getFwdBufferInfo(this.media,g.PlaylistLevelType.MAIN);L&&L.len>.5&&(A=!this.reduceMaxBufferLength(L.len)),A&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},C.checkBuffer=function(){var r=this.media,a=this.gapController;if(!r||!a||!r.readyState)return;var A=f.BufferHelper.getBuffered(r);!this.loadedmetadata&&A.length?(this.loadedmetadata=!0,this.seekToStartPos()):a.poll(this.lastCurrentTime),this.lastCurrentTime=r.currentTime},C.onFragLoadEmergencyAborted=function(){this.state=R.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(r,a){var A=a.type;if(A!==i.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var L=(A===i.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(L,A,g.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(r,a){this.levels=a.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var r=this.media,a=r.currentTime,A=this.startPosition;if(A>=0&&a<A){if(r.seeking){E.logger.log("could not seek to "+A+", already seeking at "+a);return}var L=f.BufferHelper.getBuffered(r),T=L.length?L.start(0):0,w=T-A;w>0&&(w<this.config.maxBufferHole||w<this.config.maxFragLookUpTolerance)&&(E.logger.log("adjusting start position by "+w+" to match buffer start"),A+=w,this.startPosition=A),this.log("seek to target start position "+A+" from current time "+a),r.currentTime=A}},C._getAudioCodec=function(r){var a=this.config.defaultAudioCodec||r.audioCodec;return this.audioCodecSwap&&a&&(this.log("Swapping audio codec"),a.indexOf("mp4a.40.5")!==-1?a="mp4a.40.2":a="mp4a.40.5"),a},C._loadBitrateTestFrag=function(r){var a=this;this._doFragLoad(r).then(function(A){var L=a.hls;if(!A||L.nextLoadLevel||a.fragContextChanged(r))return;a.fragLoadError=0,a.state=R.State.IDLE,a.startFragRequested=!1,a.bitrateTest=!1;var T=r.stats;T.parsing.start=T.parsing.end=T.buffering.start=T.buffering.end=self.performance.now(),L.trigger(D.Events.FRAG_LOADED,A)})},C._handleTransmuxComplete=function(r){var a,A="main",L=this.hls,T=r.remuxResult,w=r.chunkMeta,_=this.getCurrentContext(w);if(!_){this.warn("The loading context changed while buffering fragment "+w.sn+" of level "+w.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(w.level);return}var j=_.frag,W=_.part,Z=_.level,X=T.video,G=T.text,te=T.id3,Y=T.initSegment,le=this.altAudio?void 0:T.audio;if(this.fragContextChanged(j))return;if(this.state=R.State.PARSING,Y){Y.tracks&&(this._bufferInitSegment(Z,Y.tracks,j,w),L.trigger(D.Events.FRAG_PARSING_INIT_SEGMENT,{frag:j,id:A,tracks:Y.tracks}));var Ae=Y.initPTS,Be=Y.timescale;Object(Q.isFiniteNumber)(Ae)&&(this.initPTS[j.cc]=Ae,L.trigger(D.Events.INIT_PTS_FOUND,{frag:j,id:A,initPTS:Ae,timescale:Be}))}if(X&&T.independent!==!1){if(Z.details){var Ce=X.startPTS,Se=X.endPTS,Fe=X.startDTS,Ve=X.endDTS;if(W)W.elementaryStreams[X.type]={startPTS:Ce,endPTS:Se,startDTS:Fe,endDTS:Ve};else if(X.firstKeyFrame&&X.independent&&(this.couldBacktrack=!0),X.dropped&&X.independent){var De=this.getLoadPosition()+this.config.maxBufferHole;if(De<Ce){this.backtrack(j);return}j.setElementaryStreamInfo(X.type,j.start,Se,j.start,Ve,!0)}j.setElementaryStreamInfo(X.type,Ce,Se,Fe,Ve),this.bufferFragmentData(X,j,W,w)}}else if(T.independent===!1){this.backtrack(j);return}if(le){var Le=le.startPTS,tt=le.endPTS,Et=le.startDTS,Ie=le.endDTS;W&&(W.elementaryStreams[i.ElementaryStreamTypes.AUDIO]={startPTS:Le,endPTS:tt,startDTS:Et,endDTS:Ie}),j.setElementaryStreamInfo(i.ElementaryStreamTypes.AUDIO,Le,tt,Et,Ie),this.bufferFragmentData(le,j,W,w)}if(te!=null&&(a=te.samples)!==null&&a!==void 0&&a.length){var Qe={frag:j,id:A,samples:te.samples};L.trigger(D.Events.FRAG_PARSING_METADATA,Qe)}if(G){var xe={frag:j,id:A,samples:G.samples};L.trigger(D.Events.FRAG_PARSING_USERDATA,xe)}},C._bufferInitSegment=function(r,a,A,L){var T=this;if(this.state!==R.State.PARSING)return;this.audioOnly=!!a.audio&&!a.video,this.altAudio&&!this.audioOnly&&delete a.audio;var w=a.audio,_=a.video,j=a.audiovideo;if(w){var W=r.audioCodec,Z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(W&&(W.indexOf("mp4a.40.5")!==-1?W="mp4a.40.2":W="mp4a.40.5"),w.metadata.channelCount!==1&&Z.indexOf("firefox")===-1&&(W="mp4a.40.5")),Z.indexOf("android")!==-1&&w.container!=="audio/mpeg"&&(W="mp4a.40.2",this.log("Android: force audio codec to "+W)),r.audioCodec&&r.audioCodec!==W&&this.log('Swapping manifest audio codec "'+r.audioCodec+'" for "'+W+'"'),w.levelCodec=W,w.id="main",this.log("Init audio buffer, container:"+w.container+", codecs[selected/level/parsed]=["+(W||"")+"/"+(r.audioCodec||"")+"/"+w.codec+"]")}_&&(_.levelCodec=r.videoCodec,_.id="main",this.log("Init video buffer, container:"+_.container+", codecs[level/parsed]=["+(r.videoCodec||"")+"/"+_.codec+"]")),j&&this.log("Init audiovideo buffer, container:"+j.container+", codecs[level/parsed]=["+(r.attrs.CODECS||"")+"/"+j.codec+"]"),this.hls.trigger(D.Events.BUFFER_CODECS,a),Object.keys(a).forEach(function(X){var G=a[X],te=G.initSegment;te!=null&&te.byteLength&&T.hls.trigger(D.Events.BUFFER_APPENDING,{type:X,data:te,frag:A,part:null,chunkMeta:L,parent:A.type})}),this.tick()},C.backtrack=function(r){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(r);var a=this.fragmentTracker.backtrack(r);this.fragPrevious=null,this.nextLoadPosition=r.start,a?this.resetFragmentLoading(r):this.state=R.State.BACKTRACKING},C.checkFragmentChanged=function(){var r=this.media,a=null;if(r&&r.readyState>1&&r.seeking===!1){var A=r.currentTime;if(f.BufferHelper.isBuffered(r,A)?a=this.getAppendedFrag(A):f.BufferHelper.isBuffered(r,A+.1)&&(a=this.getAppendedFrag(A+.1)),a){var L=this.fragPlaying,T=a.level;(!L||a.sn!==L.sn||L.level!==T||a.urlId!==L.urlId)&&(this.hls.trigger(D.Events.FRAG_CHANGED,{frag:a}),(!L||L.level!==T)&&this.hls.trigger(D.Events.LEVEL_SWITCHED,{level:T}),this.fragPlaying=a)}}},n(M,[{key:"nextLevel",get:function(){var r=this.nextBufferedFrag;return r?r.level:-1}},{key:"currentLevel",get:function(){var r=this.media;if(r){var a=this.getAppendedFrag(r.currentTime);if(a)return a.level}return-1}},{key:"nextBufferedFrag",get:function(){var r=this.media;if(r){var a=this.getAppendedFrag(r.currentTime);return this.followingBufferedFrag(a)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),M}(R.default)},"./src/controller/subtitle-stream-controller.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"SubtitleStreamController",function(){return s});var Q=O("./src/events.ts"),R=O("./src/utils/logger.ts"),B=O("./src/utils/buffer-helper.ts"),D=O("./src/controller/fragment-finders.ts"),f=O("./src/utils/discontinuities.ts"),b=O("./src/controller/level-helper.ts"),g=O("./src/controller/fragment-tracker.ts"),i=O("./src/controller/base-stream-controller.ts"),l=O("./src/types/loader.ts"),v=O("./src/types/level.ts");function h(u,p){for(var S=0;S<p.length;S++){var x=p[S];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(u,x.key,x)}}function d(u,p,S){return p&&h(u.prototype,p),S&&h(u,S),u}function E(u,p){u.prototype=Object.create(p.prototype),u.prototype.constructor=u,o(u,p)}function o(u,p){return o=Object.setPrototypeOf||function(x,M){return x.__proto__=M,x},o(u,p)}var n=500,s=function(u){E(p,u);function p(x,M){var C;return C=u.call(this,x,M,"[subtitle-stream-controller]")||this,C.levels=[],C.currentTrackId=-1,C.tracksBuffered=[],C.mainDetails=null,C._registerListeners(),C}var S=p.prototype;return S.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},S._registerListeners=function(){var M=this.hls;M.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),M.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),M.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),M.on(Q.Events.LEVEL_LOADED,this.onLevelLoaded,this),M.on(Q.Events.ERROR,this.onError,this),M.on(Q.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),M.on(Q.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),M.on(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),M.on(Q.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),M.on(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S._unregisterListeners=function(){var M=this.hls;M.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),M.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),M.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),M.off(Q.Events.LEVEL_LOADED,this.onLevelLoaded,this),M.off(Q.Events.ERROR,this.onError,this),M.off(Q.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),M.off(Q.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),M.off(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),M.off(Q.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),M.off(Q.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},S.startLoad=function(){this.stopLoad(),this.state=i.State.IDLE,this.setInterval(n),this.tick()},S.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},S.onLevelLoaded=function(M,C){this.mainDetails=C.details},S.onSubtitleFragProcessed=function(M,C){var c=C.frag,r=C.success;if(this.fragPrevious=c,this.state=i.State.IDLE,!r)return;var a=this.tracksBuffered[this.currentTrackId];if(!a)return;for(var A,L=c.start,T=0;T<a.length;T++)if(L>=a[T].start&&L<=a[T].end){A=a[T];break}var w=c.start+c.duration;A?A.end=w:(A={start:L,end:w},a.push(A)),this.fragmentTracker.fragBuffered(c)},S.onBufferFlushing=function(M,C){var c=C.startOffset,r=C.endOffset;if(c===0&&r!==Number.POSITIVE_INFINITY){var a=this.currentTrackId,A=this.levels;if(!A.length||!A[a]||!A[a].details)return;var L=A[a].details,T=L.targetduration,w=r-T;if(w<=0)return;C.endOffsetSubtitles=Math.max(0,w),this.tracksBuffered.forEach(function(_){for(var j=0;j<_.length;){if(_[j].end<=w){_.shift();continue}else if(_[j].start<w)_[j].start=w;else break;j++}}),this.fragmentTracker.removeFragmentsInRange(c,w,l.PlaylistLevelType.SUBTITLE)}},S.onError=function(M,C){var c,r=C.frag;if(!r||r.type!==l.PlaylistLevelType.SUBTITLE)return;(c=this.fragCurrent)!==null&&c!==void 0&&c.loader&&this.fragCurrent.loader.abort(),this.state=i.State.IDLE},S.onSubtitleTracksUpdated=function(M,C){var c=this,r=C.subtitleTracks;this.tracksBuffered=[],this.levels=r.map(function(a){return new v.Level(a)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(a){c.tracksBuffered[a.id]=[]}),this.mediaBuffer=null},S.onSubtitleTrackSwitch=function(M,C){if(this.currentTrackId=C.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var c=this.levels[this.currentTrackId];c!=null&&c.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,c&&this.setInterval(n)},S.onSubtitleTrackLoaded=function(M,C){var c,r=C.details,a=C.id,A=this.currentTrackId,L=this.levels;if(!L.length)return;var T=L[A];if(a>=L.length||a!==A||!T)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||(c=T.details)!==null&&c!==void 0&&c.live){var w=this.mainDetails;if(r.deltaUpdateFailed||!w)return;var _=w.fragments[0];if(!T.details)r.hasProgramDateTime&&w.hasProgramDateTime?Object(f.alignMediaPlaylistByPDT)(r,w):_&&Object(b.addSliding)(r,_.start);else{var j=this.alignPlaylists(r,T.details);j===0&&_&&Object(b.addSliding)(r,_.start)}}if(T.details=r,this.levelLastLoaded=a,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===i.State.IDLE){var W=Object(D.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0);W||(this.warn("Subtitle playlist not aligned with playback"),T.details=void 0)}},S._handleFragmentLoadComplete=function(M){var C=M.frag,c=M.payload,r=C.decryptdata,a=this.hls;if(this.fragContextChanged(C))return;if(c&&c.byteLength>0&&r&&r.key&&r.iv&&r.method==="AES-128"){var A=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(c),r.key.buffer,r.iv.buffer).then(function(L){var T=performance.now();a.trigger(Q.Events.FRAG_DECRYPTED,{frag:C,payload:L,stats:{tstart:A,tdecrypt:T}})})}},S.doTick=function(){if(!this.media){this.state=i.State.IDLE;return}if(this.state===i.State.IDLE){var M,C=this.currentTrackId,c=this.levels;if(!c.length||!c[C]||!c[C].details)return;var r=c[C].details,a=r.targetduration,A=this.config,L=this.media,T=B.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,L.currentTime-a,A.maxBufferHole),w=T.end,_=T.len,j=this.getMaxBufferLength()+a;if(_>j)return;console.assert(r,"Subtitle track details are defined on idle subtitle stream controller tick");var W=r.fragments,Z=W.length,X=r.edge,G,te=this.fragPrevious;if(w<X){var Y=A.maxFragLookUpTolerance;te&&r.hasProgramDateTime&&(G=Object(D.findFragmentByPDT)(W,te.endProgramDateTime,Y)),G||(G=Object(D.findFragmentByPTS)(te,W,w,Y),!G&&te&&te.start<W[0].start&&(G=W[0]))}else G=W[Z-1];(M=G)!==null&&M!==void 0&&M.encrypted?(R.logger.log("Loading key for "+G.sn),this.state=i.State.KEY_LOADING,this.hls.trigger(Q.Events.KEY_LOADING,{frag:G})):G&&this.fragmentTracker.getState(G)===g.FragmentState.NOT_LOADED&&this.loadFragment(G,r,w)}},S.loadFragment=function(M,C,c){this.fragCurrent=M,u.prototype.loadFragment.call(this,M,C,c)},d(p,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),p}(i.default)},"./src/controller/subtitle-track-controller.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/events.ts"),R=O("./src/utils/texttrack-utils.ts"),B=O("./src/controller/base-playlist-controller.ts"),D=O("./src/types/loader.ts");function f(h,d){for(var E=0;E<d.length;E++){var o=d[E];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(h,o.key,o)}}function b(h,d,E){return d&&f(h.prototype,d),E&&f(h,E),h}function g(h,d){h.prototype=Object.create(d.prototype),h.prototype.constructor=h,i(h,d)}function i(h,d){return i=Object.setPrototypeOf||function(o,n){return o.__proto__=n,o},i(h,d)}var l=function(h){g(d,h);function d(o){var n;return n=h.call(this,o,"[subtitle-track-controller]")||this,n.media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}var E=d.prototype;return E.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,h.prototype.destroy.call(this)},E.registerListeners=function(){var n=this.hls;n.on(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(Q.Events.ERROR,this.onError,this)},E.unregisterListeners=function(){var n=this.hls;n.off(Q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(Q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(Q.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(Q.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(Q.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(Q.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(Q.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(Q.Events.ERROR,this.onError,this)},E.onMediaAttached=function(n,s){if(this.media=s.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},E.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},E.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 n=v(this.media.textTracks);n.forEach(function(s){Object(R.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},E.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},E.onManifestParsed=function(n,s){this.tracks=s.subtitleTracks},E.onSubtitleTrackLoaded=function(n,s){var u=s.id,p=s.details,S=this.trackId,x=this.tracksInGroup[S];if(!x){this.warn("Invalid subtitle track id "+u);return}var M=x.details;x.details=s.details,this.log("subtitle track "+u+" loaded ["+p.startSN+"-"+p.endSN+"]"),u===this.trackId&&(this.retryCount=0,this.playlistLoaded(u,s,M))},E.onLevelLoading=function(n,s){this.switchLevel(s.level)},E.onLevelSwitching=function(n,s){this.switchLevel(s.level)},E.switchLevel=function(n){var s=this.hls.levels[n];if(!(s!=null&&s.textGroupIds))return;var u=s.textGroupIds[s.urlId];if(this.groupId!==u){var p=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,S=this.tracks.filter(function(C){return!u||C.groupId===u});this.tracksInGroup=S;var x=this.findTrackId(p==null?void 0:p.name)||this.findTrackId();this.groupId=u;var M={subtitleTracks:S};this.log("Updating subtitle tracks, "+S.length+' track(s) found in "'+u+'" group-id'),this.hls.trigger(Q.Events.SUBTITLE_TRACKS_UPDATED,M),x!==-1&&this.setSubtitleTrack(x,p)}},E.findTrackId=function(n){for(var s=this.tracksInGroup,u=0;u<s.length;u++){var p=s[u];if((!this.selectDefaultTrack||p.default)&&(!n||n===p.name))return p.id}return-1},E.onError=function(n,s){if(h.prototype.onError.call(this,n,s),s.fatal||!s.context)return;s.context.type===D.PlaylistContextType.SUBTITLE_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},E.loadPlaylist=function(n){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var u=s.id,p=s.groupId,S=s.url;if(n)try{S=n.addDirectives(S)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Loading subtitle playlist for id "+u),this.hls.trigger(Q.Events.SUBTITLE_TRACK_LOADING,{url:S,id:u,groupId:p,deliveryDirectives:n||null})}},E.toggleTrackModes=function(n){var s=this,u=this.media,p=this.subtitleDisplay,S=this.trackId;if(!u)return;var x=v(u.textTracks),M=x.filter(function(r){return r.groupId===s.groupId});if(n===-1)[].slice.call(x).forEach(function(r){r.mode="disabled"});else{var C=M[S];C&&(C.mode="disabled")}var c=M[n];c&&(c.mode=p?"showing":"hidden")},E.setSubtitleTrack=function(n,s){var u,p=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(u=p[n])!==null&&u!==void 0&&u.details)||n<-1||n>=p.length)return;this.clearTimer();var S=p[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,S){var x=S.id,M=S.groupId,C=M===void 0?"":M,c=S.name,r=S.type,a=S.url;this.hls.trigger(Q.Events.SUBTITLE_TRACK_SWITCH,{id:x,groupId:C,name:c,type:r,url:a});var A=this.switchParams(S.url,s==null?void 0:s.details);this.loadPlaylist(A)}else this.hls.trigger(Q.Events.SUBTITLE_TRACK_SWITCH,{id:n})},E.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,s=v(this.media.textTracks),u=0;u<s.length;u++)if(s[u].mode==="hidden")n=u;else if(s[u].mode==="showing"){n=u;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},b(d,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,s)}}]),d}(B.default);function v(h){for(var d=[],E=0;E<h.length;E++){var o=h[E];o.kind==="subtitles"&&o.label&&d.push(h[E])}return d}N.default=l},"./src/controller/timeline-controller.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"TimelineController",function(){return v});var Q=O("./src/polyfills/number.ts"),R=O("./src/events.ts"),B=O("./src/utils/cea-608-parser.ts"),D=O("./src/utils/output-filter.ts"),f=O("./src/utils/webvtt-parser.ts"),b=O("./src/utils/texttrack-utils.ts"),g=O("./src/utils/imsc1-ttml-parser.ts"),i=O("./src/types/loader.ts"),l=O("./src/utils/logger.ts"),v=function(){function o(s){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=E(),this.captionsProperties=void 0,this.hls=s,this.config=s.config,this.Cues=s.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var u=new D.default(this,"textTrack1"),p=new D.default(this,"textTrack2"),S=new D.default(this,"textTrack3"),x=new D.default(this,"textTrack4");this.cea608Parser1=new B.default(1,u,p),this.cea608Parser2=new B.default(3,S,x)}s.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(R.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(R.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.on(R.Events.FRAG_LOADING,this.onFragLoading,this),s.on(R.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(R.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.on(R.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.on(R.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(R.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.on(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=o.prototype;return n.destroy=function(){var u=this.hls;u.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(R.Events.MANIFEST_LOADED,this.onManifestLoaded,this),u.off(R.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),u.off(R.Events.FRAG_LOADING,this.onFragLoading,this),u.off(R.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(R.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),u.off(R.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),u.off(R.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.off(R.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),u.off(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(u,p,S,x,M){for(var C=!1,c=M.length;c--;){var r=M[c],a=d(r[0],r[1],p,S);if(a>=0&&(r[0]=Math.min(r[0],p),r[1]=Math.max(r[1],S),C=!0,a/(S-p)>.5))return}if(C||M.push([p,S]),this.config.renderTextTracksNatively){var A=this.captionsTracks[u];this.Cues.newCue(A,p,S,x)}else{var L=this.Cues.newCue(null,p,S,x);this.hls.trigger(R.Events.CUES_PARSED,{type:"captions",cues:L,track:u})}},n.onInitPtsFound=function(u,p){var S=this,x=p.frag,M=p.id,C=p.initPTS,c=p.timescale,r=this.unparsedVttFrags;M==="main"&&(this.initPTS[x.cc]=C,this.timescale[x.cc]=c),r.length&&(this.unparsedVttFrags=[],r.forEach(function(a){S.onFragLoaded(R.Events.FRAG_LOADED,a)}))},n.getExistingTrack=function(u){var p=this.media;if(p)for(var S=0;S<p.textTracks.length;S++){var x=p.textTracks[S];if(x[u])return x}return null},n.createCaptionsTrack=function(u){this.config.renderTextTracksNatively?this.createNativeTrack(u):this.createNonNativeTrack(u)},n.createNativeTrack=function(u){if(this.captionsTracks[u])return;var p=this.captionsProperties,S=this.captionsTracks,x=this.media,M=p[u],C=M.label,c=M.languageCode,r=this.getExistingTrack(u);if(r)S[u]=r,Object(b.clearCurrentCues)(S[u]),Object(b.sendAddTrackEvent)(S[u],x);else{var a=this.createTextTrack("captions",C,c);a&&(a[u]=!0,S[u]=a)}},n.createNonNativeTrack=function(u){if(this.nonNativeCaptionsTracks[u])return;var p=this.captionsProperties[u];if(!p)return;var S=p.label,x={_id:u,label:S,kind:"captions",default:p.media?!!p.media.default:!1,closedCaptions:p.media};this.nonNativeCaptionsTracks[u]=x,this.hls.trigger(R.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[x]})},n.createTextTrack=function(u,p,S){var x=this.media;return x?x.addTextTrack(u,p,S):void 0},n.onMediaAttaching=function(u,p){this.media=p.media,this._cleanTracks()},n.onMediaDetaching=function(){var u=this.captionsTracks;Object.keys(u).forEach(function(p){Object(b.clearCurrentCues)(u[p]),delete u[p]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=E(),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())},n._cleanTracks=function(){var u=this.media;if(!u)return;var p=u.textTracks;if(p)for(var S=0;S<p.length;S++)Object(b.clearCurrentCues)(p[S])},n.onSubtitleTracksUpdated=function(u,p){var S=this;this.textTracks=[];var x=p.subtitleTracks||[],M=x.some(function(a){return a.textCodec===g.IMSC1_CODEC});if(this.config.enableWebVTT||M&&this.config.enableIMSC1){var C=this.tracks&&x&&this.tracks.length===x.length;if(this.tracks=x||[],this.config.renderTextTracksNatively){var c=this.media?this.media.textTracks:[];this.tracks.forEach(function(a,A){var L;if(A<c.length){for(var T=null,w=0;w<c.length;w++)if(h(c[w],a)){T=c[w];break}T&&(L=T)}L?Object(b.clearCurrentCues)(L):(L=S.createTextTrack("subtitles",a.name,a.lang),L&&(L.mode="disabled")),L&&(L.groupId=a.groupId,S.textTracks.push(L))})}else if(!C&&this.tracks&&this.tracks.length){var r=this.tracks.map(function(a){return{label:a.name,kind:a.type.toLowerCase(),default:a.default,subtitleTrack:a}});this.hls.trigger(R.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:r})}}},n.onManifestLoaded=function(u,p){var S=this;this.config.enableCEA708Captions&&p.captions&&p.captions.forEach(function(x){var M=/(?:CC|SERVICE)([1-4])/.exec(x.instreamId);if(!M)return;var C="textTrack"+M[1],c=S.captionsProperties[C];if(!c)return;c.label=x.name,x.lang&&(c.languageCode=x.lang),c.media=x})},n.onFragLoading=function(u,p){var S=this.cea608Parser1,x=this.cea608Parser2,M=this.lastSn,C=this.lastPartIndex;if(!this.enabled||!(S&&x))return;if(p.frag.type===i.PlaylistLevelType.MAIN){var c,r,a=p.frag.sn,A=(c=p==null||((r=p.part)===null||r===void 0)?void 0:r.index)!=null?c:-1;a===M+1||a===M&&A===C+1||(S.reset(),x.reset()),this.lastSn=a,this.lastPartIndex=A}},n.onFragLoaded=function(u,p){var S=p.frag,x=p.payload,M=this.initPTS,C=this.unparsedVttFrags;if(S.type===i.PlaylistLevelType.SUBTITLE)if(x.byteLength){if(!Object(Q.isFiniteNumber)(M[S.cc])){C.push(p),M.length&&this.hls.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:S,error:new Error("Missing initial subtitle PTS")});return}var c=S.decryptdata;if(c==null||c.key==null||c.method!=="AES-128"){var r=this.tracks[S.level],a=this.vttCCs;a[S.cc]||(a[S.cc]={start:S.start,prevCC:this.prevCC,new:!0},this.prevCC=S.cc),r&&r.textCodec===g.IMSC1_CODEC?this._parseIMSC1(S,x):this._parseVTTs(S,x,a)}}else this.hls.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:S,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(u,p){var S=this,x=this.hls;Object(g.parseIMSC1)(p,this.initPTS[u.cc],this.timescale[u.cc],function(M){S._appendCues(M,u.level),x.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(M){l.logger.log("Failed to parse IMSC1: "+M),x.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:M})})},n._parseVTTs=function(u,p,S){var x=this,M=this.hls;Object(f.parseWebVTT)(p,this.initPTS[u.cc],this.timescale[u.cc],S,u.cc,u.start,function(C){x._appendCues(C,u.level),M.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(C){x._fallbackToIMSC1(u,p),l.logger.log("Failed to parse VTT cue: "+C),M.trigger(R.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:C})})},n._fallbackToIMSC1=function(u,p){var S=this,x=this.tracks[u.level];x.textCodec||Object(g.parseIMSC1)(p,this.initPTS[u.cc],this.timescale[u.cc],function(){x.textCodec=g.IMSC1_CODEC,S._parseIMSC1(u,p)},function(){x.textCodec="wvtt"})},n._appendCues=function(u,p){var S=this.hls;if(this.config.renderTextTracksNatively){var x=this.textTracks[p];if(x.mode==="disabled")return;u.forEach(function(c){return Object(b.addCueToTrack)(x,c)})}else{var M=this.tracks[p],C=M.default?"default":"subtitles"+p;S.trigger(R.Events.CUES_PARSED,{type:"subtitles",cues:u,track:C})}},n.onFragDecrypted=function(u,p){var S=p.frag;if(S.type===i.PlaylistLevelType.SUBTITLE){if(!Object(Q.isFiniteNumber)(this.initPTS[S.cc])){this.unparsedVttFrags.push(p);return}this.onFragLoaded(R.Events.FRAG_LOADED,p)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(u,p){var S=this.cea608Parser1,x=this.cea608Parser2;if(!this.enabled||!(S&&x))return;for(var M=0;M<p.samples.length;M++){var C=p.samples[M].bytes;if(C){var c=this.extractCea608Data(C);S.addData(p.samples[M].pts,c[0]),x.addData(p.samples[M].pts,c[1])}}},n.onBufferFlushing=function(u,p){var S=p.startOffset,x=p.endOffset,M=p.endOffsetSubtitles,C=p.type,c=this.media;if(!c||c.currentTime<x)return;if(!C||C==="video"){var r=this.captionsTracks;Object.keys(r).forEach(function(A){return Object(b.removeCuesInRange)(r[A],S,x)})}if(this.config.renderTextTracksNatively&&(S===0&&M!==void 0)){var a=this.textTracks;Object.keys(a).forEach(function(A){return Object(b.removeCuesInRange)(a[A],S,M)})}},n.extractCea608Data=function(u){for(var p=u[0]&31,S=2,x=[[],[]],M=0;M<p;M++){var C=u[S++],c=127&u[S++],r=127&u[S++],a=(4&C)!==0,A=3&C;if(c===0&&r===0)continue;a&&((A===0||A===1)&&(x[A].push(c),x[A].push(r)))}return x},o}();function h(o,n){return o&&o.label===n.name&&!(o.textTrack1||o.textTrack2)}function d(o,n,s,u){return Math.min(n,u)-Math.max(o,s)}function E(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return Q});var Q=function(){function R(D,f){this.subtle=void 0,this.aesIV=void 0,this.subtle=D,this.aesIV=f}var B=R.prototype;return B.decrypt=function(f,b){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},b,f)},R}()},"./src/crypt/aes-decryptor.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"removePadding",function(){return R}),O.d(N,"default",function(){return B});var Q=O("./src/utils/typed-array.ts");function R(D){var f=D.byteLength,b=f&&new DataView(D.buffer).getUint8(f-1);return b?Object(Q.sliceUint8)(D,0,f-b):D}var B=function(){function D(){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 f=D.prototype;return f.uint8ArrayToUint32Array_=function(g){for(var i=new DataView(g),l=new Uint32Array(4),v=0;v<4;v++)l[v]=i.getUint32(v*4);return l},f.initTable=function(){var g=this.sBox,i=this.invSBox,l=this.subMix,v=l[0],h=l[1],d=l[2],E=l[3],o=this.invSubMix,n=o[0],s=o[1],u=o[2],p=o[3],S=new Uint32Array(256),x=0,M=0,C=0;for(C=0;C<256;C++)C<128?S[C]=C<<1:S[C]=C<<1^283;for(C=0;C<256;C++){var c=M^M<<1^M<<2^M<<3^M<<4;c=c>>>8^c&255^99,g[x]=c,i[c]=x;var r=S[x],a=S[r],A=S[a],L=S[c]*257^c*16843008;v[x]=L<<24|L>>>8,h[x]=L<<16|L>>>16,d[x]=L<<8|L>>>24,E[x]=L,L=A*16843009^a*65537^r*257^x*16843008,n[c]=L<<24|L>>>8,s[c]=L<<16|L>>>16,u[c]=L<<8|L>>>24,p[c]=L,x?(x=r^S[S[S[A^r]]],M^=S[S[M]]):x=M=1}},f.expandKey=function(g){for(var i=this.uint8ArrayToUint32Array_(g),l=!0,v=0;v<i.length&&l;)l=i[v]===this.key[v],v++;if(l)return;this.key=i;var h=this.keySize=i.length;if(h!==4&&h!==6&&h!==8)throw new Error("Invalid aes key size="+h);var d=this.ksRows=(h+6+1)*4,E,o,n=this.keySchedule=new Uint32Array(d),s=this.invKeySchedule=new Uint32Array(d),u=this.sBox,p=this.rcon,S=this.invSubMix,x=S[0],M=S[1],C=S[2],c=S[3],r,a;for(E=0;E<d;E++){if(E<h){r=n[E]=i[E];continue}a=r,E%h===0?(a=a<<8|a>>>24,a=u[a>>>24]<<24|u[a>>>16&255]<<16|u[a>>>8&255]<<8|u[a&255],a^=p[E/h|0]<<24):h>6&&E%h===4&&(a=u[a>>>24]<<24|u[a>>>16&255]<<16|u[a>>>8&255]<<8|u[a&255]),n[E]=r=(n[E-h]^a)>>>0}for(o=0;o<d;o++)E=d-o,o&3?a=n[E]:a=n[E-4],o<4||E<=4?s[o]=a:s[o]=x[u[a>>>24]]^M[u[a>>>16&255]]^C[u[a>>>8&255]]^c[u[a&255]],s[o]=s[o]>>>0},f.networkToHostOrderSwap=function(g){return g<<24|(g&65280)<<8|(g&16711680)>>8|g>>>24},f.decrypt=function(g,i,l){for(var v=this.keySize+6,h=this.invKeySchedule,d=this.invSBox,E=this.invSubMix,o=E[0],n=E[1],s=E[2],u=E[3],p=this.uint8ArrayToUint32Array_(l),S=p[0],x=p[1],M=p[2],C=p[3],c=new Int32Array(g),r=new Int32Array(c.length),a,A,L,T,w,_,j,W,Z,X,G,te,Y,le,Ae=this.networkToHostOrderSwap;i<c.length;){for(Z=Ae(c[i]),X=Ae(c[i+1]),G=Ae(c[i+2]),te=Ae(c[i+3]),w=Z^h[0],_=te^h[1],j=G^h[2],W=X^h[3],Y=4,le=1;le<v;le++)a=o[w>>>24]^n[_>>16&255]^s[j>>8&255]^u[W&255]^h[Y],A=o[_>>>24]^n[j>>16&255]^s[W>>8&255]^u[w&255]^h[Y+1],L=o[j>>>24]^n[W>>16&255]^s[w>>8&255]^u[_&255]^h[Y+2],T=o[W>>>24]^n[w>>16&255]^s[_>>8&255]^u[j&255]^h[Y+3],w=a,_=A,j=L,W=T,Y=Y+4;a=d[w>>>24]<<24^d[_>>16&255]<<16^d[j>>8&255]<<8^d[W&255]^h[Y],A=d[_>>>24]<<24^d[j>>16&255]<<16^d[W>>8&255]<<8^d[w&255]^h[Y+1],L=d[j>>>24]<<24^d[W>>16&255]<<16^d[w>>8&255]<<8^d[_&255]^h[Y+2],T=d[W>>>24]<<24^d[w>>16&255]<<16^d[_>>8&255]<<8^d[j&255]^h[Y+3],r[i]=Ae(a^S),r[i+1]=Ae(T^x),r[i+2]=Ae(L^M),r[i+3]=Ae(A^C),S=Z,x=X,M=G,C=te,i=i+4}return r.buffer},D}()},"./src/crypt/decrypter.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return i});var Q=O("./src/crypt/aes-crypto.ts"),R=O("./src/crypt/fast-aes-key.ts"),B=O("./src/crypt/aes-decryptor.ts"),D=O("./src/utils/logger.ts"),f=O("./src/utils/mp4-tools.ts"),b=O("./src/utils/typed-array.ts"),g=16,i=function(){function l(h,d,E){var o=E===void 0?{}:E,n=o.removePKCS7Padding,s=n===void 0?!0:n;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=h,this.config=d,this.removePKCS7Padding=s,s)try{var u=self.crypto;u&&(this.subtle=u.subtle||u.webkitSubtle)}catch(p){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var v=l.prototype;return v.destroy=function(){this.observer=null},v.isSync=function(){return this.config.enableSoftwareAES},v.flush=function(){var d=this.currentResult;if(!d){this.reset();return}var E=new Uint8Array(d);return this.reset(),this.removePKCS7Padding?Object(B.removePadding)(E):E},v.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},v.decrypt=function(d,E,o,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(d),E,o);var s=this.flush();s&&n(s.buffer)}else this.webCryptoDecrypt(new Uint8Array(d),E,o).then(n)},v.softwareDecrypt=function(d,E,o){var n=this.currentIV,s=this.currentResult,u=this.remainderData;this.logOnce("JS AES decrypt"),u&&(d=Object(f.appendUint8Array)(u,d),this.remainderData=null);var p=this.getValidChunk(d);if(!p.length)return null;n&&(o=n);var S=this.softwareDecrypter;S||(S=this.softwareDecrypter=new B.default),S.expandKey(E);var x=s;return this.currentResult=S.decrypt(p.buffer,0,o),this.currentIV=Object(b.sliceUint8)(p,-16).buffer,x||null},v.webCryptoDecrypt=function(d,E,o){var n=this,s=this.subtle;return(this.key!==E||!this.fastAesKey)&&(this.key=E,this.fastAesKey=new R.default(s,E)),this.fastAesKey.expandKey().then(function(u){if(!s)return Promise.reject(new Error("web crypto not initialized"));var p=new Q.default(s,o);return p.decrypt(d.buffer,u)}).catch(function(u){return n.onWebCryptoError(u,d,E,o)})},v.onWebCryptoError=function(d,E,o,n){return D.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",d),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(E,o,n)},v.getValidChunk=function(d){var E=d,o=d.length-d.length%g;return o!==d.length&&(E=Object(b.sliceUint8)(d,0,o),this.remainderData=Object(b.sliceUint8)(d,o)),E},v.logOnce=function(d){if(!this.logEnabled)return;D.logger.log("[decrypter.ts]: "+d),this.logEnabled=!1},l}()},"./src/crypt/fast-aes-key.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return Q});var Q=function(){function R(D,f){this.subtle=void 0,this.key=void 0,this.subtle=D,this.key=f}var B=R.prototype;return B.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},R}()},"./src/demux/aacdemuxer.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/demux/base-audio-demuxer.ts"),R=O("./src/demux/adts.ts"),B=O("./src/utils/logger.ts"),D=O("./src/demux/id3.ts");function f(i,l){i.prototype=Object.create(l.prototype),i.prototype.constructor=i,b(i,l)}function b(i,l){return b=Object.setPrototypeOf||function(h,d){return h.__proto__=d,h},b(i,l)}var g=function(i){f(l,i);function l(h,d){var E;return E=i.call(this)||this,E.observer=void 0,E.config=void 0,E.observer=h,E.config=d,E}var v=l.prototype;return v.resetInitSegment=function(d,E,o){i.prototype.resetInitSegment.call(this,d,E,o),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:d,duration:o,inputTimeScale:9e4,dropped:0}},l.probe=function(d){if(!d)return!1;for(var E=D.getID3Data(d,0)||[],o=E.length,n=d.length;o<n;o++)if(R.probe(d,o))return B.logger.log("ADTS sync word found !"),!0;return!1},v.canParse=function(d,E){return R.canParse(d,E)},v.appendFrame=function(d,E,o){R.initTrackConfig(d,this.observer,E,o,d.manifestCodec);var n=R.appendFrame(d,E,o,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},l}(Q.default);g.minProbeByteLength=9,N.default=g},"./src/demux/adts.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"getAudioConfig",function(){return D}),O.d(N,"isHeaderPattern",function(){return f}),O.d(N,"getHeaderLength",function(){return b}),O.d(N,"getFullFrameLength",function(){return g}),O.d(N,"canGetFrameLength",function(){return i}),O.d(N,"isHeader",function(){return l}),O.d(N,"canParse",function(){return v}),O.d(N,"probe",function(){return h}),O.d(N,"initTrackConfig",function(){return d}),O.d(N,"getFrameDuration",function(){return E}),O.d(N,"parseFrameHeader",function(){return o}),O.d(N,"appendFrame",function(){return n});var Q=O("./src/utils/logger.ts"),R=O("./src/errors.ts"),B=O("./src/events.ts");function D(s,u,p,S){var x,M,C,c,r=navigator.userAgent.toLowerCase(),a=S,A=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];x=((u[p+2]&192)>>>6)+1;var L=(u[p+2]&60)>>>2;if(L>A.length-1){s.trigger(B.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+L});return}return C=(u[p+2]&1)<<2,C|=(u[p+3]&192)>>>6,Q.logger.log("manifest codec:"+S+", ADTS type:"+x+", samplingIndex:"+L),/firefox/i.test(r)?L>=6?(x=5,c=new Array(4),M=L-3):(x=2,c=new Array(2),M=L):r.indexOf("android")!==-1?(x=2,c=new Array(2),M=L):(x=5,c=new Array(4),S&&(S.indexOf("mp4a.40.29")!==-1||S.indexOf("mp4a.40.5")!==-1)||!S&&L>=6?M=L-3:((S&&S.indexOf("mp4a.40.2")!==-1&&(L>=6&&C===1||/vivaldi/i.test(r))||!S&&C===1)&&(x=2,c=new Array(2)),M=L)),c[0]=x<<3,c[0]|=(L&14)>>1,c[1]|=(L&1)<<7,c[1]|=C<<3,x===5&&(c[1]|=(M&14)>>1,c[2]=(M&1)<<7,c[2]|=2<<2,c[3]=0),{config:c,samplerate:A[L],channelCount:C,codec:"mp4a.40."+x,manifestCodec:a}}function f(s,u){return s[u]===255&&(s[u+1]&246)===240}function b(s,u){return s[u+1]&1?7:9}function g(s,u){return(s[u+3]&3)<<11|s[u+4]<<3|(s[u+5]&224)>>>5}function i(s,u){return u+5<s.length}function l(s,u){return u+1<s.length&&f(s,u)}function v(s,u){return i(s,u)&&f(s,u)&&g(s,u)<=s.length-u}function h(s,u){if(l(s,u)){var p=b(s,u);if(u+p>=s.length)return!1;var S=g(s,u);if(S<=p)return!1;var x=u+S;return x===s.length||l(s,x)}return!1}function d(s,u,p,S,x){if(!s.samplerate){var M=D(u,p,S,x);if(!M)return;s.config=M.config,s.samplerate=M.samplerate,s.channelCount=M.channelCount,s.codec=M.codec,s.manifestCodec=M.manifestCodec,Q.logger.log("parsed codec:"+s.codec+", rate:"+M.samplerate+", channels:"+M.channelCount)}}function E(s){return 1024*9e4/s}function o(s,u,p,S,x){var M=b(s,u),C=g(s,u);if(C-=M,C>0){var c=p+S*x;return{headerLength:M,frameLength:C,stamp:c}}}function n(s,u,p,S,x){var M=E(s.samplerate),C=o(u,p,S,x,M);if(C){var c=C.frameLength,r=C.headerLength,a=C.stamp,A=r+c,L=Math.max(0,p+A-u.length),T;L?(T=new Uint8Array(A-r),T.set(u.subarray(p+r,u.length),0)):T=u.subarray(p+r,p+A);var w={unit:T,pts:a};return L||s.samples.push(w),{sample:w,length:A,missing:L}}}},"./src/demux/base-audio-demuxer.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"initPTSFn",function(){return g});var Q=O("./src/polyfills/number.ts"),R=O("./src/demux/id3.ts"),B=O("./src/demux/dummy-demuxed-track.ts"),D=O("./src/utils/mp4-tools.ts"),f=O("./src/utils/typed-array.ts"),b=function(){function i(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var l=i.prototype;return l.resetInitSegment=function(h,d,E){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},l.resetTimeStamp=function(){},l.resetContiguity=function(){},l.canParse=function(h,d){return!1},l.appendFrame=function(h,d,E){},l.demux=function(h,d){this.cachedData&&(h=Object(D.appendUint8Array)(this.cachedData,h),this.cachedData=null);var E=R.getID3Data(h,0),o=E?E.length:0,n,s,u=this._audioTrack,p=this._id3Track,S=E?R.getTimeStamp(E):void 0,x=h.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=g(S,d)),E&&E.length>0&&p.samples.push({pts:this.initPTS,dts:this.initPTS,data:E}),s=this.initPTS;o<x;){if(this.canParse(h,o)){var M=this.appendFrame(u,h,o);M?(this.frameIndex++,s=M.sample.pts,o+=M.length,n=o):o=x}else R.canParse(h,o)?(E=R.getID3Data(h,o),p.samples.push({pts:s,dts:s,data:E}),o+=E.length,n=o):o++;if(o===x&&n!==x){var C=Object(f.sliceUint8)(h,n);this.cachedData?this.cachedData=Object(D.appendUint8Array)(this.cachedData,C):this.cachedData=C}}return{audioTrack:u,avcTrack:Object(B.dummyTrack)(),id3Track:p,textTrack:Object(B.dummyTrack)()}},l.demuxSampleAes=function(h,d,E){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},l.flush=function(h){var d=this.cachedData;return d&&(this.cachedData=null,this.demux(d,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(B.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(B.dummyTrack)()}},l.destroy=function(){},i}(),g=function(l,v){return Object(Q.isFiniteNumber)(l)?l*90:v*9e4};N.default=b},"./src/demux/chunk-cache.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return Q});var Q=function(){function B(){this.chunks=[],this.dataLength=0}var D=B.prototype;return D.push=function(b){this.chunks.push(b),this.dataLength+=b.length},D.flush=function(){var b=this.chunks,g=this.dataLength,i;if(b.length)b.length===1?i=b[0]:i=R(b,g);else return new Uint8Array(0);return this.reset(),i},D.reset=function(){this.chunks.length=0,this.dataLength=0},B}();function R(B,D){for(var f=new Uint8Array(D),b=0,g=0;g<B.length;g++){var i=B[g];f.set(i,b),b+=i.length}return f}},"./src/demux/dummy-demuxed-track.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"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(J,N,O){"use strict";O.r(N);var Q=O("./src/utils/logger.ts"),R=function(){function B(f){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=f,this.bytesAvailable=f.byteLength,this.word=0,this.bitsAvailable=0}var D=B.prototype;return D.loadWord=function(){var b=this.data,g=this.bytesAvailable,i=b.byteLength-g,l=new Uint8Array(4),v=Math.min(4,g);if(v===0)throw new Error("no bytes available");l.set(b.subarray(i,i+v)),this.word=new DataView(l.buffer).getUint32(0),this.bitsAvailable=v*8,this.bytesAvailable-=v},D.skipBits=function(b){var g;this.bitsAvailable>b?(this.word<<=b,this.bitsAvailable-=b):(b-=this.bitsAvailable,g=b>>3,b-=g>>3,this.bytesAvailable-=g,this.loadWord(),this.word<<=b,this.bitsAvailable-=b)},D.readBits=function(b){var g=Math.min(this.bitsAvailable,b),i=this.word>>>32-g;return b>32&&Q.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=g,this.bitsAvailable>0?this.word<<=g:this.bytesAvailable>0&&this.loadWord(),g=b-g,g>0&&this.bitsAvailable?i<<g|this.readBits(g):i},D.skipLZ=function(){var b;for(b=0;b<this.bitsAvailable;++b)if((this.word&2147483648>>>b)!==0)return this.word<<=b,this.bitsAvailable-=b,b;return this.loadWord(),b+this.skipLZ()},D.skipUEG=function(){this.skipBits(1+this.skipLZ())},D.skipEG=function(){this.skipBits(1+this.skipLZ())},D.readUEG=function(){var b=this.skipLZ();return this.readBits(b+1)-1},D.readEG=function(){var b=this.readUEG();return 1&b?1+b>>>1:-1*(b>>>1)},D.readBoolean=function(){return this.readBits(1)===1},D.readUByte=function(){return this.readBits(8)},D.readUShort=function(){return this.readBits(16)},D.readUInt=function(){return this.readBits(32)},D.skipScalingList=function(b){for(var g=8,i=8,l,v=0;v<b;v++)i!==0&&(l=this.readEG(),i=(g+l+256)%256),g=i===0?g:i},D.readSPS=function(){var b=0,g=0,i=0,l=0,v,h,d,E=this.readUByte.bind(this),o=this.readBits.bind(this),n=this.readUEG.bind(this),s=this.readBoolean.bind(this),u=this.skipBits.bind(this),p=this.skipEG.bind(this),S=this.skipUEG.bind(this),x=this.skipScalingList.bind(this);E();var M=E();if(o(5),u(3),E(),S(),M===100||M===110||M===122||M===244||M===44||M===83||M===86||M===118||M===128){var C=n();if(C===3&&u(1),S(),S(),u(1),s())for(h=C!==3?8:12,d=0;d<h;d++)s()&&(d<6?x(16):x(64))}S();var c=n();if(c===0)n();else if(c===1)for(u(1),p(),p(),v=n(),d=0;d<v;d++)p();S(),u(1);var r=n(),a=n(),A=o(1);A===0&&u(1),u(1),s()&&(b=n(),g=n(),i=n(),l=n());var L=[1,1];if(s()&&s()){var T=E();switch(T){case 1:L=[1,1];break;case 2:L=[12,11];break;case 3:L=[10,11];break;case 4:L=[16,11];break;case 5:L=[40,33];break;case 6:L=[24,11];break;case 7:L=[20,11];break;case 8:L=[32,11];break;case 9:L=[80,33];break;case 10:L=[18,11];break;case 11:L=[15,11];break;case 12:L=[64,33];break;case 13:L=[160,99];break;case 14:L=[4,3];break;case 15:L=[3,2];break;case 16:L=[2,1];break;case 255:{L=[E()<<8|E(),E()<<8|E()];break}}}return{width:Math.ceil((r+1)*16-b*2-g*2),height:(2-A)*(a+1)*16-(A?2:4)*(i+l),pixelRatio:L}},D.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},B}();N.default=R},"./src/demux/id3.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"isHeader",function(){return Q}),O.d(N,"isFooter",function(){return R}),O.d(N,"getID3Data",function(){return B}),O.d(N,"canParse",function(){return f}),O.d(N,"getTimeStamp",function(){return b}),O.d(N,"isTimeStampFrame",function(){return g}),O.d(N,"getID3Frames",function(){return l}),O.d(N,"decodeFrame",function(){return v}),O.d(N,"utf8ArrayToStr",function(){return n}),O.d(N,"testables",function(){return s});var Q=function(x,M){return M+10<=x.length&&(x[M]===73&&x[M+1]===68&&x[M+2]===51&&(x[M+3]<255&&x[M+4]<255&&(x[M+6]<128&&x[M+7]<128&&x[M+8]<128&&x[M+9]<128)))},R=function(x,M){return M+10<=x.length&&(x[M]===51&&x[M+1]===68&&x[M+2]===73&&(x[M+3]<255&&x[M+4]<255&&(x[M+6]<128&&x[M+7]<128&&x[M+8]<128&&x[M+9]<128)))},B=function(x,M){for(var C=M,c=0;Q(x,M);){c+=10;var r=D(x,M+6);c+=r,R(x,M+10)&&(c+=10),M+=c}return c>0?x.subarray(C,C+c):void 0},D=function(x,M){var C=0;return C=(x[M]&127)<<21,C|=(x[M+1]&127)<<14,C|=(x[M+2]&127)<<7,C|=x[M+3]&127,C},f=function(x,M){return Q(x,M)&&D(x,M+6)+10<=x.length-M},b=function(x){for(var M=l(x),C=0;C<M.length;C++){var c=M[C];if(g(c))return o(c)}return},g=function(x){return x&&x.key==="PRIV"&&x.info==="com.apple.streaming.transportStreamTimestamp"},i=function(x){var M=String.fromCharCode(x[0],x[1],x[2],x[3]),C=D(x,4),c=10;return{type:M,size:C,data:x.subarray(c,c+C)}},l=function(x){for(var M=0,C=[];Q(x,M);){var c=D(x,M+6);M+=10;for(var r=M+c;M+8<r;){var a=i(x.subarray(M)),A=v(a);A&&C.push(A),M+=a.size+10}R(x,M)&&(M+=10)}return C},v=function(x){return x.type==="PRIV"?h(x):x.type[0]==="W"?E(x):d(x)},h=function(x){if(x.size<2)return;var M=n(x.data,!0),C=new Uint8Array(x.data.subarray(M.length+1));return{key:x.type,info:M,data:C.buffer}},d=function(x){if(x.size<2)return;if(x.type==="TXXX"){var M=1,C=n(x.data.subarray(M),!0);M+=C.length+1;var c=n(x.data.subarray(M));return{key:x.type,info:C,data:c}}var r=n(x.data.subarray(1));return{key:x.type,data:r}},E=function(x){if(x.type==="WXXX"){if(x.size<2)return;var M=1,C=n(x.data.subarray(M),!0);M+=C.length+1;var c=n(x.data.subarray(M));return{key:x.type,info:C,data:c}}var r=n(x.data);return{key:x.type,data:r}},o=function(x){if(x.data.byteLength===8){var M=new Uint8Array(x.data),C=M[3]&1,c=(M[4]<<23)+(M[5]<<15)+(M[6]<<7)+M[7];return c/=45,C&&(c+=4772185884e-2),Math.round(c)}return},n=function(x,M){M===void 0&&(M=!1);var C=p();if(C){var c=C.decode(x);if(M){var r=c.indexOf("\0");return r!==-1?c.substring(0,r):c}return c.replace(/\0/g,"")}for(var a=x.length,A,L,T,w="",_=0;_<a;){if(A=x[_++],A===0&&M)return w;if(A===0||A===3)continue;switch(A>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:w+=String.fromCharCode(A);break;case 12:case 13:L=x[_++],w+=String.fromCharCode((A&31)<<6|L&63);break;case 14:L=x[_++],T=x[_++],w+=String.fromCharCode((A&15)<<12|(L&63)<<6|(T&63)<<0);break;default:}}return w},s={decodeTextFrame:d},u;function p(){return!u&&typeof self.TextDecoder!="undefined"&&(u=new self.TextDecoder("utf-8")),u}},"./src/demux/mp3demuxer.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/demux/base-audio-demuxer.ts"),R=O("./src/demux/id3.ts"),B=O("./src/utils/logger.ts"),D=O("./src/demux/mpegaudio.ts");function f(i,l){i.prototype=Object.create(l.prototype),i.prototype.constructor=i,b(i,l)}function b(i,l){return b=Object.setPrototypeOf||function(h,d){return h.__proto__=d,h},b(i,l)}var g=function(i){f(l,i);function l(){return i.apply(this,arguments)||this}var v=l.prototype;return v.resetInitSegment=function(d,E,o){i.prototype.resetInitSegment.call(this,d,E,o),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:d,duration:o,inputTimeScale:9e4,dropped:0}},l.probe=function(d){if(!d)return!1;for(var E=R.getID3Data(d,0)||[],o=E.length,n=d.length;o<n;o++)if(D.probe(d,o))return B.logger.log("MPEG Audio sync word found !"),!0;return!1},v.canParse=function(d,E){return D.canParse(d,E)},v.appendFrame=function(d,E,o){return this.initPTS===null?void 0:D.appendFrame(d,E,o,this.initPTS,this.frameIndex)},l}(Q.default);g.minProbeByteLength=4,N.default=g},"./src/demux/mp4demuxer.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/utils/mp4-tools.ts"),R=O("./src/demux/dummy-demuxed-track.ts"),B=function(){function D(b,g){this.remainderData=null,this.config=void 0,this.config=g}var f=D.prototype;return f.resetTimeStamp=function(){},f.resetInitSegment=function(){},f.resetContiguity=function(){},D.probe=function(g){return Object(Q.findBox)({data:g,start:0,end:Math.min(g.length,16384)},["moof"]).length>0},f.demux=function(g){var i=g,l=Object(R.dummyTrack)();if(this.config.progressive){this.remainderData&&(i=Object(Q.appendUint8Array)(this.remainderData,g));var v=Object(Q.segmentValidRange)(i);this.remainderData=v.remainder,l.samples=v.valid||new Uint8Array}else l.samples=i;return{audioTrack:Object(R.dummyTrack)(),avcTrack:l,id3Track:Object(R.dummyTrack)(),textTrack:Object(R.dummyTrack)()}},f.flush=function(){var g=Object(R.dummyTrack)();return g.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(R.dummyTrack)(),avcTrack:g,id3Track:Object(R.dummyTrack)(),textTrack:Object(R.dummyTrack)()}},f.demuxSampleAes=function(g,i,l){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},f.destroy=function(){},D}();B.minProbeByteLength=1024,N.default=B},"./src/demux/mpegaudio.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"appendFrame",function(){return b}),O.d(N,"parseHeader",function(){return g}),O.d(N,"isHeaderPattern",function(){return i}),O.d(N,"isHeader",function(){return l}),O.d(N,"canParse",function(){return v}),O.d(N,"probe",function(){return h});var Q=null,R=[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],B=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],D=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],f=[0,1,1,4];function b(d,E,o,n,s){if(o+24>E.length)return;var u=g(E,o);if(u&&o+u.frameLength<=E.length){var p=u.samplesPerFrame*9e4/u.sampleRate,S=n+s*p,x={unit:E.subarray(o,o+u.frameLength),pts:S,dts:S};return d.config=[],d.channelCount=u.channelCount,d.samplerate=u.sampleRate,d.samples.push(x),{sample:x,length:u.frameLength,missing:0}}}function g(d,E){var o=d[E+1]>>3&3,n=d[E+1]>>1&3,s=d[E+2]>>4&15,u=d[E+2]>>2&3;if(o!==1&&s!==0&&s!==15&&u!==3){var p=d[E+2]>>1&1,S=d[E+3]>>6,x=o===3?3-n:n===3?3:4,M=R[x*14+s-1]*1e3,C=o===3?0:o===2?1:2,c=B[C*3+u],r=S===3?1:2,a=D[o][n],A=f[n],L=a*8*A,T=Math.floor(a*M/c+p)*A;if(Q===null){var w=navigator.userAgent||"",_=w.match(/Chrome\/(\d+)/i);Q=_?parseInt(_[1]):0}var j=!!Q&&Q<=87;return j&&n===2&&M>=224e3&&S===0&&(d[E+3]=d[E+3]|128),{sampleRate:c,channelCount:r,frameLength:T,samplesPerFrame:L}}}function i(d,E){return d[E]===255&&(d[E+1]&224)===224&&(d[E+1]&6)!==0}function l(d,E){return E+1<d.length&&i(d,E)}function v(d,E){var o=4;return i(d,E)&&o<=d.length-E}function h(d,E){if(E+1<d.length&&i(d,E)){var o=4,n=g(d,E),s=o;n!=null&&n.frameLength&&(s=n.frameLength);var u=E+s;return u===d.length||l(d,u)}return!1}},"./src/demux/sample-aes.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/crypt/decrypter.ts"),R=O("./src/demux/tsdemuxer.ts"),B=function(){function D(b,g,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new Q.default(b,g,{removePKCS7Padding:!1})}var f=D.prototype;return f.decryptBuffer=function(g,i){this.decrypter.decrypt(g,this.keyData.key.buffer,this.keyData.iv.buffer,i)},f.decryptAacSample=function(g,i,l,v){var h=g[i].unit,d=h.subarray(16,h.length-h.length%16),E=d.buffer.slice(d.byteOffset,d.byteOffset+d.length),o=this;this.decryptBuffer(E,function(n){var s=new Uint8Array(n);h.set(s,16),v||o.decryptAacSamples(g,i+1,l)})},f.decryptAacSamples=function(g,i,l){for(;;i++){if(i>=g.length){l();return}if(g[i].unit.length<32)continue;var v=this.decrypter.isSync();if(this.decryptAacSample(g,i,l,v),!v)return}},f.getAvcEncryptedData=function(g){for(var i=Math.floor((g.length-48)/160)*16+16,l=new Int8Array(i),v=0,h=32;h<=g.length-16;h+=160,v+=16)l.set(g.subarray(h,h+16),v);return l},f.getAvcDecryptedUnit=function(g,i){for(var l=new Uint8Array(i),v=0,h=32;h<=g.length-16;h+=160,v+=16)g.set(l.subarray(v,v+16),h);return g},f.decryptAvcSample=function(g,i,l,v,h,d){var E=Object(R.discardEPB)(h.data),o=this.getAvcEncryptedData(E),n=this;this.decryptBuffer(o.buffer,function(s){h.data=n.getAvcDecryptedUnit(E,s),d||n.decryptAvcSamples(g,i,l+1,v)})},f.decryptAvcSamples=function(g,i,l,v){if(g instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;i++,l=0){if(i>=g.length){v();return}for(var h=g[i].units;!(l>=h.length);l++){var d=h[l];if(d.data.length<=48||d.type!==1&&d.type!==5)continue;var E=this.decrypter.isSync();if(this.decryptAvcSample(g,i,l,v,d,E),!E)return}}},D}();N.default=B},"./src/demux/transmuxer-interface.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return h});var Q=O("./node_modules/webworkify-webpack/index.js"),R=O.n(Q),B=O("./src/events.ts"),D=O("./src/demux/transmuxer.ts"),f=O("./src/utils/logger.ts"),b=O("./src/errors.ts"),g=O("./src/utils/mediasource-helper.ts"),i=O("./node_modules/eventemitter3/index.js"),l=O.n(i),v=Object(g.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function d(o,n,s,u){var p=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=o,this.id=n,this.onTransmuxComplete=s,this.onFlush=u;var S=o.config,x=function(a,A){A=A||{},A.frag=p.frag,A.id=p.id,o.trigger(a,A)};this.observer=new i.EventEmitter,this.observer.on(B.Events.FRAG_DECRYPTED,x),this.observer.on(B.Events.ERROR,x);var M={mp4:v.isTypeSupported("video/mp4"),mpeg:v.isTypeSupported("audio/mpeg"),mp3:v.isTypeSupported('audio/mp4; codecs="mp3"')},C=navigator.vendor;if(S.enableWorker&&typeof Worker!="undefined"){f.logger.log("demuxing in webworker");var c;try{c=this.worker=Q("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),c.addEventListener("message",this.onwmsg),c.onerror=function(r){o.trigger(B.Events.ERROR,{type:b.ErrorTypes.OTHER_ERROR,details:b.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(r.message+" ("+r.filename+":"+r.lineno+")")})},c.postMessage({cmd:"init",typeSupported:M,vendor:C,id:n,config:JSON.stringify(S)})}catch(r){f.logger.warn("Error in worker:",r),f.logger.error("Error while initializing DemuxerWorker, fallback to inline"),c&&self.URL.revokeObjectURL(c.objectURL),this.transmuxer=new D.default(this.observer,M,S,C,n),this.worker=null}}else this.transmuxer=new D.default(this.observer,M,S,C,n)}var E=d.prototype;return E.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var u=this.observer;u&&u.removeAllListeners(),this.observer=null},E.push=function(n,s,u,p,S,x,M,C,c,r){var a=this;c.transmuxing.start=self.performance.now();var A=this.transmuxer,L=this.worker,T=x?x.start:S.start,w=S.decryptdata,_=this.frag,j=!(_&&S.cc===_.cc),W=!(_&&c.level===_.level),Z=_?c.sn-_.sn:-1,X=this.part?c.part-this.part.index:1,G=!W&&(Z===1||Z===0&&X===1),te=self.performance.now();(W||Z||S.stats.parsing.start===0)&&(S.stats.parsing.start=te),x&&(X||!G)&&(x.stats.parsing.start=te);var Y=new D.TransmuxState(j,G,C,W,T);if(!G||j){f.logger.log("[transmuxer-interface, "+S.type+"]: Starting new transmux session for sn: "+c.sn+" p: "+c.part+" level: "+c.level+" id: "+c.id+`
|
|
discontinuity: `+j+`
|
|
trackSwitch: `+W+`
|
|
contiguous: `+G+`
|
|
accurateTimeOffset: `+C+`
|
|
timeOffset: `+T);var le=new D.TransmuxConfig(u,p,s,M,r);this.configureTransmuxer(le)}if(this.frag=S,this.part=x,L)L.postMessage({cmd:"demux",data:n,decryptdata:w,chunkMeta:c,state:Y},n instanceof ArrayBuffer?[n]:[]);else if(A){var Ae=A.push(n,w,c,Y);Object(D.isPromise)(Ae)?Ae.then(function(Be){a.handleTransmuxComplete(Be)}):this.handleTransmuxComplete(Ae)}},E.flush=function(n){var s=this;n.transmuxing.start=self.performance.now();var u=this.transmuxer,p=this.worker;if(p)p.postMessage({cmd:"flush",chunkMeta:n});else if(u){var S=u.flush(n);Object(D.isPromise)(S)?S.then(function(x){s.handleFlushResult(x,n)}):this.handleFlushResult(S,n)}},E.handleFlushResult=function(n,s){var u=this;n.forEach(function(p){u.handleTransmuxComplete(p)}),this.onFlush(s)},E.onWorkerMessage=function(n){var s=n.data,u=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,u.trigger(s.event,s.data);break}}},E.configureTransmuxer=function(n){var s=this.worker,u=this.transmuxer;s?s.postMessage({cmd:"configure",config:n}):u&&u.configure(n)},E.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},d}()},"./src/demux/transmuxer-worker.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return b});var Q=O("./src/demux/transmuxer.ts"),R=O("./src/events.ts"),B=O("./src/utils/logger.ts"),D=O("./node_modules/eventemitter3/index.js"),f=O.n(D);function b(h){var d=new D.EventEmitter,E=function(n,s){h.postMessage({event:n,data:s})};d.on(R.Events.FRAG_DECRYPTED,E),d.on(R.Events.ERROR,E),h.addEventListener("message",function(o){var n=o.data;switch(n.cmd){case"init":{var s=JSON.parse(n.config);h.transmuxer=new Q.default(d,n.typeSupported,s,n.vendor,n.id),Object(B.enableLogs)(s.debug),E("init",null);break}case"configure":{h.transmuxer.configure(n.config);break}case"demux":{var u=h.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(Q.isPromise)(u)?u.then(function(x){g(h,x)}):g(h,u);break}case"flush":{var p=n.chunkMeta,S=h.transmuxer.flush(p);Object(Q.isPromise)(S)?S.then(function(x){l(h,x,p)}):l(h,S,p);break}default:break}})}function g(h,d){if(v(d.remuxResult))return;var E=[],o=d.remuxResult,n=o.audio,s=o.video;n&&i(E,n),s&&i(E,s),h.postMessage({event:"transmuxComplete",data:d},E)}function i(h,d){d.data1&&h.push(d.data1.buffer),d.data2&&h.push(d.data2.buffer)}function l(h,d,E){d.forEach(function(o){g(h,o)}),h.postMessage({event:"flush",data:E})}function v(h){return!h.audio&&!h.video&&!h.text&&!h.id3&&!h.initSegment}},"./src/demux/transmuxer.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return s}),O.d(N,"isPromise",function(){return S}),O.d(N,"TransmuxConfig",function(){return x}),O.d(N,"TransmuxState",function(){return M});var Q=O("./src/events.ts"),R=O("./src/errors.ts"),B=O("./src/crypt/decrypter.ts"),D=O("./src/demux/aacdemuxer.ts"),f=O("./src/demux/mp4demuxer.ts"),b=O("./src/demux/tsdemuxer.ts"),g=O("./src/demux/mp3demuxer.ts"),i=O("./src/remux/mp4-remuxer.ts"),l=O("./src/remux/passthrough-remuxer.ts"),v=O("./src/demux/chunk-cache.ts"),h=O("./src/utils/mp4-tools.ts"),d=O("./src/utils/logger.ts"),E;try{E=self.performance.now.bind(self.performance)}catch(C){d.logger.debug("Unable to use Performance API on this environment"),E=self.Date.now}var o=[{demux:b.default,remux:i.default},{demux:f.default,remux:l.default},{demux:D.default,remux:i.default},{demux:g.default,remux:i.default}],n=1024;o.forEach(function(C){var c=C.demux;n=Math.max(n,c.minProbeByteLength)});var s=function(){function C(r,a,A,L,T){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 v.default,this.observer=r,this.typeSupported=a,this.config=A,this.vendor=L,this.id=T}var c=C.prototype;return c.configure=function(a){this.transmuxConfig=a,this.decrypter&&this.decrypter.reset()},c.push=function(a,A,L,T){var w=this,_=L.transmuxing;_.executeStart=E();var j=new Uint8Array(a),W=this.cache,Z=this.config,X=this.currentTransmuxState,G=this.transmuxConfig;T&&(this.currentTransmuxState=T);var te=u(j,A);if(te&&te.method==="AES-128"){var Y=this.getDecrypter();if(Z.enableSoftwareAES){var le=Y.softwareDecrypt(j,te.key.buffer,te.iv.buffer);if(!le)return _.executeEnd=E(),p(L);j=new Uint8Array(le)}else return this.decryptionPromise=Y.webCryptoDecrypt(j,te.key.buffer,te.iv.buffer).then(function($){var re=w.push($,null,L);return w.decryptionPromise=null,re}),this.decryptionPromise}var Ae=T||X,Be=Ae.contiguous,Ce=Ae.discontinuity,Se=Ae.trackSwitch,Fe=Ae.accurateTimeOffset,Ve=Ae.timeOffset,De=G.audioCodec,Le=G.videoCodec,tt=G.defaultInitPts,Et=G.duration,Ie=G.initSegmentData;if((Ce||Se)&&this.resetInitSegment(Ie,De,Le,Et),Ce&&this.resetInitialTimestamp(tt),Be||this.resetContiguity(),this.needsProbing(j,Ce,Se)){if(W.dataLength){var Qe=W.flush();j=Object(h.appendUint8Array)(Qe,j)}this.configureTransmuxer(j,G)}var xe=this.transmux(j,te,Ve,Fe,L),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,_.executeEnd=E(),xe},c.flush=function(a){var A=this,L=a.transmuxing;L.executeStart=E();var T=this.decrypter,w=this.cache,_=this.currentTransmuxState,j=this.decryptionPromise;if(j)return j.then(function(){return A.flush(a)});var W=[],Z=_.timeOffset;if(T){var X=T.flush();X&&W.push(this.push(X,null,a))}var G=w.dataLength;w.reset();var te=this.demuxer,Y=this.remuxer;if(!te||!Y)return G>=n&&this.observer.emit(Q.Events.ERROR,Q.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),L.executeEnd=E(),[p(a)];var le=te.flush(Z);return S(le)?le.then(function(Ae){return A.flushRemux(W,Ae,a),W}):(this.flushRemux(W,le,a),W)},c.flushRemux=function(a,A,L){var T=A.audioTrack,w=A.avcTrack,_=A.id3Track,j=A.textTrack,W=this.currentTransmuxState,Z=W.accurateTimeOffset,X=W.timeOffset;d.logger.log("[transmuxer.ts]: Flushed fragment "+L.sn+(L.part>-1?" p: "+L.part:"")+" of level "+L.level);var G=this.remuxer.remux(T,w,_,j,X,Z,!0,this.id);a.push({remuxResult:G,chunkMeta:L}),L.transmuxing.executeEnd=E()},c.resetInitialTimestamp=function(a){var A=this.demuxer,L=this.remuxer;if(!A||!L)return;A.resetTimeStamp(a),L.resetTimeStamp(a)},c.resetContiguity=function(){var a=this.demuxer,A=this.remuxer;if(!a||!A)return;a.resetContiguity(),A.resetNextTimestamp()},c.resetInitSegment=function(a,A,L,T){var w=this.demuxer,_=this.remuxer;if(!w||!_)return;w.resetInitSegment(A,L,T),_.resetInitSegment(a,A,L)},c.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},c.transmux=function(a,A,L,T,w){var _;return A&&A.method==="SAMPLE-AES"?_=this.transmuxSampleAes(a,A,L,T,w):_=this.transmuxUnencrypted(a,L,T,w),_},c.transmuxUnencrypted=function(a,A,L,T){var w=this.demuxer.demux(a,A,!1,!this.config.progressive),_=w.audioTrack,j=w.avcTrack,W=w.id3Track,Z=w.textTrack,X=this.remuxer.remux(_,j,W,Z,A,L,!1,this.id);return{remuxResult:X,chunkMeta:T}},c.transmuxSampleAes=function(a,A,L,T,w){var _=this;return this.demuxer.demuxSampleAes(a,A,L).then(function(j){var W=_.remuxer.remux(j.audioTrack,j.avcTrack,j.id3Track,j.textTrack,L,T,!1,_.id);return{remuxResult:W,chunkMeta:w}})},c.configureTransmuxer=function(a,A){for(var L=this.config,T=this.observer,w=this.typeSupported,_=this.vendor,j=A.audioCodec,W=A.defaultInitPts,Z=A.duration,X=A.initSegmentData,G=A.videoCodec,te,Y=0,le=o.length;Y<le;Y++)if(o[Y].demux.probe(a)){te=o[Y];break}te||(d.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),te={demux:f.default,remux:l.default});var Ae=this.demuxer,Be=this.remuxer,Ce=te.remux,Se=te.demux;(!Be||!(Be instanceof Ce))&&(this.remuxer=new Ce(T,L,w,_)),(!Ae||!(Ae instanceof Se))&&(this.demuxer=new Se(T,L,w),this.probe=Se.probe),this.resetInitSegment(X,j,G,Z),this.resetInitialTimestamp(W)},c.needsProbing=function(a,A,L){return!this.demuxer||!this.remuxer||A||L},c.getDecrypter=function(){var a=this.decrypter;return a||(a=this.decrypter=new B.default(this.observer,this.config)),a},C}();function u(C,c){var r=null;return C.byteLength>0&&c!=null&&c.key!=null&&c.iv!==null&&c.method!=null&&(r=c),r}var p=function(c){return{remuxResult:{},chunkMeta:c}};function S(C){return"then"in C&&C.then instanceof Function}var x=function(c,r,a,A,L){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=c,this.videoCodec=r,this.initSegmentData=a,this.duration=A,this.defaultInitPts=L},M=function(c,r,a,A,L){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=c,this.contiguous=r,this.accurateTimeOffset=a,this.trackSwitch=A,this.timeOffset=L}},"./src/demux/tsdemuxer.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"discardEPB",function(){return p});var Q=O("./src/demux/adts.ts"),R=O("./src/demux/mpegaudio.ts"),B=O("./src/demux/exp-golomb.ts"),D=O("./src/demux/id3.ts"),f=O("./src/demux/sample-aes.ts"),b=O("./src/events.ts"),g=O("./src/utils/mp4-tools.ts"),i=O("./src/utils/logger.ts"),l=O("./src/errors.ts"),v={video:1,audio:2,id3:3,text:4},h=function(){function S(M,C,c){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=M,this.config=C,this.typeSupported=c}S.probe=function(C){var c=S.syncOffset(C);return c<0?!1:(c&&i.logger.warn("MPEG2-TS detected but first sync word found @ offset "+c+", junk ahead ?"),!0)},S.syncOffset=function(C){for(var c=Math.min(1e3,C.length-3*188),r=0;r<c;){if(C[r]===71&&C[r+188]===71&&C[r+2*188]===71)return r;r++}return-1},S.createTrack=function(C,c){return{container:C==="video"||C==="audio"?"video/mp2t":void 0,type:C,id:v[C],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:C==="audio"?c:void 0}};var x=S.prototype;return x.resetInitSegment=function(C,c,r){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=S.createTrack("video",r),this._audioTrack=S.createTrack("audio",r),this._id3Track=S.createTrack("id3",r),this._txtTrack=S.createTrack("text",r),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=C,this.videoCodec=c,this._duration=r},x.resetTimeStamp=function(){},x.resetContiguity=function(){var C=this._audioTrack,c=this._avcTrack,r=this._id3Track;C&&(C.pesData=null),c&&(c.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},x.demux=function(C,c,r,a){r===void 0&&(r=!1),a===void 0&&(a=!1),r||(this.sampleAes=null);var A,L=this._avcTrack,T=this._audioTrack,w=this._id3Track,_=L.pid,j=L.pesData,W=T.pid,Z=w.pid,X=T.pesData,G=w.pesData,te=!1,Y=this.pmtParsed,le=this._pmtId,Ae=C.length;if(this.remainderData&&(C=Object(g.appendUint8Array)(this.remainderData,C),Ae=C.length,this.remainderData=null),Ae<188&&!a)return this.remainderData=C,{audioTrack:T,avcTrack:L,id3Track:w,textTrack:this._txtTrack};var Be=Math.max(0,S.syncOffset(C));Ae-=(Ae+Be)%188,Ae<C.byteLength&&!a&&(this.remainderData=new Uint8Array(C.buffer,Ae,C.buffer.byteLength-Ae));for(var Ce=Be;Ce<Ae;Ce+=188)if(C[Ce]===71){var Se=!!(C[Ce+1]&64),Fe=((C[Ce+1]&31)<<8)+C[Ce+2],Ve=(C[Ce+3]&48)>>4,De=void 0;if(Ve>1){if(De=Ce+5+C[Ce+4],De===Ce+188)continue}else De=Ce+4;switch(Fe){case _:Se&&(j&&(A=n(j))&&this.parseAVCPES(A,!1),j={data:[],size:0}),j&&(j.data.push(C.subarray(De,Ce+188)),j.size+=Ce+188-De);break;case W:Se&&(X&&(A=n(X))&&(T.isAAC?this.parseAACPES(A):this.parseMPEGPES(A)),X={data:[],size:0}),X&&(X.data.push(C.subarray(De,Ce+188)),X.size+=Ce+188-De);break;case Z:Se&&(G&&(A=n(G))&&this.parseID3PES(A),G={data:[],size:0}),G&&(G.data.push(C.subarray(De,Ce+188)),G.size+=Ce+188-De);break;case 0:Se&&(De+=C[De]+1),le=this._pmtId=E(C,De);break;case le:{Se&&(De+=C[De]+1);var Le=o(C,De,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,r);_=Le.avc,_>0&&(L.pid=_),W=Le.audio,W>0&&(T.pid=W,T.isAAC=Le.isAAC),Z=Le.id3,Z>0&&(w.pid=Z),te&&!Y&&(i.logger.log("reparse from beginning"),te=!1,Ce=Be-188),Y=this.pmtParsed=!0;break}case 17:case 8191:break;default:te=!0;break}}else this.observer.emit(b.Events.ERROR,b.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});L.pesData=j,T.pesData=X,w.pesData=G;var tt={audioTrack:T,avcTrack:L,id3Track:w,textTrack:this._txtTrack};return a&&this.extractRemainingSamples(tt),tt},x.flush=function(){var C=this.remainderData;this.remainderData=null;var c;return C?c=this.demux(C,-1,!1,!0):c={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(c),this.sampleAes?this.decrypt(c,this.sampleAes):c},x.extractRemainingSamples=function(C){var c=C.audioTrack,r=C.avcTrack,a=C.id3Track,A=r.pesData,L=c.pesData,T=a.pesData,w;A&&(w=n(A))?(this.parseAVCPES(w,!0),r.pesData=null):r.pesData=A,L&&(w=n(L))?(c.isAAC?this.parseAACPES(w):this.parseMPEGPES(w),c.pesData=null):(L!=null&&L.size&&i.logger.log("last AAC PES packet truncated,might overlap between fragments"),c.pesData=L),T&&(w=n(T))?(this.parseID3PES(w),a.pesData=null):a.pesData=T},x.demuxSampleAes=function(C,c,r){var a=this.demux(C,r,!0,!this.config.progressive),A=this.sampleAes=new f.default(this.observer,this.config,c);return this.decrypt(a,A)},x.decrypt=function(C,c){return new Promise(function(r){var a=C.audioTrack,A=C.avcTrack;a.samples&&a.isAAC?c.decryptAacSamples(a.samples,0,function(){A.samples?c.decryptAvcSamples(A.samples,0,0,function(){r(C)}):r(C)}):A.samples&&c.decryptAvcSamples(A.samples,0,0,function(){r(C)})})},x.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},x.parseAVCPES=function(C,c){var r=this,a=this._avcTrack,A=this.parseAVCNALu(C.data),L=!1,T=this.avcSample,w,_=!1;C.data=null,T&&A.length&&!a.audFound&&(s(T,a),T=this.avcSample=d(!1,C.pts,C.dts,"")),A.forEach(function(j){switch(j.type){case 1:{w=!0,T||(T=r.avcSample=d(!0,C.pts,C.dts,"")),L&&(T.debug+="NDR "),T.frame=!0;var W=j.data;if(_&&W.length>4){var Z=new B.default(W).readSliceType();(Z===2||Z===4||Z===7||Z===9)&&(T.key=!0)}break}case 5:w=!0,T||(T=r.avcSample=d(!0,C.pts,C.dts,"")),L&&(T.debug+="IDR "),T.key=!0,T.frame=!0;break;case 6:{w=!0,L&&T&&(T.debug+="SEI ");var X=new B.default(p(j.data));X.readUByte();for(var G=0,te=0,Y=!1,le=0;!Y&&X.bytesAvailable>1;){G=0;do le=X.readUByte(),G+=le;while(le===255);te=0;do le=X.readUByte(),te+=le;while(le===255);if(G===4&&X.bytesAvailable!==0){Y=!0;var Ae=X.readUByte();if(Ae===181){var Be=X.readUShort();if(Be===49){var Ce=X.readUInt();if(Ce===1195456820){var Se=X.readUByte();if(Se===3){for(var Fe=X.readUByte(),Ve=X.readUByte(),De=31&Fe,Le=[Fe,Ve],tt=0;tt<De;tt++)Le.push(X.readUByte()),Le.push(X.readUByte()),Le.push(X.readUByte());u(r._txtTrack.samples,{type:3,pts:C.pts,bytes:Le})}}}}}else if(G===5&&X.bytesAvailable!==0){if(Y=!0,te>16){for(var Et=[],Ie=0;Ie<16;Ie++)Et.push(X.readUByte().toString(16)),(Ie===3||Ie===5||Ie===7||Ie===9)&&Et.push("-");for(var Qe=te-16,xe=new Uint8Array(Qe),ie=0;ie<Qe;ie++)xe[ie]=X.readUByte();u(r._txtTrack.samples,{pts:C.pts,payloadType:G,uuid:Et.join(""),userData:Object(D.utf8ArrayToStr)(xe),userDataBytes:xe})}}else if(te<X.bytesAvailable)for(var $=0;$<te;$++)X.readUByte()}break}case 7:if(w=!0,_=!0,L&&T&&(T.debug+="SPS "),!a.sps){var re=new B.default(j.data),ce=re.readSPS();a.width=ce.width,a.height=ce.height,a.pixelRatio=ce.pixelRatio,a.sps=[j.data],a.duration=r._duration;for(var be=j.data.subarray(1,4),Me="avc1.",ke=0;ke<3;ke++){var ct=be[ke].toString(16);ct.length<2&&(ct="0"+ct),Me+=ct}a.codec=Me}break;case 8:w=!0,L&&T&&(T.debug+="PPS "),a.pps||(a.pps=[j.data]);break;case 9:w=!1,a.audFound=!0,T&&s(T,a),T=r.avcSample=d(!1,C.pts,C.dts,L?"AUD ":"");break;case 12:w=!1;break;default:w=!1,T&&(T.debug+="unknown NAL "+j.type+" ");break}if(T&&w){var ut=T.units;ut.push(j)}}),c&&T&&(s(T,a),this.avcSample=null)},x.getLastNalUnit=function(){var C,c=this.avcSample,r;if(!c||c.units.length===0){var a=this._avcTrack.samples;c=a[a.length-1]}if((C=c)!==null&&C!==void 0&&C.units){var A=c.units;r=A[A.length-1]}return r},x.parseAVCNALu=function(C){var c=C.byteLength,r=this._avcTrack,a=r.naluState||0,A=a,L=[],T=0,w,_,j,W=-1,Z=0;for(a===-1&&(W=0,Z=C[0]&31,a=0,T=1);T<c;){if(w=C[T++],!a){a=w?0:1;continue}if(a===1){a=w?0:2;continue}if(!w)a=3;else if(w===1){if(W>=0){var X={data:C.subarray(W,T-a-1),type:Z};L.push(X)}else{var G=this.getLastNalUnit();if(G&&(A&&T<=4-A&&(G.state&&(G.data=G.data.subarray(0,G.data.byteLength-A))),_=T-a-1,_>0)){var te=new Uint8Array(G.data.byteLength+_);te.set(G.data,0),te.set(C.subarray(0,_),G.data.byteLength),G.data=te,G.state=0}}T<c?(j=C[T]&31,W=T,Z=j,a=0):a=-1}else a=0}if(W>=0&&a>=0){var Y={data:C.subarray(W,c),type:Z,state:a};L.push(Y)}if(L.length===0){var le=this.getLastNalUnit();if(le){var Ae=new Uint8Array(le.data.byteLength+C.byteLength);Ae.set(le.data,0),Ae.set(C,le.data.byteLength),le.data=Ae}}return r.naluState=a,L},x.parseAACPES=function(C){var c=0,r=this._audioTrack,a=this.aacOverFlow,A=C.data;if(a){this.aacOverFlow=null;var L=a.sample.unit.byteLength,T=Math.min(a.missing,L),w=L-T;a.sample.unit.set(A.subarray(0,T),w),r.samples.push(a.sample),c=a.missing}var _,j;for(_=c,j=A.length;_<j-1&&!Q.isHeader(A,_);_++);if(_!==c){var W,Z;if(_<j-1?(W="AAC PES did not start with ADTS header,offset:"+_,Z=!1):(W="no ADTS header found in AAC PES",Z=!0),i.logger.warn("parsing error:"+W),this.observer.emit(b.Events.ERROR,b.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:Z,reason:W}),Z)return}Q.initTrackConfig(r,this.observer,A,_,this.audioCodec);var X;if(C.pts!==void 0)X=C.pts;else if(a){var G=Q.getFrameDuration(r.samplerate);X=a.sample.pts+G}else{i.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var te=0;_<j;)if(Q.isHeader(A,_)){if(_+5<j){var Y=Q.appendFrame(r,A,_,X,te);if(Y)if(Y.missing)this.aacOverFlow=Y;else{_+=Y.length,te++;continue}}break}else _++},x.parseMPEGPES=function(C){var c=C.data,r=c.length,a=0,A=0,L=C.pts;if(L===void 0){i.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;A<r;)if(R.isHeader(c,A)){var T=R.appendFrame(this._audioTrack,c,A,L,a);if(T)A+=T.length,a++;else break}else A++},x.parseID3PES=function(C){if(C.pts===void 0){i.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(C)},S}();h.minProbeByteLength=188;function d(S,x,M,C){return{key:S,frame:!1,pts:x,dts:M,units:[],debug:C,length:0}}function E(S,x){return(S[x+10]&31)<<8|S[x+11]}function o(S,x,M,C){var c={audio:-1,avc:-1,id3:-1,isAAC:!0},r=(S[x+1]&15)<<8|S[x+2],a=x+3+r-4,A=(S[x+10]&15)<<8|S[x+11];for(x+=12+A;x<a;){var L=(S[x+1]&31)<<8|S[x+2];switch(S[x]){case 207:if(!C){i.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:c.audio===-1&&(c.audio=L);break;case 21:c.id3===-1&&(c.id3=L);break;case 219:if(!C){i.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:c.avc===-1&&(c.avc=L);break;case 3:case 4:M?c.audio===-1&&(c.audio=L,c.isAAC=!1):i.logger.log("MPEG audio found, not supported in this browser");break;case 36:i.logger.warn("Unsupported HEVC stream type found");break;default:break}x+=((S[x+3]&15)<<8|S[x+4])+5}return c}function n(S){var x=0,M,C,c,r,a,A=S.data;if(!S||S.size===0)return null;for(;A[0].length<19&&A.length>1;){var L=new Uint8Array(A[0].length+A[1].length);L.set(A[0]),L.set(A[1],A[0].length),A[0]=L,A.splice(1,1)}M=A[0];var T=(M[0]<<16)+(M[1]<<8)+M[2];if(T===1){if(C=(M[4]<<8)+M[5],C&&C>S.size-6)return null;var w=M[7];w&192&&(r=(M[9]&14)*536870912+(M[10]&255)*4194304+(M[11]&254)*16384+(M[12]&255)*128+(M[13]&254)/2,w&64?(a=(M[14]&14)*536870912+(M[15]&255)*4194304+(M[16]&254)*16384+(M[17]&255)*128+(M[18]&254)/2,r-a>60*9e4&&(i.logger.warn(Math.round((r-a)/9e4)+"s delta between PTS and DTS, align them"),r=a)):a=r),c=M[8];var _=c+9;if(S.size<=_)return null;S.size-=_;for(var j=new Uint8Array(S.size),W=0,Z=A.length;W<Z;W++){M=A[W];var X=M.byteLength;if(_)if(_>X){_-=X;continue}else M=M.subarray(_),X-=_,_=0;j.set(M,x),x+=X}return C&&(C-=c+3),{data:j,pts:r,dts:a,len:C}}return null}function s(S,x){if(S.units.length&&S.frame){if(S.pts===void 0){var M=x.samples,C=M.length;if(C){var c=M[C-1];S.pts=c.pts,S.dts=c.dts}else{x.dropped++;return}}x.samples.push(S)}S.debug.length&&i.logger.log(S.pts+"/"+S.dts+":"+S.debug)}function u(S,x){var M=S.length;if(M>0){if(x.pts>=S[M-1].pts)S.push(x);else for(var C=M-1;C>=0;C--)if(x.pts<S[C].pts){S.splice(C,0,x);break}}else S.push(x)}function p(S){for(var x=S.byteLength,M=[],C=1;C<x-2;)S[C]===0&&S[C+1]===0&&S[C+2]===3?(M.push(C+2),C+=2):C++;if(M.length===0)return S;var c=x-M.length,r=new Uint8Array(c),a=0;for(C=0;C<c;a++,C++)a===M[0]&&(a++,M.shift()),r[C]=S[a];return r}N.default=h},"./src/errors.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"ErrorTypes",function(){return Q}),O.d(N,"ErrorDetails",function(){return R});var Q;(function(B){B.NETWORK_ERROR="networkError",B.MEDIA_ERROR="mediaError",B.KEY_SYSTEM_ERROR="keySystemError",B.MUX_ERROR="muxError",B.OTHER_ERROR="otherError"})(Q||(Q={}));var R;(function(B){B.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",B.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",B.KEY_SYSTEM_NO_SESSION="keySystemNoSession",B.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",B.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",B.MANIFEST_LOAD_ERROR="manifestLoadError",B.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",B.MANIFEST_PARSING_ERROR="manifestParsingError",B.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",B.LEVEL_EMPTY_ERROR="levelEmptyError",B.LEVEL_LOAD_ERROR="levelLoadError",B.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",B.LEVEL_SWITCH_ERROR="levelSwitchError",B.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",B.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",B.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",B.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",B.FRAG_LOAD_ERROR="fragLoadError",B.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",B.FRAG_DECRYPT_ERROR="fragDecryptError",B.FRAG_PARSING_ERROR="fragParsingError",B.REMUX_ALLOC_ERROR="remuxAllocError",B.KEY_LOAD_ERROR="keyLoadError",B.KEY_LOAD_TIMEOUT="keyLoadTimeOut",B.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",B.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",B.BUFFER_APPEND_ERROR="bufferAppendError",B.BUFFER_APPENDING_ERROR="bufferAppendingError",B.BUFFER_STALLED_ERROR="bufferStalledError",B.BUFFER_FULL_ERROR="bufferFullError",B.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",B.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",B.INTERNAL_EXCEPTION="internalException",B.INTERNAL_ABORTED="aborted",B.UNKNOWN="unknown"})(R||(R={}))},"./src/events.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"Events",function(){return Q});var Q;(function(R){R.MEDIA_ATTACHING="hlsMediaAttaching",R.MEDIA_ATTACHED="hlsMediaAttached",R.MEDIA_DETACHING="hlsMediaDetaching",R.MEDIA_DETACHED="hlsMediaDetached",R.BUFFER_RESET="hlsBufferReset",R.BUFFER_CODECS="hlsBufferCodecs",R.BUFFER_CREATED="hlsBufferCreated",R.BUFFER_APPENDING="hlsBufferAppending",R.BUFFER_APPENDED="hlsBufferAppended",R.BUFFER_EOS="hlsBufferEos",R.BUFFER_FLUSHING="hlsBufferFlushing",R.BUFFER_FLUSHED="hlsBufferFlushed",R.MANIFEST_LOADING="hlsManifestLoading",R.MANIFEST_LOADED="hlsManifestLoaded",R.MANIFEST_PARSED="hlsManifestParsed",R.LEVEL_SWITCHING="hlsLevelSwitching",R.LEVEL_SWITCHED="hlsLevelSwitched",R.LEVEL_LOADING="hlsLevelLoading",R.LEVEL_LOADED="hlsLevelLoaded",R.LEVEL_UPDATED="hlsLevelUpdated",R.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",R.LEVELS_UPDATED="hlsLevelsUpdated",R.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",R.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",R.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",R.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",R.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",R.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",R.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",R.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",R.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",R.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",R.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",R.CUES_PARSED="hlsCuesParsed",R.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",R.INIT_PTS_FOUND="hlsInitPtsFound",R.FRAG_LOADING="hlsFragLoading",R.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",R.FRAG_LOADED="hlsFragLoaded",R.FRAG_DECRYPTED="hlsFragDecrypted",R.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",R.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",R.FRAG_PARSING_METADATA="hlsFragParsingMetadata",R.FRAG_PARSED="hlsFragParsed",R.FRAG_BUFFERED="hlsFragBuffered",R.FRAG_CHANGED="hlsFragChanged",R.FPS_DROP="hlsFpsDrop",R.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",R.ERROR="hlsError",R.DESTROYING="hlsDestroying",R.KEY_LOADING="hlsKeyLoading",R.KEY_LOADED="hlsKeyLoaded",R.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",R.BACK_BUFFER_REACHED="hlsBackBufferReached"})(Q||(Q={}))},"./src/hls.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return S});var Q=O("./node_modules/url-toolkit/src/url-toolkit.js"),R=O.n(Q),B=O("./src/loader/playlist-loader.ts"),D=O("./src/loader/key-loader.ts"),f=O("./src/controller/id3-track-controller.ts"),b=O("./src/controller/latency-controller.ts"),g=O("./src/controller/level-controller.ts"),i=O("./src/controller/fragment-tracker.ts"),l=O("./src/controller/stream-controller.ts"),v=O("./src/is-supported.ts"),h=O("./src/utils/logger.ts"),d=O("./src/config.ts"),E=O("./node_modules/eventemitter3/index.js"),o=O.n(E),n=O("./src/events.ts"),s=O("./src/errors.ts");function u(x,M){for(var C=0;C<M.length;C++){var c=M[C];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(x,c.key,c)}}function p(x,M,C){return M&&u(x.prototype,M),C&&u(x,C),x}var S=function(){x.isSupported=function(){return Object(v.isSupported)()};function x(C){C===void 0&&(C={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new E.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 c=this.config=Object(d.mergeConfig)(x.DefaultConfig,C);this.userConfig=C,Object(h.enableLogs)(c.debug),this._autoLevelCapping=-1,c.progressive&&Object(d.enableStreamingMode)(c);var r=c.abrController,a=c.bufferController,A=c.capLevelController,L=c.fpsController,T=this.abrController=new r(this),w=this.bufferController=new a(this),_=this.capLevelController=new A(this),j=new L(this),W=new B.default(this),Z=new D.default(this),X=new f.default(this),G=this.levelController=new g.default(this),te=new i.FragmentTracker(this),Y=this.streamController=new l.default(this,te);_.setStreamController(Y),j.setStreamController(Y);var le=[G,Y];this.networkControllers=le;var Ae=[W,Z,T,w,_,j,X,te];this.audioTrackController=this.createController(c.audioTrackController,null,le),this.createController(c.audioStreamController,te,le),this.subtitleTrackController=this.createController(c.subtitleTrackController,null,le),this.createController(c.subtitleStreamController,te,le),this.createController(c.timelineController,null,Ae),this.emeController=this.createController(c.emeController,null,Ae),this.cmcdController=this.createController(c.cmcdController,null,Ae),this.latencyController=this.createController(b.default,null,Ae),this.coreComponents=Ae}var M=x.prototype;return M.createController=function(c,r,a){if(c){var A=r?new c(this,r):new c(this);return a&&a.push(A),A}return null},M.on=function(c,r,a){a===void 0&&(a=this),this._emitter.on(c,r,a)},M.once=function(c,r,a){a===void 0&&(a=this),this._emitter.once(c,r,a)},M.removeAllListeners=function(c){this._emitter.removeAllListeners(c)},M.off=function(c,r,a,A){a===void 0&&(a=this),this._emitter.off(c,r,a,A)},M.listeners=function(c){return this._emitter.listeners(c)},M.emit=function(c,r,a){return this._emitter.emit(c,r,a)},M.trigger=function(c,r){if(this.config.debug)return this.emit(c,c,r);try{return this.emit(c,c,r)}catch(a){h.logger.error("An internal error happened while handling event "+c+'. Error message: "'+a.message+'". Here is a stacktrace:',a),this.trigger(n.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:c,error:a})}return!1},M.listenerCount=function(c){return this._emitter.listenerCount(c)},M.destroy=function(){h.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(c){return c.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(c){return c.destroy()}),this.coreComponents.length=0},M.attachMedia=function(c){h.logger.log("attachMedia"),this._media=c,this.trigger(n.Events.MEDIA_ATTACHING,{media:c})},M.detachMedia=function(){h.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},M.loadSource=function(c){this.stopLoad();var r=this.media,a=this.url,A=this.url=Q.buildAbsoluteURL(self.location.href,c,{alwaysNormalize:!0});h.logger.log("loadSource:"+A),r&&a&&a!==A&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(r)),this.trigger(n.Events.MANIFEST_LOADING,{url:c})},M.startLoad=function(c){c===void 0&&(c=-1),h.logger.log("startLoad("+c+")"),this.networkControllers.forEach(function(r){r.startLoad(c)})},M.stopLoad=function(){h.logger.log("stopLoad"),this.networkControllers.forEach(function(c){c.stopLoad()})},M.swapAudioCodec=function(){h.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},M.recoverMediaError=function(){h.logger.log("recoverMediaError");var c=this._media;this.detachMedia(),c&&this.attachMedia(c)},M.removeLevel=function(c,r){r===void 0&&(r=0),this.levelController.removeLevel(c,r)},p(x,[{key:"levels",get:function(){var c=this.levelController.levels;return c||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(c){h.logger.log("set currentLevel:"+c),this.loadLevel=c,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(c){h.logger.log("set nextLevel:"+c),this.levelController.manualLevel=c,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(c){h.logger.log("set loadLevel:"+c),this.levelController.manualLevel=c}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(c){this.levelController.nextLoadLevel=c}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(c){h.logger.log("set firstLevel:"+c),this.levelController.firstLevel=c}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(c){h.logger.log("set startLevel:"+c),c!==-1&&(c=Math.max(c,this.minAutoLevel)),this.levelController.startLevel=c}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(c){var r=!!c;r!==this.config.capLevelToPlayerSize&&(r?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=r)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(c){this._autoLevelCapping!==c&&(h.logger.log("set autoLevelCapping:"+c),this._autoLevelCapping=c)}},{key:"bandwidthEstimate",get:function(){var c=this.abrController.bwEstimator;return c?c.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var c=this.levels,r=this.config.minAutoBitrate;if(!c)return 0;for(var a=c.length,A=0;A<a;A++)if(c[A].maxBitrate>r)return A;return 0}},{key:"maxAutoLevel",get:function(){var c=this.levels,r=this.autoLevelCapping,a;return r===-1&&c&&c.length?a=c.length-1:a=r,a}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(c){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,c)}},{key:"audioTracks",get:function(){var c=this.audioTrackController;return c?c.audioTracks:[]}},{key:"audioTrack",get:function(){var c=this.audioTrackController;return c?c.audioTrack:-1},set:function(c){var r=this.audioTrackController;r&&(r.audioTrack=c)}},{key:"subtitleTracks",get:function(){var c=this.subtitleTrackController;return c?c.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var c=this.subtitleTrackController;return c?c.subtitleTrack:-1},set:function(c){var r=this.subtitleTrackController;r&&(r.subtitleTrack=c)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var c=this.subtitleTrackController;return c?c.subtitleDisplay:!1},set:function(c){var r=this.subtitleTrackController;r&&(r.subtitleDisplay=c)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(c){this.config.lowLatencyMode=c}},{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 n.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return x.defaultConfig?x.defaultConfig:d.hlsDefaultConfig},set:function(c){x.defaultConfig=c}}]),x}();S.defaultConfig=void 0},"./src/is-supported.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"isSupported",function(){return B}),O.d(N,"changeTypeSupported",function(){return D});var Q=O("./src/utils/mediasource-helper.ts");function R(){return self.SourceBuffer||self.WebKitSourceBuffer}function B(){var f=Object(Q.getMediaSource)();if(!f)return!1;var b=R(),g=f&&typeof f.isTypeSupported=="function"&&f.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!b||b.prototype&&typeof b.prototype.appendBuffer=="function"&&typeof b.prototype.remove=="function";return!!g&&!!i}function D(){var f,b=R();return typeof(b==null||((f=b.prototype)===null||f===void 0)?void 0:f.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return h}),O.d(N,"LoadError",function(){return E});var Q=O("./src/polyfills/number.ts"),R=O("./src/errors.ts");function B(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,i(o,n)}function D(o){var n=typeof Map=="function"?new Map:void 0;return D=function(u){if(u===null||!g(u))return u;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(u))return n.get(u);n.set(u,p)}function p(){return f(u,arguments,l(this).constructor)}return p.prototype=Object.create(u.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),i(p,u)},D(o)}function f(o,n,s){return b()?f=Reflect.construct:f=function(p,S,x){var M=[null];M.push.apply(M,S);var C=Function.bind.apply(p,M),c=new C;return x&&i(c,x.prototype),c},f.apply(null,arguments)}function b(){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(o){return!1}}function g(o){return Function.toString.call(o).indexOf("[native code]")!==-1}function i(o,n){return i=Object.setPrototypeOf||function(u,p){return u.__proto__=p,u},i(o,n)}function l(o){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},l(o)}var v=Math.pow(2,17),h=function(){function o(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var n=o.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(u,p){var S=this,x=u.url;if(!x)return Promise.reject(new E({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,networkDetails:null},"Fragment does not have a "+(x?"part list":"url")));this.abort();var M=this.config,C=M.fLoader,c=M.loader;return new Promise(function(r,a){S.loader&&S.loader.destroy();var A=S.loader=u.loader=C?new C(M):new c(M),L=d(u),T={timeout:M.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:M.fragLoadingMaxRetryTimeout,highWaterMark:v};u.stats=A.stats,A.load(L,T,{onSuccess:function(_,j,W,Z){S.resetLoader(u,A),r({frag:u,part:null,payload:_.data,networkDetails:Z})},onError:function(_,j,W){S.resetLoader(u,A),a(new E({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,response:_,networkDetails:W}))},onAbort:function(_,j,W){S.resetLoader(u,A),a(new E({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,networkDetails:W}))},onTimeout:function(_,j,W){S.resetLoader(u,A),a(new E({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,networkDetails:W}))},onProgress:function(_,j,W,Z){p&&p({frag:u,part:null,payload:W,networkDetails:Z})}})})},n.loadPart=function(u,p,S){var x=this;this.abort();var M=this.config,C=M.fLoader,c=M.loader;return new Promise(function(r,a){x.loader&&x.loader.destroy();var A=x.loader=u.loader=C?new C(M):new c(M),L=d(u,p),T={timeout:M.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:M.fragLoadingMaxRetryTimeout,highWaterMark:v};p.stats=A.stats,A.load(L,T,{onSuccess:function(_,j,W,Z){x.resetLoader(u,A),x.updateStatsFromPart(u,p);var X={frag:u,part:p,payload:_.data,networkDetails:Z};S(X),r(X)},onError:function(_,j,W){x.resetLoader(u,A),a(new E({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,part:p,response:_,networkDetails:W}))},onAbort:function(_,j,W){u.stats.aborted=p.stats.aborted,x.resetLoader(u,A),a(new E({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,part:p,networkDetails:W}))},onTimeout:function(_,j,W){x.resetLoader(u,A),a(new E({type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,part:p,networkDetails:W}))}})})},n.updateStatsFromPart=function(u,p){var S=u.stats,x=p.stats,M=x.total;if(S.loaded+=x.loaded,M){var C=Math.round(u.duration/p.duration),c=Math.min(Math.round(S.loaded/M),C),r=C-c,a=r*Math.round(S.loaded/c);S.total=S.loaded+a}else S.total=Math.max(S.loaded,S.total);var A=S.loading,L=x.loading;A.start?A.first+=L.first-L.start:(A.start=L.start,A.first=L.first),A.end=L.end},n.resetLoader=function(u,p){u.loader=null,this.loader===p&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),p.destroy()},o}();function d(o,n){n===void 0&&(n=null);var s=n||o,u={frag:o,part:n,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},p=s.byteRangeStartOffset,S=s.byteRangeEndOffset;return Object(Q.isFiniteNumber)(p)&&Object(Q.isFiniteNumber)(S)&&(u.rangeStart=p,u.rangeEnd=S),u}var E=function(o){B(n,o);function n(s){for(var u,p=arguments.length,S=new Array(p>1?p-1:0),x=1;x<p;x++)S[x-1]=arguments[x];return u=o.call.apply(o,[this].concat(S))||this,u.data=void 0,u.data=s,u}return n}(D(Error))},"./src/loader/fragment.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"ElementaryStreamTypes",function(){return h}),O.d(N,"BaseSegment",function(){return d}),O.d(N,"Fragment",function(){return E}),O.d(N,"Part",function(){return o});var Q=O("./src/polyfills/number.ts"),R=O("./node_modules/url-toolkit/src/url-toolkit.js"),B=O.n(R),D=O("./src/utils/logger.ts"),f=O("./src/loader/level-key.ts"),b=O("./src/loader/load-stats.ts");function g(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,i(n,s)}function i(n,s){return i=Object.setPrototypeOf||function(p,S){return p.__proto__=S,p},i(n,s)}function l(n,s){for(var u=0;u<s.length;u++){var p=s[u];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(n,p.key,p)}}function v(n,s,u){return s&&l(n.prototype,s),u&&l(n,u),n}var h;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(h||(h={}));var d=function(){function n(u){var p;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(p={},p[h.AUDIO]=null,p[h.VIDEO]=null,p[h.AUDIOVIDEO]=null,p),this.baseurl=u}var s=n.prototype;return s.setByteRange=function(p,S){var x=p.split("@",2),M=[];x.length===1?M[0]=S?S.byteRangeEndOffset:0:M[0]=parseInt(x[1]),M[1]=parseInt(x[0])+M[0],this._byteRange=M},v(n,[{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(R.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(p){this._url=p}}]),n}(),E=function(n){g(s,n);function s(p,S){var x;return x=n.call(this,S)||this,x._decryptdata=null,x.rawProgramDateTime=null,x.programDateTime=null,x.tagList=[],x.duration=0,x.sn=0,x.levelkey=void 0,x.type=void 0,x.loader=null,x.level=-1,x.cc=0,x.startPTS=void 0,x.endPTS=void 0,x.appendedPTS=void 0,x.startDTS=void 0,x.endDTS=void 0,x.start=0,x.deltaPTS=void 0,x.maxStartPTS=void 0,x.minEndPTS=void 0,x.stats=new b.LoadStats,x.urlId=0,x.data=void 0,x.bitrateTest=!1,x.title=null,x.initSegment=null,x.type=p,x}var u=s.prototype;return u.createInitializationVector=function(S){for(var x=new Uint8Array(16),M=12;M<16;M++)x[M]=S>>8*(15-M)&255;return x},u.setDecryptDataFromLevelKey=function(S,x){var M=S;return(S==null?void 0:S.method)==="AES-128"&&S.uri&&!S.iv&&(M=f.LevelKey.fromURI(S.uri),M.method=S.method,M.iv=this.createInitializationVector(x),M.keyFormat="identity"),M},u.setElementaryStreamInfo=function(S,x,M,C,c,r){r===void 0&&(r=!1);var a=this.elementaryStreams,A=a[S];if(!A){a[S]={startPTS:x,endPTS:M,startDTS:C,endDTS:c,partial:r};return}A.startPTS=Math.min(A.startPTS,x),A.endPTS=Math.max(A.endPTS,M),A.startDTS=Math.min(A.startDTS,C),A.endDTS=Math.max(A.endDTS,c)},u.clearElementaryStreamInfo=function(){var S=this.elementaryStreams;S[h.AUDIO]=null,S[h.VIDEO]=null,S[h.AUDIOVIDEO]=null},v(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var S=this.sn;typeof S!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&D.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),S=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,S)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(Q.isFiniteNumber)(this.programDateTime))return null;var S=Object(Q.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+S*1e3}},{key:"encrypted",get:function(){var S;return!!((S=this.decryptdata)!==null&&S!==void 0&&S.keyFormat&&this.decryptdata.uri)}}]),s}(d),o=function(n){g(s,n);function s(u,p,S,x,M){var C;C=n.call(this,S)||this,C.fragOffset=0,C.duration=0,C.gap=!1,C.independent=!1,C.relurl=void 0,C.fragment=void 0,C.index=void 0,C.stats=new b.LoadStats,C.duration=u.decimalFloatingPoint("DURATION"),C.gap=u.bool("GAP"),C.independent=u.bool("INDEPENDENT"),C.relurl=u.enumeratedString("URI"),C.fragment=p,C.index=x;var c=u.enumeratedString("BYTERANGE");return c&&C.setByteRange(c,M),M&&(C.fragOffset=M.fragOffset+M.duration),C}return v(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var p=this.elementaryStreams;return!!(p.audio||p.video||p.audiovideo)}}]),s}(d)},"./src/loader/key-loader.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return D});var Q=O("./src/events.ts"),R=O("./src/errors.ts"),B=O("./src/utils/logger.ts"),D=function(){function f(g){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=g,this._registerListeners()}var b=f.prototype;return b._registerListeners=function(){this.hls.on(Q.Events.KEY_LOADING,this.onKeyLoading,this)},b._unregisterListeners=function(){this.hls.off(Q.Events.KEY_LOADING,this.onKeyLoading)},b.destroy=function(){this._unregisterListeners();for(var i in this.loaders){var l=this.loaders[i];l&&l.destroy()}this.loaders={}},b.onKeyLoading=function(i,l){var v=l.frag,h=v.type,d=this.loaders[h];if(!v.decryptdata){B.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var E=v.decryptdata.uri;if(E!==this.decrypturl||this.decryptkey===null){var o=this.hls.config;if(d&&(B.logger.warn("abort previous key loader for type:"+h),d.abort()),!E){B.logger.warn("key uri is falsy");return}var n=o.loader,s=v.loader=this.loaders[h]=new n(o);this.decrypturl=E,this.decryptkey=null;var u={url:E,frag:v,responseType:"arraybuffer"},p={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:0},S={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(u,p,S)}else this.decryptkey&&(v.decryptdata.key=this.decryptkey,this.hls.trigger(Q.Events.KEY_LOADED,{frag:v}))},b.loadsuccess=function(i,l,v){var h=v.frag;if(!h.decryptdata){B.logger.error("after key load, decryptdata unset");return}this.decryptkey=h.decryptdata.key=new Uint8Array(i.data),h.loader=null,delete this.loaders[h.type],this.hls.trigger(Q.Events.KEY_LOADED,{frag:h})},b.loaderror=function(i,l){var v=l.frag,h=v.loader;h&&h.abort(),delete this.loaders[v.type],this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:v,response:i})},b.loadtimeout=function(i,l){var v=l.frag,h=v.loader;h&&h.abort(),delete this.loaders[v.type],this.hls.trigger(Q.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:v})},f}()},"./src/loader/level-details.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"LevelDetails",function(){return f});var Q=O("./src/polyfills/number.ts");function R(b,g){for(var i=0;i<g.length;i++){var l=g[i];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(b,l.key,l)}}function B(b,g,i){return g&&R(b.prototype,g),i&&R(b,i),b}var D=10,f=function(){function b(i){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=i}var g=b.prototype;return g.reloaded=function(l){if(!l){this.advanced=!0,this.updated=!0;return}var v=this.lastPartSn-l.lastPartSn,h=this.lastPartIndex-l.lastPartIndex;this.updated=this.endSN!==l.endSN||!!h||!!v,this.advanced=this.endSN>l.endSN||v>0||v===0&&h>0,this.updated||this.advanced?this.misses=Math.floor(l.misses*.6):this.misses=l.misses+1,this.availabilityDelay=l.availabilityDelay},B(b,[{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||D}},{key:"drift",get:function(){var l=this.driftEndTime-this.driftStartTime;if(l>0){var v=this.driftEnd-this.driftStart;return v*1e3/l}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var l;return(l=this.fragments)!==null&&l!==void 0&&l.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 l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),b}()},"./src/loader/level-key.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"LevelKey",function(){return f});var Q=O("./node_modules/url-toolkit/src/url-toolkit.js"),R=O.n(Q);function B(b,g){for(var i=0;i<g.length;i++){var l=g[i];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(b,l.key,l)}}function D(b,g,i){return g&&B(b.prototype,g),i&&B(b,i),b}var f=function(){b.fromURL=function(i,l){return new b(i,l)},b.fromURI=function(i){return new b(i)};function b(g,i){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,i?this._uri=Object(Q.buildAbsoluteURL)(g,i,{alwaysNormalize:!0}):this._uri=g}return D(b,[{key:"uri",get:function(){return this._uri}}]),b}()},"./src/loader/load-stats.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"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(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return s});var Q=O("./src/polyfills/number.ts"),R=O("./node_modules/url-toolkit/src/url-toolkit.js"),B=O.n(R),D=O("./src/loader/fragment.ts"),f=O("./src/loader/level-details.ts"),b=O("./src/loader/level-key.ts"),g=O("./src/utils/attr-list.ts"),i=O("./src/utils/logger.ts"),l=O("./src/utils/codecs.ts"),v=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,h=/#EXT-X-MEDIA:(.*)/g,d=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),E=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("|")),o=/\.(mp4|m4s|m4v|m4a)$/i;function n(M){var C,c;return o.test((C=(c=R.parseURL(M))===null||c===void 0?void 0:c.path)!=null?C:"")}var s=function(){function M(){}return M.findGroup=function(c,r){for(var a=0;a<c.length;a++){var A=c[a];if(A.id===r)return A}},M.convertAVC1ToAVCOTI=function(c){var r=c.split(".");if(r.length>2){var a=r.shift()+".";return a+=parseInt(r.shift()).toString(16),a+=("000"+parseInt(r.shift()).toString(16)).substr(-4),a}return c},M.resolve=function(c,r){return R.buildAbsoluteURL(r,c,{alwaysNormalize:!0})},M.parseMasterPlaylist=function(c,r){var a=[],A={},L=!1;v.lastIndex=0;for(var T;(T=v.exec(c))!=null;)if(T[1]){var w=new g.AttrList(T[1]),_={attrs:w,bitrate:w.decimalInteger("AVERAGE-BANDWIDTH")||w.decimalInteger("BANDWIDTH"),name:w.NAME,url:M.resolve(T[2],r)},j=w.decimalResolution("RESOLUTION");j&&(_.width=j.width,_.height=j.height),u((w.CODECS||"").split(/[ ,]+/).filter(function(Z){return Z}),_),_.videoCodec&&_.videoCodec.indexOf("avc1")!==-1&&(_.videoCodec=M.convertAVC1ToAVCOTI(_.videoCodec)),a.push(_)}else if(T[3]){var W=new g.AttrList(T[3]);W["DATA-ID"]&&(L=!0,A[W["DATA-ID"]]=W)}return{levels:a,sessionData:L?A:null}},M.parseMasterPlaylistMedia=function(c,r,a,A){A===void 0&&(A=[]);var L,T=[],w=0;for(h.lastIndex=0;(L=h.exec(c))!==null;){var _=new g.AttrList(L[1]);if(_.TYPE===a){var j={attrs:_,bitrate:0,id:w++,groupId:_["GROUP-ID"],instreamId:_["INSTREAM-ID"],name:_.NAME||_.LANGUAGE||"",type:a,default:_.bool("DEFAULT"),autoselect:_.bool("AUTOSELECT"),forced:_.bool("FORCED"),lang:_.LANGUAGE,url:_.URI?M.resolve(_.URI,r):""};if(A.length){var W=M.findGroup(A,j.groupId)||A[0];p(j,W,"audioCodec"),p(j,W,"textCodec")}T.push(j)}}return T},M.parseLevelPlaylist=function(c,r,a,A,L){var T=new f.LevelDetails(r),w=T.fragments,_=null,j=0,W=0,Z=0,X=0,G=null,te=new D.Fragment(A,r),Y,le,Ae,Be=-1,Ce=!1;for(d.lastIndex=0,T.m3u8=c;(Y=d.exec(c))!==null;){Ce&&(Ce=!1,te=new D.Fragment(A,r),te.start=Z,te.sn=j,te.cc=X,te.level=a,_&&(te.initSegment=_,te.rawProgramDateTime=_.rawProgramDateTime));var Se=Y[1];if(Se){te.duration=parseFloat(Se);var Fe=(" "+Y[2]).slice(1);te.title=Fe||null,te.tagList.push(Fe?["INF",Se,Fe]:["INF",Se])}else if(Y[3])Object(Q.isFiniteNumber)(te.duration)&&(te.start=Z,Ae&&(te.levelkey=Ae),te.sn=j,te.level=a,te.cc=X,te.urlId=L,w.push(te),te.relurl=(" "+Y[3]).slice(1),x(te,G),G=te,Z+=te.duration,j++,W=0,Ce=!0);else if(Y[4]){var Ve=(" "+Y[4]).slice(1);G?te.setByteRange(Ve,G):te.setByteRange(Ve)}else if(Y[5])te.rawProgramDateTime=(" "+Y[5]).slice(1),te.tagList.push(["PROGRAM-DATE-TIME",te.rawProgramDateTime]),Be===-1&&(Be=w.length);else{if(Y=Y[0].match(E),!Y){i.logger.warn("No matches on slow regex match for level playlist!");continue}for(le=1;le<Y.length&&!(typeof Y[le]!="undefined");le++);var De=(" "+Y[le]).slice(1),Le=(" "+Y[le+1]).slice(1),tt=Y[le+2]?(" "+Y[le+2]).slice(1):"";switch(De){case"PLAYLIST-TYPE":T.type=Le.toUpperCase();break;case"MEDIA-SEQUENCE":j=T.startSN=parseInt(Le);break;case"SKIP":{var Et=new g.AttrList(Le),Ie=Et.decimalInteger("SKIPPED-SEGMENTS");if(Object(Q.isFiniteNumber)(Ie)){T.skippedSegments=Ie;for(var Qe=Ie;Qe--;)w.unshift(null);j+=Ie}var xe=Et.enumeratedString("RECENTLY-REMOVED-DATERANGES");xe&&(T.recentlyRemovedDateranges=xe.split(" "));break}case"TARGETDURATION":T.targetduration=parseFloat(Le);break;case"VERSION":T.version=parseInt(Le);break;case"EXTM3U":break;case"ENDLIST":T.live=!1;break;case"#":(Le||tt)&&te.tagList.push(tt?[Le,tt]:[Le]);break;case"DIS":X++;case"GAP":te.tagList.push([De]);break;case"BITRATE":te.tagList.push([De,Le]);break;case"DISCONTINUITY-SEQ":X=parseInt(Le);break;case"KEY":{var ie,$=new g.AttrList(Le),re=$.enumeratedString("METHOD"),ce=$.URI,be=$.hexadecimalInteger("IV"),Me=$.enumeratedString("KEYFORMATVERSIONS"),ke=$.enumeratedString("KEYID"),ct=(ie=$.enumeratedString("KEYFORMAT"))!=null?ie:"identity",ut=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ut.indexOf(ct)>-1){i.logger.warn("Keyformat "+ct+" is not supported from the manifest");continue}else if(ct!=="identity")continue;re&&(Ae=b.LevelKey.fromURL(r,ce),ce&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(re)>=0&&(Ae.method=re,Ae.keyFormat=ct,ke&&(Ae.keyID=ke),Me&&(Ae.keyFormatVersions=Me),Ae.iv=be));break}case"START":{var mt=new g.AttrList(Le),pt=mt.decimalFloatingPoint("TIME-OFFSET");Object(Q.isFiniteNumber)(pt)&&(T.startTimeOffset=pt);break}case"MAP":{var Ot=new g.AttrList(Le);te.relurl=Ot.URI,Ot.BYTERANGE&&te.setByteRange(Ot.BYTERANGE),te.level=a,te.sn="initSegment",Ae&&(te.levelkey=Ae),te.initSegment=null,_=te,Ce=!0;break}case"SERVER-CONTROL":{var Ft=new g.AttrList(Le);T.canBlockReload=Ft.bool("CAN-BLOCK-RELOAD"),T.canSkipUntil=Ft.optionalFloat("CAN-SKIP-UNTIL",0),T.canSkipDateRanges=T.canSkipUntil>0&&Ft.bool("CAN-SKIP-DATERANGES"),T.partHoldBack=Ft.optionalFloat("PART-HOLD-BACK",0),T.holdBack=Ft.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var He=new g.AttrList(Le);T.partTarget=He.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Pe=T.partList;Pe||(Pe=T.partList=[]);var at=W>0?Pe[Pe.length-1]:void 0,vt=W++,et=new D.Part(new g.AttrList(Le),te,r,vt,at);Pe.push(et),te.duration+=et.duration;break}case"PRELOAD-HINT":{var At=new g.AttrList(Le);T.preloadHint=At;break}case"RENDITION-REPORT":{var je=new g.AttrList(Le);T.renditionReports=T.renditionReports||[],T.renditionReports.push(je);break}default:i.logger.warn("line parsed but not handled: "+Y);break}}}G&&!G.relurl?(w.pop(),Z-=G.duration,T.partList&&(T.fragmentHint=G)):T.partList&&(x(te,G),te.cc=X,T.fragmentHint=te);var _e=w.length,Ue=w[0],me=w[_e-1];if(Z+=T.skippedSegments*T.targetduration,Z>0&&_e&&me){T.averagetargetduration=Z/_e;var ve=me.sn;T.endSN=ve!=="initSegment"?ve:0,Ue&&(T.startCC=Ue.cc,Ue.initSegment||T.fragments.every(function(Ee){return Ee.relurl&&n(Ee.relurl)})&&(i.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),te=new D.Fragment(A,r),te.relurl=me.relurl,te.level=a,te.sn="initSegment",Ue.initSegment=te,T.needSidxRanges=!0))}else T.endSN=0,T.startCC=0;return T.fragmentHint&&(Z+=T.fragmentHint.duration),T.totalduration=Z,T.endCC=X,Be>0&&S(w,Be),T},M}();function u(M,C){["video","audio","text"].forEach(function(c){var r=M.filter(function(A){return Object(l.isCodecType)(A,c)});if(r.length){var a=r.filter(function(A){return A.lastIndexOf("avc1",0)===0||A.lastIndexOf("mp4a",0)===0});C[c+"Codec"]=a.length>0?a[0]:r[0],M=M.filter(function(A){return r.indexOf(A)===-1})}}),C.unknownCodecs=M}function p(M,C,c){var r=C[c];r&&(M[c]=r)}function S(M,C){for(var c=M[C],r=C;r--;){var a=M[r];if(!a)return;a.programDateTime=c.programDateTime-a.duration*1e3,c=a}}function x(M,C){M.rawProgramDateTime?M.programDateTime=Date.parse(M.rawProgramDateTime):C!=null&&C.programDateTime&&(M.programDateTime=C.endProgramDateTime),Object(Q.isFiniteNumber)(M.programDateTime)||(M.programDateTime=null,M.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/polyfills/number.ts"),R=O("./src/events.ts"),B=O("./src/errors.ts"),D=O("./src/utils/logger.ts"),f=O("./src/utils/mp4-tools.ts"),b=O("./src/loader/m3u8-parser.ts"),g=O("./src/types/loader.ts"),i=O("./src/utils/attr-list.ts");function l(d){var E=d.type;switch(E){case g.PlaylistContextType.AUDIO_TRACK:return g.PlaylistLevelType.AUDIO;case g.PlaylistContextType.SUBTITLE_TRACK:return g.PlaylistLevelType.SUBTITLE;default:return g.PlaylistLevelType.MAIN}}function v(d,E){var o=d.url;return(o===void 0||o.indexOf("data:")===0)&&(o=E.url),o}var h=function(){function d(o){this.hls=void 0,this.loaders=Object.create(null),this.hls=o,this.registerListeners()}var E=d.prototype;return E.registerListeners=function(){var n=this.hls;n.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(R.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(R.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(R.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},E.unregisterListeners=function(){var n=this.hls;n.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(R.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(R.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(R.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},E.createInternalLoader=function(n){var s=this.hls.config,u=s.pLoader,p=s.loader,S=u||p,x=new S(s);return n.loader=x,this.loaders[n.type]=x,x},E.getInternalLoader=function(n){return this.loaders[n.type]},E.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},E.destroyInternalLoaders=function(){for(var n in this.loaders){var s=this.loaders[n];s&&s.destroy(),this.resetInternalLoader(n)}},E.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},E.onManifestLoading=function(n,s){var u=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:g.PlaylistContextType.MANIFEST,url:u,deliveryDirectives:null})},E.onLevelLoading=function(n,s){var u=s.id,p=s.level,S=s.url,x=s.deliveryDirectives;this.load({id:u,groupId:null,level:p,responseType:"text",type:g.PlaylistContextType.LEVEL,url:S,deliveryDirectives:x})},E.onAudioTrackLoading=function(n,s){var u=s.id,p=s.groupId,S=s.url,x=s.deliveryDirectives;this.load({id:u,groupId:p,level:null,responseType:"text",type:g.PlaylistContextType.AUDIO_TRACK,url:S,deliveryDirectives:x})},E.onSubtitleTrackLoading=function(n,s){var u=s.id,p=s.groupId,S=s.url,x=s.deliveryDirectives;this.load({id:u,groupId:p,level:null,responseType:"text",type:g.PlaylistContextType.SUBTITLE_TRACK,url:S,deliveryDirectives:x})},E.load=function(n){var s,u=this.hls.config,p=this.getInternalLoader(n);if(p){var S=p.context;if(S&&S.url===n.url){D.logger.trace("[playlist-loader]: playlist request ongoing");return}D.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),p.abort()}var x,M,C,c;switch(n.type){case g.PlaylistContextType.MANIFEST:x=u.manifestLoadingMaxRetry,M=u.manifestLoadingTimeOut,C=u.manifestLoadingRetryDelay,c=u.manifestLoadingMaxRetryTimeout;break;case g.PlaylistContextType.LEVEL:case g.PlaylistContextType.AUDIO_TRACK:case g.PlaylistContextType.SUBTITLE_TRACK:x=0,M=u.levelLoadingTimeOut;break;default:x=u.levelLoadingMaxRetry,M=u.levelLoadingTimeOut,C=u.levelLoadingRetryDelay,c=u.levelLoadingMaxRetryTimeout;break}if(p=this.createInternalLoader(n),(s=n.deliveryDirectives)!==null&&s!==void 0&&s.part){var r;if(n.type===g.PlaylistContextType.LEVEL&&n.level!==null?r=this.hls.levels[n.level].details:n.type===g.PlaylistContextType.AUDIO_TRACK&&n.id!==null?r=this.hls.audioTracks[n.id].details:n.type===g.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(r=this.hls.subtitleTracks[n.id].details),r){var a=r.partTarget,A=r.targetduration;a&&A&&(M=Math.min(Math.max(a*3,A*.8)*1e3,M))}}var L={timeout:M,maxRetry:x,retryDelay:C,maxRetryDelay:c,highWaterMark:0},T={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};p.load(n,L,T)},E.loadsuccess=function(n,s,u,p){if(p===void 0&&(p=null),u.isSidxRequest){this.handleSidxRequest(n,u),this.handlePlaylistLoaded(n,s,u,p);return}this.resetInternalLoader(u.type);var S=n.data;if(S.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,u,"no EXTM3U delimiter",p);return}s.parsing.start=performance.now(),S.indexOf("#EXTINF:")>0||S.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,s,u,p):this.handleMasterPlaylist(n,s,u,p)},E.loaderror=function(n,s,u){u===void 0&&(u=null),this.handleNetworkError(s,u,!1,n)},E.loadtimeout=function(n,s,u){u===void 0&&(u=null),this.handleNetworkError(s,u,!0)},E.handleMasterPlaylist=function(n,s,u,p){var S=this.hls,x=n.data,M=v(n,u),C=b.default.parseMasterPlaylist(x,M),c=C.levels,r=C.sessionData;if(!c.length){this.handleManifestParsingError(n,u,"no level found in manifest",p);return}var a=c.map(function(j){return{id:j.attrs.AUDIO,audioCodec:j.audioCodec}}),A=c.map(function(j){return{id:j.attrs.SUBTITLES,textCodec:j.textCodec}}),L=b.default.parseMasterPlaylistMedia(x,M,"AUDIO",a),T=b.default.parseMasterPlaylistMedia(x,M,"SUBTITLES",A),w=b.default.parseMasterPlaylistMedia(x,M,"CLOSED-CAPTIONS");if(L.length){var _=L.some(function(j){return!j.url});!_&&c[0].audioCodec&&!c[0].attrs.AUDIO&&(D.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),L.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new i.AttrList({}),bitrate:0,url:""}))}S.trigger(R.Events.MANIFEST_LOADED,{levels:c,audioTracks:L,subtitles:T,captions:w,url:M,stats:s,networkDetails:p,sessionData:r})},E.handleTrackOrLevelPlaylist=function(n,s,u,p){var S=this.hls,x=u.id,M=u.level,C=u.type,c=v(n,u),r=Object(Q.isFiniteNumber)(x)?x:0,a=Object(Q.isFiniteNumber)(M)?M:r,A=l(u),L=b.default.parseLevelPlaylist(n.data,c,a,A,r);if(!L.fragments.length){S.trigger(R.Events.ERROR,{type:B.ErrorTypes.NETWORK_ERROR,details:B.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:c,reason:"no fragments found in level",level:typeof u.level=="number"?u.level:void 0});return}if(C===g.PlaylistContextType.MANIFEST){var T={attrs:new i.AttrList({}),bitrate:0,details:L,name:"",url:c};S.trigger(R.Events.MANIFEST_LOADED,{levels:[T],audioTracks:[],url:c,stats:s,networkDetails:p,sessionData:null})}if(s.parsing.end=performance.now(),L.needSidxRanges){var w,_=(w=L.fragments[0].initSegment)===null||w===void 0?void 0:w.url;this.load({url:_,isSidxRequest:!0,type:C,level:M,levelDetails:L,id:x,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}u.levelDetails=L,this.handlePlaylistLoaded(n,s,u,p)},E.handleSidxRequest=function(n,s){var u=Object(f.parseSegmentIndex)(new Uint8Array(n.data));if(!u)return;var p=u.references,S=s.levelDetails;p.forEach(function(x,M){var C=x.info,c=S.fragments[M];c.byteRange.length===0&&c.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),c.initSegment&&c.initSegment.setByteRange(String(u.moovEndOffset)+"@0")})},E.handleManifestParsingError=function(n,s,u,p){this.hls.trigger(R.Events.ERROR,{type:B.ErrorTypes.NETWORK_ERROR,details:B.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===g.PlaylistContextType.MANIFEST,url:n.url,reason:u,response:n,context:s,networkDetails:p})},E.handleNetworkError=function(n,s,u,p){u===void 0&&(u=!1),D.logger.warn("[playlist-loader]: A network "+(u?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var S=B.ErrorDetails.UNKNOWN,x=!1,M=this.getInternalLoader(n);switch(n.type){case g.PlaylistContextType.MANIFEST:S=u?B.ErrorDetails.MANIFEST_LOAD_TIMEOUT:B.ErrorDetails.MANIFEST_LOAD_ERROR,x=!0;break;case g.PlaylistContextType.LEVEL:S=u?B.ErrorDetails.LEVEL_LOAD_TIMEOUT:B.ErrorDetails.LEVEL_LOAD_ERROR,x=!1;break;case g.PlaylistContextType.AUDIO_TRACK:S=u?B.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:B.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,x=!1;break;case g.PlaylistContextType.SUBTITLE_TRACK:S=u?B.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:B.ErrorDetails.SUBTITLE_LOAD_ERROR,x=!1;break}M&&this.resetInternalLoader(n.type);var C={type:B.ErrorTypes.NETWORK_ERROR,details:S,fatal:x,url:n.url,loader:M,context:n,networkDetails:s};p&&(C.response=p),this.hls.trigger(R.Events.ERROR,C)},E.handlePlaylistLoaded=function(n,s,u,p){var S=u.type,x=u.level,M=u.id,C=u.groupId,c=u.loader,r=u.levelDetails,a=u.deliveryDirectives;if(!(r!=null&&r.targetduration)){this.handleManifestParsingError(n,u,"invalid target duration",p);return}if(!c)return;r.live&&(c.getCacheAge&&(r.ageHeader=c.getCacheAge()||0),(!c.getCacheAge||isNaN(r.ageHeader))&&(r.ageHeader=0));switch(S){case g.PlaylistContextType.MANIFEST:case g.PlaylistContextType.LEVEL:this.hls.trigger(R.Events.LEVEL_LOADED,{details:r,level:x||0,id:M||0,stats:s,networkDetails:p,deliveryDirectives:a});break;case g.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(R.Events.AUDIO_TRACK_LOADED,{details:r,id:M||0,groupId:C||"",stats:s,networkDetails:p,deliveryDirectives:a});break;case g.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(R.Events.SUBTITLE_TRACK_LOADED,{details:r,id:M||0,groupId:C||"",stats:s,networkDetails:p,deliveryDirectives:a});break}},d}();N.default=h},"./src/polyfills/number.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"isFiniteNumber",function(){return Q}),O.d(N,"MAX_SAFE_INTEGER",function(){return R});var Q=Number.isFinite||function(B){return typeof B=="number"&&isFinite(B)},R=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(J,N,O){"use strict";O.r(N);var Q=function(){function R(){}return R.getSilentFrame=function(D,f){switch(D){case"mp4a.40.2":if(f===1)return new Uint8Array([0,200,0,128,35,128]);if(f===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(f===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(f===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(f===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(f===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(f===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(f===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(f===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},R}();N.default=Q},"./src/remux/mp4-generator.ts":function(J,N,O){"use strict";O.r(N);var Q=Math.pow(2,32)-1,R=function(){function B(){}return B.init=function(){B.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 f;for(f in B.types)B.types.hasOwnProperty(f)&&(B.types[f]=[f.charCodeAt(0),f.charCodeAt(1),f.charCodeAt(2),f.charCodeAt(3)]);var b=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]),g=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]);B.HDLR_TYPES={video:b,audio:g};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),l=new Uint8Array([0,0,0,0,0,0,0,0]);B.STTS=B.STSC=B.STCO=l,B.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),B.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),B.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),B.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var v=new Uint8Array([105,115,111,109]),h=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);B.FTYP=B.box(B.types.ftyp,v,d,v,h),B.DINF=B.box(B.types.dinf,B.box(B.types.dref,i))},B.box=function(f){for(var b=8,g=arguments.length,i=new Array(g>1?g-1:0),l=1;l<g;l++)i[l-1]=arguments[l];for(var v=i.length,h=v;v--;)b+=i[v].byteLength;var d=new Uint8Array(b);for(d[0]=b>>24&255,d[1]=b>>16&255,d[2]=b>>8&255,d[3]=b&255,d.set(f,4),v=0,b=8;v<h;v++)d.set(i[v],b),b+=i[v].byteLength;return d},B.hdlr=function(f){return B.box(B.types.hdlr,B.HDLR_TYPES[f])},B.mdat=function(f){return B.box(B.types.mdat,f)},B.mdhd=function(f,b){b*=f;var g=Math.floor(b/(Q+1)),i=Math.floor(b%(Q+1));return B.box(B.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,f>>24&255,f>>16&255,f>>8&255,f&255,g>>24,g>>16&255,g>>8&255,g&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))},B.mdia=function(f){return B.box(B.types.mdia,B.mdhd(f.timescale,f.duration),B.hdlr(f.type),B.minf(f))},B.mfhd=function(f){return B.box(B.types.mfhd,new Uint8Array([0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255]))},B.minf=function(f){return f.type==="audio"?B.box(B.types.minf,B.box(B.types.smhd,B.SMHD),B.DINF,B.stbl(f)):B.box(B.types.minf,B.box(B.types.vmhd,B.VMHD),B.DINF,B.stbl(f))},B.moof=function(f,b,g){return B.box(B.types.moof,B.mfhd(f),B.traf(g,b))},B.moov=function(f){for(var b=f.length,g=[];b--;)g[b]=B.trak(f[b]);return B.box.apply(null,[B.types.moov,B.mvhd(f[0].timescale,f[0].duration)].concat(g).concat(B.mvex(f)))},B.mvex=function(f){for(var b=f.length,g=[];b--;)g[b]=B.trex(f[b]);return B.box.apply(null,[B.types.mvex].concat(g))},B.mvhd=function(f,b){b*=f;var g=Math.floor(b/(Q+1)),i=Math.floor(b%(Q+1)),l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,f>>24&255,f>>16&255,f>>8&255,f&255,g>>24,g>>16&255,g>>8&255,g&255,i>>24,i>>16&255,i>>8&255,i&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 B.box(B.types.mvhd,l)},B.sdtp=function(f){var b=f.samples||[],g=new Uint8Array(4+b.length),i,l;for(i=0;i<b.length;i++)l=b[i].flags,g[i+4]=l.dependsOn<<4|l.isDependedOn<<2|l.hasRedundancy;return B.box(B.types.sdtp,g)},B.stbl=function(f){return B.box(B.types.stbl,B.stsd(f),B.box(B.types.stts,B.STTS),B.box(B.types.stsc,B.STSC),B.box(B.types.stsz,B.STSZ),B.box(B.types.stco,B.STCO))},B.avc1=function(f){var b=[],g=[],i,l,v;for(i=0;i<f.sps.length;i++)l=f.sps[i],v=l.byteLength,b.push(v>>>8&255),b.push(v&255),b=b.concat(Array.prototype.slice.call(l));for(i=0;i<f.pps.length;i++)l=f.pps[i],v=l.byteLength,g.push(v>>>8&255),g.push(v&255),g=g.concat(Array.prototype.slice.call(l));var h=B.box(B.types.avcC,new Uint8Array([1,b[3],b[4],b[5],252|3,224|f.sps.length].concat(b).concat([f.pps.length]).concat(g))),d=f.width,E=f.height,o=f.pixelRatio[0],n=f.pixelRatio[1];return B.box(B.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,d>>8&255,d&255,E>>8&255,E&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]),h,B.box(B.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),B.box(B.types.pasp,new Uint8Array([o>>24,o>>16&255,o>>8&255,o&255,n>>24,n>>16&255,n>>8&255,n&255])))},B.esds=function(f){var b=f.config.length;return new Uint8Array([0,0,0,0,3,23+b,0,1,0,4,15+b,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([b]).concat(f.config).concat([6,1,2]))},B.mp4a=function(f){var b=f.samplerate;return B.box(B.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,f.channelCount,0,16,0,0,0,0,b>>8&255,b&255,0,0]),B.box(B.types.esds,B.esds(f)))},B.mp3=function(f){var b=f.samplerate;return B.box(B.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,f.channelCount,0,16,0,0,0,0,b>>8&255,b&255,0,0]))},B.stsd=function(f){return f.type==="audio"?!f.isAAC&&f.codec==="mp3"?B.box(B.types.stsd,B.STSD,B.mp3(f)):B.box(B.types.stsd,B.STSD,B.mp4a(f)):B.box(B.types.stsd,B.STSD,B.avc1(f))},B.tkhd=function(f){var b=f.id,g=f.duration*f.timescale,i=f.width,l=f.height,v=Math.floor(g/(Q+1)),h=Math.floor(g%(Q+1));return B.box(B.types.tkhd,new Uint8Array([1,0,0,7,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,0,0,0,0,v>>24,v>>16&255,v>>8&255,v&255,h>>24,h>>16&255,h>>8&255,h&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,i>>8&255,i&255,0,0,l>>8&255,l&255,0,0]))},B.traf=function(f,b){var g=B.sdtp(f),i=f.id,l=Math.floor(b/(Q+1)),v=Math.floor(b%(Q+1));return B.box(B.types.traf,B.box(B.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255])),B.box(B.types.tfdt,new Uint8Array([1,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,v>>24,v>>16&255,v>>8&255,v&255])),B.trun(f,g.length+16+20+8+16+8+8),g)},B.trak=function(f){return f.duration=f.duration||4294967295,B.box(B.types.trak,B.tkhd(f),B.mdia(f))},B.trex=function(f){var b=f.id;return B.box(B.types.trex,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},B.trun=function(f,b){var g=f.samples||[],i=g.length,l=12+16*i,v=new Uint8Array(l),h,d,E,o,n,s;for(b+=8+l,v.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,b>>>24&255,b>>>16&255,b>>>8&255,b&255],0),h=0;h<i;h++)d=g[h],E=d.duration,o=d.size,n=d.flags,s=d.cts,v.set([E>>>24&255,E>>>16&255,E>>>8&255,E&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*h);return B.box(B.types.trun,v)},B.initSegment=function(f){B.types||B.init();var b=B.moov(f),g=new Uint8Array(B.FTYP.byteLength+b.byteLength);return g.set(B.FTYP),g.set(b,B.FTYP.byteLength),g},B}();R.types=void 0,R.HDLR_TYPES=void 0,R.STTS=void 0,R.STSC=void 0,R.STCO=void 0,R.STSZ=void 0,R.VMHD=void 0,R.SMHD=void 0,R.STSD=void 0,R.FTYP=void 0,R.DINF=void 0,N.default=R},"./src/remux/mp4-remuxer.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return s}),O.d(N,"normalizePts",function(){return u});var Q=O("./src/polyfills/number.ts"),R=O("./src/remux/aac-helper.ts"),B=O("./src/remux/mp4-generator.ts"),D=O("./src/events.ts"),f=O("./src/errors.ts"),b=O("./src/utils/logger.ts"),g=O("./src/types/loader.ts"),i=O("./src/utils/timescale-conversion.ts");function l(){return l=Object.assign||function(M){for(var C=1;C<arguments.length;C++){var c=arguments[C];for(var r in c)Object.prototype.hasOwnProperty.call(c,r)&&(M[r]=c[r])}return M},l.apply(this,arguments)}var v=10*1e3,h=1024,d=1152,E=null,o=null,n=!1,s=function(){function M(c,r,a,A){if(A===void 0&&(A=""),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=c,this.config=r,this.typeSupported=a,this.ISGenerated=!1,E===null){var L=navigator.userAgent||"",T=L.match(/Chrome\/(\d+)/i);E=T?parseInt(T[1]):0}if(o===null){var w=navigator.userAgent.match(/Safari\/(\d+)/i);o=w?parseInt(w[1]):0}n=!!E&&E<75||!!o&&o<600}var C=M.prototype;return C.destroy=function(){},C.resetTimeStamp=function(r){b.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=r},C.resetNextTimestamp=function(){b.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},C.resetInitSegment=function(){b.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},C.getVideoStartPts=function(r){var a=!1,A=r.reduce(function(L,T){var w=T.pts-L;return w<-4294967296?(a=!0,u(L,T.pts)):w>0?L:T.pts},r[0].pts);return a&&b.logger.debug("PTS rollover detected"),A},C.remux=function(r,a,A,L,T,w,_,j){var W,Z,X,G,te,Y,le=T,Ae=T,Be=r.pid>-1,Ce=a.pid>-1,Se=a.samples.length,Fe=r.samples.length>0,Ve=Se>1,De=(!Be||Fe)&&(!Ce||Ve)||this.ISGenerated||_;if(De){this.ISGenerated||(X=this.generateIS(r,a,T));var Le=this.isVideoContiguous,tt=-1;if(Ve&&(tt=p(a.samples),!Le&&this.config.forceKeyFrameOnDiscontinuity))if(Y=!0,tt>0){b.logger.warn("[mp4-remuxer]: Dropped "+tt+" out of "+Se+" video samples due to a missing keyframe");var Et=this.getVideoStartPts(a.samples);a.samples=a.samples.slice(tt),a.dropped+=tt,Ae+=(a.samples[0].pts-Et)/(a.timescale||9e4)}else tt===-1&&(b.logger.warn("[mp4-remuxer]: No keyframe found out of "+Se+" video samples"),Y=!1);if(this.ISGenerated){if(Fe&&Ve){var Ie=this.getVideoStartPts(a.samples),Qe=u(r.samples[0].pts,Ie)-Ie,xe=Qe/a.inputTimeScale;le+=Math.max(0,xe),Ae+=Math.max(0,-xe)}if(Fe){if(r.samplerate||(b.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),X=this.generateIS(r,a,T)),Z=this.remuxAudio(r,le,this.isAudioContiguous,w,Ce||Ve||j===g.PlaylistLevelType.AUDIO?Ae:void 0),Ve){var ie=Z?Z.endPTS-Z.startPTS:0;a.inputTimeScale||(b.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),X=this.generateIS(r,a,T)),W=this.remuxVideo(a,Ae,Le,ie)}}else Ve&&(W=this.remuxVideo(a,Ae,Le,0));W&&(W.firstKeyFrame=tt,W.independent=tt!==-1)}}return this.ISGenerated&&(A.samples.length&&(te=this.remuxID3(A,T)),L.samples.length&&(G=this.remuxText(L,T))),{audio:Z,video:W,initSegment:X,independent:Y,text:G,id3:te}},C.generateIS=function(r,a,A){var L=r.samples,T=a.samples,w=this.typeSupported,_={},j=!Object(Q.isFiniteNumber)(this._initPTS),W="audio/mp4",Z,X,G;if(j&&(Z=X=Infinity),r.config&&L.length&&(r.timescale=r.samplerate,r.isAAC||(w.mpeg?(W="audio/mpeg",r.codec=""):w.mp3&&(r.codec="mp3")),_.audio={id:"audio",container:W,codec:r.codec,initSegment:!r.isAAC&&w.mpeg?new Uint8Array(0):B.default.initSegment([r]),metadata:{channelCount:r.channelCount}},j&&(G=r.inputTimeScale,Z=X=L[0].pts-Math.round(G*A))),a.sps&&a.pps&&T.length&&(a.timescale=a.inputTimeScale,_.video={id:"main",container:"video/mp4",codec:a.codec,initSegment:B.default.initSegment([a]),metadata:{width:a.width,height:a.height}},j)){G=a.inputTimeScale;var te=this.getVideoStartPts(T),Y=Math.round(G*A);X=Math.min(X,u(T[0].dts,te)-Y),Z=Math.min(Z,te-Y)}if(Object.keys(_).length)return this.ISGenerated=!0,j&&(this._initPTS=Z,this._initDTS=X),{tracks:_,initPTS:Z,timescale:G}},C.remuxVideo=function(r,a,A,L){var T=r.inputTimeScale,w=r.samples,_=[],j=w.length,W=this._initPTS,Z=this.nextAvcDts,X=8,G,te,Y,le=Number.POSITIVE_INFINITY,Ae=Number.NEGATIVE_INFINITY,Be=0,Ce=!1;if(!A||Z===null){var Se=a*T,Fe=w[0].pts-u(w[0].dts,w[0].pts);Z=Se-Fe}for(var Ve=0;Ve<j;Ve++){var De=w[Ve];if(De.pts=u(De.pts-W,Z),De.dts=u(De.dts-W,Z),De.dts>De.pts){var Le=9e4*.2;Be=Math.max(Math.min(Be,De.pts-De.dts),-1*Le)}De.dts<w[Ve>0?Ve-1:Ve].dts&&(Ce=!0)}Ce&&w.sort(function(Dt,dt){var it=Dt.dts-dt.dts,nt=Dt.pts-dt.pts;return it||nt}),te=w[0].dts,Y=w[w.length-1].dts;var tt=Math.round((Y-te)/(j-1));if(Be<0){if(Be<tt*-2){b.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(i.toMsFromMpegTsClock)(-tt,!0)+" ms");for(var Et=Be,Ie=0;Ie<j;Ie++)w[Ie].dts=Et=Math.max(Et,w[Ie].pts-tt),w[Ie].pts=Math.max(Et,w[Ie].pts)}else{b.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(i.toMsFromMpegTsClock)(Be,!0)+" ms to overcome this issue");for(var Qe=0;Qe<j;Qe++)w[Qe].dts=w[Qe].dts+Be}te=w[0].dts}if(A){var xe=te-Z,ie=xe>tt,$=xe<-1;if(ie||$){ie?b.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(xe,!0)+" ms ("+xe+"dts) hole between fragments detected, filling it"):b.logger.warn("AVC: "+Object(i.toMsFromMpegTsClock)(-xe,!0)+" ms ("+xe+"dts) overlapping between fragments detected"),te=Z;var re=w[0].pts-xe;w[0].dts=te,w[0].pts=re,b.logger.log("Video: First PTS/DTS adjusted: "+Object(i.toMsFromMpegTsClock)(re,!0)+"/"+Object(i.toMsFromMpegTsClock)(te,!0)+", delta: "+Object(i.toMsFromMpegTsClock)(xe,!0)+" ms")}}n&&(te=Math.max(0,te));for(var ce=0,be=0,Me=0;Me<j;Me++){for(var ke=w[Me],ct=ke.units,ut=ct.length,mt=0,pt=0;pt<ut;pt++)mt+=ct[pt].data.length;be+=mt,ce+=ut,ke.length=mt,ke.dts=Math.max(ke.dts,te),ke.pts=Math.max(ke.pts,ke.dts,0),le=Math.min(ke.pts,le),Ae=Math.max(ke.pts,Ae)}Y=w[j-1].dts;var Ot=be+4*ce+8,Ft;try{Ft=new Uint8Array(Ot)}catch(Dt){this.observer.emit(D.Events.ERROR,D.Events.ERROR,{type:f.ErrorTypes.MUX_ERROR,details:f.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ot,reason:"fail allocating video mdat "+Ot});return}var He=new DataView(Ft.buffer);He.setUint32(0,Ot),Ft.set(B.default.types.mdat,4);for(var Pe=0;Pe<j;Pe++){for(var at=w[Pe],vt=at.units,et=0,At=0,je=vt.length;At<je;At++){var _e=vt[At],Ue=_e.data,me=_e.data.byteLength;He.setUint32(X,me),X+=4,Ft.set(Ue,X),X+=me,et+=4+me}if(Pe<j-1)G=w[Pe+1].dts-at.dts;else{var ve=this.config,Ee=at.dts-w[Pe>0?Pe-1:Pe].dts;if(ve.stretchShortVideoTrack&&this.nextAudioPts!==null){var Oe=Math.floor(ve.maxBufferHole*T),Ye=(L?le+L*T:this.nextAudioPts)-at.pts;Ye>Oe?(G=Ye-Ee,G<0&&(G=Ee),b.logger.log("[mp4-remuxer]: It is approximately "+Ye/90+" ms to the next segment; using duration "+G/90+" ms for the last video frame.")):G=Ee}else G=Ee}var ze=Math.round(at.pts-at.dts);_.push(new S(at.key,G,et,ze))}if(_.length&&E&&E<70){var gt=_[0].flags;gt.dependsOn=2,gt.isNonSync=0}console.assert(G!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=Z=Y+G,this.isVideoContiguous=!0;var Lt=B.default.moof(r.sequenceNumber++,te,l({},r,{samples:_})),Pt="video",Rt={data1:Lt,data2:Ft,startPTS:le/T,endPTS:(Ae+G)/T,startDTS:te/T,endDTS:Z/T,type:Pt,hasAudio:!1,hasVideo:!0,nb:_.length,dropped:r.dropped};return r.samples=[],r.dropped=0,console.assert(Ft.length,"MDAT length must not be zero"),Rt},C.remuxAudio=function(r,a,A,L,T){var w=r.inputTimeScale,_=r.samplerate?r.samplerate:w,j=w/_,W=r.isAAC?h:d,Z=W*j,X=this._initPTS,G=!r.isAAC&&this.typeSupported.mpeg,te=[],Y=r.samples,le=G?0:8,Ae=this.nextAudioPts||-1,Be=a*w;if(this.isAudioContiguous=A=A||Y.length&&Ae>0&&(L&&Math.abs(Be-Ae)<9e3||Math.abs(u(Y[0].pts-X,Be)-Ae)<20*Z),Y.forEach(function(Ue){Ue.pts=u(Ue.pts-X,Be)}),!A||Ae<0){if(Y=Y.filter(function(Ue){return Ue.pts>=0}),!Y.length)return;T===0?Ae=0:L?Ae=Math.max(0,Be):Ae=Y[0].pts}if(r.isAAC)for(var Ce=T!==void 0,Se=this.config.maxAudioFramesDrift,Fe=0,Ve=Ae;Fe<Y.length;Fe++){var De=Y[Fe],Le=De.pts,tt=Le-Ve,Et=Math.abs(1e3*tt/w);if(tt<=-Se*Z&&Ce)Fe===0&&(b.logger.warn("Audio frame @ "+(Le/w).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*tt/w)+" ms."),this.nextAudioPts=Ae=Ve=Le);else if(tt>=Se*Z&&Et<v&&Ce){var Ie=Math.round(tt/Z);Ve=Le-Ie*Z,Ve<0&&(Ie--,Ve+=Z),Fe===0&&(this.nextAudioPts=Ae=Ve),b.logger.warn("[mp4-remuxer]: Injecting "+Ie+" audio frame @ "+(Ve/w).toFixed(3)+"s due to "+Math.round(1e3*tt/w)+" ms gap.");for(var Qe=0;Qe<Ie;Qe++){var xe=Math.max(Ve,0),ie=R.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);ie||(b.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ie=De.unit.subarray()),Y.splice(Fe,0,{unit:ie,pts:xe}),Ve+=Z,Fe++}}De.pts=Ve,Ve+=Z}for(var $=null,re=null,ce,be=0,Me=Y.length;Me--;)be+=Y[Me].unit.byteLength;for(var ke=0,ct=Y.length;ke<ct;ke++){var ut=Y[ke],mt=ut.unit,pt=ut.pts;if(re!==null){var Ot=te[ke-1];Ot.duration=Math.round((pt-re)/j)}else if(A&&r.isAAC&&(pt=Ae),$=pt,be>0){be+=le;try{ce=new Uint8Array(be)}catch(Ue){this.observer.emit(D.Events.ERROR,D.Events.ERROR,{type:f.ErrorTypes.MUX_ERROR,details:f.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:be,reason:"fail allocating audio mdat "+be});return}if(!G){var Ft=new DataView(ce.buffer);Ft.setUint32(0,be),ce.set(B.default.types.mdat,4)}}else return;ce.set(mt,le);var He=mt.byteLength;le+=He,te.push(new S(!0,W,He,0)),re=pt}var Pe=te.length;if(!Pe)return;var at=te[te.length-1];this.nextAudioPts=Ae=re+j*at.duration;var vt=G?new Uint8Array(0):B.default.moof(r.sequenceNumber++,$/j,l({},r,{samples:te}));r.samples=[];var et=$/w,At=Ae/w,je="audio",_e={data1:vt,data2:ce,startPTS:et,endPTS:At,startDTS:et,endDTS:At,type:je,hasAudio:!0,hasVideo:!1,nb:Pe};return this.isAudioContiguous=!0,console.assert(ce.length,"MDAT length must not be zero"),_e},C.remuxEmptyAudio=function(r,a,A,L){var T=r.inputTimeScale,w=r.samplerate?r.samplerate:T,_=T/w,j=this.nextAudioPts,W=(j!==null?j:L.startDTS*T)+this._initDTS,Z=L.endDTS*T+this._initDTS,X=_*h,G=Math.ceil((Z-W)/X),te=R.default.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);if(b.logger.warn("[mp4-remuxer]: remux empty Audio"),!te){b.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Y=[],le=0;le<G;le++){var Ae=W+le*X;Y.push({unit:te,pts:Ae,dts:Ae})}return r.samples=Y,this.remuxAudio(r,a,A,!1)},C.remuxID3=function(r,a){var A=r.samples.length;if(!A)return;for(var L=r.inputTimeScale,T=this._initPTS,w=this._initDTS,_=0;_<A;_++){var j=r.samples[_];j.pts=u(j.pts-T,a*L)/L,j.dts=u(j.dts-w,a*L)/L}var W=r.samples;return r.samples=[],{samples:W}},C.remuxText=function(r,a){var A=r.samples.length;if(!A)return;for(var L=r.inputTimeScale,T=this._initPTS,w=0;w<A;w++){var _=r.samples[w];_.pts=u(_.pts-T,a*L)/L}r.samples.sort(function(W,Z){return W.pts-Z.pts});var j=r.samples;return r.samples=[],{samples:j}},M}();function u(M,C){var c;if(C===null)return M;for(C<M?c=-8589934592:c=8589934592;Math.abs(M-C)>4294967296;)M+=c;return M}function p(M){for(var C=0;C<M.length;C++)if(M[C].key)return C;return-1}var S=function(C,c,r,a){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=c,this.size=r,this.cts=a,this.flags=new x(C)},x=function(C){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=C?2:1,this.isNonSync=C?0:1}},"./src/remux/passthrough-remuxer.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/polyfills/number.ts"),R=O("./src/utils/mp4-tools.ts"),B=O("./src/loader/fragment.ts"),D=O("./src/utils/logger.ts"),f=function(){function i(){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 l=i.prototype;return l.destroy=function(){},l.resetTimeStamp=function(h){this.initPTS=h,this.lastEndDTS=null},l.resetNextTimestamp=function(){this.lastEndDTS=null},l.resetInitSegment=function(h,d,E){this.audioCodec=d,this.videoCodec=E,this.generateInitSegment(h),this.emitInitSegment=!0},l.generateInitSegment=function(h){var d=this.audioCodec,E=this.videoCodec;if(!h||!h.byteLength){this.initTracks=void 0,this.initData=void 0;return}var o=this.initData=Object(R.parseInitSegment)(h);d||(d=g(o.audio,B.ElementaryStreamTypes.AUDIO)),E||(E=g(o.video,B.ElementaryStreamTypes.VIDEO));var n={};o.audio&&o.video?n.audiovideo={container:"video/mp4",codec:d+","+E,initSegment:h,id:"main"}:o.audio?n.audio={container:"audio/mp4",codec:d,initSegment:h,id:"audio"}:o.video?n.video={container:"video/mp4",codec:E,initSegment:h,id:"main"}:D.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},l.remux=function(h,d,E,o,n){var s=this.initPTS,u=this.lastEndDTS,p={audio:void 0,video:void 0,text:o,id3:E,initSegment:void 0};Object(Q.isFiniteNumber)(u)||(u=this.lastEndDTS=n||0);var S=d.samples;if(!S||!S.length)return p;var x={initPTS:void 0,timescale:1},M=this.initData;if((!M||!M.length)&&(this.generateInitSegment(S),M=this.initData),!M||!M.length)return D.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),p;this.emitInitSegment&&(x.tracks=this.initTracks,this.emitInitSegment=!1),Object(Q.isFiniteNumber)(s)||(this.initPTS=x.initPTS=s=b(M,S,u));var C=Object(R.getDuration)(S,M),c=u,r=C+c;Object(R.offsetStartDTS)(M,S,s),C>0?this.lastEndDTS=r:(D.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var a=!!M.audio,A=!!M.video,L="";a&&(L+="audio"),A&&(L+="video");var T={data1:S,startPTS:c,startDTS:c,endPTS:r,endDTS:r,type:L,hasAudio:a,hasVideo:A,nb:1,dropped:0};return p.audio=T.type==="audio"?T:void 0,p.video=T.type!=="audio"?T:void 0,p.text=o,p.id3=E,p.initSegment=x,p},i}(),b=function(l,v,h){return Object(R.getStartDTS)(l,v)-h};function g(i,l){var v=i==null?void 0:i.codec;return v&&v.length>4?v:v==="hvc1"?"hvc1.1.c.L120.90":v==="av01"?"av01.0.04M.08":v==="avc1"||l===B.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}N.default=f},"./src/task-loop.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return Q});var Q=function(){function R(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var B=R.prototype;return B.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},B.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},B.onHandlerDestroyed=function(){},B.hasInterval=function(){return!!this._tickInterval},B.hasNextTick=function(){return!!this._tickTimer},B.setInterval=function(f){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,f),!0)},B.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},B.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},B.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},B.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},B.doTick=function(){},R}()},"./src/types/cmcd.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"CMCDVersion",function(){return Q}),O.d(N,"CMCDObjectType",function(){return R}),O.d(N,"CMCDStreamingFormat",function(){return B}),O.d(N,"CMCDStreamType",function(){return D});var Q=1,R;(function(f){f.MANIFEST="m",f.AUDIO="a",f.VIDEO="v",f.MUXED="av",f.INIT="i",f.CAPTION="c",f.TIMED_TEXT="tt",f.KEY="k",f.OTHER="o"})(R||(R={}));var B;(function(f){f.DASH="d",f.HLS="h",f.SMOOTH="s",f.OTHER="o"})(B||(B={}));var D;(function(f){f.VOD="v",f.LIVE="l"})(D||(D={}))},"./src/types/level.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"HlsSkip",function(){return B}),O.d(N,"getSkipValue",function(){return D}),O.d(N,"HlsUrlParameters",function(){return f}),O.d(N,"Level",function(){return b});function Q(g,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(g,v.key,v)}}function R(g,i,l){return i&&Q(g.prototype,i),l&&Q(g,l),g}var B;(function(g){g.No="",g.Yes="YES",g.v2="v2"})(B||(B={}));function D(g,i){var l=g.canSkipUntil,v=g.canSkipDateRanges,h=g.endSN,d=i!==void 0?i-h:0;return l&&d<l?v?B.v2:B.Yes:B.No}var f=function(){function g(l,v,h){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=l,this.part=v,this.skip=h}var i=g.prototype;return i.addDirectives=function(v){var h=new self.URL(v);return this.msn!==void 0&&h.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&h.searchParams.set("_HLS_part",this.part.toString()),this.skip&&h.searchParams.set("_HLS_skip",this.skip),h.toString()},g}(),b=function(){function g(i){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=[i.url],this.attrs=i.attrs,this.bitrate=i.bitrate,i.details&&(this.details=i.details),this.id=i.id||0,this.name=i.name,this.width=i.width||0,this.height=i.height||0,this.audioCodec=i.audioCodec,this.videoCodec=i.videoCodec,this.unknownCodecs=i.unknownCodecs,this.codecSet=[i.videoCodec,i.audioCodec].filter(function(l){return l}).join(",").replace(/\.[^.,]+/g,"")}return R(g,[{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(l){var v=l%this.url.length;this._urlId!==v&&(this.details=void 0,this._urlId=v)}}]),g}()},"./src/types/loader.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"PlaylistContextType",function(){return Q}),O.d(N,"PlaylistLevelType",function(){return R});var Q;(function(B){B.MANIFEST="manifest",B.LEVEL="level",B.AUDIO_TRACK="audioTrack",B.SUBTITLE_TRACK="subtitleTrack"})(Q||(Q={}));var R;(function(B){B.MAIN="main",B.AUDIO="audio",B.SUBTITLE="subtitle"})(R||(R={}))},"./src/types/transmuxer.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"ChunkMetadata",function(){return Q});var Q=function(D,f,b,g,i,l){g===void 0&&(g=0),i===void 0&&(i=-1),l===void 0&&(l=!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=R(),this.buffering={audio:R(),video:R(),audiovideo:R()},this.level=D,this.sn=f,this.id=b,this.size=g,this.part=i,this.partial=l};function R(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"AttrList",function(){return B});var Q=/^(\d+)x(\d+)$/,R=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,B=function(){function D(b){typeof b=="string"&&(b=D.parseAttrList(b));for(var g in b)b.hasOwnProperty(g)&&(this[g]=b[g])}var f=D.prototype;return f.decimalInteger=function(g){var i=parseInt(this[g],10);return i>Number.MAX_SAFE_INTEGER?Infinity:i},f.hexadecimalInteger=function(g){if(this[g]){var i=(this[g]||"0x").slice(2);i=(i.length&1?"0":"")+i;for(var l=new Uint8Array(i.length/2),v=0;v<i.length/2;v++)l[v]=parseInt(i.slice(v*2,v*2+2),16);return l}else return null},f.hexadecimalIntegerAsNumber=function(g){var i=parseInt(this[g],16);return i>Number.MAX_SAFE_INTEGER?Infinity:i},f.decimalFloatingPoint=function(g){return parseFloat(this[g])},f.optionalFloat=function(g,i){var l=this[g];return l?parseFloat(l):i},f.enumeratedString=function(g){return this[g]},f.bool=function(g){return this[g]==="YES"},f.decimalResolution=function(g){var i=Q.exec(this[g]);return i===null?void 0:{width:parseInt(i[1],10),height:parseInt(i[2],10)}},D.parseAttrList=function(g){var i,l={},v='"';for(R.lastIndex=0;(i=R.exec(g))!==null;){var h=i[2];h.indexOf(v)===0&&h.lastIndexOf(v)===h.length-1&&(h=h.slice(1,-1)),l[i[1]]=h}return l},D}()},"./src/utils/binary-search.ts":function(J,N,O){"use strict";O.r(N);var Q={search:function(B,D){for(var f=0,b=B.length-1,g=null,i=null;f<=b;){g=(f+b)/2|0,i=B[g];var l=D(i);if(l>0)f=g+1;else if(l<0)b=g-1;else return i}return null}};N.default=Q},"./src/utils/buffer-helper.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"BufferHelper",function(){return B});var Q=O("./src/utils/logger.ts"),R={length:0,start:function(){return 0},end:function(){return 0}},B=function(){function D(){}return D.isBuffered=function(b,g){try{if(b){for(var i=D.getBuffered(b),l=0;l<i.length;l++)if(g>=i.start(l)&&g<=i.end(l))return!0}}catch(v){}return!1},D.bufferInfo=function(b,g,i){try{if(b){var l=D.getBuffered(b),v=[],h;for(h=0;h<l.length;h++)v.push({start:l.start(h),end:l.end(h)});return this.bufferedInfo(v,g,i)}}catch(d){}return{len:0,start:g,end:g,nextStart:void 0}},D.bufferedInfo=function(b,g,i){g=Math.max(0,g),b.sort(function(x,M){var C=x.start-M.start;return C||M.end-x.end});var l=[];if(i)for(var v=0;v<b.length;v++){var h=l.length;if(h){var d=l[h-1].end;b[v].start-d<i?b[v].end>d&&(l[h-1].end=b[v].end):l.push(b[v])}else l.push(b[v])}else l=b;for(var E=0,o,n=g,s=g,u=0;u<l.length;u++){var p=l[u].start,S=l[u].end;if(g+i>=p&&g<S)n=p,s=S,E=s-g;else if(g+i<p){o=p;break}}return{len:E,start:n||0,end:s||0,nextStart:o}},D.getBuffered=function(b){try{return b.buffered}catch(g){return Q.logger.log("failed to get media.buffered",g),R}},D}()},"./src/utils/cea-608-parser.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"Row",function(){return s}),O.d(N,"CaptionScreen",function(){return u});var Q=O("./src/utils/logger.ts"),R={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},B=function(r){var a=r;return R.hasOwnProperty(r)&&(a=R[r]),String.fromCharCode(a)},D=15,f=100,b={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},g={17:2,18:4,21:6,22:8,23:10,19:13,20:15},i={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},l={25:2,26:4,29:6,30:8,31:10,27:13,28:15},v=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],h;(function(c){c[c.ERROR=0]="ERROR",c[c.TEXT=1]="TEXT",c[c.WARNING=2]="WARNING",c[c.INFO=2]="INFO",c[c.DEBUG=3]="DEBUG",c[c.DATA=3]="DATA"})(h||(h={}));var d=function(){function c(){this.time=null,this.verboseLevel=h.ERROR}var r=c.prototype;return r.log=function(A,L){this.verboseLevel>=A&&Q.logger.log(this.time+" ["+A+"] "+L)},c}(),E=function(r){for(var a=[],A=0;A<r.length;A++)a.push(r[A].toString(16));return a},o=function(){function c(a,A,L,T,w){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=a||"white",this.underline=A||!1,this.italics=L||!1,this.background=T||"black",this.flash=w||!1}var r=c.prototype;return r.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},r.setStyles=function(A){for(var L=["foreground","underline","italics","background","flash"],T=0;T<L.length;T++){var w=L[T];A.hasOwnProperty(w)&&(this[w]=A[w])}},r.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},r.equals=function(A){return this.foreground===A.foreground&&this.underline===A.underline&&this.italics===A.italics&&this.background===A.background&&this.flash===A.flash},r.copy=function(A){this.foreground=A.foreground,this.underline=A.underline,this.italics=A.italics,this.background=A.background,this.flash=A.flash},r.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},c}(),n=function(){function c(a,A,L,T,w,_){this.uchar=void 0,this.penState=void 0,this.uchar=a||" ",this.penState=new o(A,L,T,w,_)}var r=c.prototype;return r.reset=function(){this.uchar=" ",this.penState.reset()},r.setChar=function(A,L){this.uchar=A,this.penState.copy(L)},r.setPenState=function(A){this.penState.copy(A)},r.equals=function(A){return this.uchar===A.uchar&&this.penState.equals(A.penState)},r.copy=function(A){this.uchar=A.uchar,this.penState.copy(A.penState)},r.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},c}(),s=function(){function c(a){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var A=0;A<f;A++)this.chars.push(new n);this.logger=a,this.pos=0,this.currPenState=new o}var r=c.prototype;return r.equals=function(A){for(var L=!0,T=0;T<f;T++)if(!this.chars[T].equals(A.chars[T])){L=!1;break}return L},r.copy=function(A){for(var L=0;L<f;L++)this.chars[L].copy(A.chars[L])},r.isEmpty=function(){for(var A=!0,L=0;L<f;L++)if(!this.chars[L].isEmpty()){A=!1;break}return A},r.setCursor=function(A){this.pos!==A&&(this.pos=A),this.pos<0?(this.logger.log(h.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>f&&(this.logger.log(h.DEBUG,"Too large cursor position "+this.pos),this.pos=f)},r.moveCursor=function(A){var L=this.pos+A;if(A>1)for(var T=this.pos+1;T<L+1;T++)this.chars[T].setPenState(this.currPenState);this.setCursor(L)},r.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},r.insertChar=function(A){A>=144&&this.backSpace();var L=B(A);if(this.pos>=f){this.logger.log(h.ERROR,"Cannot insert "+A.toString(16)+" ("+L+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(L,this.currPenState),this.moveCursor(1)},r.clearFromPos=function(A){var L;for(L=A;L<f;L++)this.chars[L].reset()},r.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},r.clearToEndOfRow=function(){this.clearFromPos(this.pos)},r.getTextString=function(){for(var A=[],L=!0,T=0;T<f;T++){var w=this.chars[T].uchar;w!==" "&&(L=!1),A.push(w)}return L?"":A.join("")},r.setPenStyles=function(A){this.currPenState.setStyles(A);var L=this.chars[this.pos];L.setPenState(this.currPenState)},c}(),u=function(){function c(a){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var A=0;A<D;A++)this.rows.push(new s(a));this.logger=a,this.currRow=D-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var r=c.prototype;return r.reset=function(){for(var A=0;A<D;A++)this.rows[A].clear();this.currRow=D-1},r.equals=function(A){for(var L=!0,T=0;T<D;T++)if(!this.rows[T].equals(A.rows[T])){L=!1;break}return L},r.copy=function(A){for(var L=0;L<D;L++)this.rows[L].copy(A.rows[L])},r.isEmpty=function(){for(var A=!0,L=0;L<D;L++)if(!this.rows[L].isEmpty()){A=!1;break}return A},r.backSpace=function(){var A=this.rows[this.currRow];A.backSpace()},r.clearToEndOfRow=function(){var A=this.rows[this.currRow];A.clearToEndOfRow()},r.insertChar=function(A){var L=this.rows[this.currRow];L.insertChar(A)},r.setPen=function(A){var L=this.rows[this.currRow];L.setPenStyles(A)},r.moveCursor=function(A){var L=this.rows[this.currRow];L.moveCursor(A)},r.setCursor=function(A){this.logger.log(h.INFO,"setCursor: "+A);var L=this.rows[this.currRow];L.setCursor(A)},r.setPAC=function(A){this.logger.log(h.INFO,"pacData = "+JSON.stringify(A));var L=A.row-1;if(this.nrRollUpRows&&L<this.nrRollUpRows-1&&(L=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==L){for(var T=0;T<D;T++)this.rows[T].clear();var w=this.currRow+1-this.nrRollUpRows,_=this.lastOutputScreen;if(_){var j=_.rows[w].cueStartTime,W=this.logger.time;if(j&&W!==null&&j<W)for(var Z=0;Z<this.nrRollUpRows;Z++)this.rows[L-this.nrRollUpRows+Z+1].copy(_.rows[w+Z])}}this.currRow=L;var X=this.rows[this.currRow];if(A.indent!==null){var G=A.indent,te=Math.max(G-1,0);X.setCursor(A.indent),A.color=X.chars[te].penState.foreground}var Y={foreground:A.color,underline:A.underline,italics:A.italics,background:"black",flash:!1};this.setPen(Y)},r.setBkgData=function(A){this.logger.log(h.INFO,"bkgData = "+JSON.stringify(A)),this.backSpace(),this.setPen(A),this.insertChar(32)},r.setRollUpRows=function(A){this.nrRollUpRows=A},r.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(h.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(h.TEXT,this.getDisplayText());var A=this.currRow+1-this.nrRollUpRows,L=this.rows.splice(A,1)[0];L.clear(),this.rows.splice(this.currRow,0,L),this.logger.log(h.INFO,"Rolling up")},r.getDisplayText=function(A){A=A||!1;for(var L=[],T="",w=-1,_=0;_<D;_++){var j=this.rows[_].getTextString();j&&(w=_+1,A?L.push("Row "+w+": '"+j+"'"):L.push(j.trim()))}return L.length>0&&(A?T="["+L.join(" | ")+"]":T=L.join(`
|
|
`)),T},r.getTextAndFormat=function(){return this.rows},c}(),p=function(){function c(a,A,L){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=a,this.outputFilter=A,this.mode=null,this.verbose=0,this.displayedMemory=new u(L),this.nonDisplayedMemory=new u(L),this.lastOutputScreen=new u(L),this.currRollUpRow=this.displayedMemory.rows[D-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=L}var r=c.prototype;return r.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[D-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},r.getHandler=function(){return this.outputFilter},r.setHandler=function(A){this.outputFilter=A},r.setPAC=function(A){this.writeScreen.setPAC(A)},r.setBkgData=function(A){this.writeScreen.setBkgData(A)},r.setMode=function(A){if(A===this.mode)return;this.mode=A,this.logger.log(h.INFO,"MODE="+A),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=A},r.insertChars=function(A){for(var L=0;L<A.length;L++)this.writeScreen.insertChar(A[L]);var T=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(h.INFO,T+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(h.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},r.ccRCL=function(){this.logger.log(h.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},r.ccBS=function(){if(this.logger.log(h.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},r.ccAOF=function(){},r.ccAON=function(){},r.ccDER=function(){this.logger.log(h.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},r.ccRU=function(A){this.logger.log(h.INFO,"RU("+A+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(A)},r.ccFON=function(){this.logger.log(h.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},r.ccRDC=function(){this.logger.log(h.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},r.ccTR=function(){this.logger.log(h.INFO,"TR"),this.setMode("MODE_TEXT")},r.ccRTD=function(){this.logger.log(h.INFO,"RTD"),this.setMode("MODE_TEXT")},r.ccEDM=function(){this.logger.log(h.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},r.ccCR=function(){this.logger.log(h.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},r.ccENM=function(){this.logger.log(h.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},r.ccEOC=function(){if(this.logger.log(h.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var A=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=A,this.writeScreen=this.nonDisplayedMemory,this.logger.log(h.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},r.ccTO=function(A){this.logger.log(h.INFO,"TO("+A+") - Tab Offset"),this.writeScreen.moveCursor(A)},r.ccMIDROW=function(A){var L={flash:!1};if(L.underline=A%2===1,L.italics=A>=46,L.italics)L.foreground="white";else{var T=Math.floor(A/2)-16,w=["white","green","blue","cyan","red","yellow","magenta"];L.foreground=w[T]}this.logger.log(h.INFO,"MIDROW: "+JSON.stringify(L)),this.writeScreen.setPen(L)},r.outputDataUpdate=function(A){A===void 0&&(A=!1);var L=this.logger.time;if(L===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=L:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,L,this.lastOutputScreen),A&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:L),this.lastOutputScreen.copy(this.displayedMemory))},r.cueSplitAtTime=function(A){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,A,this.displayedMemory),this.cueStartTime=A))},c}(),S=function(){function c(a,A,L){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var T=new d;this.channels=[null,new p(a,A,T),new p(a+1,L,T)],this.cmdHistory=C(),this.logger=T}var r=c.prototype;return r.getHandler=function(A){return this.channels[A].getHandler()},r.setHandler=function(A,L){this.channels[A].setHandler(L)},r.addData=function(A,L){var T,w,_,j=!1;this.logger.time=A;for(var W=0;W<L.length;W+=2){if(w=L[W]&127,_=L[W+1]&127,w===0&&_===0)continue;if(this.logger.log(h.DATA,"["+E([L[W],L[W+1]])+"] -> ("+E([w,_])+")"),T=this.parseCmd(w,_),T||(T=this.parseMidrow(w,_)),T||(T=this.parsePAC(w,_)),T||(T=this.parseBackgroundAttributes(w,_)),!T&&(j=this.parseChars(w,_),j)){var Z=this.currentChannel;if(Z&&Z>0){var X=this.channels[Z];X.insertChars(j)}else this.logger.log(h.WARNING,"No channel found yet. TEXT-MODE?")}!T&&!j&&this.logger.log(h.WARNING,"Couldn't parse cleaned data "+E([w,_])+" orig: "+E([L[W],L[W+1]]))}},r.parseCmd=function(A,L){var T=this.cmdHistory,w=(A===20||A===28||A===21||A===29)&&L>=32&&L<=47,_=(A===23||A===31)&&L>=33&&L<=35;if(!(w||_))return!1;if(M(A,L,T))return x(null,null,T),this.logger.log(h.DEBUG,"Repeated command ("+E([A,L])+") is dropped"),!0;var j=A===20||A===21||A===23?1:2,W=this.channels[j];return A===20||A===21||A===28||A===29?L===32?W.ccRCL():L===33?W.ccBS():L===34?W.ccAOF():L===35?W.ccAON():L===36?W.ccDER():L===37?W.ccRU(2):L===38?W.ccRU(3):L===39?W.ccRU(4):L===40?W.ccFON():L===41?W.ccRDC():L===42?W.ccTR():L===43?W.ccRTD():L===44?W.ccEDM():L===45?W.ccCR():L===46?W.ccENM():L===47&&W.ccEOC():W.ccTO(L-32),x(A,L,T),this.currentChannel=j,!0},r.parseMidrow=function(A,L){var T=0;if((A===17||A===25)&&L>=32&&L<=47){if(A===17?T=1:T=2,T!==this.currentChannel)return this.logger.log(h.ERROR,"Mismatch channel in midrow parsing"),!1;var w=this.channels[T];return w?(w.ccMIDROW(L),this.logger.log(h.DEBUG,"MIDROW ("+E([A,L])+")"),!0):!1}return!1},r.parsePAC=function(A,L){var T,w=this.cmdHistory,_=(A>=17&&A<=23||A>=25&&A<=31)&&L>=64&&L<=127,j=(A===16||A===24)&&L>=64&&L<=95;if(!(_||j))return!1;if(M(A,L,w))return x(null,null,w),!0;var W=A<=23?1:2;L>=64&&L<=95?T=W===1?b[A]:i[A]:T=W===1?g[A]:l[A];var Z=this.channels[W];return Z?(Z.setPAC(this.interpretPAC(T,L)),x(A,L,w),this.currentChannel=W,!0):!1},r.interpretPAC=function(A,L){var T,w={color:null,italics:!1,indent:null,underline:!1,row:A};return L>95?T=L-96:T=L-64,w.underline=(T&1)===1,T<=13?w.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(T/2)]:T<=15?(w.italics=!0,w.color="white"):w.indent=Math.floor((T-16)/2)*4,w},r.parseChars=function(A,L){var T,w=null,_=null;if(A>=25?(T=2,_=A-8):(T=1,_=A),_>=17&&_<=19){var j;_===17?j=L+80:_===18?j=L+112:j=L+144,this.logger.log(h.INFO,"Special char '"+B(j)+"' in channel "+T),w=[j]}else A>=32&&A<=127&&(w=L===0?[A]:[A,L]);if(w){var W=E(w);this.logger.log(h.DEBUG,"Char codes = "+W.join(",")),x(A,L,this.cmdHistory)}return w},r.parseBackgroundAttributes=function(A,L){var T=(A===16||A===24)&&L>=32&&L<=47,w=(A===23||A===31)&&L>=45&&L<=47;if(!(T||w))return!1;var _,j={};A===16||A===24?(_=Math.floor((L-32)/2),j.background=v[_],L%2===1&&(j.background=j.background+"_semi")):L===45?j.background="transparent":(j.foreground="black",L===47&&(j.underline=!0));var W=A<=23?1:2,Z=this.channels[W];return Z.setBkgData(j),x(A,L,this.cmdHistory),!0},r.reset=function(){for(var A=0;A<Object.keys(this.channels).length;A++){var L=this.channels[A];L&&L.reset()}this.cmdHistory=C()},r.cueSplitAtTime=function(A){for(var L=0;L<this.channels.length;L++){var T=this.channels[L];T&&T.cueSplitAtTime(A)}},c}();function x(c,r,a){a.a=c,a.b=r}function M(c,r,a){return a.a===c&&a.b===r}function C(){return{a:null,b:null}}N.default=S},"./src/utils/codecs.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"isCodecType",function(){return R}),O.d(N,"isCodecSupportedInMp4",function(){return B});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 R(D,f){var b=Q[f];return!!b&&b[D.slice(0,4)]===!0}function B(D,f){return MediaSource.isTypeSupported((f||"video")+'/mp4;codecs="'+D+'"')}},"./src/utils/cues.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/utils/vttparser.ts"),R=O("./src/utils/webvtt-parser.ts"),B=O("./src/utils/texttrack-utils.ts"),D=/\s/,f={newCue:function(g,i,l,v){for(var h=[],d,E,o,n,s,u=self.VTTCue||self.TextTrackCue,p=0;p<v.rows.length;p++)if(d=v.rows[p],o=!0,n=0,s="",!d.isEmpty()){for(var S=0;S<d.chars.length;S++)D.test(d.chars[S].uchar)&&o?n++:(s+=d.chars[S].uchar,o=!1);d.cueStartTime=i,i===l&&(l+=1e-4),n>=16?n--:n++;var x=Object(Q.fixLineBreaks)(s.trim()),M=Object(R.generateCueId)(i,l,x);(!g||!g.cues||!g.cues.getCueById(M))&&(E=new u(i,l,x),E.id=M,E.line=p+1,E.align="left",E.position=10+Math.min(80,Math.floor(n*8/32)*10),h.push(E))}return g&&h.length&&(h.sort(function(C,c){return C.line==="auto"||c.line==="auto"?0:C.line>8&&c.line>8?c.line-C.line:C.line-c.line}),h.forEach(function(C){return Object(B.addCueToTrack)(g,C)})),h}};N.default=f},"./src/utils/discontinuities.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"findFirstFragWithCC",function(){return D}),O.d(N,"shouldAlignOnDiscontinuities",function(){return f}),O.d(N,"findDiscontinuousReferenceFrag",function(){return b}),O.d(N,"adjustSlidingStart",function(){return i}),O.d(N,"alignStream",function(){return l}),O.d(N,"alignPDT",function(){return h}),O.d(N,"alignFragmentByPDTDelta",function(){return d}),O.d(N,"alignMediaPlaylistByPDT",function(){return E});var Q=O("./src/polyfills/number.ts"),R=O("./src/utils/logger.ts"),B=O("./src/controller/level-helper.ts");function D(o,n){for(var s=null,u=0,p=o.length;u<p;u++){var S=o[u];if(S&&S.cc===n){s=S;break}}return s}function f(o,n,s){return!!(n.details&&(s.endCC>s.startCC||o&&o.cc<s.startCC))}function b(o,n){var s=o.fragments,u=n.fragments;if(!u.length||!s.length){R.logger.log("No fragments to align");return}var p=D(s,u[0].cc);if(!p||p&&!p.startPTS){R.logger.log("No frag in previous level to align on");return}return p}function g(o,n){if(o){var s=o.start+n;o.start=o.startPTS=s,o.endPTS=s+o.duration}}function i(o,n){for(var s=n.fragments,u=0,p=s.length;u<p;u++)g(s[u],o);n.fragmentHint&&g(n.fragmentHint,o),n.alignedSliding=!0}function l(o,n,s){if(!n)return;v(o,s,n),!s.alignedSliding&&n.details&&h(s,n.details),!s.alignedSliding&&n.details&&!s.skippedSegments&&Object(B.adjustSliding)(n.details,s)}function v(o,n,s){if(f(o,s,n)){var u=b(s.details,n);u&&Object(Q.isFiniteNumber)(u.start)&&(R.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),i(u.start,n))}}function h(o,n){if(!n.fragments.length||!o.hasProgramDateTime||!n.hasProgramDateTime)return;var s=n.fragments[0].programDateTime,u=o.fragments[0].programDateTime,p=(u-s)/1e3+n.fragments[0].start;p&&Object(Q.isFiniteNumber)(p)&&(R.logger.log("Adjusting PTS using programDateTime delta "+(u-s)+"ms, sliding:"+p.toFixed(3)+" "+o.url+" "),i(p,o))}function d(o,n){var s=o.programDateTime;if(!s)return;var u=(s-n)/1e3;o.start=o.startPTS=u,o.endPTS=u+o.duration}function E(o,n){if(!n.fragments.length||!o.hasProgramDateTime||!n.hasProgramDateTime)return;var s=n.fragments[0].programDateTime,u=n.fragments[0].start,p=s-u*1e3;o.fragments.forEach(function(S){d(S,p)}),o.fragmentHint&&d(o.fragmentHint,p),o.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/utils/ewma.ts"),R=function(){function B(f,b,g){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=g,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Q.default(f),this.fast_=new Q.default(b)}var D=B.prototype;return D.update=function(b,g){var i=this.slow_,l=this.fast_;this.slow_.halfLife!==b&&(this.slow_=new Q.default(b,i.getEstimate(),i.getTotalWeight())),this.fast_.halfLife!==g&&(this.fast_=new Q.default(g,l.getEstimate(),l.getTotalWeight()))},D.sample=function(b,g){b=Math.max(b,this.minDelayMs_);var i=8*g,l=b/1e3,v=i/l;this.fast_.sample(l,v),this.slow_.sample(l,v)},D.canEstimate=function(){var b=this.fast_;return b&&b.getTotalWeight()>=this.minWeight_},D.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},D.destroy=function(){},B}();N.default=R},"./src/utils/ewma.ts":function(J,N,O){"use strict";O.r(N);var Q=function(){function R(D,f,b){f===void 0&&(f=0),b===void 0&&(b=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=D,this.alpha_=D?Math.exp(Math.log(.5)/D):0,this.estimate_=f,this.totalWeight_=b}var B=R.prototype;return B.sample=function(f,b){var g=Math.pow(this.alpha_,f);this.estimate_=b*(1-g)+g*this.estimate_,this.totalWeight_+=f},B.getTotalWeight=function(){return this.totalWeight_},B.getEstimate=function(){if(this.alpha_){var f=1-Math.pow(this.alpha_,this.totalWeight_);if(f)return this.estimate_/f}return this.estimate_},R}();N.default=Q},"./src/utils/fetch-loader.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"fetchSupported",function(){return d});var Q=O("./src/polyfills/number.ts"),R=O("./src/loader/load-stats.ts"),B=O("./src/demux/chunk-cache.ts");function D(u,p){u.prototype=Object.create(p.prototype),u.prototype.constructor=u,l(u,p)}function f(u){var p=typeof Map=="function"?new Map:void 0;return f=function(x){if(x===null||!i(x))return x;if(typeof x!="function")throw new TypeError("Super expression must either be null or a function");if(typeof p!="undefined"){if(p.has(x))return p.get(x);p.set(x,M)}function M(){return b(x,arguments,v(this).constructor)}return M.prototype=Object.create(x.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),l(M,x)},f(u)}function b(u,p,S){return g()?b=Reflect.construct:b=function(M,C,c){var r=[null];r.push.apply(r,C);var a=Function.bind.apply(M,r),A=new a;return c&&l(A,c.prototype),A},b.apply(null,arguments)}function g(){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 i(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function l(u,p){return l=Object.setPrototypeOf||function(x,M){return x.__proto__=M,x},l(u,p)}function v(u){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)},v(u)}function h(){return h=Object.assign||function(u){for(var p=1;p<arguments.length;p++){var S=arguments[p];for(var x in S)Object.prototype.hasOwnProperty.call(S,x)&&(u[x]=S[x])}return u},h.apply(this,arguments)}function d(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(u){}return!1}var E=function(){function u(S){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=S.fetchSetup||n,this.controller=new self.AbortController,this.stats=new R.LoadStats}var p=u.prototype;return p.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},p.abortInternal=function(){var x=this.response;(!x||!x.ok)&&(this.stats.aborted=!0,this.controller.abort())},p.abort=function(){var x;this.abortInternal(),(x=this.callbacks)!==null&&x!==void 0&&x.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},p.load=function(x,M,C){var c=this,r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();var a=o(x,this.controller.signal),A=C.onProgress,L=x.responseType==="arraybuffer",T=L?"byteLength":"length";this.context=x,this.config=M,this.callbacks=C,this.request=this.fetchSetup(x,a),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){c.abortInternal(),C.onTimeout(r,x,c.response)},M.timeout),self.fetch(this.request).then(function(w){if(c.response=c.loader=w,!w.ok){var _=w.status,j=w.statusText;throw new s(j||"fetch, bad network response",_,w)}return r.loading.first=Math.max(self.performance.now(),r.loading.start),r.total=parseInt(w.headers.get("Content-Length")||"0"),A&&Object(Q.isFiniteNumber)(M.highWaterMark)?c.loadProgressively(w,r,x,M.highWaterMark,A):L?w.arrayBuffer():w.text()}).then(function(w){var _=c.response;self.clearTimeout(c.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first),r.loaded=r.total=w[T];var j={url:_.url,data:w};A&&!Object(Q.isFiniteNumber)(M.highWaterMark)&&A(r,x,w,_),C.onSuccess(j,r,x,_)}).catch(function(w){if(self.clearTimeout(c.requestTimeout),r.aborted)return;var _=w.code||0;C.onError({code:_,text:w.message},x,w.details)})},p.getCacheAge=function(){var x=null;if(this.response){var M=this.response.headers.get("age");x=M?parseFloat(M):null}return x},p.loadProgressively=function(x,M,C,c,r){c===void 0&&(c=0);var a=new B.default,A=x.body.getReader(),L=function T(){return A.read().then(function(w){if(w.done)return a.dataLength&&r(M,C,a.flush(),x),Promise.resolve(new ArrayBuffer(0));var _=w.value,j=_.length;return M.loaded+=j,j<c||a.dataLength?(a.push(_),a.dataLength>=c&&r(M,C,a.flush(),x)):r(M,C,_,x),T()}).catch(function(){return Promise.reject()})};return L()},u}();function o(u,p){var S={method:"GET",mode:"cors",credentials:"same-origin",signal:p,headers:new self.Headers(h({},u.headers))};return u.rangeEnd&&S.headers.set("Range","bytes="+u.rangeStart+"-"+String(u.rangeEnd-1)),S}function n(u,p){return new self.Request(u.url,p)}var s=function(u){D(p,u);function p(S,x,M){var C;return C=u.call(this,S)||this,C.code=void 0,C.details=void 0,C.code=x,C.details=M,C}return p}(f(Error));N.default=E},"./src/utils/imsc1-ttml-parser.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"IMSC1_CODEC",function(){return i}),O.d(N,"parseIMSC1",function(){return d});var Q=O("./src/utils/mp4-tools.ts"),R=O("./src/utils/vttparser.ts"),B=O("./src/utils/vttcue.ts"),D=O("./src/demux/id3.ts"),f=O("./src/utils/timescale-conversion.ts"),b=O("./src/utils/webvtt-parser.ts");function g(){return g=Object.assign||function(c){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var A in a)Object.prototype.hasOwnProperty.call(a,A)&&(c[A]=a[A])}return c},g.apply(this,arguments)}var i="stpp.ttml.im1t",l=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,v=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,h={left:"start",center:"center",right:"end",start:"start",end:"end"};function d(c,r,a,A,L){var T=Object(Q.findBox)(new Uint8Array(c),["mdat"]);if(T.length===0){L(new Error("Could not parse IMSC1 mdat"));return}var w=T[0],_=Object(D.utf8ArrayToStr)(new Uint8Array(c,w.start,w.end-w.start)),j=Object(f.toTimescaleFromScale)(r,1,a);try{A(E(_,j))}catch(W){L(W)}}function E(c,r){var a=new DOMParser,A=a.parseFromString(c,"text/xml"),L=A.getElementsByTagName("tt")[0];if(!L)throw new Error("Invalid ttml");var T={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},w=Object.keys(T).reduce(function(X,G){return X[G]=L.getAttribute("ttp:"+G)||T[G],X},{}),_=L.getAttribute("xml:space")!=="preserve",j=n(o(L,"styling","style")),W=n(o(L,"layout","region")),Z=o(L,"body","[begin]");return[].map.call(Z,function(X){var G=s(X,_);if(!G||!X.hasAttribute("begin"))return null;var te=x(X.getAttribute("begin"),w),Y=x(X.getAttribute("dur"),w),le=x(X.getAttribute("end"),w);if(te===null)throw S(X);if(le===null){if(Y===null)throw S(X);le=te+Y}var Ae=new B.default(te-r,le-r,G);Ae.id=Object(b.generateCueId)(Ae.startTime,Ae.endTime,Ae.text);var Be=W[X.getAttribute("region")],Ce=j[X.getAttribute("style")];Ae.position=10,Ae.size=80;var Se=u(Be,Ce),Fe=Se.textAlign;if(Fe){var Ve=h[Fe];Ve&&(Ae.lineAlign=Ve),Ae.align=Fe}return g(Ae,Se),Ae}).filter(function(X){return X!==null})}function o(c,r,a){var A=c.getElementsByTagName(r)[0];return A?[].slice.call(A.querySelectorAll(a)):[]}function n(c){return c.reduce(function(r,a){var A=a.getAttribute("xml:id");return A&&(r[A]=a),r},{})}function s(c,r){return[].slice.call(c.childNodes).reduce(function(a,A,L){var T;return A.nodeName==="br"&&L?a+`
|
|
`:(T=A.childNodes)!==null&&T!==void 0&&T.length?s(A,r):r?a+A.textContent.trim().replace(/\s+/g," "):a+A.textContent},"")}function u(c,r){var a="http://www.w3.org/ns/ttml#styling",A=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return A.reduce(function(L,T){var w=p(r,a,T)||p(c,a,T);return w&&(L[T]=w),L},{})}function p(c,r,a){return c.hasAttributeNS(r,a)?c.getAttributeNS(r,a):null}function S(c){return new Error("Could not parse ttml timestamp "+c)}function x(c,r){if(!c)return null;var a=Object(R.parseTimeStamp)(c);return a===null&&(l.test(c)?a=M(c,r):v.test(c)&&(a=C(c,r))),a}function M(c,r){var a=l.exec(c),A=(a[4]|0)+(a[5]|0)/r.subFrameRate;return(a[1]|0)*3600+(a[2]|0)*60+(a[3]|0)+A/r.frameRate}function C(c,r){var a=v.exec(c),A=Number(a[1]),L=a[2];switch(L){case"h":return A*3600;case"m":return A*60;case"ms":return A*1e3;case"f":return A/r.frameRate;case"t":return A/r.tickRate}return A}},"./src/utils/logger.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"enableLogs",function(){return b}),O.d(N,"logger",function(){return g});var Q=function(){},R={trace:Q,debug:Q,log:Q,warn:Q,info:Q,error:Q},B=R;function D(i){var l=self.console[i];return l?l.bind(self.console,"["+i+"] >"):Q}function f(i){for(var l=arguments.length,v=new Array(l>1?l-1:0),h=1;h<l;h++)v[h-1]=arguments[h];v.forEach(function(d){B[d]=i[d]?i[d].bind(i):D(d)})}function b(i){if(self.console&&i===!0||typeof i=="object"){f(i,"debug","log","info","warn","error");try{B.log()}catch(l){B=R}}else B=R}var g=B},"./src/utils/mediakeys-helper.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"KeySystems",function(){return Q}),O.d(N,"requestMediaKeySystemAccess",function(){return R});var Q;(function(B){B.WIDEVINE="com.widevine.alpha",B.PLAYREADY="com.microsoft.playready"})(Q||(Q={}));var R=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"getMediaSource",function(){return Q});function Q(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"bin2str",function(){return f}),O.d(N,"readUint16",function(){return b}),O.d(N,"readUint32",function(){return g}),O.d(N,"writeUint32",function(){return i}),O.d(N,"findBox",function(){return l}),O.d(N,"parseSegmentIndex",function(){return v}),O.d(N,"parseInitSegment",function(){return h}),O.d(N,"getStartDTS",function(){return d}),O.d(N,"getDuration",function(){return E}),O.d(N,"computeRawDurationFromSamples",function(){return o}),O.d(N,"offsetStartDTS",function(){return n}),O.d(N,"segmentValidRange",function(){return s}),O.d(N,"appendUint8Array",function(){return u});var Q=O("./src/utils/typed-array.ts"),R=O("./src/loader/fragment.ts"),B=Math.pow(2,32)-1,D=[].push;function f(p){return String.fromCharCode.apply(null,p)}function b(p,S){"data"in p&&(S+=p.start,p=p.data);var x=p[S]<<8|p[S+1];return x<0?65536+x:x}function g(p,S){"data"in p&&(S+=p.start,p=p.data);var x=p[S]<<24|p[S+1]<<16|p[S+2]<<8|p[S+3];return x<0?4294967296+x:x}function i(p,S,x){"data"in p&&(S+=p.start,p=p.data),p[S]=x>>24,p[S+1]=x>>16&255,p[S+2]=x>>8&255,p[S+3]=x&255}function l(p,S){var x=[];if(!S.length)return x;var M,C,c;"data"in p?(M=p.data,C=p.start,c=p.end):(M=p,C=0,c=M.byteLength);for(var r=C;r<c;){var a=g(M,r),A=f(M.subarray(r+4,r+8)),L=a>1?r+a:c;if(A===S[0])if(S.length===1)x.push({data:M,start:r+8,end:L});else{var T=l({data:M,start:r+8,end:L},S.slice(1));T.length&&D.apply(x,T)}r=L}return x}function v(p){var S=l(p,["moov"]),x=S[0],M=x?x.end:null,C=l(p,["sidx"]);if(!C||!C[0])return null;var c=[],r=C[0],a=r.data[0],A=a===0?8:16,L=g(r,A);A+=4;var T=0,w=0;a===0?A+=8:A+=16,A+=2;var _=r.end+w,j=b(r,A);A+=2;for(var W=0;W<j;W++){var Z=A,X=g(r,Z);Z+=4;var G=X&2147483647,te=(X&2147483648)>>>31;if(te===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Y=g(r,Z);Z+=4,c.push({referenceSize:G,subsegmentDuration:Y,info:{duration:Y/L,start:_,end:_+G-1}}),_+=G,Z+=4,A=Z}return{earliestPresentationTime:T,timescale:L,version:a,referencesCount:j,references:c,moovEndOffset:M}}function h(p){for(var S=[],x=l(p,["moov","trak"]),M=0;M<x.length;M++){var C=x[M],c=l(C,["tkhd"])[0];if(c){var r=c.data[c.start],a=r===0?12:20,A=g(c,a),L=l(C,["mdia","mdhd"])[0];if(L){r=L.data[L.start],a=r===0?12:20;var T=g(L,a),w=l(C,["mdia","hdlr"])[0];if(w){var _=f(w.data.subarray(w.start+8,w.start+12)),j={soun:R.ElementaryStreamTypes.AUDIO,vide:R.ElementaryStreamTypes.VIDEO}[_];if(j){var W=l(C,["mdia","minf","stbl","stsd"])[0],Z=void 0;W&&(Z=f(W.data.subarray(W.start+12,W.start+16))),S[A]={timescale:T,type:j},S[j]={timescale:T,id:A,codec:Z}}}}}}var X=l(p,["moov","mvex","trex"]);return X.forEach(function(G){var te=g(G,4),Y=S[te];Y&&(Y.default={duration:g(G,12),flags:g(G,20)})}),S}function d(p,S){return l(S,["moof","traf"]).reduce(function(x,M){var C=l(M,["tfdt"])[0],c=C.data[C.start],r=l(M,["tfhd"]).reduce(function(a,A){var L=g(A,4),T=p[L];if(T){var w=g(C,4);c===1&&(w*=Math.pow(2,32),w+=g(C,8));var _=T.timescale||9e4,j=w/_;if(isFinite(j)&&(a===null||j<a))return j}return a},null);return r!==null&&isFinite(r)&&(x===null||r<x)?r:x},null)||0}function E(p,S){for(var x=0,M=0,C=0,c=l(p,["moof","traf"]),r=0;r<c.length;r++){var a=c[r],A=l(a,["tfhd"])[0],L=g(A,4),T=S[L];if(!T)continue;var w=T.default,_=g(A,0)|(w==null?void 0:w.flags),j=w==null?void 0:w.duration;_&8&&(_&2?j=g(A,12):j=g(A,8));for(var W=T.timescale||9e4,Z=l(a,["trun"]),X=0;X<Z.length;X++){if(j){var G=g(Z[X],4);x=j*G}else x=o(Z[X]);T.type===R.ElementaryStreamTypes.VIDEO?M+=x/W:T.type===R.ElementaryStreamTypes.AUDIO&&(C+=x/W)}}if(M===0&&C===0){var te=v(p);if(te!=null&&te.references)return te.references.reduce(function(Y,le){return Y+le.info.duration||0},0)}return M||C}function o(p){var S=g(p,0),x=8;S&1&&(x+=4),S&4&&(x+=4);for(var M=0,C=g(p,4),c=0;c<C;c++){if(S&256){var r=g(p,x);M+=r,x+=4}S&512&&(x+=4),S&1024&&(x+=4),S&2048&&(x+=4)}return M}function n(p,S,x){l(S,["moof","traf"]).forEach(function(M){l(M,["tfhd"]).forEach(function(C){var c=g(C,4),r=p[c];if(!r)return;var a=r.timescale||9e4;l(M,["tfdt"]).forEach(function(A){var L=A.data[A.start],T=g(A,4);if(L===0)i(A,4,T-x*a);else{T*=Math.pow(2,32),T+=g(A,8),T-=x*a,T=Math.max(T,0);var w=Math.floor(T/(B+1)),_=Math.floor(T%(B+1));i(A,4,w),i(A,8,_)}})})})}function s(p){var S={valid:null,remainder:null},x=l(p,["moof"]);if(x){if(x.length<2)return S.remainder=p,S}else return S;var M=x[x.length-1];return S.valid=Object(Q.sliceUint8)(p,0,M.start-8),S.remainder=Object(Q.sliceUint8)(p,M.start-8),S}function u(p,S){var x=new Uint8Array(p.length+S.length);return x.set(p),x.set(S,p.length),x}},"./src/utils/output-filter.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"default",function(){return Q});var Q=function(){function R(D,f){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=D,this.trackName=f}var B=R.prototype;return B.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},B.newCue=function(f,b,g){(this.startTime===null||this.startTime>f)&&(this.startTime=f),this.endTime=b,this.screen=g,this.timelineController.createCaptionsTrack(this.trackName)},B.reset=function(){this.cueRanges=[]},R}()},"./src/utils/texttrack-utils.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"sendAddTrackEvent",function(){return R}),O.d(N,"addCueToTrack",function(){return B}),O.d(N,"clearCurrentCues",function(){return D}),O.d(N,"removeCuesInRange",function(){return f}),O.d(N,"getCuesInRange",function(){return g});var Q=O("./src/utils/logger.ts");function R(i,l){var v;try{v=new Event("addtrack")}catch(h){v=document.createEvent("Event"),v.initEvent("addtrack",!1,!1)}v.track=i,l.dispatchEvent(v)}function B(i,l){var v=i.mode;if(v==="disabled"&&(i.mode="hidden"),i.cues&&!i.cues.getCueById(l.id))try{if(i.addCue(l),!i.cues.getCueById(l.id))throw new Error("addCue is failed for: "+l)}catch(d){Q.logger.debug("[texttrack-utils]: "+d);var h=new self.TextTrackCue(l.startTime,l.endTime,l.text);h.id=l.id,i.addCue(h)}v==="disabled"&&(i.mode=v)}function D(i){var l=i.mode;if(l==="disabled"&&(i.mode="hidden"),i.cues)for(var v=i.cues.length;v--;)i.removeCue(i.cues[v]);l==="disabled"&&(i.mode=l)}function f(i,l,v){var h=i.mode;if(h==="disabled"&&(i.mode="hidden"),i.cues&&i.cues.length>0)for(var d=g(i.cues,l,v),E=0;E<d.length;E++)i.removeCue(d[E]);h==="disabled"&&(i.mode=h)}function b(i,l){if(l<i[0].startTime)return 0;var v=i.length-1;if(l>i[v].endTime)return-1;for(var h=0,d=v;h<=d;){var E=Math.floor((d+h)/2);if(l<i[E].startTime)d=E-1;else if(l>i[E].startTime&&h<v)h=E+1;else return E}return i[h].startTime-l<l-i[d].startTime?h:d}function g(i,l,v){var h=[],d=b(i,l);if(d>-1)for(var E=d,o=i.length;E<o;E++){var n=i[E];if(n.startTime>=l&&n.endTime<=v)h.push(n);else if(n.startTime>v)return h}return h}},"./src/utils/time-ranges.ts":function(J,N,O){"use strict";O.r(N);var Q={toString:function(B){for(var D="",f=B.length,b=0;b<f;b++)D+="["+B.start(b).toFixed(3)+","+B.end(b).toFixed(3)+"]";return D}};N.default=Q},"./src/utils/timescale-conversion.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"toTimescaleFromBase",function(){return R}),O.d(N,"toTimescaleFromScale",function(){return B}),O.d(N,"toMsFromMpegTsClock",function(){return D}),O.d(N,"toMpegTsClockFromTimescale",function(){return f});var Q=9e4;function R(b,g,i,l){i===void 0&&(i=1),l===void 0&&(l=!1);var v=b*g*i;return l?Math.round(v):v}function B(b,g,i,l){return i===void 0&&(i=1),l===void 0&&(l=!1),R(b,g,1/i,l)}function D(b,g){return g===void 0&&(g=!1),R(b,1e3,1/Q,g)}function f(b,g){return g===void 0&&(g=1),R(b,Q,1/g)}},"./src/utils/typed-array.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"sliceUint8",function(){return Q});function Q(R,B,D){return Uint8Array.prototype.slice?R.slice(B,D):new Uint8Array(Array.prototype.slice.call(R,B,D))}},"./src/utils/vttcue.ts":function(J,N,O){"use strict";O.r(N),N.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var Q=["","lr","rl"],R=["start","middle","end","left","right"];function B(i,l){if(typeof l!="string")return!1;if(!Array.isArray(i))return!1;var v=l.toLowerCase();return~i.indexOf(v)?v:!1}function D(i){return B(Q,i)}function f(i){return B(R,i)}function b(i){for(var l=arguments.length,v=new Array(l>1?l-1:0),h=1;h<l;h++)v[h-1]=arguments[h];for(var d=1;d<arguments.length;d++){var E=arguments[d];for(var o in E)i[o]=E[o]}return i}function g(i,l,v){var h=this,d={enumerable:!0};h.hasBeenReset=!1;var E="",o=!1,n=i,s=l,u=v,p=null,S="",x=!0,M="auto",C="start",c=50,r="middle",a=50,A="middle";Object.defineProperty(h,"id",b({},d,{get:function(){return E},set:function(T){E=""+T}})),Object.defineProperty(h,"pauseOnExit",b({},d,{get:function(){return o},set:function(T){o=!!T}})),Object.defineProperty(h,"startTime",b({},d,{get:function(){return n},set:function(T){if(typeof T!="number")throw new TypeError("Start time must be set to a number.");n=T,this.hasBeenReset=!0}})),Object.defineProperty(h,"endTime",b({},d,{get:function(){return s},set:function(T){if(typeof T!="number")throw new TypeError("End time must be set to a number.");s=T,this.hasBeenReset=!0}})),Object.defineProperty(h,"text",b({},d,{get:function(){return u},set:function(T){u=""+T,this.hasBeenReset=!0}})),Object.defineProperty(h,"region",b({},d,{get:function(){return p},set:function(T){p=T,this.hasBeenReset=!0}})),Object.defineProperty(h,"vertical",b({},d,{get:function(){return S},set:function(T){var w=D(T);if(w===!1)throw new SyntaxError("An invalid or illegal string was specified.");S=w,this.hasBeenReset=!0}})),Object.defineProperty(h,"snapToLines",b({},d,{get:function(){return x},set:function(T){x=!!T,this.hasBeenReset=!0}})),Object.defineProperty(h,"line",b({},d,{get:function(){return M},set:function(T){if(typeof T!="number"&&T!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");M=T,this.hasBeenReset=!0}})),Object.defineProperty(h,"lineAlign",b({},d,{get:function(){return C},set:function(T){var w=f(T);if(!w)throw new SyntaxError("An invalid or illegal string was specified.");C=w,this.hasBeenReset=!0}})),Object.defineProperty(h,"position",b({},d,{get:function(){return c},set:function(T){if(T<0||T>100)throw new Error("Position must be between 0 and 100.");c=T,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",b({},d,{get:function(){return r},set:function(T){var w=f(T);if(!w)throw new SyntaxError("An invalid or illegal string was specified.");r=w,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",b({},d,{get:function(){return a},set:function(T){if(T<0||T>100)throw new Error("Size must be between 0 and 100.");a=T,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",b({},d,{get:function(){return A},set:function(T){var w=f(T);if(!w)throw new SyntaxError("An invalid or illegal string was specified.");A=w,this.hasBeenReset=!0}})),h.displayState=void 0}return g.prototype.getCueAsHTML=function(){var i=self.WebVTT;return i.convertCueToDOMTree(self,this.text)},g}()},"./src/utils/vttparser.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"parseTimeStamp",function(){return B}),O.d(N,"fixLineBreaks",function(){return l}),O.d(N,"VTTParser",function(){return v});var Q=O("./src/utils/vttcue.ts"),R=function(){function h(){}var d=h.prototype;return d.decode=function(o,n){if(!o)return"";if(typeof o!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(o))},h}();function B(h){function d(o,n,s,u){return(o|0)*3600+(n|0)*60+(s|0)+parseFloat(u||0)}var E=h.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return E?parseFloat(E[2])>59?d(E[2],E[3],0,E[4]):d(E[1],E[2],E[3],E[4]):null}var D=function(){function h(){this.values=Object.create(null)}var d=h.prototype;return d.set=function(o,n){!this.get(o)&&n!==""&&(this.values[o]=n)},d.get=function(o,n,s){return s?this.has(o)?this.values[o]:n[s]:this.has(o)?this.values[o]:n},d.has=function(o){return o in this.values},d.alt=function(o,n,s){for(var u=0;u<s.length;++u)if(n===s[u]){this.set(o,n);break}},d.integer=function(o,n){/^-?\d+$/.test(n)&&this.set(o,parseInt(n,10))},d.percent=function(o,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var s=parseFloat(n);if(s>=0&&s<=100)return this.set(o,s),!0}return!1},h}();function f(h,d,E,o){var n=o?h.split(o):[h];for(var s in n){if(typeof n[s]!="string")continue;var u=n[s].split(E);if(u.length!==2)continue;var p=u[0],S=u[1];d(p,S)}}var b=new Q.default(0,0,""),g=b.align==="middle"?"middle":"center";function i(h,d,E){var o=h;function n(){var p=B(h);if(p===null)throw new Error("Malformed timestamp: "+o);return h=h.replace(/^[^\sa-zA-Z-]+/,""),p}function s(p,S){var x=new D;f(p,function(c,r){var a;switch(c){case"region":for(var A=E.length-1;A>=0;A--)if(E[A].id===r){x.set(c,E[A].region);break}break;case"vertical":x.alt(c,r,["rl","lr"]);break;case"line":a=r.split(","),x.integer(c,a[0]),x.percent(c,a[0])&&x.set("snapToLines",!1),x.alt(c,a[0],["auto"]),a.length===2&&x.alt("lineAlign",a[1],["start",g,"end"]);break;case"position":a=r.split(","),x.percent(c,a[0]),a.length===2&&x.alt("positionAlign",a[1],["start",g,"end","line-left","line-right","auto"]);break;case"size":x.percent(c,r);break;case"align":x.alt(c,r,["start",g,"end","left","right"]);break}},/:/,/\s/),S.region=x.get("region",null),S.vertical=x.get("vertical","");var M=x.get("line","auto");M==="auto"&&b.line===-1&&(M=-1),S.line=M,S.lineAlign=x.get("lineAlign","start"),S.snapToLines=x.get("snapToLines",!0),S.size=x.get("size",100),S.align=x.get("align",g);var C=x.get("position","auto");C==="auto"&&b.position===50&&(C=S.align==="start"||S.align==="left"?0:S.align==="end"||S.align==="right"?100:50),S.position=C}function u(){h=h.replace(/^\s+/,"")}if(u(),d.startTime=n(),u(),h.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+o);h=h.substr(3),u(),d.endTime=n(),u(),s(h,d)}function l(h){return h.replace(/<br(?: \/)?>/gi,`
|
|
`)}var v=function(){function h(){this.state="INITIAL",this.buffer="",this.decoder=new R,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var d=h.prototype;return d.parse=function(o){var n=this;o&&(n.buffer+=n.decoder.decode(o,{stream:!0}));function s(){var C=n.buffer,c=0;for(C=l(C);c<C.length&&C[c]!=="\r"&&C[c]!==`
|
|
`;)++c;var r=C.substr(0,c);return C[c]==="\r"&&++c,C[c]===`
|
|
`&&++c,n.buffer=C.substr(c),r}function u(C){f(C,function(c,r){},/:/)}try{var p="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;p=s();var S=p.match(/^()?WEBVTT([ \t].*)?$/);if(!S||!S[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var x=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;x?x=!1:p=s();switch(n.state){case"HEADER":/:/.test(p)?u(p):p||(n.state="ID");continue;case"NOTE":p||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(p)){n.state="NOTE";break}if(!p)continue;if(n.cue=new Q.default(0,0,""),n.state="CUE",p.indexOf("-->")===-1){n.cue.id=p;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{i(p,n.cue,n.regionList)}catch(C){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var M=p.indexOf("-->")!==-1;if(!p||M&&(x=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=`
|
|
`),n.cue.text+=p}continue;case"BADCUE":p||(n.state="ID")}}}catch(C){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},d.flush=function(){var o=this;try{if((o.cue||o.state==="HEADER")&&(o.buffer+=`
|
|
|
|
`,o.parse()),o.state==="INITIAL"||o.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){o.onparsingerror&&o.onparsingerror(n)}return o.onflush&&o.onflush(),this},h}()},"./src/utils/webvtt-parser.ts":function(J,N,O){"use strict";O.r(N),O.d(N,"generateCueId",function(){return v}),O.d(N,"parseWebVTT",function(){return d});var Q=O("./src/polyfills/number.ts"),R=O("./src/utils/vttparser.ts"),B=O("./src/demux/id3.ts"),D=O("./src/utils/timescale-conversion.ts"),f=O("./src/remux/mp4-remuxer.ts"),b=/\r\n|\n\r|\n|\r/g,g=function(o,n,s){return s===void 0&&(s=0),o.substr(s,n.length)===n},i=function(o){var n=parseInt(o.substr(-3)),s=parseInt(o.substr(-6,2)),u=parseInt(o.substr(-9,2)),p=o.length>9?parseInt(o.substr(0,o.indexOf(":"))):0;if(!Object(Q.isFiniteNumber)(n)||!Object(Q.isFiniteNumber)(s)||!Object(Q.isFiniteNumber)(u)||!Object(Q.isFiniteNumber)(p))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+o);return n+=1e3*s,n+=60*1e3*u,n+=60*60*1e3*p,n},l=function(o){for(var n=5381,s=o.length;s;)n=n*33^o.charCodeAt(--s);return(n>>>0).toString()};function v(E,o,n){return l(E.toString())+l(o.toString())+l(n)}var h=function(o,n,s){var u=o[n],p=o[u.prevCC];if(!p||!p.new&&u.new){o.ccOffset=o.presentationOffset=u.start,u.new=!1;return}for(;(S=p)!==null&&S!==void 0&&S.new;){var S;o.ccOffset+=u.start-p.start,u.new=!1,u=p,p=o[u.prevCC]}o.presentationOffset=s};function d(E,o,n,s,u,p,S,x){var M=new R.VTTParser,C=Object(B.utf8ArrayToStr)(new Uint8Array(E)).trim().replace(b,`
|
|
`).split(`
|
|
`),c=[],r=Object(D.toMpegTsClockFromTimescale)(o,n),a="00:00.000",A=0,L=0,T,w=!0,_=!1;M.oncue=function(j){var W=s[u],Z=s.ccOffset,X=(A-r)/9e4;if(W!=null&&W.new&&(L!==void 0?Z=s.ccOffset=W.start:h(s,u,X)),X&&(Z=X-s.presentationOffset),_){var G=j.endTime-j.startTime,te=Object(f.normalizePts)((j.startTime+Z-L)*9e4,p*9e4)/9e4;j.startTime=te,j.endTime=te+G}var Y=j.text.trim();j.text=decodeURIComponent(encodeURIComponent(Y)),j.id||(j.id=v(j.startTime,j.endTime,Y)),j.endTime>0&&c.push(j)},M.onparsingerror=function(j){T=j},M.onflush=function(){if(T){x(T);return}S(c)},C.forEach(function(j){if(w)if(g(j,"X-TIMESTAMP-MAP=")){w=!1,_=!0,j.substr(16).split(",").forEach(function(W){g(W,"LOCAL:")?a=W.substr(6):g(W,"MPEGTS:")&&(A=parseInt(W.substr(7)))});try{L=i(a)/1e3}catch(W){_=!1,T=W}return}else j===""&&(w=!1);M.parse(j+`
|
|
`)}),M.flush()}},"./src/utils/xhr-loader.ts":function(J,N,O){"use strict";O.r(N);var Q=O("./src/utils/logger.ts"),R=O("./src/loader/load-stats.ts"),B=/^age:\s*[\d.]+\s*$/m,D=function(){function f(g){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=g?g.xhrSetup:null,this.stats=new R.LoadStats,this.retryDelay=0}var b=f.prototype;return b.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},b.abortInternal=function(){var i=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),i&&(i.onreadystatechange=null,i.onprogress=null,i.readyState!==4&&(this.stats.aborted=!0,i.abort()))},b.abort=function(){var i;this.abortInternal(),(i=this.callbacks)!==null&&i!==void 0&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},b.load=function(i,l,v){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=i,this.config=l,this.callbacks=v,this.retryDelay=l.retryDelay,this.loadInternal()},b.loadInternal=function(){var i=this.config,l=this.context;if(!i)return;var v=this.loader=new self.XMLHttpRequest,h=this.stats;h.loading.first=0,h.loaded=0;var d=this.xhrSetup;try{if(d)try{d(v,l.url)}catch(n){v.open("GET",l.url,!0),d(v,l.url)}v.readyState||v.open("GET",l.url,!0);var E=this.context.headers;if(E)for(var o in E)v.setRequestHeader(o,E[o])}catch(n){this.callbacks.onError({code:v.status,text:n.message},l,v);return}l.rangeEnd&&v.setRequestHeader("Range","bytes="+l.rangeStart+"-"+(l.rangeEnd-1)),v.onreadystatechange=this.readystatechange.bind(this),v.onprogress=this.loadprogress.bind(this),v.responseType=l.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),v.send()},b.readystatechange=function(){var i=this.context,l=this.loader,v=this.stats;if(!i||!l)return;var h=l.readyState,d=this.config;if(v.aborted)return;if(h>=2)if(self.clearTimeout(this.requestTimeout),v.loading.first===0&&(v.loading.first=Math.max(self.performance.now(),v.loading.start)),h===4){l.onreadystatechange=null,l.onprogress=null;var E=l.status;if(E>=200&&E<300){v.loading.end=Math.max(self.performance.now(),v.loading.first);var o,n;if(i.responseType==="arraybuffer"?(o=l.response,n=o.byteLength):(o=l.responseText,n=o.length),v.loaded=v.total=n,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(v,i,o,l),!this.callbacks)return;var u={url:l.responseURL,data:o};this.callbacks.onSuccess(u,v,i,l)}else v.retry>=d.maxRetry||E>=400&&E<499?(Q.logger.error(E+" while loading "+i.url),this.callbacks.onError({code:E,text:l.statusText},i,l)):(Q.logger.warn(E+" while loading "+i.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,d.maxRetryDelay),v.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),d.timeout)},b.loadtimeout=function(){Q.logger.warn("timeout while loading "+this.context.url);var i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))},b.loadprogress=function(i){var l=this.stats;l.loaded=i.loaded,i.lengthComputable&&(l.total=i.total)},b.getCacheAge=function(){var i=null;if(this.loader&&B.test(this.loader.getAllResponseHeaders())){var l=this.loader.getResponseHeader("age");i=l?parseFloat(l):null}return i},f}();N.default=D}}).default})},vHTk:function(qe,ue,k){qe.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vKoX:function(qe,ue,k){var J=k("SrGk"),N=k("bYtY");function O(B,D){J.call(this,B,D,["filter"],"__filter_in_use__","_shadowDom")}N.inherits(O,J),O.prototype.addWithoutUpdate=function(B,D){if(D&&Q(D.style)){var f;if(D._shadowDom){f=D._shadowDom;var b=this.getDefs(!0);b.contains(D._shadowDom)||this.addDom(f)}else f=this.add(D);this.markUsed(D);var g=f.getAttribute("id");B.style.filter="url(#"+g+")"}},O.prototype.add=function(B){var D=this.createElement("filter");return B._shadowDomId=B._shadowDomId||this.nextId++,D.setAttribute("id","zr"+this._zrId+"-shadow-"+B._shadowDomId),this.updateDom(B,D),this.addDom(D),D},O.prototype.update=function(B,D){var f=D.style;if(Q(f)){var b=this;J.prototype.update.call(this,D,function(){b.updateDom(D,D._shadowDom)})}else this.remove(B,D)},O.prototype.remove=function(B,D){D._shadowDomId!=null&&(this.removeDom(B),B.style.filter="")},O.prototype.updateDom=function(B,D){var f=D.getElementsByTagName("feDropShadow");f.length===0?f=this.createElement("feDropShadow"):f=f[0];var b=B.style,g=B.scale&&B.scale[0]||1,i=B.scale&&B.scale[1]||1,l,v,h,d;if(b.shadowBlur||b.shadowOffsetX||b.shadowOffsetY)l=b.shadowOffsetX||0,v=b.shadowOffsetY||0,h=b.shadowBlur,d=b.shadowColor;else if(b.textShadowBlur)l=b.textShadowOffsetX||0,v=b.textShadowOffsetY||0,h=b.textShadowBlur,d=b.textShadowColor;else{this.removeDom(D,b);return}f.setAttribute("dx",l/g),f.setAttribute("dy",v/i),f.setAttribute("flood-color",d);var E=h/2/g,o=h/2/i,n=E+" "+o;f.setAttribute("stdDeviation",n),D.setAttribute("x","-100%"),D.setAttribute("y","-100%"),D.setAttribute("width",Math.ceil(h/2*200)+"%"),D.setAttribute("height",Math.ceil(h/2*200)+"%"),D.appendChild(f),B._shadowDom=D},O.prototype.markUsed=function(B){B._shadowDom&&J.prototype.markUsed.call(this,B._shadowDom)};function Q(B){return B&&(B.shadowBlur||B.shadowOffsetX||B.shadowOffsetY||B.textShadowBlur||B.textShadowOffsetX||B.textShadowOffsetY)}var R=O;qe.exports=R},vWvF:function(qe,ue,k){var J=k("Bq2U"),N=k("SUKs"),O=k("bYtY"),Q=O.isString,R=O.isFunction,B=O.isObject,D=O.isArrayLike,f=O.indexOf,b=function(){this.animators=[]};b.prototype={constructor:b,animate:function(h,d){var E,o=!1,n=this,s=this.__zr;if(h){var u=h.split("."),p=n;o=u[0]==="shape";for(var S=0,x=u.length;S<x;S++){if(!p)continue;p=p[u[S]]}p&&(E=p)}else E=n;if(!E){N('Property "'+h+'" is not existed in element '+n.id);return}var M=n.animators,C=new J(E,d);return C.during(function(c){n.dirty(o)}).done(function(){M.splice(f(M,C),1)}),M.push(C),s&&s.animation.addAnimator(C),C},stopAnimation:function(h){for(var d=this.animators,E=d.length,o=0;o<E;o++)d[o].stop(h);return d.length=0,this},animateTo:function(h,d,E,o,n,s){g(this,h,d,E,o,n,s)},animateFrom:function(h,d,E,o,n,s){g(this,h,d,E,o,n,s,!0)}};function g(h,d,E,o,n,s,u,p){Q(o)?(s=n,n=o,o=0):R(n)?(s=n,n="linear",o=0):R(o)?(s=o,o=0):R(E)?(s=E,E=500):E||(E=500),h.stopAnimation(),i(h,"",h,d,E,o,p);var S=h.animators.slice(),x=S.length;function M(){x--,x||s&&s()}x||s&&s();for(var C=0;C<S.length;C++)S[C].done(M).start(n,u)}function i(h,d,E,o,n,s,u){var p={},S=0;for(var x in o){if(!o.hasOwnProperty(x))continue;E[x]!=null?B(o[x])&&!D(o[x])?i(h,d?d+"."+x:x,E[x],o[x],n,s,u):(u?(p[x]=E[x],l(h,d,x,o[x])):p[x]=o[x],S++):o[x]!=null&&!u&&l(h,d,x,o[x])}S>0&&h.animate(d,!1).when(n==null?500:n,p).delay(s||0)}function l(h,d,E,o){if(!d)h.attr(E,o);else{var n={};n[d]={},n[d][E]=o,h.attr(n)}}var v=b;qe.exports=v},wCXF:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return mt});var J=k("rePB"),N=k("VTBJ"),O=k("KQm4"),Q=k("U8pU"),R=k("ODXe"),B=k("q1tI"),D=k("TSYQ"),f=k.n(D),b=k("Gytx"),g=k.n(b),i=k("Kwbf"),l=k("t23M"),v=k("qx4F"),h=k("6eGT"),d=k("IBYe"),E=k("Ff2n"),o=k("c+Xe"),n=k("fyJ8"),s=k("biw7");function u(He,Pe,at,vt,et){var At=at[He]||{},je=at[Pe]||{},_e,Ue;At.fixed==="left"?_e=vt.left[He]:je.fixed==="right"&&(Ue=vt.right[Pe]);var me=!1,ve=!1,Ee=!1,Oe=!1,Ye=at[Pe+1],ze=at[He-1];if(et==="rtl"){if(_e!==void 0){var gt=ze&&ze.fixed==="left";Oe=!gt}else if(Ue!==void 0){var Lt=Ye&&Ye.fixed==="right";Ee=!Lt}}else if(_e!==void 0){var Pt=Ye&&Ye.fixed==="left";me=!Pt}else if(Ue!==void 0){var Rt=ze&&ze.fixed==="right";ve=!Rt}return{fixLeft:_e,fixRight:Ue,lastFixLeft:me,firstFixRight:ve,lastFixRight:Ee,firstFixLeft:Oe,isSticky:vt.isSticky}}var p=k("sR1s");function S(He){var Pe=He.cells,at=He.stickyOffsets,vt=He.flattenColumns,et=He.rowComponent,At=He.cellComponent,je=He.onHeaderRow,_e=He.index,Ue=B.useContext(s.a),me=Ue.prefixCls,ve=Ue.direction,Ee;je&&(Ee=je(Pe.map(function(Ye){return Ye.column}),_e));var Oe=Object(p.a)(Pe.map(function(Ye){return Ye.column}));return B.createElement(et,Object.assign({},Ee),Pe.map(function(Ye,ze){var gt=Ye.column,Lt=u(Ye.colStart,Ye.colEnd,vt,at,ve),Pt;return gt&>.onHeaderCell&&(Pt=Ye.column.onHeaderCell(gt)),B.createElement(n.a,Object.assign({},Ye,{ellipsis:gt.ellipsis,align:gt.align,component:At,prefixCls:me,key:Oe[ze]},Lt,{additionalProps:Pt,rowType:"header"}))}))}S.displayName="HeaderRow";var x=S;function M(He){var Pe=[];function at(je,_e){var Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Pe[Ue]=Pe[Ue]||[];var me=_e,ve=je.filter(Boolean).map(function(Ee){var Oe={key:Ee.key,className:Ee.className||"",children:Ee.title,column:Ee,colStart:me},Ye=1,ze=Ee.children;return ze&&ze.length>0&&(Ye=at(ze,me,Ue+1).reduce(function(gt,Lt){return gt+Lt},0),Oe.hasSubColumns=!0),"colSpan"in Ee&&(Ye=Ee.colSpan),"rowSpan"in Ee&&(Oe.rowSpan=Ee.rowSpan),Oe.colSpan=Ye,Oe.colEnd=Oe.colStart+Ye-1,Pe[Ue].push(Oe),me+=Ye,Ye});return ve}at(He,0);for(var vt=Pe.length,et=function(_e){Pe[_e].forEach(function(Ue){!("rowSpan"in Ue)&&!Ue.hasSubColumns&&(Ue.rowSpan=vt-_e)})},At=0;At<vt;At+=1)et(At);return Pe}function C(He){var Pe=He.stickyOffsets,at=He.columns,vt=He.flattenColumns,et=He.onHeaderRow,At=B.useContext(s.a),je=At.prefixCls,_e=At.getComponent,Ue=B.useMemo(function(){return M(at)},[at]),me=_e(["header","wrapper"],"thead"),ve=_e(["header","row"],"tr"),Ee=_e(["header","cell"],"th");return B.createElement(me,{className:"".concat(je,"-thead")},Ue.map(function(Oe,Ye){var ze=B.createElement(x,{key:Ye,flattenColumns:vt,cells:Oe,stickyOffsets:Pe,rowComponent:ve,cellComponent:Ee,onHeaderRow:et,index:Ye});return ze}))}var c=C,r=k("hW8S");function a(He){for(var Pe=He.colWidths,at=He.columns,vt=He.columCount,et=[],At=vt||at.length,je=!1,_e=At-1;_e>=0;_e-=1){var Ue=Pe[_e],me=at&&at[_e],ve=me&&me[r.a];(Ue||ve||je)&&(et.unshift(B.createElement("col",Object.assign({key:_e,style:{width:Ue,minWidth:Ue}},ve))),je=!0)}return B.createElement("colgroup",null,et)}var A=a;function L(He,Pe){return Object(B.useMemo)(function(){for(var at=[],vt=0;vt<Pe;vt+=1){var et=He[vt];if(et!==void 0)at[vt]=et;else return null}return at},[He.join("_"),Pe])}var T=B.forwardRef(function(He,Pe){var at=He.noData,vt=He.columns,et=He.flattenColumns,At=He.colWidths,je=He.columCount,_e=He.stickyOffsets,Ue=He.direction,me=He.fixHeader,ve=He.offsetHeader,Ee=He.stickyClassName,Oe=He.onScroll,Ye=Object(E.a)(He,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),ze=B.useContext(s.a),gt=ze.prefixCls,Lt=ze.scrollbarSize,Pt=ze.isSticky,Rt=Pt&&!me?0:Lt,Dt=B.useRef(null),dt=B.useCallback(function(Bt){Object(o.b)(Pe,Bt),Object(o.b)(Dt,Bt)},[]);B.useEffect(function(){var Bt;function wt(rt){var st=rt.currentTarget,St=rt.deltaX;St&&(Oe({currentTarget:st,scrollLeft:st.scrollLeft+St}),rt.preventDefault())}return(Bt=Dt.current)===null||Bt===void 0||Bt.addEventListener("wheel",wt),function(){var rt;(rt=Dt.current)===null||rt===void 0||rt.removeEventListener("wheel",wt)}},[]);var it=et[et.length-1],nt={fixed:it?it.fixed:null,onHeaderCell:function(){return{className:"".concat(gt,"-cell-scrollbar")}}},we=Object(B.useMemo)(function(){return Rt?[].concat(Object(O.a)(vt),[nt]):vt},[Rt,vt]),Ne=Object(B.useMemo)(function(){return Rt?[].concat(Object(O.a)(et),[nt]):et},[Rt,et]),ht=Object(B.useMemo)(function(){var Bt=_e.right,wt=_e.left;return Object(N.a)(Object(N.a)({},_e),{},{left:Ue==="rtl"?[].concat(Object(O.a)(wt.map(function(rt){return rt+Rt})),[0]):wt,right:Ue==="rtl"?Bt:[].concat(Object(O.a)(Bt.map(function(rt){return rt+Rt})),[0]),isSticky:Pt})},[Rt,_e,Pt]),ot=L(At,je);return B.createElement("div",{style:Object(N.a)({overflow:"hidden"},Pt?{top:ve}:{}),ref:dt,className:f()("".concat(gt,"-header"),Object(J.a)({},Ee,!!Ee))},B.createElement("table",{style:{tableLayout:"fixed",visibility:at||ot?null:"hidden"}},B.createElement(A,{colWidths:ot?[].concat(Object(O.a)(ot),[Rt]):[],columCount:je+1,columns:Ne}),B.createElement(c,Object.assign({},Ye,{stickyOffsets:ht,columns:we,flattenColumns:Ne}))))});T.displayName="FixedHeader";var w=T,_=B.createContext(null),j=_;function W(He){var Pe=He.prefixCls,at=He.children,vt=He.component,et=He.cellComponent,At=He.fixHeader,je=He.fixColumn,_e=He.horizonScroll,Ue=He.className,me=He.expanded,ve=He.componentWidth,Ee=He.colSpan,Oe=B.useContext(s.a),Ye=Oe.scrollbarSize;return B.useMemo(function(){var ze=at;return je&&(ze=B.createElement("div",{style:{width:ve-(At?Ye:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Pe,"-expanded-row-fixed")},ze)),B.createElement(vt,{className:Ue,style:{display:me?null:"none"}},B.createElement(n.a,{component:et,prefixCls:Pe,colSpan:Ee},ze))},[at,vt,At,_e,Ue,me,ve,Ee,Ye])}var Z=W;function X(He){var Pe=He.className,at=He.style,vt=He.record,et=He.index,At=He.rowKey,je=He.getRowKey,_e=He.rowExpandable,Ue=He.expandedKeys,me=He.onRow,ve=He.indent,Ee=ve===void 0?0:ve,Oe=He.rowComponent,Ye=He.cellComponent,ze=He.childrenColumnName,gt=B.useContext(s.a),Lt=gt.prefixCls,Pt=gt.fixedInfoList,Rt=B.useContext(j),Dt=Rt.fixHeader,dt=Rt.fixColumn,it=Rt.horizonScroll,nt=Rt.componentWidth,we=Rt.flattenColumns,Ne=Rt.expandableType,ht=Rt.expandRowByClick,ot=Rt.onTriggerExpand,Bt=Rt.rowClassName,wt=Rt.expandedRowClassName,rt=Rt.indentSize,st=Rt.expandIcon,St=Rt.expandedRowRender,It=Rt.expandIconColumnIndex,Qt=B.useState(!1),gr=Object(R.a)(Qt,2),vr=gr[0],cr=gr[1],jt=Ue&&Ue.has(He.recordKey);B.useEffect(function(){jt&&cr(!0)},[jt]);var Ir=Ne==="row"&&(!_e||_e(vt)),kr=Ne==="nest",_r=ze&&vt&&vt[ze],hr=Ir||kr,Sr;me&&(Sr=me(vt,et));var sn=function(F){if(ht&&hr&&ot(vt,F),Sr&&Sr.onClick){for(var P,ee=arguments.length,ae=new Array(ee>1?ee-1:0),ne=1;ne<ee;ne++)ae[ne-1]=arguments[ne];(P=Sr).onClick.apply(P,[F].concat(ae))}},en;typeof Bt=="string"?en=Bt:typeof Bt=="function"&&(en=Bt(vt,et,Ee));var he=Object(p.a)(we),ge=B.createElement(Oe,Object.assign({},Sr,{"data-row-key":At,className:f()(Pe,"".concat(Lt,"-row"),"".concat(Lt,"-row-level-").concat(Ee),en,Sr&&Sr.className),style:Object(N.a)(Object(N.a)({},at),Sr?Sr.style:null),onClick:sn}),we.map(function(q,F){var P=q.render,ee=q.dataIndex,ae=q.className,ne=he[F],Ke=Pt[F],xt;F===(It||0)&&kr&&(xt=B.createElement(B.Fragment,null,B.createElement("span",{style:{paddingLeft:"".concat(rt*Ee,"px")},className:"".concat(Lt,"-row-indent indent-level-").concat(Ee)}),st({prefixCls:Lt,expanded:jt,expandable:_r,record:vt,onExpand:ot})));var kt;return q.onCell&&(kt=q.onCell(vt,et)),B.createElement(n.a,Object.assign({className:ae,ellipsis:q.ellipsis,align:q.align,component:Ye,prefixCls:Lt,key:ne,record:vt,index:et,dataIndex:ee,render:P,shouldCellUpdate:q.shouldCellUpdate},Ke,{appendNode:xt,additionalProps:kt}))})),Re;if(Ir&&(vr||jt)){var Ze=St(vt,et,Ee+1,jt),Je=wt&&wt(vt,et,Ee);Re=B.createElement(Z,{expanded:jt,className:f()("".concat(Lt,"-expanded-row"),"".concat(Lt,"-expanded-row-level-").concat(Ee+1),Je),prefixCls:Lt,fixHeader:Dt,fixColumn:dt,horizonScroll:it,component:Oe,componentWidth:nt,cellComponent:Ye,colSpan:we.length},Ze)}var Tt;return _r&&jt&&(Tt=(vt[ze]||[]).map(function(q,F){var P=je(q,F);return B.createElement(X,Object.assign({},He,{key:P,rowKey:P,record:q,recordKey:P,index:F,indent:Ee+1}))})),B.createElement(B.Fragment,null,ge,Re,Tt)}X.displayName="BodyRow";var G=X,te=B.createContext(null),Y=te;function le(He){var Pe=He.columnKey,at=He.onColumnResize,vt=B.useRef();return B.useEffect(function(){vt.current&&at(Pe,vt.current.offsetWidth)},[]),B.createElement(l.a,{onResize:function(At){var je=At.offsetWidth;at(Pe,je)}},B.createElement("td",{ref:vt,style:{padding:0,border:0,height:0}},B.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Ae(He){var Pe=He.data,at=He.getRowKey,vt=He.measureColumnWidth,et=He.expandedKeys,At=He.onRow,je=He.rowExpandable,_e=He.emptyNode,Ue=He.childrenColumnName,me=B.useContext(Y),ve=me.onColumnResize,Ee=B.useContext(s.a),Oe=Ee.prefixCls,Ye=Ee.getComponent,ze=B.useContext(j),gt=ze.fixHeader,Lt=ze.horizonScroll,Pt=ze.flattenColumns,Rt=ze.componentWidth;return B.useMemo(function(){var Dt=Ye(["body","wrapper"],"tbody"),dt=Ye(["body","row"],"tr"),it=Ye(["body","cell"],"td"),nt;Pe.length?nt=Pe.map(function(Ne,ht){var ot=at(Ne,ht);return B.createElement(G,{key:ot,rowKey:ot,record:Ne,recordKey:ot,index:ht,rowComponent:dt,cellComponent:it,expandedKeys:et,onRow:At,getRowKey:at,rowExpandable:je,childrenColumnName:Ue})}):nt=B.createElement(Z,{expanded:!0,className:"".concat(Oe,"-placeholder"),prefixCls:Oe,fixHeader:gt,fixColumn:Lt,horizonScroll:Lt,component:dt,componentWidth:Rt,cellComponent:it,colSpan:Pt.length},_e);var we=Object(p.a)(Pt);return B.createElement(Dt,{className:"".concat(Oe,"-tbody")},vt&&B.createElement("tr",{"aria-hidden":"true",className:"".concat(Oe,"-measure-row"),style:{height:0}},we.map(function(Ne){return B.createElement(le,{key:Ne,columnKey:Ne,onColumnResize:ve})})),nt)},[Pe,Oe,At,vt,et,at,Ye,Rt,_e,Pt])}var Be=B.memo(Ae);Be.displayName="Body";var Ce=Be,Se=k("wRmb"),Fe=k("xEkU"),Ve=k.n(Fe);function De(He){var Pe=Object(B.useRef)(He),at=Object(B.useState)({}),vt=Object(R.a)(at,2),et=vt[1],At=Object(B.useRef)(null),je=Object(B.useRef)([]);function _e(Ue){At.current===null&&(je.current=[],At.current=Ve()(function(){je.current.forEach(function(me){Pe.current=me(Pe.current)}),At.current=null,et({})})),je.current.push(Ue)}return Object(B.useEffect)(function(){return function(){Ve.a.cancel(At.current)}},[]),[Pe.current,_e]}function Le(He){var Pe=Object(B.useRef)(He),at=Object(B.useRef)(null);function vt(){window.clearTimeout(at.current)}function et(je){Pe.current=je,vt(),at.current=window.setTimeout(function(){Pe.current=null,at.current=null},100)}function At(){return Pe.current}return Object(B.useEffect)(function(){return vt},[]),[et,At]}function tt(He,Pe,at){var vt=Object(B.useMemo)(function(){for(var et=[],At=[],je=0,_e=0,Ue=0;Ue<Pe;Ue+=1)if(at==="rtl"){At[Ue]=_e,_e+=He[Ue]||0;var me=Pe-Ue-1;et[me]=je,je+=He[me]||0}else{et[Ue]=je,je+=He[Ue]||0;var ve=Pe-Ue-1;At[ve]=_e,_e+=He[ve]||0}return{left:et,right:At}},[He,Pe,at]);return vt}var Et=tt;function Ie(He){var Pe=He.className,at=He.children;return B.createElement("div",{className:Pe},at)}var Qe=Ie,xe=k("n6Qo");function ie(He){var Pe,at=He.prefixCls,vt=He.record,et=He.onExpand,At=He.expanded,je=He.expandable,_e="".concat(at,"-row-expand-icon");if(!je)return B.createElement("span",{className:f()(_e,"".concat(at,"-row-spaced"))});var Ue=function(ve){et(vt,ve),ve.stopPropagation()};return B.createElement("span",{className:f()(_e,(Pe={},Object(J.a)(Pe,"".concat(at,"-row-expanded"),At),Object(J.a)(Pe,"".concat(at,"-row-collapsed"),!At),Pe)),onClick:Ue})}function $(He,Pe,at){var vt=[];function et(At){(At||[]).forEach(function(je,_e){vt.push(Pe(je,_e)),et(je[at])})}return et(He),vt}var re=k("zT1h"),ce=k("y0+3"),be=function(Pe,at){var vt,et,At=Pe.scrollBodyRef,je=Pe.onScroll,_e=Pe.offsetScroll,Ue=B.useContext(s.a),me=Ue.prefixCls,ve=((vt=At.current)===null||vt===void 0?void 0:vt.scrollWidth)||0,Ee=((et=At.current)===null||et===void 0?void 0:et.clientWidth)||0,Oe=ve&&Ee*(Ee/ve),Ye=B.useRef(),ze=De({scrollLeft:0,isHiddenScrollBar:!1}),gt=Object(R.a)(ze,2),Lt=gt[0],Pt=gt[1],Rt=B.useRef({delta:0,x:0}),Dt=B.useState(!1),dt=Object(R.a)(Dt,2),it=dt[0],nt=dt[1],we=function(){nt(!1)},Ne=function(rt){rt.persist(),Rt.current.delta=rt.pageX-Lt.scrollLeft,Rt.current.x=0,nt(!0),rt.preventDefault()},ht=function(rt){var st,St=rt||((st=window)===null||st===void 0?void 0:st.event),It=St.buttons;if(!it||It===0){it&&nt(!1);return}var Qt=Rt.current.x+rt.pageX-Rt.current.x-Rt.current.delta;Qt<=0&&(Qt=0),Qt+Oe>=Ee&&(Qt=Ee-Oe),je({scrollLeft:Qt/Ee*(ve+2)}),Rt.current.x=rt.pageX},ot=function(){var rt=Object(ce.b)(At.current).top,st=rt+At.current.offsetHeight,St=document.documentElement.scrollTop+window.innerHeight;st-Object(v.a)()<=St||rt>=St-_e?Pt(function(It){return Object(N.a)(Object(N.a)({},It),{},{isHiddenScrollBar:!0})}):Pt(function(It){return Object(N.a)(Object(N.a)({},It),{},{isHiddenScrollBar:!1})})},Bt=function(rt){Pt(function(st){return Object(N.a)(Object(N.a)({},st),{},{scrollLeft:rt/ve*Ee||0})})};return B.useImperativeHandle(at,function(){return{setScrollLeft:Bt}}),B.useEffect(function(){var wt=Object(re.a)(document.body,"mouseup",we,!1),rt=Object(re.a)(document.body,"mousemove",ht,!1);return ot(),function(){wt.remove(),rt.remove()}},[Oe,it]),B.useEffect(function(){var wt=Object(re.a)(window,"scroll",ot,!1),rt=Object(re.a)(window,"resize",ot,!1);return function(){wt.remove(),rt.remove()}},[]),B.useEffect(function(){Lt.isHiddenScrollBar||Pt(function(wt){var rt,st;return Object(N.a)(Object(N.a)({},wt),{},{scrollLeft:At.current.scrollLeft/((rt=At.current)===null||rt===void 0?void 0:rt.scrollWidth)*((st=At.current)===null||st===void 0?void 0:st.clientWidth)})})},[Lt.isHiddenScrollBar]),ve<=Ee||!Oe||Lt.isHiddenScrollBar?null:B.createElement("div",{style:{height:Object(v.a)(),width:Ee,bottom:_e},className:"".concat(me,"-sticky-scroll")},B.createElement("div",{onMouseDown:Ne,ref:Ye,className:f()("".concat(me,"-sticky-scroll-bar"),Object(J.a)({},"".concat(me,"-sticky-scroll-bar-active"),it)),style:{width:"".concat(Oe,"px"),transform:"translate3d(".concat(Lt.scrollLeft,"px, 0, 0)")}}))},Me=B.forwardRef(be);function ke(He,Pe){return B.useMemo(function(){var at=!!He;return{isSticky:at,stickyClassName:at?"".concat(Pe,"-sticky-header"):"",offsetHeader:Object(Q.a)(He)==="object"&&He.offsetHeader||0,offsetScroll:Object(Q.a)(He)==="object"&&He.offsetScroll||0}},[He,Pe])}var ct=[],ut={},mt="rc-table-internal-hook",pt=B.memo(function(He){var Pe=He.children;return Pe},function(He,Pe){return g()(He.props,Pe.props)?He.pingLeft!==Pe.pingLeft||He.pingRight!==Pe.pingRight:!1});function Ot(He){var Pe,at=He.prefixCls,vt=He.className,et=He.rowClassName,At=He.style,je=He.data,_e=He.rowKey,Ue=He.scroll,me=He.tableLayout,ve=He.direction,Ee=He.title,Oe=He.footer,Ye=He.summary,ze=He.id,gt=He.showHeader,Lt=He.components,Pt=He.emptyText,Rt=He.onRow,Dt=He.onHeaderRow,dt=He.internalHooks,it=He.transformColumns,nt=He.internalRefs,we=He.sticky,Ne=je||ct,ht=!!Ne.length,ot=B.useState(0),Bt=Object(R.a)(ot,2),wt=Bt[0],rt=Bt[1];B.useEffect(function(){rt(Object(v.a)())});var st=B.useMemo(function(){return Object(p.c)(Lt,{})},[Lt]),St=B.useCallback(function(Vr,jr){return Object(p.b)(st,Vr)||jr},[st]),It=B.useMemo(function(){return typeof _e=="function"?_e:function(Vr){var jr=Vr&&Vr[_e];return jr}},[_e]),Qt=Object(r.c)(He),gr=Qt.expandIcon,vr=Qt.expandedRowKeys,cr=Qt.defaultExpandedRowKeys,jt=Qt.defaultExpandAllRows,Ir=Qt.expandedRowRender,kr=Qt.onExpand,_r=Qt.onExpandedRowsChange,hr=Qt.expandRowByClick,Sr=Qt.rowExpandable,sn=Qt.expandIconColumnIndex,en=Qt.expandedRowClassName,he=Qt.childrenColumnName,ge=Qt.indentSize,Re=gr||ie,Ze=he||"children",Je=B.useMemo(function(){return Ir?"row":He.expandable&&dt===mt&&He.expandable.__PARENT_RENDER_ICON__||Ne.some(function(Vr){return Vr&&Object(Q.a)(Vr)==="object"&&Vr[Ze]})?"nest":!1},[!!Ir,Ne]),Tt=B.useState(function(){return cr||(jt?$(Ne,It,Ze):[])}),q=Object(R.a)(Tt,2),F=q[0],P=q[1],ee=B.useMemo(function(){return new Set(vr||F||[])},[vr,F]),ae=B.useCallback(function(Vr){var jr=It(Vr,Ne.indexOf(Vr)),Zr,ci=ee.has(jr);ci?(ee.delete(jr),Zr=Object(O.a)(ee)):Zr=[].concat(Object(O.a)(ee),[jr]),P(Zr),kr&&kr(!ci,Vr),_r&&_r(Zr)},[It,ee,Ne,kr,_r]),ne=B.useState(0),Ke=Object(R.a)(ne,2),xt=Ke[0],kt=Ke[1],Ht=Object(Se.b)(Object(N.a)(Object(N.a)(Object(N.a)({},He),Qt),{},{expandable:!!Ir,expandedKeys:ee,getRowKey:It,onTriggerExpand:ae,expandIcon:Re,expandIconColumnIndex:sn,direction:ve}),dt===mt?it:null),Ct=Object(R.a)(Ht,2),Yt=Ct[0],Wt=Ct[1],$t=B.useMemo(function(){return{columns:Yt,flattenColumns:Wt}},[Yt,Wt]),fr=B.useRef(),Fr=B.useRef(),yr=B.useRef(),Rr=B.useState(!1),pr=Object(R.a)(Rr,2),Nr=pr[0],Hr=pr[1],qr=B.useState(!1),Yr=Object(R.a)(qr,2),nn=Yr[0],cn=Yr[1],$r=De(new Map),an=Object(R.a)($r,2),ln=an[0],dn=an[1],hn=Object(p.a)(Wt),wr=hn.map(function(Vr){return ln.get(Vr)}),dr=B.useMemo(function(){return wr},[wr.join("_")]),sr=Et(dr,Wt.length,ve),nr=Ue&&Object(p.d)(Ue.y),Zt=Ue&&Object(p.d)(Ue.x),br=Zt&&Wt.some(function(Vr){var jr=Vr.fixed;return jr}),Cr=B.useRef(),Tr=ke(we,at),Er=Tr.isSticky,Dn=Tr.offsetHeader,Qr=Tr.offsetScroll,Cn=Tr.stickyClassName,Hn,Ln,Jr;nr&&(Ln={overflowY:"scroll",maxHeight:Ue.y}),Zt&&(Hn={overflowX:"auto"},nr||(Ln={overflowY:"hidden"}),Jr={width:Ue.x===!0?"auto":Ue.x,minWidth:"100%"});var Xn=B.useCallback(function(Vr,jr){dn(function(Zr){var ci=new Map(Zr);return ci.set(Vr,jr),ci})},[]),xn=Le(null),Yn=Object(R.a)(xn,2),Mn=Yn[0],oi=Yn[1];function Fn(Vr,jr){if(!jr)return;typeof jr=="function"?jr(Vr):jr.scrollLeft!==Vr&&(jr.scrollLeft=Vr)}var gn=function(jr){var Zr=jr.currentTarget,ci=jr.scrollLeft,Vi=typeof ci=="number"?ci:Zr.scrollLeft,Xi=Zr||ut;if(!oi()||oi()===Xi){var Za;Mn(Xi),Fn(Vi,Fr.current),Fn(Vi,yr.current),Fn(Vi,(Za=Cr.current)===null||Za===void 0?void 0:Za.setScrollLeft)}if(Zr){var Ro=Zr.scrollWidth,hs=Zr.clientWidth;Hr(Vi>0),cn(Vi<Ro-hs)}},Qn=function(){yr.current&&gn({currentTarget:yr.current})},li=function(jr){var Zr=jr.width;Qn(),kt(fr.current?fr.current.offsetWidth:Zr)};B.useEffect(function(){return Qn},[]),B.useEffect(function(){Zt&&Qn()},[Zt]),B.useEffect(function(){dt===mt&&nt&&(nt.body.current=yr.current)});var qt=St(["table"],"table"),er=B.useMemo(function(){return me||(br?Ue.x==="max-content"?"auto":"fixed":nr||Wt.some(function(Vr){var jr=Vr.ellipsis;return jr})?"fixed":"auto")},[nr,br,Wt,me]),tr,Br={colWidths:dr,columCount:Wt.length,stickyOffsets:sr,onHeaderRow:Dt,fixHeader:nr},Ur=B.useMemo(function(){return ht?null:typeof Pt=="function"?Pt():Pt},[ht,Pt]),Or=B.createElement(Ce,{data:Ne,measureColumnWidth:nr||Zt||Er,expandedKeys:ee,rowExpandable:Sr,getRowKey:It,onRow:Rt,emptyNode:Ur,childrenColumnName:Ze}),Dr=B.createElement(A,{colWidths:Wt.map(function(Vr){var jr=Vr.width;return jr}),columns:Wt}),bn=Ye&&B.createElement(xe.b,null,Ye(Ne)),Un=St(["body"]);if(nr||Er){var Mr;typeof Un=="function"?(Mr=Un(Ne,{scrollbarSize:wt,ref:yr,onScroll:gn}),Br.colWidths=Wt.map(function(Vr,jr){var Zr=Vr.width,ci=jr===Yt.length-1?Zr-wt:Zr;return typeof ci=="number"&&!Number.isNaN(ci)?ci:(Object(i.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Mr=B.createElement("div",{style:Object(N.a)(Object(N.a)({},Hn),Ln),onScroll:gn,ref:yr,className:f()("".concat(at,"-body"))},B.createElement(qt,{style:Object(N.a)(Object(N.a)({},Jr),{},{tableLayout:er})},Dr,Or,bn),Er&&B.createElement(Me,{ref:Cr,offsetScroll:Qr,scrollBodyRef:yr,onScroll:gn})),tr=B.createElement(B.Fragment,null,gt!==!1&&B.createElement(w,Object.assign({noData:!Ne.length},Br,$t,{direction:ve,offsetHeader:Dn,stickyClassName:Cn,ref:Fr,onScroll:gn})),Mr)}else tr=B.createElement("div",{style:Object(N.a)(Object(N.a)({},Hn),Ln),className:f()("".concat(at,"-content")),onScroll:gn,ref:yr},B.createElement(qt,{style:Object(N.a)(Object(N.a)({},Jr),{},{tableLayout:er})},Dr,gt!==!1&&B.createElement(c,Object.assign({},Br,$t)),Or,bn));var ei=Object(r.b)(He),Gr=B.createElement("div",Object.assign({className:f()(at,vt,(Pe={},Object(J.a)(Pe,"".concat(at,"-rtl"),ve==="rtl"),Object(J.a)(Pe,"".concat(at,"-ping-left"),Nr),Object(J.a)(Pe,"".concat(at,"-ping-right"),nn),Object(J.a)(Pe,"".concat(at,"-layout-fixed"),me==="fixed"),Object(J.a)(Pe,"".concat(at,"-fixed-header"),nr),Object(J.a)(Pe,"".concat(at,"-fixed-column"),br),Object(J.a)(Pe,"".concat(at,"-scroll-horizontal"),Zt),Object(J.a)(Pe,"".concat(at,"-has-fix-left"),Wt[0]&&Wt[0].fixed),Object(J.a)(Pe,"".concat(at,"-has-fix-right"),Wt[Wt.length-1]&&Wt[Wt.length-1].fixed==="right"),Pe)),style:At,id:ze,ref:fr},ei),B.createElement(pt,{pingLeft:Nr,pingRight:nn,props:Object(N.a)(Object(N.a)({},He),{},{stickyOffsets:sr,mergedExpandedKeys:ee})},Ee&&B.createElement(Qe,{className:"".concat(at,"-title")},Ee(Ne)),B.createElement("div",{className:"".concat(at,"-container")},tr),Oe&&B.createElement(Qe,{className:"".concat(at,"-footer")},Oe(Ne))));Zt&&(Gr=B.createElement(l.a,{onResize:li},Gr));var Rn=B.useMemo(function(){return{prefixCls:at,getComponent:St,scrollbarSize:wt,direction:ve,fixedInfoList:Wt.map(function(Vr,jr){return u(jr,jr,Wt,sr,ve)}),isSticky:Er}},[at,St,wt,ve,Wt,sr,ve,Er]),ui=B.useMemo(function(){return Object(N.a)(Object(N.a)({},$t),{},{tableLayout:er,rowClassName:et,expandedRowClassName:en,componentWidth:xt,fixHeader:nr,fixColumn:br,horizonScroll:Zt,expandIcon:Re,expandableType:Je,expandRowByClick:hr,expandedRowRender:Ir,onTriggerExpand:ae,expandIconColumnIndex:sn,indentSize:ge})},[$t,er,et,en,xt,nr,br,Zt,Re,Je,hr,Ir,ae,sn,ge]),Ai=B.useMemo(function(){return{onColumnResize:Xn}},[Xn]);return B.createElement(s.a.Provider,{value:Rn},B.createElement(j.Provider,{value:ui},B.createElement(Y.Provider,{value:Ai},Gr)))}Ot.Column=d.a,Ot.ColumnGroup=h.a,Ot.Summary=xe.a,Ot.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var Ft=ue.b=Ot},wOnQ:function(qe,ue,k){/*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* Released under MIT License
|
|
*/(function(J,N){qe.exports=N()})(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 J=function(H,U){return J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,K){z.__proto__=K}||function(z,K){for(var se in K)Object.prototype.hasOwnProperty.call(K,se)&&(z[se]=K[se])},J(H,U)};function N(H,U){if(typeof U!="function"&&U!==null)throw new TypeError("Class extends value "+String(U)+" is not a constructor or null");J(H,U);function z(){this.constructor=H}H.prototype=U===null?Object.create(U):(z.prototype=U.prototype,new z)}var O=function(){return O=Object.assign||function(U){for(var z,K=1,se=arguments.length;K<se;K++){z=arguments[K];for(var pe in z)Object.prototype.hasOwnProperty.call(z,pe)&&(U[pe]=z[pe])}return U},O.apply(this,arguments)};function Q(H,U,z,K){function se(pe){return pe instanceof z?pe:new z(function(Te){Te(pe)})}return new(z||(z=Promise))(function(pe,Te){function Ge(bt){try{lt(K.next(bt))}catch(_t){Te(_t)}}function We(bt){try{lt(K.throw(bt))}catch(_t){Te(_t)}}function lt(bt){bt.done?pe(bt.value):se(bt.value).then(Ge,We)}lt((K=K.apply(H,U||[])).next())})}function R(H,U){var z={label:0,sent:function(){if(pe[0]&1)throw pe[1];return pe[1]},trys:[],ops:[]},K,se,pe,Te;return Te={next:Ge(0),throw:Ge(1),return:Ge(2)},typeof Symbol=="function"&&(Te[Symbol.iterator]=function(){return this}),Te;function Ge(lt){return function(bt){return We([lt,bt])}}function We(lt){if(K)throw new TypeError("Generator is already executing.");for(;z;)try{if(K=1,se&&(pe=lt[0]&2?se.return:lt[0]?se.throw||((pe=se.return)&&pe.call(se),0):se.next)&&!(pe=pe.call(se,lt[1])).done)return pe;(se=0,pe)&&(lt=[lt[0]&2,pe.value]);switch(lt[0]){case 0:case 1:pe=lt;break;case 4:return z.label++,{value:lt[1],done:!1};case 5:z.label++,se=lt[1],lt=[0];continue;case 7:lt=z.ops.pop(),z.trys.pop();continue;default:if(!(pe=z.trys,pe=pe.length>0&&pe[pe.length-1])&&(lt[0]===6||lt[0]===2)){z=0;continue}if(lt[0]===3&&(!pe||lt[1]>pe[0]&<[1]<pe[3])){z.label=lt[1];break}if(lt[0]===6&&z.label<pe[1]){z.label=pe[1],pe=lt;break}if(pe&&z.label<pe[2]){z.label=pe[2],z.ops.push(lt);break}pe[2]&&z.ops.pop(),z.trys.pop();continue}lt=U.call(H,z)}catch(bt){lt=[6,bt],se=0}finally{K=pe=0}if(lt[0]&5)throw lt[1];return{value:lt[0]?lt[1]:void 0,done:!0}}}function B(H,U,z){if(z||arguments.length===2)for(var K=0,se=U.length,pe;K<se;K++)(pe||!(K in U))&&(pe||(pe=Array.prototype.slice.call(U,0,K)),pe[K]=U[K]);return H.concat(pe||U)}for(var D=function(){function H(U,z,K,se){this.left=U,this.top=z,this.width=K,this.height=se}return H.prototype.add=function(U,z,K,se){return new H(this.left+U,this.top+z,this.width+K,this.height+se)},H.fromClientRect=function(U,z){return new H(z.left+U.windowBounds.left,z.top+U.windowBounds.top,z.width,z.height)},H.fromDOMRectList=function(U,z){var K=Array.from(z).find(function(se){return se.width!==0});return K?new H(K.left+U.windowBounds.left,K.top+U.windowBounds.top,K.width,K.height):H.EMPTY},H.EMPTY=new H(0,0,0,0),H}(),f=function(H,U){return D.fromClientRect(H,U.getBoundingClientRect())},b=function(H){var U=H.body,z=H.documentElement;if(!U||!z)throw new Error("Unable to get document size");var K=Math.max(Math.max(U.scrollWidth,z.scrollWidth),Math.max(U.offsetWidth,z.offsetWidth),Math.max(U.clientWidth,z.clientWidth)),se=Math.max(Math.max(U.scrollHeight,z.scrollHeight),Math.max(U.offsetHeight,z.offsetHeight),Math.max(U.clientHeight,z.clientHeight));return new D(0,0,K,se)},g=function(H){for(var U=[],z=0,K=H.length;z<K;){var se=H.charCodeAt(z++);if(se>=55296&&se<=56319&&z<K){var pe=H.charCodeAt(z++);(pe&64512)===56320?U.push(((se&1023)<<10)+(pe&1023)+65536):(U.push(se),z--)}else U.push(se)}return U},i=function(){for(var H=[],U=0;U<arguments.length;U++)H[U]=arguments[U];if(String.fromCodePoint)return String.fromCodePoint.apply(String,H);var z=H.length;if(!z)return"";for(var K=[],se=-1,pe="";++se<z;){var Te=H[se];Te<=65535?K.push(Te):(Te-=65536,K.push((Te>>10)+55296,Te%1024+56320)),(se+1===z||K.length>16384)&&(pe+=String.fromCharCode.apply(String,K),K.length=0)}return pe},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),h=0;h<l.length;h++)v[l.charCodeAt(h)]=h;for(var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),o=0;o<d.length;o++)E[d.charCodeAt(o)]=o;for(var n=function(H){var U=H.length*.75,z=H.length,K,se=0,pe,Te,Ge,We;H[H.length-1]==="="&&(U--,H[H.length-2]==="="&&U--);var lt=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(U):new Array(U),bt=Array.isArray(lt)?lt:new Uint8Array(lt);for(K=0;K<z;K+=4)pe=E[H.charCodeAt(K)],Te=E[H.charCodeAt(K+1)],Ge=E[H.charCodeAt(K+2)],We=E[H.charCodeAt(K+3)],bt[se++]=pe<<2|Te>>4,bt[se++]=(Te&15)<<4|Ge>>2,bt[se++]=(Ge&3)<<6|We&63;return lt},s=function(H){for(var U=H.length,z=[],K=0;K<U;K+=2)z.push(H[K+1]<<8|H[K]);return z},u=function(H){for(var U=H.length,z=[],K=0;K<U;K+=4)z.push(H[K+3]<<24|H[K+2]<<16|H[K+1]<<8|H[K]);return z},p=5,S=6+5,x=2,M=S-p,C=65536>>p,c=1<<p,r=c-1,a=1024>>p,A=C+a,L=A,T=2048>>6,w=L+T,_=65536>>S,j=1<<M,W=j-1,Z=function(H,U,z){return H.slice?H.slice(U,z):new Uint16Array(Array.prototype.slice.call(H,U,z))},X=function(H,U,z){return H.slice?H.slice(U,z):new Uint32Array(Array.prototype.slice.call(H,U,z))},G=function(H,U){var z=n(H),K=Array.isArray(z)?u(z):new Uint32Array(z),se=Array.isArray(z)?s(z):new Uint16Array(z),pe=24,Te=Z(se,pe/2,K[4]/2),Ge=K[5]===2?Z(se,(pe+K[4])/2):X(K,Math.ceil((pe+K[4])/4));return new te(K[0],K[1],K[2],K[3],Te,Ge)},te=function(){function H(U,z,K,se,pe,Te){this.initialValue=U,this.errorValue=z,this.highStart=K,this.highValueIndex=se,this.index=pe,this.data=Te}return H.prototype.get=function(U){var z;if(U>=0){if(U<55296||U>56319&&U<=65535)return z=this.index[U>>p],z=(z<<x)+(U&r),this.data[z];if(U<=65535)return z=this.index[C+(U-55296>>p)],z=(z<<x)+(U&r),this.data[z];if(U<this.highStart)return z=w-_+(U>>S),z=this.index[z],z+=U>>p&W,z=this.index[z],z=(z<<x)+(U&r),this.data[z];if(U<=1114111)return this.data[this.highValueIndex]}return this.errorValue},H}(),Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",le=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ae=0;Ae<Y.length;Ae++)le[Y.charCodeAt(Ae)]=Ae;var Be="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==",Ce=50,Se=1,Fe=2,Ve=3,De=4,Le=5,tt=7,Et=8,Ie=9,Qe=10,xe=11,ie=12,$=13,re=14,ce=15,be=16,Me=17,ke=18,ct=19,ut=20,mt=21,pt=22,Ot=23,Ft=24,He=25,Pe=26,at=27,vt=28,et=29,At=30,je=31,_e=32,Ue=33,me=34,ve=35,Ee=36,Oe=37,Ye=38,ze=39,gt=40,Lt=41,Pt=42,Rt=43,Dt=[9001,65288],dt="!",it="\xD7",nt="\xF7",we=G(Be),Ne=[At,Ee],ht=[Se,Fe,Ve,Le],ot=[Qe,Et],Bt=[at,Pe],wt=ht.concat(ot),rt=[Ye,ze,gt,me,ve],st=[ce,$],St=function(H,U){U===void 0&&(U="strict");var z=[],K=[],se=[];return H.forEach(function(pe,Te){var Ge=we.get(pe);if(Ge>Ce?(se.push(!0),Ge-=Ce):se.push(!1),["normal","auto","loose"].indexOf(U)!==-1&&[8208,8211,12316,12448].indexOf(pe)!==-1)return K.push(Te),z.push(be);if(Ge===De||Ge===xe){if(Te===0)return K.push(Te),z.push(At);var We=z[Te-1];return wt.indexOf(We)===-1?(K.push(K[Te-1]),z.push(We)):(K.push(Te),z.push(At))}if(K.push(Te),Ge===je)return z.push(U==="strict"?mt:Oe);if(Ge===Pt)return z.push(At);if(Ge===et)return z.push(At);if(Ge===Rt)return pe>=131072&&pe<=196605||pe>=196608&&pe<=262141?z.push(Oe):z.push(At);z.push(Ge)}),[K,z,se]},It=function(H,U,z,K){var se=K[z];if(Array.isArray(H)?H.indexOf(se)!==-1:H===se)for(var pe=z;pe<=K.length;){pe++;var Te=K[pe];if(Te===U)return!0;if(Te!==Qe)break}if(se===Qe)for(var pe=z;pe>0;){pe--;var Ge=K[pe];if(Array.isArray(H)?H.indexOf(Ge)!==-1:H===Ge)for(var We=z;We<=K.length;){We++;var Te=K[We];if(Te===U)return!0;if(Te!==Qe)break}if(Ge!==Qe)break}return!1},Qt=function(H,U){for(var z=H;z>=0;){var K=U[z];if(K===Qe)z--;else return K}return 0},gr=function(H,U,z,K,se){if(z[K]===0)return it;var pe=K-1;if(Array.isArray(se)&&se[pe]===!0)return it;var Te=pe-1,Ge=pe+1,We=U[pe],lt=Te>=0?U[Te]:0,bt=U[Ge];if(We===Fe&&bt===Ve)return it;if(ht.indexOf(We)!==-1)return dt;if(ht.indexOf(bt)!==-1)return it;if(ot.indexOf(bt)!==-1)return it;if(Qt(pe,U)===Et)return nt;if(we.get(H[pe])===xe)return it;if((We===_e||We===Ue)&&we.get(H[Ge])===xe)return it;if(We===tt||bt===tt)return it;if(We===Ie)return it;if([Qe,$,ce].indexOf(We)===-1&&bt===Ie)return it;if([Me,ke,ct,Ft,vt].indexOf(bt)!==-1)return it;if(Qt(pe,U)===pt)return it;if(It(Ot,pt,pe,U))return it;if(It([Me,ke],mt,pe,U))return it;if(It(ie,ie,pe,U))return it;if(We===Qe)return nt;if(We===Ot||bt===Ot)return it;if(bt===be||We===be)return nt;if([$,ce,mt].indexOf(bt)!==-1||We===re)return it;if(lt===Ee&&st.indexOf(We)!==-1)return it;if(We===vt&&bt===Ee)return it;if(bt===ut)return it;if(Ne.indexOf(bt)!==-1&&We===He||Ne.indexOf(We)!==-1&&bt===He)return it;if(We===at&&[Oe,_e,Ue].indexOf(bt)!==-1||[Oe,_e,Ue].indexOf(We)!==-1&&bt===Pe)return it;if(Ne.indexOf(We)!==-1&&Bt.indexOf(bt)!==-1||Bt.indexOf(We)!==-1&&Ne.indexOf(bt)!==-1)return it;if([at,Pe].indexOf(We)!==-1&&(bt===He||[pt,ce].indexOf(bt)!==-1&&U[Ge+1]===He)||[pt,ce].indexOf(We)!==-1&&bt===He||We===He&&[He,vt,Ft].indexOf(bt)!==-1)return it;if([He,vt,Ft,Me,ke].indexOf(bt)!==-1)for(var _t=pe;_t>=0;){var Mt=U[_t];if(Mt===He)return it;if([vt,Ft].indexOf(Mt)!==-1)_t--;else break}if([at,Pe].indexOf(bt)!==-1)for(var _t=[Me,ke].indexOf(We)!==-1?Te:pe;_t>=0;){var Mt=U[_t];if(Mt===He)return it;if([vt,Ft].indexOf(Mt)!==-1)_t--;else break}if(Ye===We&&[Ye,ze,me,ve].indexOf(bt)!==-1||[ze,me].indexOf(We)!==-1&&[ze,gt].indexOf(bt)!==-1||[gt,ve].indexOf(We)!==-1&&bt===gt)return it;if(rt.indexOf(We)!==-1&&[ut,Pe].indexOf(bt)!==-1||rt.indexOf(bt)!==-1&&We===at)return it;if(Ne.indexOf(We)!==-1&&Ne.indexOf(bt)!==-1)return it;if(We===Ft&&Ne.indexOf(bt)!==-1)return it;if(Ne.concat(He).indexOf(We)!==-1&&bt===pt&&Dt.indexOf(H[Ge])===-1||Ne.concat(He).indexOf(bt)!==-1&&We===ke)return it;if(We===Lt&&bt===Lt){for(var lr=z[pe],zt=1;lr>0&&(lr--,U[lr]===Lt);)zt++;if(zt%2!==0)return it}return We===_e&&bt===Ue?it:nt},vr=function(H,U){U||(U={lineBreak:"normal",wordBreak:"normal"});var z=St(H,U.lineBreak),K=z[0],se=z[1],pe=z[2];(U.wordBreak==="break-all"||U.wordBreak==="break-word")&&(se=se.map(function(Ge){return[He,At,Pt].indexOf(Ge)!==-1?Oe:Ge}));var Te=U.wordBreak==="keep-all"?pe.map(function(Ge,We){return Ge&&H[We]>=19968&&H[We]<=40959}):void 0;return[K,se,Te]},cr=function(){function H(U,z,K,se){this.codePoints=U,this.required=z===dt,this.start=K,this.end=se}return H.prototype.slice=function(){return i.apply(void 0,this.codePoints.slice(this.start,this.end))},H}(),jt=function(H,U){var z=g(H),K=vr(z,U),se=K[0],pe=K[1],Te=K[2],Ge=z.length,We=0,lt=0;return{next:function(){if(lt>=Ge)return{done:!0,value:null};for(var bt=it;lt<Ge&&(bt=gr(z,pe,se,++lt,Te))===it;);if(bt!==it||lt===Ge){var _t=new cr(z,bt,We,lt);return We=lt,{value:_t,done:!1}}return{done:!0,value:null}}}},Ir=1<<0,kr=1<<1,_r=1<<2,hr=1<<3,Sr=10,sn=47,en=92,he=9,ge=32,Re=34,Ze=61,Je=35,Tt=36,q=37,F=39,P=40,ee=41,ae=95,ne=45,Ke=33,xt=60,kt=62,Ht=64,Ct=91,Yt=93,Wt=61,$t=123,fr=63,Fr=125,yr=124,Rr=126,pr=128,Nr=65533,Hr=42,qr=43,Yr=44,nn=58,cn=59,$r=46,an=0,ln=8,dn=11,hn=14,wr=31,dr=127,sr=-1,nr=48,Zt=97,br=101,Cr=102,Tr=117,Er=122,Dn=65,Qr=69,Cn=70,Hn=85,Ln=90,Jr=function(H){return H>=nr&&H<=57},Xn=function(H){return H>=55296&&H<=57343},xn=function(H){return Jr(H)||H>=Dn&&H<=Cn||H>=Zt&&H<=Cr},Yn=function(H){return H>=Zt&&H<=Er},Mn=function(H){return H>=Dn&&H<=Ln},oi=function(H){return Yn(H)||Mn(H)},Fn=function(H){return H>=pr},gn=function(H){return H===Sr||H===he||H===ge},Qn=function(H){return oi(H)||Fn(H)||H===ae},li=function(H){return Qn(H)||Jr(H)||H===ne},qt=function(H){return H>=an&&H<=ln||H===dn||H>=hn&&H<=wr||H===dr},er=function(H,U){return H!==en?!1:U!==Sr},tr=function(H,U,z){return H===ne?Qn(U)||er(U,z):Qn(H)?!0:!!(H===en&&er(H,U))},Br=function(H,U,z){return H===qr||H===ne?Jr(U)?!0:U===$r&&Jr(z):H===$r?Jr(U):Jr(H)},Ur=function(H){var U=0,z=1;(H[U]===qr||H[U]===ne)&&(H[U]===ne&&(z=-1),U++);for(var K=[];Jr(H[U]);)K.push(H[U++]);var se=K.length?parseInt(i.apply(void 0,K),10):0;H[U]===$r&&U++;for(var pe=[];Jr(H[U]);)pe.push(H[U++]);var Te=pe.length,Ge=Te?parseInt(i.apply(void 0,pe),10):0;(H[U]===Qr||H[U]===br)&&U++;var We=1;(H[U]===qr||H[U]===ne)&&(H[U]===ne&&(We=-1),U++);for(var lt=[];Jr(H[U]);)lt.push(H[U++]);var bt=lt.length?parseInt(i.apply(void 0,lt),10):0;return z*(se+Ge*Math.pow(10,-Te))*Math.pow(10,We*bt)},Or={type:2},Dr={type:3},bn={type:4},Un={type:13},Mr={type:8},ei={type:21},Gr={type:9},Rn={type:10},ui={type:11},Ai={type:12},Vr={type:14},jr={type:23},Zr={type:1},ci={type:25},Vi={type:24},Xi={type:26},Za={type:27},Ro={type:28},hs={type:29},fs={type:31},_o={type:32},nl=function(){function H(){this._value=[]}return H.prototype.write=function(U){this._value=this._value.concat(g(U))},H.prototype.read=function(){for(var U=[],z=this.consumeToken();z!==_o;)U.push(z),z=this.consumeToken();return U},H.prototype.consumeToken=function(){var U=this.consumeCodePoint();switch(U){case Re:return this.consumeStringToken(Re);case Je:var z=this.peekCodePoint(0),K=this.peekCodePoint(1),se=this.peekCodePoint(2);if(li(z)||er(K,se)){var pe=tr(z,K,se)?kr:Ir,Te=this.consumeName();return{type:5,value:Te,flags:pe}}break;case Tt:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),Un;break;case F:return this.consumeStringToken(F);case P:return Or;case ee:return Dr;case Hr:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),Vr;break;case qr:if(Br(U,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(U),this.consumeNumericToken();break;case Yr:return bn;case ne:var Ge=U,We=this.peekCodePoint(0),lt=this.peekCodePoint(1);if(Br(Ge,We,lt))return this.reconsumeCodePoint(U),this.consumeNumericToken();if(tr(Ge,We,lt))return this.reconsumeCodePoint(U),this.consumeIdentLikeToken();if(We===ne&<===kt)return this.consumeCodePoint(),this.consumeCodePoint(),Vi;break;case $r:if(Br(U,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(U),this.consumeNumericToken();break;case sn:if(this.peekCodePoint(0)===Hr)for(this.consumeCodePoint();;){var bt=this.consumeCodePoint();if(bt===Hr&&(bt=this.consumeCodePoint(),bt===sn))return this.consumeToken();if(bt===sr)return this.consumeToken()}break;case nn:return Xi;case cn:return Za;case xt:if(this.peekCodePoint(0)===Ke&&this.peekCodePoint(1)===ne&&this.peekCodePoint(2)===ne)return this.consumeCodePoint(),this.consumeCodePoint(),ci;break;case Ht:var _t=this.peekCodePoint(0),Mt=this.peekCodePoint(1),lr=this.peekCodePoint(2);if(tr(_t,Mt,lr)){var Te=this.consumeName();return{type:7,value:Te}}break;case Ct:return Ro;case en:if(er(U,this.peekCodePoint(0)))return this.reconsumeCodePoint(U),this.consumeIdentLikeToken();break;case Yt:return hs;case Wt:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),Mr;break;case $t:return ui;case Fr:return Ai;case Tr:case Hn:var zt=this.peekCodePoint(0),rr=this.peekCodePoint(1);return zt===qr&&(xn(rr)||rr===fr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(U),this.consumeIdentLikeToken();case yr:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),Gr;if(this.peekCodePoint(0)===yr)return this.consumeCodePoint(),ei;break;case Rr:if(this.peekCodePoint(0)===Ze)return this.consumeCodePoint(),Rn;break;case sr:return _o}return gn(U)?(this.consumeWhiteSpace(),fs):Jr(U)?(this.reconsumeCodePoint(U),this.consumeNumericToken()):Qn(U)?(this.reconsumeCodePoint(U),this.consumeIdentLikeToken()):{type:6,value:i(U)}},H.prototype.consumeCodePoint=function(){var U=this._value.shift();return typeof U=="undefined"?-1:U},H.prototype.reconsumeCodePoint=function(U){this._value.unshift(U)},H.prototype.peekCodePoint=function(U){return U>=this._value.length?-1:this._value[U]},H.prototype.consumeUnicodeRangeToken=function(){for(var U=[],z=this.consumeCodePoint();xn(z)&&U.length<6;)U.push(z),z=this.consumeCodePoint();for(var K=!1;z===fr&&U.length<6;)U.push(z),z=this.consumeCodePoint(),K=!0;if(K){var se=parseInt(i.apply(void 0,U.map(function(We){return We===fr?nr:We})),16),pe=parseInt(i.apply(void 0,U.map(function(We){return We===fr?Cn:We})),16);return{type:30,start:se,end:pe}}var Te=parseInt(i.apply(void 0,U),16);if(this.peekCodePoint(0)===ne&&xn(this.peekCodePoint(1))){this.consumeCodePoint(),z=this.consumeCodePoint();for(var Ge=[];xn(z)&&Ge.length<6;)Ge.push(z),z=this.consumeCodePoint();var pe=parseInt(i.apply(void 0,Ge),16);return{type:30,start:Te,end:pe}}else return{type:30,start:Te,end:Te}},H.prototype.consumeIdentLikeToken=function(){var U=this.consumeName();return U.toLowerCase()==="url"&&this.peekCodePoint(0)===P?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===P?(this.consumeCodePoint(),{type:19,value:U}):{type:20,value:U}},H.prototype.consumeUrlToken=function(){var U=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===sr)return{type:22,value:""};var z=this.peekCodePoint(0);if(z===F||z===Re){var K=this.consumeStringToken(this.consumeCodePoint());return K.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===sr||this.peekCodePoint(0)===ee)?(this.consumeCodePoint(),{type:22,value:K.value}):(this.consumeBadUrlRemnants(),jr)}for(;;){var se=this.consumeCodePoint();if(se===sr||se===ee)return{type:22,value:i.apply(void 0,U)};if(gn(se))return this.consumeWhiteSpace(),this.peekCodePoint(0)===sr||this.peekCodePoint(0)===ee?(this.consumeCodePoint(),{type:22,value:i.apply(void 0,U)}):(this.consumeBadUrlRemnants(),jr);if(se===Re||se===F||se===P||qt(se))return this.consumeBadUrlRemnants(),jr;if(se===en)if(er(se,this.peekCodePoint(0)))U.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),jr;else U.push(se)}},H.prototype.consumeWhiteSpace=function(){for(;gn(this.peekCodePoint(0));)this.consumeCodePoint()},H.prototype.consumeBadUrlRemnants=function(){for(;;){var U=this.consumeCodePoint();if(U===ee||U===sr)return;er(U,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},H.prototype.consumeStringSlice=function(U){for(var z=5e4,K="";U>0;){var se=Math.min(z,U);K+=i.apply(void 0,this._value.splice(0,se)),U-=se}return this._value.shift(),K},H.prototype.consumeStringToken=function(U){var z="",K=0;do{var se=this._value[K];if(se===sr||se===void 0||se===U)return z+=this.consumeStringSlice(K),{type:0,value:z};if(se===Sr)return this._value.splice(0,K),Zr;if(se===en){var pe=this._value[K+1];pe!==sr&&pe!==void 0&&(pe===Sr?(z+=this.consumeStringSlice(K),K=-1,this._value.shift()):er(se,pe)&&(z+=this.consumeStringSlice(K),z+=i(this.consumeEscapedCodePoint()),K=-1))}K++}while(!0)},H.prototype.consumeNumber=function(){var U=[],z=_r,K=this.peekCodePoint(0);for((K===qr||K===ne)&&U.push(this.consumeCodePoint());Jr(this.peekCodePoint(0));)U.push(this.consumeCodePoint());K=this.peekCodePoint(0);var se=this.peekCodePoint(1);if(K===$r&&Jr(se))for(U.push(this.consumeCodePoint(),this.consumeCodePoint()),z=hr;Jr(this.peekCodePoint(0));)U.push(this.consumeCodePoint());K=this.peekCodePoint(0),se=this.peekCodePoint(1);var pe=this.peekCodePoint(2);if((K===Qr||K===br)&&((se===qr||se===ne)&&Jr(pe)||Jr(se)))for(U.push(this.consumeCodePoint(),this.consumeCodePoint()),z=hr;Jr(this.peekCodePoint(0));)U.push(this.consumeCodePoint());return[Ur(U),z]},H.prototype.consumeNumericToken=function(){var U=this.consumeNumber(),z=U[0],K=U[1],se=this.peekCodePoint(0),pe=this.peekCodePoint(1),Te=this.peekCodePoint(2);if(tr(se,pe,Te)){var Ge=this.consumeName();return{type:15,number:z,flags:K,unit:Ge}}return se===q?(this.consumeCodePoint(),{type:16,number:z,flags:K}):{type:17,number:z,flags:K}},H.prototype.consumeEscapedCodePoint=function(){var U=this.consumeCodePoint();if(xn(U)){for(var z=i(U);xn(this.peekCodePoint(0))&&z.length<6;)z+=i(this.consumeCodePoint());gn(this.peekCodePoint(0))&&this.consumeCodePoint();var K=parseInt(z,16);return K===0||Xn(K)||K>1114111?Nr:K}return U===sr?Nr:U},H.prototype.consumeName=function(){for(var U="";;){var z=this.consumeCodePoint();if(li(z))U+=i(z);else if(er(z,this.peekCodePoint(0)))U+=i(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(z),U}},H}(),il=function(){function H(U){this._tokens=U}return H.create=function(U){var z=new nl;return z.write(U),new H(z.read())},H.parseValue=function(U){return H.create(U).parseComponentValue()},H.parseValues=function(U){return H.create(U).parseComponentValues()},H.prototype.parseComponentValue=function(){for(var U=this.consumeToken();U.type===31;)U=this.consumeToken();if(U.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(U);var z=this.consumeComponentValue();do U=this.consumeToken();while(U.type===31);if(U.type===32)return z;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},H.prototype.parseComponentValues=function(){for(var U=[];;){var z=this.consumeComponentValue();if(z.type===32)return U;U.push(z),U.push()}},H.prototype.consumeComponentValue=function(){var U=this.consumeToken();switch(U.type){case 11:case 28:case 2:return this.consumeSimpleBlock(U.type);case 19:return this.consumeFunction(U)}return U},H.prototype.consumeSimpleBlock=function(U){for(var z={type:U,values:[]},K=this.consumeToken();;){if(K.type===32||Ii(K,U))return z;this.reconsumeToken(K),z.values.push(this.consumeComponentValue()),K=this.consumeToken()}},H.prototype.consumeFunction=function(U){for(var z={name:U.value,values:[],type:18};;){var K=this.consumeToken();if(K.type===32||K.type===3)return z;this.reconsumeToken(K),z.values.push(this.consumeComponentValue())}},H.prototype.consumeToken=function(){var U=this._tokens.shift();return typeof U=="undefined"?_o:U},H.prototype.reconsumeToken=function(U){this._tokens.unshift(U)},H}(),Oa=function(H){return H.type===15},Aa=function(H){return H.type===17},vn=function(H){return H.type===20},$a=function(H){return H.type===0},Bi=function(H,U){return vn(H)&&H.value===U},qa=function(H){return H.type!==31},Yi=function(H){return H.type!==31&&H.type!==4},Si=function(H){var U=[],z=[];return H.forEach(function(K){if(K.type===4){if(z.length===0)throw new Error("Error parsing function args, zero tokens for arg");U.push(z),z=[];return}K.type!==31&&z.push(K)}),z.length&&U.push(z),U},Ii=function(H,U){return U===11&&H.type===12||U===28&&H.type===29?!0:U===2&&H.type===3},di=function(H){return H.type===17||H.type===15},In=function(H){return H.type===16||di(H)},al=function(H){return H.length>1?[H[0],H[1]]:[H[0]]},Gn={type:17,number:0,flags:_r},ps={type:16,number:50,flags:_r},Pi={type:16,number:100,flags:_r},ca=function(H,U,z){var K=H[0],se=H[1];return[on(K,U),on(typeof se!="undefined"?se:K,z)]},on=function(H,U){if(H.type===16)return H.number/100*U;if(Oa(H))switch(H.unit){case"rem":case"em":return 16*H.number;case"px":default:return H.number}return H.number},Ti="deg",ms="grad",gs="rad",ol="turn",Mo={name:"angle",parse:function(H,U){if(U.type===15)switch(U.unit){case Ti:return Math.PI*U.number/180;case ms:return Math.PI/200*U.number;case gs:return U.number;case ol:return Math.PI*2*U.number}throw new Error("Unsupported angle type")}},sl=function(H){return H.type===15&&(H.unit===Ti||H.unit===ms||H.unit===gs||H.unit===ol)},vs=function(H){var U=H.filter(vn).map(function(z){return z.value}).join(" ");switch(U){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Gn,Gn];case"to top":case"bottom":return pi(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Gn,Pi];case"to right":case"left":return pi(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Pi,Pi];case"to bottom":case"top":return pi(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Pi,Gn];case"to left":case"right":return pi(270)}return 0},pi=function(H){return Math.PI*H/180},Ei={name:"color",parse:function(H,U){if(U.type===18){var z=ll[U.name];if(typeof z=="undefined")throw new Error('Attempting to parse an unsupported color function "'+U.name+'"');return z(H,U.values)}if(U.type===5){if(U.value.length===3){var K=U.value.substring(0,1),se=U.value.substring(1,2),pe=U.value.substring(2,3);return Ri(parseInt(K+K,16),parseInt(se+se,16),parseInt(pe+pe,16),1)}if(U.value.length===4){var K=U.value.substring(0,1),se=U.value.substring(1,2),pe=U.value.substring(2,3),Te=U.value.substring(3,4);return Ri(parseInt(K+K,16),parseInt(se+se,16),parseInt(pe+pe,16),parseInt(Te+Te,16)/255)}if(U.value.length===6){var K=U.value.substring(0,2),se=U.value.substring(2,4),pe=U.value.substring(4,6);return Ri(parseInt(K,16),parseInt(se,16),parseInt(pe,16),1)}if(U.value.length===8){var K=U.value.substring(0,2),se=U.value.substring(2,4),pe=U.value.substring(4,6),Te=U.value.substring(6,8);return Ri(parseInt(K,16),parseInt(se,16),parseInt(pe,16),parseInt(Te,16)/255)}}if(U.type===20){var Ge=Li[U.value.toUpperCase()];if(typeof Ge!="undefined")return Ge}return Li.TRANSPARENT}},ki=function(H){return(255&H)===0},jn=function(H){var U=255&H,z=255&H>>8,K=255&H>>16,se=255&H>>24;return U<255?"rgba("+se+","+K+","+z+","+U/255+")":"rgb("+se+","+K+","+z+")"},Ri=function(H,U,z,K){return(H<<24|U<<16|z<<8|Math.round(K*255)<<0)>>>0},eo=function(H,U){if(H.type===17)return H.number;if(H.type===16){var z=U===3?1:255;return U===3?H.number/100*z:Math.round(H.number/100*z)}return 0},ys=function(H,U){var z=U.filter(Yi);if(z.length===3){var K=z.map(eo),se=K[0],pe=K[1],Te=K[2];return Ri(se,pe,Te,1)}if(z.length===4){var Ge=z.map(eo),se=Ge[0],pe=Ge[1],Te=Ge[2],We=Ge[3];return Ri(se,pe,Te,We)}return 0};function to(H,U,z){return z<0&&(z+=1),z>=1&&(z-=1),z<1/6?(U-H)*z*6+H:z<1/2?U:z<2/3?(U-H)*6*(2/3-z)+H:H}var Ci=function(H,U){var z=U.filter(Yi),K=z[0],se=z[1],pe=z[2],Te=z[3],Ge=(K.type===17?pi(K.number):Mo.parse(H,K))/(Math.PI*2),We=In(se)?se.number/100:0,lt=In(pe)?pe.number/100:0,bt=typeof Te!="undefined"&&In(Te)?on(Te,1):1;if(We===0)return Ri(lt*255,lt*255,lt*255,1);var _t=lt<=.5?lt*(We+1):lt+We-lt*We,Mt=lt*2-_t,lr=to(Mt,_t,Ge+1/3),zt=to(Mt,_t,Ge),rr=to(Mt,_t,Ge-1/3);return Ri(lr*255,zt*255,rr*255,bt)},ll={hsl:Ci,hsla:Ci,rgb:ys,rgba:ys},da=function(H,U){return Ei.parse(H,il.create(U).parseComponentValue())},Li={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(H,U){return U.map(function(z){if(vn(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"},Da=function(H,U){var z=Ei.parse(H,U[0]),K=U[1];return K&&In(K)?{color:z,stop:K}:{color:z,stop:null}},cl=function(H,U){var z=H[0],K=H[H.length-1];z.stop===null&&(z.stop=Gn),K.stop===null&&(K.stop=Pi);for(var se=[],pe=0,Te=0;Te<H.length;Te++){var Ge=H[Te].stop;if(Ge!==null){var We=on(Ge,U);We>pe?se.push(We):se.push(pe),pe=We}else se.push(null)}for(var lt=null,Te=0;Te<se.length;Te++){var bt=se[Te];if(bt===null)lt===null&&(lt=Te);else if(lt!==null){for(var _t=Te-lt,Mt=se[lt-1],lr=(bt-Mt)/(_t+1),zt=1;zt<=_t;zt++)se[lt+zt-1]=lr*zt;lt=null}}return H.map(function(rr,Lr){var or=rr.color;return{color:or,stop:Math.max(Math.min(1,se[Lr]/U),0)}})},vu=function(H,U,z){var K=U/2,se=z/2,pe=on(H[0],U)-K,Te=se-on(H[1],z);return(Math.atan2(Te,pe)+Math.PI*2)%(Math.PI*2)},yu=function(H,U,z){var K=typeof H=="number"?H:vu(H,U,z),se=Math.abs(U*Math.sin(K))+Math.abs(z*Math.cos(K)),pe=U/2,Te=z/2,Ge=se/2,We=Math.sin(K-Math.PI/2)*Ge,lt=Math.cos(K-Math.PI/2)*Ge;return[se,pe-lt,pe+lt,Te-We,Te+We]},Jn=function(H,U){return Math.sqrt(H*H+U*U)},ha=function(H,U,z,K,se){var pe=[[0,0],[0,U],[H,0],[H,U]];return pe.reduce(function(Te,Ge){var We=Ge[0],lt=Ge[1],bt=Jn(z-We,K-lt);return(se?bt<Te.optimumDistance:bt>Te.optimumDistance)?{optimumCorner:Ge,optimumDistance:bt}:Te},{optimumDistance:se?Infinity:-Infinity,optimumCorner:null}).optimumCorner},Ia=function(H,U,z,K,se){var pe=0,Te=0;switch(H.size){case 0:H.shape===0?pe=Te=Math.min(Math.abs(U),Math.abs(U-K),Math.abs(z),Math.abs(z-se)):H.shape===1&&(pe=Math.min(Math.abs(U),Math.abs(U-K)),Te=Math.min(Math.abs(z),Math.abs(z-se)));break;case 2:if(H.shape===0)pe=Te=Math.min(Jn(U,z),Jn(U,z-se),Jn(U-K,z),Jn(U-K,z-se));else if(H.shape===1){var Ge=Math.min(Math.abs(z),Math.abs(z-se))/Math.min(Math.abs(U),Math.abs(U-K)),We=ha(K,se,U,z,!0),lt=We[0],bt=We[1];pe=Jn(lt-U,(bt-z)/Ge),Te=Ge*pe}break;case 1:H.shape===0?pe=Te=Math.max(Math.abs(U),Math.abs(U-K),Math.abs(z),Math.abs(z-se)):H.shape===1&&(pe=Math.max(Math.abs(U),Math.abs(U-K)),Te=Math.max(Math.abs(z),Math.abs(z-se)));break;case 3:if(H.shape===0)pe=Te=Math.max(Jn(U,z),Jn(U,z-se),Jn(U-K,z),Jn(U-K,z-se));else if(H.shape===1){var Ge=Math.max(Math.abs(z),Math.abs(z-se))/Math.max(Math.abs(U),Math.abs(U-K)),_t=ha(K,se,U,z,!1),lt=_t[0],bt=_t[1];pe=Jn(lt-U,(bt-z)/Ge),Te=Ge*pe}break}return Array.isArray(H.size)&&(pe=on(H.size[0],K),Te=H.size.length===2?on(H.size[1],se):pe),[pe,Te]},bs=function(H,U){var z=pi(180),K=[];return Si(U).forEach(function(se,pe){if(pe===0){var Te=se[0];if(Te.type===20&&Te.value==="to"){z=vs(se);return}else if(sl(Te)){z=Mo.parse(H,Te);return}}var Ge=Da(H,se);K.push(Ge)}),{angle:z,stops:K,type:1}},Ra=function(H,U){var z=pi(180),K=[];return Si(U).forEach(function(se,pe){if(pe===0){var Te=se[0];if(Te.type===20&&["top","left","right","bottom"].indexOf(Te.value)!==-1){z=vs(se);return}else if(sl(Te)){z=(Mo.parse(H,Te)+pi(270))%pi(360);return}}var Ge=Da(H,se);K.push(Ge)}),{angle:z,stops:K,type:1}},dl=function(H,U){var z=pi(180),K=[],se=1,pe=0,Te=3,Ge=[];return Si(U).forEach(function(We,lt){var bt=We[0];if(lt===0){if(vn(bt)&&bt.value==="linear"){se=1;return}else if(vn(bt)&&bt.value==="radial"){se=2;return}}if(bt.type===18){if(bt.name==="from"){var _t=Ei.parse(H,bt.values[0]);K.push({stop:Gn,color:_t})}else if(bt.name==="to"){var _t=Ei.parse(H,bt.values[0]);K.push({stop:Pi,color:_t})}else if(bt.name==="color-stop"){var Mt=bt.values.filter(Yi);if(Mt.length===2){var _t=Ei.parse(H,Mt[1]),lr=Mt[0];Aa(lr)&&K.push({stop:{type:16,number:lr.number*100,flags:lr.flags},color:_t})}}}}),se===1?{angle:(z+pi(180))%pi(360),stops:K,type:se}:{size:Te,shape:pe,stops:K,position:Ge,type:se}},Fo="closest-side",Ji="farthest-side",Zi="closest-corner",ti="farthest-corner",Ni="circle",Hi="ellipse",ro="cover",hl="contain",fl=function(H,U){var z=0,K=3,se=[],pe=[];return Si(U).forEach(function(Te,Ge){var We=!0;if(Ge===0){var lt=!1;We=Te.reduce(function(_t,Mt){if(lt)if(vn(Mt))switch(Mt.value){case"center":return pe.push(ps),_t;case"top":case"left":return pe.push(Gn),_t;case"right":case"bottom":return pe.push(Pi),_t}else(In(Mt)||di(Mt))&&pe.push(Mt);else if(vn(Mt))switch(Mt.value){case Ni:return z=0,!1;case Hi:return z=1,!1;case"at":return lt=!0,!1;case Fo:return K=0,!1;case ro:case Ji:return K=1,!1;case hl:case Zi:return K=2,!1;case ti:return K=3,!1}else if(di(Mt)||In(Mt))return Array.isArray(K)||(K=[]),K.push(Mt),!1;return _t},We)}if(We){var bt=Da(H,Te);se.push(bt)}}),{size:K,shape:z,stops:se,position:pe,type:2}},$i=function(H,U){var z=0,K=3,se=[],pe=[];return Si(U).forEach(function(Te,Ge){var We=!0;if(Ge===0?We=Te.reduce(function(bt,_t){if(vn(_t))switch(_t.value){case"center":return pe.push(ps),!1;case"top":case"left":return pe.push(Gn),!1;case"right":case"bottom":return pe.push(Pi),!1}else if(In(_t)||di(_t))return pe.push(_t),!1;return bt},We):Ge===1&&(We=Te.reduce(function(bt,_t){if(vn(_t))switch(_t.value){case Ni:return z=0,!1;case Hi:return z=1,!1;case hl:case Fo:return K=0,!1;case Ji:return K=1,!1;case Zi:return K=2,!1;case ro:case ti:return K=3,!1}else if(di(_t)||In(_t))return Array.isArray(K)||(K=[]),K.push(_t),!1;return bt},We)),We){var lt=Da(H,Te);se.push(lt)}}),{size:K,shape:z,stops:se,position:pe,type:2}},pl=function(H){return H.type===1},ml=function(H){return H.type===2},_a={name:"image",parse:function(H,U){if(U.type===22){var z={url:U.value,type:0};return H.cache.addImage(U.value),z}if(U.type===18){var K=Uo[U.name];if(typeof K=="undefined")throw new Error('Attempting to parse an unsupported image function "'+U.name+'"');return K(H,U.values)}throw new Error("Unsupported image type "+U.type)}};function bu(H){return!(H.type===20&&H.value==="none")&&(H.type!==18||!!Uo[H.name])}var Uo={"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":dl},gl={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(H,U){if(U.length===0)return[];var z=U[0];return z.type===20&&z.value==="none"?[]:U.filter(function(K){return Yi(K)&&bu(K)}).map(function(K){return _a.parse(H,K)})}},vl={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(H,U){return U.map(function(z){if(vn(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(H,U){return Si(U).map(function(z){return z.filter(In)}).map(al)}},Ma={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(H,U){return Si(U).map(function(z){return z.filter(vn).map(function(K){return K.value}).join(" ")}).map(Po)}},Po=function(H){switch(H){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}},fa;(function(H){H.AUTO="auto",H.CONTAIN="contain",H.COVER="cover"})(fa||(fa={}));var ko={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(H,U){return Si(U).map(function(z){return z.filter(Eu)})}},Eu=function(H){return vn(H)||In(H)},No=function(H){return{name:"border-"+H+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Cu=No("top"),Cs=No("right"),xs=No("bottom"),Fa=No("left"),qi=function(H){return{name:"border-radius-"+H,initialValue:"0 0",prefix:!1,type:1,parse:function(U,z){return al(z.filter(In))}}},xu=qi("top-left"),Ho=qi("top-right"),yl=qi("bottom-right"),no=qi("bottom-left"),io=function(H){return{name:"border-"+H+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(U,z){switch(z){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},pa=io("top"),ao=io("right"),ma=io("bottom"),oo=io("left"),Qi=function(H){return{name:"border-"+H+"-width",initialValue:"0",type:0,prefix:!1,parse:function(U,z){return Oa(z)?z.number:0}}},bl=Qi("top"),El=Qi("right"),Cl=Qi("bottom"),wu=Qi("left"),ga={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},va={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(H,U){switch(U){case"rtl":return 1;case"ltr":default:return 0}}},Bu={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(H,U){return U.filter(vn).reduce(function(z,K){return z|Su(K.value)},0)}},Su=function(H){switch(H){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},Tu={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(H,U){switch(U){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Lu={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(H,U){return U.type===20&&U.value==="normal"?0:U.type===17||U.type===15?U.number:0}},Qo;(function(H){H.NORMAL="normal",H.STRICT="strict"})(Qo||(Qo={}));var Ou={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(H,U){switch(U){case"strict":return Qo.STRICT;case"normal":default:return Qo.NORMAL}}},hi={name:"line-height",initialValue:"normal",prefix:!1,type:4},Pn=function(H,U){return vn(H)&&H.value==="normal"?1.2*U:H.type===17?U*H.number:In(H)?on(H,U):U},ri={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(H,U){return U.type===20&&U.value==="none"?null:_a.parse(H,U)}},Kn={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(H,U){switch(U){case"inside":return 0;case"outside":default:return 1}}},ya={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(H,U){switch(U){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}}},jo=function(H){return{name:"margin-"+H,initialValue:"0",prefix:!1,type:4}},Ko=jo("top"),Du=jo("right"),Iu=jo("bottom"),Ru=jo("left"),ws={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(H,U){return U.filter(vn).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}})}},xl={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(H,U){switch(U){case"break-word":return"break-word";case"normal":default:return"normal"}}},Ua=function(H){return{name:"padding-"+H,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},_u=Ua("top"),Bs=Ua("right"),Ss=Ua("bottom"),wl=Ua("left"),Bl={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(H,U){switch(U){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Ts={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(H,U){switch(U){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Sl={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(H,U){return U.length===1&&Bi(U[0],"none")?[]:Si(U).map(function(z){for(var K={color:Li.TRANSPARENT,offsetX:Gn,offsetY:Gn,blur:Gn},se=0,pe=0;pe<z.length;pe++){var Te=z[pe];di(Te)?(se===0?K.offsetX=Te:se===1?K.offsetY=Te:K.blur=Te,se++):K.color=Ei.parse(H,Te)}return K})}},so={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(H,U){switch(U){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(H,U){if(U.type===20&&U.value==="none")return null;if(U.type===18){var z=Tl[U.name];if(typeof z=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+U.name+'"');return z(U.values)}return null}},zo=function(H){var U=H.filter(function(z){return z.type===17}).map(function(z){return z.number});return U.length===6?U:null},mi=function(H){var U=H.filter(function(We){return We.type===17}).map(function(We){return We.number}),z=U[0],K=U[1];U[2],U[3];var se=U[4],pe=U[5];U[6],U[7],U[8],U[9],U[10],U[11];var Te=U[12],Ge=U[13];return U[14],U[15],U.length===16?[z,K,se,pe,Te,Ge]:null},Tl={matrix:zo,matrix3d:mi},Ll={type:16,number:50,flags:_r},Ol=[Ll,Ll],gi={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(H,U){var z=U.filter(In);return z.length!==2?Ol:[z[0],z[1]]}},tn={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(H,U){switch(U){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},si;(function(H){H.NORMAL="normal",H.BREAK_ALL="break-all",H.KEEP_ALL="keep-all"})(si||(si={}));for(var ea={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(H,U){switch(U){case"break-all":return si.BREAK_ALL;case"keep-all":return si.KEEP_ALL;case"normal":default:return si.NORMAL}}},ta={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(H,U){if(U.type===20)return{auto:!0,order:0};if(Aa(U))return{auto:!1,order:U.number};throw new Error("Invalid z-index number parsed")}},Ls={name:"time",parse:function(H,U){if(U.type===15)switch(U.unit.toLowerCase()){case"s":return 1e3*U.number;case"ms":return U.number}throw new Error("Unsupported time type")}},Os={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(H,U){return Aa(U)?U.number:1}},Dl={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(H,U){return U.filter(vn).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})}},Ds={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(H,U){var z=[],K=[];return U.forEach(function(se){switch(se.type){case 20:case 0:z.push(se.value);break;case 17:z.push(se.number.toString());break;case 4:K.push(z.join(" ")),z.length=0;break}}),z.length&&K.push(z.join(" ")),K.map(function(se){return se.indexOf(" ")===-1?se:"'"+se+"'"})}},lo={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Il={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(H,U){if(Aa(U))return U.number;if(vn(U))switch(U.value){case"bold":return 700;case"normal":default:return 400}return 400}},Is={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(H,U){return U.filter(vn).map(function(z){return z.value})}},ra={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(H,U){switch(U){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},kn=function(H,U){return(H&U)!==0},Rl={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(H,U){if(U.length===0)return[];var z=U[0];return z.type===20&&z.value==="none"?[]:U}},Uu={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(H,U){if(U.length===0)return null;var z=U[0];if(z.type===20&&z.value==="none")return null;for(var K=[],se=U.filter(qa),pe=0;pe<se.length;pe++){var Te=se[pe],Ge=se[pe+1];if(Te.type===20){var We=Ge&&Aa(Ge)?Ge.number:1;K.push({counter:Te.value,increment:We})}}return K}},Wo={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(H,U){if(U.length===0)return[];for(var z=[],K=U.filter(qa),se=0;se<K.length;se++){var pe=K[se],Te=K[se+1];if(vn(pe)&&pe.value!=="none"){var Ge=Te&&Aa(Te)?Te.number:0;z.push({counter:pe.value,reset:Ge})}}return z}},Rs={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(H,U){return U.filter(Oa).map(function(z){return Ls.parse(H,z)})}},_l={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(H,U){if(U.length===0)return null;var z=U[0];if(z.type===20&&z.value==="none")return null;var K=[],se=U.filter($a);if(se.length%2!==0)return null;for(var pe=0;pe<se.length;pe+=2){var Te=se[pe].value,Ge=se[pe+1].value;K.push({open:Te,close:Ge})}return K}},Ml=function(H,U,z){if(!H)return"";var K=H[Math.min(U,H.length-1)];return K?z?K.open:K.close:""},Fl={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(H,U){return U.length===1&&Bi(U[0],"none")?[]:Si(U).map(function(z){for(var K={color:255,offsetX:Gn,offsetY:Gn,blur:Gn,spread:Gn,inset:!1},se=0,pe=0;pe<z.length;pe++){var Te=z[pe];Bi(Te,"inset")?K.inset=!0:di(Te)?(se===0?K.offsetX=Te:se===1?K.offsetY=Te:se===2?K.blur=Te:K.spread=Te,se++):K.color=Ei.parse(H,Te)}return K})}},Pu={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(H,U){var z=[0,1,2],K=[];return U.filter(vn).forEach(function(se){switch(se.value){case"stroke":K.push(1);break;case"fill":K.push(0);break;case"markers":K.push(2);break}}),z.forEach(function(se){K.indexOf(se)===-1&&K.push(se)}),K}},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(H,U){return Oa(U)?U.number:0}},Ul=function(){function H(U,z){var K,se;this.animationDuration=ar(U,Rs,z.animationDuration),this.backgroundClip=ar(U,ul,z.backgroundClip),this.backgroundColor=ar(U,Al,z.backgroundColor),this.backgroundImage=ar(U,gl,z.backgroundImage),this.backgroundOrigin=ar(U,vl,z.backgroundOrigin),this.backgroundPosition=ar(U,Es,z.backgroundPosition),this.backgroundRepeat=ar(U,Ma,z.backgroundRepeat),this.backgroundSize=ar(U,ko,z.backgroundSize),this.borderTopColor=ar(U,Cu,z.borderTopColor),this.borderRightColor=ar(U,Cs,z.borderRightColor),this.borderBottomColor=ar(U,xs,z.borderBottomColor),this.borderLeftColor=ar(U,Fa,z.borderLeftColor),this.borderTopLeftRadius=ar(U,xu,z.borderTopLeftRadius),this.borderTopRightRadius=ar(U,Ho,z.borderTopRightRadius),this.borderBottomRightRadius=ar(U,yl,z.borderBottomRightRadius),this.borderBottomLeftRadius=ar(U,no,z.borderBottomLeftRadius),this.borderTopStyle=ar(U,pa,z.borderTopStyle),this.borderRightStyle=ar(U,ao,z.borderRightStyle),this.borderBottomStyle=ar(U,ma,z.borderBottomStyle),this.borderLeftStyle=ar(U,oo,z.borderLeftStyle),this.borderTopWidth=ar(U,bl,z.borderTopWidth),this.borderRightWidth=ar(U,El,z.borderRightWidth),this.borderBottomWidth=ar(U,Cl,z.borderBottomWidth),this.borderLeftWidth=ar(U,wu,z.borderLeftWidth),this.boxShadow=ar(U,Fl,z.boxShadow),this.color=ar(U,ga,z.color),this.direction=ar(U,va,z.direction),this.display=ar(U,Bu,z.display),this.float=ar(U,Tu,z.cssFloat),this.fontFamily=ar(U,Ds,z.fontFamily),this.fontSize=ar(U,lo,z.fontSize),this.fontStyle=ar(U,ra,z.fontStyle),this.fontVariant=ar(U,Is,z.fontVariant),this.fontWeight=ar(U,Il,z.fontWeight),this.letterSpacing=ar(U,Lu,z.letterSpacing),this.lineBreak=ar(U,Ou,z.lineBreak),this.lineHeight=ar(U,hi,z.lineHeight),this.listStyleImage=ar(U,ri,z.listStyleImage),this.listStylePosition=ar(U,Kn,z.listStylePosition),this.listStyleType=ar(U,ya,z.listStyleType),this.marginTop=ar(U,Ko,z.marginTop),this.marginRight=ar(U,Du,z.marginRight),this.marginBottom=ar(U,Iu,z.marginBottom),this.marginLeft=ar(U,Ru,z.marginLeft),this.opacity=ar(U,Os,z.opacity);var pe=ar(U,ws,z.overflow);this.overflowX=pe[0],this.overflowY=pe[pe.length>1?1:0],this.overflowWrap=ar(U,xl,z.overflowWrap),this.paddingTop=ar(U,_u,z.paddingTop),this.paddingRight=ar(U,Bs,z.paddingRight),this.paddingBottom=ar(U,Ss,z.paddingBottom),this.paddingLeft=ar(U,wl,z.paddingLeft),this.paintOrder=ar(U,Pu,z.paintOrder),this.position=ar(U,Ts,z.position),this.textAlign=ar(U,Bl,z.textAlign),this.textDecorationColor=ar(U,Dl,(K=z.textDecorationColor)!==null&&K!==void 0?K:z.color),this.textDecorationLine=ar(U,Fu,(se=z.textDecorationLine)!==null&&se!==void 0?se:z.textDecoration),this.textShadow=ar(U,Sl,z.textShadow),this.textTransform=ar(U,so,z.textTransform),this.transform=ar(U,Mu,z.transform),this.transformOrigin=ar(U,gi,z.transformOrigin),this.visibility=ar(U,tn,z.visibility),this.webkitTextStrokeColor=ar(U,ku,z.webkitTextStrokeColor),this.webkitTextStrokeWidth=ar(U,Go,z.webkitTextStrokeWidth),this.wordBreak=ar(U,ea,z.wordBreak),this.zIndex=ar(U,ta,z.zIndex)}return H.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},H.prototype.isTransparent=function(){return ki(this.backgroundColor)},H.prototype.isTransformed=function(){return this.transform!==null},H.prototype.isPositioned=function(){return this.position!==0},H.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},H.prototype.isFloating=function(){return this.float!==0},H.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)},H}(),Nu=function(){function H(U,z){this.content=ar(U,Rl,z.content),this.quotes=ar(U,_l,z.quotes)}return H}(),Pl=function(){function H(U,z){this.counterIncrement=ar(U,Uu,z.counterIncrement),this.counterReset=ar(U,Wo,z.counterReset)}return H}(),ar=function(H,U,z){var K=new nl,se=z!==null&&typeof z!="undefined"?z.toString():U.initialValue;K.write(se);var pe=new il(K.read());switch(U.type){case 2:var Te=pe.parseComponentValue();return U.parse(H,vn(Te)?Te.value:U.initialValue);case 0:return U.parse(H,pe.parseComponentValue());case 1:return U.parse(H,pe.parseComponentValues());case 4:return pe.parseComponentValue();case 3:switch(U.format){case"angle":return Mo.parse(H,pe.parseComponentValue());case"color":return Ei.parse(H,pe.parseComponentValue());case"image":return _a.parse(H,pe.parseComponentValue());case"length":var Ge=pe.parseComponentValue();return di(Ge)?Ge:Gn;case"length-percentage":var We=pe.parseComponentValue();return In(We)?We:Gn;case"time":return Ls.parse(H,pe.parseComponentValue())}break}},Pa="data-html2canvas-debug",_s=function(H){var U=H.getAttribute(Pa);switch(U){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ka=function(H,U){var z=_s(H);return z===1||U===z},Oi=function(){function H(U,z){if(this.context=U,this.textNodes=[],this.elements=[],this.flags=0,ka(z,3))debugger;this.styles=new Ul(U,window.getComputedStyle(z,null)),os(z)&&(this.styles.animationDuration.some(function(K){return K>0})&&(z.style.animationDuration="0s"),this.styles.transform!==null&&(z.style.transform="none")),this.bounds=f(this.context,z),ka(z,4)&&(this.flags|=16)}return H}(),Ms="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ao=0;Ao<Fs.length;Ao++)uo[Fs.charCodeAt(Ao)]=Ao;for(var Zn=function(H){var U=H.length*.75,z=H.length,K,se=0,pe,Te,Ge,We;H[H.length-1]==="="&&(U--,H[H.length-2]==="="&&U--);var lt=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(U):new Array(U),bt=Array.isArray(lt)?lt:new Uint8Array(lt);for(K=0;K<z;K+=4)pe=uo[H.charCodeAt(K)],Te=uo[H.charCodeAt(K+1)],Ge=uo[H.charCodeAt(K+2)],We=uo[H.charCodeAt(K+3)],bt[se++]=pe<<2|Te>>4,bt[se++]=(Te&15)<<4|Ge>>2,bt[se++]=(Ge&3)<<6|We&63;return lt},Vo=function(H){for(var U=H.length,z=[],K=0;K<U;K+=2)z.push(H[K+1]<<8|H[K]);return z},kl=function(H){for(var U=H.length,z=[],K=0;K<U;K+=4)z.push(H[K+3]<<24|H[K+2]<<16|H[K+1]<<8|H[K]);return z},na=5,Xo=6+5,ia=2,Yo=Xo-na,Us=65536>>na,Nl=1<<na,Jo=Nl-1,Na=1024>>na,Hl=Us+Na,Zo=Hl,Ql=2048>>6,co=Zo+Ql,Hu=65536>>Xo,Ha=1<<Yo,jl=Ha-1,Ps=function(H,U,z){return H.slice?H.slice(U,z):new Uint16Array(Array.prototype.slice.call(H,U,z))},Kl=function(H,U,z){return H.slice?H.slice(U,z):new Uint32Array(Array.prototype.slice.call(H,U,z))},ho=function(H,U){var z=Zn(H),K=Array.isArray(z)?kl(z):new Uint32Array(z),se=Array.isArray(z)?Vo(z):new Uint16Array(z),pe=24,Te=Ps(se,pe/2,K[4]/2),Ge=K[5]===2?Ps(se,(pe+K[4])/2):Kl(K,Math.ceil((pe+K[4])/4));return new fo(K[0],K[1],K[2],K[3],Te,Ge)},fo=function(){function H(U,z,K,se,pe,Te){this.initialValue=U,this.errorValue=z,this.highStart=K,this.highValueIndex=se,this.index=pe,this.data=Te}return H.prototype.get=function(U){var z;if(U>=0){if(U<55296||U>56319&&U<=65535)return z=this.index[U>>na],z=(z<<ia)+(U&Jo),this.data[z];if(U<=65535)return z=this.index[Us+(U-55296>>na)],z=(z<<ia)+(U&Jo),this.data[z];if(U<this.highStart)return z=co-Hu+(U>>Xo),z=this.index[z],z+=U>>na&jl,z=this.index[z],z=(z<<ia)+(U&Jo),this.data[z];if(U<=1114111)return this.data[this.highValueIndex]}return this.errorValue},H}(),Qa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",po=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),mo=0;mo<Qa.length;mo++)po[Qa.charCodeAt(mo)]=mo;var Qu=1,$o=2,_i=3,ba=4,ja=5,ju=7,ks=8,Ns=9,Hs=10,zl=11,ni=12,Qs=13,Wl=14,js=15,Ku=function(H){for(var U=[],z=0,K=H.length;z<K;){var se=H.charCodeAt(z++);if(se>=55296&&se<=56319&&z<K){var pe=H.charCodeAt(z++);(pe&64512)===56320?U.push(((se&1023)<<10)+(pe&1023)+65536):(U.push(se),z--)}else U.push(se)}return U},Gl=function(){for(var H=[],U=0;U<arguments.length;U++)H[U]=arguments[U];if(String.fromCodePoint)return String.fromCodePoint.apply(String,H);var z=H.length;if(!z)return"";for(var K=[],se=-1,pe="";++se<z;){var Te=H[se];Te<=65535?K.push(Te):(Te-=65536,K.push((Te>>10)+55296,Te%1024+56320)),(se+1===z||K.length>16384)&&(pe+=String.fromCharCode.apply(String,K),K.length=0)}return pe},Vl=ho(Ms),vi="\xD7",Ks="\xF7",zu=function(H){return Vl.get(H)},Wu=function(H,U,z){var K=z-2,se=U[K],pe=U[z-1],Te=U[z];if(pe===$o&&Te===_i)return vi;if(pe===$o||pe===_i||pe===ba)return Ks;if(Te===$o||Te===_i||Te===ba)return Ks;if(pe===ks&&[ks,Ns,zl,ni].indexOf(Te)!==-1)return vi;if((pe===zl||pe===Ns)&&(Te===Ns||Te===Hs))return vi;if((pe===ni||pe===Hs)&&Te===Hs)return vi;if(Te===Qs||Te===ja)return vi;if(Te===ju)return vi;if(pe===Qu)return vi;if(pe===Qs&&Te===Wl){for(;se===ja;)se=U[--K];if(se===Wl)return vi}if(pe===js&&Te===js){for(var Ge=0;se===js;)Ge++,se=U[--K];if(Ge%2===0)return vi}return Ks},aa=function(H){var U=Ku(H),z=U.length,K=0,se=0,pe=U.map(zu);return{next:function(){if(K>=z)return{done:!0,value:null};for(var Te=vi;K<z&&(Te=Wu(U,pe,++K))===vi;);if(Te!==vi||K===z){var Ge=Gl.apply(null,U.slice(se,K));return se=K,{value:Ge,done:!1}}return{done:!0,value:null}}}},go=function(H){for(var U=aa(H),z=[],K;!(K=U.next()).done;)K.value&&z.push(K.value.slice());return z},qo=function(H){var U=123;if(H.createRange){var z=H.createRange();if(z.getBoundingClientRect){var K=H.createElement("boundtest");K.style.height=U+"px",K.style.display="block",H.body.appendChild(K),z.selectNode(K);var se=z.getBoundingClientRect(),pe=Math.round(se.height);if(H.body.removeChild(K),pe===U)return!0}}return!1},vo=function(H){var U=H.createElement("boundtest");U.style.width="50px",U.style.display="block",U.style.fontSize="12px",U.style.letterSpacing="0px",U.style.wordSpacing="0px",H.body.appendChild(U);var z=H.createRange();U.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var K=U.firstChild,se=g(K.data).map(function(We){return i(We)}),pe=0,Te={},Ge=se.every(function(We,lt){z.setStart(K,pe),z.setEnd(K,pe+We.length);var bt=z.getBoundingClientRect();pe+=We.length;var _t=bt.x>Te.x||bt.y>Te.y;return Te=bt,lt===0?!0:_t});return H.body.removeChild(U),Ge},ji=function(){return typeof new Image().crossOrigin!="undefined"},Gu=function(){return typeof new XMLHttpRequest().responseType=="string"},Vu=function(H){var U=new Image,z=H.createElement("canvas"),K=z.getContext("2d");if(!K)return!1;U.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{K.drawImage(U,0,0),z.toDataURL()}catch(se){return!1}return!0},Ea=function(H){return H[0]===0&&H[1]===255&&H[2]===0&&H[3]===255},Xl=function(H){var U=H.createElement("canvas"),z=100;U.width=z,U.height=z;var K=U.getContext("2d");if(!K)return Promise.reject(!1);K.fillStyle="rgb(0, 255, 0)",K.fillRect(0,0,z,z);var se=new Image,pe=U.toDataURL();se.src=pe;var Te=es(z,z,0,0,se);return K.fillStyle="red",K.fillRect(0,0,z,z),zs(Te).then(function(Ge){K.drawImage(Ge,0,0);var We=K.getImageData(0,0,z,z).data;K.fillStyle="red",K.fillRect(0,0,z,z);var lt=H.createElement("div");return lt.style.backgroundImage="url("+pe+")",lt.style.height=z+"px",Ea(We)?zs(es(z,z,0,0,lt)):Promise.reject(!1)}).then(function(Ge){return K.drawImage(Ge,0,0),Ea(K.getImageData(0,0,z,z).data)}).catch(function(){return!1})},es=function(H,U,z,K,se){var pe="http://www.w3.org/2000/svg",Te=document.createElementNS(pe,"svg"),Ge=document.createElementNS(pe,"foreignObject");return Te.setAttributeNS(null,"width",H.toString()),Te.setAttributeNS(null,"height",U.toString()),Ge.setAttributeNS(null,"width","100%"),Ge.setAttributeNS(null,"height","100%"),Ge.setAttributeNS(null,"x",z.toString()),Ge.setAttributeNS(null,"y",K.toString()),Ge.setAttributeNS(null,"externalResourcesRequired","true"),Te.appendChild(Ge),Ge.appendChild(se),Te},zs=function(H){return new Promise(function(U,z){var K=new Image;K.onload=function(){return U(K)},K.onerror=z,K.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(H))})},Nn={get SUPPORT_RANGE_BOUNDS(){var H=qo(document);return Object.defineProperty(Nn,"SUPPORT_RANGE_BOUNDS",{value:H}),H},get SUPPORT_WORD_BREAKING(){var H=Nn.SUPPORT_RANGE_BOUNDS&&vo(document);return Object.defineProperty(Nn,"SUPPORT_WORD_BREAKING",{value:H}),H},get SUPPORT_SVG_DRAWING(){var H=Vu(document);return Object.defineProperty(Nn,"SUPPORT_SVG_DRAWING",{value:H}),H},get SUPPORT_FOREIGNOBJECT_DRAWING(){var H=typeof Array.from=="function"&&typeof window.fetch=="function"?Xl(document):Promise.resolve(!1);return Object.defineProperty(Nn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:H}),H},get SUPPORT_CORS_IMAGES(){var H=ji();return Object.defineProperty(Nn,"SUPPORT_CORS_IMAGES",{value:H}),H},get SUPPORT_RESPONSE_TYPE(){var H=Gu();return Object.defineProperty(Nn,"SUPPORT_RESPONSE_TYPE",{value:H}),H},get SUPPORT_CORS_XHR(){var H="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Nn,"SUPPORT_CORS_XHR",{value:H}),H},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var H=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Nn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:H}),H}},Mi=function(){function H(U,z){this.text=U,this.bounds=z}return H}(),Ws=function(H,U,z,K){var se=Yl(U,z),pe=[],Te=0;return se.forEach(function(Ge){if(z.textDecorationLine.length||Ge.trim().length>0)if(Nn.SUPPORT_RANGE_BOUNDS){var We=ts(K,Te,Ge.length).getClientRects();if(We.length>1){var lt=Vs(Ge),bt=0;lt.forEach(function(Mt){pe.push(new Mi(Mt,D.fromDOMRectList(H,ts(K,bt+Te,Mt.length).getClientRects()))),bt+=Mt.length})}else pe.push(new Mi(Ge,D.fromDOMRectList(H,We)))}else{var _t=K.splitText(Ge.length);pe.push(new Mi(Ge,Gs(H,K))),K=_t}else Nn.SUPPORT_RANGE_BOUNDS||(K=K.splitText(Ge.length));Te+=Ge.length}),pe},Gs=function(H,U){var z=U.ownerDocument;if(z){var K=z.createElement("html2canvaswrapper");K.appendChild(U.cloneNode(!0));var se=U.parentNode;if(se){se.replaceChild(K,U);var pe=f(H,K);return K.firstChild&&se.replaceChild(K.firstChild,K),pe}}return D.EMPTY},ts=function(H,U,z){var K=H.ownerDocument;if(!K)throw new Error("Node has no owner document");var se=K.createRange();return se.setStart(H,U),se.setEnd(H,U+z),se},Vs=function(H){if(Nn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var U=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(U.segment(H)).map(function(z){return z.segment})}return go(H)},yo=function(H,U){if(Nn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var z=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(z.segment(H)).map(function(K){return K.segment})}return Jl(H,U)},Yl=function(H,U){return U.letterSpacing!==0?Vs(H):yo(H,U)},Xu=[32,160,4961,65792,65793,4153,4241],Jl=function(H,U){for(var z=jt(H,{lineBreak:U.lineBreak,wordBreak:U.overflowWrap==="break-word"?"break-word":U.wordBreak}),K=[],se,pe=function(){if(se.value){var Te=se.value.slice(),Ge=g(Te),We="";Ge.forEach(function(lt){Xu.indexOf(lt)===-1?We+=i(lt):(We.length&&K.push(We),K.push(i(lt)),We="")}),We.length&&K.push(We)}};!(se=z.next()).done;)pe();return K},rs=function(){function H(U,z,K){this.text=Yu(z.data,K.textTransform),this.textBounds=Ws(U,this.text,K,z)}return H}(),Yu=function(H,U){switch(U){case 1:return H.toLowerCase();case 3:return H.replace(Ju,bo);case 2:return H.toUpperCase();default:return H}},Ju=/(^|\s|:|-|\(|\))([a-z])/g,bo=function(H,U,z){return H.length>0?U+z.toUpperCase():H},Xs=function(H){N(U,H);function U(z,K){var se=H.call(this,z,K)||this;return se.src=K.currentSrc||K.src,se.intrinsicWidth=K.naturalWidth,se.intrinsicHeight=K.naturalHeight,se.context.cache.addImage(se.src),se}return U}(Oi),Ys=function(H){N(U,H);function U(z,K){var se=H.call(this,z,K)||this;return se.canvas=K,se.intrinsicWidth=K.width,se.intrinsicHeight=K.height,se}return U}(Oi),Zl=function(H){N(U,H);function U(z,K){var se=H.call(this,z,K)||this,pe=new XMLSerializer,Te=f(z,K);return K.setAttribute("width",Te.width+"px"),K.setAttribute("height",Te.height+"px"),se.svg="data:image/svg+xml,"+encodeURIComponent(pe.serializeToString(K)),se.intrinsicWidth=K.width.baseVal.value,se.intrinsicHeight=K.height.baseVal.value,se.context.cache.addImage(se.svg),se}return U}(Oi),ns=function(H){N(U,H);function U(z,K){var se=H.call(this,z,K)||this;return se.value=K.value,se}return U}(Oi),is=function(H){N(U,H);function U(z,K){var se=H.call(this,z,K)||this;return se.start=K.start,se.reversed=typeof K.reversed=="boolean"&&K.reversed===!0,se}return U}(Oi),Zu=[{type:15,flags:0,unit:"px",number:3}],$l=[{type:16,flags:0,number:50}],ql=function(H){return H.width>H.height?new D(H.left+(H.width-H.height)/2,H.top,H.height,H.height):H.width<H.height?new D(H.left,H.top+(H.height-H.width)/2,H.width,H.width):H},$u=function(H){var U=H.type===Eo?new Array(H.value.length+1).join("\u2022"):H.value;return U.length===0?H.placeholder||"":U},Ka="checkbox",oa="radio",Eo="password",eu=707406591,as=function(H){N(U,H);function U(z,K){var se=H.call(this,z,K)||this;se.type=K.type.toLowerCase(),se.checked=K.checked,se.value=$u(K),(se.type===Ka||se.type===oa)&&(se.styles.backgroundColor=3739148031,se.styles.borderTopColor=se.styles.borderRightColor=se.styles.borderBottomColor=se.styles.borderLeftColor=2779096575,se.styles.borderTopWidth=se.styles.borderRightWidth=se.styles.borderBottomWidth=se.styles.borderLeftWidth=1,se.styles.borderTopStyle=se.styles.borderRightStyle=se.styles.borderBottomStyle=se.styles.borderLeftStyle=1,se.styles.backgroundClip=[0],se.styles.backgroundOrigin=[0],se.bounds=ql(se.bounds));switch(se.type){case Ka:se.styles.borderTopRightRadius=se.styles.borderTopLeftRadius=se.styles.borderBottomRightRadius=se.styles.borderBottomLeftRadius=Zu;break;case oa:se.styles.borderTopRightRadius=se.styles.borderTopLeftRadius=se.styles.borderBottomRightRadius=se.styles.borderBottomLeftRadius=$l;break}return se}return U}(Oi),tu=function(H){N(U,H);function U(z,K){var se=H.call(this,z,K)||this,pe=K.options[K.selectedIndex||0];return se.value=pe&&pe.text||"",se}return U}(Oi),ru=function(H){N(U,H);function U(z,K){var se=H.call(this,z,K)||this;return se.value=K.value,se}return U}(Oi),nu=function(H){N(U,H);function U(z,K){var se=H.call(this,z,K)||this;se.src=K.src,se.width=parseInt(K.width,10)||0,se.height=parseInt(K.height,10)||0,se.backgroundColor=se.styles.backgroundColor;try{if(K.contentWindow&&K.contentWindow.document&&K.contentWindow.document.documentElement){se.tree=au(z,K.contentWindow.document.documentElement);var pe=K.contentWindow.document.documentElement?da(z,getComputedStyle(K.contentWindow.document.documentElement).backgroundColor):Li.TRANSPARENT,Te=K.contentWindow.document.body?da(z,getComputedStyle(K.contentWindow.document.body).backgroundColor):Li.TRANSPARENT;se.backgroundColor=ki(pe)?ki(Te)?se.styles.backgroundColor:Te:pe}}catch(Ge){}return se}return U}(Oi),qu=["OL","UL","MENU"],Co=function(H,U,z,K){for(var se=U.firstChild,pe=void 0;se;se=pe)if(pe=se.nextSibling,Zs(se)&&se.data.trim().length>0)z.textNodes.push(new rs(H,se,z.styles));else if(za(se))if(qs(se)&&se.assignedNodes)se.assignedNodes().forEach(function(Ge){return Co(H,Ge,z,K)});else{var Te=iu(H,se);Te.styles.isVisible()&&(ou(se,Te,K)?Te.flags|=4:Js(Te.styles)&&(Te.flags|=2),qu.indexOf(se.tagName)!==-1&&(Te.flags|=8),z.elements.push(Te),se.slot,se.shadowRoot?Co(H,se.shadowRoot,Te,K):!wo(se)&&!lu(se)&&!Bo(se)&&Co(H,se,Te,K))}},iu=function(H,U){return Ca(U)?new Xs(H,U):uu(U)?new Ys(H,U):lu(U)?new Zl(H,U):su(U)?new ns(H,U):ss(U)?new is(H,U):eA(U)?new as(H,U):Bo(U)?new tu(H,U):wo(U)?new ru(H,U):xi(U)?new nu(H,U):new Oi(H,U)},au=function(H,U){var z=iu(H,U);return z.flags|=4,Co(H,U,z,z),z},ou=function(H,U,z){return U.styles.isPositionedWithZIndex()||U.styles.opacity<1||U.styles.isTransformed()||En(H)&&z.styles.isTransparent()},Js=function(H){return H.isPositioned()||H.isFloating()},Zs=function(H){return H.nodeType===Node.TEXT_NODE},za=function(H){return H.nodeType===Node.ELEMENT_NODE},os=function(H){return za(H)&&typeof H.style!="undefined"&&!Ki(H)},Ki=function(H){return typeof H.className=="object"},su=function(H){return H.tagName==="LI"},ss=function(H){return H.tagName==="OL"},eA=function(H){return H.tagName==="INPUT"},tA=function(H){return H.tagName==="HTML"},lu=function(H){return H.tagName==="svg"},En=function(H){return H.tagName==="BODY"},uu=function(H){return H.tagName==="CANVAS"},ls=function(H){return H.tagName==="VIDEO"},Ca=function(H){return H.tagName==="IMG"},xi=function(H){return H.tagName==="IFRAME"},xo=function(H){return H.tagName==="STYLE"},$s=function(H){return H.tagName==="SCRIPT"},wo=function(H){return H.tagName==="TEXTAREA"},Bo=function(H){return H.tagName==="SELECT"},qs=function(H){return H.tagName==="SLOT"},el=function(H){return H.tagName.indexOf("-")>0},Au=function(){function H(){this.counters={}}return H.prototype.getCounterValue=function(U){var z=this.counters[U];return z&&z.length?z[z.length-1]:1},H.prototype.getCounterValues=function(U){var z=this.counters[U];return z||[]},H.prototype.pop=function(U){var z=this;U.forEach(function(K){return z.counters[K].pop()})},H.prototype.parse=function(U){var z=this,K=U.counterIncrement,se=U.counterReset,pe=!0;K!==null&&K.forEach(function(Ge){var We=z.counters[Ge.counter];We&&Ge.increment!==0&&(pe=!1,We.length||We.push(1),We[Math.max(0,We.length-1)]+=Ge.increment)});var Te=[];return pe&&se.forEach(function(Ge){var We=z.counters[Ge.counter];Te.push(Ge.counter),We||(We=z.counters[Ge.counter]=[]),We.push(Ge.reset)}),Te},H}(),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"]},us={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"]},du={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"]},un={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"]},xa=function(H,U,z,K,se,pe){return H<U||H>z?y(H,se,pe.length>0):K.integers.reduce(function(Te,Ge,We){for(;H>=Ge;)H-=Ge,Te+=K.values[We];return Te},"")+pe},hu=function(H,U,z,K){var se="";do z||H--,se=K(H)+se,H/=U;while(H*U>=U);return se},wn=function(H,U,z,K,se){var pe=z-U+1;return(H<0?"-":"")+(hu(Math.abs(H),pe,K,function(Te){return i(Math.floor(Te%pe)+U)})+se)},wa=function(H,U,z){z===void 0&&(z=". ");var K=U.length;return hu(Math.abs(H),K,!1,function(se){return U[Math.floor(se%K)]})+z},zi=1<<0,sa=1<<1,fn=1<<2,So=1<<3,Wi=function(H,U,z,K,se,pe){if(H<-9999||H>9999)return y(H,4,se.length>0);var Te=Math.abs(H),Ge=se;if(Te===0)return U[0]+Ge;for(var We=0;Te>0&&We<=4;We++){var lt=Te%10;lt===0&&kn(pe,zi)&&Ge!==""?Ge=U[lt]+Ge:lt>1||lt===1&&We===0||lt===1&&We===1&&kn(pe,sa)||lt===1&&We===1&&kn(pe,fn)&&H>100||lt===1&&We>1&&kn(pe,So)?Ge=U[lt]+(We>0?z[We-1]:"")+Ge:lt===1&&We>0&&(Ge=z[We-1]+Ge),Te=Math.floor(Te/10)}return(H<0?K:"")+Ge},fu="\u5341\u767E\u5343\u842C",To="\u62FE\u4F70\u4EDF\u842C",e="\u30DE\u30A4\u30CA\u30B9",t="\uB9C8\uC774\uB108\uC2A4",y=function(H,U,z){var K=z?". ":"",se=z?"\u3001":"",pe=z?", ":"",Te=z?" ":"";switch(U){case 0:return"\u2022"+Te;case 1:return"\u25E6"+Te;case 2:return"\u25FE"+Te;case 5:var Ge=wn(H,48,57,!0,K);return Ge.length<4?"0"+Ge:Ge;case 4:return wa(H,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",se);case 6:return xa(H,1,3999,cu,3,K).toLowerCase();case 7:return xa(H,1,3999,cu,3,K);case 8:return wn(H,945,969,!1,K);case 9:return wn(H,97,122,!1,K);case 10:return wn(H,65,90,!1,K);case 11:return wn(H,1632,1641,!0,K);case 12:case 49:return xa(H,1,9999,us,3,K);case 35:return xa(H,1,9999,us,3,K).toLowerCase();case 13:return wn(H,2534,2543,!0,K);case 14:case 30:return wn(H,6112,6121,!0,K);case 15:return wa(H,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",se);case 16:return wa(H,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",se);case 17:case 48:return Wi(H,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8CA0",se,sa|fn|So);case 47:return Wi(H,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",To,"\u8CA0",se,zi|sa|fn|So);case 42:return Wi(H,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",fu,"\u8D1F",se,sa|fn|So);case 41:return Wi(H,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",To,"\u8D1F",se,zi|sa|fn|So);case 26:return Wi(H,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",e,se,0);case 25:return Wi(H,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",e,se,zi|sa|fn);case 31:return Wi(H,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",t,pe,zi|sa|fn);case 33:return Wi(H,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",t,pe,0);case 32:return Wi(H,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",t,pe,zi|sa|fn);case 18:return wn(H,2406,2415,!0,K);case 20:return xa(H,1,19999,un,3,K);case 21:return wn(H,2790,2799,!0,K);case 22:return wn(H,2662,2671,!0,K);case 22:return xa(H,1,10999,du,3,K);case 23:return wa(H,"\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 wa(H,"\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 wn(H,3302,3311,!0,K);case 28:return wa(H,"\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",se);case 29:return wa(H,"\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",se);case 34:return wn(H,3792,3801,!0,K);case 37:return wn(H,6160,6169,!0,K);case 38:return wn(H,4160,4169,!0,K);case 39:return wn(H,2918,2927,!0,K);case 40:return wn(H,1776,1785,!0,K);case 43:return wn(H,3046,3055,!0,K);case 44:return wn(H,3174,3183,!0,K);case 45:return wn(H,3664,3673,!0,K);case 46:return wn(H,3872,3881,!0,K);case 3:default:return wn(H,48,57,!0,K)}},m="data-html2canvas-ignore",I=function(){function H(U,z,K){if(this.context=U,this.options=K,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 H.prototype.toIFrame=function(U,z){var K=this,se=oe(U,z);if(!se.contentWindow)return Promise.reject("Unable to find iframe window");var pe=U.defaultView.pageXOffset,Te=U.defaultView.pageYOffset,Ge=se.contentWindow,We=Ge.document,lt=ye(se).then(function(){return Q(K,void 0,void 0,function(){var bt,_t;return R(this,function(Mt){switch(Mt.label){case 0:return this.scrolledElements.forEach(Ut),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))),bt=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:Mt.sent(),Mt.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,fe(We)]:[3,4];case 3:Mt.sent(),Mt.label=4;case 4:return typeof bt=="function"?[2,Promise.resolve().then(function(){return bt(We,_t)}).then(function(){return se})]:[2,se]}})})});return We.open(),We.write(yt(document.doctype)+"<html></html>"),ft(this.referenceElement.ownerDocument,pe,Te),We.replaceChild(We.adoptNode(this.documentElement),We.documentElement),We.close(),lt},H.prototype.createElementClone=function(U){if(ka(U,2))debugger;if(uu(U))return this.createCanvasClone(U);if(ls(U))return this.createVideoClone(U);if(xo(U))return this.createStyleClone(U);var z=U.cloneNode(!1);return Ca(z)&&(Ca(U)&&U.currentSrc&&U.currentSrc!==U.src&&(z.src=U.currentSrc,z.srcset=""),z.loading==="lazy"&&(z.loading="eager")),el(z)?this.createCustomElementClone(z):z},H.prototype.createCustomElementClone=function(U){var z=document.createElement("html2canvascustomelement");return $e(U.style,z),z},H.prototype.createStyleClone=function(U){try{var z=U.sheet;if(z&&z.cssRules){var K=[].slice.call(z.cssRules,0).reduce(function(pe,Te){return Te&&typeof Te.cssText=="string"?pe+Te.cssText:pe},""),se=U.cloneNode(!1);return se.textContent=K,se}}catch(pe){if(this.context.logger.error("Unable to access cssRules property",pe),pe.name!=="SecurityError")throw pe}return U.cloneNode(!1)},H.prototype.createCanvasClone=function(U){var z;if(this.options.inlineImages&&U.ownerDocument){var K=U.ownerDocument.createElement("img");try{return K.src=U.toDataURL(),K}catch(lt){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",U)}}var se=U.cloneNode(!1);try{se.width=U.width,se.height=U.height;var pe=U.getContext("2d"),Te=se.getContext("2d");if(Te)if(!this.options.allowTaint&&pe)Te.putImageData(pe.getImageData(0,0,U.width,U.height),0,0);else{var Ge=(z=U.getContext("webgl2"))!==null&&z!==void 0?z:U.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",U)}Te.drawImage(U,0,0)}return se}catch(lt){this.context.logger.info("Unable to clone canvas as it is tainted",U)}return se},H.prototype.createVideoClone=function(U){var z=U.ownerDocument.createElement("canvas");z.width=U.offsetWidth,z.height=U.offsetHeight;var K=z.getContext("2d");try{return K&&(K.drawImage(U,0,0,z.width,z.height),this.options.allowTaint||K.getImageData(0,0,z.width,z.height)),z}catch(pe){this.context.logger.info("Unable to clone video as it is tainted",U)}var se=U.ownerDocument.createElement("canvas");return se.width=U.offsetWidth,se.height=U.offsetHeight,se},H.prototype.appendChildNode=function(U,z,K){(!za(z)||!$s(z)&&!z.hasAttribute(m)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(z)))&&((!this.options.copyStyles||!za(z)||!xo(z))&&U.appendChild(this.cloneNode(z,K)))},H.prototype.cloneChildNodes=function(U,z,K){for(var se=this,pe=U.shadowRoot?U.shadowRoot.firstChild:U.firstChild;pe;pe=pe.nextSibling)if(za(pe)&&qs(pe)&&typeof pe.assignedNodes=="function"){var Te=pe.assignedNodes();Te.length&&Te.forEach(function(Ge){return se.appendChildNode(z,Ge,K)})}else this.appendChildNode(z,pe,K)},H.prototype.cloneNode=function(U,z){if(Zs(U))return document.createTextNode(U.data);if(!U.ownerDocument)return U.cloneNode(!1);var K=U.ownerDocument.defaultView;if(K&&za(U)&&(os(U)||Ki(U))){var se=this.createElementClone(U);se.style.transitionProperty="none";var pe=K.getComputedStyle(U),Te=K.getComputedStyle(U,":before"),Ge=K.getComputedStyle(U,":after");this.referenceElement===U&&os(se)&&(this.clonedReferenceElement=se),En(se)&&ir(se);var We=this.counters.parse(new Pl(this.context,pe)),lt=this.resolvePseudoContent(U,se,Te,V.BEFORE);el(U)&&(z=!0),ls(U)||this.cloneChildNodes(U,se,z),lt&&se.insertBefore(lt,se.firstChild);var bt=this.resolvePseudoContent(U,se,Ge,V.AFTER);return bt&&se.appendChild(bt),this.counters.pop(We),(pe&&(this.options.copyStyles||Ki(U))&&!xi(U)||z)&&$e(pe,se),(U.scrollTop!==0||U.scrollLeft!==0)&&this.scrolledElements.push([se,U.scrollLeft,U.scrollTop]),(wo(U)||Bo(U))&&(wo(se)||Bo(se))&&(se.value=U.value),se}return U.cloneNode(!1)},H.prototype.resolvePseudoContent=function(U,z,K,se){var pe=this;if(!K)return;var Te=K.content,Ge=z.ownerDocument;if(!Ge||!Te||Te==="none"||Te==="-moz-alt-content"||K.display==="none")return;this.counters.parse(new Pl(this.context,K));var We=new Nu(this.context,K),lt=Ge.createElement("html2canvaspseudoelement");$e(K,lt),We.content.forEach(function(_t){if(_t.type===0)lt.appendChild(Ge.createTextNode(_t.value));else if(_t.type===22){var Mt=Ge.createElement("img");Mt.src=_t.value,Mt.style.opacity="1",lt.appendChild(Mt)}else if(_t.type===18){if(_t.name==="attr"){var lr=_t.values.filter(vn);lr.length&<.appendChild(Ge.createTextNode(U.getAttribute(lr[0].value)||""))}else if(_t.name==="counter"){var zt=_t.values.filter(Yi),rr=zt[0],Lr=zt[1];if(rr&&vn(rr)){var or=pe.counters.getCounterValue(rr.value),Ar=Lr&&vn(Lr)?ya.parse(pe.context,Lr.value):3;lt.appendChild(Ge.createTextNode(y(or,Ar,!1)))}}else if(_t.name==="counters"){var rn=_t.values.filter(Yi),rr=rn[0],Wr=rn[1],Lr=rn[2];if(rr&&vn(rr)){var pn=pe.counters.getCounterValues(rr.value),ur=Lr&&vn(Lr)?ya.parse(pe.context,Lr.value):3,An=Wr&&Wr.type===0?Wr.value:"",mn=pn.map(function(bi){return y(bi,ur,!1)}).join(An);lt.appendChild(Ge.createTextNode(mn))}}}else if(_t.type===20)switch(_t.value){case"open-quote":lt.appendChild(Ge.createTextNode(Ml(We.quotes,pe.quoteDepth++,!0)));break;case"close-quote":lt.appendChild(Ge.createTextNode(Ml(We.quotes,--pe.quoteDepth,!1)));break;default:lt.appendChild(Ge.createTextNode(_t.value))}}),lt.className=Vt+" "+Jt;var bt=se===V.BEFORE?" "+Vt:" "+Jt;return Ki(z)?z.className.baseValue+=bt:z.className+=bt,lt},H.destroy=function(U){return U.parentNode?(U.parentNode.removeChild(U),!0):!1},H}(),V;(function(H){H[H.BEFORE=0]="BEFORE",H[H.AFTER=1]="AFTER"})(V||(V={}));var oe=function(H,U){var z=H.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=U.width.toString(),z.height=U.height.toString(),z.scrolling="no",z.setAttribute(m,"true"),H.body.appendChild(z),z},de=function(H){return new Promise(function(U){if(H.complete){U();return}if(!H.src){U();return}H.onload=U,H.onerror=U})},fe=function(H){return Promise.all([].slice.call(H.images,0).map(de))},ye=function(H){return new Promise(function(U,z){var K=H.contentWindow;if(!K)return z("No window assigned for iframe");var se=K.document;K.onload=H.onload=function(){K.onload=H.onload=null;var pe=setInterval(function(){se.body.childNodes.length>0&&se.readyState==="complete"&&(clearInterval(pe),U(H))},50)}})},Xe=["all","d","content"],$e=function(H,U){for(var z=H.length-1;z>=0;z--){var K=H.item(z);Xe.indexOf(K)===-1&&U.style.setProperty(K,H.getPropertyValue(K))}return U},yt=function(H){var U="";return H&&(U+="<!DOCTYPE ",H.name&&(U+=H.name),H.internalSubset&&(U+=H.internalSubset),H.publicId&&(U+='"'+H.publicId+'"'),H.systemId&&(U+='"'+H.systemId+'"'),U+=">"),U},ft=function(H,U,z){H&&H.defaultView&&(U!==H.defaultView.pageXOffset||z!==H.defaultView.pageYOffset)&&H.defaultView.scrollTo(U,z)},Ut=function(H){var U=H[0],z=H[1],K=H[2];U.scrollLeft=z,U.scrollTop=K},Nt=":before",Kt=":after",Vt="___html2canvas___pseudoelement_before",Jt="___html2canvas___pseudoelement_after",Xt=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,ir=function(H){xr(H,"."+Vt+Nt+Xt+`
|
|
.`+Jt+Kt+Xt)},xr=function(H,U){var z=H.ownerDocument;if(z){var K=z.createElement("style");K.textContent=U,H.appendChild(K)}},mr=function(){function H(){}return H.getOrigin=function(U){var z=H._link;return z?(z.href=U,z.href=z.href,z.protocol+z.hostname+z.port):"about:blank"},H.isSameOrigin=function(U){return H.getOrigin(U)===H._origin},H.setContext=function(U){H._link=U.document.createElement("a"),H._origin=H.getOrigin(U.location.href)},H._origin="about:blank",H}(),Pr=function(){function H(U,z){this.context=U,this._options=z,this._cache={}}return H.prototype.addImage=function(U){var z=Promise.resolve();return this.has(U)||(qn(U)||fi(U))&&(this._cache[U]=this.loadImage(U)).catch(function(){}),z},H.prototype.match=function(U){return this._cache[U]},H.prototype.loadImage=function(U){return Q(this,void 0,void 0,function(){var z,K,se,pe,Te=this;return R(this,function(Ge){switch(Ge.label){case 0:return z=mr.isSameOrigin(U),K=!$n(U)&&this._options.useCORS===!0&&Nn.SUPPORT_CORS_IMAGES&&!z,se=!$n(U)&&!z&&!qn(U)&&typeof this._options.proxy=="string"&&Nn.SUPPORT_CORS_XHR&&!K,!z&&this._options.allowTaint===!1&&!$n(U)&&!qn(U)&&!se&&!K?[2]:(pe=U,se?[4,this.proxy(pe)]:[3,2]);case 1:pe=Ge.sent(),Ge.label=2;case 2:return this.context.logger.debug("Added image "+U.substring(0,256)),[4,new Promise(function(We,lt){var bt=new Image;bt.onload=function(){return We(bt)},bt.onerror=lt,(_n(pe)||K)&&(bt.crossOrigin="anonymous"),bt.src=pe,bt.complete===!0&&setTimeout(function(){return We(bt)},500),Te._options.imageTimeout>0&&setTimeout(function(){return lt("Timed out ("+Te._options.imageTimeout+"ms) loading image")},Te._options.imageTimeout)})];case 3:return[2,Ge.sent()]}})})},H.prototype.has=function(U){return typeof this._cache[U]!="undefined"},H.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},H.prototype.proxy=function(U){var z=this,K=this._options.proxy;if(!K)throw new Error("No proxy defined");var se=U.substring(0,256);return new Promise(function(pe,Te){var Ge=Nn.SUPPORT_RESPONSE_TYPE?"blob":"text",We=new XMLHttpRequest;We.onload=function(){if(We.status===200)if(Ge==="text")pe(We.response);else{var _t=new FileReader;_t.addEventListener("load",function(){return pe(_t.result)},!1),_t.addEventListener("error",function(Mt){return Te(Mt)},!1),_t.readAsDataURL(We.response)}else Te("Failed to proxy resource "+se+" with status code "+We.status)},We.onerror=Te;var lt=K.indexOf("?")>-1?"&":"?";if(We.open("GET",""+K+lt+"url="+encodeURIComponent(U)+"&responseType="+Ge),Ge!=="text"&&We instanceof XMLHttpRequest&&(We.responseType=Ge),z._options.imageTimeout){var bt=z._options.imageTimeout;We.timeout=bt,We.ontimeout=function(){return Te("Timed out ("+bt+"ms) proxying "+se)}}We.send()})},H}(),yn=/^data:image\/svg\+xml/i,zn=/^data:image\/.*;base64,/i,On=/^data:image\/.*/i,fi=function(H){return Nn.SUPPORT_SVG_DRAWING||!Vn(H)},$n=function(H){return On.test(H)},_n=function(H){return zn.test(H)},qn=function(H){return H.substr(0,4)==="blob"},Vn=function(H){return H.substr(-3).toLowerCase()==="svg"||yn.test(H)},Gt=function(){function H(U,z){this.type=0,this.x=U,this.y=z}return H.prototype.add=function(U,z){return new H(this.x+U,this.y+z)},H}(),Bn=function(H,U,z){return new Gt(H.x+(U.x-H.x)*z,H.y+(U.y-H.y)*z)},Sn=function(){function H(U,z,K,se){this.type=1,this.start=U,this.startControl=z,this.endControl=K,this.end=se}return H.prototype.subdivide=function(U,z){var K=Bn(this.start,this.startControl,U),se=Bn(this.startControl,this.endControl,U),pe=Bn(this.endControl,this.end,U),Te=Bn(K,se,U),Ge=Bn(se,pe,U),We=Bn(Te,Ge,U);return z?new H(this.start,K,Te,We):new H(We,Ge,pe,this.end)},H.prototype.add=function(U,z){return new H(this.start.add(U,z),this.startControl.add(U,z),this.endControl.add(U,z),this.end.add(U,z))},H.prototype.reverse=function(){return new H(this.end,this.endControl,this.startControl,this.start)},H}(),Tn=function(H){return H.type===1},Wa=function(){function H(U){var z=U.styles,K=U.bounds,se=ca(z.borderTopLeftRadius,K.width,K.height),pe=se[0],Te=se[1],Ge=ca(z.borderTopRightRadius,K.width,K.height),We=Ge[0],lt=Ge[1],bt=ca(z.borderBottomRightRadius,K.width,K.height),_t=bt[0],Mt=bt[1],lr=ca(z.borderBottomLeftRadius,K.width,K.height),zt=lr[0],rr=lr[1],Lr=[];Lr.push((pe+We)/K.width),Lr.push((zt+_t)/K.width),Lr.push((Te+rr)/K.height),Lr.push((lt+Mt)/K.height);var or=Math.max.apply(Math,Lr);or>1&&(pe/=or,Te/=or,We/=or,lt/=or,_t/=or,Mt/=or,zt/=or,rr/=or);var Ar=K.width-We,rn=K.height-Mt,Wr=K.width-_t,pn=K.height-rr,ur=z.borderTopWidth,An=z.borderRightWidth,mn=z.borderBottomWidth,zr=z.borderLeftWidth,wi=on(z.paddingTop,U.bounds.width),bi=on(z.paddingRight,U.bounds.width),Di=on(z.paddingBottom,U.bounds.width),ai=on(z.paddingLeft,U.bounds.width);this.topLeftBorderDoubleOuterBox=pe>0||Te>0?Kr(K.left+zr/3,K.top+ur/3,pe-zr/3,Te-ur/3,Xr.TOP_LEFT):new Gt(K.left+zr/3,K.top+ur/3),this.topRightBorderDoubleOuterBox=pe>0||Te>0?Kr(K.left+Ar,K.top+ur/3,We-An/3,lt-ur/3,Xr.TOP_RIGHT):new Gt(K.left+K.width-An/3,K.top+ur/3),this.bottomRightBorderDoubleOuterBox=_t>0||Mt>0?Kr(K.left+Wr,K.top+rn,_t-An/3,Mt-mn/3,Xr.BOTTOM_RIGHT):new Gt(K.left+K.width-An/3,K.top+K.height-mn/3),this.bottomLeftBorderDoubleOuterBox=zt>0||rr>0?Kr(K.left+zr/3,K.top+pn,zt-zr/3,rr-mn/3,Xr.BOTTOM_LEFT):new Gt(K.left+zr/3,K.top+K.height-mn/3),this.topLeftBorderDoubleInnerBox=pe>0||Te>0?Kr(K.left+zr*2/3,K.top+ur*2/3,pe-zr*2/3,Te-ur*2/3,Xr.TOP_LEFT):new Gt(K.left+zr*2/3,K.top+ur*2/3),this.topRightBorderDoubleInnerBox=pe>0||Te>0?Kr(K.left+Ar,K.top+ur*2/3,We-An*2/3,lt-ur*2/3,Xr.TOP_RIGHT):new Gt(K.left+K.width-An*2/3,K.top+ur*2/3),this.bottomRightBorderDoubleInnerBox=_t>0||Mt>0?Kr(K.left+Wr,K.top+rn,_t-An*2/3,Mt-mn*2/3,Xr.BOTTOM_RIGHT):new Gt(K.left+K.width-An*2/3,K.top+K.height-mn*2/3),this.bottomLeftBorderDoubleInnerBox=zt>0||rr>0?Kr(K.left+zr*2/3,K.top+pn,zt-zr*2/3,rr-mn*2/3,Xr.BOTTOM_LEFT):new Gt(K.left+zr*2/3,K.top+K.height-mn*2/3),this.topLeftBorderStroke=pe>0||Te>0?Kr(K.left+zr/2,K.top+ur/2,pe-zr/2,Te-ur/2,Xr.TOP_LEFT):new Gt(K.left+zr/2,K.top+ur/2),this.topRightBorderStroke=pe>0||Te>0?Kr(K.left+Ar,K.top+ur/2,We-An/2,lt-ur/2,Xr.TOP_RIGHT):new Gt(K.left+K.width-An/2,K.top+ur/2),this.bottomRightBorderStroke=_t>0||Mt>0?Kr(K.left+Wr,K.top+rn,_t-An/2,Mt-mn/2,Xr.BOTTOM_RIGHT):new Gt(K.left+K.width-An/2,K.top+K.height-mn/2),this.bottomLeftBorderStroke=zt>0||rr>0?Kr(K.left+zr/2,K.top+pn,zt-zr/2,rr-mn/2,Xr.BOTTOM_LEFT):new Gt(K.left+zr/2,K.top+K.height-mn/2),this.topLeftBorderBox=pe>0||Te>0?Kr(K.left,K.top,pe,Te,Xr.TOP_LEFT):new Gt(K.left,K.top),this.topRightBorderBox=We>0||lt>0?Kr(K.left+Ar,K.top,We,lt,Xr.TOP_RIGHT):new Gt(K.left+K.width,K.top),this.bottomRightBorderBox=_t>0||Mt>0?Kr(K.left+Wr,K.top+rn,_t,Mt,Xr.BOTTOM_RIGHT):new Gt(K.left+K.width,K.top+K.height),this.bottomLeftBorderBox=zt>0||rr>0?Kr(K.left,K.top+pn,zt,rr,Xr.BOTTOM_LEFT):new Gt(K.left,K.top+K.height),this.topLeftPaddingBox=pe>0||Te>0?Kr(K.left+zr,K.top+ur,Math.max(0,pe-zr),Math.max(0,Te-ur),Xr.TOP_LEFT):new Gt(K.left+zr,K.top+ur),this.topRightPaddingBox=We>0||lt>0?Kr(K.left+Math.min(Ar,K.width-An),K.top+ur,Ar>K.width+An?0:Math.max(0,We-An),Math.max(0,lt-ur),Xr.TOP_RIGHT):new Gt(K.left+K.width-An,K.top+ur),this.bottomRightPaddingBox=_t>0||Mt>0?Kr(K.left+Math.min(Wr,K.width-zr),K.top+Math.min(rn,K.height-mn),Math.max(0,_t-An),Math.max(0,Mt-mn),Xr.BOTTOM_RIGHT):new Gt(K.left+K.width-An,K.top+K.height-mn),this.bottomLeftPaddingBox=zt>0||rr>0?Kr(K.left+zr,K.top+Math.min(pn,K.height-mn),Math.max(0,zt-zr),Math.max(0,rr-mn),Xr.BOTTOM_LEFT):new Gt(K.left+zr,K.top+K.height-mn),this.topLeftContentBox=pe>0||Te>0?Kr(K.left+zr+ai,K.top+ur+wi,Math.max(0,pe-(zr+ai)),Math.max(0,Te-(ur+wi)),Xr.TOP_LEFT):new Gt(K.left+zr+ai,K.top+ur+wi),this.topRightContentBox=We>0||lt>0?Kr(K.left+Math.min(Ar,K.width+zr+ai),K.top+ur+wi,Ar>K.width+zr+ai?0:We-zr+ai,lt-(ur+wi),Xr.TOP_RIGHT):new Gt(K.left+K.width-(An+bi),K.top+ur+wi),this.bottomRightContentBox=_t>0||Mt>0?Kr(K.left+Math.min(Wr,K.width-(zr+ai)),K.top+Math.min(rn,K.height+ur+wi),Math.max(0,_t-(An+bi)),Mt-(mn+Di),Xr.BOTTOM_RIGHT):new Gt(K.left+K.width-(An+bi),K.top+K.height-(mn+Di)),this.bottomLeftContentBox=zt>0||rr>0?Kr(K.left+zr+ai,K.top+pn,Math.max(0,zt-(zr+ai)),rr-(mn+Di),Xr.BOTTOM_LEFT):new Gt(K.left+zr+ai,K.top+K.height-(mn+Di))}return H}(),Xr;(function(H){H[H.TOP_LEFT=0]="TOP_LEFT",H[H.TOP_RIGHT=1]="TOP_RIGHT",H[H.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",H[H.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Xr||(Xr={}));var Kr=function(H,U,z,K,se){var pe=4*((Math.sqrt(2)-1)/3),Te=z*pe,Ge=K*pe,We=H+z,lt=U+K;switch(se){case Xr.TOP_LEFT:return new Sn(new Gt(H,lt),new Gt(H,lt-Ge),new Gt(We-Te,U),new Gt(We,U));case Xr.TOP_RIGHT:return new Sn(new Gt(H,U),new Gt(H+Te,U),new Gt(We,lt-Ge),new Gt(We,lt));case Xr.BOTTOM_RIGHT:return new Sn(new Gt(We,U),new Gt(We,U+Ge),new Gt(H+Te,lt),new Gt(H,lt));case Xr.BOTTOM_LEFT:default:return new Sn(new Gt(We,lt),new Gt(We-Te,lt),new Gt(H,U+Ge),new Gt(H,U))}},yi=function(H){return[H.topLeftBorderBox,H.topRightBorderBox,H.bottomRightBorderBox,H.bottomLeftBorderBox]},Wn=function(H){return[H.topLeftContentBox,H.topRightContentBox,H.bottomRightContentBox,H.bottomLeftContentBox]},Ga=function(H){return[H.topLeftPaddingBox,H.topRightPaddingBox,H.bottomRightPaddingBox,H.bottomLeftPaddingBox]},Gi=function(){function H(U,z,K){this.offsetX=U,this.offsetY=z,this.matrix=K,this.type=0,this.target=2|4}return H}(),Fi=function(){function H(U,z){this.path=U,this.target=z,this.type=1}return H}(),Ba=function(){function H(U){this.opacity=U,this.type=2,this.target=2|4}return H}(),ii=function(H){return H.type===0},Sa=function(H){return H.type===1},tl=function(H){return H.type===2},iA=function(H,U){return H.length===U.length?H.some(function(z,K){return z===U[K]}):!1},dA=function(H,U,z,K,se){return H.map(function(pe,Te){switch(Te){case 0:return pe.add(U,z);case 1:return pe.add(U+K,z);case 2:return pe.add(U+K,z+se);case 3:return pe.add(U,z+se)}return pe})},aA=function(){function H(U){this.element=U,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return H}(),oA=function(){function H(U,z){if(this.container=U,this.parent=z,this.effects=[],this.curves=new Wa(this.container),this.container.styles.opacity<1&&this.effects.push(new Ba(this.container.styles.opacity)),this.container.styles.transform!==null){var K=this.container.bounds.left+this.container.styles.transformOrigin[0].number,se=this.container.bounds.top+this.container.styles.transformOrigin[1].number,pe=this.container.styles.transform;this.effects.push(new Gi(K,se,pe))}if(this.container.styles.overflowX!==0){var Te=yi(this.curves),Ge=Ga(this.curves);iA(Te,Ge)?this.effects.push(new Fi(Te,2|4)):(this.effects.push(new Fi(Te,2)),this.effects.push(new Fi(Ge,4)))}}return H.prototype.getEffects=function(U){for(var z=[2,3].indexOf(this.container.styles.position)===-1,K=this.parent,se=this.effects.slice(0);K;){var pe=K.effects.filter(function(We){return!Sa(We)});if(z||K.container.styles.position!==0||!K.parent){if(se.unshift.apply(se,pe),z=[2,3].indexOf(K.container.styles.position)===-1,K.container.styles.overflowX!==0){var Te=yi(K.curves),Ge=Ga(K.curves);iA(Te,Ge)||se.unshift(new Fi(Ge,2|4))}}else se.unshift.apply(se,pe);K=K.parent}return se.filter(function(We){return kn(We.target,U)})},H}(),rA=function(H,U,z,K){H.container.elements.forEach(function(se){var pe=kn(se.flags,4),Te=kn(se.flags,2),Ge=new oA(se,H);kn(se.styles.display,2048)&&K.push(Ge);var We=kn(se.flags,8)?[]:K;if(pe||Te){var lt=pe||se.styles.isPositioned()?z:U,bt=new aA(Ge);if(se.styles.isPositioned()||se.styles.opacity<1||se.styles.isTransformed()){var _t=se.styles.zIndex.order;if(_t<0){var Mt=0;lt.negativeZIndex.some(function(zt,rr){return _t>zt.element.container.styles.zIndex.order?(Mt=rr,!1):Mt>0}),lt.negativeZIndex.splice(Mt,0,bt)}else if(_t>0){var lr=0;lt.positiveZIndex.some(function(zt,rr){return _t>=zt.element.container.styles.zIndex.order?(lr=rr+1,!1):lr>0}),lt.positiveZIndex.splice(lr,0,bt)}else lt.zeroOrAutoZIndexOrTransformedOrOpacity.push(bt)}else se.styles.isFloating()?lt.nonPositionedFloats.push(bt):lt.nonPositionedInlineLevel.push(bt);rA(Ge,bt,pe?bt:z,We)}else se.styles.isInlineLevel()?U.inlineLevel.push(Ge):U.nonInlineLevel.push(Ge),rA(Ge,U,z,We);kn(se.flags,8)&&sA(se,We)})},sA=function(H,U){for(var z=H instanceof is?H.start:1,K=H instanceof is?H.reversed:!1,se=0;se<U.length;se++){var pe=U[se];pe.container instanceof ns&&typeof pe.container.value=="number"&&pe.container.value!==0&&(z=pe.container.value),pe.listValue=y(z,pe.container.styles.listStyleType,!0),z+=K?-1:1}},hA=function(H){var U=new oA(H,null),z=new aA(U),K=[];return rA(U,z,z,K),sA(U.container,K),z},lA=function(H,U){switch(U){case 0:return Ui(H.topLeftBorderBox,H.topLeftPaddingBox,H.topRightBorderBox,H.topRightPaddingBox);case 1:return Ui(H.topRightBorderBox,H.topRightPaddingBox,H.bottomRightBorderBox,H.bottomRightPaddingBox);case 2:return Ui(H.bottomRightBorderBox,H.bottomRightPaddingBox,H.bottomLeftBorderBox,H.bottomLeftPaddingBox);case 3:default:return Ui(H.bottomLeftBorderBox,H.bottomLeftPaddingBox,H.topLeftBorderBox,H.topLeftPaddingBox)}},fA=function(H,U){switch(U){case 0:return Ui(H.topLeftBorderBox,H.topLeftBorderDoubleOuterBox,H.topRightBorderBox,H.topRightBorderDoubleOuterBox);case 1:return Ui(H.topRightBorderBox,H.topRightBorderDoubleOuterBox,H.bottomRightBorderBox,H.bottomRightBorderDoubleOuterBox);case 2:return Ui(H.bottomRightBorderBox,H.bottomRightBorderDoubleOuterBox,H.bottomLeftBorderBox,H.bottomLeftBorderDoubleOuterBox);case 3:default:return Ui(H.bottomLeftBorderBox,H.bottomLeftBorderDoubleOuterBox,H.topLeftBorderBox,H.topLeftBorderDoubleOuterBox)}},pA=function(H,U){switch(U){case 0:return Ui(H.topLeftBorderDoubleInnerBox,H.topLeftPaddingBox,H.topRightBorderDoubleInnerBox,H.topRightPaddingBox);case 1:return Ui(H.topRightBorderDoubleInnerBox,H.topRightPaddingBox,H.bottomRightBorderDoubleInnerBox,H.bottomRightPaddingBox);case 2:return Ui(H.bottomRightBorderDoubleInnerBox,H.bottomRightPaddingBox,H.bottomLeftBorderDoubleInnerBox,H.bottomLeftPaddingBox);case 3:default:return Ui(H.bottomLeftBorderDoubleInnerBox,H.bottomLeftPaddingBox,H.topLeftBorderDoubleInnerBox,H.topLeftPaddingBox)}},mA=function(H,U){switch(U){case 0:return pu(H.topLeftBorderStroke,H.topRightBorderStroke);case 1:return pu(H.topRightBorderStroke,H.bottomRightBorderStroke);case 2:return pu(H.bottomRightBorderStroke,H.bottomLeftBorderStroke);case 3:default:return pu(H.bottomLeftBorderStroke,H.topLeftBorderStroke)}},pu=function(H,U){var z=[];return Tn(H)?z.push(H.subdivide(.5,!1)):z.push(H),Tn(U)?z.push(U.subdivide(.5,!0)):z.push(U),z},Ui=function(H,U,z,K){var se=[];return Tn(H)?se.push(H.subdivide(.5,!1)):se.push(H),Tn(z)?se.push(z.subdivide(.5,!0)):se.push(z),Tn(K)?se.push(K.subdivide(.5,!0).reverse()):se.push(K),Tn(U)?se.push(U.subdivide(.5,!1).reverse()):se.push(U),se},uA=function(H){var U=H.bounds,z=H.styles;return U.add(z.borderLeftWidth,z.borderTopWidth,-(z.borderRightWidth+z.borderLeftWidth),-(z.borderTopWidth+z.borderBottomWidth))},mu=function(H){var U=H.styles,z=H.bounds,K=on(U.paddingLeft,z.width),se=on(U.paddingRight,z.width),pe=on(U.paddingTop,z.width),Te=on(U.paddingBottom,z.width);return z.add(K+U.borderLeftWidth,pe+U.borderTopWidth,-(U.borderRightWidth+U.borderLeftWidth+K+se),-(U.borderTopWidth+U.borderBottomWidth+pe+Te))},gA=function(H,U){return H===0?U.bounds:H===2?mu(U):uA(U)},vA=function(H,U){return H===0?U.bounds:H===2?mu(U):uA(U)},nA=function(H,U,z){var K=gA(cs(H.styles.backgroundOrigin,U),H),se=vA(cs(H.styles.backgroundClip,U),H),pe=yA(cs(H.styles.backgroundSize,U),z,K),Te=pe[0],Ge=pe[1],We=ca(cs(H.styles.backgroundPosition,U),K.width-Te,K.height-Ge),lt=bA(cs(H.styles.backgroundRepeat,U),We,pe,K,se),bt=Math.round(K.left+We[0]),_t=Math.round(K.top+We[1]);return[lt,bt,_t,Te,Ge]},As=function(H){return vn(H)&&H.value===fa.AUTO},gu=function(H){return typeof H=="number"},yA=function(H,U,z){var K=U[0],se=U[1],pe=U[2],Te=H[0],Ge=H[1];if(!Te)return[0,0];if(In(Te)&&Ge&&In(Ge))return[on(Te,z.width),on(Ge,z.height)];var We=gu(pe);if(vn(Te)&&(Te.value===fa.CONTAIN||Te.value===fa.COVER)){if(gu(pe)){var lt=z.width/z.height;return lt<pe!==(Te.value===fa.COVER)?[z.width,z.width/pe]:[z.height*pe,z.height]}return[z.width,z.height]}var bt=gu(K),_t=gu(se),Mt=bt||_t;if(As(Te)&&(!Ge||As(Ge))){if(bt&&_t)return[K,se];if(!We&&!Mt)return[z.width,z.height];if(Mt&&We){var lr=bt?K:se*pe,zt=_t?se:K/pe;return[lr,zt]}var rr=bt?K:z.width,Lr=_t?se:z.height;return[rr,Lr]}if(We){var or=0,Ar=0;return In(Te)?or=on(Te,z.width):In(Ge)&&(Ar=on(Ge,z.height)),As(Te)?or=Ar*pe:(!Ge||As(Ge))&&(Ar=or/pe),[or,Ar]}var rn=null,Wr=null;if(In(Te)?rn=on(Te,z.width):Ge&&In(Ge)&&(Wr=on(Ge,z.height)),rn!==null&&(!Ge||As(Ge))&&(Wr=bt&&_t?rn/K*se:z.height),Wr!==null&&As(Te)&&(rn=bt&&_t?Wr/se*K:z.width),rn!==null&&Wr!==null)return[rn,Wr];throw new Error("Unable to calculate background-size for element")},cs=function(H,U){var z=H[U];return typeof z=="undefined"?H[0]:z},bA=function(H,U,z,K,se){var pe=U[0],Te=U[1],Ge=z[0],We=z[1];switch(H){case 2:return[new Gt(Math.round(K.left),Math.round(K.top+Te)),new Gt(Math.round(K.left+K.width),Math.round(K.top+Te)),new Gt(Math.round(K.left+K.width),Math.round(We+K.top+Te)),new Gt(Math.round(K.left),Math.round(We+K.top+Te))];case 3:return[new Gt(Math.round(K.left+pe),Math.round(K.top)),new Gt(Math.round(K.left+pe+Ge),Math.round(K.top)),new Gt(Math.round(K.left+pe+Ge),Math.round(K.height+K.top)),new Gt(Math.round(K.left+pe),Math.round(K.height+K.top))];case 1:return[new Gt(Math.round(K.left+pe),Math.round(K.top+Te)),new Gt(Math.round(K.left+pe+Ge),Math.round(K.top+Te)),new Gt(Math.round(K.left+pe+Ge),Math.round(K.top+Te+We)),new Gt(Math.round(K.left+pe),Math.round(K.top+Te+We))];default:return[new Gt(Math.round(se.left),Math.round(se.top)),new Gt(Math.round(se.left+se.width),Math.round(se.top)),new Gt(Math.round(se.left+se.width),Math.round(se.height+se.top)),new Gt(Math.round(se.left),Math.round(se.height+se.top))]}},EA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",AA="Hidden Text",CA=function(){function H(U){this._data={},this._document=U}return H.prototype.parseMetrics=function(U,z){var K=this._document.createElement("div"),se=this._document.createElement("img"),pe=this._document.createElement("span"),Te=this._document.body;K.style.visibility="hidden",K.style.fontFamily=U,K.style.fontSize=z,K.style.margin="0",K.style.padding="0",K.style.whiteSpace="nowrap",Te.appendChild(K),se.src=EA,se.width=1,se.height=1,se.style.margin="0",se.style.padding="0",se.style.verticalAlign="baseline",pe.style.fontFamily=U,pe.style.fontSize=z,pe.style.margin="0",pe.style.padding="0",pe.appendChild(this._document.createTextNode(AA)),K.appendChild(pe),K.appendChild(se);var Ge=se.offsetTop-pe.offsetTop+2;K.removeChild(pe),K.appendChild(this._document.createTextNode(AA)),K.style.lineHeight="normal",se.style.verticalAlign="super";var We=se.offsetTop-K.offsetTop+2;return Te.removeChild(K),{baseline:Ge,middle:We}},H.prototype.getMetrics=function(U,z){var K=U+" "+z;return typeof this._data[K]=="undefined"&&(this._data[K]=this.parseMetrics(U,z)),this._data[K]},H}(),cA=function(){function H(U,z){this.context=U,this.options=z}return H}(),xA=1e4,wA=function(H){N(U,H);function U(z,K){var se=H.call(this,z,K)||this;return se._activeEffects=[],se.canvas=K.canvas?K.canvas:document.createElement("canvas"),se.ctx=se.canvas.getContext("2d"),K.canvas||(se.canvas.width=Math.floor(K.width*K.scale),se.canvas.height=Math.floor(K.height*K.scale),se.canvas.style.width=K.width+"px",se.canvas.style.height=K.height+"px"),se.fontMetrics=new CA(document),se.ctx.scale(se.options.scale,se.options.scale),se.ctx.translate(-K.x,-K.y),se.ctx.textBaseline="bottom",se._activeEffects=[],se.context.logger.debug("Canvas renderer initialized ("+K.width+"x"+K.height+") with scale "+K.scale),se}return U.prototype.applyEffects=function(z){for(var K=this;this._activeEffects.length;)this.popEffect();z.forEach(function(se){return K.applyEffect(se)})},U.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)),Sa(z)&&(this.path(z.path),this.ctx.clip()),this._activeEffects.push(z)},U.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},U.prototype.renderStack=function(z){return Q(this,void 0,void 0,function(){var K;return R(this,function(se){switch(se.label){case 0:return K=z.element.container.styles,K.isVisible()?[4,this.renderStackContent(z)]:[3,2];case 1:se.sent(),se.label=2;case 2:return[2]}})})},U.prototype.renderNode=function(z){return Q(this,void 0,void 0,function(){return R(this,function(K){switch(K.label){case 0:if(kn(z.container.flags,16))debugger;return z.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(z)]:[3,3];case 1:return K.sent(),[4,this.renderNodeContent(z)];case 2:K.sent(),K.label=3;case 3:return[2]}})})},U.prototype.renderTextWithLetterSpacing=function(z,K,se){var pe=this;if(K===0)this.ctx.fillText(z.text,z.bounds.left,z.bounds.top+se);else{var Te=Vs(z.text);Te.reduce(function(Ge,We){return pe.ctx.fillText(We,Ge,z.bounds.top+se),Ge+pe.ctx.measureText(We).width},z.bounds.left)}},U.prototype.createFontStyle=function(z){var K=z.fontVariant.filter(function(Te){return Te==="normal"||Te==="small-caps"}).join(""),se=OA(z.fontFamily).join(", "),pe=Oa(z.fontSize)?""+z.fontSize.number+z.fontSize.unit:z.fontSize.number+"px";return[[z.fontStyle,K,z.fontWeight,pe,se].join(" "),se,pe]},U.prototype.renderTextNode=function(z,K){return Q(this,void 0,void 0,function(){var se,pe,Te,Ge,We,lt,bt,_t,Mt=this;return R(this,function(lr){return se=this.createFontStyle(K),pe=se[0],Te=se[1],Ge=se[2],this.ctx.font=pe,this.ctx.direction=K.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",We=this.fontMetrics.getMetrics(Te,Ge),lt=We.baseline,bt=We.middle,_t=K.paintOrder,z.textBounds.forEach(function(zt){_t.forEach(function(rr){switch(rr){case 0:Mt.ctx.fillStyle=jn(K.color),Mt.renderTextWithLetterSpacing(zt,K.letterSpacing,lt);var Lr=K.textShadow;Lr.length&&zt.text.trim().length&&(Lr.slice(0).reverse().forEach(function(or){Mt.ctx.shadowColor=jn(or.color),Mt.ctx.shadowOffsetX=or.offsetX.number*Mt.options.scale,Mt.ctx.shadowOffsetY=or.offsetY.number*Mt.options.scale,Mt.ctx.shadowBlur=or.blur.number,Mt.renderTextWithLetterSpacing(zt,K.letterSpacing,lt)}),Mt.ctx.shadowColor="",Mt.ctx.shadowOffsetX=0,Mt.ctx.shadowOffsetY=0,Mt.ctx.shadowBlur=0),K.textDecorationLine.length&&(Mt.ctx.fillStyle=jn(K.textDecorationColor||K.color),K.textDecorationLine.forEach(function(or){switch(or){case 1:Mt.ctx.fillRect(zt.bounds.left,Math.round(zt.bounds.top+lt),zt.bounds.width,1);break;case 2:Mt.ctx.fillRect(zt.bounds.left,Math.round(zt.bounds.top),zt.bounds.width,1);break;case 3:Mt.ctx.fillRect(zt.bounds.left,Math.ceil(zt.bounds.top+bt),zt.bounds.width,1);break}}));break;case 1:K.webkitTextStrokeWidth&&zt.text.trim().length&&(Mt.ctx.strokeStyle=jn(K.webkitTextStrokeColor),Mt.ctx.lineWidth=K.webkitTextStrokeWidth,Mt.ctx.lineJoin=window.chrome?"miter":"round",Mt.ctx.strokeText(zt.text,zt.bounds.left,zt.bounds.top+lt)),Mt.ctx.strokeStyle="",Mt.ctx.lineWidth=0,Mt.ctx.lineJoin="miter";break}})}),[2]})})},U.prototype.renderReplacedElement=function(z,K,se){if(se&&z.intrinsicWidth>0&&z.intrinsicHeight>0){var pe=mu(z),Te=Ga(K);this.path(Te),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(se,0,0,z.intrinsicWidth,z.intrinsicHeight,pe.left,pe.top,pe.width,pe.height),this.ctx.restore()}},U.prototype.renderNodeContent=function(z){return Q(this,void 0,void 0,function(){var K,se,pe,Te,Ge,We,lt,lt,bt,_t,Mt,lr,zt,rr,Lr,or,Ar,rn,Wr,lt,pn,zt,or;return R(this,function(ur){switch(ur.label){case 0:this.applyEffects(z.getEffects(4)),K=z.container,se=z.curves,pe=K.styles,Te=0,Ge=K.textNodes,ur.label=1;case 1:return Te<Ge.length?(We=Ge[Te],[4,this.renderTextNode(We,pe)]):[3,4];case 2:ur.sent(),ur.label=3;case 3:return Te++,[3,1];case 4:if(!(K instanceof Xs))return[3,8];ur.label=5;case 5:return ur.trys.push([5,7,,8]),[4,this.context.cache.match(K.src)];case 6:return lt=ur.sent(),this.renderReplacedElement(K,se,lt),[3,8];case 7:return ur.sent(),this.context.logger.error("Error loading image "+K.src),[3,8];case 8:if(K instanceof Ys&&this.renderReplacedElement(K,se,K.canvas),!(K instanceof Zl))return[3,12];ur.label=9;case 9:return ur.trys.push([9,11,,12]),[4,this.context.cache.match(K.svg)];case 10:return lt=ur.sent(),this.renderReplacedElement(K,se,lt),[3,12];case 11:return ur.sent(),this.context.logger.error("Error loading svg "+K.svg.substring(0,255)),[3,12];case 12:return K instanceof nu&&K.tree?(bt=new U(this.context,{scale:this.options.scale,backgroundColor:K.backgroundColor,x:0,y:0,width:K.width,height:K.height}),[4,bt.render(K.tree)]):[3,14];case 13:_t=ur.sent(),K.width&&K.height&&this.ctx.drawImage(_t,0,0,K.width,K.height,K.bounds.left,K.bounds.top,K.bounds.width,K.bounds.height),ur.label=14;case 14:if(K instanceof as&&(Mt=Math.min(K.bounds.width,K.bounds.height),K.type===Ka?K.checked&&(this.ctx.save(),this.path([new Gt(K.bounds.left+Mt*.39363,K.bounds.top+Mt*.79),new Gt(K.bounds.left+Mt*.16,K.bounds.top+Mt*.5549),new Gt(K.bounds.left+Mt*.27347,K.bounds.top+Mt*.44071),new Gt(K.bounds.left+Mt*.39694,K.bounds.top+Mt*.5649),new Gt(K.bounds.left+Mt*.72983,K.bounds.top+Mt*.23),new Gt(K.bounds.left+Mt*.84,K.bounds.top+Mt*.34085),new Gt(K.bounds.left+Mt*.39363,K.bounds.top+Mt*.79)]),this.ctx.fillStyle=jn(eu),this.ctx.fill(),this.ctx.restore()):K.type===oa&&(K.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(K.bounds.left+Mt/2,K.bounds.top+Mt/2,Mt/4,0,Math.PI*2,!0),this.ctx.fillStyle=jn(eu),this.ctx.fill(),this.ctx.restore()))),BA(K)&&K.value.length){lr=this.createFontStyle(pe),zt=lr[0],rr=lr[1],Lr=this.fontMetrics.getMetrics(zt,rr).baseline,this.ctx.font=zt,this.ctx.fillStyle=jn(pe.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=TA(K.styles.textAlign),or=mu(K),Ar=0;switch(K.styles.textAlign){case 1:Ar+=or.width/2;break;case 2:Ar+=or.width;break}rn=or.add(Ar,0,0,-or.height/2+1),this.ctx.save(),this.path([new Gt(or.left,or.top),new Gt(or.left+or.width,or.top),new Gt(or.left+or.width,or.top+or.height),new Gt(or.left,or.top+or.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Mi(K.value,rn),pe.letterSpacing,Lr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!kn(K.styles.display,2048))return[3,20];if(!(K.styles.listStyleImage!==null))return[3,19];if(Wr=K.styles.listStyleImage,!(Wr.type===0))return[3,18];lt=void 0,pn=Wr.url,ur.label=15;case 15:return ur.trys.push([15,17,,18]),[4,this.context.cache.match(pn)];case 16:return lt=ur.sent(),this.ctx.drawImage(lt,K.bounds.left-(lt.width+10),K.bounds.top),[3,18];case 17:return ur.sent(),this.context.logger.error("Error loading list-style-image "+pn),[3,18];case 18:return[3,20];case 19:z.listValue&&K.styles.listStyleType!==-1&&(zt=this.createFontStyle(pe)[0],this.ctx.font=zt,this.ctx.fillStyle=jn(pe.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",or=new D(K.bounds.left,K.bounds.top+on(K.styles.paddingTop,K.bounds.width),K.bounds.width,Pn(pe.lineHeight,pe.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Mi(z.listValue,or),pe.letterSpacing,Pn(pe.lineHeight,pe.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),ur.label=20;case 20:return[2]}})})},U.prototype.renderStackContent=function(z){return Q(this,void 0,void 0,function(){var K,se,pe,Te,Ge,pe,We,lt,pe,bt,_t,pe,Mt,lr,pe,zt,rr,pe,Lr,or,pe;return R(this,function(Ar){switch(Ar.label){case 0:if(kn(z.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(z.element)];case 1:Ar.sent(),K=0,se=z.negativeZIndex,Ar.label=2;case 2:return K<se.length?(pe=se[K],[4,this.renderStack(pe)]):[3,5];case 3:Ar.sent(),Ar.label=4;case 4:return K++,[3,2];case 5:return[4,this.renderNodeContent(z.element)];case 6:Ar.sent(),Te=0,Ge=z.nonInlineLevel,Ar.label=7;case 7:return Te<Ge.length?(pe=Ge[Te],[4,this.renderNode(pe)]):[3,10];case 8:Ar.sent(),Ar.label=9;case 9:return Te++,[3,7];case 10:We=0,lt=z.nonPositionedFloats,Ar.label=11;case 11:return We<lt.length?(pe=lt[We],[4,this.renderStack(pe)]):[3,14];case 12:Ar.sent(),Ar.label=13;case 13:return We++,[3,11];case 14:bt=0,_t=z.nonPositionedInlineLevel,Ar.label=15;case 15:return bt<_t.length?(pe=_t[bt],[4,this.renderStack(pe)]):[3,18];case 16:Ar.sent(),Ar.label=17;case 17:return bt++,[3,15];case 18:Mt=0,lr=z.inlineLevel,Ar.label=19;case 19:return Mt<lr.length?(pe=lr[Mt],[4,this.renderNode(pe)]):[3,22];case 20:Ar.sent(),Ar.label=21;case 21:return Mt++,[3,19];case 22:zt=0,rr=z.zeroOrAutoZIndexOrTransformedOrOpacity,Ar.label=23;case 23:return zt<rr.length?(pe=rr[zt],[4,this.renderStack(pe)]):[3,26];case 24:Ar.sent(),Ar.label=25;case 25:return zt++,[3,23];case 26:Lr=0,or=z.positiveZIndex,Ar.label=27;case 27:return Lr<or.length?(pe=or[Lr],[4,this.renderStack(pe)]):[3,30];case 28:Ar.sent(),Ar.label=29;case 29:return Lr++,[3,27];case 30:return[2]}})})},U.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()},U.prototype.path=function(z){this.ctx.beginPath(),this.formatPath(z),this.ctx.closePath()},U.prototype.formatPath=function(z){var K=this;z.forEach(function(se,pe){var Te=Tn(se)?se.start:se;pe===0?K.ctx.moveTo(Te.x,Te.y):K.ctx.lineTo(Te.x,Te.y),Tn(se)&&K.ctx.bezierCurveTo(se.startControl.x,se.startControl.y,se.endControl.x,se.endControl.y,se.end.x,se.end.y)})},U.prototype.renderRepeat=function(z,K,se,pe){this.path(z),this.ctx.fillStyle=K,this.ctx.translate(se,pe),this.ctx.fill(),this.ctx.translate(-se,-pe)},U.prototype.resizeImage=function(z,K,se){var pe;if(z.width===K&&z.height===se)return z;var Te=(pe=this.canvas.ownerDocument)!==null&&pe!==void 0?pe:document,Ge=Te.createElement("canvas");Ge.width=Math.max(1,K),Ge.height=Math.max(1,se);var We=Ge.getContext("2d");return We.drawImage(z,0,0,z.width,z.height,0,0,K,se),Ge},U.prototype.renderBackgroundImage=function(z){return Q(this,void 0,void 0,function(){var K,se,pe,Te,Ge,We;return R(this,function(lt){switch(lt.label){case 0:K=z.styles.backgroundImage.length-1,se=function(bt){var _t,Mt,lr,zt,rr,Lr,or,Ar,rn,Wr,zt,rr,Lr,or,Ar,pn,ur,An,mn,zr,wi,bi,Di,ai,rn,la,zt,Va,Xa,or,Ar,Ya,rr,Lr,Lo,ua,Ja,Oo,Do,Ta,Io,La;return R(this,function(ds){switch(ds.label){case 0:if(!(bt.type===0))return[3,5];_t=void 0,Mt=bt.url,ds.label=1;case 1:return ds.trys.push([1,3,,4]),[4,pe.context.cache.match(Mt)];case 2:return _t=ds.sent(),[3,4];case 3:return ds.sent(),pe.context.logger.error("Error loading background-image "+Mt),[3,4];case 4:return _t&&(lr=nA(z,K,[_t.width,_t.height,_t.width/_t.height]),zt=lr[0],rr=lr[1],Lr=lr[2],or=lr[3],Ar=lr[4],rn=pe.ctx.createPattern(pe.resizeImage(_t,or,Ar),"repeat"),pe.renderRepeat(zt,rn,rr,Lr)),[3,6];case 5:pl(bt)?(Wr=nA(z,K,[null,null,null]),zt=Wr[0],rr=Wr[1],Lr=Wr[2],or=Wr[3],Ar=Wr[4],pn=yu(bt.angle,or,Ar),ur=pn[0],An=pn[1],mn=pn[2],zr=pn[3],wi=pn[4],bi=document.createElement("canvas"),bi.width=or,bi.height=Ar,Di=bi.getContext("2d"),ai=Di.createLinearGradient(An,zr,mn,wi),cl(bt.stops,ur).forEach(function(rl){return ai.addColorStop(rl.stop,jn(rl.color))}),Di.fillStyle=ai,Di.fillRect(0,0,or,Ar),or>0&&Ar>0&&(rn=pe.ctx.createPattern(bi,"repeat"),pe.renderRepeat(zt,rn,rr,Lr))):ml(bt)&&(la=nA(z,K,[null,null,null]),zt=la[0],Va=la[1],Xa=la[2],or=la[3],Ar=la[4],Ya=bt.position.length===0?[ps]:bt.position,rr=on(Ya[0],or),Lr=on(Ya[Ya.length-1],Ar),Lo=Ia(bt,rr,Lr,or,Ar),ua=Lo[0],Ja=Lo[1],ua>0&&Ja>0&&(Oo=pe.ctx.createRadialGradient(Va+rr,Xa+Lr,0,Va+rr,Xa+Lr,ua),cl(bt.stops,ua*2).forEach(function(rl){return Oo.addColorStop(rl.stop,jn(rl.color))}),pe.path(zt),pe.ctx.fillStyle=Oo,ua!==Ja?(Do=z.bounds.left+.5*z.bounds.width,Ta=z.bounds.top+.5*z.bounds.height,Io=Ja/ua,La=1/Io,pe.ctx.save(),pe.ctx.translate(Do,Ta),pe.ctx.transform(1,0,0,Io,0,0),pe.ctx.translate(-Do,-Ta),pe.ctx.fillRect(Va,La*(Xa-Ta)+Ta,or,Ar*La),pe.ctx.restore()):pe.ctx.fill())),ds.label=6;case 6:return K--,[2]}})},pe=this,Te=0,Ge=z.styles.backgroundImage.slice(0).reverse(),lt.label=1;case 1:return Te<Ge.length?(We=Ge[Te],[5,se(We)]):[3,4];case 2:lt.sent(),lt.label=3;case 3:return Te++,[3,1];case 4:return[2]}})})},U.prototype.renderSolidBorder=function(z,K,se){return Q(this,void 0,void 0,function(){return R(this,function(pe){return this.path(lA(se,K)),this.ctx.fillStyle=jn(z),this.ctx.fill(),[2]})})},U.prototype.renderDoubleBorder=function(z,K,se,pe){return Q(this,void 0,void 0,function(){var Te,Ge;return R(this,function(We){switch(We.label){case 0:return K<3?[4,this.renderSolidBorder(z,se,pe)]:[3,2];case 1:return We.sent(),[2];case 2:return Te=fA(pe,se),this.path(Te),this.ctx.fillStyle=jn(z),this.ctx.fill(),Ge=pA(pe,se),this.path(Ge),this.ctx.fill(),[2]}})})},U.prototype.renderNodeBackgroundAndBorders=function(z){return Q(this,void 0,void 0,function(){var K,se,pe,Te,Ge,We,lt,bt,_t=this;return R(this,function(Mt){switch(Mt.label){case 0:return this.applyEffects(z.getEffects(2)),K=z.container.styles,se=!ki(K.backgroundColor)||K.backgroundImage.length,pe=[{style:K.borderTopStyle,color:K.borderTopColor,width:K.borderTopWidth},{style:K.borderRightStyle,color:K.borderRightColor,width:K.borderRightWidth},{style:K.borderBottomStyle,color:K.borderBottomColor,width:K.borderBottomWidth},{style:K.borderLeftStyle,color:K.borderLeftColor,width:K.borderLeftWidth}],Te=SA(cs(K.backgroundClip,0),z.curves),se||K.boxShadow.length?(this.ctx.save(),this.path(Te),this.ctx.clip(),ki(K.backgroundColor)||(this.ctx.fillStyle=jn(K.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(z.container)]):[3,2];case 1:Mt.sent(),this.ctx.restore(),K.boxShadow.slice(0).reverse().forEach(function(lr){_t.ctx.save();var zt=yi(z.curves),rr=lr.inset?0:xA,Lr=dA(zt,-rr+(lr.inset?1:-1)*lr.spread.number,(lr.inset?1:-1)*lr.spread.number,lr.spread.number*(lr.inset?-2:2),lr.spread.number*(lr.inset?-2:2));lr.inset?(_t.path(zt),_t.ctx.clip(),_t.mask(Lr)):(_t.mask(zt),_t.ctx.clip(),_t.path(Lr)),_t.ctx.shadowOffsetX=lr.offsetX.number+rr,_t.ctx.shadowOffsetY=lr.offsetY.number,_t.ctx.shadowColor=jn(lr.color),_t.ctx.shadowBlur=lr.blur.number,_t.ctx.fillStyle=lr.inset?jn(lr.color):"rgba(0,0,0,1)",_t.ctx.fill(),_t.ctx.restore()}),Mt.label=2;case 2:Ge=0,We=0,lt=pe,Mt.label=3;case 3:return We<lt.length?(bt=lt[We],bt.style!==0&&!ki(bt.color)&&bt.width>0?bt.style===2?[4,this.renderDashedDottedBorder(bt.color,bt.width,Ge,z.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return Mt.sent(),[3,11];case 5:return bt.style===3?[4,this.renderDashedDottedBorder(bt.color,bt.width,Ge,z.curves,3)]:[3,7];case 6:return Mt.sent(),[3,11];case 7:return bt.style===4?[4,this.renderDoubleBorder(bt.color,bt.width,Ge,z.curves)]:[3,9];case 8:return Mt.sent(),[3,11];case 9:return[4,this.renderSolidBorder(bt.color,Ge,z.curves)];case 10:Mt.sent(),Mt.label=11;case 11:Ge++,Mt.label=12;case 12:return We++,[3,3];case 13:return[2]}})})},U.prototype.renderDashedDottedBorder=function(z,K,se,pe,Te){return Q(this,void 0,void 0,function(){var Ge,We,lt,bt,_t,Mt,lr,zt,rr,Lr,or,Ar,rn,Wr,pn,ur,pn,ur;return R(this,function(An){return this.ctx.save(),Ge=mA(pe,se),We=lA(pe,se),Te===2&&(this.path(We),this.ctx.clip()),Tn(We[0])?(lt=We[0].start.x,bt=We[0].start.y):(lt=We[0].x,bt=We[0].y),Tn(We[1])?(_t=We[1].end.x,Mt=We[1].end.y):(_t=We[1].x,Mt=We[1].y),se===0||se===2?lr=Math.abs(lt-_t):lr=Math.abs(bt-Mt),this.ctx.beginPath(),Te===3?this.formatPath(Ge):this.formatPath(We.slice(0,2)),zt=K<3?K*3:K*2,rr=K<3?K*2:K,Te===3&&(zt=K,rr=K),Lr=!0,lr<=zt*2?Lr=!1:lr<=zt*2+rr?(or=lr/(2*zt+rr),zt*=or,rr*=or):(Ar=Math.floor((lr+rr)/(zt+rr)),rn=(lr-Ar*zt)/(Ar-1),Wr=(lr-(Ar+1)*zt)/Ar,rr=Wr<=0||Math.abs(rr-rn)<Math.abs(rr-Wr)?rn:Wr),Lr&&(Te===3?this.ctx.setLineDash([0,zt+rr]):this.ctx.setLineDash([zt,rr])),Te===3?(this.ctx.lineCap="round",this.ctx.lineWidth=K):this.ctx.lineWidth=K*2+1.1,this.ctx.strokeStyle=jn(z),this.ctx.stroke(),this.ctx.setLineDash([]),Te===2&&(Tn(We[0])&&(pn=We[3],ur=We[0],this.ctx.beginPath(),this.formatPath([new Gt(pn.end.x,pn.end.y),new Gt(ur.start.x,ur.start.y)]),this.ctx.stroke()),Tn(We[1])&&(pn=We[1],ur=We[2],this.ctx.beginPath(),this.formatPath([new Gt(pn.end.x,pn.end.y),new Gt(ur.start.x,ur.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},U.prototype.render=function(z){return Q(this,void 0,void 0,function(){var K;return R(this,function(se){switch(se.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)),K=hA(z),[4,this.renderStack(K)];case 1:return se.sent(),this.applyEffects([]),[2,this.canvas]}})})},U}(cA),BA=function(H){return H instanceof ru||H instanceof tu?!0:H instanceof as&&H.type!==oa&&H.type!==Ka},SA=function(H,U){switch(H){case 0:return yi(U);case 2:return Wn(U);case 1:default:return Ga(U)}},TA=function(H){switch(H){case 1:return"center";case 2:return"right";case 0:default:return"left"}},LA=["-apple-system","system-ui"],OA=function(H){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?H.filter(function(U){return LA.indexOf(U)===-1}):H},DA=function(H){N(U,H);function U(z,K){var se=H.call(this,z,K)||this;return se.canvas=K.canvas?K.canvas:document.createElement("canvas"),se.ctx=se.canvas.getContext("2d"),se.options=K,se.canvas.width=Math.floor(K.width*K.scale),se.canvas.height=Math.floor(K.height*K.scale),se.canvas.style.width=K.width+"px",se.canvas.style.height=K.height+"px",se.ctx.scale(se.options.scale,se.options.scale),se.ctx.translate(-K.x,-K.y),se.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+K.width+"x"+K.height+" at "+K.x+","+K.y+") with scale "+K.scale),se}return U.prototype.render=function(z){return Q(this,void 0,void 0,function(){var K,se;return R(this,function(pe){switch(pe.label){case 0:return K=es(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,z),[4,IA(K)];case 1:return se=pe.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(se,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},U}(cA),IA=function(H){return new Promise(function(U,z){var K=new Image;K.onload=function(){U(K)},K.onerror=z,K.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(H))})},RA=function(){function H(U){var z=U.id,K=U.enabled;this.id=z,this.enabled=K,this.start=Date.now()}return H.prototype.debug=function(){for(var U=[],z=0;z<arguments.length;z++)U[z]=arguments[z];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,B([this.id,this.getTime()+"ms"],U)):this.info.apply(this,U))},H.prototype.getTime=function(){return Date.now()-this.start},H.prototype.info=function(){for(var U=[],z=0;z<arguments.length;z++)U[z]=arguments[z];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,B([this.id,this.getTime()+"ms"],U)))},H.prototype.warn=function(){for(var U=[],z=0;z<arguments.length;z++)U[z]=arguments[z];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,B([this.id,this.getTime()+"ms"],U)):this.info.apply(this,U))},H.prototype.error=function(){for(var U=[],z=0;z<arguments.length;z++)U[z]=arguments[z];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,B([this.id,this.getTime()+"ms"],U)):this.info.apply(this,U))},H.instances={},H}(),_A=function(){function H(U,z){var K;this.windowBounds=z,this.instanceName="#"+H.instanceCount++,this.logger=new RA({id:this.instanceName,enabled:U.logging}),this.cache=(K=U.cache)!==null&&K!==void 0?K:new Pr(this,U)}return H.instanceCount=1,H}(),MA=function(H,U){return U===void 0&&(U={}),FA(H,U)};typeof window!="undefined"&&mr.setContext(window);var FA=function(H,U){return Q(void 0,void 0,void 0,function(){var z,K,se,pe,Te,Ge,We,lt,bt,_t,Mt,lr,zt,rr,Lr,or,Ar,rn,Wr,pn,ur,An,ur,mn,zr,wi,bi,Di,ai,la,Va,Xa,Ya,Lo,ua,Ja,Oo,Do,Ta,Io;return R(this,function(La){switch(La.label){case 0:if(!H||typeof H!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(z=H.ownerDocument,!z)throw new Error("Element is not attached to a Document");if(K=z.defaultView,!K)throw new Error("Document is not attached to a Window");return se={allowTaint:(mn=U.allowTaint)!==null&&mn!==void 0?mn:!1,imageTimeout:(zr=U.imageTimeout)!==null&&zr!==void 0?zr:15e3,proxy:U.proxy,useCORS:(wi=U.useCORS)!==null&&wi!==void 0?wi:!1},pe=O({logging:(bi=U.logging)!==null&&bi!==void 0?bi:!0,cache:U.cache},se),Te={windowWidth:(Di=U.windowWidth)!==null&&Di!==void 0?Di:K.innerWidth,windowHeight:(ai=U.windowHeight)!==null&&ai!==void 0?ai:K.innerHeight,scrollX:(la=U.scrollX)!==null&&la!==void 0?la:K.pageXOffset,scrollY:(Va=U.scrollY)!==null&&Va!==void 0?Va:K.pageYOffset},Ge=new D(Te.scrollX,Te.scrollY,Te.windowWidth,Te.windowHeight),We=new _A(pe,Ge),lt=(Xa=U.foreignObjectRendering)!==null&&Xa!==void 0?Xa:!1,bt={allowTaint:(Ya=U.allowTaint)!==null&&Ya!==void 0?Ya:!1,onclone:U.onclone,ignoreElements:U.ignoreElements,inlineImages:lt,copyStyles:lt},We.logger.debug("Starting document clone with size "+Ge.width+"x"+Ge.height+" scrolled to "+-Ge.left+","+-Ge.top),_t=new I(We,H,bt),Mt=_t.clonedReferenceElement,Mt?[4,_t.toIFrame(z,Ge)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return lr=La.sent(),zt=En(Mt)||tA(Mt)?b(Mt.ownerDocument):f(We,Mt),rr=zt.width,Lr=zt.height,or=zt.left,Ar=zt.top,rn=UA(We,Mt,U.backgroundColor),Wr={canvas:U.canvas,backgroundColor:rn,scale:(ua=(Lo=U.scale)!==null&&Lo!==void 0?Lo:K.devicePixelRatio)!==null&&ua!==void 0?ua:1,x:((Ja=U.x)!==null&&Ja!==void 0?Ja:0)+or,y:((Oo=U.y)!==null&&Oo!==void 0?Oo:0)+Ar,width:(Do=U.width)!==null&&Do!==void 0?Do:Math.ceil(rr),height:(Ta=U.height)!==null&&Ta!==void 0?Ta:Math.ceil(Lr)},lt?(We.logger.debug("Document cloned, using foreign object rendering"),ur=new DA(We,Wr),[4,ur.render(Mt)]):[3,3];case 2:return pn=La.sent(),[3,5];case 3:return We.logger.debug("Document cloned, element located at "+or+","+Ar+" with size "+rr+"x"+Lr+" using computed rendering"),We.logger.debug("Starting DOM parsing"),An=au(We,Mt),rn===An.styles.backgroundColor&&(An.styles.backgroundColor=Li.TRANSPARENT),We.logger.debug("Starting renderer for element at "+Wr.x+","+Wr.y+" with size "+Wr.width+"x"+Wr.height),ur=new wA(We,Wr),[4,ur.render(An)];case 4:pn=La.sent(),La.label=5;case 5:return((Io=U.removeContainer)!==null&&Io!==void 0?Io:!0)&&(I.destroy(lr)||We.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),We.logger.debug("Finished rendering"),[2,pn]}})})},UA=function(H,U,z){var K=U.ownerDocument,se=K.documentElement?da(H,getComputedStyle(K.documentElement).backgroundColor):Li.TRANSPARENT,pe=K.body?da(H,getComputedStyle(K.body).backgroundColor):Li.TRANSPARENT,Te=typeof z=="string"?da(H,z):z===null?Li.TRANSPARENT:4294967295;return U===K.documentElement?ki(se)?ki(pe)?Te:pe:se:Te};return MA})},wRmb:function(qe,ue,k){"use strict";k.d(ue,"a",function(){return g});var J=k("rePB"),N=k("KQm4"),O=k("VTBJ"),Q=k("Ff2n"),R=k("q1tI"),B=k.n(R),D=k("Kwbf"),f=k("Zm9Q"),b=k("hW8S");function g(d){return Object(f.a)(d).filter(function(E){return R.isValidElement(E)}).map(function(E){var o=E.key,n=E.props,s=n.children,u=Object(Q.a)(n,["children"]),p=Object(O.a)({key:o},u);return s&&(p.children=g(s)),p})}function i(d){return d.reduce(function(E,o){var n=o.fixed,s=n===!0?"left":n,u=o.children;return u&&u.length>0?[].concat(Object(N.a)(E),Object(N.a)(i(u).map(function(p){return Object(O.a)({fixed:s},p)}))):[].concat(Object(N.a)(E),[Object(O.a)(Object(O.a)({},o),{},{fixed:s})])},[])}function l(d){for(var E=!0,o=0;o<d.length;o+=1){var n=d[o];if(E&&n.fixed!=="left")E=!1;else if(!E&&n.fixed==="left"){Object(D.a)(!1,"Index ".concat(o-1," of `columns` missing `fixed='left'` prop."));break}}for(var s=!0,u=d.length-1;u>=0;u-=1){var p=d[u];if(s&&p.fixed!=="right")s=!1;else if(!s&&p.fixed==="right"){Object(D.a)(!1,"Index ".concat(u+1," of `columns` missing `fixed='right'` prop."));break}}}function v(d){return d.map(function(E){var o=E.fixed,n=Object(Q.a)(E,["fixed"]),s=o;return o==="left"?s="right":o==="right"&&(s="left"),Object(O.a)({fixed:s},n)})}function h(d,E){var o=d.prefixCls,n=d.columns,s=d.children,u=d.expandable,p=d.expandedKeys,S=d.getRowKey,x=d.onTriggerExpand,M=d.expandIcon,C=d.rowExpandable,c=d.expandIconColumnIndex,r=d.direction,a=d.expandRowByClick,A=R.useMemo(function(){return n||g(s)},[n,s]),L=R.useMemo(function(){if(u){var _,j=c||0,W=A[j],Z=(_={},Object(J.a)(_,b.a,{className:"".concat(o,"-expand-icon-col")}),Object(J.a)(_,"title",""),Object(J.a)(_,"fixed",W?W.fixed:null),Object(J.a)(_,"className","".concat(o,"-row-expand-icon-cell")),Object(J.a)(_,"render",function(te,Y,le){var Ae=S(Y,le),Be=p.has(Ae),Ce=C?C(Y):!0,Se=M({prefixCls:o,expanded:Be,expandable:Ce,record:Y,onExpand:x});return a?R.createElement("span",{onClick:function(Ve){return Ve.stopPropagation()}},Se):Se}),_),X=A.slice();return j>=0&&X.splice(j,0,Z),X}return A},[u,A,S,p,M,r]),T=R.useMemo(function(){var _=L;return E&&(_=E(_)),_.length||(_=[{render:function(){return null}}]),_},[E,L,r]),w=R.useMemo(function(){return r==="rtl"?v(i(T)):i(T)},[T,r]);return[T,w]}ue.b=h},x6Kt:function(qe,ue,k){var J=k("y+Vt"),N=k("VpOo"),O=k("nPnh"),Q=O.subPixelOptimizeRect,R={},B=J.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(D,f){var b,g,i,l;this.subPixelOptimize?(Q(R,f,this.style),b=R.x,g=R.y,i=R.width,l=R.height,R.r=f.r,f=R):(b=f.x,g=f.y,i=f.width,l=f.height),f.r?N.buildPath(D,f):D.rect(b,g,i,l),D.closePath();return}});qe.exports=B},"y+Vt":function(qe,ue,k){var J=k("Gev7"),N=k("bYtY"),O=k("IMiH"),Q=k("2DNl"),R=k("3C/r"),B=R.prototype.getCanvasPattern,D=Math.abs,f=new O(!0);function b(i){J.call(this,i),this.path=null}b.prototype={constructor:b,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(i,l){var v=this.style,h=this.path||f,d=v.hasStroke(),E=v.hasFill(),o=v.fill,n=v.stroke,s=E&&!!o.colorStops,u=d&&!!n.colorStops,p=E&&!!o.image,S=d&&!!n.image;if(v.bind(i,this,l),this.setTransform(i),this.__dirty){var x;s&&(x=x||this.getBoundingRect(),this._fillGradient=v.getGradient(i,o,x)),u&&(x=x||this.getBoundingRect(),this._strokeGradient=v.getGradient(i,n,x))}s?i.fillStyle=this._fillGradient:p&&(i.fillStyle=B.call(o,i)),u?i.strokeStyle=this._strokeGradient:S&&(i.strokeStyle=B.call(n,i));var M=v.lineDash,C=v.lineDashOffset,c=!!i.setLineDash,r=this.getGlobalScale();if(h.setScale(r[0],r[1],this.segmentIgnoreThreshold),this.__dirtyPath||M&&!c&&d?(h.beginPath(i),M&&!c&&(h.setLineDash(M),h.setLineDashOffset(C)),this.buildPath(h,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(i.beginPath(),this.path.rebuildPath(i)),E)if(v.fillOpacity!=null){var a=i.globalAlpha;i.globalAlpha=v.fillOpacity*v.opacity,h.fill(i),i.globalAlpha=a}else h.fill(i);if(M&&c&&(i.setLineDash(M),i.lineDashOffset=C),d)if(v.strokeOpacity!=null){var a=i.globalAlpha;i.globalAlpha=v.strokeOpacity*v.opacity,h.stroke(i),i.globalAlpha=a}else h.stroke(i);M&&c&&i.setLineDash([]),v.text!=null&&(this.restoreTransform(i),this.drawRectText(i,this.getBoundingRect()))},buildPath:function(i,l,v){},createPathProxy:function(){this.path=new O},getBoundingRect:function(){var i=this._rect,l=this.style,v=!i;if(v){var h=this.path;h||(h=this.path=new O),this.__dirtyPath&&(h.beginPath(),this.buildPath(h,this.shape,!1)),i=h.getBoundingRect()}if(this._rect=i,l.hasStroke()){var d=this._rectWithStroke||(this._rectWithStroke=i.clone());if(this.__dirty||v){d.copy(i);var E=l.lineWidth,o=l.strokeNoScale?this.getLineScale():1;l.hasFill()||(E=Math.max(E,this.strokeContainThreshold||4)),o>1e-10&&(d.width+=E/o,d.height+=E/o,d.x-=E/o/2,d.y-=E/o/2)}return d}return i},contain:function(i,l){var v=this.transformCoordToLocal(i,l),h=this.getBoundingRect(),d=this.style;if(i=v[0],l=v[1],h.contain(i,l)){var E=this.path.data;if(d.hasStroke()){var o=d.lineWidth,n=d.strokeNoScale?this.getLineScale():1;if(n>1e-10&&(d.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Q.containStroke(E,o/n,i,l)))return!0}if(d.hasFill())return Q.contain(E,i,l)}return!1},dirty:function(i){i==null&&(i=!0),i&&(this.__dirtyPath=i,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(i){return this.animate("shape",i)},attrKV:function(i,l){i==="shape"?(this.setShape(l),this.__dirtyPath=!0,this._rect=null):J.prototype.attrKV.call(this,i,l)},setShape:function(i,l){var v=this.shape;if(v){if(N.isObject(i))for(var h in i)i.hasOwnProperty(h)&&(v[h]=i[h]);else v[i]=l;this.dirty(!0)}return this},getLineScale:function(){var i=this.transform;return i&&D(i[0]-1)>1e-10&&D(i[3]-1)>1e-10?Math.sqrt(D(i[0]*i[3]-i[2]*i[1])):1}},b.extend=function(i){var l=function(h){b.call(this,h),i.style&&this.style.extendFrom(i.style,!1);var d=i.shape;if(d){this.shape=this.shape||{};var E=this.shape;for(var o in d)!E.hasOwnProperty(o)&&d.hasOwnProperty(o)&&(E[o]=d[o])}i.init&&i.init.call(this,h)};N.inherits(l,b);for(var v in i)v!=="style"&&v!=="shape"&&(l.prototype[v]=i[v]);return l},N.inherits(b,J);var g=b;qe.exports=g},"y0+3":function(qe,ue,k){"use strict";k.d(ue,"a",function(){return i}),k.d(ue,"b",function(){return v});var J=/margin|padding|width|height|max|min|offset/,N={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function Q(h){return h.nodeType===1?h.ownerDocument.defaultView.getComputedStyle(h,null):{}}function R(h,d,E){if(d=d.toLowerCase(),E==="auto"){if(d==="height")return h.offsetHeight;if(d==="width")return h.offsetWidth}return d in N||(N[d]=J.test(d)),N[d]?parseFloat(E)||0:E}function B(h,d){var E=arguments.length,o=Q(h);return d=O[d]?"cssFloat"in h.style?"cssFloat":"styleFloat":d,E===1?o:R(h,d,o[d]||h.style[d])}function D(h,d,E){var o=arguments.length;if(d=O[d]?"cssFloat"in h.style?"cssFloat":"styleFloat":d,o===3)return typeof E=="number"&&J.test(d)&&(E="".concat(E,"px")),h.style[d]=E,E;for(var n in d)d.hasOwnProperty(n)&&D(h,n,d[n]);return Q(h)}function f(h){return h===document.body?document.documentElement.clientWidth:h.offsetWidth}function b(h){return h===document.body?window.innerHeight||document.documentElement.clientHeight:h.offsetHeight}function g(){var h=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),d=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:h,height:d}}function i(){var h=document.documentElement.clientWidth,d=window.innerHeight||document.documentElement.clientHeight;return{width:h,height:d}}function l(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function v(h){var d=h.getBoundingClientRect(),E=document.documentElement;return{left:d.left+(window.pageXOffset||E.scrollLeft)-(E.clientLeft||document.body.clientLeft||0),top:d.top+(window.pageYOffset||E.scrollTop)-(E.clientTop||document.body.clientTop||0)}}},y23F:function(qe,ue){function k(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}k.prototype={constructor:k,_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(J(Q,O),"dragstart",O.event))},_drag:function(O){var Q=this._draggingTarget;if(Q){var R=O.offsetX,B=O.offsetY,D=R-this._x,f=B-this._y;this._x=R,this._y=B,Q.drift(D,f,O),this.dispatchToElement(J(Q,O),"drag",O.event);var b=this.findHover(R,B,Q).target,g=this._dropTarget;this._dropTarget=b,Q!==b&&(g&&b!==g&&this.dispatchToElement(J(g,O),"dragleave",O.event),b&&b!==g&&this.dispatchToElement(J(b,O),"dragenter",O.event))}},_dragEnd:function(O){var Q=this._draggingTarget;Q&&(Q.dragging=!1),this.dispatchToElement(J(Q,O),"dragend",O.event),this._dropTarget&&this.dispatchToElement(J(this._dropTarget,O),"drop",O.event),this._draggingTarget=null,this._dropTarget=null}};function J(O,Q){return{target:O,topTarget:Q&&Q.topTarget}}var N=k;qe.exports=N},yxFR:function(qe,ue,k){var J=k("y+Vt"),N=k("nPnh"),O=N.subPixelOptimizeLine,Q={},R=J.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(B,D){var f,b,g,i;this.subPixelOptimize?(O(Q,D,this.style),f=Q.x1,b=Q.y1,g=Q.x2,i=Q.y2):(f=D.x1,b=D.y1,g=D.x2,i=D.y2);var l=D.percent;if(l===0)return;B.moveTo(f,b),l<1&&(g=f*(1-l)+g*l,i=b*(1-l)+i*l),B.lineTo(g,i)},pointAt:function(B){var D=this.shape;return[D.x1*(1-B)+D.x2*B,D.y1*(1-B)+D.y2*B]}});qe.exports=R},z9Ch:function(qe,ue,k){qe.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(qe,ue,k){var J=k("YH21"),N=J.addEventListener,O=J.removeEventListener,Q=J.normalizeEvent,R=J.getNativeEvent,B=k("bYtY"),D=k("H6uX"),f=k("ItGF"),b=300,g=f.domSupported,i=function(){var w=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_=["touchstart","touchend","touchmove"],j={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},W=B.map(w,function(Z){var X=Z.replace("mouse","pointer");return j.hasOwnProperty(X)?X:Z});return{mouse:w,touch:_,pointer:W}}(),l={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function v(w){return w==="mousewheel"&&f.browser.firefox?"DOMMouseScroll":w}function h(w){var _=w.pointerType;return _==="pen"||_==="touch"}function d(w){w.touching=!0,w.touchTimer!=null&&(clearTimeout(w.touchTimer),w.touchTimer=null),w.touchTimer=setTimeout(function(){w.touching=!1,w.touchTimer=null},700)}function E(w){w&&(w.zrByTouch=!0)}function o(w,_){return Q(w.dom,new s(w,_),!0)}function n(w,_){for(var j=_,W=!1;j&&j.nodeType!==9&&!(W=j.domBelongToZr||j!==_&&j===w.painterRoot);)j=j.parentNode;return W}function s(w,_){this.type=_.type,this.target=this.currentTarget=w.dom,this.pointerType=_.pointerType,this.clientX=_.clientX,this.clientY=_.clientY}var u=s.prototype;u.stopPropagation=u.stopImmediatePropagation=u.preventDefault=B.noop;var p={mousedown:function(w){w=Q(this.dom,w),this._mayPointerCapture=[w.zrX,w.zrY],this.trigger("mousedown",w)},mousemove:function(w){w=Q(this.dom,w);var _=this._mayPointerCapture;_&&(w.zrX!==_[0]||w.zrY!==_[1])&&r(this,!0),this.trigger("mousemove",w)},mouseup:function(w){w=Q(this.dom,w),r(this,!1),this.trigger("mouseup",w)},mouseout:function(w){w=Q(this.dom,w),this._pointerCapturing&&(w.zrEventControl="no_globalout");var _=w.toElement||w.relatedTarget;w.zrIsToLocalDOM=n(this,_),this.trigger("mouseout",w)},touchstart:function(w){w=Q(this.dom,w),E(w),this._lastTouchMoment=new Date,this.handler.processGesture(w,"start"),p.mousemove.call(this,w),p.mousedown.call(this,w)},touchmove:function(w){w=Q(this.dom,w),E(w),this.handler.processGesture(w,"change"),p.mousemove.call(this,w)},touchend:function(w){w=Q(this.dom,w),E(w),this.handler.processGesture(w,"end"),p.mouseup.call(this,w),+new Date-this._lastTouchMoment<b&&p.click.call(this,w)},pointerdown:function(w){p.mousedown.call(this,w)},pointermove:function(w){h(w)||p.mousemove.call(this,w)},pointerup:function(w){p.mouseup.call(this,w)},pointerout:function(w){h(w)||p.mouseout.call(this,w)}};B.each(["click","mousewheel","dblclick","contextmenu"],function(w){p[w]=function(_){_=Q(this.dom,_),this.trigger(w,_)}});var S={pointermove:function(w){h(w)||S.mousemove.call(this,w)},pointerup:function(w){S.mouseup.call(this,w)},mousemove:function(w){this.trigger("mousemove",w)},mouseup:function(w){var _=this._pointerCapturing;r(this,!1),this.trigger("mouseup",w),_&&(w.zrEventControl="only_globalout",this.trigger("mouseout",w))}};function x(w,_){var j=_.domHandlers;f.pointerEventsSupported?B.each(i.pointer,function(W){C(_,W,function(Z){j[W].call(w,Z)})}):(f.touchEventsSupported&&B.each(i.touch,function(W){C(_,W,function(Z){j[W].call(w,Z),d(_)})}),B.each(i.mouse,function(W){C(_,W,function(Z){Z=R(Z),_.touching||j[W].call(w,Z)})}))}function M(w,_){f.pointerEventsSupported?B.each(l.pointer,j):f.touchEventsSupported||B.each(l.mouse,j);function j(W){function Z(X){X=R(X),n(w,X.target)||(X=o(w,X),_.domHandlers[W].call(w,X))}C(_,W,Z,{capture:!0})}}function C(w,_,j,W){w.mounted[_]=j,w.listenerOpts[_]=W,N(w.domTarget,v(_),j,W)}function c(w){var _=w.mounted;for(var j in _)_.hasOwnProperty(j)&&O(w.domTarget,v(j),_[j],w.listenerOpts[j]);w.mounted={}}function r(w,_){if(w._mayPointerCapture=null,g&&w._pointerCapturing^_){w._pointerCapturing=_;var j=w._globalHandlerScope;_?M(w,j):c(j)}}function a(w,_){this.domTarget=w,this.domHandlers=_,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function A(w,_){D.call(this),this.dom=w,this.painterRoot=_,this._localHandlerScope=new a(w,p),g&&(this._globalHandlerScope=new a(document,S)),this._pointerCapturing=!1,this._mayPointerCapture=null,x(this,this._localHandlerScope)}var L=A.prototype;L.dispose=function(){c(this._localHandlerScope),g&&c(this._globalHandlerScope)},L.setCursor=function(w){this.dom.style&&(this.dom.style.cursor=w||"default")},B.mixin(A,D);var T=A;qe.exports=T}}]);
|