archgine 1.0.36 → 1.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/lib/applications/app-cvs.d.ts +16 -0
  2. package/lib/applications/app-offscreen.d.ts +27 -8
  3. package/lib/applications/application.d.ts +27 -10
  4. package/lib/controls/interactive-controls.d.ts +2 -2
  5. package/lib/controls/orbit-controller.d.ts +4 -3
  6. package/lib/controls/orbit-controls.d.ts +8 -8
  7. package/lib/core/camera2.d.ts +4 -16
  8. package/lib/core/monitor.d.ts +13 -13
  9. package/lib/core/object2.d.ts +5 -5
  10. package/lib/core/ope-view.d.ts +24 -0
  11. package/lib/core/view.d.ts +16 -9
  12. package/lib/environment.worker.js +4 -2
  13. package/lib/extras/adapter.d.ts +62 -0
  14. package/lib/extras/chef.d.ts +3 -9
  15. package/lib/extras/interfaces.d.ts +2 -0
  16. package/lib/extras/svg-app.d.ts +2 -17
  17. package/lib/extras/svg-chef.d.ts +4 -5
  18. package/lib/geometries/circle-geo2.d.ts +14 -0
  19. package/lib/geometries/geo2.d.ts +22 -8
  20. package/lib/geometries/polygon-geo2.d.ts +5 -0
  21. package/lib/geometries/polyline-geo2.d.ts +21 -0
  22. package/lib/helpers/axes-helper.d.ts +2 -3
  23. package/lib/helpers/axes-helper2.d.ts +19 -0
  24. package/lib/helpers/canvas-helper.d.ts +5 -5
  25. package/lib/helpers/geo-helper.d.ts +12 -0
  26. package/lib/helpers/mat-helper.d.ts +10 -0
  27. package/lib/helpers/merge-helper.d.ts +7 -0
  28. package/lib/index.d.ts +3 -1
  29. package/lib/index.mjs +7861 -6764
  30. package/lib/index.umd.js +31 -30
  31. package/lib/interfaces.d.ts +64 -120
  32. package/lib/materials/mat2.d.ts +2 -1
  33. package/lib/materials/text-mat2.d.ts +53 -0
  34. package/lib/math/box2.d.ts +1 -0
  35. package/lib/objects/shape2.d.ts +20 -7
  36. package/lib/renderer.worker.js +14066 -0
  37. package/lib/renderers/binding-states.d.ts +4 -4
  38. package/lib/renderers/buffer-renderer.d.ts +9 -3
  39. package/lib/renderers/cvs-renderer.d.ts +4 -2
  40. package/lib/renderers/render-lists.d.ts +4 -6
  41. package/lib/renderers/render-target.d.ts +2 -2
  42. package/lib/renderers/renderer.d.ts +1 -1
  43. package/lib/renders/render-target.d.ts +2 -2
  44. package/lib/scenes/loading-scene.d.ts +4 -5
  45. package/lib/{extras → scenes}/main-scene.d.ts +3 -3
  46. package/lib/scenes/scene.d.ts +0 -1
  47. package/lib/scenes/svg-scene.d.ts +3 -4
  48. package/lib/shapes2/arrow.d.ts +6 -0
  49. package/lib/shapes2/axes.d.ts +35 -0
  50. package/lib/shapes2/circle.d.ts +10 -0
  51. package/lib/shapes2/polygon.d.ts +9 -0
  52. package/lib/shapes2/text.d.ts +21 -0
  53. package/lib/textures/texture.d.ts +2 -2
  54. package/lib/utils/svg.d.ts +14 -0
  55. package/lib/workers/renderer.worker.d.ts +1 -0
  56. package/package.json +1 -1
  57. package/lib/geometries/path2.d.ts +0 -20
package/lib/index.umd.js CHANGED
@@ -1,36 +1,37 @@
1
- (function(de,Ti){typeof exports=="object"&&typeof module<"u"?Ti(exports):typeof define=="function"&&define.amd?define(["exports"],Ti):(de=typeof globalThis<"u"?globalThis:de||self,Ti(de.archgine={}))})(this,function(de){"use strict";const Ti={name:"TinyEngine",containerId:"tinyEngine",canvas:"tinyEngine",width:0,height:0,aspect:1,dpr:1,alpha:!1,color:"#232323",fps:60,syncDelay:800,animateDuration:600,usedCache:!1,showPoints:!1,wireframe:!1,castShadow:!1,workerRender:!1,monitorDuration:1e4,light:{color:"#f2f2f2",position:[-6,6,0],castShadow:!0,shadowBlur:16},camera:{left:-1,right:1,top:1,bottom:-1,aspect:1,eye:[0,0,0],up:[0,0,1],helperEnable:!0},controls:{target:[0,0,0],minDistance:.1,maxDistance:1e3,enablePan:!0,enableRotate:!0,enableZoom:!0,focusMode:!0,autoRotate:!1,autoRotateSpeed:.5,enableDamping:!0,dampingFactor:.2},gridHelper:{fill:"#e3e3e3"},axesHelper:{},displayUnits:"",tooltip:!0,assetType:"rm",zoomToSelectEnable:!1,selectEnable:!1,multiSelectEnable:!1,socialDistanceEnable:!1,socialDistance:{radius:3}};function Zl(n,t){const e=n.x*Math.cos(t)-n.y*Math.sin(t),i=n.y*Math.cos(t)+n.x*Math.sin(t);n.x=e,n.y=i}function Ed(n,t,e){n.x+=t,n.y+=e}function jl(n,t){n.x*=t,n.y*=t}class Ci{commands;constructor(t){this.commands=[],t&&t instanceof Ci?this.commands.push(...t.commands):t&&(this.commands=_d(t))}addPath(t){t&&t instanceof Ci&&this.commands.push(...t.commands)}moveTo(t,e){this.commands.push(["M",t,e])}lineTo(t,e){this.commands.push(["L",t,e])}arc(t,e,i,a,o,l){this.commands.push(["AC",t,e,i,a,o,!!l])}arcTo(t,e,i,a,o){this.commands.push(["AT",t,e,i,a,o])}ellipse(t,e,i,a,o,l,c,f){this.commands.push(["E",t,e,i,a,o,l,c,!!f])}closePath(){this.commands.push(["Z"])}bezierCurveTo(t,e,i,a,o,l){this.commands.push(["C",t,e,i,a,o,l])}quadraticCurveTo(t,e,i,a){this.commands.push(["Q",t,e,i,a])}rect(t,e,i,a){this.commands.push(["R",t,e,i,a])}roundRect(t,e,i,a,o){typeof o>"u"?this.commands.push(["RR",t,e,i,a,0]):this.commands.push(["RR",t,e,i,a,o])}}function Ru(n,t){let e=0,i=0,a,o,l,c,f,v,x,D,C,S,H,I,B,F,W,Y,A,$,q,tt,ot,K=null,nt=null,J=null,it=null,ht=null,dt=null;n.beginPath();for(let lt=0;lt<t.length;++lt){$=t[lt][0],$!=="S"&&$!=="s"&&$!=="C"&&$!=="c"&&(K=null,nt=null),$!=="T"&&$!=="t"&&$!=="Q"&&$!=="q"&&(J=null,it=null);let O;switch($){case"m":case"M":O=t[lt],$==="m"?(e+=O[1],i+=O[2]):(e=O[1],i=O[2]),($==="M"||!ht)&&(ht={x:e,y:i}),n.moveTo(e,i);break;case"l":O=t[lt],e+=O[1],i+=O[2],n.lineTo(e,i);break;case"L":O=t[lt],e=O[1],i=O[2],n.lineTo(e,i);break;case"H":O=t[lt],e=O[1],n.lineTo(e,i);break;case"h":O=t[lt],e+=O[1],n.lineTo(e,i);break;case"V":O=t[lt],i=O[1],n.lineTo(e,i);break;case"v":O=t[lt],i+=O[1],n.lineTo(e,i);break;case"a":case"A":if(O=t[lt],dt===null)throw new Error("This should never happen");$==="a"?(e+=O[6],i+=O[7]):(e=O[6],i=O[7]),F=O[1],W=O[2],x=O[3]*Math.PI/180,l=!!O[4],c=!!O[5],f={x:e,y:i},v={x:(dt.x-f.x)/2,y:(dt.y-f.y)/2},Zl(v,-x),D=v.x*v.x/(F*F)+v.y*v.y/(W*W),D>1&&(D=Math.sqrt(D),F*=D,W*=D),q={x:F*v.y/W,y:-(W*v.x)/F},C=F*F*W*W,S=F*F*v.y*v.y+W*W*v.x*v.x,c!==l?jl(q,Math.sqrt((C-S)/S)||0):jl(q,-Math.sqrt((C-S)/S)||0),o=Math.atan2((v.y-q.y)/W,(v.x-q.x)/F),a=Math.atan2(-(v.y+q.y)/W,-(v.x+q.x)/F),Zl(q,x),Ed(q,(f.x+dt.x)/2,(f.y+dt.y)/2),n.save(),n.translate(q.x,q.y),n.rotate(x),n.scale(F,W),n.arc(0,0,1,o,a,!c),n.restore();break;case"C":O=t[lt],K=O[3],nt=O[4],e=O[5],i=O[6],n.bezierCurveTo(O[1],O[2],K,nt,e,i);break;case"c":O=t[lt],n.bezierCurveTo(O[1]+e,O[2]+i,O[3]+e,O[4]+i,O[5]+e,O[6]+i),K=O[3]+e,nt=O[4]+i,e+=O[5],i+=O[6];break;case"S":O=t[lt],(K===null||nt===null)&&(K=e,nt=i),n.bezierCurveTo(2*e-K,2*i-nt,O[1],O[2],O[3],O[4]),K=O[1],nt=O[2],e=O[3],i=O[4];break;case"s":O=t[lt],(K===null||nt===null)&&(K=e,nt=i),n.bezierCurveTo(2*e-K,2*i-nt,O[1]+e,O[2]+i,O[3]+e,O[4]+i),K=O[1]+e,nt=O[2]+i,e+=O[3],i+=O[4];break;case"Q":O=t[lt],J=O[1],it=O[2],e=O[3],i=O[4],n.quadraticCurveTo(J,it,e,i);break;case"q":O=t[lt],J=O[1]+e,it=O[2]+i,e+=O[3],i+=O[4],n.quadraticCurveTo(J,it,e,i);break;case"T":O=t[lt],(J===null||it===null)&&(J=e,it=i),J=2*e-J,it=2*i-it,e=O[1],i=O[2],n.quadraticCurveTo(J,it,e,i);break;case"t":O=t[lt],(J===null||it===null)&&(J=e,it=i),J=2*e-J,it=2*i-it,e+=O[1],i+=O[2],n.quadraticCurveTo(J,it,e,i);break;case"z":case"Z":ht&&(e=ht.x,i=ht.y),ht=null,n.closePath();break;case"AC":O=t[lt],e=O[1],i=O[2],B=O[3],o=O[4],a=O[5],tt=O[6],n.arc(e,i,B,o,a,tt);break;case"AT":O=t[lt],H=O[1],I=O[2],e=O[3],i=O[4],B=O[5],n.arcTo(H,I,e,i,B);break;case"E":O=t[lt],e=O[1],i=O[2],F=O[3],W=O[4],x=O[5],o=O[6],a=O[7],tt=O[8],n.save(),n.translate(e,i),n.rotate(x),n.scale(F,W),n.arc(0,0,1,o,a,tt),n.restore();break;case"R":O=t[lt],e=O[1],i=O[2],Y=O[3],A=O[4],ht={x:e,y:i},n.rect(e,i,Y,A);break;case"RR":O=t[lt],e=O[1],i=O[2],Y=O[3],A=O[4],ot=O[5],ht={x:e,y:i},n.roundRect(e,i,Y,A,ot);break}dt?(dt.x=e,dt.y=i):dt={x:e,y:i}}}function bd(n){if(!n||!n.CanvasRenderingContext2D||n.Path2D)return;const{CanvasRenderingContext2D:t}=n,e=t==null?void 0:t.prototype.fill,i=t==null?void 0:t.prototype.stroke,a=t==null?void 0:t.prototype.isPointInPath;t.prototype.fill=function(...l){if(l[0]instanceof Ci){const c=l[0],f=l[1]||"nonzero";Ru(this,c.commands),e.apply(this,[f])}else{const c=l[0]||"nonzero";return e.apply(this,[c])}},t.prototype.stroke=function(l){l&&Ru(this,l.commands),i.apply(this)},t.prototype.isPointInPath=function(...l){if(l[0]instanceof Ci){const c=l[0],f=l[1],v=l[2],x=l[3]||"nonzero";return Ru(this,c.commands),a.apply(this,[f,v,x])}else return a.apply(this,l)},n.Path2D=Ci}const ms={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Ad=/([astvzqmhlc])([^astvzqmhlc]*)/gi,wd=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function Dd(n){const t=n.match(wd);return t?t.map(Number):[]}function _d(n){const t=[],e=String(n).trim();return e[0]!=="M"&&e[0]!=="m"||e.replace(Ad,(i,a,o)=>{const l=Dd(o);let c=a.toLowerCase(),f=a;if(c==="m"&&l.length>2&&(t.push([f,...l.splice(0,2)]),c="l",f=f==="m"?"l":"L"),l.length<ms[c])return"";for(t.push([f,...l.splice(0,ms[c])]);l.length>=ms[c]&&l.length&&ms[c];)t.push([f,...l.splice(0,ms[c])]);return""}),t}var vs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ql(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Tn={},tn={};function Td(n,t,e){if(e===void 0&&(e=Array.prototype),n&&typeof e.find=="function")return e.find.call(n,t);for(var i=0;i<n.length;i++)if(Object.prototype.hasOwnProperty.call(n,i)){var a=n[i];if(t.call(void 0,a,i,n))return a}}function Pu(n,t){return t===void 0&&(t=Object),t&&typeof t.freeze=="function"?t.freeze(n):n}function Cd(n,t){if(n===null||typeof n!="object")throw new TypeError("target is not an object");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}var Kl=Pu({HTML:"text/html",isHTML:function(n){return n===Kl.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Jl=Pu({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(n){return n===Jl.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});tn.assign=Cd,tn.find=Td,tn.freeze=Pu,tn.MIME_TYPE=Kl,tn.NAMESPACE=Jl;var th=tn,kr=th.find,ys=th.NAMESPACE;function Sd(n){return n!==""}function Od(n){return n?n.split(/[\t\n\f\r ]+/).filter(Sd):[]}function Nd(n,t){return n.hasOwnProperty(t)||(n[t]=!0),n}function eh(n){if(!n)return[];var t=Od(n);return Object.keys(t.reduce(Nd,{}))}function Md(n){return function(t){return n&&n.indexOf(t)!==-1}}function xs(n,t){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}function Le(n,t){var e=n.prototype;if(!(e instanceof t)){let i=function(){};i.prototype=t.prototype,i=new i,xs(e,i),n.prototype=e=i}e.constructor!=n&&(typeof n!="function"&&console.error("unknown Class:"+n),e.constructor=n)}var Re={},wr=Re.ELEMENT_NODE=1,Si=Re.ATTRIBUTE_NODE=2,va=Re.TEXT_NODE=3,rh=Re.CDATA_SECTION_NODE=4,nh=Re.ENTITY_REFERENCE_NODE=5,Bd=Re.ENTITY_NODE=6,ih=Re.PROCESSING_INSTRUCTION_NODE=7,sh=Re.COMMENT_NODE=8,ah=Re.DOCUMENT_NODE=9,uh=Re.DOCUMENT_TYPE_NODE=10,en=Re.DOCUMENT_FRAGMENT_NODE=11,Id=Re.NOTATION_NODE=12,xe={},oe={};xe.INDEX_SIZE_ERR=(oe[1]="Index size error",1),xe.DOMSTRING_SIZE_ERR=(oe[2]="DOMString size error",2);var Pe=xe.HIERARCHY_REQUEST_ERR=(oe[3]="Hierarchy request error",3);xe.WRONG_DOCUMENT_ERR=(oe[4]="Wrong document",4),xe.INVALID_CHARACTER_ERR=(oe[5]="Invalid character",5),xe.NO_DATA_ALLOWED_ERR=(oe[6]="No data allowed",6),xe.NO_MODIFICATION_ALLOWED_ERR=(oe[7]="No modification allowed",7);var oh=xe.NOT_FOUND_ERR=(oe[8]="Not found",8);xe.NOT_SUPPORTED_ERR=(oe[9]="Not supported",9);var lh=xe.INUSE_ATTRIBUTE_ERR=(oe[10]="Attribute in use",10);xe.INVALID_STATE_ERR=(oe[11]="Invalid state",11),xe.SYNTAX_ERR=(oe[12]="Syntax error",12),xe.INVALID_MODIFICATION_ERR=(oe[13]="Invalid modification",13),xe.NAMESPACE_ERR=(oe[14]="Invalid namespace",14),xe.INVALID_ACCESS_ERR=(oe[15]="Invalid access",15);function Xt(n,t){if(t instanceof Error)var e=t;else e=this,Error.call(this,oe[n]),this.message=oe[n],Error.captureStackTrace&&Error.captureStackTrace(this,Xt);return e.code=n,t&&(this.message=this.message+": "+t),e}Xt.prototype=Error.prototype,xs(xe,Xt);function rn(){}rn.prototype={length:0,item:function(n){return n>=0&&n<this.length?this[n]:null},toString:function(n,t){for(var e=[],i=0;i<this.length;i++)Ni(this[i],e,n,t);return e.join("")},filter:function(n){return Array.prototype.filter.call(this,n)},indexOf:function(n){return Array.prototype.indexOf.call(this,n)}};function Oi(n,t){this._node=n,this._refresh=t,Fu(this)}function Fu(n){var t=n._node._inc||n._node.ownerDocument._inc;if(n._inc!==t){var e=n._refresh(n._node);if(Th(n,"length",e.length),!n.$$length||e.length<n.$$length)for(var i=e.length;i in n;i++)Object.prototype.hasOwnProperty.call(n,i)&&delete n[i];xs(e,n),n._inc=t}}Oi.prototype.item=function(n){return Fu(this),this[n]||null},Le(Oi,rn);function ya(){}function hh(n,t){for(var e=n.length;e--;)if(n[e]===t)return e}function ch(n,t,e,i){if(i?t[hh(t,i)]=e:t[t.length++]=e,n){e.ownerElement=n;var a=n.ownerDocument;a&&(i&&gh(a,n,i),Ld(a,n,e))}}function fh(n,t,e){var i=hh(t,e);if(i>=0){for(var a=t.length-1;i<a;)t[i]=t[++i];if(t.length=a,n){var o=n.ownerDocument;o&&(gh(o,n,e),e.ownerElement=null)}}else throw new Xt(oh,new Error(n.tagName+"@"+e))}ya.prototype={length:0,item:rn.prototype.item,getNamedItem:function(n){for(var t=this.length;t--;){var e=this[t];if(e.nodeName==n)return e}},setNamedItem:function(n){var t=n.ownerElement;if(t&&t!=this._ownerElement)throw new Xt(lh);var e=this.getNamedItem(n.nodeName);return ch(this._ownerElement,this,n,e),e},setNamedItemNS:function(n){var t=n.ownerElement,e;if(t&&t!=this._ownerElement)throw new Xt(lh);return e=this.getNamedItemNS(n.namespaceURI,n.localName),ch(this._ownerElement,this,n,e),e},removeNamedItem:function(n){var t=this.getNamedItem(n);return fh(this._ownerElement,this,t),t},removeNamedItemNS:function(n,t){var e=this.getNamedItemNS(n,t);return fh(this._ownerElement,this,e),e},getNamedItemNS:function(n,t){for(var e=this.length;e--;){var i=this[e];if(i.localName==t&&i.namespaceURI==n)return i}return null}};function ph(){}ph.prototype={hasFeature:function(n,t){return!0},createDocument:function(n,t,e){var i=new bs;if(i.implementation=this,i.childNodes=new rn,i.doctype=e||null,e&&i.appendChild(e),t){var a=i.createElementNS(n,t);i.appendChild(a)}return i},createDocumentType:function(n,t,e){var i=new ba;return i.name=n,i.nodeName=n,i.publicId=t||"",i.systemId=e||"",i}};function Mt(){}Mt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(n,t){return xa(this,n,t)},replaceChild:function(n,t){xa(this,n,t,xh),t&&this.removeChild(t)},removeChild:function(n){return mh(this,n)},appendChild:function(n){return this.insertBefore(n,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(n){return Gu(this.ownerDocument||this,this,n)},normalize:function(){for(var n=this.firstChild;n;){var t=n.nextSibling;t&&t.nodeType==va&&n.nodeType==va?(this.removeChild(t),n.appendData(t.data)):(n.normalize(),n=t)}},isSupported:function(n,t){return this.ownerDocument.implementation.hasFeature(n,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(n){for(var t=this;t;){var e=t._nsMap;if(e){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]===n)return i}t=t.nodeType==Si?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(n){for(var t=this;t;){var e=t._nsMap;if(e&&Object.prototype.hasOwnProperty.call(e,n))return e[n];t=t.nodeType==Si?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(n){var t=this.lookupPrefix(n);return t==null}};function dh(n){return n=="<"&&"&lt;"||n==">"&&"&gt;"||n=="&"&&"&amp;"||n=='"'&&"&quot;"||"&#"+n.charCodeAt()+";"}xs(Re,Mt),xs(Re,Mt.prototype);function Es(n,t){if(t(n))return!0;if(n=n.firstChild)do if(Es(n,t))return!0;while(n=n.nextSibling)}function bs(){this.ownerDocument=this}function Ld(n,t,e){n&&n._inc++;var i=e.namespaceURI;i===ys.XMLNS&&(t._nsMap[e.prefix?e.localName:""]=e.value)}function gh(n,t,e,i){n&&n._inc++;var a=e.namespaceURI;a===ys.XMLNS&&delete t._nsMap[e.prefix?e.localName:""]}function ku(n,t,e){if(n&&n._inc){n._inc++;var i=t.childNodes;if(e)i[i.length++]=e;else{for(var a=t.firstChild,o=0;a;)i[o++]=a,a=a.nextSibling;i.length=o,delete i[i.length]}}}function mh(n,t){var e=t.previousSibling,i=t.nextSibling;return e?e.nextSibling=i:n.firstChild=i,i?i.previousSibling=e:n.lastChild=e,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,ku(n.ownerDocument,n),t}function Rd(n){return n&&(n.nodeType===Mt.DOCUMENT_NODE||n.nodeType===Mt.DOCUMENT_FRAGMENT_NODE||n.nodeType===Mt.ELEMENT_NODE)}function Pd(n){return n&&(Ur(n)||Uu(n)||nn(n)||n.nodeType===Mt.DOCUMENT_FRAGMENT_NODE||n.nodeType===Mt.COMMENT_NODE||n.nodeType===Mt.PROCESSING_INSTRUCTION_NODE)}function nn(n){return n&&n.nodeType===Mt.DOCUMENT_TYPE_NODE}function Ur(n){return n&&n.nodeType===Mt.ELEMENT_NODE}function Uu(n){return n&&n.nodeType===Mt.TEXT_NODE}function vh(n,t){var e=n.childNodes||[];if(kr(e,Ur)||nn(t))return!1;var i=kr(e,nn);return!(t&&i&&e.indexOf(i)>e.indexOf(t))}function yh(n,t){var e=n.childNodes||[];function i(o){return Ur(o)&&o!==t}if(kr(e,i))return!1;var a=kr(e,nn);return!(t&&a&&e.indexOf(a)>e.indexOf(t))}function Fd(n,t,e){if(!Rd(n))throw new Xt(Pe,"Unexpected parent node type "+n.nodeType);if(e&&e.parentNode!==n)throw new Xt(oh,"child not in parent");if(!Pd(t)||nn(t)&&n.nodeType!==Mt.DOCUMENT_NODE)throw new Xt(Pe,"Unexpected node type "+t.nodeType+" for parent node type "+n.nodeType)}function kd(n,t,e){var i=n.childNodes||[],a=t.childNodes||[];if(t.nodeType===Mt.DOCUMENT_FRAGMENT_NODE){var o=a.filter(Ur);if(o.length>1||kr(a,Uu))throw new Xt(Pe,"More than one element or text in fragment");if(o.length===1&&!vh(n,e))throw new Xt(Pe,"Element in fragment can not be inserted before doctype")}if(Ur(t)&&!vh(n,e))throw new Xt(Pe,"Only one element can be added and only after doctype");if(nn(t)){if(kr(i,nn))throw new Xt(Pe,"Only one doctype is allowed");var l=kr(i,Ur);if(e&&i.indexOf(l)<i.indexOf(e))throw new Xt(Pe,"Doctype can only be inserted before an element");if(!e&&l)throw new Xt(Pe,"Doctype can not be appended since element is present")}}function xh(n,t,e){var i=n.childNodes||[],a=t.childNodes||[];if(t.nodeType===Mt.DOCUMENT_FRAGMENT_NODE){var o=a.filter(Ur);if(o.length>1||kr(a,Uu))throw new Xt(Pe,"More than one element or text in fragment");if(o.length===1&&!yh(n,e))throw new Xt(Pe,"Element in fragment can not be inserted before doctype")}if(Ur(t)&&!yh(n,e))throw new Xt(Pe,"Only one element can be added and only after doctype");if(nn(t)){if(kr(i,function(f){return nn(f)&&f!==e}))throw new Xt(Pe,"Only one doctype is allowed");var l=kr(i,Ur);if(e&&i.indexOf(l)<i.indexOf(e))throw new Xt(Pe,"Doctype can only be inserted before an element")}}function xa(n,t,e,i){Fd(n,t,e),n.nodeType===Mt.DOCUMENT_NODE&&(i||kd)(n,t,e);var a=t.parentNode;if(a&&a.removeChild(t),t.nodeType===en){var o=t.firstChild;if(o==null)return t;var l=t.lastChild}else o=l=t;var c=e?e.previousSibling:n.lastChild;o.previousSibling=c,l.nextSibling=e,c?c.nextSibling=o:n.firstChild=o,e==null?n.lastChild=l:e.previousSibling=l;do o.parentNode=n;while(o!==l&&(o=o.nextSibling));return ku(n.ownerDocument||n,n),t.nodeType==en&&(t.firstChild=t.lastChild=null),t}function Ud(n,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=n,t.previousSibling=n.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:n.firstChild=t,n.lastChild=t,ku(n.ownerDocument,n,t),t}bs.prototype={nodeName:"#document",nodeType:ah,doctype:null,documentElement:null,_inc:1,insertBefore:function(n,t){if(n.nodeType==en){for(var e=n.firstChild;e;){var i=e.nextSibling;this.insertBefore(e,t),e=i}return n}return xa(this,n,t),n.ownerDocument=this,this.documentElement===null&&n.nodeType===wr&&(this.documentElement=n),n},removeChild:function(n){return this.documentElement==n&&(this.documentElement=null),mh(this,n)},replaceChild:function(n,t){xa(this,n,t,xh),n.ownerDocument=this,t&&this.removeChild(t),Ur(n)&&(this.documentElement=n)},importNode:function(n,t){return _h(this,n,t)},getElementById:function(n){var t=null;return Es(this.documentElement,function(e){if(e.nodeType==wr&&e.getAttribute("id")==n)return t=e,!0}),t},getElementsByClassName:function(n){var t=eh(n);return new Oi(this,function(e){var i=[];return t.length>0&&Es(e.documentElement,function(a){if(a!==e&&a.nodeType===wr){var o=a.getAttribute("class");if(o){var l=n===o;if(!l){var c=eh(o);l=t.every(Md(c))}l&&i.push(a)}}}),i})},createElement:function(n){var t=new Kn;t.ownerDocument=this,t.nodeName=n,t.tagName=n,t.localName=n,t.childNodes=new rn;var e=t.attributes=new ya;return e._ownerElement=t,t},createDocumentFragment:function(){var n=new Aa;return n.ownerDocument=this,n.childNodes=new rn,n},createTextNode:function(n){var t=new Hu;return t.ownerDocument=this,t.appendData(n),t},createComment:function(n){var t=new qu;return t.ownerDocument=this,t.appendData(n),t},createCDATASection:function(n){var t=new Wu;return t.ownerDocument=this,t.appendData(n),t},createProcessingInstruction:function(n,t){var e=new zu;return e.ownerDocument=this,e.tagName=e.nodeName=e.target=n,e.nodeValue=e.data=t,e},createAttribute:function(n){var t=new Ea;return t.ownerDocument=this,t.name=n,t.nodeName=n,t.localName=n,t.specified=!0,t},createEntityReference:function(n){var t=new Vu;return t.ownerDocument=this,t.nodeName=n,t},createElementNS:function(n,t){var e=new Kn,i=t.split(":"),a=e.attributes=new ya;return e.childNodes=new rn,e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.namespaceURI=n,i.length==2?(e.prefix=i[0],e.localName=i[1]):e.localName=t,a._ownerElement=e,e},createAttributeNS:function(n,t){var e=new Ea,i=t.split(":");return e.ownerDocument=this,e.nodeName=t,e.name=t,e.namespaceURI=n,e.specified=!0,i.length==2?(e.prefix=i[0],e.localName=i[1]):e.localName=t,e}},Le(bs,Mt);function Kn(){this._nsMap={}}Kn.prototype={nodeType:wr,hasAttribute:function(n){return this.getAttributeNode(n)!=null},getAttribute:function(n){var t=this.getAttributeNode(n);return t&&t.value||""},getAttributeNode:function(n){return this.attributes.getNamedItem(n)},setAttribute:function(n,t){var e=this.ownerDocument.createAttribute(n);e.value=e.nodeValue=""+t,this.setAttributeNode(e)},removeAttribute:function(n){var t=this.getAttributeNode(n);t&&this.removeAttributeNode(t)},appendChild:function(n){return n.nodeType===en?this.insertBefore(n,null):Ud(this,n)},setAttributeNode:function(n){return this.attributes.setNamedItem(n)},setAttributeNodeNS:function(n){return this.attributes.setNamedItemNS(n)},removeAttributeNode:function(n){return this.attributes.removeNamedItem(n.nodeName)},removeAttributeNS:function(n,t){var e=this.getAttributeNodeNS(n,t);e&&this.removeAttributeNode(e)},hasAttributeNS:function(n,t){return this.getAttributeNodeNS(n,t)!=null},getAttributeNS:function(n,t){var e=this.getAttributeNodeNS(n,t);return e&&e.value||""},setAttributeNS:function(n,t,e){var i=this.ownerDocument.createAttributeNS(n,t);i.value=i.nodeValue=""+e,this.setAttributeNode(i)},getAttributeNodeNS:function(n,t){return this.attributes.getNamedItemNS(n,t)},getElementsByTagName:function(n){return new Oi(this,function(t){var e=[];return Es(t,function(i){i!==t&&i.nodeType==wr&&(n==="*"||i.tagName==n)&&e.push(i)}),e})},getElementsByTagNameNS:function(n,t){return new Oi(this,function(e){var i=[];return Es(e,function(a){a!==e&&a.nodeType===wr&&(n==="*"||a.namespaceURI===n)&&(t==="*"||a.localName==t)&&i.push(a)}),i})}},bs.prototype.getElementsByTagName=Kn.prototype.getElementsByTagName,bs.prototype.getElementsByTagNameNS=Kn.prototype.getElementsByTagNameNS,Le(Kn,Mt);function Ea(){}Ea.prototype.nodeType=Si,Le(Ea,Mt);function As(){}As.prototype={data:"",substringData:function(n,t){return this.data.substring(n,n+t)},appendData:function(n){n=this.data+n,this.nodeValue=this.data=n,this.length=n.length},insertData:function(n,t){this.replaceData(n,0,t)},appendChild:function(n){throw new Error(oe[Pe])},deleteData:function(n,t){this.replaceData(n,t,"")},replaceData:function(n,t,e){var i=this.data.substring(0,n),a=this.data.substring(n+t);e=i+e+a,this.nodeValue=this.data=e,this.length=e.length}},Le(As,Mt);function Hu(){}Hu.prototype={nodeName:"#text",nodeType:va,splitText:function(n){var t=this.data,e=t.substring(n);t=t.substring(0,n),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(e);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},Le(Hu,As);function qu(){}qu.prototype={nodeName:"#comment",nodeType:sh},Le(qu,As);function Wu(){}Wu.prototype={nodeName:"#cdata-section",nodeType:rh},Le(Wu,As);function ba(){}ba.prototype.nodeType=uh,Le(ba,Mt);function Eh(){}Eh.prototype.nodeType=Id,Le(Eh,Mt);function bh(){}bh.prototype.nodeType=Bd,Le(bh,Mt);function Vu(){}Vu.prototype.nodeType=nh,Le(Vu,Mt);function Aa(){}Aa.prototype.nodeName="#document-fragment",Aa.prototype.nodeType=en,Le(Aa,Mt);function zu(){}zu.prototype.nodeType=ih,Le(zu,Mt);function Ah(){}Ah.prototype.serializeToString=function(n,t,e){return wh.call(n,t,e)},Mt.prototype.toString=wh;function wh(n,t){var e=[],i=this.nodeType==9&&this.documentElement||this,a=i.prefix,o=i.namespaceURI;if(o&&a==null){var a=i.lookupPrefix(o);if(a==null)var l=[{namespace:o,prefix:null}]}return Ni(this,e,n,t,l),e.join("")}function Dh(n,t,e){var i=n.prefix||"",a=n.namespaceURI;if(!a||i==="xml"&&a===ys.XML||a===ys.XMLNS)return!1;for(var o=e.length;o--;){var l=e[o];if(l.prefix===i)return l.namespace!==a}return!0}function $u(n,t,e){n.push(" ",t,'="',e.replace(/[<>&"\t\n\r]/g,dh),'"')}function Ni(n,t,e,i,a){if(a||(a=[]),i)if(n=i(n),n){if(typeof n=="string"){t.push(n);return}}else return;switch(n.nodeType){case wr:var o=n.attributes,l=o.length,F=n.firstChild,c=n.tagName;e=ys.isHTML(n.namespaceURI)||e;var f=c;if(!e&&!n.prefix&&n.namespaceURI){for(var v,x=0;x<o.length;x++)if(o.item(x).name==="xmlns"){v=o.item(x).value;break}if(!v)for(var D=a.length-1;D>=0;D--){var C=a[D];if(C.prefix===""&&C.namespace===n.namespaceURI){v=C.namespace;break}}if(v!==n.namespaceURI)for(var D=a.length-1;D>=0;D--){var C=a[D];if(C.namespace===n.namespaceURI){C.prefix&&(f=C.prefix+":"+c);break}}}t.push("<",f);for(var S=0;S<l;S++){var H=o.item(S);H.prefix=="xmlns"?a.push({prefix:H.localName,namespace:H.value}):H.nodeName=="xmlns"&&a.push({prefix:"",namespace:H.value})}for(var S=0;S<l;S++){var H=o.item(S);if(Dh(H,e,a)){var I=H.prefix||"",B=H.namespaceURI;$u(t,I?"xmlns:"+I:"xmlns",B),a.push({prefix:I,namespace:B})}Ni(H,t,e,i,a)}if(c===f&&Dh(n,e,a)){var I=n.prefix||"",B=n.namespaceURI;$u(t,I?"xmlns:"+I:"xmlns",B),a.push({prefix:I,namespace:B})}if(F||e&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),e&&/^script$/i.test(c))for(;F;)F.data?t.push(F.data):Ni(F,t,e,i,a.slice()),F=F.nextSibling;else for(;F;)Ni(F,t,e,i,a.slice()),F=F.nextSibling;t.push("</",f,">")}else t.push("/>");return;case ah:case en:for(var F=n.firstChild;F;)Ni(F,t,e,i,a.slice()),F=F.nextSibling;return;case Si:return $u(t,n.name,n.value);case va:return t.push(n.data.replace(/[<&>]/g,dh));case rh:return t.push("<![CDATA[",n.data,"]]>");case sh:return t.push("<!--",n.data,"-->");case uh:var W=n.publicId,Y=n.systemId;if(t.push("<!DOCTYPE ",n.name),W)t.push(" PUBLIC ",W),Y&&Y!="."&&t.push(" ",Y),t.push(">");else if(Y&&Y!=".")t.push(" SYSTEM ",Y,">");else{var A=n.internalSubset;A&&t.push(" [",A,"]"),t.push(">")}return;case ih:return t.push("<?",n.target," ",n.data,"?>");case nh:return t.push("&",n.nodeName,";");default:t.push("??",n.nodeName)}}function _h(n,t,e){var i;switch(t.nodeType){case wr:i=t.cloneNode(!1),i.ownerDocument=n;case en:break;case Si:e=!0;break}if(i||(i=t.cloneNode(!1)),i.ownerDocument=n,i.parentNode=null,e)for(var a=t.firstChild;a;)i.appendChild(_h(n,a,e)),a=a.nextSibling;return i}function Gu(n,t,e){var i=new t.constructor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var o=t[a];typeof o!="object"&&o!=i[a]&&(i[a]=o)}switch(t.childNodes&&(i.childNodes=new rn),i.ownerDocument=n,i.nodeType){case wr:var l=t.attributes,c=i.attributes=new ya,f=l.length;c._ownerElement=i;for(var v=0;v<f;v++)i.setAttributeNode(Gu(n,l.item(v),!0));break;case Si:e=!0}if(e)for(var x=t.firstChild;x;)i.appendChild(Gu(n,x,e)),x=x.nextSibling;return i}function Th(n,t,e){n[t]=e}try{if(Object.defineProperty){let n=function(t){switch(t.nodeType){case wr:case en:var e=[];for(t=t.firstChild;t;)t.nodeType!==7&&t.nodeType!==8&&e.push(n(t)),t=t.nextSibling;return e.join("");default:return t.nodeValue}};Object.defineProperty(Oi.prototype,"length",{get:function(){return Fu(this),this.$$length}}),Object.defineProperty(Mt.prototype,"textContent",{get:function(){return n(this)},set:function(t){switch(this.nodeType){case wr:case en:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),Th=function(t,e,i){t["$$"+e]=i}}}catch{}Tn.DocumentType=ba,Tn.DOMException=Xt,Tn.DOMImplementation=ph,Tn.Element=Kn,Tn.Node=Mt,Tn.NodeList=rn,Tn.XMLSerializer=Ah;var wa={},Ch={};(function(n){var t=tn.freeze;n.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),n.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
2
- `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),n.entityMap=n.HTML_ENTITIES})(Ch);var Yu={},ws=tn.NAMESPACE,Xu=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Sh=new RegExp("[\\-\\.0-9"+Xu.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Oh=new RegExp("^"+Xu.source+Sh.source+"*(?::"+Xu.source+Sh.source+"*)?$"),Ds=0,Cn=1,Mi=2,_s=3,Bi=4,Ii=5,Ts=6,Da=7;function Li(n,t){this.message=n,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Li)}Li.prototype=new Error,Li.prototype.name=Li.name;function Nh(){}Nh.prototype={parse:function(n,t,e){var i=this.domBuilder;i.startDocument(),Ih(t,t={}),Hd(n,t,e,i,this.errorHandler),i.endDocument()}};function Hd(n,t,e,i,a){function o(O){if(O>65535){O-=65536;var gt=55296+(O>>10),Ot=56320+(O&1023);return String.fromCharCode(gt,Ot)}else return String.fromCharCode(O)}function l(O){var gt=O.slice(1,-1);return Object.hasOwnProperty.call(e,gt)?e[gt]:gt.charAt(0)==="#"?o(parseInt(gt.substr(1).replace("x","0x"))):(a.error("entity not found:"+O),O)}function c(O){if(O>I){var gt=n.substring(I,O).replace(/&#?\w+;/g,l);C&&f(I),i.characters(gt,0,O-I),I=O}}function f(O,gt){for(;O>=x&&(gt=D.exec(n));)v=gt.index,x=v+gt[0].length,C.lineNumber++;C.columnNumber=O-v+1}for(var v=0,x=0,D=/.*(?:\r\n?|\n)|.*$/g,C=i.locator,S=[{currentNSMap:t}],H={},I=0;;){try{var B=n.indexOf("<",I);if(B<0){if(!n.substr(I).match(/^\s*$/)){var F=i.doc,W=F.createTextNode(n.substr(I));F.appendChild(W),i.currentElement=W}return}switch(B>I&&c(B),n.charAt(B+1)){case"/":var J=n.indexOf(">",B+3),Y=n.substring(B+2,J).replace(/[ \t\n\r]+$/g,""),A=S.pop();J<0?(Y=n.substring(B+2).replace(/[\s<].*/,""),a.error("end tag name: "+Y+" is not complete:"+A.tagName),J=B+1+Y.length):Y.match(/\s</)&&(Y=Y.replace(/[\s<].*/,""),a.error("end tag name: "+Y+" maybe not complete"),J=B+1+Y.length);var $=A.localNSMap,q=A.tagName==Y,tt=q||A.tagName&&A.tagName.toLowerCase()==Y.toLowerCase();if(tt){if(i.endElement(A.uri,A.localName,Y),$)for(var ot in $)Object.prototype.hasOwnProperty.call($,ot)&&i.endPrefixMapping(ot);q||a.fatalError("end tag name: "+Y+" is not match the current start tagName:"+A.tagName)}else S.push(A);J++;break;case"?":C&&f(B),J=$d(n,B,i);break;case"!":C&&f(B),J=zd(n,B,i,a);break;default:C&&f(B);var K=new Lh,nt=S[S.length-1].currentNSMap,J=qd(n,B,K,nt,l,a),it=K.length;if(!K.closed&&Vd(n,J,K.tagName,H)&&(K.closed=!0,e.nbsp||a.warning("unclosed xml attribute")),C&&it){for(var ht=Mh(C,{}),dt=0;dt<it;dt++){var lt=K[dt];f(lt.offset),lt.locator=Mh(C,{})}i.locator=ht,Bh(K,i,nt)&&S.push(K),i.locator=C}else Bh(K,i,nt)&&S.push(K);ws.isHTML(K.uri)&&!K.closed?J=Wd(n,J,K.tagName,l,i):J++}}catch(O){if(O instanceof Li)throw O;a.error("element parse error: "+O),J=-1}J>I?I=J:c(Math.max(B,I)+1)}}function Mh(n,t){return t.lineNumber=n.lineNumber,t.columnNumber=n.columnNumber,t}function qd(n,t,e,i,a,o){function l(C,S,H){e.attributeNames.hasOwnProperty(C)&&o.fatalError("Attribute "+C+" redefined"),e.addValue(C,S.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),H)}for(var c,f,v=++t,x=Ds;;){var D=n.charAt(v);switch(D){case"=":if(x===Cn)c=n.slice(t,v),x=_s;else if(x===Mi)x=_s;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(x===_s||x===Cn)if(x===Cn&&(o.warning('attribute value must after "="'),c=n.slice(t,v)),t=v+1,v=n.indexOf(D,t),v>0)f=n.slice(t,v),l(c,f,t-1),x=Ii;else throw new Error("attribute value no end '"+D+"' match");else if(x==Bi)f=n.slice(t,v),l(c,f,t),o.warning('attribute "'+c+'" missed start quot('+D+")!!"),t=v+1,x=Ii;else throw new Error('attribute value must after "="');break;case"/":switch(x){case Ds:e.setTagName(n.slice(t,v));case Ii:case Ts:case Da:x=Da,e.closed=!0;case Bi:case Cn:break;case Mi:e.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),x==Ds&&e.setTagName(n.slice(t,v)),v;case">":switch(x){case Ds:e.setTagName(n.slice(t,v));case Ii:case Ts:case Da:break;case Bi:case Cn:f=n.slice(t,v),f.slice(-1)==="/"&&(e.closed=!0,f=f.slice(0,-1));case Mi:x===Mi&&(f=c),x==Bi?(o.warning('attribute "'+f+'" missed quot(")!'),l(c,f,t)):((!ws.isHTML(i[""])||!f.match(/^(?:disabled|checked|selected)$/i))&&o.warning('attribute "'+f+'" missed value!! "'+f+'" instead!!'),l(f,f,t));break;case _s:throw new Error("attribute value missed!!")}return v;case"€":D=" ";default:if(D<=" ")switch(x){case Ds:e.setTagName(n.slice(t,v)),x=Ts;break;case Cn:c=n.slice(t,v),x=Mi;break;case Bi:var f=n.slice(t,v);o.warning('attribute "'+f+'" missed quot(")!!'),l(c,f,t);case Ii:x=Ts;break}else switch(x){case Mi:e.tagName,(!ws.isHTML(i[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&o.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),l(c,c,t),t=v,x=Cn;break;case Ii:o.warning('attribute space is required"'+c+'"!!');case Ts:x=Cn,t=v;break;case _s:x=Bi,t=v;break;case Da:throw new Error("elements closed character '/' and '>' must be connected to")}}v++}}function Bh(n,t,e){for(var i=n.tagName,a=null,D=n.length;D--;){var o=n[D],l=o.qName,c=o.value,C=l.indexOf(":");if(C>0)var f=o.prefix=l.slice(0,C),v=l.slice(C+1),x=f==="xmlns"&&v;else v=l,f=null,x=l==="xmlns"&&"";o.localName=v,x!==!1&&(a==null&&(a={},Ih(e,e={})),e[x]=a[x]=c,o.uri=ws.XMLNS,t.startPrefixMapping(x,c))}for(var D=n.length;D--;){o=n[D];var f=o.prefix;f&&(f==="xml"&&(o.uri=ws.XML),f!=="xmlns"&&(o.uri=e[f||""]))}var C=i.indexOf(":");C>0?(f=n.prefix=i.slice(0,C),v=n.localName=i.slice(C+1)):(f=null,v=n.localName=i);var S=n.uri=e[f||""];if(t.startElement(S,v,i,n),n.closed){if(t.endElement(S,v,i),a)for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&t.endPrefixMapping(f)}else return n.currentNSMap=e,n.localNSMap=a,!0}function Wd(n,t,e,i,a){if(/^(?:script|textarea)$/i.test(e)){var o=n.indexOf("</"+e+">",t),l=n.substring(t+1,o);if(/[&<]/.test(l))return/^script$/i.test(e)?(a.characters(l,0,l.length),o):(l=l.replace(/&#?\w+;/g,i),a.characters(l,0,l.length),o)}return t+1}function Vd(n,t,e,i){var a=i[e];return a==null&&(a=n.lastIndexOf("</"+e+">"),a<t&&(a=n.lastIndexOf("</"+e)),i[e]=a),a<t}function Ih(n,t){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}function zd(n,t,e,i){var a=n.charAt(t+2);switch(a){case"-":if(n.charAt(t+3)==="-"){var o=n.indexOf("-->",t+4);return o>t?(e.comment(n,t+4,o-t-4),o+3):(i.error("Unclosed comment"),-1)}else return-1;default:if(n.substr(t+3,6)=="CDATA["){var o=n.indexOf("]]>",t+9);return e.startCDATA(),e.characters(n,t+9,o-t-9),e.endCDATA(),o+3}var l=Gd(n,t),c=l.length;if(c>1&&/!doctype/i.test(l[0][0])){var f=l[1][0],v=!1,x=!1;c>3&&(/^public$/i.test(l[2][0])?(v=l[3][0],x=c>4&&l[4][0]):/^system$/i.test(l[2][0])&&(x=l[3][0]));var D=l[c-1];return e.startDTD(f,v,x),e.endDTD(),D.index+D[0].length}}return-1}function $d(n,t,e){var i=n.indexOf("?>",t);if(i){var a=n.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return a?(a[0].length,e.processingInstruction(a[1],a[2]),i+2):-1}return-1}function Lh(){this.attributeNames={}}Lh.prototype={setTagName:function(n){if(!Oh.test(n))throw new Error("invalid tagName:"+n);this.tagName=n},addValue:function(n,t,e){if(!Oh.test(n))throw new Error("invalid attribute:"+n);this.attributeNames[n]=this.length,this[this.length++]={qName:n,value:t,offset:e}},length:0,getLocalName:function(n){return this[n].localName},getLocator:function(n){return this[n].locator},getQName:function(n){return this[n].qName},getURI:function(n){return this[n].uri},getValue:function(n){return this[n].value}};function Gd(n,t){var e,i=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(a.lastIndex=t,a.exec(n);e=a.exec(n);)if(i.push(e),e[1])return i}Yu.XMLReader=Nh,Yu.ParseError=Li;var Yd=tn,Xd=Tn,Rh=Ch,Ph=Yu,Zd=Xd.DOMImplementation,Fh=Yd.NAMESPACE,jd=Ph.ParseError,Qd=Ph.XMLReader;function kh(n){return n.replace(/\r[\n\u0085]/g,`
1
+ (function(le,kn){typeof exports=="object"&&typeof module<"u"?kn(exports):typeof define=="function"&&define.amd?define(["exports"],kn):(le=typeof globalThis<"u"?globalThis:le||self,kn(le.archgine={}))})(this,function(le){"use strict";const kn={name:"TinyEngine",containerId:"tinyEngine",canvas:"tinyEngine",width:0,height:0,aspect:1,dpr:1,alpha:!1,color:"#232323",fps:60,syncDelay:800,animateDuration:600,mergeRendering:!1,usedCache:!1,showPoints:!1,wireframe:!1,castShadow:!1,workerRender:!1,monitorDuration:1e4,light:{color:"#f2f2f2",position:[-6,6,0],castShadow:!0,shadowBlur:16},camera:{left:-1,right:1,top:1,bottom:-1,aspect:1,eye:[0,0,0],up:[0,0,1],helperEnable:!0},controls:{target:[0,0,0],minDistance:.1,maxDistance:1e3,enablePan:!0,enableRotate:!0,enableZoom:!0,focusMode:!0,autoRotate:!1,autoRotateSpeed:.5,enableDamping:!0,dampingFactor:.2},gridHelper:{fill:"#e3e3e3"},axesHelper:{},displayUnits:"",tooltip:!0,assetType:"rm",zoomToSelectEnable:!1,selectEnable:!1,multiSelectEnable:!1,socialDistanceEnable:!1,socialDistance:{radius:3}};function dh(r,t){const e=r.x*Math.cos(t)-r.y*Math.sin(t),n=r.y*Math.cos(t)+r.x*Math.sin(t);r.x=e,r.y=n}function Kd(r,t,e){r.x+=t,r.y+=e}function gh(r,t){r.x*=t,r.y*=t}class Hn{commands;constructor(t){this.commands=[],t&&t instanceof Hn?this.commands.push(...t.commands):t&&(this.commands=ig(t))}addPath(t){t&&t instanceof Hn&&this.commands.push(...t.commands)}moveTo(t,e){this.commands.push(["M",t,e])}lineTo(t,e){this.commands.push(["L",t,e])}arc(t,e,n,a,u,l){this.commands.push(["AC",t,e,n,a,u,!!l])}arcTo(t,e,n,a,u){this.commands.push(["AT",t,e,n,a,u])}ellipse(t,e,n,a,u,l,c,f){this.commands.push(["E",t,e,n,a,u,l,c,!!f])}closePath(){this.commands.push(["Z"])}bezierCurveTo(t,e,n,a,u,l){this.commands.push(["C",t,e,n,a,u,l])}quadraticCurveTo(t,e,n,a){this.commands.push(["Q",t,e,n,a])}rect(t,e,n,a){this.commands.push(["R",t,e,n,a])}roundRect(t,e,n,a,u){typeof u>"u"?this.commands.push(["RR",t,e,n,a,0]):this.commands.push(["RR",t,e,n,a,u])}}function Ku(r,t){let e=0,n=0,a,u,l,c,f,d,y,A,_,C,F,N,M,R,q,z,w,L,k,j,tt,Z=null,rt=null,J=null,st=null,ht=null,ct=null;r.beginPath();for(let ft=0;ft<t.length;++ft){L=t[ft][0],L!=="S"&&L!=="s"&&L!=="C"&&L!=="c"&&(Z=null,rt=null),L!=="T"&&L!=="t"&&L!=="Q"&&L!=="q"&&(J=null,st=null);let O;switch(L){case"m":case"M":O=t[ft],L==="m"?(e+=O[1],n+=O[2]):(e=O[1],n=O[2]),(L==="M"||!ht)&&(ht={x:e,y:n}),r.moveTo(e,n);break;case"l":O=t[ft],e+=O[1],n+=O[2],r.lineTo(e,n);break;case"L":O=t[ft],e=O[1],n=O[2],r.lineTo(e,n);break;case"H":O=t[ft],e=O[1],r.lineTo(e,n);break;case"h":O=t[ft],e+=O[1],r.lineTo(e,n);break;case"V":O=t[ft],n=O[1],r.lineTo(e,n);break;case"v":O=t[ft],n+=O[1],r.lineTo(e,n);break;case"a":case"A":if(O=t[ft],ct===null)throw new Error("This should never happen");L==="a"?(e+=O[6],n+=O[7]):(e=O[6],n=O[7]),R=O[1],q=O[2],y=O[3]*Math.PI/180,l=!!O[4],c=!!O[5],f={x:e,y:n},d={x:(ct.x-f.x)/2,y:(ct.y-f.y)/2},dh(d,-y),A=d.x*d.x/(R*R)+d.y*d.y/(q*q),A>1&&(A=Math.sqrt(A),R*=A,q*=A),k={x:R*d.y/q,y:-(q*d.x)/R},_=R*R*q*q,C=R*R*d.y*d.y+q*q*d.x*d.x,c!==l?gh(k,Math.sqrt((_-C)/C)||0):gh(k,-Math.sqrt((_-C)/C)||0),u=Math.atan2((d.y-k.y)/q,(d.x-k.x)/R),a=Math.atan2(-(d.y+k.y)/q,-(d.x+k.x)/R),dh(k,y),Kd(k,(f.x+ct.x)/2,(f.y+ct.y)/2),r.save(),r.translate(k.x,k.y),r.rotate(y),r.scale(R,q),r.arc(0,0,1,u,a,!c),r.restore();break;case"C":O=t[ft],Z=O[3],rt=O[4],e=O[5],n=O[6],r.bezierCurveTo(O[1],O[2],Z,rt,e,n);break;case"c":O=t[ft],r.bezierCurveTo(O[1]+e,O[2]+n,O[3]+e,O[4]+n,O[5]+e,O[6]+n),Z=O[3]+e,rt=O[4]+n,e+=O[5],n+=O[6];break;case"S":O=t[ft],(Z===null||rt===null)&&(Z=e,rt=n),r.bezierCurveTo(2*e-Z,2*n-rt,O[1],O[2],O[3],O[4]),Z=O[1],rt=O[2],e=O[3],n=O[4];break;case"s":O=t[ft],(Z===null||rt===null)&&(Z=e,rt=n),r.bezierCurveTo(2*e-Z,2*n-rt,O[1]+e,O[2]+n,O[3]+e,O[4]+n),Z=O[1]+e,rt=O[2]+n,e+=O[3],n+=O[4];break;case"Q":O=t[ft],J=O[1],st=O[2],e=O[3],n=O[4],r.quadraticCurveTo(J,st,e,n);break;case"q":O=t[ft],J=O[1]+e,st=O[2]+n,e+=O[3],n+=O[4],r.quadraticCurveTo(J,st,e,n);break;case"T":O=t[ft],(J===null||st===null)&&(J=e,st=n),J=2*e-J,st=2*n-st,e=O[1],n=O[2],r.quadraticCurveTo(J,st,e,n);break;case"t":O=t[ft],(J===null||st===null)&&(J=e,st=n),J=2*e-J,st=2*n-st,e+=O[1],n+=O[2],r.quadraticCurveTo(J,st,e,n);break;case"z":case"Z":ht&&(e=ht.x,n=ht.y),ht=null,r.closePath();break;case"AC":O=t[ft],e=O[1],n=O[2],M=O[3],u=O[4],a=O[5],j=O[6],r.arc(e,n,M,u,a,j);break;case"AT":O=t[ft],F=O[1],N=O[2],e=O[3],n=O[4],M=O[5],r.arcTo(F,N,e,n,M);break;case"E":O=t[ft],e=O[1],n=O[2],R=O[3],q=O[4],y=O[5],u=O[6],a=O[7],j=O[8],r.save(),r.translate(e,n),r.rotate(y),r.scale(R,q),r.arc(0,0,1,u,a,j),r.restore();break;case"R":O=t[ft],e=O[1],n=O[2],z=O[3],w=O[4],ht={x:e,y:n},r.rect(e,n,z,w);break;case"RR":O=t[ft],e=O[1],n=O[2],z=O[3],w=O[4],tt=O[5],ht={x:e,y:n},r.roundRect(e,n,z,w,tt);break}ct?(ct.x=e,ct.y=n):ct={x:e,y:n}}}function Jd(r){if(!r||!r.CanvasRenderingContext2D||r.Path2D)return;const{CanvasRenderingContext2D:t}=r,e=t==null?void 0:t.prototype.fill,n=t==null?void 0:t.prototype.stroke,a=t==null?void 0:t.prototype.isPointInPath;t.prototype.fill=function(...l){if(l[0]instanceof Hn){const c=l[0],f=l[1]||"nonzero";Ku(this,c.commands),e.apply(this,[f])}else{const c=l[0]||"nonzero";return e.apply(this,[c])}},t.prototype.stroke=function(l){l&&Ku(this,l.commands),n.apply(this)},t.prototype.isPointInPath=function(...l){if(l[0]instanceof Hn){const c=l[0],f=l[1],d=l[2],y=l[3]||"nonzero";return Ku(this,c.commands),a.apply(this,[f,d,y])}else return a.apply(this,l)},r.Path2D=Hn}const Ss={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},tg=/([astvzqmhlc])([^astvzqmhlc]*)/gi,eg=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function rg(r){const t=r.match(eg);return t?t.map(Number):[]}function ig(r){const t=[],e=String(r).trim();return e[0]!=="M"&&e[0]!=="m"||e.replace(tg,(n,a,u)=>{const l=rg(u);let c=a.toLowerCase(),f=a;if(c==="m"&&l.length>2&&(t.push([f,...l.splice(0,2)]),c="l",f=f==="m"?"l":"L"),l.length<Ss[c])return"";for(t.push([f,...l.splice(0,Ss[c])]);l.length>=Ss[c]&&l.length&&Ss[c];)t.push([f,...l.splice(0,Ss[c])]);return""}),t}var Os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yh(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Pi={},hi={};function ng(r,t,e){if(e===void 0&&(e=Array.prototype),r&&typeof e.find=="function")return e.find.call(r,t);for(var n=0;n<r.length;n++)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n];if(t.call(void 0,a,n,r))return a}}function Ju(r,t){return t===void 0&&(t=Object),t&&typeof t.freeze=="function"?t.freeze(r):r}function sg(r,t){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e]);return r}var vh=Ju({HTML:"text/html",isHTML:function(r){return r===vh.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),mh=Ju({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(r){return r===mh.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});hi.assign=sg,hi.find=ng,hi.freeze=Ju,hi.MIME_TYPE=vh,hi.NAMESPACE=mh;var xh=hi,Xr=xh.find,Ns=xh.NAMESPACE;function ag(r){return r!==""}function ug(r){return r?r.split(/[\t\n\f\r ]+/).filter(ag):[]}function og(r,t){return r.hasOwnProperty(t)||(r[t]=!0),r}function Eh(r){if(!r)return[];var t=ug(r);return Object.keys(t.reduce(og,{}))}function lg(r){return function(t){return r&&r.indexOf(t)!==-1}}function Ms(r,t){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}function He(r,t){var e=r.prototype;if(!(e instanceof t)){let n=function(){};n.prototype=t.prototype,n=new n,Ms(e,n),r.prototype=e=n}e.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),e.constructor=r)}var qe={},Nr=qe.ELEMENT_NODE=1,qn=qe.ATTRIBUTE_NODE=2,Ma=qe.TEXT_NODE=3,Ah=qe.CDATA_SECTION_NODE=4,bh=qe.ENTITY_REFERENCE_NODE=5,hg=qe.ENTITY_NODE=6,wh=qe.PROCESSING_INSTRUCTION_NODE=7,Th=qe.COMMENT_NODE=8,_h=qe.DOCUMENT_NODE=9,Ch=qe.DOCUMENT_TYPE_NODE=10,ci=qe.DOCUMENT_FRAGMENT_NODE=11,cg=qe.NOTATION_NODE=12,_e={},ge={};_e.INDEX_SIZE_ERR=(ge[1]="Index size error",1),_e.DOMSTRING_SIZE_ERR=(ge[2]="DOMString size error",2);var We=_e.HIERARCHY_REQUEST_ERR=(ge[3]="Hierarchy request error",3);_e.WRONG_DOCUMENT_ERR=(ge[4]="Wrong document",4),_e.INVALID_CHARACTER_ERR=(ge[5]="Invalid character",5),_e.NO_DATA_ALLOWED_ERR=(ge[6]="No data allowed",6),_e.NO_MODIFICATION_ALLOWED_ERR=(ge[7]="No modification allowed",7);var Dh=_e.NOT_FOUND_ERR=(ge[8]="Not found",8);_e.NOT_SUPPORTED_ERR=(ge[9]="Not supported",9);var Sh=_e.INUSE_ATTRIBUTE_ERR=(ge[10]="Attribute in use",10);_e.INVALID_STATE_ERR=(ge[11]="Invalid state",11),_e.SYNTAX_ERR=(ge[12]="Syntax error",12),_e.INVALID_MODIFICATION_ERR=(ge[13]="Invalid modification",13),_e.NAMESPACE_ERR=(ge[14]="Invalid namespace",14),_e.INVALID_ACCESS_ERR=(ge[15]="Invalid access",15);function Kt(r,t){if(t instanceof Error)var e=t;else e=this,Error.call(this,ge[r]),this.message=ge[r],Error.captureStackTrace&&Error.captureStackTrace(this,Kt);return e.code=r,t&&(this.message=this.message+": "+t),e}Kt.prototype=Error.prototype,Ms(_e,Kt);function fi(){}fi.prototype={length:0,item:function(r){return r>=0&&r<this.length?this[r]:null},toString:function(r,t){for(var e=[],n=0;n<this.length;n++)Vn(this[n],e,r,t);return e.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};function Wn(r,t){this._node=r,this._refresh=t,to(this)}function to(r){var t=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==t){var e=r._refresh(r._node);if(zh(r,"length",e.length),!r.$$length||e.length<r.$$length)for(var n=e.length;n in r;n++)Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];Ms(e,r),r._inc=t}}Wn.prototype.item=function(r){return to(this),this[r]||null},He(Wn,fi);function Ba(){}function Oh(r,t){for(var e=r.length;e--;)if(r[e]===t)return e}function Nh(r,t,e,n){if(n?t[Oh(t,n)]=e:t[t.length++]=e,r){e.ownerElement=r;var a=r.ownerDocument;a&&(n&&Rh(a,r,n),fg(a,r,e))}}function Mh(r,t,e){var n=Oh(t,e);if(n>=0){for(var a=t.length-1;n<a;)t[n]=t[++n];if(t.length=a,r){var u=r.ownerDocument;u&&(Rh(u,r,e),e.ownerElement=null)}}else throw new Kt(Dh,new Error(r.tagName+"@"+e))}Ba.prototype={length:0,item:fi.prototype.item,getNamedItem:function(r){for(var t=this.length;t--;){var e=this[t];if(e.nodeName==r)return e}},setNamedItem:function(r){var t=r.ownerElement;if(t&&t!=this._ownerElement)throw new Kt(Sh);var e=this.getNamedItem(r.nodeName);return Nh(this._ownerElement,this,r,e),e},setNamedItemNS:function(r){var t=r.ownerElement,e;if(t&&t!=this._ownerElement)throw new Kt(Sh);return e=this.getNamedItemNS(r.namespaceURI,r.localName),Nh(this._ownerElement,this,r,e),e},removeNamedItem:function(r){var t=this.getNamedItem(r);return Mh(this._ownerElement,this,t),t},removeNamedItemNS:function(r,t){var e=this.getNamedItemNS(r,t);return Mh(this._ownerElement,this,e),e},getNamedItemNS:function(r,t){for(var e=this.length;e--;){var n=this[e];if(n.localName==t&&n.namespaceURI==r)return n}return null}};function Bh(){}Bh.prototype={hasFeature:function(r,t){return!0},createDocument:function(r,t,e){var n=new Is;if(n.implementation=this,n.childNodes=new fi,n.doctype=e||null,e&&n.appendChild(e),t){var a=n.createElementNS(r,t);n.appendChild(a)}return n},createDocumentType:function(r,t,e){var n=new La;return n.name=r,n.nodeName=r,n.publicId=t||"",n.systemId=e||"",n}};function Rt(){}Rt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(r,t){return Ia(this,r,t)},replaceChild:function(r,t){Ia(this,r,t,Uh),t&&this.removeChild(t)},removeChild:function(r){return Lh(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return lo(this.ownerDocument||this,this,r)},normalize:function(){for(var r=this.firstChild;r;){var t=r.nextSibling;t&&t.nodeType==Ma&&r.nodeType==Ma?(this.removeChild(t),r.appendData(t.data)):(r.normalize(),r=t)}},isSupported:function(r,t){return this.ownerDocument.implementation.hasFeature(r,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(r){for(var t=this;t;){var e=t._nsMap;if(e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&e[n]===r)return n}t=t.nodeType==qn?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(r){for(var t=this;t;){var e=t._nsMap;if(e&&Object.prototype.hasOwnProperty.call(e,r))return e[r];t=t.nodeType==qn?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(r){var t=this.lookupPrefix(r);return t==null}};function Ih(r){return r=="<"&&"&lt;"||r==">"&&"&gt;"||r=="&"&&"&amp;"||r=='"'&&"&quot;"||"&#"+r.charCodeAt()+";"}Ms(qe,Rt),Ms(qe,Rt.prototype);function Bs(r,t){if(t(r))return!0;if(r=r.firstChild)do if(Bs(r,t))return!0;while(r=r.nextSibling)}function Is(){this.ownerDocument=this}function fg(r,t,e){r&&r._inc++;var n=e.namespaceURI;n===Ns.XMLNS&&(t._nsMap[e.prefix?e.localName:""]=e.value)}function Rh(r,t,e,n){r&&r._inc++;var a=e.namespaceURI;a===Ns.XMLNS&&delete t._nsMap[e.prefix?e.localName:""]}function eo(r,t,e){if(r&&r._inc){r._inc++;var n=t.childNodes;if(e)n[n.length++]=e;else{for(var a=t.firstChild,u=0;a;)n[u++]=a,a=a.nextSibling;n.length=u,delete n[n.length]}}}function Lh(r,t){var e=t.previousSibling,n=t.nextSibling;return e?e.nextSibling=n:r.firstChild=n,n?n.previousSibling=e:r.lastChild=e,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,eo(r.ownerDocument,r),t}function pg(r){return r&&(r.nodeType===Rt.DOCUMENT_NODE||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.ELEMENT_NODE)}function dg(r){return r&&(Zr(r)||ro(r)||pi(r)||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.COMMENT_NODE||r.nodeType===Rt.PROCESSING_INSTRUCTION_NODE)}function pi(r){return r&&r.nodeType===Rt.DOCUMENT_TYPE_NODE}function Zr(r){return r&&r.nodeType===Rt.ELEMENT_NODE}function ro(r){return r&&r.nodeType===Rt.TEXT_NODE}function Ph(r,t){var e=r.childNodes||[];if(Xr(e,Zr)||pi(t))return!1;var n=Xr(e,pi);return!(t&&n&&e.indexOf(n)>e.indexOf(t))}function Fh(r,t){var e=r.childNodes||[];function n(u){return Zr(u)&&u!==t}if(Xr(e,n))return!1;var a=Xr(e,pi);return!(t&&a&&e.indexOf(a)>e.indexOf(t))}function gg(r,t,e){if(!pg(r))throw new Kt(We,"Unexpected parent node type "+r.nodeType);if(e&&e.parentNode!==r)throw new Kt(Dh,"child not in parent");if(!dg(t)||pi(t)&&r.nodeType!==Rt.DOCUMENT_NODE)throw new Kt(We,"Unexpected node type "+t.nodeType+" for parent node type "+r.nodeType)}function yg(r,t,e){var n=r.childNodes||[],a=t.childNodes||[];if(t.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var u=a.filter(Zr);if(u.length>1||Xr(a,ro))throw new Kt(We,"More than one element or text in fragment");if(u.length===1&&!Ph(r,e))throw new Kt(We,"Element in fragment can not be inserted before doctype")}if(Zr(t)&&!Ph(r,e))throw new Kt(We,"Only one element can be added and only after doctype");if(pi(t)){if(Xr(n,pi))throw new Kt(We,"Only one doctype is allowed");var l=Xr(n,Zr);if(e&&n.indexOf(l)<n.indexOf(e))throw new Kt(We,"Doctype can only be inserted before an element");if(!e&&l)throw new Kt(We,"Doctype can not be appended since element is present")}}function Uh(r,t,e){var n=r.childNodes||[],a=t.childNodes||[];if(t.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var u=a.filter(Zr);if(u.length>1||Xr(a,ro))throw new Kt(We,"More than one element or text in fragment");if(u.length===1&&!Fh(r,e))throw new Kt(We,"Element in fragment can not be inserted before doctype")}if(Zr(t)&&!Fh(r,e))throw new Kt(We,"Only one element can be added and only after doctype");if(pi(t)){if(Xr(n,function(f){return pi(f)&&f!==e}))throw new Kt(We,"Only one doctype is allowed");var l=Xr(n,Zr);if(e&&n.indexOf(l)<n.indexOf(e))throw new Kt(We,"Doctype can only be inserted before an element")}}function Ia(r,t,e,n){gg(r,t,e),r.nodeType===Rt.DOCUMENT_NODE&&(n||yg)(r,t,e);var a=t.parentNode;if(a&&a.removeChild(t),t.nodeType===ci){var u=t.firstChild;if(u==null)return t;var l=t.lastChild}else u=l=t;var c=e?e.previousSibling:r.lastChild;u.previousSibling=c,l.nextSibling=e,c?c.nextSibling=u:r.firstChild=u,e==null?r.lastChild=l:e.previousSibling=l;do u.parentNode=r;while(u!==l&&(u=u.nextSibling));return eo(r.ownerDocument||r,r),t.nodeType==ci&&(t.firstChild=t.lastChild=null),t}function vg(r,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=r,t.previousSibling=r.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:r.firstChild=t,r.lastChild=t,eo(r.ownerDocument,r,t),t}Is.prototype={nodeName:"#document",nodeType:_h,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,t){if(r.nodeType==ci){for(var e=r.firstChild;e;){var n=e.nextSibling;this.insertBefore(e,t),e=n}return r}return Ia(this,r,t),r.ownerDocument=this,this.documentElement===null&&r.nodeType===Nr&&(this.documentElement=r),r},removeChild:function(r){return this.documentElement==r&&(this.documentElement=null),Lh(this,r)},replaceChild:function(r,t){Ia(this,r,t,Uh),r.ownerDocument=this,t&&this.removeChild(t),Zr(r)&&(this.documentElement=r)},importNode:function(r,t){return $h(this,r,t)},getElementById:function(r){var t=null;return Bs(this.documentElement,function(e){if(e.nodeType==Nr&&e.getAttribute("id")==r)return t=e,!0}),t},getElementsByClassName:function(r){var t=Eh(r);return new Wn(this,function(e){var n=[];return t.length>0&&Bs(e.documentElement,function(a){if(a!==e&&a.nodeType===Nr){var u=a.getAttribute("class");if(u){var l=r===u;if(!l){var c=Eh(u);l=t.every(lg(c))}l&&n.push(a)}}}),n})},createElement:function(r){var t=new cn;t.ownerDocument=this,t.nodeName=r,t.tagName=r,t.localName=r,t.childNodes=new fi;var e=t.attributes=new Ba;return e._ownerElement=t,t},createDocumentFragment:function(){var r=new Pa;return r.ownerDocument=this,r.childNodes=new fi,r},createTextNode:function(r){var t=new io;return t.ownerDocument=this,t.appendData(r),t},createComment:function(r){var t=new no;return t.ownerDocument=this,t.appendData(r),t},createCDATASection:function(r){var t=new so;return t.ownerDocument=this,t.appendData(r),t},createProcessingInstruction:function(r,t){var e=new uo;return e.ownerDocument=this,e.tagName=e.nodeName=e.target=r,e.nodeValue=e.data=t,e},createAttribute:function(r){var t=new Ra;return t.ownerDocument=this,t.name=r,t.nodeName=r,t.localName=r,t.specified=!0,t},createEntityReference:function(r){var t=new ao;return t.ownerDocument=this,t.nodeName=r,t},createElementNS:function(r,t){var e=new cn,n=t.split(":"),a=e.attributes=new Ba;return e.childNodes=new fi,e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.namespaceURI=r,n.length==2?(e.prefix=n[0],e.localName=n[1]):e.localName=t,a._ownerElement=e,e},createAttributeNS:function(r,t){var e=new Ra,n=t.split(":");return e.ownerDocument=this,e.nodeName=t,e.name=t,e.namespaceURI=r,e.specified=!0,n.length==2?(e.prefix=n[0],e.localName=n[1]):e.localName=t,e}},He(Is,Rt);function cn(){this._nsMap={}}cn.prototype={nodeType:Nr,hasAttribute:function(r){return this.getAttributeNode(r)!=null},getAttribute:function(r){var t=this.getAttributeNode(r);return t&&t.value||""},getAttributeNode:function(r){return this.attributes.getNamedItem(r)},setAttribute:function(r,t){var e=this.ownerDocument.createAttribute(r);e.value=e.nodeValue=""+t,this.setAttributeNode(e)},removeAttribute:function(r){var t=this.getAttributeNode(r);t&&this.removeAttributeNode(t)},appendChild:function(r){return r.nodeType===ci?this.insertBefore(r,null):vg(this,r)},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,t){var e=this.getAttributeNodeNS(r,t);e&&this.removeAttributeNode(e)},hasAttributeNS:function(r,t){return this.getAttributeNodeNS(r,t)!=null},getAttributeNS:function(r,t){var e=this.getAttributeNodeNS(r,t);return e&&e.value||""},setAttributeNS:function(r,t,e){var n=this.ownerDocument.createAttributeNS(r,t);n.value=n.nodeValue=""+e,this.setAttributeNode(n)},getAttributeNodeNS:function(r,t){return this.attributes.getNamedItemNS(r,t)},getElementsByTagName:function(r){return new Wn(this,function(t){var e=[];return Bs(t,function(n){n!==t&&n.nodeType==Nr&&(r==="*"||n.tagName==r)&&e.push(n)}),e})},getElementsByTagNameNS:function(r,t){return new Wn(this,function(e){var n=[];return Bs(e,function(a){a!==e&&a.nodeType===Nr&&(r==="*"||a.namespaceURI===r)&&(t==="*"||a.localName==t)&&n.push(a)}),n})}},Is.prototype.getElementsByTagName=cn.prototype.getElementsByTagName,Is.prototype.getElementsByTagNameNS=cn.prototype.getElementsByTagNameNS,He(cn,Rt);function Ra(){}Ra.prototype.nodeType=qn,He(Ra,Rt);function Rs(){}Rs.prototype={data:"",substringData:function(r,t){return this.data.substring(r,r+t)},appendData:function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},insertData:function(r,t){this.replaceData(r,0,t)},appendChild:function(r){throw new Error(ge[We])},deleteData:function(r,t){this.replaceData(r,t,"")},replaceData:function(r,t,e){var n=this.data.substring(0,r),a=this.data.substring(r+t);e=n+e+a,this.nodeValue=this.data=e,this.length=e.length}},He(Rs,Rt);function io(){}io.prototype={nodeName:"#text",nodeType:Ma,splitText:function(r){var t=this.data,e=t.substring(r);t=t.substring(0,r),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(e);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},He(io,Rs);function no(){}no.prototype={nodeName:"#comment",nodeType:Th},He(no,Rs);function so(){}so.prototype={nodeName:"#cdata-section",nodeType:Ah},He(so,Rs);function La(){}La.prototype.nodeType=Ch,He(La,Rt);function kh(){}kh.prototype.nodeType=cg,He(kh,Rt);function Hh(){}Hh.prototype.nodeType=hg,He(Hh,Rt);function ao(){}ao.prototype.nodeType=bh,He(ao,Rt);function Pa(){}Pa.prototype.nodeName="#document-fragment",Pa.prototype.nodeType=ci,He(Pa,Rt);function uo(){}uo.prototype.nodeType=wh,He(uo,Rt);function qh(){}qh.prototype.serializeToString=function(r,t,e){return Wh.call(r,t,e)},Rt.prototype.toString=Wh;function Wh(r,t){var e=[],n=this.nodeType==9&&this.documentElement||this,a=n.prefix,u=n.namespaceURI;if(u&&a==null){var a=n.lookupPrefix(u);if(a==null)var l=[{namespace:u,prefix:null}]}return Vn(this,e,r,t,l),e.join("")}function Vh(r,t,e){var n=r.prefix||"",a=r.namespaceURI;if(!a||n==="xml"&&a===Ns.XML||a===Ns.XMLNS)return!1;for(var u=e.length;u--;){var l=e[u];if(l.prefix===n)return l.namespace!==a}return!0}function oo(r,t,e){r.push(" ",t,'="',e.replace(/[<>&"\t\n\r]/g,Ih),'"')}function Vn(r,t,e,n,a){if(a||(a=[]),n)if(r=n(r),r){if(typeof r=="string"){t.push(r);return}}else return;switch(r.nodeType){case Nr:var u=r.attributes,l=u.length,R=r.firstChild,c=r.tagName;e=Ns.isHTML(r.namespaceURI)||e;var f=c;if(!e&&!r.prefix&&r.namespaceURI){for(var d,y=0;y<u.length;y++)if(u.item(y).name==="xmlns"){d=u.item(y).value;break}if(!d)for(var A=a.length-1;A>=0;A--){var _=a[A];if(_.prefix===""&&_.namespace===r.namespaceURI){d=_.namespace;break}}if(d!==r.namespaceURI)for(var A=a.length-1;A>=0;A--){var _=a[A];if(_.namespace===r.namespaceURI){_.prefix&&(f=_.prefix+":"+c);break}}}t.push("<",f);for(var C=0;C<l;C++){var F=u.item(C);F.prefix=="xmlns"?a.push({prefix:F.localName,namespace:F.value}):F.nodeName=="xmlns"&&a.push({prefix:"",namespace:F.value})}for(var C=0;C<l;C++){var F=u.item(C);if(Vh(F,e,a)){var N=F.prefix||"",M=F.namespaceURI;oo(t,N?"xmlns:"+N:"xmlns",M),a.push({prefix:N,namespace:M})}Vn(F,t,e,n,a)}if(c===f&&Vh(r,e,a)){var N=r.prefix||"",M=r.namespaceURI;oo(t,N?"xmlns:"+N:"xmlns",M),a.push({prefix:N,namespace:M})}if(R||e&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),e&&/^script$/i.test(c))for(;R;)R.data?t.push(R.data):Vn(R,t,e,n,a.slice()),R=R.nextSibling;else for(;R;)Vn(R,t,e,n,a.slice()),R=R.nextSibling;t.push("</",f,">")}else t.push("/>");return;case _h:case ci:for(var R=r.firstChild;R;)Vn(R,t,e,n,a.slice()),R=R.nextSibling;return;case qn:return oo(t,r.name,r.value);case Ma:return t.push(r.data.replace(/[<&>]/g,Ih));case Ah:return t.push("<![CDATA[",r.data,"]]>");case Th:return t.push("<!--",r.data,"-->");case Ch:var q=r.publicId,z=r.systemId;if(t.push("<!DOCTYPE ",r.name),q)t.push(" PUBLIC ",q),z&&z!="."&&t.push(" ",z),t.push(">");else if(z&&z!=".")t.push(" SYSTEM ",z,">");else{var w=r.internalSubset;w&&t.push(" [",w,"]"),t.push(">")}return;case wh:return t.push("<?",r.target," ",r.data,"?>");case bh:return t.push("&",r.nodeName,";");default:t.push("??",r.nodeName)}}function $h(r,t,e){var n;switch(t.nodeType){case Nr:n=t.cloneNode(!1),n.ownerDocument=r;case ci:break;case qn:e=!0;break}if(n||(n=t.cloneNode(!1)),n.ownerDocument=r,n.parentNode=null,e)for(var a=t.firstChild;a;)n.appendChild($h(r,a,e)),a=a.nextSibling;return n}function lo(r,t,e){var n=new t.constructor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var u=t[a];typeof u!="object"&&u!=n[a]&&(n[a]=u)}switch(t.childNodes&&(n.childNodes=new fi),n.ownerDocument=r,n.nodeType){case Nr:var l=t.attributes,c=n.attributes=new Ba,f=l.length;c._ownerElement=n;for(var d=0;d<f;d++)n.setAttributeNode(lo(r,l.item(d),!0));break;case qn:e=!0}if(e)for(var y=t.firstChild;y;)n.appendChild(lo(r,y,e)),y=y.nextSibling;return n}function zh(r,t,e){r[t]=e}try{if(Object.defineProperty){let r=function(t){switch(t.nodeType){case Nr:case ci:var e=[];for(t=t.firstChild;t;)t.nodeType!==7&&t.nodeType!==8&&e.push(r(t)),t=t.nextSibling;return e.join("");default:return t.nodeValue}};Object.defineProperty(Wn.prototype,"length",{get:function(){return to(this),this.$$length}}),Object.defineProperty(Rt.prototype,"textContent",{get:function(){return r(this)},set:function(t){switch(this.nodeType){case Nr:case ci:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),zh=function(t,e,n){t["$$"+e]=n}}}catch{}Pi.DocumentType=La,Pi.DOMException=Kt,Pi.DOMImplementation=Bh,Pi.Element=cn,Pi.Node=Rt,Pi.NodeList=fi,Pi.XMLSerializer=qh;var Fa={},Gh={};(function(r){var t=hi.freeze;r.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
2
+ `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),r.entityMap=r.HTML_ENTITIES})(Gh);var ho={},Ls=hi.NAMESPACE,co=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Yh=new RegExp("[\\-\\.0-9"+co.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Xh=new RegExp("^"+co.source+Yh.source+"*(?::"+co.source+Yh.source+"*)?$"),Ps=0,Fi=1,$n=2,Fs=3,zn=4,Gn=5,Us=6,Ua=7;function Yn(r,t){this.message=r,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Yn)}Yn.prototype=new Error,Yn.prototype.name=Yn.name;function Zh(){}Zh.prototype={parse:function(r,t,e){var n=this.domBuilder;n.startDocument(),Kh(t,t={}),mg(r,t,e,n,this.errorHandler),n.endDocument()}};function mg(r,t,e,n,a){function u(O){if(O>65535){O-=65536;var yt=55296+(O>>10),Bt=56320+(O&1023);return String.fromCharCode(yt,Bt)}else return String.fromCharCode(O)}function l(O){var yt=O.slice(1,-1);return Object.hasOwnProperty.call(e,yt)?e[yt]:yt.charAt(0)==="#"?u(parseInt(yt.substr(1).replace("x","0x"))):(a.error("entity not found:"+O),O)}function c(O){if(O>N){var yt=r.substring(N,O).replace(/&#?\w+;/g,l);_&&f(N),n.characters(yt,0,O-N),N=O}}function f(O,yt){for(;O>=y&&(yt=A.exec(r));)d=yt.index,y=d+yt[0].length,_.lineNumber++;_.columnNumber=O-d+1}for(var d=0,y=0,A=/.*(?:\r\n?|\n)|.*$/g,_=n.locator,C=[{currentNSMap:t}],F={},N=0;;){try{var M=r.indexOf("<",N);if(M<0){if(!r.substr(N).match(/^\s*$/)){var R=n.doc,q=R.createTextNode(r.substr(N));R.appendChild(q),n.currentElement=q}return}switch(M>N&&c(M),r.charAt(M+1)){case"/":var J=r.indexOf(">",M+3),z=r.substring(M+2,J).replace(/[ \t\n\r]+$/g,""),w=C.pop();J<0?(z=r.substring(M+2).replace(/[\s<].*/,""),a.error("end tag name: "+z+" is not complete:"+w.tagName),J=M+1+z.length):z.match(/\s</)&&(z=z.replace(/[\s<].*/,""),a.error("end tag name: "+z+" maybe not complete"),J=M+1+z.length);var L=w.localNSMap,k=w.tagName==z,j=k||w.tagName&&w.tagName.toLowerCase()==z.toLowerCase();if(j){if(n.endElement(w.uri,w.localName,z),L)for(var tt in L)Object.prototype.hasOwnProperty.call(L,tt)&&n.endPrefixMapping(tt);k||a.fatalError("end tag name: "+z+" is not match the current start tagName:"+w.tagName)}else C.push(w);J++;break;case"?":_&&f(M),J=wg(r,M,n);break;case"!":_&&f(M),J=bg(r,M,n,a);break;default:_&&f(M);var Z=new Jh,rt=C[C.length-1].currentNSMap,J=xg(r,M,Z,rt,l,a),st=Z.length;if(!Z.closed&&Ag(r,J,Z.tagName,F)&&(Z.closed=!0,e.nbsp||a.warning("unclosed xml attribute")),_&&st){for(var ht=Qh(_,{}),ct=0;ct<st;ct++){var ft=Z[ct];f(ft.offset),ft.locator=Qh(_,{})}n.locator=ht,jh(Z,n,rt)&&C.push(Z),n.locator=_}else jh(Z,n,rt)&&C.push(Z);Ls.isHTML(Z.uri)&&!Z.closed?J=Eg(r,J,Z.tagName,l,n):J++}}catch(O){if(O instanceof Yn)throw O;a.error("element parse error: "+O),J=-1}J>N?N=J:c(Math.max(M,N)+1)}}function Qh(r,t){return t.lineNumber=r.lineNumber,t.columnNumber=r.columnNumber,t}function xg(r,t,e,n,a,u){function l(_,C,F){e.attributeNames.hasOwnProperty(_)&&u.fatalError("Attribute "+_+" redefined"),e.addValue(_,C.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),F)}for(var c,f,d=++t,y=Ps;;){var A=r.charAt(d);switch(A){case"=":if(y===Fi)c=r.slice(t,d),y=Fs;else if(y===$n)y=Fs;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(y===Fs||y===Fi)if(y===Fi&&(u.warning('attribute value must after "="'),c=r.slice(t,d)),t=d+1,d=r.indexOf(A,t),d>0)f=r.slice(t,d),l(c,f,t-1),y=Gn;else throw new Error("attribute value no end '"+A+"' match");else if(y==zn)f=r.slice(t,d),l(c,f,t),u.warning('attribute "'+c+'" missed start quot('+A+")!!"),t=d+1,y=Gn;else throw new Error('attribute value must after "="');break;case"/":switch(y){case Ps:e.setTagName(r.slice(t,d));case Gn:case Us:case Ua:y=Ua,e.closed=!0;case zn:case Fi:break;case $n:e.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return u.error("unexpected end of input"),y==Ps&&e.setTagName(r.slice(t,d)),d;case">":switch(y){case Ps:e.setTagName(r.slice(t,d));case Gn:case Us:case Ua:break;case zn:case Fi:f=r.slice(t,d),f.slice(-1)==="/"&&(e.closed=!0,f=f.slice(0,-1));case $n:y===$n&&(f=c),y==zn?(u.warning('attribute "'+f+'" missed quot(")!'),l(c,f,t)):((!Ls.isHTML(n[""])||!f.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+f+'" missed value!! "'+f+'" instead!!'),l(f,f,t));break;case Fs:throw new Error("attribute value missed!!")}return d;case"€":A=" ";default:if(A<=" ")switch(y){case Ps:e.setTagName(r.slice(t,d)),y=Us;break;case Fi:c=r.slice(t,d),y=$n;break;case zn:var f=r.slice(t,d);u.warning('attribute "'+f+'" missed quot(")!!'),l(c,f,t);case Gn:y=Us;break}else switch(y){case $n:e.tagName,(!Ls.isHTML(n[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),l(c,c,t),t=d,y=Fi;break;case Gn:u.warning('attribute space is required"'+c+'"!!');case Us:y=Fi,t=d;break;case Fs:y=zn,t=d;break;case Ua:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function jh(r,t,e){for(var n=r.tagName,a=null,A=r.length;A--;){var u=r[A],l=u.qName,c=u.value,_=l.indexOf(":");if(_>0)var f=u.prefix=l.slice(0,_),d=l.slice(_+1),y=f==="xmlns"&&d;else d=l,f=null,y=l==="xmlns"&&"";u.localName=d,y!==!1&&(a==null&&(a={},Kh(e,e={})),e[y]=a[y]=c,u.uri=Ls.XMLNS,t.startPrefixMapping(y,c))}for(var A=r.length;A--;){u=r[A];var f=u.prefix;f&&(f==="xml"&&(u.uri=Ls.XML),f!=="xmlns"&&(u.uri=e[f||""]))}var _=n.indexOf(":");_>0?(f=r.prefix=n.slice(0,_),d=r.localName=n.slice(_+1)):(f=null,d=r.localName=n);var C=r.uri=e[f||""];if(t.startElement(C,d,n,r),r.closed){if(t.endElement(C,d,n),a)for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&t.endPrefixMapping(f)}else return r.currentNSMap=e,r.localNSMap=a,!0}function Eg(r,t,e,n,a){if(/^(?:script|textarea)$/i.test(e)){var u=r.indexOf("</"+e+">",t),l=r.substring(t+1,u);if(/[&<]/.test(l))return/^script$/i.test(e)?(a.characters(l,0,l.length),u):(l=l.replace(/&#?\w+;/g,n),a.characters(l,0,l.length),u)}return t+1}function Ag(r,t,e,n){var a=n[e];return a==null&&(a=r.lastIndexOf("</"+e+">"),a<t&&(a=r.lastIndexOf("</"+e)),n[e]=a),a<t}function Kh(r,t){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}function bg(r,t,e,n){var a=r.charAt(t+2);switch(a){case"-":if(r.charAt(t+3)==="-"){var u=r.indexOf("-->",t+4);return u>t?(e.comment(r,t+4,u-t-4),u+3):(n.error("Unclosed comment"),-1)}else return-1;default:if(r.substr(t+3,6)=="CDATA["){var u=r.indexOf("]]>",t+9);return e.startCDATA(),e.characters(r,t+9,u-t-9),e.endCDATA(),u+3}var l=Tg(r,t),c=l.length;if(c>1&&/!doctype/i.test(l[0][0])){var f=l[1][0],d=!1,y=!1;c>3&&(/^public$/i.test(l[2][0])?(d=l[3][0],y=c>4&&l[4][0]):/^system$/i.test(l[2][0])&&(y=l[3][0]));var A=l[c-1];return e.startDTD(f,d,y),e.endDTD(),A.index+A[0].length}}return-1}function wg(r,t,e){var n=r.indexOf("?>",t);if(n){var a=r.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return a?(a[0].length,e.processingInstruction(a[1],a[2]),n+2):-1}return-1}function Jh(){this.attributeNames={}}Jh.prototype={setTagName:function(r){if(!Xh.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},addValue:function(r,t,e){if(!Xh.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:t,offset:e}},length:0,getLocalName:function(r){return this[r].localName},getLocator:function(r){return this[r].locator},getQName:function(r){return this[r].qName},getURI:function(r){return this[r].uri},getValue:function(r){return this[r].value}};function Tg(r,t){var e,n=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(a.lastIndex=t,a.exec(r);e=a.exec(r);)if(n.push(e),e[1])return n}ho.XMLReader=Zh,ho.ParseError=Yn;var _g=hi,Cg=Pi,tc=Gh,ec=ho,Dg=Cg.DOMImplementation,rc=_g.NAMESPACE,Sg=ec.ParseError,Og=ec.XMLReader;function ic(r){return r.replace(/\r[\n\u0085]/g,`
3
3
  `).replace(/[\r\u0085\u2028]/g,`
4
- `)}function Uh(n){this.options=n||{locator:{}}}Uh.prototype.parseFromString=function(n,t){var e=this.options,i=new Qd,a=e.domBuilder||new Cs,o=e.errorHandler,l=e.locator,c=e.xmlns||{},f=/\/x?html?$/.test(t),v=f?Rh.HTML_ENTITIES:Rh.XML_ENTITIES;l&&a.setDocumentLocator(l),i.errorHandler=Kd(o,a,l),i.domBuilder=e.domBuilder||a,f&&(c[""]=Fh.HTML),c.xml=c.xml||Fh.XML;var x=e.normalizeLineEndings||kh;return n&&typeof n=="string"?i.parse(x(n),c,v):i.errorHandler.error("invalid doc source"),a.doc};function Kd(n,t,e){if(!n){if(t instanceof Cs)return t;n=t}var i={},a=n instanceof Function;e=e||{};function o(l){var c=n[l];!c&&a&&(c=n.length==2?function(f){n(l,f)}:n),i[l]=c&&function(f){c("[xmldom "+l+"] "+f+Zu(e))}||function(){}}return o("warning"),o("error"),o("fatalError"),i}function Cs(){this.cdata=!1}function Ri(n,t){t.lineNumber=n.lineNumber,t.columnNumber=n.columnNumber}Cs.prototype={startDocument:function(){this.doc=new Zd().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(n,t,e,i){var a=this.doc,o=a.createElementNS(n,e||t),l=i.length;_a(this,o),this.currentElement=o,this.locator&&Ri(this.locator,o);for(var c=0;c<l;c++){var n=i.getURI(c),f=i.getValue(c),e=i.getQName(c),v=a.createAttributeNS(n,e);this.locator&&Ri(i.getLocator(c),v),v.value=v.nodeValue=f,o.setAttributeNode(v)}},endElement:function(n,t,e){var i=this.currentElement;i.tagName,this.currentElement=i.parentNode},startPrefixMapping:function(n,t){},endPrefixMapping:function(n){},processingInstruction:function(n,t){var e=this.doc.createProcessingInstruction(n,t);this.locator&&Ri(this.locator,e),_a(this,e)},ignorableWhitespace:function(n,t,e){},characters:function(n,t,e){if(n=Hh.apply(this,arguments),n){if(this.cdata)var i=this.doc.createCDATASection(n);else var i=this.doc.createTextNode(n);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(n)&&this.doc.appendChild(i),this.locator&&Ri(this.locator,i)}},skippedEntity:function(n){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(n){(this.locator=n)&&(n.lineNumber=0)},comment:function(n,t,e){n=Hh.apply(this,arguments);var i=this.doc.createComment(n);this.locator&&Ri(this.locator,i),_a(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(n,t,e){var i=this.doc.implementation;if(i&&i.createDocumentType){var a=i.createDocumentType(n,t,e);this.locator&&Ri(this.locator,a),_a(this,a),this.doc.doctype=a}},warning:function(n){console.warn("[xmldom warning] "+n,Zu(this.locator))},error:function(n){console.error("[xmldom error] "+n,Zu(this.locator))},fatalError:function(n){throw new jd(n,this.locator)}};function Zu(n){if(n)return`
5
- @`+(n.systemId||"")+"#[line:"+n.lineNumber+",col:"+n.columnNumber+"]"}function Hh(n,t,e){return typeof n=="string"?n.substr(t,e):n.length>=t+e||t?new java.lang.String(n,t,e)+"":n}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(n){Cs.prototype[n]=function(){return null}});function _a(n,t){n.currentElement?n.currentElement.appendChild(t):n.doc.appendChild(t)}wa.__DOMHandler=Cs,wa.normalizeLineEndings=kh,wa.DOMParser=Uh;var Jd=wa.DOMParser;const tg="1.0.36";function eg(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const Pi=typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{document:void 0,tinyEngine:void 0};Pi.Path2D||bd(Pi),Pi.DOMParser||(Pi.DOMParser=Jd);const Xe={window:Pi,version:tg,isBrowser:eg(),dpr:typeof window<"u"&&window.devicePixelRatio||1,document:Pi.document,time:0,deltaTime:0,config:Ti},Ss=(n,t,e)=>Math.max(t,Math.min(e,n)),qh=(n,t=1e-6)=>Math.abs(n)<t?0:n<0?-1:1,Wh=n=>n*(Math.PI/180),rg=(n,t)=>(n%t+t)%t,ju=(n,t,e)=>(1-e)*n+e*t,ng=n=>{let t=n*(180/Math.PI);return t<0&&(t+=360),t>360&&(t-=360),t},ne={transparent:"rgba(1, 1, 1, 0)",green:"#45b787",darkGreen:"#314a43",blue:"#6e9bc5",darkBlue:"#2775b6",red:"#F26666",darkRed:"#D95970",brown:"#ECD2B9",darkBrown:"#BF9D8A",yellow:"#ECDEC0",darkYellow:"#D0AC57",lightGray:"#e0e0e0",gray:"#beb6b6",darkGray:"#918883",white:"#F2F2F2",darkWhite:"#ececec",lightBlack:"#2E3032",black:"#182327",blackAlpha5:"rgba(0, 0, 0, 0.5)"},ig={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Dr={h:0,s:0,l:0},Ta={h:0,s:0,l:0};function Qu(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*6*(2/3-e):n}const sg=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/;class Ut{isColor=!0;r=1;g=1;b=1;a=1;constructor(t,e,i,a){return e===void 0&&i===void 0?this.set(t):this.setRGBA(t,e,i,a)}static isColor(t){return typeof t=="string"?sg.test(t):typeof t=="number"?t>=0&&t<=16777215:!1}static getRandomStyle(){return sn.random().getStyle()}static getDarken(t,e=.8){return sn.set(t).getHSL(Ca),sn.setHSL(Ca.h,Ca.s,Ca.l*e).getStyle()}static getLighten(t,e=1.2){return this.getDarken(t,e)}static getContrast(t){return sn.set(t),sn.getContrastString()}static getArray(t){return sn.set(t).toArray()}static getComplementary(t){return sn.set(t),sn.getComplementaryString()}static getMoreTransparent(t,e){return sn.set(t).setA(e).getStyle()}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(t){return this.r=t,this.g=t,this.b=t,this.a=1,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this.a=1,this}setR(t){return this.r=t,this}setG(t){return this.g=t,this}setB(t){return this.b=t,this}setA(t){return this.a=t,this}setRGB(t,e,i){return this.setRGBA(t,e,i,this.a)}setRGBA(t,e,i,a=1){return this.r=t,this.g=e,this.b=i,this.a=a,this}setHSL(t,e,i,a=1){if(t=rg(t,1),e=Ss(e,0,1),i=Ss(i,0,1),e===0)this.r=this.g=this.b=i;else{const o=i<=.5?i*(1+e):i+e-i*e,l=2*i-o;this.r=Qu(l,o,t+1/3),this.g=Qu(l,o,t),this.b=Qu(l,o,t-1/3)}return this.a=a,this}setStyle(t){let e;if(e=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let i;const a=e[1],o=e[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,this.a=Math.max(Math.min(1,i[4]!==void 0?parseFloat(i[4]):1),0),this;if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,this.a=Math.max(Math.min(1,i[4]!==void 0?parseFloat(i[4]):1),0),this;break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){const l=parseFloat(i[1])/360,c=parseInt(i[2],10)/100,f=parseInt(i[3],10)/100,v=Math.max(Math.min(1,i[4]!==void 0?parseFloat(i[4]):1),0);return this.setHSL(l,c,f,v)}break}}else if(e=/^\#([A-Fa-f\d]+)$/.exec(t)){const i=e[1],a=i.length;if(a===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this.a=1,this;if(a===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this.a=1,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=ig[t.toLowerCase()];return e!==void 0?this.setHex(e):console.warn("Color: Unknown color "+t),this}clone(){return new Ut(this.r,this.g,this.b,this.a)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}getRGB(t=new Ut){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new Ut){const e=this.a,i=e*this.r+(1-e)*t.r,a=e*this.g+(1-e)*t.g,o=e*this.b+(1-e)*t.b;return new Ut(i,a,o)}getHex(){return Ss(this.r*255,0,255)<<16^Ss(this.g*255,0,255)<<8^Ss(this.b*255,0,255)<<0}getHSL(t){const e=this.r,i=this.g,a=this.b,o=Math.max(e,i,a),l=Math.min(e,i,a);let c=0,f;const v=(l+o)/2;if(l===o)c=0,f=0;else{const x=o-l;switch(f=v<=.5?x/(o+l):x/(2-o-l),o){case e:c=(i-a)/x+(i<a?6:0);break;case i:c=(a-e)/x+2;break;case a:c=(e-i)/x+4;break}c/=6}return t.h=c,t.s=f,t.l=v,t}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return"#"+("000000"+this.getHex().toString(16)).slice(-6)}getBrightness(){let t=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return t+=(255-t)*(255-this.a*255)/255,t}getContrastString(){return this.getBrightness()>125?"#2f2f2f":"#f2f2f2"}getComplementary(t=new Ut){const e=this.toArray(),i=[0,0,0,1];for(let a=0;a<e.length;a++)if(a<3)i[a]=1-e[a];else if(a===3)e[a]>1||e[a]<=0?i[a]=1:i[a]=Math.max(Math.min(parseFloat(e[a].toFixed(2)),1),0);else continue;return t.setRGBA(i[0],i[1],i[2],parseFloat(i[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(typeof t>"u"||t>=1)return this.getHexString();const e=this.getRGBByBg(),i=e.r*t+(1-t),a=e.g*t+(1-t),o=e.b*t+(1-t);return new Ut(i,a,o).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(t,e,i){return this.getHSL(Dr),Dr.h+=t,Dr.s+=e,Dr.l+=i,this.setHSL(Dr.h,Dr.s,Dr.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,i){return this.r=t.r+(e.r-t.r)*i,this.g=t.g+(e.g-t.g)*i,this.b=t.b+(e.b-t.b)*i,this}lerpHSL(t,e){this.getHSL(Dr),t.getHSL(Ta);const i=ju(Dr.h,Ta.h,e),a=ju(Dr.s,Ta.s,e),o=ju(Dr.l,Ta.l,e);return this.setHSL(i,a,o),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[0,0,0,0],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const sn=new Ut,Ca={h:0,s:0,l:0};class G{isVector2=!0;x=0;y=0;z;constructor(t=0,e=0,i){this.x=t,this.y=e,this.z=i||0}static isZero(t){return t.x===0&&t.y===0}static isEmpty(t){return!Number.isFinite(t.x)&&!Number.isFinite(t.y)}static equals(t,e,i=!0){return i?t.x===e.x&&t.y===e.y:Math.abs(t.x-e.x)<Number.EPSILON&&Math.abs(t.y-e.y)<Number.EPSILON}static getInt32Array(t,e=2){const i=new ArrayBuffer(t.length*e*4),a=new Int32Array(i);for(let o=0,l=t.length;o<l;o++)a[o*2]=t[o].x,a[o*2+1]=t[o].y;return a}static getFloat64Array(t,e=2){const i=new ArrayBuffer(t.length*e*8),a=new Float64Array(i);for(let o=0,l=t.length;o<l;o++)a[o*2]=t[o].x,a[o*2+1]=t[o].y;return a}static getVectors(t){const e=[];for(let i=0,a=t.length;i<a;i++)e.push(new G(t[i].x,t[i].y));return e}static getStrings(t){const e=[];if(!t||!t.length)return"";for(let i=0,a=t.length;i<a;i++)e.push(G.getString(t[i]));return e.join(",")}static getString(t){return`${t.x},${t.y}`}static getLength(t){return Math.sqrt(t.x*t.x+t.y*t.y)}static getDistance(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}static dot(t,e){return t.x*e.x+t.y*e.y}static cross(t,e){return t.x*e.y-t.y*e.x}static sub(t,e){return new G().subVectors(t,e)}static isPointOnSegment(t,e,i){return qh(this.sub(t,i).cross(this.sub(e,i)))===0&&qh(this.sub(t,i).dot(this.sub(e,i)))<=0}static angle(t,e,i){return i?Math.atan2(t.y-e.y,t.x-e.x):ng(Math.atan2(t.y-e.y,t.x-e.x))}static getSamplingPoints(t,e=100){let i=this.getClothoidPoints(t,e),a=0;for(let o=0,l=i.length;o<l;o++){let c=Math.max(0,o-1);o>0?a+=this.getDistance(i[c],i[c+1]):a=0,i[o].l=Math.round(a);let f=this.angle(i[c+1],i[c]);i[o].a=Math.round(f*100)/100}return i}static getClothoidPoints(t,e=100){let i=[],a=t.concat([]);if(!a||a.length<2)return i;a.length===2?(a.push(a[1]),a.unshift(a[0])):a.length===3&&a.splice(2,0,a[1]);for(let o=0;o<a.length-3;o+=3){let l=new G(a[o].x,a[o].y),c=new G(a[o+1].x,a[o+1].y),f=new G(a[o+2].x,a[o+2].y),v=new G(a[o+3].x,a[o+3].y),x=0;x+=l.distanceTo(c),x+=c.distanceTo(f),x+=f.distanceTo(v);let D=Math.min(.5,1/(x/e));for(let C=D;C<1;C+=D){let S=3*(c.x-l.x),H=3*(f.x-c.x)-S,I=v.x-l.x-S-H,B=3*(c.y-l.y),F=3*(f.y-c.y)-B,W=v.y-l.y-B-F,Y=I*Math.pow(C,3)+H*Math.pow(C,2)+S*C+l.x,A=W*Math.pow(C,3)+F*Math.pow(C,2)+B*C+l.y;i.push({x:Math.round(Y),y:Math.round(A),a:0,l:0})}}return i.unshift({x:a[0].x,y:a[0].y,a:0,l:0}),i.push({x:a[a.length-1].x,y:a[a.length-1].y,a:0,l:0}),i}static getClothoidLength(t){let e=0;if(t.length>2)for(let i=0;i<t.length;i++){let a=Math.max(0,i-1);i>0&&(e+=this.getDistance(t[a],t[a+1]))}return e}static getCircleCenterByChord(t,e,i,a=!0,o=new G){const l=this.getDistance(t,e);if(l===0)return o.x=1/0,o.y=1/0,o;Ku.set((t.x+e.x)/2,(t.y+e.y)/2);const c=Math.sqrt(i*i-l*l/4),f=a?-1:1;return o.x=Ku.x+f*c*(e.y-t.y)/l,o.y=Ku.y-f*c*(e.x-t.x)/l,o}static isPointInCircle(t,e,i){return this.getDistance(i,t)<e}static isPointInPolygonByRay(t,e){let i=0;const a=new G().copy(t),o=new G,l=new G;for(let c=0;c<e.length;c++){c===e.length-1?(o.copy(e[c]),l.copy(e[0])):(o.copy(e[c]),l.copy(e[c+1]));let f=[o.y,l.y].sort((v,x)=>v-x);f[0]<a.y&&f[1]>a.y&&(o.x<a.x||l.x<a.x)&&i++}return i%2===1}static whichSideOfSegment(t,e,i){return(e.x-t.x)*(i.y-t.y)-(i.x-t.x)*(e.y-t.y)}static getIntersectionOfSegments(t,e,i,a,o=!1,l=new G){const c=(a.y-i.y)*(e.x-t.x)-(a.x-i.x)*(e.y-t.y);if(c===0)return l.makeEmpty();const f=(a.x-i.x)*(t.y-i.y)-(a.y-i.y)*(t.x-i.x),v=(e.x-t.x)*(t.y-i.y)-(e.y-t.y)*(t.x-i.x),x=f/c,D=v/c;return o&&(x<0||x>1||D<0||D>1)?l.makeEmpty():(l.x=t.x+x*(e.x-t.x),l.y=t.y+x*(e.y-t.y),l)}static getConvexHullByGrahamScan(t,e=!1,i=[]){if(!t||!t.length)return i;const a=t.length;let o=0;for(let f=0;f<a;f++)t[f].x<t[o].x&&(o=f);let l=o,c;do{i.push(t[l]),c=(l+1)%a;for(let f=0;f<a;f++)this.whichSideOfSegment(t[l],t[f],t[c])>0&&(c=f);l=c}while(l!==o);return e&&i.push(t[o]),i}static getPointsWithMatrix3(t,e){const i=[];if(!t)return i;for(let a=0,o=t.length;a<o;a++)i.push({x:e.elements[0]*t[a].x+e.elements[3]*t[a].y+e.elements[6],y:e.elements[1]*t[a].x+e.elements[4]*t[a].y+e.elements[7]});return i}static getPointsApplyMatrix3(t,e=[]){for(let i=0,a=e.length;i<a;i++){const o=t.elements[0]*e[i].x+t.elements[3]*e[i].y+t.elements[6],l=t.elements[1]*e[i].x+t.elements[4]*e[i].y+t.elements[7];e[i].x=o,e[i].y=l}return e}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}applyMatrix3(t){const e=this.x,i=this.y,a=t.elements;return this.x=a[0]*e+a[3]*i+a[6],this.y=a[1]*e+a[4]*i+a[7],this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}ceilToZero(){return this.x=this.x<0?Math.floor(this.x):Math.ceil(this.x),this.y=this.y<0?Math.floor(this.y):Math.ceil(this.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clone(){return new G(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}cross(t){return this.x*t.y-this.y*t.x}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y;return e*e+i*i}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}dot(t){return this.x*t.x+this.y*t.y}equals(t,e=!0){return e?t.x===this.x&&t.y===this.y:Math.abs(t.x-this.x)<Number.EPSILON&&Math.abs(t.y-this.y)<Number.EPSILON}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}floorToZero(){return this.roundToZero()}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("out of range: "+t)}}identity(){return this.set(0,0)}isEmpty(){return!Number.isFinite(this.x)&&!Number.isFinite(this.y)}isZero(){return this.x===0&&this.y===0}length(){return Math.sqrt(this.dot(this))}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}makeEmpty(){return this.x=1/0,this.y=1/0,this}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}maxXY(t,e){return this.x=Math.max(this.x,t),this.y=Math.max(this.y,e),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}minXY(t,e){return this.x=Math.min(this.x,t),this.y=Math.min(this.y,e),this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t,e){return this.x*=t,this.y*=e||t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this}negate(){return this.x=-this.x,this.y=-this.y,this}normalize(){return this.divideScalar(this.length()||1)}project(t){return this.applyMatrix3(t.matrixWorldInverse).applyMatrix3(t.projectionMatrix)}random(){return this.x=Math.random(),this.y=Math.random(),this}rotate(t){const e=Math.cos(t),i=Math.sin(t),a=this.x,o=this.y;return this.x=a*e-o*i,this.y=a*i+o*e,this}rotateAround(t,e){const i=Math.cos(e),a=Math.sin(e),o=this.x-t.x,l=this.y-t.y;return this.x=o*i-l*a+t.x,this.y=o*a+l*i+t.y,this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}set(t,e){return this.x=t,this.y=e,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("out of range: "+t)}return this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*3)}setLength(t){return this.normalize().multiplyScalar(t)}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}toString(){return`{x:${this.x},y:${this.y}}`}unproject(t,e=!1){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}validate(){return!(isNaN(this.x)||isNaN(this.y))}*[Symbol.iterator](){yield this.x,yield this.y}}const Ku=new G,ag=Object.freeze(Object.defineProperty({__proto__:null,default:G},Symbol.toStringTag,{value:"Module"}));var Sa={exports:{}};/**
4
+ `)}function nc(r){this.options=r||{locator:{}}}nc.prototype.parseFromString=function(r,t){var e=this.options,n=new Og,a=e.domBuilder||new ks,u=e.errorHandler,l=e.locator,c=e.xmlns||{},f=/\/x?html?$/.test(t),d=f?tc.HTML_ENTITIES:tc.XML_ENTITIES;l&&a.setDocumentLocator(l),n.errorHandler=Ng(u,a,l),n.domBuilder=e.domBuilder||a,f&&(c[""]=rc.HTML),c.xml=c.xml||rc.XML;var y=e.normalizeLineEndings||ic;return r&&typeof r=="string"?n.parse(y(r),c,d):n.errorHandler.error("invalid doc source"),a.doc};function Ng(r,t,e){if(!r){if(t instanceof ks)return t;r=t}var n={},a=r instanceof Function;e=e||{};function u(l){var c=r[l];!c&&a&&(c=r.length==2?function(f){r(l,f)}:r),n[l]=c&&function(f){c("[xmldom "+l+"] "+f+fo(e))}||function(){}}return u("warning"),u("error"),u("fatalError"),n}function ks(){this.cdata=!1}function Xn(r,t){t.lineNumber=r.lineNumber,t.columnNumber=r.columnNumber}ks.prototype={startDocument:function(){this.doc=new Dg().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(r,t,e,n){var a=this.doc,u=a.createElementNS(r,e||t),l=n.length;ka(this,u),this.currentElement=u,this.locator&&Xn(this.locator,u);for(var c=0;c<l;c++){var r=n.getURI(c),f=n.getValue(c),e=n.getQName(c),d=a.createAttributeNS(r,e);this.locator&&Xn(n.getLocator(c),d),d.value=d.nodeValue=f,u.setAttributeNode(d)}},endElement:function(r,t,e){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(r,t){},endPrefixMapping:function(r){},processingInstruction:function(r,t){var e=this.doc.createProcessingInstruction(r,t);this.locator&&Xn(this.locator,e),ka(this,e)},ignorableWhitespace:function(r,t,e){},characters:function(r,t,e){if(r=sc.apply(this,arguments),r){if(this.cdata)var n=this.doc.createCDATASection(r);else var n=this.doc.createTextNode(r);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(r)&&this.doc.appendChild(n),this.locator&&Xn(this.locator,n)}},skippedEntity:function(r){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(r){(this.locator=r)&&(r.lineNumber=0)},comment:function(r,t,e){r=sc.apply(this,arguments);var n=this.doc.createComment(r);this.locator&&Xn(this.locator,n),ka(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(r,t,e){var n=this.doc.implementation;if(n&&n.createDocumentType){var a=n.createDocumentType(r,t,e);this.locator&&Xn(this.locator,a),ka(this,a),this.doc.doctype=a}},warning:function(r){console.warn("[xmldom warning] "+r,fo(this.locator))},error:function(r){console.error("[xmldom error] "+r,fo(this.locator))},fatalError:function(r){throw new Sg(r,this.locator)}};function fo(r){if(r)return`
5
+ @`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}function sc(r,t,e){return typeof r=="string"?r.substr(t,e):r.length>=t+e||t?new java.lang.String(r,t,e)+"":r}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){ks.prototype[r]=function(){return null}});function ka(r,t){r.currentElement?r.currentElement.appendChild(t):r.doc.appendChild(t)}Fa.__DOMHandler=ks,Fa.normalizeLineEndings=ic,Fa.DOMParser=nc;var Mg=Fa.DOMParser;const Bg="1.0.39";function Ig(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const Zn=typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{document:void 0,tinyEngine:void 0};Zn.Path2D||Jd(Zn),Zn.DOMParser||(Zn.DOMParser=Mg);const Zt={window:Zn,version:Bg,isBrowser:Ig(),dpr:typeof window<"u"&&window.devicePixelRatio||1,document:Zn.document,time:0,deltaTime:0,config:kn},Hs=(r,t,e)=>Math.max(t,Math.min(e,r)),ac=(r,t=1e-6)=>Math.abs(r)<t?0:r<0?-1:1,uc=r=>r*(Math.PI/180),Rg=(r,t)=>(r%t+t)%t,po=(r,t,e)=>(1-e)*r+e*t,Lg=r=>{let t=r*(180/Math.PI);return t<0&&(t+=360),t>360&&(t-=360),t},he={transparent:"rgba(1, 1, 1, 0)",green:"#45b787",darkGreen:"#314a43",blue:"#6e9bc5",darkBlue:"#2775b6",red:"#F26666",darkRed:"#D95970",brown:"#ECD2B9",darkBrown:"#BF9D8A",yellow:"#ECDEC0",darkYellow:"#D0AC57",lightGray:"#e0e0e0",gray:"#beb6b6",darkGray:"#918883",white:"#F2F2F2",darkWhite:"#ececec",lightBlack:"#2E3032",black:"#182327",blackAlpha5:"rgba(0, 0, 0, 0.5)"},Pg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Mr={h:0,s:0,l:0},Ha={h:0,s:0,l:0};function go(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*6*(2/3-e):r}const Fg=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/;class Wt{isColor=!0;r=1;g=1;b=1;a=1;constructor(t,e,n,a){return e===void 0&&n===void 0?this.set(t):this.setRGBA(t,e,n,a)}static isColor(t){return typeof t=="string"?Fg.test(t):typeof t=="number"?t>=0&&t<=16777215:!1}static getRandomStyle(){return di.random().getStyle()}static getDarken(t,e=.8){return di.set(t).getHSL(qa),di.setHSL(qa.h,qa.s,qa.l*e).getStyle()}static getLighten(t,e=1.2){return this.getDarken(t,e)}static getContrast(t){return di.set(t),di.getContrastString()}static getArray(t){return di.set(t).toArray()}static getComplementary(t){return di.set(t),di.getComplementaryString()}static getMoreTransparent(t,e){return di.set(t).setA(e).getStyle()}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(t){return this.r=t,this.g=t,this.b=t,this.a=1,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this.a=1,this}setR(t){return this.r=t,this}setG(t){return this.g=t,this}setB(t){return this.b=t,this}setA(t){return this.a=t,this}setRGB(t,e,n){return this.setRGBA(t,e,n,this.a)}setRGBA(t,e,n,a=1){return this.r=t,this.g=e,this.b=n,this.a=a,this}setHSL(t,e,n,a=1){if(t=Rg(t,1),e=Hs(e,0,1),n=Hs(n,0,1),e===0)this.r=this.g=this.b=n;else{const u=n<=.5?n*(1+e):n+e-n*e,l=2*n-u;this.r=go(l,u,t+1/3),this.g=go(l,u,t),this.b=go(l,u,t-1/3)}return this.a=a,this}setStyle(t){let e;if(e=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let n;const a=e[1],u=e[2];switch(a){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,this.a=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0),this;if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,this.a=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0),this;break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u)){const l=parseFloat(n[1])/360,c=parseInt(n[2],10)/100,f=parseInt(n[3],10)/100,d=Math.max(Math.min(1,n[4]!==void 0?parseFloat(n[4]):1),0);return this.setHSL(l,c,f,d)}break}}else if(e=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=e[1],a=n.length;if(a===3)return this.r=parseInt(n.charAt(0)+n.charAt(0),16)/255,this.g=parseInt(n.charAt(1)+n.charAt(1),16)/255,this.b=parseInt(n.charAt(2)+n.charAt(2),16)/255,this.a=1,this;if(a===6)return this.r=parseInt(n.charAt(0)+n.charAt(1),16)/255,this.g=parseInt(n.charAt(2)+n.charAt(3),16)/255,this.b=parseInt(n.charAt(4)+n.charAt(5),16)/255,this.a=1,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=Pg[t.toLowerCase()];return e!==void 0?this.setHex(e):console.warn("Color: Unknown color "+t),this}clone(){return new Wt(this.r,this.g,this.b,this.a)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}getRGB(t=new Wt){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new Wt){const e=this.a,n=e*this.r+(1-e)*t.r,a=e*this.g+(1-e)*t.g,u=e*this.b+(1-e)*t.b;return new Wt(n,a,u)}getHex(){return Hs(this.r*255,0,255)<<16^Hs(this.g*255,0,255)<<8^Hs(this.b*255,0,255)<<0}getHSL(t){const e=this.r,n=this.g,a=this.b,u=Math.max(e,n,a),l=Math.min(e,n,a);let c=0,f;const d=(l+u)/2;if(l===u)c=0,f=0;else{const y=u-l;switch(f=d<=.5?y/(u+l):y/(2-u-l),u){case e:c=(n-a)/y+(n<a?6:0);break;case n:c=(a-e)/y+2;break;case a:c=(e-n)/y+4;break}c/=6}return t.h=c,t.s=f,t.l=d,t}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return"#"+("000000"+this.getHex().toString(16)).slice(-6)}getBrightness(){let t=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return t+=(255-t)*(255-this.a*255)/255,t}getContrastString(){return this.getBrightness()>125?"#2f2f2f":"#f2f2f2"}getComplementary(t=new Wt){const e=this.toArray(),n=[0,0,0,1];for(let a=0;a<e.length;a++)if(a<3)n[a]=1-e[a];else if(a===3)e[a]>1||e[a]<=0?n[a]=1:n[a]=Math.max(Math.min(parseFloat(e[a].toFixed(2)),1),0);else continue;return t.setRGBA(n[0],n[1],n[2],parseFloat(n[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(typeof t>"u"||t>=1)return this.getHexString();const e=this.getRGBByBg(),n=e.r*t+(1-t),a=e.g*t+(1-t),u=e.b*t+(1-t);return new Wt(n,a,u).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(t,e,n){return this.getHSL(Mr),Mr.h+=t,Mr.s+=e,Mr.l+=n,this.setHSL(Mr.h,Mr.s,Mr.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Mr),t.getHSL(Ha);const n=po(Mr.h,Ha.h,e),a=po(Mr.s,Ha.s,e),u=po(Mr.l,Ha.l,e);return this.setHSL(n,a,u),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[0,0,0,0],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const di=new Wt,qa={h:0,s:0,l:0};class Y{isVector2=!0;x=0;y=0;z;constructor(t=0,e=0,n){this.x=t,this.y=e,this.z=n||0}static isZero(t){return t.x===0&&t.y===0}static isEmpty(t){return!Number.isFinite(t.x)&&!Number.isFinite(t.y)}static equals(t,e,n=!0){return n?t.x===e.x&&t.y===e.y:Math.abs(t.x-e.x)<Number.EPSILON&&Math.abs(t.y-e.y)<Number.EPSILON}static getInt32Array(t,e=2){const n=new ArrayBuffer(t.length*e*4),a=new Int32Array(n);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getFloat64Array(t,e=2){const n=new ArrayBuffer(t.length*e*8),a=new Float64Array(n);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getVectors(t){const e=[];for(let n=0,a=t.length;n<a;n++)e.push(new Y(t[n].x,t[n].y));return e}static getStrings(t){const e=[];if(!t||!t.length)return"";for(let n=0,a=t.length;n<a;n++)e.push(Y.getString(t[n]));return e.join(",")}static getString(t){return`${t.x},${t.y}`}static getLength(t){return Math.sqrt(t.x*t.x+t.y*t.y)}static getDistance(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}static dot(t,e){return t.x*e.x+t.y*e.y}static cross(t,e){return t.x*e.y-t.y*e.x}static sub(t,e){return new Y().subVectors(t,e)}static isPointOnSegment(t,e,n){return ac(this.sub(t,n).cross(this.sub(e,n)))===0&&ac(this.sub(t,n).dot(this.sub(e,n)))<=0}static angle(t,e,n){return n?Math.atan2(t.y-e.y,t.x-e.x):Lg(Math.atan2(t.y-e.y,t.x-e.x))}static getSamplingPoints(t,e=100){let n=this.getClothoidPoints(t,e),a=0;for(let u=0,l=n.length;u<l;u++){let c=Math.max(0,u-1);u>0?a+=this.getDistance(n[c],n[c+1]):a=0,n[u].l=Math.round(a);let f=this.angle(n[c+1],n[c]);n[u].a=Math.round(f*100)/100}return n}static getClothoidPoints(t,e=100){let n=[],a=t.concat([]);if(!a||a.length<2)return n;a.length===2?(a.push(a[1]),a.unshift(a[0])):a.length===3&&a.splice(2,0,a[1]);for(let u=0;u<a.length-3;u+=3){let l=new Y(a[u].x,a[u].y),c=new Y(a[u+1].x,a[u+1].y),f=new Y(a[u+2].x,a[u+2].y),d=new Y(a[u+3].x,a[u+3].y),y=0;y+=l.distanceTo(c),y+=c.distanceTo(f),y+=f.distanceTo(d);let A=Math.min(.5,1/(y/e));for(let _=A;_<1;_+=A){let C=3*(c.x-l.x),F=3*(f.x-c.x)-C,N=d.x-l.x-C-F,M=3*(c.y-l.y),R=3*(f.y-c.y)-M,q=d.y-l.y-M-R,z=N*Math.pow(_,3)+F*Math.pow(_,2)+C*_+l.x,w=q*Math.pow(_,3)+R*Math.pow(_,2)+M*_+l.y;n.push({x:Math.round(z),y:Math.round(w),a:0,l:0})}}return n.unshift({x:a[0].x,y:a[0].y,a:0,l:0}),n.push({x:a[a.length-1].x,y:a[a.length-1].y,a:0,l:0}),n}static getClothoidLength(t){let e=0;if(t.length>2)for(let n=0;n<t.length;n++){let a=Math.max(0,n-1);n>0&&(e+=this.getDistance(t[a],t[a+1]))}return e}static getCircleCenterByChord(t,e,n,a=!0,u=new Y){const l=this.getDistance(t,e);if(l===0)return u.x=1/0,u.y=1/0,u;yo.set((t.x+e.x)/2,(t.y+e.y)/2);const c=Math.sqrt(n*n-l*l/4),f=a?-1:1;return u.x=yo.x+f*c*(e.y-t.y)/l,u.y=yo.y-f*c*(e.x-t.x)/l,u}static isPointInCircle(t,e,n){return this.getDistance(n,t)<e}static isPointInPolygonByRay(t,e){let n=0;const a=new Y().copy(t),u=new Y,l=new Y;for(let c=0;c<e.length;c++){c===e.length-1?(u.copy(e[c]),l.copy(e[0])):(u.copy(e[c]),l.copy(e[c+1]));let f=[u.y,l.y].sort((d,y)=>d-y);f[0]<a.y&&f[1]>a.y&&(u.x<a.x||l.x<a.x)&&n++}return n%2===1}static whichSideOfSegment(t,e,n){return(e.x-t.x)*(n.y-t.y)-(n.x-t.x)*(e.y-t.y)}static getIntersectionOfSegments(t,e,n,a,u=!1,l=new Y){const c=(a.y-n.y)*(e.x-t.x)-(a.x-n.x)*(e.y-t.y);if(c===0)return l.makeEmpty();const f=(a.x-n.x)*(t.y-n.y)-(a.y-n.y)*(t.x-n.x),d=(e.x-t.x)*(t.y-n.y)-(e.y-t.y)*(t.x-n.x),y=f/c,A=d/c;return u&&(y<0||y>1||A<0||A>1)?l.makeEmpty():(l.x=t.x+y*(e.x-t.x),l.y=t.y+y*(e.y-t.y),l)}static getConvexHullByGrahamScan(t,e=!1,n=[]){if(!t||!t.length)return n;const a=t.length;let u=0;for(let f=0;f<a;f++)t[f].x<t[u].x&&(u=f);let l=u,c;do{n.push(t[l]),c=(l+1)%a;for(let f=0;f<a;f++)this.whichSideOfSegment(t[l],t[f],t[c])>0&&(c=f);l=c}while(l!==u);return e&&n.push(t[u]),n}static getPointsWithMatrix3(t,e){const n=[];if(!t)return n;for(let a=0,u=t.length;a<u;a++)n.push({x:e.elements[0]*t[a].x+e.elements[3]*t[a].y+e.elements[6],y:e.elements[1]*t[a].x+e.elements[4]*t[a].y+e.elements[7]});return n}static getPointsApplyMatrix3(t,e=[]){for(let n=0,a=e.length;n<a;n++){const u=t.elements[0]*e[n].x+t.elements[3]*e[n].y+t.elements[6],l=t.elements[1]*e[n].x+t.elements[4]*e[n].y+t.elements[7];e[n].x=u,e[n].y=l}return e}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}applyMatrix3(t){const e=this.x,n=this.y,a=t.elements;return this.x=a[0]*e+a[3]*n+a[6],this.y=a[1]*e+a[4]*n+a[7],this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}ceilToZero(){return this.x=this.x<0?Math.floor(this.x):Math.ceil(this.x),this.y=this.y<0?Math.floor(this.y):Math.ceil(this.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clone(){return new Y(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}cross(t){return this.x*t.y-this.y*t.x}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}dot(t){return this.x*t.x+this.y*t.y}equals(t,e=!0){return e?t.x===this.x&&t.y===this.y:Math.abs(t.x-this.x)<Number.EPSILON&&Math.abs(t.y-this.y)<Number.EPSILON}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}floorToZero(){return this.roundToZero()}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("out of range: "+t)}}identity(){return this.set(0,0)}isEmpty(){return!Number.isFinite(this.x)&&!Number.isFinite(this.y)}isZero(){return this.x===0&&this.y===0}length(){return Math.sqrt(this.dot(this))}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}makeEmpty(){return this.x=1/0,this.y=1/0,this}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}maxXY(t,e){return this.x=Math.max(this.x,t),this.y=Math.max(this.y,e),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}minXY(t,e){return this.x=Math.min(this.x,t),this.y=Math.min(this.y,e),this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t,e){return this.x*=t,this.y*=e||t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this}negate(){return this.x=-this.x,this.y=-this.y,this}normalize(){return this.divideScalar(this.length()||1)}project(t){return this.applyMatrix3(t.matrixWorldInverse).applyMatrix3(t.projectionMatrix)}random(){return this.x=Math.random(),this.y=Math.random(),this}rotate(t){const e=Math.cos(t),n=Math.sin(t),a=this.x,u=this.y;return this.x=a*e-u*n,this.y=a*n+u*e,this}rotateAround(t,e){const n=Math.cos(e),a=Math.sin(e),u=this.x-t.x,l=this.y-t.y;return this.x=u*n-l*a+t.x,this.y=u*a+l*n+t.y,this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}set(t,e){return this.x=t,this.y=e,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("out of range: "+t)}return this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*3)}setLength(t){return this.normalize().multiplyScalar(t)}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}toString(){return`{"x":${this.x},"y":${this.y}}`}unproject(t,e=!1){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}validate(){return!(isNaN(this.x)||isNaN(this.y))}*[Symbol.iterator](){yield this.x,yield this.y}}const yo=new Y,Ug=Object.freeze(Object.defineProperty({__proto__:null,default:Y},Symbol.toStringTag,{value:"Module"}));var Wa={exports:{}};/**
6
6
  * @license
7
7
  * Lodash <https://lodash.com/>
8
8
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
9
9
  * Released under MIT license <https://lodash.com/license>
10
10
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
11
11
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
12
- */Sa.exports,function(n,t){(function(){var e,i="4.17.21",a=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",v=500,x="__lodash_placeholder__",D=1,C=2,S=4,H=1,I=2,B=1,F=2,W=4,Y=8,A=16,$=32,q=64,tt=128,ot=256,K=512,nt=30,J="...",it=800,ht=16,dt=1,lt=2,O=3,gt=1/0,Ot=9007199254740991,Se=17976931348623157e292,me=NaN,Jt=4294967295,he=Jt-1,Mr=Jt>>>1,Oe=[["ary",tt],["bind",B],["bindKey",F],["curry",Y],["curryRight",A],["flip",K],["partial",$],["partialRight",q],["rearg",ot]],te="[object Arguments]",Ae="[object Array]",Ht="[object AsyncFunction]",Vt="[object Boolean]",_t="[object Date]",Ft="[object DOMException]",we="[object Error]",Ne="[object Function]",Ue="[object GeneratorFunction]",Gt="[object Map]",De="[object Number]",ce="[object Null]",zt="[object Object]",Yr="[object Promise]",cn="[object Proxy]",ee="[object RegExp]",Tt="[object Set]",Ke="[object String]",He="[object Symbol]",fn="[object Undefined]",cr="[object WeakMap]",Ln="[object WeakSet]",Je="[object ArrayBuffer]",qe="[object DataView]",Rn="[object Float32Array]",Pn="[object Float64Array]",Xr="[object Int8Array]",pn="[object Int16Array]",li="[object Int32Array]",L="[object Uint8Array]",Q="[object Uint8ClampedArray]",rt="[object Uint16Array]",At="[object Uint32Array]",mt=/\b__p \+= '';/g,se=/\b(__p \+=) '' \+/g,_e=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fr=/&(?:amp|lt|gt|quot|#39);/g,Fn=/[&<>"']/g,tr=RegExp(fr.source),hi=RegExp(Fn.source),kn=/<%-([\s\S]+?)%>/g,Zr=/<%([\s\S]+?)%>/g,ci=/<%=([\s\S]+?)%>/g,fi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Un=/^\w*$/,Po=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hn=/[\\^$.*+?()[\]{}|]/g,Fo=RegExp(Hn.source),Zs=/^\s+/,Wa=/\s/,js=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ko=/\{\n\/\* \[wrapped with (.+)\] \*/,Va=/,? & /,Uo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,za=/[()=,{}\[\]\/\s]/,$a=/\\(\\)?/g,Ga=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Qs=/\w*$/,Ks=/^[-+]0x[0-9a-f]+$/i,dn=/^0b[01]+$/i,pi=/^\[object .+?Constructor\]$/,di=/^0o[0-7]+$/i,ji=/^(?:0|[1-9]\d*)$/,Js=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qi=/($^)/,Ho=/['\n\r\u2028\u2029\\]/g,gn="\\ud800-\\udfff",We="\\u0300-\\u036f",qn="\\ufe20-\\ufe2f",jr="\\u20d0-\\u20ff",pr=We+qn+jr,Wn="\\u2700-\\u27bf",er="a-z\\xdf-\\xf6\\xf8-\\xff",Br="\\xac\\xb1\\xd7\\xf7",Ya="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Xa="\\u2000-\\u206f",Ki=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ve="A-Z\\xc0-\\xd6\\xd8-\\xde",gi="\\ufe0e\\ufe0f",Ji=Br+Ya+Xa+Ki,mi="['’]",ta="["+gn+"]",ts="["+Ji+"]",mn="["+pr+"]",Ir="\\d+",qo="["+Wn+"]",ea="["+er+"]",es="[^"+gn+Ji+Ir+Wn+er+Ve+"]",rs="\\ud83c[\\udffb-\\udfff]",Wo="(?:"+mn+"|"+rs+")",Za="[^"+gn+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",b="["+Ve+"]",N="\\u200d",z="(?:"+ea+"|"+es+")",Z="(?:"+b+"|"+es+")",vt="(?:"+mi+"(?:d|ll|m|re|s|t|ve))?",Zt="(?:"+mi+"(?:D|LL|M|RE|S|T|VE))?",re=Wo+"?",fe="["+gi+"]?",dr="(?:"+N+"(?:"+[Za,d,y].join("|")+")"+fe+re+")*",fm="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pm="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ff=fe+re+dr,dm="(?:"+[qo,d,y].join("|")+")"+ff,gm="(?:"+[Za+mn+"?",mn,d,y,ta].join("|")+")",mm=RegExp(mi,"g"),vm=RegExp(mn,"g"),Vo=RegExp(rs+"(?="+rs+")|"+gm+ff,"g"),ym=RegExp([b+"?"+ea+"+"+vt+"(?="+[ts,b,"$"].join("|")+")",Z+"+"+Zt+"(?="+[ts,b+z,"$"].join("|")+")",b+"?"+z+"+"+vt,b+"+"+Zt,pm,fm,Ir,dm].join("|"),"g"),xm=RegExp("["+N+gn+pr+gi+"]"),Em=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,bm=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Am=-1,kt={};kt[Rn]=kt[Pn]=kt[Xr]=kt[pn]=kt[li]=kt[L]=kt[Q]=kt[rt]=kt[At]=!0,kt[te]=kt[Ae]=kt[Je]=kt[Vt]=kt[qe]=kt[_t]=kt[we]=kt[Ne]=kt[Gt]=kt[De]=kt[zt]=kt[ee]=kt[Tt]=kt[Ke]=kt[cr]=!1;var Pt={};Pt[te]=Pt[Ae]=Pt[Je]=Pt[qe]=Pt[Vt]=Pt[_t]=Pt[Rn]=Pt[Pn]=Pt[Xr]=Pt[pn]=Pt[li]=Pt[Gt]=Pt[De]=Pt[zt]=Pt[ee]=Pt[Tt]=Pt[Ke]=Pt[He]=Pt[L]=Pt[Q]=Pt[rt]=Pt[At]=!0,Pt[we]=Pt[Ne]=Pt[cr]=!1;var wm={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Dm={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_m={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Tm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cm=parseFloat,Sm=parseInt,pf=typeof vs=="object"&&vs&&vs.Object===Object&&vs,Om=typeof self=="object"&&self&&self.Object===Object&&self,ve=pf||Om||Function("return this")(),zo=t&&!t.nodeType&&t,vi=zo&&!0&&n&&!n.nodeType&&n,df=vi&&vi.exports===zo,$o=df&&pf.process,gr=function(){try{var _=vi&&vi.require&&vi.require("util").types;return _||$o&&$o.binding&&$o.binding("util")}catch{}}(),gf=gr&&gr.isArrayBuffer,mf=gr&&gr.isDate,vf=gr&&gr.isMap,yf=gr&&gr.isRegExp,xf=gr&&gr.isSet,Ef=gr&&gr.isTypedArray;function rr(_,R,M){switch(M.length){case 0:return _.call(R);case 1:return _.call(R,M[0]);case 2:return _.call(R,M[0],M[1]);case 3:return _.call(R,M[0],M[1],M[2])}return _.apply(R,M)}function Nm(_,R,M,j){for(var ct=-1,Ct=_==null?0:_.length;++ct<Ct;){var ae=_[ct];R(j,ae,M(ae),_)}return j}function mr(_,R){for(var M=-1,j=_==null?0:_.length;++M<j&&R(_[M],M,_)!==!1;);return _}function Mm(_,R){for(var M=_==null?0:_.length;M--&&R(_[M],M,_)!==!1;);return _}function bf(_,R){for(var M=-1,j=_==null?0:_.length;++M<j;)if(!R(_[M],M,_))return!1;return!0}function Vn(_,R){for(var M=-1,j=_==null?0:_.length,ct=0,Ct=[];++M<j;){var ae=_[M];R(ae,M,_)&&(Ct[ct++]=ae)}return Ct}function ja(_,R){var M=_==null?0:_.length;return!!M&&ns(_,R,0)>-1}function Go(_,R,M){for(var j=-1,ct=_==null?0:_.length;++j<ct;)if(M(R,_[j]))return!0;return!1}function qt(_,R){for(var M=-1,j=_==null?0:_.length,ct=Array(j);++M<j;)ct[M]=R(_[M],M,_);return ct}function zn(_,R){for(var M=-1,j=R.length,ct=_.length;++M<j;)_[ct+M]=R[M];return _}function Yo(_,R,M,j){var ct=-1,Ct=_==null?0:_.length;for(j&&Ct&&(M=_[++ct]);++ct<Ct;)M=R(M,_[ct],ct,_);return M}function Bm(_,R,M,j){var ct=_==null?0:_.length;for(j&&ct&&(M=_[--ct]);ct--;)M=R(M,_[ct],ct,_);return M}function Xo(_,R){for(var M=-1,j=_==null?0:_.length;++M<j;)if(R(_[M],M,_))return!0;return!1}var Im=Zo("length");function Lm(_){return _.split("")}function Rm(_){return _.match(Uo)||[]}function Af(_,R,M){var j;return M(_,function(ct,Ct,ae){if(R(ct,Ct,ae))return j=Ct,!1}),j}function Qa(_,R,M,j){for(var ct=_.length,Ct=M+(j?1:-1);j?Ct--:++Ct<ct;)if(R(_[Ct],Ct,_))return Ct;return-1}function ns(_,R,M){return R===R?Ym(_,R,M):Qa(_,wf,M)}function Pm(_,R,M,j){for(var ct=M-1,Ct=_.length;++ct<Ct;)if(j(_[ct],R))return ct;return-1}function wf(_){return _!==_}function Df(_,R){var M=_==null?0:_.length;return M?Qo(_,R)/M:me}function Zo(_){return function(R){return R==null?e:R[_]}}function jo(_){return function(R){return _==null?e:_[R]}}function _f(_,R,M,j,ct){return ct(_,function(Ct,ae,Rt){M=j?(j=!1,Ct):R(M,Ct,ae,Rt)}),M}function Fm(_,R){var M=_.length;for(_.sort(R);M--;)_[M]=_[M].value;return _}function Qo(_,R){for(var M,j=-1,ct=_.length;++j<ct;){var Ct=R(_[j]);Ct!==e&&(M=M===e?Ct:M+Ct)}return M}function Ko(_,R){for(var M=-1,j=Array(_);++M<_;)j[M]=R(M);return j}function km(_,R){return qt(R,function(M){return[M,_[M]]})}function Tf(_){return _&&_.slice(0,Nf(_)+1).replace(Zs,"")}function nr(_){return function(R){return _(R)}}function Jo(_,R){return qt(R,function(M){return _[M]})}function ra(_,R){return _.has(R)}function Cf(_,R){for(var M=-1,j=_.length;++M<j&&ns(R,_[M],0)>-1;);return M}function Sf(_,R){for(var M=_.length;M--&&ns(R,_[M],0)>-1;);return M}function Um(_,R){for(var M=_.length,j=0;M--;)_[M]===R&&++j;return j}var Hm=jo(wm),qm=jo(Dm);function Wm(_){return"\\"+Tm[_]}function Vm(_,R){return _==null?e:_[R]}function is(_){return xm.test(_)}function zm(_){return Em.test(_)}function $m(_){for(var R,M=[];!(R=_.next()).done;)M.push(R.value);return M}function tl(_){var R=-1,M=Array(_.size);return _.forEach(function(j,ct){M[++R]=[ct,j]}),M}function Of(_,R){return function(M){return _(R(M))}}function $n(_,R){for(var M=-1,j=_.length,ct=0,Ct=[];++M<j;){var ae=_[M];(ae===R||ae===x)&&(_[M]=x,Ct[ct++]=M)}return Ct}function Ka(_){var R=-1,M=Array(_.size);return _.forEach(function(j){M[++R]=j}),M}function Gm(_){var R=-1,M=Array(_.size);return _.forEach(function(j){M[++R]=[j,j]}),M}function Ym(_,R,M){for(var j=M-1,ct=_.length;++j<ct;)if(_[j]===R)return j;return-1}function Xm(_,R,M){for(var j=M+1;j--;)if(_[j]===R)return j;return j}function ss(_){return is(_)?jm(_):Im(_)}function Lr(_){return is(_)?Qm(_):Lm(_)}function Nf(_){for(var R=_.length;R--&&Wa.test(_.charAt(R)););return R}var Zm=jo(_m);function jm(_){for(var R=Vo.lastIndex=0;Vo.test(_);)++R;return R}function Qm(_){return _.match(Vo)||[]}function Km(_){return _.match(ym)||[]}var Jm=function _(R){R=R==null?ve:as.defaults(ve.Object(),R,as.pick(ve,bm));var M=R.Array,j=R.Date,ct=R.Error,Ct=R.Function,ae=R.Math,Rt=R.Object,el=R.RegExp,tv=R.String,vr=R.TypeError,Ja=M.prototype,ev=Ct.prototype,us=Rt.prototype,tu=R["__core-js_shared__"],eu=ev.toString,Bt=us.hasOwnProperty,rv=0,Mf=function(){var r=/[^.]+$/.exec(tu&&tu.keys&&tu.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),ru=us.toString,nv=eu.call(Rt),iv=ve._,sv=el("^"+eu.call(Bt).replace(Hn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nu=df?R.Buffer:e,Gn=R.Symbol,iu=R.Uint8Array,Bf=nu?nu.allocUnsafe:e,su=Of(Rt.getPrototypeOf,Rt),If=Rt.create,Lf=us.propertyIsEnumerable,au=Ja.splice,Rf=Gn?Gn.isConcatSpreadable:e,na=Gn?Gn.iterator:e,yi=Gn?Gn.toStringTag:e,uu=function(){try{var r=wi(Rt,"defineProperty");return r({},"",{}),r}catch{}}(),av=R.clearTimeout!==ve.clearTimeout&&R.clearTimeout,uv=j&&j.now!==ve.Date.now&&j.now,ov=R.setTimeout!==ve.setTimeout&&R.setTimeout,ou=ae.ceil,lu=ae.floor,rl=Rt.getOwnPropertySymbols,lv=nu?nu.isBuffer:e,Pf=R.isFinite,hv=Ja.join,cv=Of(Rt.keys,Rt),ue=ae.max,Te=ae.min,fv=j.now,pv=R.parseInt,Ff=ae.random,dv=Ja.reverse,nl=wi(R,"DataView"),ia=wi(R,"Map"),il=wi(R,"Promise"),os=wi(R,"Set"),sa=wi(R,"WeakMap"),aa=wi(Rt,"create"),hu=sa&&new sa,ls={},gv=Di(nl),mv=Di(ia),vv=Di(il),yv=Di(os),xv=Di(sa),cu=Gn?Gn.prototype:e,ua=cu?cu.valueOf:e,kf=cu?cu.toString:e;function g(r){if(Yt(r)&&!ft(r)&&!(r instanceof bt)){if(r instanceof yr)return r;if(Bt.call(r,"__wrapped__"))return Up(r)}return new yr(r)}var hs=function(){function r(){}return function(s){if(!$t(s))return{};if(If)return If(s);r.prototype=s;var u=new r;return r.prototype=e,u}}();function fu(){}function yr(r,s){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=e}g.templateSettings={escape:kn,evaluate:Zr,interpolate:ci,variable:"",imports:{_:g}},g.prototype=fu.prototype,g.prototype.constructor=g,yr.prototype=hs(fu.prototype),yr.prototype.constructor=yr;function bt(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Jt,this.__views__=[]}function Ev(){var r=new bt(this.__wrapped__);return r.__actions__=ze(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=ze(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=ze(this.__views__),r}function bv(){if(this.__filtered__){var r=new bt(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function Av(){var r=this.__wrapped__.value(),s=this.__dir__,u=ft(r),h=s<0,p=u?r.length:0,m=Ly(0,p,this.__views__),E=m.start,w=m.end,T=w-E,k=h?w:E-1,U=this.__iteratees__,V=U.length,X=0,et=Te(T,this.__takeCount__);if(!u||!h&&p==T&&et==T)return op(r,this.__actions__);var at=[];t:for(;T--&&X<et;){k+=s;for(var yt=-1,ut=r[k];++yt<V;){var Et=U[yt],wt=Et.iteratee,ar=Et.type,Ie=wt(ut);if(ar==lt)ut=Ie;else if(!Ie){if(ar==dt)continue t;break t}}at[X++]=ut}return at}bt.prototype=hs(fu.prototype),bt.prototype.constructor=bt;function xi(r){var s=-1,u=r==null?0:r.length;for(this.clear();++s<u;){var h=r[s];this.set(h[0],h[1])}}function wv(){this.__data__=aa?aa(null):{},this.size=0}function Dv(r){var s=this.has(r)&&delete this.__data__[r];return this.size-=s?1:0,s}function _v(r){var s=this.__data__;if(aa){var u=s[r];return u===f?e:u}return Bt.call(s,r)?s[r]:e}function Tv(r){var s=this.__data__;return aa?s[r]!==e:Bt.call(s,r)}function Cv(r,s){var u=this.__data__;return this.size+=this.has(r)?0:1,u[r]=aa&&s===e?f:s,this}xi.prototype.clear=wv,xi.prototype.delete=Dv,xi.prototype.get=_v,xi.prototype.has=Tv,xi.prototype.set=Cv;function vn(r){var s=-1,u=r==null?0:r.length;for(this.clear();++s<u;){var h=r[s];this.set(h[0],h[1])}}function Sv(){this.__data__=[],this.size=0}function Ov(r){var s=this.__data__,u=pu(s,r);if(u<0)return!1;var h=s.length-1;return u==h?s.pop():au.call(s,u,1),--this.size,!0}function Nv(r){var s=this.__data__,u=pu(s,r);return u<0?e:s[u][1]}function Mv(r){return pu(this.__data__,r)>-1}function Bv(r,s){var u=this.__data__,h=pu(u,r);return h<0?(++this.size,u.push([r,s])):u[h][1]=s,this}vn.prototype.clear=Sv,vn.prototype.delete=Ov,vn.prototype.get=Nv,vn.prototype.has=Mv,vn.prototype.set=Bv;function yn(r){var s=-1,u=r==null?0:r.length;for(this.clear();++s<u;){var h=r[s];this.set(h[0],h[1])}}function Iv(){this.size=0,this.__data__={hash:new xi,map:new(ia||vn),string:new xi}}function Lv(r){var s=_u(this,r).delete(r);return this.size-=s?1:0,s}function Rv(r){return _u(this,r).get(r)}function Pv(r){return _u(this,r).has(r)}function Fv(r,s){var u=_u(this,r),h=u.size;return u.set(r,s),this.size+=u.size==h?0:1,this}yn.prototype.clear=Iv,yn.prototype.delete=Lv,yn.prototype.get=Rv,yn.prototype.has=Pv,yn.prototype.set=Fv;function Ei(r){var s=-1,u=r==null?0:r.length;for(this.__data__=new yn;++s<u;)this.add(r[s])}function kv(r){return this.__data__.set(r,f),this}function Uv(r){return this.__data__.has(r)}Ei.prototype.add=Ei.prototype.push=kv,Ei.prototype.has=Uv;function Rr(r){var s=this.__data__=new vn(r);this.size=s.size}function Hv(){this.__data__=new vn,this.size=0}function qv(r){var s=this.__data__,u=s.delete(r);return this.size=s.size,u}function Wv(r){return this.__data__.get(r)}function Vv(r){return this.__data__.has(r)}function zv(r,s){var u=this.__data__;if(u instanceof vn){var h=u.__data__;if(!ia||h.length<a-1)return h.push([r,s]),this.size=++u.size,this;u=this.__data__=new yn(h)}return u.set(r,s),this.size=u.size,this}Rr.prototype.clear=Hv,Rr.prototype.delete=qv,Rr.prototype.get=Wv,Rr.prototype.has=Vv,Rr.prototype.set=zv;function Uf(r,s){var u=ft(r),h=!u&&_i(r),p=!u&&!h&&Qn(r),m=!u&&!h&&!p&&ds(r),E=u||h||p||m,w=E?Ko(r.length,tv):[],T=w.length;for(var k in r)(s||Bt.call(r,k))&&!(E&&(k=="length"||p&&(k=="offset"||k=="parent")||m&&(k=="buffer"||k=="byteLength"||k=="byteOffset")||An(k,T)))&&w.push(k);return w}function Hf(r){var s=r.length;return s?r[gl(0,s-1)]:e}function $v(r,s){return Tu(ze(r),bi(s,0,r.length))}function Gv(r){return Tu(ze(r))}function sl(r,s,u){(u!==e&&!Pr(r[s],u)||u===e&&!(s in r))&&xn(r,s,u)}function oa(r,s,u){var h=r[s];(!(Bt.call(r,s)&&Pr(h,u))||u===e&&!(s in r))&&xn(r,s,u)}function pu(r,s){for(var u=r.length;u--;)if(Pr(r[u][0],s))return u;return-1}function Yv(r,s,u,h){return Yn(r,function(p,m,E){s(h,p,u(p),E)}),h}function qf(r,s){return r&&Kr(s,pe(s),r)}function Xv(r,s){return r&&Kr(s,Ge(s),r)}function xn(r,s,u){s=="__proto__"&&uu?uu(r,s,{configurable:!0,enumerable:!0,value:u,writable:!0}):r[s]=u}function al(r,s){for(var u=-1,h=s.length,p=M(h),m=r==null;++u<h;)p[u]=m?e:Hl(r,s[u]);return p}function bi(r,s,u){return r===r&&(u!==e&&(r=r<=u?r:u),s!==e&&(r=r>=s?r:s)),r}function xr(r,s,u,h,p,m){var E,w=s&D,T=s&C,k=s&S;if(u&&(E=p?u(r,h,p,m):u(r)),E!==e)return E;if(!$t(r))return r;var U=ft(r);if(U){if(E=Py(r),!w)return ze(r,E)}else{var V=Ce(r),X=V==Ne||V==Ue;if(Qn(r))return cp(r,w);if(V==zt||V==te||X&&!p){if(E=T||X?{}:Np(r),!w)return T?_y(r,Xv(E,r)):Dy(r,qf(E,r))}else{if(!Pt[V])return p?r:{};E=Fy(r,V,w)}}m||(m=new Rr);var et=m.get(r);if(et)return et;m.set(r,E),sd(r)?r.forEach(function(ut){E.add(xr(ut,s,u,ut,r,m))}):nd(r)&&r.forEach(function(ut,Et){E.set(Et,xr(ut,s,u,Et,r,m))});var at=k?T?Tl:_l:T?Ge:pe,yt=U?e:at(r);return mr(yt||r,function(ut,Et){yt&&(Et=ut,ut=r[Et]),oa(E,Et,xr(ut,s,u,Et,r,m))}),E}function Zv(r){var s=pe(r);return function(u){return Wf(u,r,s)}}function Wf(r,s,u){var h=u.length;if(r==null)return!h;for(r=Rt(r);h--;){var p=u[h],m=s[p],E=r[p];if(E===e&&!(p in r)||!m(E))return!1}return!0}function Vf(r,s,u){if(typeof r!="function")throw new vr(l);return ga(function(){r.apply(e,u)},s)}function la(r,s,u,h){var p=-1,m=ja,E=!0,w=r.length,T=[],k=s.length;if(!w)return T;u&&(s=qt(s,nr(u))),h?(m=Go,E=!1):s.length>=a&&(m=ra,E=!1,s=new Ei(s));t:for(;++p<w;){var U=r[p],V=u==null?U:u(U);if(U=h||U!==0?U:0,E&&V===V){for(var X=k;X--;)if(s[X]===V)continue t;T.push(U)}else m(s,V,h)||T.push(U)}return T}var Yn=mp(Qr),zf=mp(ol,!0);function jv(r,s){var u=!0;return Yn(r,function(h,p,m){return u=!!s(h,p,m),u}),u}function du(r,s,u){for(var h=-1,p=r.length;++h<p;){var m=r[h],E=s(m);if(E!=null&&(w===e?E===E&&!sr(E):u(E,w)))var w=E,T=m}return T}function Qv(r,s,u,h){var p=r.length;for(u=pt(u),u<0&&(u=-u>p?0:p+u),h=h===e||h>p?p:pt(h),h<0&&(h+=p),h=u>h?0:ud(h);u<h;)r[u++]=s;return r}function $f(r,s){var u=[];return Yn(r,function(h,p,m){s(h,p,m)&&u.push(h)}),u}function ye(r,s,u,h,p){var m=-1,E=r.length;for(u||(u=Uy),p||(p=[]);++m<E;){var w=r[m];s>0&&u(w)?s>1?ye(w,s-1,u,h,p):zn(p,w):h||(p[p.length]=w)}return p}var ul=vp(),Gf=vp(!0);function Qr(r,s){return r&&ul(r,s,pe)}function ol(r,s){return r&&Gf(r,s,pe)}function gu(r,s){return Vn(s,function(u){return wn(r[u])})}function Ai(r,s){s=Zn(s,r);for(var u=0,h=s.length;r!=null&&u<h;)r=r[Jr(s[u++])];return u&&u==h?r:e}function Yf(r,s,u){var h=s(r);return ft(r)?h:zn(h,u(r))}function Me(r){return r==null?r===e?fn:ce:yi&&yi in Rt(r)?Iy(r):Gy(r)}function ll(r,s){return r>s}function Kv(r,s){return r!=null&&Bt.call(r,s)}function Jv(r,s){return r!=null&&s in Rt(r)}function ty(r,s,u){return r>=Te(s,u)&&r<ue(s,u)}function hl(r,s,u){for(var h=u?Go:ja,p=r[0].length,m=r.length,E=m,w=M(m),T=1/0,k=[];E--;){var U=r[E];E&&s&&(U=qt(U,nr(s))),T=Te(U.length,T),w[E]=!u&&(s||p>=120&&U.length>=120)?new Ei(E&&U):e}U=r[0];var V=-1,X=w[0];t:for(;++V<p&&k.length<T;){var et=U[V],at=s?s(et):et;if(et=u||et!==0?et:0,!(X?ra(X,at):h(k,at,u))){for(E=m;--E;){var yt=w[E];if(!(yt?ra(yt,at):h(r[E],at,u)))continue t}X&&X.push(at),k.push(et)}}return k}function ey(r,s,u,h){return Qr(r,function(p,m,E){s(h,u(p),m,E)}),h}function ha(r,s,u){s=Zn(s,r),r=Lp(r,s);var h=r==null?r:r[Jr(br(s))];return h==null?e:rr(h,r,u)}function Xf(r){return Yt(r)&&Me(r)==te}function ry(r){return Yt(r)&&Me(r)==Je}function ny(r){return Yt(r)&&Me(r)==_t}function ca(r,s,u,h,p){return r===s?!0:r==null||s==null||!Yt(r)&&!Yt(s)?r!==r&&s!==s:iy(r,s,u,h,ca,p)}function iy(r,s,u,h,p,m){var E=ft(r),w=ft(s),T=E?Ae:Ce(r),k=w?Ae:Ce(s);T=T==te?zt:T,k=k==te?zt:k;var U=T==zt,V=k==zt,X=T==k;if(X&&Qn(r)){if(!Qn(s))return!1;E=!0,U=!1}if(X&&!U)return m||(m=new Rr),E||ds(r)?Cp(r,s,u,h,p,m):My(r,s,T,u,h,p,m);if(!(u&H)){var et=U&&Bt.call(r,"__wrapped__"),at=V&&Bt.call(s,"__wrapped__");if(et||at){var yt=et?r.value():r,ut=at?s.value():s;return m||(m=new Rr),p(yt,ut,u,h,m)}}return X?(m||(m=new Rr),By(r,s,u,h,p,m)):!1}function sy(r){return Yt(r)&&Ce(r)==Gt}function cl(r,s,u,h){var p=u.length,m=p,E=!h;if(r==null)return!m;for(r=Rt(r);p--;){var w=u[p];if(E&&w[2]?w[1]!==r[w[0]]:!(w[0]in r))return!1}for(;++p<m;){w=u[p];var T=w[0],k=r[T],U=w[1];if(E&&w[2]){if(k===e&&!(T in r))return!1}else{var V=new Rr;if(h)var X=h(k,U,T,r,s,V);if(!(X===e?ca(U,k,H|I,h,V):X))return!1}}return!0}function Zf(r){if(!$t(r)||qy(r))return!1;var s=wn(r)?sv:pi;return s.test(Di(r))}function ay(r){return Yt(r)&&Me(r)==ee}function uy(r){return Yt(r)&&Ce(r)==Tt}function oy(r){return Yt(r)&&Bu(r.length)&&!!kt[Me(r)]}function jf(r){return typeof r=="function"?r:r==null?Ye:typeof r=="object"?ft(r)?Jf(r[0],r[1]):Kf(r):yd(r)}function fl(r){if(!da(r))return cv(r);var s=[];for(var u in Rt(r))Bt.call(r,u)&&u!="constructor"&&s.push(u);return s}function ly(r){if(!$t(r))return $y(r);var s=da(r),u=[];for(var h in r)h=="constructor"&&(s||!Bt.call(r,h))||u.push(h);return u}function pl(r,s){return r<s}function Qf(r,s){var u=-1,h=$e(r)?M(r.length):[];return Yn(r,function(p,m,E){h[++u]=s(p,m,E)}),h}function Kf(r){var s=Sl(r);return s.length==1&&s[0][2]?Bp(s[0][0],s[0][1]):function(u){return u===r||cl(u,r,s)}}function Jf(r,s){return Nl(r)&&Mp(s)?Bp(Jr(r),s):function(u){var h=Hl(u,r);return h===e&&h===s?ql(u,r):ca(s,h,H|I)}}function mu(r,s,u,h,p){r!==s&&ul(s,function(m,E){if(p||(p=new Rr),$t(m))hy(r,s,E,u,mu,h,p);else{var w=h?h(Bl(r,E),m,E+"",r,s,p):e;w===e&&(w=m),sl(r,E,w)}},Ge)}function hy(r,s,u,h,p,m,E){var w=Bl(r,u),T=Bl(s,u),k=E.get(T);if(k){sl(r,u,k);return}var U=m?m(w,T,u+"",r,s,E):e,V=U===e;if(V){var X=ft(T),et=!X&&Qn(T),at=!X&&!et&&ds(T);U=T,X||et||at?ft(w)?U=w:jt(w)?U=ze(w):et?(V=!1,U=cp(T,!0)):at?(V=!1,U=fp(T,!0)):U=[]:ma(T)||_i(T)?(U=w,_i(w)?U=od(w):(!$t(w)||wn(w))&&(U=Np(T))):V=!1}V&&(E.set(T,U),p(U,T,h,m,E),E.delete(T)),sl(r,u,U)}function tp(r,s){var u=r.length;if(u)return s+=s<0?u:0,An(s,u)?r[s]:e}function ep(r,s,u){s.length?s=qt(s,function(m){return ft(m)?function(E){return Ai(E,m.length===1?m[0]:m)}:m}):s=[Ye];var h=-1;s=qt(s,nr(st()));var p=Qf(r,function(m,E,w){var T=qt(s,function(k){return k(m)});return{criteria:T,index:++h,value:m}});return Fm(p,function(m,E){return wy(m,E,u)})}function cy(r,s){return rp(r,s,function(u,h){return ql(r,h)})}function rp(r,s,u){for(var h=-1,p=s.length,m={};++h<p;){var E=s[h],w=Ai(r,E);u(w,E)&&fa(m,Zn(E,r),w)}return m}function fy(r){return function(s){return Ai(s,r)}}function dl(r,s,u,h){var p=h?Pm:ns,m=-1,E=s.length,w=r;for(r===s&&(s=ze(s)),u&&(w=qt(r,nr(u)));++m<E;)for(var T=0,k=s[m],U=u?u(k):k;(T=p(w,U,T,h))>-1;)w!==r&&au.call(w,T,1),au.call(r,T,1);return r}function np(r,s){for(var u=r?s.length:0,h=u-1;u--;){var p=s[u];if(u==h||p!==m){var m=p;An(p)?au.call(r,p,1):yl(r,p)}}return r}function gl(r,s){return r+lu(Ff()*(s-r+1))}function py(r,s,u,h){for(var p=-1,m=ue(ou((s-r)/(u||1)),0),E=M(m);m--;)E[h?m:++p]=r,r+=u;return E}function ml(r,s){var u="";if(!r||s<1||s>Ot)return u;do s%2&&(u+=r),s=lu(s/2),s&&(r+=r);while(s);return u}function xt(r,s){return Il(Ip(r,s,Ye),r+"")}function dy(r){return Hf(gs(r))}function gy(r,s){var u=gs(r);return Tu(u,bi(s,0,u.length))}function fa(r,s,u,h){if(!$t(r))return r;s=Zn(s,r);for(var p=-1,m=s.length,E=m-1,w=r;w!=null&&++p<m;){var T=Jr(s[p]),k=u;if(T==="__proto__"||T==="constructor"||T==="prototype")return r;if(p!=E){var U=w[T];k=h?h(U,T,w):e,k===e&&(k=$t(U)?U:An(s[p+1])?[]:{})}oa(w,T,k),w=w[T]}return r}var ip=hu?function(r,s){return hu.set(r,s),r}:Ye,my=uu?function(r,s){return uu(r,"toString",{configurable:!0,enumerable:!1,value:Vl(s),writable:!0})}:Ye;function vy(r){return Tu(gs(r))}function Er(r,s,u){var h=-1,p=r.length;s<0&&(s=-s>p?0:p+s),u=u>p?p:u,u<0&&(u+=p),p=s>u?0:u-s>>>0,s>>>=0;for(var m=M(p);++h<p;)m[h]=r[h+s];return m}function yy(r,s){var u;return Yn(r,function(h,p,m){return u=s(h,p,m),!u}),!!u}function vu(r,s,u){var h=0,p=r==null?h:r.length;if(typeof s=="number"&&s===s&&p<=Mr){for(;h<p;){var m=h+p>>>1,E=r[m];E!==null&&!sr(E)&&(u?E<=s:E<s)?h=m+1:p=m}return p}return vl(r,s,Ye,u)}function vl(r,s,u,h){var p=0,m=r==null?0:r.length;if(m===0)return 0;s=u(s);for(var E=s!==s,w=s===null,T=sr(s),k=s===e;p<m;){var U=lu((p+m)/2),V=u(r[U]),X=V!==e,et=V===null,at=V===V,yt=sr(V);if(E)var ut=h||at;else k?ut=at&&(h||X):w?ut=at&&X&&(h||!et):T?ut=at&&X&&!et&&(h||!yt):et||yt?ut=!1:ut=h?V<=s:V<s;ut?p=U+1:m=U}return Te(m,he)}function sp(r,s){for(var u=-1,h=r.length,p=0,m=[];++u<h;){var E=r[u],w=s?s(E):E;if(!u||!Pr(w,T)){var T=w;m[p++]=E===0?0:E}}return m}function ap(r){return typeof r=="number"?r:sr(r)?me:+r}function ir(r){if(typeof r=="string")return r;if(ft(r))return qt(r,ir)+"";if(sr(r))return kf?kf.call(r):"";var s=r+"";return s=="0"&&1/r==-gt?"-0":s}function Xn(r,s,u){var h=-1,p=ja,m=r.length,E=!0,w=[],T=w;if(u)E=!1,p=Go;else if(m>=a){var k=s?null:Oy(r);if(k)return Ka(k);E=!1,p=ra,T=new Ei}else T=s?[]:w;t:for(;++h<m;){var U=r[h],V=s?s(U):U;if(U=u||U!==0?U:0,E&&V===V){for(var X=T.length;X--;)if(T[X]===V)continue t;s&&T.push(V),w.push(U)}else p(T,V,u)||(T!==w&&T.push(V),w.push(U))}return w}function yl(r,s){return s=Zn(s,r),r=Lp(r,s),r==null||delete r[Jr(br(s))]}function up(r,s,u,h){return fa(r,s,u(Ai(r,s)),h)}function yu(r,s,u,h){for(var p=r.length,m=h?p:-1;(h?m--:++m<p)&&s(r[m],m,r););return u?Er(r,h?0:m,h?m+1:p):Er(r,h?m+1:0,h?p:m)}function op(r,s){var u=r;return u instanceof bt&&(u=u.value()),Yo(s,function(h,p){return p.func.apply(p.thisArg,zn([h],p.args))},u)}function xl(r,s,u){var h=r.length;if(h<2)return h?Xn(r[0]):[];for(var p=-1,m=M(h);++p<h;)for(var E=r[p],w=-1;++w<h;)w!=p&&(m[p]=la(m[p]||E,r[w],s,u));return Xn(ye(m,1),s,u)}function lp(r,s,u){for(var h=-1,p=r.length,m=s.length,E={};++h<p;){var w=h<m?s[h]:e;u(E,r[h],w)}return E}function El(r){return jt(r)?r:[]}function bl(r){return typeof r=="function"?r:Ye}function Zn(r,s){return ft(r)?r:Nl(r,s)?[r]:kp(Nt(r))}var xy=xt;function jn(r,s,u){var h=r.length;return u=u===e?h:u,!s&&u>=h?r:Er(r,s,u)}var hp=av||function(r){return ve.clearTimeout(r)};function cp(r,s){if(s)return r.slice();var u=r.length,h=Bf?Bf(u):new r.constructor(u);return r.copy(h),h}function Al(r){var s=new r.constructor(r.byteLength);return new iu(s).set(new iu(r)),s}function Ey(r,s){var u=s?Al(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.byteLength)}function by(r){var s=new r.constructor(r.source,Qs.exec(r));return s.lastIndex=r.lastIndex,s}function Ay(r){return ua?Rt(ua.call(r)):{}}function fp(r,s){var u=s?Al(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.length)}function pp(r,s){if(r!==s){var u=r!==e,h=r===null,p=r===r,m=sr(r),E=s!==e,w=s===null,T=s===s,k=sr(s);if(!w&&!k&&!m&&r>s||m&&E&&T&&!w&&!k||h&&E&&T||!u&&T||!p)return 1;if(!h&&!m&&!k&&r<s||k&&u&&p&&!h&&!m||w&&u&&p||!E&&p||!T)return-1}return 0}function wy(r,s,u){for(var h=-1,p=r.criteria,m=s.criteria,E=p.length,w=u.length;++h<E;){var T=pp(p[h],m[h]);if(T){if(h>=w)return T;var k=u[h];return T*(k=="desc"?-1:1)}}return r.index-s.index}function dp(r,s,u,h){for(var p=-1,m=r.length,E=u.length,w=-1,T=s.length,k=ue(m-E,0),U=M(T+k),V=!h;++w<T;)U[w]=s[w];for(;++p<E;)(V||p<m)&&(U[u[p]]=r[p]);for(;k--;)U[w++]=r[p++];return U}function gp(r,s,u,h){for(var p=-1,m=r.length,E=-1,w=u.length,T=-1,k=s.length,U=ue(m-w,0),V=M(U+k),X=!h;++p<U;)V[p]=r[p];for(var et=p;++T<k;)V[et+T]=s[T];for(;++E<w;)(X||p<m)&&(V[et+u[E]]=r[p++]);return V}function ze(r,s){var u=-1,h=r.length;for(s||(s=M(h));++u<h;)s[u]=r[u];return s}function Kr(r,s,u,h){var p=!u;u||(u={});for(var m=-1,E=s.length;++m<E;){var w=s[m],T=h?h(u[w],r[w],w,u,r):e;T===e&&(T=r[w]),p?xn(u,w,T):oa(u,w,T)}return u}function Dy(r,s){return Kr(r,Ol(r),s)}function _y(r,s){return Kr(r,Sp(r),s)}function xu(r,s){return function(u,h){var p=ft(u)?Nm:Yv,m=s?s():{};return p(u,r,st(h,2),m)}}function cs(r){return xt(function(s,u){var h=-1,p=u.length,m=p>1?u[p-1]:e,E=p>2?u[2]:e;for(m=r.length>3&&typeof m=="function"?(p--,m):e,E&&Be(u[0],u[1],E)&&(m=p<3?e:m,p=1),s=Rt(s);++h<p;){var w=u[h];w&&r(s,w,h,m)}return s})}function mp(r,s){return function(u,h){if(u==null)return u;if(!$e(u))return r(u,h);for(var p=u.length,m=s?p:-1,E=Rt(u);(s?m--:++m<p)&&h(E[m],m,E)!==!1;);return u}}function vp(r){return function(s,u,h){for(var p=-1,m=Rt(s),E=h(s),w=E.length;w--;){var T=E[r?w:++p];if(u(m[T],T,m)===!1)break}return s}}function Ty(r,s,u){var h=s&B,p=pa(r);function m(){var E=this&&this!==ve&&this instanceof m?p:r;return E.apply(h?u:this,arguments)}return m}function yp(r){return function(s){s=Nt(s);var u=is(s)?Lr(s):e,h=u?u[0]:s.charAt(0),p=u?jn(u,1).join(""):s.slice(1);return h[r]()+p}}function fs(r){return function(s){return Yo(md(gd(s).replace(mm,"")),r,"")}}function pa(r){return function(){var s=arguments;switch(s.length){case 0:return new r;case 1:return new r(s[0]);case 2:return new r(s[0],s[1]);case 3:return new r(s[0],s[1],s[2]);case 4:return new r(s[0],s[1],s[2],s[3]);case 5:return new r(s[0],s[1],s[2],s[3],s[4]);case 6:return new r(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new r(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var u=hs(r.prototype),h=r.apply(u,s);return $t(h)?h:u}}function Cy(r,s,u){var h=pa(r);function p(){for(var m=arguments.length,E=M(m),w=m,T=ps(p);w--;)E[w]=arguments[w];var k=m<3&&E[0]!==T&&E[m-1]!==T?[]:$n(E,T);if(m-=k.length,m<u)return wp(r,s,Eu,p.placeholder,e,E,k,e,e,u-m);var U=this&&this!==ve&&this instanceof p?h:r;return rr(U,this,E)}return p}function xp(r){return function(s,u,h){var p=Rt(s);if(!$e(s)){var m=st(u,3);s=pe(s),u=function(w){return m(p[w],w,p)}}var E=r(s,u,h);return E>-1?p[m?s[E]:E]:e}}function Ep(r){return bn(function(s){var u=s.length,h=u,p=yr.prototype.thru;for(r&&s.reverse();h--;){var m=s[h];if(typeof m!="function")throw new vr(l);if(p&&!E&&Du(m)=="wrapper")var E=new yr([],!0)}for(h=E?h:u;++h<u;){m=s[h];var w=Du(m),T=w=="wrapper"?Cl(m):e;T&&Ml(T[0])&&T[1]==(tt|Y|$|ot)&&!T[4].length&&T[9]==1?E=E[Du(T[0])].apply(E,T[3]):E=m.length==1&&Ml(m)?E[w]():E.thru(m)}return function(){var k=arguments,U=k[0];if(E&&k.length==1&&ft(U))return E.plant(U).value();for(var V=0,X=u?s[V].apply(this,k):U;++V<u;)X=s[V].call(this,X);return X}})}function Eu(r,s,u,h,p,m,E,w,T,k){var U=s&tt,V=s&B,X=s&F,et=s&(Y|A),at=s&K,yt=X?e:pa(r);function ut(){for(var Et=arguments.length,wt=M(Et),ar=Et;ar--;)wt[ar]=arguments[ar];if(et)var Ie=ps(ut),ur=Um(wt,Ie);if(h&&(wt=dp(wt,h,p,et)),m&&(wt=gp(wt,m,E,et)),Et-=ur,et&&Et<k){var Qt=$n(wt,Ie);return wp(r,s,Eu,ut.placeholder,u,wt,Qt,w,T,k-Et)}var Fr=V?u:this,_n=X?Fr[r]:r;return Et=wt.length,w?wt=Yy(wt,w):at&&Et>1&&wt.reverse(),U&&T<Et&&(wt.length=T),this&&this!==ve&&this instanceof ut&&(_n=yt||pa(_n)),_n.apply(Fr,wt)}return ut}function bp(r,s){return function(u,h){return ey(u,r,s(h),{})}}function bu(r,s){return function(u,h){var p;if(u===e&&h===e)return s;if(u!==e&&(p=u),h!==e){if(p===e)return h;typeof u=="string"||typeof h=="string"?(u=ir(u),h=ir(h)):(u=ap(u),h=ap(h)),p=r(u,h)}return p}}function wl(r){return bn(function(s){return s=qt(s,nr(st())),xt(function(u){var h=this;return r(s,function(p){return rr(p,h,u)})})})}function Au(r,s){s=s===e?" ":ir(s);var u=s.length;if(u<2)return u?ml(s,r):s;var h=ml(s,ou(r/ss(s)));return is(s)?jn(Lr(h),0,r).join(""):h.slice(0,r)}function Sy(r,s,u,h){var p=s&B,m=pa(r);function E(){for(var w=-1,T=arguments.length,k=-1,U=h.length,V=M(U+T),X=this&&this!==ve&&this instanceof E?m:r;++k<U;)V[k]=h[k];for(;T--;)V[k++]=arguments[++w];return rr(X,p?u:this,V)}return E}function Ap(r){return function(s,u,h){return h&&typeof h!="number"&&Be(s,u,h)&&(u=h=e),s=Dn(s),u===e?(u=s,s=0):u=Dn(u),h=h===e?s<u?1:-1:Dn(h),py(s,u,h,r)}}function wu(r){return function(s,u){return typeof s=="string"&&typeof u=="string"||(s=Ar(s),u=Ar(u)),r(s,u)}}function wp(r,s,u,h,p,m,E,w,T,k){var U=s&Y,V=U?E:e,X=U?e:E,et=U?m:e,at=U?e:m;s|=U?$:q,s&=~(U?q:$),s&W||(s&=~(B|F));var yt=[r,s,p,et,V,at,X,w,T,k],ut=u.apply(e,yt);return Ml(r)&&Rp(ut,yt),ut.placeholder=h,Pp(ut,r,s)}function Dl(r){var s=ae[r];return function(u,h){if(u=Ar(u),h=h==null?0:Te(pt(h),292),h&&Pf(u)){var p=(Nt(u)+"e").split("e"),m=s(p[0]+"e"+(+p[1]+h));return p=(Nt(m)+"e").split("e"),+(p[0]+"e"+(+p[1]-h))}return s(u)}}var Oy=os&&1/Ka(new os([,-0]))[1]==gt?function(r){return new os(r)}:Gl;function Dp(r){return function(s){var u=Ce(s);return u==Gt?tl(s):u==Tt?Gm(s):km(s,r(s))}}function En(r,s,u,h,p,m,E,w){var T=s&F;if(!T&&typeof r!="function")throw new vr(l);var k=h?h.length:0;if(k||(s&=~($|q),h=p=e),E=E===e?E:ue(pt(E),0),w=w===e?w:pt(w),k-=p?p.length:0,s&q){var U=h,V=p;h=p=e}var X=T?e:Cl(r),et=[r,s,u,h,p,U,V,m,E,w];if(X&&zy(et,X),r=et[0],s=et[1],u=et[2],h=et[3],p=et[4],w=et[9]=et[9]===e?T?0:r.length:ue(et[9]-k,0),!w&&s&(Y|A)&&(s&=~(Y|A)),!s||s==B)var at=Ty(r,s,u);else s==Y||s==A?at=Cy(r,s,w):(s==$||s==(B|$))&&!p.length?at=Sy(r,s,u,h):at=Eu.apply(e,et);var yt=X?ip:Rp;return Pp(yt(at,et),r,s)}function _p(r,s,u,h){return r===e||Pr(r,us[u])&&!Bt.call(h,u)?s:r}function Tp(r,s,u,h,p,m){return $t(r)&&$t(s)&&(m.set(s,r),mu(r,s,e,Tp,m),m.delete(s)),r}function Ny(r){return ma(r)?e:r}function Cp(r,s,u,h,p,m){var E=u&H,w=r.length,T=s.length;if(w!=T&&!(E&&T>w))return!1;var k=m.get(r),U=m.get(s);if(k&&U)return k==s&&U==r;var V=-1,X=!0,et=u&I?new Ei:e;for(m.set(r,s),m.set(s,r);++V<w;){var at=r[V],yt=s[V];if(h)var ut=E?h(yt,at,V,s,r,m):h(at,yt,V,r,s,m);if(ut!==e){if(ut)continue;X=!1;break}if(et){if(!Xo(s,function(Et,wt){if(!ra(et,wt)&&(at===Et||p(at,Et,u,h,m)))return et.push(wt)})){X=!1;break}}else if(!(at===yt||p(at,yt,u,h,m))){X=!1;break}}return m.delete(r),m.delete(s),X}function My(r,s,u,h,p,m,E){switch(u){case qe:if(r.byteLength!=s.byteLength||r.byteOffset!=s.byteOffset)return!1;r=r.buffer,s=s.buffer;case Je:return!(r.byteLength!=s.byteLength||!m(new iu(r),new iu(s)));case Vt:case _t:case De:return Pr(+r,+s);case we:return r.name==s.name&&r.message==s.message;case ee:case Ke:return r==s+"";case Gt:var w=tl;case Tt:var T=h&H;if(w||(w=Ka),r.size!=s.size&&!T)return!1;var k=E.get(r);if(k)return k==s;h|=I,E.set(r,s);var U=Cp(w(r),w(s),h,p,m,E);return E.delete(r),U;case He:if(ua)return ua.call(r)==ua.call(s)}return!1}function By(r,s,u,h,p,m){var E=u&H,w=_l(r),T=w.length,k=_l(s),U=k.length;if(T!=U&&!E)return!1;for(var V=T;V--;){var X=w[V];if(!(E?X in s:Bt.call(s,X)))return!1}var et=m.get(r),at=m.get(s);if(et&&at)return et==s&&at==r;var yt=!0;m.set(r,s),m.set(s,r);for(var ut=E;++V<T;){X=w[V];var Et=r[X],wt=s[X];if(h)var ar=E?h(wt,Et,X,s,r,m):h(Et,wt,X,r,s,m);if(!(ar===e?Et===wt||p(Et,wt,u,h,m):ar)){yt=!1;break}ut||(ut=X=="constructor")}if(yt&&!ut){var Ie=r.constructor,ur=s.constructor;Ie!=ur&&"constructor"in r&&"constructor"in s&&!(typeof Ie=="function"&&Ie instanceof Ie&&typeof ur=="function"&&ur instanceof ur)&&(yt=!1)}return m.delete(r),m.delete(s),yt}function bn(r){return Il(Ip(r,e,Wp),r+"")}function _l(r){return Yf(r,pe,Ol)}function Tl(r){return Yf(r,Ge,Sp)}var Cl=hu?function(r){return hu.get(r)}:Gl;function Du(r){for(var s=r.name+"",u=ls[s],h=Bt.call(ls,s)?u.length:0;h--;){var p=u[h],m=p.func;if(m==null||m==r)return p.name}return s}function ps(r){var s=Bt.call(g,"placeholder")?g:r;return s.placeholder}function st(){var r=g.iteratee||zl;return r=r===zl?jf:r,arguments.length?r(arguments[0],arguments[1]):r}function _u(r,s){var u=r.__data__;return Hy(s)?u[typeof s=="string"?"string":"hash"]:u.map}function Sl(r){for(var s=pe(r),u=s.length;u--;){var h=s[u],p=r[h];s[u]=[h,p,Mp(p)]}return s}function wi(r,s){var u=Vm(r,s);return Zf(u)?u:e}function Iy(r){var s=Bt.call(r,yi),u=r[yi];try{r[yi]=e;var h=!0}catch{}var p=ru.call(r);return h&&(s?r[yi]=u:delete r[yi]),p}var Ol=rl?function(r){return r==null?[]:(r=Rt(r),Vn(rl(r),function(s){return Lf.call(r,s)}))}:Yl,Sp=rl?function(r){for(var s=[];r;)zn(s,Ol(r)),r=su(r);return s}:Yl,Ce=Me;(nl&&Ce(new nl(new ArrayBuffer(1)))!=qe||ia&&Ce(new ia)!=Gt||il&&Ce(il.resolve())!=Yr||os&&Ce(new os)!=Tt||sa&&Ce(new sa)!=cr)&&(Ce=function(r){var s=Me(r),u=s==zt?r.constructor:e,h=u?Di(u):"";if(h)switch(h){case gv:return qe;case mv:return Gt;case vv:return Yr;case yv:return Tt;case xv:return cr}return s});function Ly(r,s,u){for(var h=-1,p=u.length;++h<p;){var m=u[h],E=m.size;switch(m.type){case"drop":r+=E;break;case"dropRight":s-=E;break;case"take":s=Te(s,r+E);break;case"takeRight":r=ue(r,s-E);break}}return{start:r,end:s}}function Ry(r){var s=r.match(ko);return s?s[1].split(Va):[]}function Op(r,s,u){s=Zn(s,r);for(var h=-1,p=s.length,m=!1;++h<p;){var E=Jr(s[h]);if(!(m=r!=null&&u(r,E)))break;r=r[E]}return m||++h!=p?m:(p=r==null?0:r.length,!!p&&Bu(p)&&An(E,p)&&(ft(r)||_i(r)))}function Py(r){var s=r.length,u=new r.constructor(s);return s&&typeof r[0]=="string"&&Bt.call(r,"index")&&(u.index=r.index,u.input=r.input),u}function Np(r){return typeof r.constructor=="function"&&!da(r)?hs(su(r)):{}}function Fy(r,s,u){var h=r.constructor;switch(s){case Je:return Al(r);case Vt:case _t:return new h(+r);case qe:return Ey(r,u);case Rn:case Pn:case Xr:case pn:case li:case L:case Q:case rt:case At:return fp(r,u);case Gt:return new h;case De:case Ke:return new h(r);case ee:return by(r);case Tt:return new h;case He:return Ay(r)}}function ky(r,s){var u=s.length;if(!u)return r;var h=u-1;return s[h]=(u>1?"& ":"")+s[h],s=s.join(u>2?", ":" "),r.replace(js,`{
12
+ */Wa.exports,function(r,t){(function(){var e,n="4.17.21",a=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",d=500,y="__lodash_placeholder__",A=1,_=2,C=4,F=1,N=2,M=1,R=2,q=4,z=8,w=16,L=32,k=64,j=128,tt=256,Z=512,rt=30,J="...",st=800,ht=16,ct=1,ft=2,O=3,yt=1/0,Bt=9007199254740991,Re=17976931348623157e292,be=NaN,se=4294967295,ve=se-1,qr=se>>>1,Le=[["ary",j],["bind",M],["bindKey",R],["curry",z],["curryRight",w],["flip",Z],["partial",L],["partialRight",k],["rearg",tt]],ae="[object Arguments]",Se="[object Array]",Vt="[object AsyncFunction]",Gt="[object Boolean]",Ct="[object Date]",Ht="[object DOMException]",Oe="[object Error]",Pe="[object Function]",ze="[object GeneratorFunction]",Qt="[object Map]",Ne="[object Number]",me="[object Null]",Yt="[object Object]",ii="[object Promise]",Ai="[object Proxy]",ue="[object RegExp]",Dt="[object Set]",nr="[object String]",Ge="[object Symbol]",bi="[object Undefined]",mr="[object WeakMap]",Gi="[object WeakSet]",sr="[object ArrayBuffer]",Ye="[object DataView]",Yi="[object Float32Array]",Xi="[object Float64Array]",ni="[object Int8Array]",wi="[object Int16Array]",bn="[object Int32Array]",P="[object Uint8Array]",it="[object Uint8ClampedArray]",at="[object Uint16Array]",wt="[object Uint32Array]",vt=/\b__p \+= '';/g,fe=/\b(__p \+=) '' \+/g,Me=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xr=/&(?:amp|lt|gt|quot|#39);/g,Zi=/[&<>"']/g,ar=RegExp(xr.source),wn=RegExp(Zi.source),Qi=/<%-([\s\S]+?)%>/g,si=/<%([\s\S]+?)%>/g,Tn=/<%=([\s\S]+?)%>/g,_n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ji=/^\w*$/,el=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ki=/[\\^$.*+?()[\]{}|]/g,rl=RegExp(Ki.source),la=/^\s+/,su=/\s/,ha=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,il=/\{\n\/\* \[wrapped with (.+)\] \*/,au=/,? & /,nl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,uu=/[()=,{}\[\]\/\s]/,ou=/\\(\\)?/g,lu=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ca=/\w*$/,fa=/^[-+]0x[0-9a-f]+$/i,Ti=/^0b[01]+$/i,Cn=/^\[object .+?Constructor\]$/,Dn=/^0o[0-7]+$/i,os=/^(?:0|[1-9]\d*)$/,pa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ls=/($^)/,sl=/['\n\r\u2028\u2029\\]/g,_i="\\ud800-\\udfff",Xe="\\u0300-\\u036f",Ji="\\ufe20-\\ufe2f",ai="\\u20d0-\\u20ff",Er=Xe+Ji+ai,tn="\\u2700-\\u27bf",ur="a-z\\xdf-\\xf6\\xf8-\\xff",Wr="\\xac\\xb1\\xd7\\xf7",hu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",cu="\\u2000-\\u206f",hs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ze="A-Z\\xc0-\\xd6\\xd8-\\xde",Sn="\\ufe0e\\ufe0f",cs=Wr+hu+cu+hs,On="['’]",da="["+_i+"]",fs="["+cs+"]",Ci="["+Er+"]",Vr="\\d+",al="["+tn+"]",ga="["+ur+"]",ps="[^"+_i+cs+Vr+tn+ur+Ze+"]",ds="\\ud83c[\\udffb-\\udfff]",ul="(?:"+Ci+"|"+ds+")",fu="[^"+_i+"]",g="(?:\\ud83c[\\udde6-\\uddff]){2}",x="[\\ud800-\\udbff][\\udc00-\\udfff]",b="["+Ze+"]",B="\\u200d",G="(?:"+ga+"|"+ps+")",K="(?:"+b+"|"+ps+")",mt="(?:"+On+"(?:d|ll|m|re|s|t|ve))?",Jt="(?:"+On+"(?:D|LL|M|RE|S|T|VE))?",oe=ul+"?",xe="["+Sn+"]?",Ar="(?:"+B+"(?:"+[fu,g,x].join("|")+")"+xe+oe+")*",dv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gv="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",$f=xe+oe+Ar,yv="(?:"+[al,g,x].join("|")+")"+$f,vv="(?:"+[fu+Ci+"?",Ci,g,x,da].join("|")+")",mv=RegExp(On,"g"),xv=RegExp(Ci,"g"),ol=RegExp(ds+"(?="+ds+")|"+vv+$f,"g"),Ev=RegExp([b+"?"+ga+"+"+mt+"(?="+[fs,b,"$"].join("|")+")",K+"+"+Jt+"(?="+[fs,b+G,"$"].join("|")+")",b+"?"+G+"+"+mt,b+"+"+Jt,gv,dv,Vr,yv].join("|"),"g"),Av=RegExp("["+B+_i+Er+Sn+"]"),bv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wv=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Tv=-1,qt={};qt[Yi]=qt[Xi]=qt[ni]=qt[wi]=qt[bn]=qt[P]=qt[it]=qt[at]=qt[wt]=!0,qt[ae]=qt[Se]=qt[sr]=qt[Gt]=qt[Ye]=qt[Ct]=qt[Oe]=qt[Pe]=qt[Qt]=qt[Ne]=qt[Yt]=qt[ue]=qt[Dt]=qt[nr]=qt[mr]=!1;var kt={};kt[ae]=kt[Se]=kt[sr]=kt[Ye]=kt[Gt]=kt[Ct]=kt[Yi]=kt[Xi]=kt[ni]=kt[wi]=kt[bn]=kt[Qt]=kt[Ne]=kt[Yt]=kt[ue]=kt[Dt]=kt[nr]=kt[Ge]=kt[P]=kt[it]=kt[at]=kt[wt]=!0,kt[Oe]=kt[Pe]=kt[mr]=!1;var _v={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Cv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Dv={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Sv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ov=parseFloat,Nv=parseInt,zf=typeof Os=="object"&&Os&&Os.Object===Object&&Os,Mv=typeof self=="object"&&self&&self.Object===Object&&self,we=zf||Mv||Function("return this")(),ll=t&&!t.nodeType&&t,Nn=ll&&!0&&r&&!r.nodeType&&r,Gf=Nn&&Nn.exports===ll,hl=Gf&&zf.process,br=function(){try{var D=Nn&&Nn.require&&Nn.require("util").types;return D||hl&&hl.binding&&hl.binding("util")}catch{}}(),Yf=br&&br.isArrayBuffer,Xf=br&&br.isDate,Zf=br&&br.isMap,Qf=br&&br.isRegExp,jf=br&&br.isSet,Kf=br&&br.isTypedArray;function or(D,U,I){switch(I.length){case 0:return D.call(U);case 1:return D.call(U,I[0]);case 2:return D.call(U,I[0],I[1]);case 3:return D.call(U,I[0],I[1],I[2])}return D.apply(U,I)}function Bv(D,U,I,et){for(var pt=-1,Nt=D==null?0:D.length;++pt<Nt;){var pe=D[pt];U(et,pe,I(pe),D)}return et}function wr(D,U){for(var I=-1,et=D==null?0:D.length;++I<et&&U(D[I],I,D)!==!1;);return D}function Iv(D,U){for(var I=D==null?0:D.length;I--&&U(D[I],I,D)!==!1;);return D}function Jf(D,U){for(var I=-1,et=D==null?0:D.length;++I<et;)if(!U(D[I],I,D))return!1;return!0}function en(D,U){for(var I=-1,et=D==null?0:D.length,pt=0,Nt=[];++I<et;){var pe=D[I];U(pe,I,D)&&(Nt[pt++]=pe)}return Nt}function pu(D,U){var I=D==null?0:D.length;return!!I&&gs(D,U,0)>-1}function cl(D,U,I){for(var et=-1,pt=D==null?0:D.length;++et<pt;)if(I(U,D[et]))return!0;return!1}function $t(D,U){for(var I=-1,et=D==null?0:D.length,pt=Array(et);++I<et;)pt[I]=U(D[I],I,D);return pt}function rn(D,U){for(var I=-1,et=U.length,pt=D.length;++I<et;)D[pt+I]=U[I];return D}function fl(D,U,I,et){var pt=-1,Nt=D==null?0:D.length;for(et&&Nt&&(I=D[++pt]);++pt<Nt;)I=U(I,D[pt],pt,D);return I}function Rv(D,U,I,et){var pt=D==null?0:D.length;for(et&&pt&&(I=D[--pt]);pt--;)I=U(I,D[pt],pt,D);return I}function pl(D,U){for(var I=-1,et=D==null?0:D.length;++I<et;)if(U(D[I],I,D))return!0;return!1}var Lv=dl("length");function Pv(D){return D.split("")}function Fv(D){return D.match(nl)||[]}function tp(D,U,I){var et;return I(D,function(pt,Nt,pe){if(U(pt,Nt,pe))return et=Nt,!1}),et}function du(D,U,I,et){for(var pt=D.length,Nt=I+(et?1:-1);et?Nt--:++Nt<pt;)if(U(D[Nt],Nt,D))return Nt;return-1}function gs(D,U,I){return U===U?Zv(D,U,I):du(D,ep,I)}function Uv(D,U,I,et){for(var pt=I-1,Nt=D.length;++pt<Nt;)if(et(D[pt],U))return pt;return-1}function ep(D){return D!==D}function rp(D,U){var I=D==null?0:D.length;return I?yl(D,U)/I:be}function dl(D){return function(U){return U==null?e:U[D]}}function gl(D){return function(U){return D==null?e:D[U]}}function ip(D,U,I,et,pt){return pt(D,function(Nt,pe,Ut){I=et?(et=!1,Nt):U(I,Nt,pe,Ut)}),I}function kv(D,U){var I=D.length;for(D.sort(U);I--;)D[I]=D[I].value;return D}function yl(D,U){for(var I,et=-1,pt=D.length;++et<pt;){var Nt=U(D[et]);Nt!==e&&(I=I===e?Nt:I+Nt)}return I}function vl(D,U){for(var I=-1,et=Array(D);++I<D;)et[I]=U(I);return et}function Hv(D,U){return $t(U,function(I){return[I,D[I]]})}function np(D){return D&&D.slice(0,op(D)+1).replace(la,"")}function lr(D){return function(U){return D(U)}}function ml(D,U){return $t(U,function(I){return D[I]})}function ya(D,U){return D.has(U)}function sp(D,U){for(var I=-1,et=D.length;++I<et&&gs(U,D[I],0)>-1;);return I}function ap(D,U){for(var I=D.length;I--&&gs(U,D[I],0)>-1;);return I}function qv(D,U){for(var I=D.length,et=0;I--;)D[I]===U&&++et;return et}var Wv=gl(_v),Vv=gl(Cv);function $v(D){return"\\"+Sv[D]}function zv(D,U){return D==null?e:D[U]}function ys(D){return Av.test(D)}function Gv(D){return bv.test(D)}function Yv(D){for(var U,I=[];!(U=D.next()).done;)I.push(U.value);return I}function xl(D){var U=-1,I=Array(D.size);return D.forEach(function(et,pt){I[++U]=[pt,et]}),I}function up(D,U){return function(I){return D(U(I))}}function nn(D,U){for(var I=-1,et=D.length,pt=0,Nt=[];++I<et;){var pe=D[I];(pe===U||pe===y)&&(D[I]=y,Nt[pt++]=I)}return Nt}function gu(D){var U=-1,I=Array(D.size);return D.forEach(function(et){I[++U]=et}),I}function Xv(D){var U=-1,I=Array(D.size);return D.forEach(function(et){I[++U]=[et,et]}),I}function Zv(D,U,I){for(var et=I-1,pt=D.length;++et<pt;)if(D[et]===U)return et;return-1}function Qv(D,U,I){for(var et=I+1;et--;)if(D[et]===U)return et;return et}function vs(D){return ys(D)?Kv(D):Lv(D)}function $r(D){return ys(D)?Jv(D):Pv(D)}function op(D){for(var U=D.length;U--&&su.test(D.charAt(U)););return U}var jv=gl(Dv);function Kv(D){for(var U=ol.lastIndex=0;ol.test(D);)++U;return U}function Jv(D){return D.match(ol)||[]}function tm(D){return D.match(Ev)||[]}var em=function D(U){U=U==null?we:ms.defaults(we.Object(),U,ms.pick(we,wv));var I=U.Array,et=U.Date,pt=U.Error,Nt=U.Function,pe=U.Math,Ut=U.Object,El=U.RegExp,rm=U.String,Tr=U.TypeError,yu=I.prototype,im=Nt.prototype,xs=Ut.prototype,vu=U["__core-js_shared__"],mu=im.toString,Lt=xs.hasOwnProperty,nm=0,lp=function(){var i=/[^.]+$/.exec(vu&&vu.keys&&vu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),xu=xs.toString,sm=mu.call(Ut),am=we._,um=El("^"+mu.call(Lt).replace(Ki,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Eu=Gf?U.Buffer:e,sn=U.Symbol,Au=U.Uint8Array,hp=Eu?Eu.allocUnsafe:e,bu=up(Ut.getPrototypeOf,Ut),cp=Ut.create,fp=xs.propertyIsEnumerable,wu=yu.splice,pp=sn?sn.isConcatSpreadable:e,va=sn?sn.iterator:e,Mn=sn?sn.toStringTag:e,Tu=function(){try{var i=Pn(Ut,"defineProperty");return i({},"",{}),i}catch{}}(),om=U.clearTimeout!==we.clearTimeout&&U.clearTimeout,lm=et&&et.now!==we.Date.now&&et.now,hm=U.setTimeout!==we.setTimeout&&U.setTimeout,_u=pe.ceil,Cu=pe.floor,Al=Ut.getOwnPropertySymbols,cm=Eu?Eu.isBuffer:e,dp=U.isFinite,fm=yu.join,pm=up(Ut.keys,Ut),de=pe.max,Be=pe.min,dm=et.now,gm=U.parseInt,gp=pe.random,ym=yu.reverse,bl=Pn(U,"DataView"),ma=Pn(U,"Map"),wl=Pn(U,"Promise"),Es=Pn(U,"Set"),xa=Pn(U,"WeakMap"),Ea=Pn(Ut,"create"),Du=xa&&new xa,As={},vm=Fn(bl),mm=Fn(ma),xm=Fn(wl),Em=Fn(Es),Am=Fn(xa),Su=sn?sn.prototype:e,Aa=Su?Su.valueOf:e,yp=Su?Su.toString:e;function v(i){if(jt(i)&&!dt(i)&&!(i instanceof bt)){if(i instanceof _r)return i;if(Lt.call(i,"__wrapped__"))return vd(i)}return new _r(i)}var bs=function(){function i(){}return function(s){if(!Xt(s))return{};if(cp)return cp(s);i.prototype=s;var o=new i;return i.prototype=e,o}}();function Ou(){}function _r(i,s){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=e}v.templateSettings={escape:Qi,evaluate:si,interpolate:Tn,variable:"",imports:{_:v}},v.prototype=Ou.prototype,v.prototype.constructor=v,_r.prototype=bs(Ou.prototype),_r.prototype.constructor=_r;function bt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=se,this.__views__=[]}function bm(){var i=new bt(this.__wrapped__);return i.__actions__=Qe(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Qe(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Qe(this.__views__),i}function wm(){if(this.__filtered__){var i=new bt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function Tm(){var i=this.__wrapped__.value(),s=this.__dir__,o=dt(i),h=s<0,p=o?i.length:0,m=P1(0,p,this.__views__),E=m.start,T=m.end,S=T-E,W=h?T:E-1,V=this.__iteratees__,$=V.length,Q=0,nt=Be(S,this.__takeCount__);if(!o||!h&&p==S&&nt==S)return Hp(i,this.__actions__);var ot=[];t:for(;S--&&Q<nt;){W+=s;for(var xt=-1,lt=i[W];++xt<$;){var At=V[xt],Tt=At.iteratee,fr=At.type,ke=Tt(lt);if(fr==ft)lt=ke;else if(!ke){if(fr==ct)continue t;break t}}ot[Q++]=lt}return ot}bt.prototype=bs(Ou.prototype),bt.prototype.constructor=bt;function Bn(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function _m(){this.__data__=Ea?Ea(null):{},this.size=0}function Cm(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function Dm(i){var s=this.__data__;if(Ea){var o=s[i];return o===f?e:o}return Lt.call(s,i)?s[i]:e}function Sm(i){var s=this.__data__;return Ea?s[i]!==e:Lt.call(s,i)}function Om(i,s){var o=this.__data__;return this.size+=this.has(i)?0:1,o[i]=Ea&&s===e?f:s,this}Bn.prototype.clear=_m,Bn.prototype.delete=Cm,Bn.prototype.get=Dm,Bn.prototype.has=Sm,Bn.prototype.set=Om;function Di(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function Nm(){this.__data__=[],this.size=0}function Mm(i){var s=this.__data__,o=Nu(s,i);if(o<0)return!1;var h=s.length-1;return o==h?s.pop():wu.call(s,o,1),--this.size,!0}function Bm(i){var s=this.__data__,o=Nu(s,i);return o<0?e:s[o][1]}function Im(i){return Nu(this.__data__,i)>-1}function Rm(i,s){var o=this.__data__,h=Nu(o,i);return h<0?(++this.size,o.push([i,s])):o[h][1]=s,this}Di.prototype.clear=Nm,Di.prototype.delete=Mm,Di.prototype.get=Bm,Di.prototype.has=Im,Di.prototype.set=Rm;function Si(i){var s=-1,o=i==null?0:i.length;for(this.clear();++s<o;){var h=i[s];this.set(h[0],h[1])}}function Lm(){this.size=0,this.__data__={hash:new Bn,map:new(ma||Di),string:new Bn}}function Pm(i){var s=Wu(this,i).delete(i);return this.size-=s?1:0,s}function Fm(i){return Wu(this,i).get(i)}function Um(i){return Wu(this,i).has(i)}function km(i,s){var o=Wu(this,i),h=o.size;return o.set(i,s),this.size+=o.size==h?0:1,this}Si.prototype.clear=Lm,Si.prototype.delete=Pm,Si.prototype.get=Fm,Si.prototype.has=Um,Si.prototype.set=km;function In(i){var s=-1,o=i==null?0:i.length;for(this.__data__=new Si;++s<o;)this.add(i[s])}function Hm(i){return this.__data__.set(i,f),this}function qm(i){return this.__data__.has(i)}In.prototype.add=In.prototype.push=Hm,In.prototype.has=qm;function zr(i){var s=this.__data__=new Di(i);this.size=s.size}function Wm(){this.__data__=new Di,this.size=0}function Vm(i){var s=this.__data__,o=s.delete(i);return this.size=s.size,o}function $m(i){return this.__data__.get(i)}function zm(i){return this.__data__.has(i)}function Gm(i,s){var o=this.__data__;if(o instanceof Di){var h=o.__data__;if(!ma||h.length<a-1)return h.push([i,s]),this.size=++o.size,this;o=this.__data__=new Si(h)}return o.set(i,s),this.size=o.size,this}zr.prototype.clear=Wm,zr.prototype.delete=Vm,zr.prototype.get=$m,zr.prototype.has=zm,zr.prototype.set=Gm;function vp(i,s){var o=dt(i),h=!o&&Un(i),p=!o&&!h&&hn(i),m=!o&&!h&&!p&&Cs(i),E=o||h||p||m,T=E?vl(i.length,rm):[],S=T.length;for(var W in i)(s||Lt.call(i,W))&&!(E&&(W=="length"||p&&(W=="offset"||W=="parent")||m&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||Bi(W,S)))&&T.push(W);return T}function mp(i){var s=i.length;return s?i[Rl(0,s-1)]:e}function Ym(i,s){return Vu(Qe(i),Rn(s,0,i.length))}function Xm(i){return Vu(Qe(i))}function Tl(i,s,o){(o!==e&&!Gr(i[s],o)||o===e&&!(s in i))&&Oi(i,s,o)}function ba(i,s,o){var h=i[s];(!(Lt.call(i,s)&&Gr(h,o))||o===e&&!(s in i))&&Oi(i,s,o)}function Nu(i,s){for(var o=i.length;o--;)if(Gr(i[o][0],s))return o;return-1}function Zm(i,s,o,h){return an(i,function(p,m,E){s(h,p,o(p),E)}),h}function xp(i,s){return i&&oi(s,Ee(s),i)}function Qm(i,s){return i&&oi(s,Ke(s),i)}function Oi(i,s,o){s=="__proto__"&&Tu?Tu(i,s,{configurable:!0,enumerable:!0,value:o,writable:!0}):i[s]=o}function _l(i,s){for(var o=-1,h=s.length,p=I(h),m=i==null;++o<h;)p[o]=m?e:sh(i,s[o]);return p}function Rn(i,s,o){return i===i&&(o!==e&&(i=i<=o?i:o),s!==e&&(i=i>=s?i:s)),i}function Cr(i,s,o,h,p,m){var E,T=s&A,S=s&_,W=s&C;if(o&&(E=p?o(i,h,p,m):o(i)),E!==e)return E;if(!Xt(i))return i;var V=dt(i);if(V){if(E=U1(i),!T)return Qe(i,E)}else{var $=Ie(i),Q=$==Pe||$==ze;if(hn(i))return Vp(i,T);if($==Yt||$==ae||Q&&!p){if(E=S||Q?{}:od(i),!T)return S?D1(i,Qm(E,i)):C1(i,xp(E,i))}else{if(!kt[$])return p?i:{};E=k1(i,$,T)}}m||(m=new zr);var nt=m.get(i);if(nt)return nt;m.set(i,E),Fd(i)?i.forEach(function(lt){E.add(Cr(lt,s,o,lt,i,m))}):Ld(i)&&i.forEach(function(lt,At){E.set(At,Cr(lt,s,o,At,i,m))});var ot=W?S?zl:$l:S?Ke:Ee,xt=V?e:ot(i);return wr(xt||i,function(lt,At){xt&&(At=lt,lt=i[At]),ba(E,At,Cr(lt,s,o,At,i,m))}),E}function jm(i){var s=Ee(i);return function(o){return Ep(o,i,s)}}function Ep(i,s,o){var h=o.length;if(i==null)return!h;for(i=Ut(i);h--;){var p=o[h],m=s[p],E=i[p];if(E===e&&!(p in i)||!m(E))return!1}return!0}function Ap(i,s,o){if(typeof i!="function")throw new Tr(l);return Oa(function(){i.apply(e,o)},s)}function wa(i,s,o,h){var p=-1,m=pu,E=!0,T=i.length,S=[],W=s.length;if(!T)return S;o&&(s=$t(s,lr(o))),h?(m=cl,E=!1):s.length>=a&&(m=ya,E=!1,s=new In(s));t:for(;++p<T;){var V=i[p],$=o==null?V:o(V);if(V=h||V!==0?V:0,E&&$===$){for(var Q=W;Q--;)if(s[Q]===$)continue t;S.push(V)}else m(s,$,h)||S.push(V)}return S}var an=Xp(ui),bp=Xp(Dl,!0);function Km(i,s){var o=!0;return an(i,function(h,p,m){return o=!!s(h,p,m),o}),o}function Mu(i,s,o){for(var h=-1,p=i.length;++h<p;){var m=i[h],E=s(m);if(E!=null&&(T===e?E===E&&!cr(E):o(E,T)))var T=E,S=m}return S}function Jm(i,s,o,h){var p=i.length;for(o=gt(o),o<0&&(o=-o>p?0:p+o),h=h===e||h>p?p:gt(h),h<0&&(h+=p),h=o>h?0:kd(h);o<h;)i[o++]=s;return i}function wp(i,s){var o=[];return an(i,function(h,p,m){s(h,p,m)&&o.push(h)}),o}function Te(i,s,o,h,p){var m=-1,E=i.length;for(o||(o=q1),p||(p=[]);++m<E;){var T=i[m];s>0&&o(T)?s>1?Te(T,s-1,o,h,p):rn(p,T):h||(p[p.length]=T)}return p}var Cl=Zp(),Tp=Zp(!0);function ui(i,s){return i&&Cl(i,s,Ee)}function Dl(i,s){return i&&Tp(i,s,Ee)}function Bu(i,s){return en(s,function(o){return Ii(i[o])})}function Ln(i,s){s=on(s,i);for(var o=0,h=s.length;i!=null&&o<h;)i=i[li(s[o++])];return o&&o==h?i:e}function _p(i,s,o){var h=s(i);return dt(i)?h:rn(h,o(i))}function Fe(i){return i==null?i===e?bi:me:Mn&&Mn in Ut(i)?L1(i):X1(i)}function Sl(i,s){return i>s}function t1(i,s){return i!=null&&Lt.call(i,s)}function e1(i,s){return i!=null&&s in Ut(i)}function r1(i,s,o){return i>=Be(s,o)&&i<de(s,o)}function Ol(i,s,o){for(var h=o?cl:pu,p=i[0].length,m=i.length,E=m,T=I(m),S=1/0,W=[];E--;){var V=i[E];E&&s&&(V=$t(V,lr(s))),S=Be(V.length,S),T[E]=!o&&(s||p>=120&&V.length>=120)?new In(E&&V):e}V=i[0];var $=-1,Q=T[0];t:for(;++$<p&&W.length<S;){var nt=V[$],ot=s?s(nt):nt;if(nt=o||nt!==0?nt:0,!(Q?ya(Q,ot):h(W,ot,o))){for(E=m;--E;){var xt=T[E];if(!(xt?ya(xt,ot):h(i[E],ot,o)))continue t}Q&&Q.push(ot),W.push(nt)}}return W}function i1(i,s,o,h){return ui(i,function(p,m,E){s(h,o(p),m,E)}),h}function Ta(i,s,o){s=on(s,i),i=fd(i,s);var h=i==null?i:i[li(Sr(s))];return h==null?e:or(h,i,o)}function Cp(i){return jt(i)&&Fe(i)==ae}function n1(i){return jt(i)&&Fe(i)==sr}function s1(i){return jt(i)&&Fe(i)==Ct}function _a(i,s,o,h,p){return i===s?!0:i==null||s==null||!jt(i)&&!jt(s)?i!==i&&s!==s:a1(i,s,o,h,_a,p)}function a1(i,s,o,h,p,m){var E=dt(i),T=dt(s),S=E?Se:Ie(i),W=T?Se:Ie(s);S=S==ae?Yt:S,W=W==ae?Yt:W;var V=S==Yt,$=W==Yt,Q=S==W;if(Q&&hn(i)){if(!hn(s))return!1;E=!0,V=!1}if(Q&&!V)return m||(m=new zr),E||Cs(i)?sd(i,s,o,h,p,m):I1(i,s,S,o,h,p,m);if(!(o&F)){var nt=V&&Lt.call(i,"__wrapped__"),ot=$&&Lt.call(s,"__wrapped__");if(nt||ot){var xt=nt?i.value():i,lt=ot?s.value():s;return m||(m=new zr),p(xt,lt,o,h,m)}}return Q?(m||(m=new zr),R1(i,s,o,h,p,m)):!1}function u1(i){return jt(i)&&Ie(i)==Qt}function Nl(i,s,o,h){var p=o.length,m=p,E=!h;if(i==null)return!m;for(i=Ut(i);p--;){var T=o[p];if(E&&T[2]?T[1]!==i[T[0]]:!(T[0]in i))return!1}for(;++p<m;){T=o[p];var S=T[0],W=i[S],V=T[1];if(E&&T[2]){if(W===e&&!(S in i))return!1}else{var $=new zr;if(h)var Q=h(W,V,S,i,s,$);if(!(Q===e?_a(V,W,F|N,h,$):Q))return!1}}return!0}function Dp(i){if(!Xt(i)||V1(i))return!1;var s=Ii(i)?um:Cn;return s.test(Fn(i))}function o1(i){return jt(i)&&Fe(i)==ue}function l1(i){return jt(i)&&Ie(i)==Dt}function h1(i){return jt(i)&&Zu(i.length)&&!!qt[Fe(i)]}function Sp(i){return typeof i=="function"?i:i==null?Je:typeof i=="object"?dt(i)?Mp(i[0],i[1]):Np(i):Qd(i)}function Ml(i){if(!Sa(i))return pm(i);var s=[];for(var o in Ut(i))Lt.call(i,o)&&o!="constructor"&&s.push(o);return s}function c1(i){if(!Xt(i))return Y1(i);var s=Sa(i),o=[];for(var h in i)h=="constructor"&&(s||!Lt.call(i,h))||o.push(h);return o}function Bl(i,s){return i<s}function Op(i,s){var o=-1,h=je(i)?I(i.length):[];return an(i,function(p,m,E){h[++o]=s(p,m,E)}),h}function Np(i){var s=Yl(i);return s.length==1&&s[0][2]?hd(s[0][0],s[0][1]):function(o){return o===i||Nl(o,i,s)}}function Mp(i,s){return Zl(i)&&ld(s)?hd(li(i),s):function(o){var h=sh(o,i);return h===e&&h===s?ah(o,i):_a(s,h,F|N)}}function Iu(i,s,o,h,p){i!==s&&Cl(s,function(m,E){if(p||(p=new zr),Xt(m))f1(i,s,E,o,Iu,h,p);else{var T=h?h(jl(i,E),m,E+"",i,s,p):e;T===e&&(T=m),Tl(i,E,T)}},Ke)}function f1(i,s,o,h,p,m,E){var T=jl(i,o),S=jl(s,o),W=E.get(S);if(W){Tl(i,o,W);return}var V=m?m(T,S,o+"",i,s,E):e,$=V===e;if($){var Q=dt(S),nt=!Q&&hn(S),ot=!Q&&!nt&&Cs(S);V=S,Q||nt||ot?dt(T)?V=T:te(T)?V=Qe(T):nt?($=!1,V=Vp(S,!0)):ot?($=!1,V=$p(S,!0)):V=[]:Na(S)||Un(S)?(V=T,Un(T)?V=Hd(T):(!Xt(T)||Ii(T))&&(V=od(S))):$=!1}$&&(E.set(S,V),p(V,S,h,m,E),E.delete(S)),Tl(i,o,V)}function Bp(i,s){var o=i.length;if(o)return s+=s<0?o:0,Bi(s,o)?i[s]:e}function Ip(i,s,o){s.length?s=$t(s,function(m){return dt(m)?function(E){return Ln(E,m.length===1?m[0]:m)}:m}):s=[Je];var h=-1;s=$t(s,lr(ut()));var p=Op(i,function(m,E,T){var S=$t(s,function(W){return W(m)});return{criteria:S,index:++h,value:m}});return kv(p,function(m,E){return _1(m,E,o)})}function p1(i,s){return Rp(i,s,function(o,h){return ah(i,h)})}function Rp(i,s,o){for(var h=-1,p=s.length,m={};++h<p;){var E=s[h],T=Ln(i,E);o(T,E)&&Ca(m,on(E,i),T)}return m}function d1(i){return function(s){return Ln(s,i)}}function Il(i,s,o,h){var p=h?Uv:gs,m=-1,E=s.length,T=i;for(i===s&&(s=Qe(s)),o&&(T=$t(i,lr(o)));++m<E;)for(var S=0,W=s[m],V=o?o(W):W;(S=p(T,V,S,h))>-1;)T!==i&&wu.call(T,S,1),wu.call(i,S,1);return i}function Lp(i,s){for(var o=i?s.length:0,h=o-1;o--;){var p=s[o];if(o==h||p!==m){var m=p;Bi(p)?wu.call(i,p,1):Fl(i,p)}}return i}function Rl(i,s){return i+Cu(gp()*(s-i+1))}function g1(i,s,o,h){for(var p=-1,m=de(_u((s-i)/(o||1)),0),E=I(m);m--;)E[h?m:++p]=i,i+=o;return E}function Ll(i,s){var o="";if(!i||s<1||s>Bt)return o;do s%2&&(o+=i),s=Cu(s/2),s&&(i+=i);while(s);return o}function Et(i,s){return Kl(cd(i,s,Je),i+"")}function y1(i){return mp(Ds(i))}function v1(i,s){var o=Ds(i);return Vu(o,Rn(s,0,o.length))}function Ca(i,s,o,h){if(!Xt(i))return i;s=on(s,i);for(var p=-1,m=s.length,E=m-1,T=i;T!=null&&++p<m;){var S=li(s[p]),W=o;if(S==="__proto__"||S==="constructor"||S==="prototype")return i;if(p!=E){var V=T[S];W=h?h(V,S,T):e,W===e&&(W=Xt(V)?V:Bi(s[p+1])?[]:{})}ba(T,S,W),T=T[S]}return i}var Pp=Du?function(i,s){return Du.set(i,s),i}:Je,m1=Tu?function(i,s){return Tu(i,"toString",{configurable:!0,enumerable:!1,value:oh(s),writable:!0})}:Je;function x1(i){return Vu(Ds(i))}function Dr(i,s,o){var h=-1,p=i.length;s<0&&(s=-s>p?0:p+s),o=o>p?p:o,o<0&&(o+=p),p=s>o?0:o-s>>>0,s>>>=0;for(var m=I(p);++h<p;)m[h]=i[h+s];return m}function E1(i,s){var o;return an(i,function(h,p,m){return o=s(h,p,m),!o}),!!o}function Ru(i,s,o){var h=0,p=i==null?h:i.length;if(typeof s=="number"&&s===s&&p<=qr){for(;h<p;){var m=h+p>>>1,E=i[m];E!==null&&!cr(E)&&(o?E<=s:E<s)?h=m+1:p=m}return p}return Pl(i,s,Je,o)}function Pl(i,s,o,h){var p=0,m=i==null?0:i.length;if(m===0)return 0;s=o(s);for(var E=s!==s,T=s===null,S=cr(s),W=s===e;p<m;){var V=Cu((p+m)/2),$=o(i[V]),Q=$!==e,nt=$===null,ot=$===$,xt=cr($);if(E)var lt=h||ot;else W?lt=ot&&(h||Q):T?lt=ot&&Q&&(h||!nt):S?lt=ot&&Q&&!nt&&(h||!xt):nt||xt?lt=!1:lt=h?$<=s:$<s;lt?p=V+1:m=V}return Be(m,ve)}function Fp(i,s){for(var o=-1,h=i.length,p=0,m=[];++o<h;){var E=i[o],T=s?s(E):E;if(!o||!Gr(T,S)){var S=T;m[p++]=E===0?0:E}}return m}function Up(i){return typeof i=="number"?i:cr(i)?be:+i}function hr(i){if(typeof i=="string")return i;if(dt(i))return $t(i,hr)+"";if(cr(i))return yp?yp.call(i):"";var s=i+"";return s=="0"&&1/i==-yt?"-0":s}function un(i,s,o){var h=-1,p=pu,m=i.length,E=!0,T=[],S=T;if(o)E=!1,p=cl;else if(m>=a){var W=s?null:M1(i);if(W)return gu(W);E=!1,p=ya,S=new In}else S=s?[]:T;t:for(;++h<m;){var V=i[h],$=s?s(V):V;if(V=o||V!==0?V:0,E&&$===$){for(var Q=S.length;Q--;)if(S[Q]===$)continue t;s&&S.push($),T.push(V)}else p(S,$,o)||(S!==T&&S.push($),T.push(V))}return T}function Fl(i,s){return s=on(s,i),i=fd(i,s),i==null||delete i[li(Sr(s))]}function kp(i,s,o,h){return Ca(i,s,o(Ln(i,s)),h)}function Lu(i,s,o,h){for(var p=i.length,m=h?p:-1;(h?m--:++m<p)&&s(i[m],m,i););return o?Dr(i,h?0:m,h?m+1:p):Dr(i,h?m+1:0,h?p:m)}function Hp(i,s){var o=i;return o instanceof bt&&(o=o.value()),fl(s,function(h,p){return p.func.apply(p.thisArg,rn([h],p.args))},o)}function Ul(i,s,o){var h=i.length;if(h<2)return h?un(i[0]):[];for(var p=-1,m=I(h);++p<h;)for(var E=i[p],T=-1;++T<h;)T!=p&&(m[p]=wa(m[p]||E,i[T],s,o));return un(Te(m,1),s,o)}function qp(i,s,o){for(var h=-1,p=i.length,m=s.length,E={};++h<p;){var T=h<m?s[h]:e;o(E,i[h],T)}return E}function kl(i){return te(i)?i:[]}function Hl(i){return typeof i=="function"?i:Je}function on(i,s){return dt(i)?i:Zl(i,s)?[i]:yd(It(i))}var A1=Et;function ln(i,s,o){var h=i.length;return o=o===e?h:o,!s&&o>=h?i:Dr(i,s,o)}var Wp=om||function(i){return we.clearTimeout(i)};function Vp(i,s){if(s)return i.slice();var o=i.length,h=hp?hp(o):new i.constructor(o);return i.copy(h),h}function ql(i){var s=new i.constructor(i.byteLength);return new Au(s).set(new Au(i)),s}function b1(i,s){var o=s?ql(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.byteLength)}function w1(i){var s=new i.constructor(i.source,ca.exec(i));return s.lastIndex=i.lastIndex,s}function T1(i){return Aa?Ut(Aa.call(i)):{}}function $p(i,s){var o=s?ql(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.length)}function zp(i,s){if(i!==s){var o=i!==e,h=i===null,p=i===i,m=cr(i),E=s!==e,T=s===null,S=s===s,W=cr(s);if(!T&&!W&&!m&&i>s||m&&E&&S&&!T&&!W||h&&E&&S||!o&&S||!p)return 1;if(!h&&!m&&!W&&i<s||W&&o&&p&&!h&&!m||T&&o&&p||!E&&p||!S)return-1}return 0}function _1(i,s,o){for(var h=-1,p=i.criteria,m=s.criteria,E=p.length,T=o.length;++h<E;){var S=zp(p[h],m[h]);if(S){if(h>=T)return S;var W=o[h];return S*(W=="desc"?-1:1)}}return i.index-s.index}function Gp(i,s,o,h){for(var p=-1,m=i.length,E=o.length,T=-1,S=s.length,W=de(m-E,0),V=I(S+W),$=!h;++T<S;)V[T]=s[T];for(;++p<E;)($||p<m)&&(V[o[p]]=i[p]);for(;W--;)V[T++]=i[p++];return V}function Yp(i,s,o,h){for(var p=-1,m=i.length,E=-1,T=o.length,S=-1,W=s.length,V=de(m-T,0),$=I(V+W),Q=!h;++p<V;)$[p]=i[p];for(var nt=p;++S<W;)$[nt+S]=s[S];for(;++E<T;)(Q||p<m)&&($[nt+o[E]]=i[p++]);return $}function Qe(i,s){var o=-1,h=i.length;for(s||(s=I(h));++o<h;)s[o]=i[o];return s}function oi(i,s,o,h){var p=!o;o||(o={});for(var m=-1,E=s.length;++m<E;){var T=s[m],S=h?h(o[T],i[T],T,o,i):e;S===e&&(S=i[T]),p?Oi(o,T,S):ba(o,T,S)}return o}function C1(i,s){return oi(i,Xl(i),s)}function D1(i,s){return oi(i,ad(i),s)}function Pu(i,s){return function(o,h){var p=dt(o)?Bv:Zm,m=s?s():{};return p(o,i,ut(h,2),m)}}function ws(i){return Et(function(s,o){var h=-1,p=o.length,m=p>1?o[p-1]:e,E=p>2?o[2]:e;for(m=i.length>3&&typeof m=="function"?(p--,m):e,E&&Ue(o[0],o[1],E)&&(m=p<3?e:m,p=1),s=Ut(s);++h<p;){var T=o[h];T&&i(s,T,h,m)}return s})}function Xp(i,s){return function(o,h){if(o==null)return o;if(!je(o))return i(o,h);for(var p=o.length,m=s?p:-1,E=Ut(o);(s?m--:++m<p)&&h(E[m],m,E)!==!1;);return o}}function Zp(i){return function(s,o,h){for(var p=-1,m=Ut(s),E=h(s),T=E.length;T--;){var S=E[i?T:++p];if(o(m[S],S,m)===!1)break}return s}}function S1(i,s,o){var h=s&M,p=Da(i);function m(){var E=this&&this!==we&&this instanceof m?p:i;return E.apply(h?o:this,arguments)}return m}function Qp(i){return function(s){s=It(s);var o=ys(s)?$r(s):e,h=o?o[0]:s.charAt(0),p=o?ln(o,1).join(""):s.slice(1);return h[i]()+p}}function Ts(i){return function(s){return fl(Xd(Yd(s).replace(mv,"")),i,"")}}function Da(i){return function(){var s=arguments;switch(s.length){case 0:return new i;case 1:return new i(s[0]);case 2:return new i(s[0],s[1]);case 3:return new i(s[0],s[1],s[2]);case 4:return new i(s[0],s[1],s[2],s[3]);case 5:return new i(s[0],s[1],s[2],s[3],s[4]);case 6:return new i(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new i(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var o=bs(i.prototype),h=i.apply(o,s);return Xt(h)?h:o}}function O1(i,s,o){var h=Da(i);function p(){for(var m=arguments.length,E=I(m),T=m,S=_s(p);T--;)E[T]=arguments[T];var W=m<3&&E[0]!==S&&E[m-1]!==S?[]:nn(E,S);if(m-=W.length,m<o)return ed(i,s,Fu,p.placeholder,e,E,W,e,e,o-m);var V=this&&this!==we&&this instanceof p?h:i;return or(V,this,E)}return p}function jp(i){return function(s,o,h){var p=Ut(s);if(!je(s)){var m=ut(o,3);s=Ee(s),o=function(T){return m(p[T],T,p)}}var E=i(s,o,h);return E>-1?p[m?s[E]:E]:e}}function Kp(i){return Mi(function(s){var o=s.length,h=o,p=_r.prototype.thru;for(i&&s.reverse();h--;){var m=s[h];if(typeof m!="function")throw new Tr(l);if(p&&!E&&qu(m)=="wrapper")var E=new _r([],!0)}for(h=E?h:o;++h<o;){m=s[h];var T=qu(m),S=T=="wrapper"?Gl(m):e;S&&Ql(S[0])&&S[1]==(j|z|L|tt)&&!S[4].length&&S[9]==1?E=E[qu(S[0])].apply(E,S[3]):E=m.length==1&&Ql(m)?E[T]():E.thru(m)}return function(){var W=arguments,V=W[0];if(E&&W.length==1&&dt(V))return E.plant(V).value();for(var $=0,Q=o?s[$].apply(this,W):V;++$<o;)Q=s[$].call(this,Q);return Q}})}function Fu(i,s,o,h,p,m,E,T,S,W){var V=s&j,$=s&M,Q=s&R,nt=s&(z|w),ot=s&Z,xt=Q?e:Da(i);function lt(){for(var At=arguments.length,Tt=I(At),fr=At;fr--;)Tt[fr]=arguments[fr];if(nt)var ke=_s(lt),pr=qv(Tt,ke);if(h&&(Tt=Gp(Tt,h,p,nt)),m&&(Tt=Yp(Tt,m,E,nt)),At-=pr,nt&&At<W){var ee=nn(Tt,ke);return ed(i,s,Fu,lt.placeholder,o,Tt,ee,T,S,W-At)}var Yr=$?o:this,Li=Q?Yr[i]:i;return At=Tt.length,T?Tt=Z1(Tt,T):ot&&At>1&&Tt.reverse(),V&&S<At&&(Tt.length=S),this&&this!==we&&this instanceof lt&&(Li=xt||Da(Li)),Li.apply(Yr,Tt)}return lt}function Jp(i,s){return function(o,h){return i1(o,i,s(h),{})}}function Uu(i,s){return function(o,h){var p;if(o===e&&h===e)return s;if(o!==e&&(p=o),h!==e){if(p===e)return h;typeof o=="string"||typeof h=="string"?(o=hr(o),h=hr(h)):(o=Up(o),h=Up(h)),p=i(o,h)}return p}}function Wl(i){return Mi(function(s){return s=$t(s,lr(ut())),Et(function(o){var h=this;return i(s,function(p){return or(p,h,o)})})})}function ku(i,s){s=s===e?" ":hr(s);var o=s.length;if(o<2)return o?Ll(s,i):s;var h=Ll(s,_u(i/vs(s)));return ys(s)?ln($r(h),0,i).join(""):h.slice(0,i)}function N1(i,s,o,h){var p=s&M,m=Da(i);function E(){for(var T=-1,S=arguments.length,W=-1,V=h.length,$=I(V+S),Q=this&&this!==we&&this instanceof E?m:i;++W<V;)$[W]=h[W];for(;S--;)$[W++]=arguments[++T];return or(Q,p?o:this,$)}return E}function td(i){return function(s,o,h){return h&&typeof h!="number"&&Ue(s,o,h)&&(o=h=e),s=Ri(s),o===e?(o=s,s=0):o=Ri(o),h=h===e?s<o?1:-1:Ri(h),g1(s,o,h,i)}}function Hu(i){return function(s,o){return typeof s=="string"&&typeof o=="string"||(s=Or(s),o=Or(o)),i(s,o)}}function ed(i,s,o,h,p,m,E,T,S,W){var V=s&z,$=V?E:e,Q=V?e:E,nt=V?m:e,ot=V?e:m;s|=V?L:k,s&=~(V?k:L),s&q||(s&=~(M|R));var xt=[i,s,p,nt,$,ot,Q,T,S,W],lt=o.apply(e,xt);return Ql(i)&&pd(lt,xt),lt.placeholder=h,dd(lt,i,s)}function Vl(i){var s=pe[i];return function(o,h){if(o=Or(o),h=h==null?0:Be(gt(h),292),h&&dp(o)){var p=(It(o)+"e").split("e"),m=s(p[0]+"e"+(+p[1]+h));return p=(It(m)+"e").split("e"),+(p[0]+"e"+(+p[1]-h))}return s(o)}}var M1=Es&&1/gu(new Es([,-0]))[1]==yt?function(i){return new Es(i)}:ch;function rd(i){return function(s){var o=Ie(s);return o==Qt?xl(s):o==Dt?Xv(s):Hv(s,i(s))}}function Ni(i,s,o,h,p,m,E,T){var S=s&R;if(!S&&typeof i!="function")throw new Tr(l);var W=h?h.length:0;if(W||(s&=~(L|k),h=p=e),E=E===e?E:de(gt(E),0),T=T===e?T:gt(T),W-=p?p.length:0,s&k){var V=h,$=p;h=p=e}var Q=S?e:Gl(i),nt=[i,s,o,h,p,V,$,m,E,T];if(Q&&G1(nt,Q),i=nt[0],s=nt[1],o=nt[2],h=nt[3],p=nt[4],T=nt[9]=nt[9]===e?S?0:i.length:de(nt[9]-W,0),!T&&s&(z|w)&&(s&=~(z|w)),!s||s==M)var ot=S1(i,s,o);else s==z||s==w?ot=O1(i,s,T):(s==L||s==(M|L))&&!p.length?ot=N1(i,s,o,h):ot=Fu.apply(e,nt);var xt=Q?Pp:pd;return dd(xt(ot,nt),i,s)}function id(i,s,o,h){return i===e||Gr(i,xs[o])&&!Lt.call(h,o)?s:i}function nd(i,s,o,h,p,m){return Xt(i)&&Xt(s)&&(m.set(s,i),Iu(i,s,e,nd,m),m.delete(s)),i}function B1(i){return Na(i)?e:i}function sd(i,s,o,h,p,m){var E=o&F,T=i.length,S=s.length;if(T!=S&&!(E&&S>T))return!1;var W=m.get(i),V=m.get(s);if(W&&V)return W==s&&V==i;var $=-1,Q=!0,nt=o&N?new In:e;for(m.set(i,s),m.set(s,i);++$<T;){var ot=i[$],xt=s[$];if(h)var lt=E?h(xt,ot,$,s,i,m):h(ot,xt,$,i,s,m);if(lt!==e){if(lt)continue;Q=!1;break}if(nt){if(!pl(s,function(At,Tt){if(!ya(nt,Tt)&&(ot===At||p(ot,At,o,h,m)))return nt.push(Tt)})){Q=!1;break}}else if(!(ot===xt||p(ot,xt,o,h,m))){Q=!1;break}}return m.delete(i),m.delete(s),Q}function I1(i,s,o,h,p,m,E){switch(o){case Ye:if(i.byteLength!=s.byteLength||i.byteOffset!=s.byteOffset)return!1;i=i.buffer,s=s.buffer;case sr:return!(i.byteLength!=s.byteLength||!m(new Au(i),new Au(s)));case Gt:case Ct:case Ne:return Gr(+i,+s);case Oe:return i.name==s.name&&i.message==s.message;case ue:case nr:return i==s+"";case Qt:var T=xl;case Dt:var S=h&F;if(T||(T=gu),i.size!=s.size&&!S)return!1;var W=E.get(i);if(W)return W==s;h|=N,E.set(i,s);var V=sd(T(i),T(s),h,p,m,E);return E.delete(i),V;case Ge:if(Aa)return Aa.call(i)==Aa.call(s)}return!1}function R1(i,s,o,h,p,m){var E=o&F,T=$l(i),S=T.length,W=$l(s),V=W.length;if(S!=V&&!E)return!1;for(var $=S;$--;){var Q=T[$];if(!(E?Q in s:Lt.call(s,Q)))return!1}var nt=m.get(i),ot=m.get(s);if(nt&&ot)return nt==s&&ot==i;var xt=!0;m.set(i,s),m.set(s,i);for(var lt=E;++$<S;){Q=T[$];var At=i[Q],Tt=s[Q];if(h)var fr=E?h(Tt,At,Q,s,i,m):h(At,Tt,Q,i,s,m);if(!(fr===e?At===Tt||p(At,Tt,o,h,m):fr)){xt=!1;break}lt||(lt=Q=="constructor")}if(xt&&!lt){var ke=i.constructor,pr=s.constructor;ke!=pr&&"constructor"in i&&"constructor"in s&&!(typeof ke=="function"&&ke instanceof ke&&typeof pr=="function"&&pr instanceof pr)&&(xt=!1)}return m.delete(i),m.delete(s),xt}function Mi(i){return Kl(cd(i,e,Ed),i+"")}function $l(i){return _p(i,Ee,Xl)}function zl(i){return _p(i,Ke,ad)}var Gl=Du?function(i){return Du.get(i)}:ch;function qu(i){for(var s=i.name+"",o=As[s],h=Lt.call(As,s)?o.length:0;h--;){var p=o[h],m=p.func;if(m==null||m==i)return p.name}return s}function _s(i){var s=Lt.call(v,"placeholder")?v:i;return s.placeholder}function ut(){var i=v.iteratee||lh;return i=i===lh?Sp:i,arguments.length?i(arguments[0],arguments[1]):i}function Wu(i,s){var o=i.__data__;return W1(s)?o[typeof s=="string"?"string":"hash"]:o.map}function Yl(i){for(var s=Ee(i),o=s.length;o--;){var h=s[o],p=i[h];s[o]=[h,p,ld(p)]}return s}function Pn(i,s){var o=zv(i,s);return Dp(o)?o:e}function L1(i){var s=Lt.call(i,Mn),o=i[Mn];try{i[Mn]=e;var h=!0}catch{}var p=xu.call(i);return h&&(s?i[Mn]=o:delete i[Mn]),p}var Xl=Al?function(i){return i==null?[]:(i=Ut(i),en(Al(i),function(s){return fp.call(i,s)}))}:fh,ad=Al?function(i){for(var s=[];i;)rn(s,Xl(i)),i=bu(i);return s}:fh,Ie=Fe;(bl&&Ie(new bl(new ArrayBuffer(1)))!=Ye||ma&&Ie(new ma)!=Qt||wl&&Ie(wl.resolve())!=ii||Es&&Ie(new Es)!=Dt||xa&&Ie(new xa)!=mr)&&(Ie=function(i){var s=Fe(i),o=s==Yt?i.constructor:e,h=o?Fn(o):"";if(h)switch(h){case vm:return Ye;case mm:return Qt;case xm:return ii;case Em:return Dt;case Am:return mr}return s});function P1(i,s,o){for(var h=-1,p=o.length;++h<p;){var m=o[h],E=m.size;switch(m.type){case"drop":i+=E;break;case"dropRight":s-=E;break;case"take":s=Be(s,i+E);break;case"takeRight":i=de(i,s-E);break}}return{start:i,end:s}}function F1(i){var s=i.match(il);return s?s[1].split(au):[]}function ud(i,s,o){s=on(s,i);for(var h=-1,p=s.length,m=!1;++h<p;){var E=li(s[h]);if(!(m=i!=null&&o(i,E)))break;i=i[E]}return m||++h!=p?m:(p=i==null?0:i.length,!!p&&Zu(p)&&Bi(E,p)&&(dt(i)||Un(i)))}function U1(i){var s=i.length,o=new i.constructor(s);return s&&typeof i[0]=="string"&&Lt.call(i,"index")&&(o.index=i.index,o.input=i.input),o}function od(i){return typeof i.constructor=="function"&&!Sa(i)?bs(bu(i)):{}}function k1(i,s,o){var h=i.constructor;switch(s){case sr:return ql(i);case Gt:case Ct:return new h(+i);case Ye:return b1(i,o);case Yi:case Xi:case ni:case wi:case bn:case P:case it:case at:case wt:return $p(i,o);case Qt:return new h;case Ne:case nr:return new h(i);case ue:return w1(i);case Dt:return new h;case Ge:return T1(i)}}function H1(i,s){var o=s.length;if(!o)return i;var h=o-1;return s[h]=(o>1?"& ":"")+s[h],s=s.join(o>2?", ":" "),i.replace(ha,`{
13
13
  /* [wrapped with `+s+`] */
14
- `)}function Uy(r){return ft(r)||_i(r)||!!(Rf&&r&&r[Rf])}function An(r,s){var u=typeof r;return s=s??Ot,!!s&&(u=="number"||u!="symbol"&&ji.test(r))&&r>-1&&r%1==0&&r<s}function Be(r,s,u){if(!$t(u))return!1;var h=typeof s;return(h=="number"?$e(u)&&An(s,u.length):h=="string"&&s in u)?Pr(u[s],r):!1}function Nl(r,s){if(ft(r))return!1;var u=typeof r;return u=="number"||u=="symbol"||u=="boolean"||r==null||sr(r)?!0:Un.test(r)||!fi.test(r)||s!=null&&r in Rt(s)}function Hy(r){var s=typeof r;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?r!=="__proto__":r===null}function Ml(r){var s=Du(r),u=g[s];if(typeof u!="function"||!(s in bt.prototype))return!1;if(r===u)return!0;var h=Cl(u);return!!h&&r===h[0]}function qy(r){return!!Mf&&Mf in r}var Wy=tu?wn:Xl;function da(r){var s=r&&r.constructor,u=typeof s=="function"&&s.prototype||us;return r===u}function Mp(r){return r===r&&!$t(r)}function Bp(r,s){return function(u){return u==null?!1:u[r]===s&&(s!==e||r in Rt(u))}}function Vy(r){var s=Nu(r,function(h){return u.size===v&&u.clear(),h}),u=s.cache;return s}function zy(r,s){var u=r[1],h=s[1],p=u|h,m=p<(B|F|tt),E=h==tt&&u==Y||h==tt&&u==ot&&r[7].length<=s[8]||h==(tt|ot)&&s[7].length<=s[8]&&u==Y;if(!(m||E))return r;h&B&&(r[2]=s[2],p|=u&B?0:W);var w=s[3];if(w){var T=r[3];r[3]=T?dp(T,w,s[4]):w,r[4]=T?$n(r[3],x):s[4]}return w=s[5],w&&(T=r[5],r[5]=T?gp(T,w,s[6]):w,r[6]=T?$n(r[5],x):s[6]),w=s[7],w&&(r[7]=w),h&tt&&(r[8]=r[8]==null?s[8]:Te(r[8],s[8])),r[9]==null&&(r[9]=s[9]),r[0]=s[0],r[1]=p,r}function $y(r){var s=[];if(r!=null)for(var u in Rt(r))s.push(u);return s}function Gy(r){return ru.call(r)}function Ip(r,s,u){return s=ue(s===e?r.length-1:s,0),function(){for(var h=arguments,p=-1,m=ue(h.length-s,0),E=M(m);++p<m;)E[p]=h[s+p];p=-1;for(var w=M(s+1);++p<s;)w[p]=h[p];return w[s]=u(E),rr(r,this,w)}}function Lp(r,s){return s.length<2?r:Ai(r,Er(s,0,-1))}function Yy(r,s){for(var u=r.length,h=Te(s.length,u),p=ze(r);h--;){var m=s[h];r[h]=An(m,u)?p[m]:e}return r}function Bl(r,s){if(!(s==="constructor"&&typeof r[s]=="function")&&s!="__proto__")return r[s]}var Rp=Fp(ip),ga=ov||function(r,s){return ve.setTimeout(r,s)},Il=Fp(my);function Pp(r,s,u){var h=s+"";return Il(r,ky(h,Xy(Ry(h),u)))}function Fp(r){var s=0,u=0;return function(){var h=fv(),p=ht-(h-u);if(u=h,p>0){if(++s>=it)return arguments[0]}else s=0;return r.apply(e,arguments)}}function Tu(r,s){var u=-1,h=r.length,p=h-1;for(s=s===e?h:s;++u<s;){var m=gl(u,p),E=r[m];r[m]=r[u],r[u]=E}return r.length=s,r}var kp=Vy(function(r){var s=[];return r.charCodeAt(0)===46&&s.push(""),r.replace(Po,function(u,h,p,m){s.push(p?m.replace($a,"$1"):h||u)}),s});function Jr(r){if(typeof r=="string"||sr(r))return r;var s=r+"";return s=="0"&&1/r==-gt?"-0":s}function Di(r){if(r!=null){try{return eu.call(r)}catch{}try{return r+""}catch{}}return""}function Xy(r,s){return mr(Oe,function(u){var h="_."+u[0];s&u[1]&&!ja(r,h)&&r.push(h)}),r.sort()}function Up(r){if(r instanceof bt)return r.clone();var s=new yr(r.__wrapped__,r.__chain__);return s.__actions__=ze(r.__actions__),s.__index__=r.__index__,s.__values__=r.__values__,s}function Zy(r,s,u){(u?Be(r,s,u):s===e)?s=1:s=ue(pt(s),0);var h=r==null?0:r.length;if(!h||s<1)return[];for(var p=0,m=0,E=M(ou(h/s));p<h;)E[m++]=Er(r,p,p+=s);return E}function jy(r){for(var s=-1,u=r==null?0:r.length,h=0,p=[];++s<u;){var m=r[s];m&&(p[h++]=m)}return p}function Qy(){var r=arguments.length;if(!r)return[];for(var s=M(r-1),u=arguments[0],h=r;h--;)s[h-1]=arguments[h];return zn(ft(u)?ze(u):[u],ye(s,1))}var Ky=xt(function(r,s){return jt(r)?la(r,ye(s,1,jt,!0)):[]}),Jy=xt(function(r,s){var u=br(s);return jt(u)&&(u=e),jt(r)?la(r,ye(s,1,jt,!0),st(u,2)):[]}),t1=xt(function(r,s){var u=br(s);return jt(u)&&(u=e),jt(r)?la(r,ye(s,1,jt,!0),e,u):[]});function e1(r,s,u){var h=r==null?0:r.length;return h?(s=u||s===e?1:pt(s),Er(r,s<0?0:s,h)):[]}function r1(r,s,u){var h=r==null?0:r.length;return h?(s=u||s===e?1:pt(s),s=h-s,Er(r,0,s<0?0:s)):[]}function n1(r,s){return r&&r.length?yu(r,st(s,3),!0,!0):[]}function i1(r,s){return r&&r.length?yu(r,st(s,3),!0):[]}function s1(r,s,u,h){var p=r==null?0:r.length;return p?(u&&typeof u!="number"&&Be(r,s,u)&&(u=0,h=p),Qv(r,s,u,h)):[]}function Hp(r,s,u){var h=r==null?0:r.length;if(!h)return-1;var p=u==null?0:pt(u);return p<0&&(p=ue(h+p,0)),Qa(r,st(s,3),p)}function qp(r,s,u){var h=r==null?0:r.length;if(!h)return-1;var p=h-1;return u!==e&&(p=pt(u),p=u<0?ue(h+p,0):Te(p,h-1)),Qa(r,st(s,3),p,!0)}function Wp(r){var s=r==null?0:r.length;return s?ye(r,1):[]}function a1(r){var s=r==null?0:r.length;return s?ye(r,gt):[]}function u1(r,s){var u=r==null?0:r.length;return u?(s=s===e?1:pt(s),ye(r,s)):[]}function o1(r){for(var s=-1,u=r==null?0:r.length,h={};++s<u;){var p=r[s];h[p[0]]=p[1]}return h}function Vp(r){return r&&r.length?r[0]:e}function l1(r,s,u){var h=r==null?0:r.length;if(!h)return-1;var p=u==null?0:pt(u);return p<0&&(p=ue(h+p,0)),ns(r,s,p)}function h1(r){var s=r==null?0:r.length;return s?Er(r,0,-1):[]}var c1=xt(function(r){var s=qt(r,El);return s.length&&s[0]===r[0]?hl(s):[]}),f1=xt(function(r){var s=br(r),u=qt(r,El);return s===br(u)?s=e:u.pop(),u.length&&u[0]===r[0]?hl(u,st(s,2)):[]}),p1=xt(function(r){var s=br(r),u=qt(r,El);return s=typeof s=="function"?s:e,s&&u.pop(),u.length&&u[0]===r[0]?hl(u,e,s):[]});function d1(r,s){return r==null?"":hv.call(r,s)}function br(r){var s=r==null?0:r.length;return s?r[s-1]:e}function g1(r,s,u){var h=r==null?0:r.length;if(!h)return-1;var p=h;return u!==e&&(p=pt(u),p=p<0?ue(h+p,0):Te(p,h-1)),s===s?Xm(r,s,p):Qa(r,wf,p,!0)}function m1(r,s){return r&&r.length?tp(r,pt(s)):e}var v1=xt(zp);function zp(r,s){return r&&r.length&&s&&s.length?dl(r,s):r}function y1(r,s,u){return r&&r.length&&s&&s.length?dl(r,s,st(u,2)):r}function x1(r,s,u){return r&&r.length&&s&&s.length?dl(r,s,e,u):r}var E1=bn(function(r,s){var u=r==null?0:r.length,h=al(r,s);return np(r,qt(s,function(p){return An(p,u)?+p:p}).sort(pp)),h});function b1(r,s){var u=[];if(!(r&&r.length))return u;var h=-1,p=[],m=r.length;for(s=st(s,3);++h<m;){var E=r[h];s(E,h,r)&&(u.push(E),p.push(h))}return np(r,p),u}function Ll(r){return r==null?r:dv.call(r)}function A1(r,s,u){var h=r==null?0:r.length;return h?(u&&typeof u!="number"&&Be(r,s,u)?(s=0,u=h):(s=s==null?0:pt(s),u=u===e?h:pt(u)),Er(r,s,u)):[]}function w1(r,s){return vu(r,s)}function D1(r,s,u){return vl(r,s,st(u,2))}function _1(r,s){var u=r==null?0:r.length;if(u){var h=vu(r,s);if(h<u&&Pr(r[h],s))return h}return-1}function T1(r,s){return vu(r,s,!0)}function C1(r,s,u){return vl(r,s,st(u,2),!0)}function S1(r,s){var u=r==null?0:r.length;if(u){var h=vu(r,s,!0)-1;if(Pr(r[h],s))return h}return-1}function O1(r){return r&&r.length?sp(r):[]}function N1(r,s){return r&&r.length?sp(r,st(s,2)):[]}function M1(r){var s=r==null?0:r.length;return s?Er(r,1,s):[]}function B1(r,s,u){return r&&r.length?(s=u||s===e?1:pt(s),Er(r,0,s<0?0:s)):[]}function I1(r,s,u){var h=r==null?0:r.length;return h?(s=u||s===e?1:pt(s),s=h-s,Er(r,s<0?0:s,h)):[]}function L1(r,s){return r&&r.length?yu(r,st(s,3),!1,!0):[]}function R1(r,s){return r&&r.length?yu(r,st(s,3)):[]}var P1=xt(function(r){return Xn(ye(r,1,jt,!0))}),F1=xt(function(r){var s=br(r);return jt(s)&&(s=e),Xn(ye(r,1,jt,!0),st(s,2))}),k1=xt(function(r){var s=br(r);return s=typeof s=="function"?s:e,Xn(ye(r,1,jt,!0),e,s)});function U1(r){return r&&r.length?Xn(r):[]}function H1(r,s){return r&&r.length?Xn(r,st(s,2)):[]}function q1(r,s){return s=typeof s=="function"?s:e,r&&r.length?Xn(r,e,s):[]}function Rl(r){if(!(r&&r.length))return[];var s=0;return r=Vn(r,function(u){if(jt(u))return s=ue(u.length,s),!0}),Ko(s,function(u){return qt(r,Zo(u))})}function $p(r,s){if(!(r&&r.length))return[];var u=Rl(r);return s==null?u:qt(u,function(h){return rr(s,e,h)})}var W1=xt(function(r,s){return jt(r)?la(r,s):[]}),V1=xt(function(r){return xl(Vn(r,jt))}),z1=xt(function(r){var s=br(r);return jt(s)&&(s=e),xl(Vn(r,jt),st(s,2))}),$1=xt(function(r){var s=br(r);return s=typeof s=="function"?s:e,xl(Vn(r,jt),e,s)}),G1=xt(Rl);function Y1(r,s){return lp(r||[],s||[],oa)}function X1(r,s){return lp(r||[],s||[],fa)}var Z1=xt(function(r){var s=r.length,u=s>1?r[s-1]:e;return u=typeof u=="function"?(r.pop(),u):e,$p(r,u)});function Gp(r){var s=g(r);return s.__chain__=!0,s}function j1(r,s){return s(r),r}function Cu(r,s){return s(r)}var Q1=bn(function(r){var s=r.length,u=s?r[0]:0,h=this.__wrapped__,p=function(m){return al(m,r)};return s>1||this.__actions__.length||!(h instanceof bt)||!An(u)?this.thru(p):(h=h.slice(u,+u+(s?1:0)),h.__actions__.push({func:Cu,args:[p],thisArg:e}),new yr(h,this.__chain__).thru(function(m){return s&&!m.length&&m.push(e),m}))});function K1(){return Gp(this)}function J1(){return new yr(this.value(),this.__chain__)}function tx(){this.__values__===e&&(this.__values__=ad(this.value()));var r=this.__index__>=this.__values__.length,s=r?e:this.__values__[this.__index__++];return{done:r,value:s}}function ex(){return this}function rx(r){for(var s,u=this;u instanceof fu;){var h=Up(u);h.__index__=0,h.__values__=e,s?p.__wrapped__=h:s=h;var p=h;u=u.__wrapped__}return p.__wrapped__=r,s}function nx(){var r=this.__wrapped__;if(r instanceof bt){var s=r;return this.__actions__.length&&(s=new bt(this)),s=s.reverse(),s.__actions__.push({func:Cu,args:[Ll],thisArg:e}),new yr(s,this.__chain__)}return this.thru(Ll)}function ix(){return op(this.__wrapped__,this.__actions__)}var sx=xu(function(r,s,u){Bt.call(r,u)?++r[u]:xn(r,u,1)});function ax(r,s,u){var h=ft(r)?bf:jv;return u&&Be(r,s,u)&&(s=e),h(r,st(s,3))}function ux(r,s){var u=ft(r)?Vn:$f;return u(r,st(s,3))}var ox=xp(Hp),lx=xp(qp);function hx(r,s){return ye(Su(r,s),1)}function cx(r,s){return ye(Su(r,s),gt)}function fx(r,s,u){return u=u===e?1:pt(u),ye(Su(r,s),u)}function Yp(r,s){var u=ft(r)?mr:Yn;return u(r,st(s,3))}function Xp(r,s){var u=ft(r)?Mm:zf;return u(r,st(s,3))}var px=xu(function(r,s,u){Bt.call(r,u)?r[u].push(s):xn(r,u,[s])});function dx(r,s,u,h){r=$e(r)?r:gs(r),u=u&&!h?pt(u):0;var p=r.length;return u<0&&(u=ue(p+u,0)),Iu(r)?u<=p&&r.indexOf(s,u)>-1:!!p&&ns(r,s,u)>-1}var gx=xt(function(r,s,u){var h=-1,p=typeof s=="function",m=$e(r)?M(r.length):[];return Yn(r,function(E){m[++h]=p?rr(s,E,u):ha(E,s,u)}),m}),mx=xu(function(r,s,u){xn(r,u,s)});function Su(r,s){var u=ft(r)?qt:Qf;return u(r,st(s,3))}function vx(r,s,u,h){return r==null?[]:(ft(s)||(s=s==null?[]:[s]),u=h?e:u,ft(u)||(u=u==null?[]:[u]),ep(r,s,u))}var yx=xu(function(r,s,u){r[u?0:1].push(s)},function(){return[[],[]]});function xx(r,s,u){var h=ft(r)?Yo:_f,p=arguments.length<3;return h(r,st(s,4),u,p,Yn)}function Ex(r,s,u){var h=ft(r)?Bm:_f,p=arguments.length<3;return h(r,st(s,4),u,p,zf)}function bx(r,s){var u=ft(r)?Vn:$f;return u(r,Mu(st(s,3)))}function Ax(r){var s=ft(r)?Hf:dy;return s(r)}function wx(r,s,u){(u?Be(r,s,u):s===e)?s=1:s=pt(s);var h=ft(r)?$v:gy;return h(r,s)}function Dx(r){var s=ft(r)?Gv:vy;return s(r)}function _x(r){if(r==null)return 0;if($e(r))return Iu(r)?ss(r):r.length;var s=Ce(r);return s==Gt||s==Tt?r.size:fl(r).length}function Tx(r,s,u){var h=ft(r)?Xo:yy;return u&&Be(r,s,u)&&(s=e),h(r,st(s,3))}var Cx=xt(function(r,s){if(r==null)return[];var u=s.length;return u>1&&Be(r,s[0],s[1])?s=[]:u>2&&Be(s[0],s[1],s[2])&&(s=[s[0]]),ep(r,ye(s,1),[])}),Ou=uv||function(){return ve.Date.now()};function Sx(r,s){if(typeof s!="function")throw new vr(l);return r=pt(r),function(){if(--r<1)return s.apply(this,arguments)}}function Zp(r,s,u){return s=u?e:s,s=r&&s==null?r.length:s,En(r,tt,e,e,e,e,s)}function jp(r,s){var u;if(typeof s!="function")throw new vr(l);return r=pt(r),function(){return--r>0&&(u=s.apply(this,arguments)),r<=1&&(s=e),u}}var Pl=xt(function(r,s,u){var h=B;if(u.length){var p=$n(u,ps(Pl));h|=$}return En(r,h,s,u,p)}),Qp=xt(function(r,s,u){var h=B|F;if(u.length){var p=$n(u,ps(Qp));h|=$}return En(s,h,r,u,p)});function Kp(r,s,u){s=u?e:s;var h=En(r,Y,e,e,e,e,e,s);return h.placeholder=Kp.placeholder,h}function Jp(r,s,u){s=u?e:s;var h=En(r,A,e,e,e,e,e,s);return h.placeholder=Jp.placeholder,h}function td(r,s,u){var h,p,m,E,w,T,k=0,U=!1,V=!1,X=!0;if(typeof r!="function")throw new vr(l);s=Ar(s)||0,$t(u)&&(U=!!u.leading,V="maxWait"in u,m=V?ue(Ar(u.maxWait)||0,s):m,X="trailing"in u?!!u.trailing:X);function et(Qt){var Fr=h,_n=p;return h=p=e,k=Qt,E=r.apply(_n,Fr),E}function at(Qt){return k=Qt,w=ga(Et,s),U?et(Qt):E}function yt(Qt){var Fr=Qt-T,_n=Qt-k,xd=s-Fr;return V?Te(xd,m-_n):xd}function ut(Qt){var Fr=Qt-T,_n=Qt-k;return T===e||Fr>=s||Fr<0||V&&_n>=m}function Et(){var Qt=Ou();if(ut(Qt))return wt(Qt);w=ga(Et,yt(Qt))}function wt(Qt){return w=e,X&&h?et(Qt):(h=p=e,E)}function ar(){w!==e&&hp(w),k=0,h=T=p=w=e}function Ie(){return w===e?E:wt(Ou())}function ur(){var Qt=Ou(),Fr=ut(Qt);if(h=arguments,p=this,T=Qt,Fr){if(w===e)return at(T);if(V)return hp(w),w=ga(Et,s),et(T)}return w===e&&(w=ga(Et,s)),E}return ur.cancel=ar,ur.flush=Ie,ur}var Ox=xt(function(r,s){return Vf(r,1,s)}),Nx=xt(function(r,s,u){return Vf(r,Ar(s)||0,u)});function Mx(r){return En(r,K)}function Nu(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new vr(l);var u=function(){var h=arguments,p=s?s.apply(this,h):h[0],m=u.cache;if(m.has(p))return m.get(p);var E=r.apply(this,h);return u.cache=m.set(p,E)||m,E};return u.cache=new(Nu.Cache||yn),u}Nu.Cache=yn;function Mu(r){if(typeof r!="function")throw new vr(l);return function(){var s=arguments;switch(s.length){case 0:return!r.call(this);case 1:return!r.call(this,s[0]);case 2:return!r.call(this,s[0],s[1]);case 3:return!r.call(this,s[0],s[1],s[2])}return!r.apply(this,s)}}function Bx(r){return jp(2,r)}var Ix=xy(function(r,s){s=s.length==1&&ft(s[0])?qt(s[0],nr(st())):qt(ye(s,1),nr(st()));var u=s.length;return xt(function(h){for(var p=-1,m=Te(h.length,u);++p<m;)h[p]=s[p].call(this,h[p]);return rr(r,this,h)})}),Fl=xt(function(r,s){var u=$n(s,ps(Fl));return En(r,$,e,s,u)}),ed=xt(function(r,s){var u=$n(s,ps(ed));return En(r,q,e,s,u)}),Lx=bn(function(r,s){return En(r,ot,e,e,e,s)});function Rx(r,s){if(typeof r!="function")throw new vr(l);return s=s===e?s:pt(s),xt(r,s)}function Px(r,s){if(typeof r!="function")throw new vr(l);return s=s==null?0:ue(pt(s),0),xt(function(u){var h=u[s],p=jn(u,0,s);return h&&zn(p,h),rr(r,this,p)})}function Fx(r,s,u){var h=!0,p=!0;if(typeof r!="function")throw new vr(l);return $t(u)&&(h="leading"in u?!!u.leading:h,p="trailing"in u?!!u.trailing:p),td(r,s,{leading:h,maxWait:s,trailing:p})}function kx(r){return Zp(r,1)}function Ux(r,s){return Fl(bl(s),r)}function Hx(){if(!arguments.length)return[];var r=arguments[0];return ft(r)?r:[r]}function qx(r){return xr(r,S)}function Wx(r,s){return s=typeof s=="function"?s:e,xr(r,S,s)}function Vx(r){return xr(r,D|S)}function zx(r,s){return s=typeof s=="function"?s:e,xr(r,D|S,s)}function $x(r,s){return s==null||Wf(r,s,pe(s))}function Pr(r,s){return r===s||r!==r&&s!==s}var Gx=wu(ll),Yx=wu(function(r,s){return r>=s}),_i=Xf(function(){return arguments}())?Xf:function(r){return Yt(r)&&Bt.call(r,"callee")&&!Lf.call(r,"callee")},ft=M.isArray,Xx=gf?nr(gf):ry;function $e(r){return r!=null&&Bu(r.length)&&!wn(r)}function jt(r){return Yt(r)&&$e(r)}function Zx(r){return r===!0||r===!1||Yt(r)&&Me(r)==Vt}var Qn=lv||Xl,jx=mf?nr(mf):ny;function Qx(r){return Yt(r)&&r.nodeType===1&&!ma(r)}function Kx(r){if(r==null)return!0;if($e(r)&&(ft(r)||typeof r=="string"||typeof r.splice=="function"||Qn(r)||ds(r)||_i(r)))return!r.length;var s=Ce(r);if(s==Gt||s==Tt)return!r.size;if(da(r))return!fl(r).length;for(var u in r)if(Bt.call(r,u))return!1;return!0}function Jx(r,s){return ca(r,s)}function tE(r,s,u){u=typeof u=="function"?u:e;var h=u?u(r,s):e;return h===e?ca(r,s,e,u):!!h}function kl(r){if(!Yt(r))return!1;var s=Me(r);return s==we||s==Ft||typeof r.message=="string"&&typeof r.name=="string"&&!ma(r)}function eE(r){return typeof r=="number"&&Pf(r)}function wn(r){if(!$t(r))return!1;var s=Me(r);return s==Ne||s==Ue||s==Ht||s==cn}function rd(r){return typeof r=="number"&&r==pt(r)}function Bu(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Ot}function $t(r){var s=typeof r;return r!=null&&(s=="object"||s=="function")}function Yt(r){return r!=null&&typeof r=="object"}var nd=vf?nr(vf):sy;function rE(r,s){return r===s||cl(r,s,Sl(s))}function nE(r,s,u){return u=typeof u=="function"?u:e,cl(r,s,Sl(s),u)}function iE(r){return id(r)&&r!=+r}function sE(r){if(Wy(r))throw new ct(o);return Zf(r)}function aE(r){return r===null}function uE(r){return r==null}function id(r){return typeof r=="number"||Yt(r)&&Me(r)==De}function ma(r){if(!Yt(r)||Me(r)!=zt)return!1;var s=su(r);if(s===null)return!0;var u=Bt.call(s,"constructor")&&s.constructor;return typeof u=="function"&&u instanceof u&&eu.call(u)==nv}var Ul=yf?nr(yf):ay;function oE(r){return rd(r)&&r>=-Ot&&r<=Ot}var sd=xf?nr(xf):uy;function Iu(r){return typeof r=="string"||!ft(r)&&Yt(r)&&Me(r)==Ke}function sr(r){return typeof r=="symbol"||Yt(r)&&Me(r)==He}var ds=Ef?nr(Ef):oy;function lE(r){return r===e}function hE(r){return Yt(r)&&Ce(r)==cr}function cE(r){return Yt(r)&&Me(r)==Ln}var fE=wu(pl),pE=wu(function(r,s){return r<=s});function ad(r){if(!r)return[];if($e(r))return Iu(r)?Lr(r):ze(r);if(na&&r[na])return $m(r[na]());var s=Ce(r),u=s==Gt?tl:s==Tt?Ka:gs;return u(r)}function Dn(r){if(!r)return r===0?r:0;if(r=Ar(r),r===gt||r===-gt){var s=r<0?-1:1;return s*Se}return r===r?r:0}function pt(r){var s=Dn(r),u=s%1;return s===s?u?s-u:s:0}function ud(r){return r?bi(pt(r),0,Jt):0}function Ar(r){if(typeof r=="number")return r;if(sr(r))return me;if($t(r)){var s=typeof r.valueOf=="function"?r.valueOf():r;r=$t(s)?s+"":s}if(typeof r!="string")return r===0?r:+r;r=Tf(r);var u=dn.test(r);return u||di.test(r)?Sm(r.slice(2),u?2:8):Ks.test(r)?me:+r}function od(r){return Kr(r,Ge(r))}function dE(r){return r?bi(pt(r),-Ot,Ot):r===0?r:0}function Nt(r){return r==null?"":ir(r)}var gE=cs(function(r,s){if(da(s)||$e(s)){Kr(s,pe(s),r);return}for(var u in s)Bt.call(s,u)&&oa(r,u,s[u])}),ld=cs(function(r,s){Kr(s,Ge(s),r)}),Lu=cs(function(r,s,u,h){Kr(s,Ge(s),r,h)}),mE=cs(function(r,s,u,h){Kr(s,pe(s),r,h)}),vE=bn(al);function yE(r,s){var u=hs(r);return s==null?u:qf(u,s)}var xE=xt(function(r,s){r=Rt(r);var u=-1,h=s.length,p=h>2?s[2]:e;for(p&&Be(s[0],s[1],p)&&(h=1);++u<h;)for(var m=s[u],E=Ge(m),w=-1,T=E.length;++w<T;){var k=E[w],U=r[k];(U===e||Pr(U,us[k])&&!Bt.call(r,k))&&(r[k]=m[k])}return r}),EE=xt(function(r){return r.push(e,Tp),rr(hd,e,r)});function bE(r,s){return Af(r,st(s,3),Qr)}function AE(r,s){return Af(r,st(s,3),ol)}function wE(r,s){return r==null?r:ul(r,st(s,3),Ge)}function DE(r,s){return r==null?r:Gf(r,st(s,3),Ge)}function _E(r,s){return r&&Qr(r,st(s,3))}function TE(r,s){return r&&ol(r,st(s,3))}function CE(r){return r==null?[]:gu(r,pe(r))}function SE(r){return r==null?[]:gu(r,Ge(r))}function Hl(r,s,u){var h=r==null?e:Ai(r,s);return h===e?u:h}function OE(r,s){return r!=null&&Op(r,s,Kv)}function ql(r,s){return r!=null&&Op(r,s,Jv)}var NE=bp(function(r,s,u){s!=null&&typeof s.toString!="function"&&(s=ru.call(s)),r[s]=u},Vl(Ye)),ME=bp(function(r,s,u){s!=null&&typeof s.toString!="function"&&(s=ru.call(s)),Bt.call(r,s)?r[s].push(u):r[s]=[u]},st),BE=xt(ha);function pe(r){return $e(r)?Uf(r):fl(r)}function Ge(r){return $e(r)?Uf(r,!0):ly(r)}function IE(r,s){var u={};return s=st(s,3),Qr(r,function(h,p,m){xn(u,s(h,p,m),h)}),u}function LE(r,s){var u={};return s=st(s,3),Qr(r,function(h,p,m){xn(u,p,s(h,p,m))}),u}var RE=cs(function(r,s,u){mu(r,s,u)}),hd=cs(function(r,s,u,h){mu(r,s,u,h)}),PE=bn(function(r,s){var u={};if(r==null)return u;var h=!1;s=qt(s,function(m){return m=Zn(m,r),h||(h=m.length>1),m}),Kr(r,Tl(r),u),h&&(u=xr(u,D|C|S,Ny));for(var p=s.length;p--;)yl(u,s[p]);return u});function FE(r,s){return cd(r,Mu(st(s)))}var kE=bn(function(r,s){return r==null?{}:cy(r,s)});function cd(r,s){if(r==null)return{};var u=qt(Tl(r),function(h){return[h]});return s=st(s),rp(r,u,function(h,p){return s(h,p[0])})}function UE(r,s,u){s=Zn(s,r);var h=-1,p=s.length;for(p||(p=1,r=e);++h<p;){var m=r==null?e:r[Jr(s[h])];m===e&&(h=p,m=u),r=wn(m)?m.call(r):m}return r}function HE(r,s,u){return r==null?r:fa(r,s,u)}function qE(r,s,u,h){return h=typeof h=="function"?h:e,r==null?r:fa(r,s,u,h)}var fd=Dp(pe),pd=Dp(Ge);function WE(r,s,u){var h=ft(r),p=h||Qn(r)||ds(r);if(s=st(s,4),u==null){var m=r&&r.constructor;p?u=h?new m:[]:$t(r)?u=wn(m)?hs(su(r)):{}:u={}}return(p?mr:Qr)(r,function(E,w,T){return s(u,E,w,T)}),u}function VE(r,s){return r==null?!0:yl(r,s)}function zE(r,s,u){return r==null?r:up(r,s,bl(u))}function $E(r,s,u,h){return h=typeof h=="function"?h:e,r==null?r:up(r,s,bl(u),h)}function gs(r){return r==null?[]:Jo(r,pe(r))}function GE(r){return r==null?[]:Jo(r,Ge(r))}function YE(r,s,u){return u===e&&(u=s,s=e),u!==e&&(u=Ar(u),u=u===u?u:0),s!==e&&(s=Ar(s),s=s===s?s:0),bi(Ar(r),s,u)}function XE(r,s,u){return s=Dn(s),u===e?(u=s,s=0):u=Dn(u),r=Ar(r),ty(r,s,u)}function ZE(r,s,u){if(u&&typeof u!="boolean"&&Be(r,s,u)&&(s=u=e),u===e&&(typeof s=="boolean"?(u=s,s=e):typeof r=="boolean"&&(u=r,r=e)),r===e&&s===e?(r=0,s=1):(r=Dn(r),s===e?(s=r,r=0):s=Dn(s)),r>s){var h=r;r=s,s=h}if(u||r%1||s%1){var p=Ff();return Te(r+p*(s-r+Cm("1e-"+((p+"").length-1))),s)}return gl(r,s)}var jE=fs(function(r,s,u){return s=s.toLowerCase(),r+(u?dd(s):s)});function dd(r){return Wl(Nt(r).toLowerCase())}function gd(r){return r=Nt(r),r&&r.replace(Js,Hm).replace(vm,"")}function QE(r,s,u){r=Nt(r),s=ir(s);var h=r.length;u=u===e?h:bi(pt(u),0,h);var p=u;return u-=s.length,u>=0&&r.slice(u,p)==s}function KE(r){return r=Nt(r),r&&hi.test(r)?r.replace(Fn,qm):r}function JE(r){return r=Nt(r),r&&Fo.test(r)?r.replace(Hn,"\\$&"):r}var tb=fs(function(r,s,u){return r+(u?"-":"")+s.toLowerCase()}),eb=fs(function(r,s,u){return r+(u?" ":"")+s.toLowerCase()}),rb=yp("toLowerCase");function nb(r,s,u){r=Nt(r),s=pt(s);var h=s?ss(r):0;if(!s||h>=s)return r;var p=(s-h)/2;return Au(lu(p),u)+r+Au(ou(p),u)}function ib(r,s,u){r=Nt(r),s=pt(s);var h=s?ss(r):0;return s&&h<s?r+Au(s-h,u):r}function sb(r,s,u){r=Nt(r),s=pt(s);var h=s?ss(r):0;return s&&h<s?Au(s-h,u)+r:r}function ab(r,s,u){return u||s==null?s=0:s&&(s=+s),pv(Nt(r).replace(Zs,""),s||0)}function ub(r,s,u){return(u?Be(r,s,u):s===e)?s=1:s=pt(s),ml(Nt(r),s)}function ob(){var r=arguments,s=Nt(r[0]);return r.length<3?s:s.replace(r[1],r[2])}var lb=fs(function(r,s,u){return r+(u?"_":"")+s.toLowerCase()});function hb(r,s,u){return u&&typeof u!="number"&&Be(r,s,u)&&(s=u=e),u=u===e?Jt:u>>>0,u?(r=Nt(r),r&&(typeof s=="string"||s!=null&&!Ul(s))&&(s=ir(s),!s&&is(r))?jn(Lr(r),0,u):r.split(s,u)):[]}var cb=fs(function(r,s,u){return r+(u?" ":"")+Wl(s)});function fb(r,s,u){return r=Nt(r),u=u==null?0:bi(pt(u),0,r.length),s=ir(s),r.slice(u,u+s.length)==s}function pb(r,s,u){var h=g.templateSettings;u&&Be(r,s,u)&&(s=e),r=Nt(r),s=Lu({},s,h,_p);var p=Lu({},s.imports,h.imports,_p),m=pe(p),E=Jo(p,m),w,T,k=0,U=s.interpolate||Qi,V="__p += '",X=el((s.escape||Qi).source+"|"+U.source+"|"+(U===ci?Ga:Qi).source+"|"+(s.evaluate||Qi).source+"|$","g"),et="//# sourceURL="+(Bt.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Am+"]")+`
15
- `;r.replace(X,function(ut,Et,wt,ar,Ie,ur){return wt||(wt=ar),V+=r.slice(k,ur).replace(Ho,Wm),Et&&(w=!0,V+=`' +
16
- __e(`+Et+`) +
17
- '`),Ie&&(T=!0,V+=`';
18
- `+Ie+`;
19
- __p += '`),wt&&(V+=`' +
20
- ((__t = (`+wt+`)) == null ? '' : __t) +
21
- '`),k=ur+ut.length,ut}),V+=`';
22
- `;var at=Bt.call(s,"variable")&&s.variable;if(!at)V=`with (obj) {
23
- `+V+`
14
+ `)}function q1(i){return dt(i)||Un(i)||!!(pp&&i&&i[pp])}function Bi(i,s){var o=typeof i;return s=s??Bt,!!s&&(o=="number"||o!="symbol"&&os.test(i))&&i>-1&&i%1==0&&i<s}function Ue(i,s,o){if(!Xt(o))return!1;var h=typeof s;return(h=="number"?je(o)&&Bi(s,o.length):h=="string"&&s in o)?Gr(o[s],i):!1}function Zl(i,s){if(dt(i))return!1;var o=typeof i;return o=="number"||o=="symbol"||o=="boolean"||i==null||cr(i)?!0:ji.test(i)||!_n.test(i)||s!=null&&i in Ut(s)}function W1(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function Ql(i){var s=qu(i),o=v[s];if(typeof o!="function"||!(s in bt.prototype))return!1;if(i===o)return!0;var h=Gl(o);return!!h&&i===h[0]}function V1(i){return!!lp&&lp in i}var $1=vu?Ii:ph;function Sa(i){var s=i&&i.constructor,o=typeof s=="function"&&s.prototype||xs;return i===o}function ld(i){return i===i&&!Xt(i)}function hd(i,s){return function(o){return o==null?!1:o[i]===s&&(s!==e||i in Ut(o))}}function z1(i){var s=Yu(i,function(h){return o.size===d&&o.clear(),h}),o=s.cache;return s}function G1(i,s){var o=i[1],h=s[1],p=o|h,m=p<(M|R|j),E=h==j&&o==z||h==j&&o==tt&&i[7].length<=s[8]||h==(j|tt)&&s[7].length<=s[8]&&o==z;if(!(m||E))return i;h&M&&(i[2]=s[2],p|=o&M?0:q);var T=s[3];if(T){var S=i[3];i[3]=S?Gp(S,T,s[4]):T,i[4]=S?nn(i[3],y):s[4]}return T=s[5],T&&(S=i[5],i[5]=S?Yp(S,T,s[6]):T,i[6]=S?nn(i[5],y):s[6]),T=s[7],T&&(i[7]=T),h&j&&(i[8]=i[8]==null?s[8]:Be(i[8],s[8])),i[9]==null&&(i[9]=s[9]),i[0]=s[0],i[1]=p,i}function Y1(i){var s=[];if(i!=null)for(var o in Ut(i))s.push(o);return s}function X1(i){return xu.call(i)}function cd(i,s,o){return s=de(s===e?i.length-1:s,0),function(){for(var h=arguments,p=-1,m=de(h.length-s,0),E=I(m);++p<m;)E[p]=h[s+p];p=-1;for(var T=I(s+1);++p<s;)T[p]=h[p];return T[s]=o(E),or(i,this,T)}}function fd(i,s){return s.length<2?i:Ln(i,Dr(s,0,-1))}function Z1(i,s){for(var o=i.length,h=Be(s.length,o),p=Qe(i);h--;){var m=s[h];i[h]=Bi(m,o)?p[m]:e}return i}function jl(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var pd=gd(Pp),Oa=hm||function(i,s){return we.setTimeout(i,s)},Kl=gd(m1);function dd(i,s,o){var h=s+"";return Kl(i,H1(h,Q1(F1(h),o)))}function gd(i){var s=0,o=0;return function(){var h=dm(),p=ht-(h-o);if(o=h,p>0){if(++s>=st)return arguments[0]}else s=0;return i.apply(e,arguments)}}function Vu(i,s){var o=-1,h=i.length,p=h-1;for(s=s===e?h:s;++o<s;){var m=Rl(o,p),E=i[m];i[m]=i[o],i[o]=E}return i.length=s,i}var yd=z1(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(el,function(o,h,p,m){s.push(p?m.replace(ou,"$1"):h||o)}),s});function li(i){if(typeof i=="string"||cr(i))return i;var s=i+"";return s=="0"&&1/i==-yt?"-0":s}function Fn(i){if(i!=null){try{return mu.call(i)}catch{}try{return i+""}catch{}}return""}function Q1(i,s){return wr(Le,function(o){var h="_."+o[0];s&o[1]&&!pu(i,h)&&i.push(h)}),i.sort()}function vd(i){if(i instanceof bt)return i.clone();var s=new _r(i.__wrapped__,i.__chain__);return s.__actions__=Qe(i.__actions__),s.__index__=i.__index__,s.__values__=i.__values__,s}function j1(i,s,o){(o?Ue(i,s,o):s===e)?s=1:s=de(gt(s),0);var h=i==null?0:i.length;if(!h||s<1)return[];for(var p=0,m=0,E=I(_u(h/s));p<h;)E[m++]=Dr(i,p,p+=s);return E}function K1(i){for(var s=-1,o=i==null?0:i.length,h=0,p=[];++s<o;){var m=i[s];m&&(p[h++]=m)}return p}function J1(){var i=arguments.length;if(!i)return[];for(var s=I(i-1),o=arguments[0],h=i;h--;)s[h-1]=arguments[h];return rn(dt(o)?Qe(o):[o],Te(s,1))}var tx=Et(function(i,s){return te(i)?wa(i,Te(s,1,te,!0)):[]}),ex=Et(function(i,s){var o=Sr(s);return te(o)&&(o=e),te(i)?wa(i,Te(s,1,te,!0),ut(o,2)):[]}),rx=Et(function(i,s){var o=Sr(s);return te(o)&&(o=e),te(i)?wa(i,Te(s,1,te,!0),e,o):[]});function ix(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),Dr(i,s<0?0:s,h)):[]}function nx(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),s=h-s,Dr(i,0,s<0?0:s)):[]}function sx(i,s){return i&&i.length?Lu(i,ut(s,3),!0,!0):[]}function ax(i,s){return i&&i.length?Lu(i,ut(s,3),!0):[]}function ux(i,s,o,h){var p=i==null?0:i.length;return p?(o&&typeof o!="number"&&Ue(i,s,o)&&(o=0,h=p),Jm(i,s,o,h)):[]}function md(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=o==null?0:gt(o);return p<0&&(p=de(h+p,0)),du(i,ut(s,3),p)}function xd(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=h-1;return o!==e&&(p=gt(o),p=o<0?de(h+p,0):Be(p,h-1)),du(i,ut(s,3),p,!0)}function Ed(i){var s=i==null?0:i.length;return s?Te(i,1):[]}function ox(i){var s=i==null?0:i.length;return s?Te(i,yt):[]}function lx(i,s){var o=i==null?0:i.length;return o?(s=s===e?1:gt(s),Te(i,s)):[]}function hx(i){for(var s=-1,o=i==null?0:i.length,h={};++s<o;){var p=i[s];h[p[0]]=p[1]}return h}function Ad(i){return i&&i.length?i[0]:e}function cx(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=o==null?0:gt(o);return p<0&&(p=de(h+p,0)),gs(i,s,p)}function fx(i){var s=i==null?0:i.length;return s?Dr(i,0,-1):[]}var px=Et(function(i){var s=$t(i,kl);return s.length&&s[0]===i[0]?Ol(s):[]}),dx=Et(function(i){var s=Sr(i),o=$t(i,kl);return s===Sr(o)?s=e:o.pop(),o.length&&o[0]===i[0]?Ol(o,ut(s,2)):[]}),gx=Et(function(i){var s=Sr(i),o=$t(i,kl);return s=typeof s=="function"?s:e,s&&o.pop(),o.length&&o[0]===i[0]?Ol(o,e,s):[]});function yx(i,s){return i==null?"":fm.call(i,s)}function Sr(i){var s=i==null?0:i.length;return s?i[s-1]:e}function vx(i,s,o){var h=i==null?0:i.length;if(!h)return-1;var p=h;return o!==e&&(p=gt(o),p=p<0?de(h+p,0):Be(p,h-1)),s===s?Qv(i,s,p):du(i,ep,p,!0)}function mx(i,s){return i&&i.length?Bp(i,gt(s)):e}var xx=Et(bd);function bd(i,s){return i&&i.length&&s&&s.length?Il(i,s):i}function Ex(i,s,o){return i&&i.length&&s&&s.length?Il(i,s,ut(o,2)):i}function Ax(i,s,o){return i&&i.length&&s&&s.length?Il(i,s,e,o):i}var bx=Mi(function(i,s){var o=i==null?0:i.length,h=_l(i,s);return Lp(i,$t(s,function(p){return Bi(p,o)?+p:p}).sort(zp)),h});function wx(i,s){var o=[];if(!(i&&i.length))return o;var h=-1,p=[],m=i.length;for(s=ut(s,3);++h<m;){var E=i[h];s(E,h,i)&&(o.push(E),p.push(h))}return Lp(i,p),o}function Jl(i){return i==null?i:ym.call(i)}function Tx(i,s,o){var h=i==null?0:i.length;return h?(o&&typeof o!="number"&&Ue(i,s,o)?(s=0,o=h):(s=s==null?0:gt(s),o=o===e?h:gt(o)),Dr(i,s,o)):[]}function _x(i,s){return Ru(i,s)}function Cx(i,s,o){return Pl(i,s,ut(o,2))}function Dx(i,s){var o=i==null?0:i.length;if(o){var h=Ru(i,s);if(h<o&&Gr(i[h],s))return h}return-1}function Sx(i,s){return Ru(i,s,!0)}function Ox(i,s,o){return Pl(i,s,ut(o,2),!0)}function Nx(i,s){var o=i==null?0:i.length;if(o){var h=Ru(i,s,!0)-1;if(Gr(i[h],s))return h}return-1}function Mx(i){return i&&i.length?Fp(i):[]}function Bx(i,s){return i&&i.length?Fp(i,ut(s,2)):[]}function Ix(i){var s=i==null?0:i.length;return s?Dr(i,1,s):[]}function Rx(i,s,o){return i&&i.length?(s=o||s===e?1:gt(s),Dr(i,0,s<0?0:s)):[]}function Lx(i,s,o){var h=i==null?0:i.length;return h?(s=o||s===e?1:gt(s),s=h-s,Dr(i,s<0?0:s,h)):[]}function Px(i,s){return i&&i.length?Lu(i,ut(s,3),!1,!0):[]}function Fx(i,s){return i&&i.length?Lu(i,ut(s,3)):[]}var Ux=Et(function(i){return un(Te(i,1,te,!0))}),kx=Et(function(i){var s=Sr(i);return te(s)&&(s=e),un(Te(i,1,te,!0),ut(s,2))}),Hx=Et(function(i){var s=Sr(i);return s=typeof s=="function"?s:e,un(Te(i,1,te,!0),e,s)});function qx(i){return i&&i.length?un(i):[]}function Wx(i,s){return i&&i.length?un(i,ut(s,2)):[]}function Vx(i,s){return s=typeof s=="function"?s:e,i&&i.length?un(i,e,s):[]}function th(i){if(!(i&&i.length))return[];var s=0;return i=en(i,function(o){if(te(o))return s=de(o.length,s),!0}),vl(s,function(o){return $t(i,dl(o))})}function wd(i,s){if(!(i&&i.length))return[];var o=th(i);return s==null?o:$t(o,function(h){return or(s,e,h)})}var $x=Et(function(i,s){return te(i)?wa(i,s):[]}),zx=Et(function(i){return Ul(en(i,te))}),Gx=Et(function(i){var s=Sr(i);return te(s)&&(s=e),Ul(en(i,te),ut(s,2))}),Yx=Et(function(i){var s=Sr(i);return s=typeof s=="function"?s:e,Ul(en(i,te),e,s)}),Xx=Et(th);function Zx(i,s){return qp(i||[],s||[],ba)}function Qx(i,s){return qp(i||[],s||[],Ca)}var jx=Et(function(i){var s=i.length,o=s>1?i[s-1]:e;return o=typeof o=="function"?(i.pop(),o):e,wd(i,o)});function Td(i){var s=v(i);return s.__chain__=!0,s}function Kx(i,s){return s(i),i}function $u(i,s){return s(i)}var Jx=Mi(function(i){var s=i.length,o=s?i[0]:0,h=this.__wrapped__,p=function(m){return _l(m,i)};return s>1||this.__actions__.length||!(h instanceof bt)||!Bi(o)?this.thru(p):(h=h.slice(o,+o+(s?1:0)),h.__actions__.push({func:$u,args:[p],thisArg:e}),new _r(h,this.__chain__).thru(function(m){return s&&!m.length&&m.push(e),m}))});function tE(){return Td(this)}function eE(){return new _r(this.value(),this.__chain__)}function rE(){this.__values__===e&&(this.__values__=Ud(this.value()));var i=this.__index__>=this.__values__.length,s=i?e:this.__values__[this.__index__++];return{done:i,value:s}}function iE(){return this}function nE(i){for(var s,o=this;o instanceof Ou;){var h=vd(o);h.__index__=0,h.__values__=e,s?p.__wrapped__=h:s=h;var p=h;o=o.__wrapped__}return p.__wrapped__=i,s}function sE(){var i=this.__wrapped__;if(i instanceof bt){var s=i;return this.__actions__.length&&(s=new bt(this)),s=s.reverse(),s.__actions__.push({func:$u,args:[Jl],thisArg:e}),new _r(s,this.__chain__)}return this.thru(Jl)}function aE(){return Hp(this.__wrapped__,this.__actions__)}var uE=Pu(function(i,s,o){Lt.call(i,o)?++i[o]:Oi(i,o,1)});function oE(i,s,o){var h=dt(i)?Jf:Km;return o&&Ue(i,s,o)&&(s=e),h(i,ut(s,3))}function lE(i,s){var o=dt(i)?en:wp;return o(i,ut(s,3))}var hE=jp(md),cE=jp(xd);function fE(i,s){return Te(zu(i,s),1)}function pE(i,s){return Te(zu(i,s),yt)}function dE(i,s,o){return o=o===e?1:gt(o),Te(zu(i,s),o)}function _d(i,s){var o=dt(i)?wr:an;return o(i,ut(s,3))}function Cd(i,s){var o=dt(i)?Iv:bp;return o(i,ut(s,3))}var gE=Pu(function(i,s,o){Lt.call(i,o)?i[o].push(s):Oi(i,o,[s])});function yE(i,s,o,h){i=je(i)?i:Ds(i),o=o&&!h?gt(o):0;var p=i.length;return o<0&&(o=de(p+o,0)),Qu(i)?o<=p&&i.indexOf(s,o)>-1:!!p&&gs(i,s,o)>-1}var vE=Et(function(i,s,o){var h=-1,p=typeof s=="function",m=je(i)?I(i.length):[];return an(i,function(E){m[++h]=p?or(s,E,o):Ta(E,s,o)}),m}),mE=Pu(function(i,s,o){Oi(i,o,s)});function zu(i,s){var o=dt(i)?$t:Op;return o(i,ut(s,3))}function xE(i,s,o,h){return i==null?[]:(dt(s)||(s=s==null?[]:[s]),o=h?e:o,dt(o)||(o=o==null?[]:[o]),Ip(i,s,o))}var EE=Pu(function(i,s,o){i[o?0:1].push(s)},function(){return[[],[]]});function AE(i,s,o){var h=dt(i)?fl:ip,p=arguments.length<3;return h(i,ut(s,4),o,p,an)}function bE(i,s,o){var h=dt(i)?Rv:ip,p=arguments.length<3;return h(i,ut(s,4),o,p,bp)}function wE(i,s){var o=dt(i)?en:wp;return o(i,Xu(ut(s,3)))}function TE(i){var s=dt(i)?mp:y1;return s(i)}function _E(i,s,o){(o?Ue(i,s,o):s===e)?s=1:s=gt(s);var h=dt(i)?Ym:v1;return h(i,s)}function CE(i){var s=dt(i)?Xm:x1;return s(i)}function DE(i){if(i==null)return 0;if(je(i))return Qu(i)?vs(i):i.length;var s=Ie(i);return s==Qt||s==Dt?i.size:Ml(i).length}function SE(i,s,o){var h=dt(i)?pl:E1;return o&&Ue(i,s,o)&&(s=e),h(i,ut(s,3))}var OE=Et(function(i,s){if(i==null)return[];var o=s.length;return o>1&&Ue(i,s[0],s[1])?s=[]:o>2&&Ue(s[0],s[1],s[2])&&(s=[s[0]]),Ip(i,Te(s,1),[])}),Gu=lm||function(){return we.Date.now()};function NE(i,s){if(typeof s!="function")throw new Tr(l);return i=gt(i),function(){if(--i<1)return s.apply(this,arguments)}}function Dd(i,s,o){return s=o?e:s,s=i&&s==null?i.length:s,Ni(i,j,e,e,e,e,s)}function Sd(i,s){var o;if(typeof s!="function")throw new Tr(l);return i=gt(i),function(){return--i>0&&(o=s.apply(this,arguments)),i<=1&&(s=e),o}}var eh=Et(function(i,s,o){var h=M;if(o.length){var p=nn(o,_s(eh));h|=L}return Ni(i,h,s,o,p)}),Od=Et(function(i,s,o){var h=M|R;if(o.length){var p=nn(o,_s(Od));h|=L}return Ni(s,h,i,o,p)});function Nd(i,s,o){s=o?e:s;var h=Ni(i,z,e,e,e,e,e,s);return h.placeholder=Nd.placeholder,h}function Md(i,s,o){s=o?e:s;var h=Ni(i,w,e,e,e,e,e,s);return h.placeholder=Md.placeholder,h}function Bd(i,s,o){var h,p,m,E,T,S,W=0,V=!1,$=!1,Q=!0;if(typeof i!="function")throw new Tr(l);s=Or(s)||0,Xt(o)&&(V=!!o.leading,$="maxWait"in o,m=$?de(Or(o.maxWait)||0,s):m,Q="trailing"in o?!!o.trailing:Q);function nt(ee){var Yr=h,Li=p;return h=p=e,W=ee,E=i.apply(Li,Yr),E}function ot(ee){return W=ee,T=Oa(At,s),V?nt(ee):E}function xt(ee){var Yr=ee-S,Li=ee-W,jd=s-Yr;return $?Be(jd,m-Li):jd}function lt(ee){var Yr=ee-S,Li=ee-W;return S===e||Yr>=s||Yr<0||$&&Li>=m}function At(){var ee=Gu();if(lt(ee))return Tt(ee);T=Oa(At,xt(ee))}function Tt(ee){return T=e,Q&&h?nt(ee):(h=p=e,E)}function fr(){T!==e&&Wp(T),W=0,h=S=p=T=e}function ke(){return T===e?E:Tt(Gu())}function pr(){var ee=Gu(),Yr=lt(ee);if(h=arguments,p=this,S=ee,Yr){if(T===e)return ot(S);if($)return Wp(T),T=Oa(At,s),nt(S)}return T===e&&(T=Oa(At,s)),E}return pr.cancel=fr,pr.flush=ke,pr}var ME=Et(function(i,s){return Ap(i,1,s)}),BE=Et(function(i,s,o){return Ap(i,Or(s)||0,o)});function IE(i){return Ni(i,Z)}function Yu(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new Tr(l);var o=function(){var h=arguments,p=s?s.apply(this,h):h[0],m=o.cache;if(m.has(p))return m.get(p);var E=i.apply(this,h);return o.cache=m.set(p,E)||m,E};return o.cache=new(Yu.Cache||Si),o}Yu.Cache=Si;function Xu(i){if(typeof i!="function")throw new Tr(l);return function(){var s=arguments;switch(s.length){case 0:return!i.call(this);case 1:return!i.call(this,s[0]);case 2:return!i.call(this,s[0],s[1]);case 3:return!i.call(this,s[0],s[1],s[2])}return!i.apply(this,s)}}function RE(i){return Sd(2,i)}var LE=A1(function(i,s){s=s.length==1&&dt(s[0])?$t(s[0],lr(ut())):$t(Te(s,1),lr(ut()));var o=s.length;return Et(function(h){for(var p=-1,m=Be(h.length,o);++p<m;)h[p]=s[p].call(this,h[p]);return or(i,this,h)})}),rh=Et(function(i,s){var o=nn(s,_s(rh));return Ni(i,L,e,s,o)}),Id=Et(function(i,s){var o=nn(s,_s(Id));return Ni(i,k,e,s,o)}),PE=Mi(function(i,s){return Ni(i,tt,e,e,e,s)});function FE(i,s){if(typeof i!="function")throw new Tr(l);return s=s===e?s:gt(s),Et(i,s)}function UE(i,s){if(typeof i!="function")throw new Tr(l);return s=s==null?0:de(gt(s),0),Et(function(o){var h=o[s],p=ln(o,0,s);return h&&rn(p,h),or(i,this,p)})}function kE(i,s,o){var h=!0,p=!0;if(typeof i!="function")throw new Tr(l);return Xt(o)&&(h="leading"in o?!!o.leading:h,p="trailing"in o?!!o.trailing:p),Bd(i,s,{leading:h,maxWait:s,trailing:p})}function HE(i){return Dd(i,1)}function qE(i,s){return rh(Hl(s),i)}function WE(){if(!arguments.length)return[];var i=arguments[0];return dt(i)?i:[i]}function VE(i){return Cr(i,C)}function $E(i,s){return s=typeof s=="function"?s:e,Cr(i,C,s)}function zE(i){return Cr(i,A|C)}function GE(i,s){return s=typeof s=="function"?s:e,Cr(i,A|C,s)}function YE(i,s){return s==null||Ep(i,s,Ee(s))}function Gr(i,s){return i===s||i!==i&&s!==s}var XE=Hu(Sl),ZE=Hu(function(i,s){return i>=s}),Un=Cp(function(){return arguments}())?Cp:function(i){return jt(i)&&Lt.call(i,"callee")&&!fp.call(i,"callee")},dt=I.isArray,QE=Yf?lr(Yf):n1;function je(i){return i!=null&&Zu(i.length)&&!Ii(i)}function te(i){return jt(i)&&je(i)}function jE(i){return i===!0||i===!1||jt(i)&&Fe(i)==Gt}var hn=cm||ph,KE=Xf?lr(Xf):s1;function JE(i){return jt(i)&&i.nodeType===1&&!Na(i)}function tA(i){if(i==null)return!0;if(je(i)&&(dt(i)||typeof i=="string"||typeof i.splice=="function"||hn(i)||Cs(i)||Un(i)))return!i.length;var s=Ie(i);if(s==Qt||s==Dt)return!i.size;if(Sa(i))return!Ml(i).length;for(var o in i)if(Lt.call(i,o))return!1;return!0}function eA(i,s){return _a(i,s)}function rA(i,s,o){o=typeof o=="function"?o:e;var h=o?o(i,s):e;return h===e?_a(i,s,e,o):!!h}function ih(i){if(!jt(i))return!1;var s=Fe(i);return s==Oe||s==Ht||typeof i.message=="string"&&typeof i.name=="string"&&!Na(i)}function iA(i){return typeof i=="number"&&dp(i)}function Ii(i){if(!Xt(i))return!1;var s=Fe(i);return s==Pe||s==ze||s==Vt||s==Ai}function Rd(i){return typeof i=="number"&&i==gt(i)}function Zu(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Bt}function Xt(i){var s=typeof i;return i!=null&&(s=="object"||s=="function")}function jt(i){return i!=null&&typeof i=="object"}var Ld=Zf?lr(Zf):u1;function nA(i,s){return i===s||Nl(i,s,Yl(s))}function sA(i,s,o){return o=typeof o=="function"?o:e,Nl(i,s,Yl(s),o)}function aA(i){return Pd(i)&&i!=+i}function uA(i){if($1(i))throw new pt(u);return Dp(i)}function oA(i){return i===null}function lA(i){return i==null}function Pd(i){return typeof i=="number"||jt(i)&&Fe(i)==Ne}function Na(i){if(!jt(i)||Fe(i)!=Yt)return!1;var s=bu(i);if(s===null)return!0;var o=Lt.call(s,"constructor")&&s.constructor;return typeof o=="function"&&o instanceof o&&mu.call(o)==sm}var nh=Qf?lr(Qf):o1;function hA(i){return Rd(i)&&i>=-Bt&&i<=Bt}var Fd=jf?lr(jf):l1;function Qu(i){return typeof i=="string"||!dt(i)&&jt(i)&&Fe(i)==nr}function cr(i){return typeof i=="symbol"||jt(i)&&Fe(i)==Ge}var Cs=Kf?lr(Kf):h1;function cA(i){return i===e}function fA(i){return jt(i)&&Ie(i)==mr}function pA(i){return jt(i)&&Fe(i)==Gi}var dA=Hu(Bl),gA=Hu(function(i,s){return i<=s});function Ud(i){if(!i)return[];if(je(i))return Qu(i)?$r(i):Qe(i);if(va&&i[va])return Yv(i[va]());var s=Ie(i),o=s==Qt?xl:s==Dt?gu:Ds;return o(i)}function Ri(i){if(!i)return i===0?i:0;if(i=Or(i),i===yt||i===-yt){var s=i<0?-1:1;return s*Re}return i===i?i:0}function gt(i){var s=Ri(i),o=s%1;return s===s?o?s-o:s:0}function kd(i){return i?Rn(gt(i),0,se):0}function Or(i){if(typeof i=="number")return i;if(cr(i))return be;if(Xt(i)){var s=typeof i.valueOf=="function"?i.valueOf():i;i=Xt(s)?s+"":s}if(typeof i!="string")return i===0?i:+i;i=np(i);var o=Ti.test(i);return o||Dn.test(i)?Nv(i.slice(2),o?2:8):fa.test(i)?be:+i}function Hd(i){return oi(i,Ke(i))}function yA(i){return i?Rn(gt(i),-Bt,Bt):i===0?i:0}function It(i){return i==null?"":hr(i)}var vA=ws(function(i,s){if(Sa(s)||je(s)){oi(s,Ee(s),i);return}for(var o in s)Lt.call(s,o)&&ba(i,o,s[o])}),qd=ws(function(i,s){oi(s,Ke(s),i)}),ju=ws(function(i,s,o,h){oi(s,Ke(s),i,h)}),mA=ws(function(i,s,o,h){oi(s,Ee(s),i,h)}),xA=Mi(_l);function EA(i,s){var o=bs(i);return s==null?o:xp(o,s)}var AA=Et(function(i,s){i=Ut(i);var o=-1,h=s.length,p=h>2?s[2]:e;for(p&&Ue(s[0],s[1],p)&&(h=1);++o<h;)for(var m=s[o],E=Ke(m),T=-1,S=E.length;++T<S;){var W=E[T],V=i[W];(V===e||Gr(V,xs[W])&&!Lt.call(i,W))&&(i[W]=m[W])}return i}),bA=Et(function(i){return i.push(e,nd),or(Wd,e,i)});function wA(i,s){return tp(i,ut(s,3),ui)}function TA(i,s){return tp(i,ut(s,3),Dl)}function _A(i,s){return i==null?i:Cl(i,ut(s,3),Ke)}function CA(i,s){return i==null?i:Tp(i,ut(s,3),Ke)}function DA(i,s){return i&&ui(i,ut(s,3))}function SA(i,s){return i&&Dl(i,ut(s,3))}function OA(i){return i==null?[]:Bu(i,Ee(i))}function NA(i){return i==null?[]:Bu(i,Ke(i))}function sh(i,s,o){var h=i==null?e:Ln(i,s);return h===e?o:h}function MA(i,s){return i!=null&&ud(i,s,t1)}function ah(i,s){return i!=null&&ud(i,s,e1)}var BA=Jp(function(i,s,o){s!=null&&typeof s.toString!="function"&&(s=xu.call(s)),i[s]=o},oh(Je)),IA=Jp(function(i,s,o){s!=null&&typeof s.toString!="function"&&(s=xu.call(s)),Lt.call(i,s)?i[s].push(o):i[s]=[o]},ut),RA=Et(Ta);function Ee(i){return je(i)?vp(i):Ml(i)}function Ke(i){return je(i)?vp(i,!0):c1(i)}function LA(i,s){var o={};return s=ut(s,3),ui(i,function(h,p,m){Oi(o,s(h,p,m),h)}),o}function PA(i,s){var o={};return s=ut(s,3),ui(i,function(h,p,m){Oi(o,p,s(h,p,m))}),o}var FA=ws(function(i,s,o){Iu(i,s,o)}),Wd=ws(function(i,s,o,h){Iu(i,s,o,h)}),UA=Mi(function(i,s){var o={};if(i==null)return o;var h=!1;s=$t(s,function(m){return m=on(m,i),h||(h=m.length>1),m}),oi(i,zl(i),o),h&&(o=Cr(o,A|_|C,B1));for(var p=s.length;p--;)Fl(o,s[p]);return o});function kA(i,s){return Vd(i,Xu(ut(s)))}var HA=Mi(function(i,s){return i==null?{}:p1(i,s)});function Vd(i,s){if(i==null)return{};var o=$t(zl(i),function(h){return[h]});return s=ut(s),Rp(i,o,function(h,p){return s(h,p[0])})}function qA(i,s,o){s=on(s,i);var h=-1,p=s.length;for(p||(p=1,i=e);++h<p;){var m=i==null?e:i[li(s[h])];m===e&&(h=p,m=o),i=Ii(m)?m.call(i):m}return i}function WA(i,s,o){return i==null?i:Ca(i,s,o)}function VA(i,s,o,h){return h=typeof h=="function"?h:e,i==null?i:Ca(i,s,o,h)}var $d=rd(Ee),zd=rd(Ke);function $A(i,s,o){var h=dt(i),p=h||hn(i)||Cs(i);if(s=ut(s,4),o==null){var m=i&&i.constructor;p?o=h?new m:[]:Xt(i)?o=Ii(m)?bs(bu(i)):{}:o={}}return(p?wr:ui)(i,function(E,T,S){return s(o,E,T,S)}),o}function zA(i,s){return i==null?!0:Fl(i,s)}function GA(i,s,o){return i==null?i:kp(i,s,Hl(o))}function YA(i,s,o,h){return h=typeof h=="function"?h:e,i==null?i:kp(i,s,Hl(o),h)}function Ds(i){return i==null?[]:ml(i,Ee(i))}function XA(i){return i==null?[]:ml(i,Ke(i))}function ZA(i,s,o){return o===e&&(o=s,s=e),o!==e&&(o=Or(o),o=o===o?o:0),s!==e&&(s=Or(s),s=s===s?s:0),Rn(Or(i),s,o)}function QA(i,s,o){return s=Ri(s),o===e?(o=s,s=0):o=Ri(o),i=Or(i),r1(i,s,o)}function jA(i,s,o){if(o&&typeof o!="boolean"&&Ue(i,s,o)&&(s=o=e),o===e&&(typeof s=="boolean"?(o=s,s=e):typeof i=="boolean"&&(o=i,i=e)),i===e&&s===e?(i=0,s=1):(i=Ri(i),s===e?(s=i,i=0):s=Ri(s)),i>s){var h=i;i=s,s=h}if(o||i%1||s%1){var p=gp();return Be(i+p*(s-i+Ov("1e-"+((p+"").length-1))),s)}return Rl(i,s)}var KA=Ts(function(i,s,o){return s=s.toLowerCase(),i+(o?Gd(s):s)});function Gd(i){return uh(It(i).toLowerCase())}function Yd(i){return i=It(i),i&&i.replace(pa,Wv).replace(xv,"")}function JA(i,s,o){i=It(i),s=hr(s);var h=i.length;o=o===e?h:Rn(gt(o),0,h);var p=o;return o-=s.length,o>=0&&i.slice(o,p)==s}function tb(i){return i=It(i),i&&wn.test(i)?i.replace(Zi,Vv):i}function eb(i){return i=It(i),i&&rl.test(i)?i.replace(Ki,"\\$&"):i}var rb=Ts(function(i,s,o){return i+(o?"-":"")+s.toLowerCase()}),ib=Ts(function(i,s,o){return i+(o?" ":"")+s.toLowerCase()}),nb=Qp("toLowerCase");function sb(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;if(!s||h>=s)return i;var p=(s-h)/2;return ku(Cu(p),o)+i+ku(_u(p),o)}function ab(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;return s&&h<s?i+ku(s-h,o):i}function ub(i,s,o){i=It(i),s=gt(s);var h=s?vs(i):0;return s&&h<s?ku(s-h,o)+i:i}function ob(i,s,o){return o||s==null?s=0:s&&(s=+s),gm(It(i).replace(la,""),s||0)}function lb(i,s,o){return(o?Ue(i,s,o):s===e)?s=1:s=gt(s),Ll(It(i),s)}function hb(){var i=arguments,s=It(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var cb=Ts(function(i,s,o){return i+(o?"_":"")+s.toLowerCase()});function fb(i,s,o){return o&&typeof o!="number"&&Ue(i,s,o)&&(s=o=e),o=o===e?se:o>>>0,o?(i=It(i),i&&(typeof s=="string"||s!=null&&!nh(s))&&(s=hr(s),!s&&ys(i))?ln($r(i),0,o):i.split(s,o)):[]}var pb=Ts(function(i,s,o){return i+(o?" ":"")+uh(s)});function db(i,s,o){return i=It(i),o=o==null?0:Rn(gt(o),0,i.length),s=hr(s),i.slice(o,o+s.length)==s}function gb(i,s,o){var h=v.templateSettings;o&&Ue(i,s,o)&&(s=e),i=It(i),s=ju({},s,h,id);var p=ju({},s.imports,h.imports,id),m=Ee(p),E=ml(p,m),T,S,W=0,V=s.interpolate||ls,$="__p += '",Q=El((s.escape||ls).source+"|"+V.source+"|"+(V===Tn?lu:ls).source+"|"+(s.evaluate||ls).source+"|$","g"),nt="//# sourceURL="+(Lt.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Tv+"]")+`
15
+ `;i.replace(Q,function(lt,At,Tt,fr,ke,pr){return Tt||(Tt=fr),$+=i.slice(W,pr).replace(sl,$v),At&&(T=!0,$+=`' +
16
+ __e(`+At+`) +
17
+ '`),ke&&(S=!0,$+=`';
18
+ `+ke+`;
19
+ __p += '`),Tt&&($+=`' +
20
+ ((__t = (`+Tt+`)) == null ? '' : __t) +
21
+ '`),W=pr+lt.length,lt}),$+=`';
22
+ `;var ot=Lt.call(s,"variable")&&s.variable;if(!ot)$=`with (obj) {
23
+ `+$+`
24
24
  }
25
- `;else if(za.test(at))throw new ct(c);V=(T?V.replace(mt,""):V).replace(se,"$1").replace(_e,"$1;"),V="function("+(at||"obj")+`) {
26
- `+(at?"":`obj || (obj = {});
27
- `)+"var __t, __p = ''"+(w?", __e = _.escape":"")+(T?`, __j = Array.prototype.join;
25
+ `;else if(uu.test(ot))throw new pt(c);$=(S?$.replace(vt,""):$).replace(fe,"$1").replace(Me,"$1;"),$="function("+(ot||"obj")+`) {
26
+ `+(ot?"":`obj || (obj = {});
27
+ `)+"var __t, __p = ''"+(T?", __e = _.escape":"")+(S?`, __j = Array.prototype.join;
28
28
  function print() { __p += __j.call(arguments, '') }
29
29
  `:`;
30
- `)+V+`return __p
31
- }`;var yt=vd(function(){return Ct(m,et+"return "+V).apply(e,E)});if(yt.source=V,kl(yt))throw yt;return yt}function db(r){return Nt(r).toLowerCase()}function gb(r){return Nt(r).toUpperCase()}function mb(r,s,u){if(r=Nt(r),r&&(u||s===e))return Tf(r);if(!r||!(s=ir(s)))return r;var h=Lr(r),p=Lr(s),m=Cf(h,p),E=Sf(h,p)+1;return jn(h,m,E).join("")}function vb(r,s,u){if(r=Nt(r),r&&(u||s===e))return r.slice(0,Nf(r)+1);if(!r||!(s=ir(s)))return r;var h=Lr(r),p=Sf(h,Lr(s))+1;return jn(h,0,p).join("")}function yb(r,s,u){if(r=Nt(r),r&&(u||s===e))return r.replace(Zs,"");if(!r||!(s=ir(s)))return r;var h=Lr(r),p=Cf(h,Lr(s));return jn(h,p).join("")}function xb(r,s){var u=nt,h=J;if($t(s)){var p="separator"in s?s.separator:p;u="length"in s?pt(s.length):u,h="omission"in s?ir(s.omission):h}r=Nt(r);var m=r.length;if(is(r)){var E=Lr(r);m=E.length}if(u>=m)return r;var w=u-ss(h);if(w<1)return h;var T=E?jn(E,0,w).join(""):r.slice(0,w);if(p===e)return T+h;if(E&&(w+=T.length-w),Ul(p)){if(r.slice(w).search(p)){var k,U=T;for(p.global||(p=el(p.source,Nt(Qs.exec(p))+"g")),p.lastIndex=0;k=p.exec(U);)var V=k.index;T=T.slice(0,V===e?w:V)}}else if(r.indexOf(ir(p),w)!=w){var X=T.lastIndexOf(p);X>-1&&(T=T.slice(0,X))}return T+h}function Eb(r){return r=Nt(r),r&&tr.test(r)?r.replace(fr,Zm):r}var bb=fs(function(r,s,u){return r+(u?" ":"")+s.toUpperCase()}),Wl=yp("toUpperCase");function md(r,s,u){return r=Nt(r),s=u?e:s,s===e?zm(r)?Km(r):Rm(r):r.match(s)||[]}var vd=xt(function(r,s){try{return rr(r,e,s)}catch(u){return kl(u)?u:new ct(u)}}),Ab=bn(function(r,s){return mr(s,function(u){u=Jr(u),xn(r,u,Pl(r[u],r))}),r});function wb(r){var s=r==null?0:r.length,u=st();return r=s?qt(r,function(h){if(typeof h[1]!="function")throw new vr(l);return[u(h[0]),h[1]]}):[],xt(function(h){for(var p=-1;++p<s;){var m=r[p];if(rr(m[0],this,h))return rr(m[1],this,h)}})}function Db(r){return Zv(xr(r,D))}function Vl(r){return function(){return r}}function _b(r,s){return r==null||r!==r?s:r}var Tb=Ep(),Cb=Ep(!0);function Ye(r){return r}function zl(r){return jf(typeof r=="function"?r:xr(r,D))}function Sb(r){return Kf(xr(r,D))}function Ob(r,s){return Jf(r,xr(s,D))}var Nb=xt(function(r,s){return function(u){return ha(u,r,s)}}),Mb=xt(function(r,s){return function(u){return ha(r,u,s)}});function $l(r,s,u){var h=pe(s),p=gu(s,h);u==null&&!($t(s)&&(p.length||!h.length))&&(u=s,s=r,r=this,p=gu(s,pe(s)));var m=!($t(u)&&"chain"in u)||!!u.chain,E=wn(r);return mr(p,function(w){var T=s[w];r[w]=T,E&&(r.prototype[w]=function(){var k=this.__chain__;if(m||k){var U=r(this.__wrapped__),V=U.__actions__=ze(this.__actions__);return V.push({func:T,args:arguments,thisArg:r}),U.__chain__=k,U}return T.apply(r,zn([this.value()],arguments))})}),r}function Bb(){return ve._===this&&(ve._=iv),this}function Gl(){}function Ib(r){return r=pt(r),xt(function(s){return tp(s,r)})}var Lb=wl(qt),Rb=wl(bf),Pb=wl(Xo);function yd(r){return Nl(r)?Zo(Jr(r)):fy(r)}function Fb(r){return function(s){return r==null?e:Ai(r,s)}}var kb=Ap(),Ub=Ap(!0);function Yl(){return[]}function Xl(){return!1}function Hb(){return{}}function qb(){return""}function Wb(){return!0}function Vb(r,s){if(r=pt(r),r<1||r>Ot)return[];var u=Jt,h=Te(r,Jt);s=st(s),r-=Jt;for(var p=Ko(h,s);++u<r;)s(u);return p}function zb(r){return ft(r)?qt(r,Jr):sr(r)?[r]:ze(kp(Nt(r)))}function $b(r){var s=++rv;return Nt(r)+s}var Gb=bu(function(r,s){return r+s},0),Yb=Dl("ceil"),Xb=bu(function(r,s){return r/s},1),Zb=Dl("floor");function jb(r){return r&&r.length?du(r,Ye,ll):e}function Qb(r,s){return r&&r.length?du(r,st(s,2),ll):e}function Kb(r){return Df(r,Ye)}function Jb(r,s){return Df(r,st(s,2))}function tA(r){return r&&r.length?du(r,Ye,pl):e}function eA(r,s){return r&&r.length?du(r,st(s,2),pl):e}var rA=bu(function(r,s){return r*s},1),nA=Dl("round"),iA=bu(function(r,s){return r-s},0);function sA(r){return r&&r.length?Qo(r,Ye):0}function aA(r,s){return r&&r.length?Qo(r,st(s,2)):0}return g.after=Sx,g.ary=Zp,g.assign=gE,g.assignIn=ld,g.assignInWith=Lu,g.assignWith=mE,g.at=vE,g.before=jp,g.bind=Pl,g.bindAll=Ab,g.bindKey=Qp,g.castArray=Hx,g.chain=Gp,g.chunk=Zy,g.compact=jy,g.concat=Qy,g.cond=wb,g.conforms=Db,g.constant=Vl,g.countBy=sx,g.create=yE,g.curry=Kp,g.curryRight=Jp,g.debounce=td,g.defaults=xE,g.defaultsDeep=EE,g.defer=Ox,g.delay=Nx,g.difference=Ky,g.differenceBy=Jy,g.differenceWith=t1,g.drop=e1,g.dropRight=r1,g.dropRightWhile=n1,g.dropWhile=i1,g.fill=s1,g.filter=ux,g.flatMap=hx,g.flatMapDeep=cx,g.flatMapDepth=fx,g.flatten=Wp,g.flattenDeep=a1,g.flattenDepth=u1,g.flip=Mx,g.flow=Tb,g.flowRight=Cb,g.fromPairs=o1,g.functions=CE,g.functionsIn=SE,g.groupBy=px,g.initial=h1,g.intersection=c1,g.intersectionBy=f1,g.intersectionWith=p1,g.invert=NE,g.invertBy=ME,g.invokeMap=gx,g.iteratee=zl,g.keyBy=mx,g.keys=pe,g.keysIn=Ge,g.map=Su,g.mapKeys=IE,g.mapValues=LE,g.matches=Sb,g.matchesProperty=Ob,g.memoize=Nu,g.merge=RE,g.mergeWith=hd,g.method=Nb,g.methodOf=Mb,g.mixin=$l,g.negate=Mu,g.nthArg=Ib,g.omit=PE,g.omitBy=FE,g.once=Bx,g.orderBy=vx,g.over=Lb,g.overArgs=Ix,g.overEvery=Rb,g.overSome=Pb,g.partial=Fl,g.partialRight=ed,g.partition=yx,g.pick=kE,g.pickBy=cd,g.property=yd,g.propertyOf=Fb,g.pull=v1,g.pullAll=zp,g.pullAllBy=y1,g.pullAllWith=x1,g.pullAt=E1,g.range=kb,g.rangeRight=Ub,g.rearg=Lx,g.reject=bx,g.remove=b1,g.rest=Rx,g.reverse=Ll,g.sampleSize=wx,g.set=HE,g.setWith=qE,g.shuffle=Dx,g.slice=A1,g.sortBy=Cx,g.sortedUniq=O1,g.sortedUniqBy=N1,g.split=hb,g.spread=Px,g.tail=M1,g.take=B1,g.takeRight=I1,g.takeRightWhile=L1,g.takeWhile=R1,g.tap=j1,g.throttle=Fx,g.thru=Cu,g.toArray=ad,g.toPairs=fd,g.toPairsIn=pd,g.toPath=zb,g.toPlainObject=od,g.transform=WE,g.unary=kx,g.union=P1,g.unionBy=F1,g.unionWith=k1,g.uniq=U1,g.uniqBy=H1,g.uniqWith=q1,g.unset=VE,g.unzip=Rl,g.unzipWith=$p,g.update=zE,g.updateWith=$E,g.values=gs,g.valuesIn=GE,g.without=W1,g.words=md,g.wrap=Ux,g.xor=V1,g.xorBy=z1,g.xorWith=$1,g.zip=G1,g.zipObject=Y1,g.zipObjectDeep=X1,g.zipWith=Z1,g.entries=fd,g.entriesIn=pd,g.extend=ld,g.extendWith=Lu,$l(g,g),g.add=Gb,g.attempt=vd,g.camelCase=jE,g.capitalize=dd,g.ceil=Yb,g.clamp=YE,g.clone=qx,g.cloneDeep=Vx,g.cloneDeepWith=zx,g.cloneWith=Wx,g.conformsTo=$x,g.deburr=gd,g.defaultTo=_b,g.divide=Xb,g.endsWith=QE,g.eq=Pr,g.escape=KE,g.escapeRegExp=JE,g.every=ax,g.find=ox,g.findIndex=Hp,g.findKey=bE,g.findLast=lx,g.findLastIndex=qp,g.findLastKey=AE,g.floor=Zb,g.forEach=Yp,g.forEachRight=Xp,g.forIn=wE,g.forInRight=DE,g.forOwn=_E,g.forOwnRight=TE,g.get=Hl,g.gt=Gx,g.gte=Yx,g.has=OE,g.hasIn=ql,g.head=Vp,g.identity=Ye,g.includes=dx,g.indexOf=l1,g.inRange=XE,g.invoke=BE,g.isArguments=_i,g.isArray=ft,g.isArrayBuffer=Xx,g.isArrayLike=$e,g.isArrayLikeObject=jt,g.isBoolean=Zx,g.isBuffer=Qn,g.isDate=jx,g.isElement=Qx,g.isEmpty=Kx,g.isEqual=Jx,g.isEqualWith=tE,g.isError=kl,g.isFinite=eE,g.isFunction=wn,g.isInteger=rd,g.isLength=Bu,g.isMap=nd,g.isMatch=rE,g.isMatchWith=nE,g.isNaN=iE,g.isNative=sE,g.isNil=uE,g.isNull=aE,g.isNumber=id,g.isObject=$t,g.isObjectLike=Yt,g.isPlainObject=ma,g.isRegExp=Ul,g.isSafeInteger=oE,g.isSet=sd,g.isString=Iu,g.isSymbol=sr,g.isTypedArray=ds,g.isUndefined=lE,g.isWeakMap=hE,g.isWeakSet=cE,g.join=d1,g.kebabCase=tb,g.last=br,g.lastIndexOf=g1,g.lowerCase=eb,g.lowerFirst=rb,g.lt=fE,g.lte=pE,g.max=jb,g.maxBy=Qb,g.mean=Kb,g.meanBy=Jb,g.min=tA,g.minBy=eA,g.stubArray=Yl,g.stubFalse=Xl,g.stubObject=Hb,g.stubString=qb,g.stubTrue=Wb,g.multiply=rA,g.nth=m1,g.noConflict=Bb,g.noop=Gl,g.now=Ou,g.pad=nb,g.padEnd=ib,g.padStart=sb,g.parseInt=ab,g.random=ZE,g.reduce=xx,g.reduceRight=Ex,g.repeat=ub,g.replace=ob,g.result=UE,g.round=nA,g.runInContext=_,g.sample=Ax,g.size=_x,g.snakeCase=lb,g.some=Tx,g.sortedIndex=w1,g.sortedIndexBy=D1,g.sortedIndexOf=_1,g.sortedLastIndex=T1,g.sortedLastIndexBy=C1,g.sortedLastIndexOf=S1,g.startCase=cb,g.startsWith=fb,g.subtract=iA,g.sum=sA,g.sumBy=aA,g.template=pb,g.times=Vb,g.toFinite=Dn,g.toInteger=pt,g.toLength=ud,g.toLower=db,g.toNumber=Ar,g.toSafeInteger=dE,g.toString=Nt,g.toUpper=gb,g.trim=mb,g.trimEnd=vb,g.trimStart=yb,g.truncate=xb,g.unescape=Eb,g.uniqueId=$b,g.upperCase=bb,g.upperFirst=Wl,g.each=Yp,g.eachRight=Xp,g.first=Vp,$l(g,function(){var r={};return Qr(g,function(s,u){Bt.call(g.prototype,u)||(r[u]=s)}),r}(),{chain:!1}),g.VERSION=i,mr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){g[r].placeholder=g}),mr(["drop","take"],function(r,s){bt.prototype[r]=function(u){u=u===e?1:ue(pt(u),0);var h=this.__filtered__&&!s?new bt(this):this.clone();return h.__filtered__?h.__takeCount__=Te(u,h.__takeCount__):h.__views__.push({size:Te(u,Jt),type:r+(h.__dir__<0?"Right":"")}),h},bt.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),mr(["filter","map","takeWhile"],function(r,s){var u=s+1,h=u==dt||u==O;bt.prototype[r]=function(p){var m=this.clone();return m.__iteratees__.push({iteratee:st(p,3),type:u}),m.__filtered__=m.__filtered__||h,m}}),mr(["head","last"],function(r,s){var u="take"+(s?"Right":"");bt.prototype[r]=function(){return this[u](1).value()[0]}}),mr(["initial","tail"],function(r,s){var u="drop"+(s?"":"Right");bt.prototype[r]=function(){return this.__filtered__?new bt(this):this[u](1)}}),bt.prototype.compact=function(){return this.filter(Ye)},bt.prototype.find=function(r){return this.filter(r).head()},bt.prototype.findLast=function(r){return this.reverse().find(r)},bt.prototype.invokeMap=xt(function(r,s){return typeof r=="function"?new bt(this):this.map(function(u){return ha(u,r,s)})}),bt.prototype.reject=function(r){return this.filter(Mu(st(r)))},bt.prototype.slice=function(r,s){r=pt(r);var u=this;return u.__filtered__&&(r>0||s<0)?new bt(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),s!==e&&(s=pt(s),u=s<0?u.dropRight(-s):u.take(s-r)),u)},bt.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},bt.prototype.toArray=function(){return this.take(Jt)},Qr(bt.prototype,function(r,s){var u=/^(?:filter|find|map|reject)|While$/.test(s),h=/^(?:head|last)$/.test(s),p=g[h?"take"+(s=="last"?"Right":""):s],m=h||/^find/.test(s);p&&(g.prototype[s]=function(){var E=this.__wrapped__,w=h?[1]:arguments,T=E instanceof bt,k=w[0],U=T||ft(E),V=function(Et){var wt=p.apply(g,zn([Et],w));return h&&X?wt[0]:wt};U&&u&&typeof k=="function"&&k.length!=1&&(T=U=!1);var X=this.__chain__,et=!!this.__actions__.length,at=m&&!X,yt=T&&!et;if(!m&&U){E=yt?E:new bt(this);var ut=r.apply(E,w);return ut.__actions__.push({func:Cu,args:[V],thisArg:e}),new yr(ut,X)}return at&&yt?r.apply(this,w):(ut=this.thru(V),at?h?ut.value()[0]:ut.value():ut)})}),mr(["pop","push","shift","sort","splice","unshift"],function(r){var s=Ja[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",h=/^(?:pop|shift)$/.test(r);g.prototype[r]=function(){var p=arguments;if(h&&!this.__chain__){var m=this.value();return s.apply(ft(m)?m:[],p)}return this[u](function(E){return s.apply(ft(E)?E:[],p)})}}),Qr(bt.prototype,function(r,s){var u=g[s];if(u){var h=u.name+"";Bt.call(ls,h)||(ls[h]=[]),ls[h].push({name:s,func:u})}}),ls[Eu(e,F).name]=[{name:"wrapper",func:e}],bt.prototype.clone=Ev,bt.prototype.reverse=bv,bt.prototype.value=Av,g.prototype.at=Q1,g.prototype.chain=K1,g.prototype.commit=J1,g.prototype.next=tx,g.prototype.plant=rx,g.prototype.reverse=nx,g.prototype.toJSON=g.prototype.valueOf=g.prototype.value=ix,g.prototype.first=g.prototype.head,na&&(g.prototype[na]=ex),g},as=Jm();vi?((vi.exports=as)._=as,zo._=as):ve._=as}).call(vs)}(Sa,Sa.exports);var ug=Sa.exports;const St=Ql(ug);class It{isBox2=!0;min;max;constructor(t=new G(1/0,1/0),e=new G(-1/0,-1/0)){this.min=t,this.max=e}applyMatrix3(t){return this.isEmpty()?this:(Os[0].set(this.min.x,this.min.y).applyMatrix3(t),Os[1].set(this.min.x,this.max.y).applyMatrix3(t),Os[3].set(this.max.x,this.max.y).applyMatrix3(t),Os[2].set(this.max.x,this.min.y).applyMatrix3(t),this.setFromPoints(Os),this)}clone(){return new It().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}ceil(){return this.min.ceilToZero(),this.max.ceilToZero(),this}distanceToPoint(t){return _r.copy(t).clamp(this.min,this.max).sub(t).length()}expandByXY(t,e){return this.min.minXY(t,e),this.max.maxXY(t,e),this}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByPoints(t){if(!t||!t.length)return this;for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t){return t.updateWorldMatrix(!1,!1),t.geometry.boundingBox!==void 0?((!t.geometry.boundingBox||t.geometry.boundingBox.isEmpty())&&t.computeBoundingBox(),Fi.copy(t.geometry.boundingBox),Fi.applyMatrix3(t.matrixWorld),this.union(Fi)):t.geometry.points&&t.geometry.points.length&&(Fi.setFromPoints(t.geometry.points),Fi.applyMatrix3(t.matrixWorld),this.union(Fi)),this}expandByBox(t){this.expandByPoint(t.min),this.expandByPoint(t.max)}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}floor(){return this.min.floorToZero(),this.max.floorToZero(),this}getCenter(t=new G){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}getPoints(t=[]){return t.length=0,t[0]={x:this.min.x,y:this.min.y},t[1]={x:this.min.x,y:this.max.y},t[2]={x:this.max.x,y:this.max.y},t[3]={x:this.max.x,y:this.min.y},t}getArea(){return this.getSize(_r),_r.x*_r.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}intersectsBox(t){return t?!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y):!1}intersectsObject(t){return!t||!t.geometry?!1:this.intersectsBox(t.geometry.boundingBox)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}round(){return this.min.roundToZero(),this.max.roundToZero(),this}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e+=3)this.expandByPoint(_r.fromArray(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const i=_r.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}setFromProjectionMatrix(t){return this.min.set(t.elements[6],t.elements[7]),this.max.set(t.elements[6],t.elements[7]),this}setFromObject(t){return this.makeEmpty(),this.expandByObject(t)}setFromMinMaxString(t,e=" "){if(this.makeEmpty(),!(t!=null&&t.length))return this;let i=t.split(e),a=St.map(i,o=>parseFloat(o));for(let o=0,l=a.length;o<l;o+=2)this.expandByPoint(_r.fromArray(a,o));return this}translate(t){return this.min.add(t),this.max.add(t),this}toString(){return`{min:${this.min.toString()},max:${this.max.toString()}}`}union(t){return t.validate()?(this.min.min(t.min),this.max.max(t.max),this):this}validate(){return this.min.validate()&&this.max.validate()}unproject(t){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}centralArrange(t=1,e=20,i=10){const a=e+i;this.getCenter(_r),this.getSize(Jn),Jn.subScalar(e);const o=Math.floor(Jn.x/a),l=Math.ceil(t/o),c=o*a,f=l*a;if(Jn.x<a||Jn.y<a||c>=Jn.x||f>=Jn.y)return _r.clone();let x=[],D=0,C=0;for(let S=0;S<t;S++){const H=o>t?t*a:c,I=_r.x-H/2+C*a+a/2,B=_r.y-f/2+D*a+a/2;x.push(new G(I,B)),C++,C>=o&&(C=0,D++)}return x}}const Fi=new It,Os=[new G,new G,new G,new G],_r=new G,Jn=new G,og=Object.freeze(Object.defineProperty({__proto__:null,default:It},Symbol.toStringTag,{value:"Module"})),lg=Xe.window.requestAnimationFrame,Ns=Xe.window.performance?()=>Xe.window.performance.now():()=>new Date().getTime(),Vh=lg;class Lt{static idCounter=0;id=Lt.idCounter++;timers=new Map;timersDuration=new Map;counters=new Map;countersAmount=new Map;out=[];constructor(){}destroy(){Lt.remove(this)}addTimer(t,e=Ns(),i=Ns()-(this.timersDuration.get(t)||Ns())){this.addTimerDuration(t,i),this.timersDuration.set(t,e)}addTimerDuration(t,e){var i;this.timers.has(t)||this.timers.set(t,[]),(i=this.timers.get(t))==null||i.push(e)}calculateTimers(){this.timers.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateDurations(e,t)),t.length=0)})}addCounterAmount(t,e){var i;this.counters.has(t)||this.counters.set(t,[]),(i=this.counters.get(t))==null||i.push(e)}calculateCounters(){this.counters.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateAmounts(e,t)),t.length=0)})}start(){return this.stop(),Lt.add(this),this}stop(){return Lt.remove(this),this}calculateDurations(t,e){const i={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return i;const a=e.length,{min:o,max:l,avg:c}=this.minMaxAvg(e),f=parseFloat(this.stdDev(e,c).toFixed(2));return{name:t,avg:this.fd(c),min:this.fd(o),max:this.fd(l),stdDev:f,count:a,FPS:Math.ceil(a/Lt.duration*1e3)}}calculateAmounts(t,e){const i={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return i;const a=e.length,{min:o,max:l,avg:c}=this.minMaxAvg(e),f=this.stdDev(e,c);return{name:t,avg:c,min:o,max:l,stdDev:f,count:a,FPS:Math.ceil(a/Lt.duration*1e3)}}minMaxAvg(t){let e=t[0],i=t[0],a=t.length,o=0;for(let c=0;c<t.length;c++){const f=t[c];o+=f,f<e&&(e=f),f>i&&(i=f)}const l=o/a;return{min:this.fx(e),max:this.fx(i),avg:this.fx(l)}}stdDev(t,e){let i=0;for(let o=0;o<t.length;o++){const l=t[o];i+=(l-e)*(l-e)}const a=t.length;return this.fx(Math.sqrt(i/a))}fd(t){return t>1e3?(t/1e3).toFixed(1)+"s":t.toFixed(1)+"ms"}fx(t,e=1){return e===1?Math.round(t*10)/10:e===2?Math.round(t*100)/100:e===3?Math.round(t*1e3)/1e3:t}static children=[];static isRunning=!1;static actived=!1;static duration=0;static lastTime=Ns();static messages=[];static maxLetters=20;static active(t){t?Lt.actived=!0:Lt.actived=!1,Lt.duration=t||0}static add(t){this.children.push(t),this.handleStart()}static remove(t){for(let e=0,i=Lt.children.length;e<i;e++)if(Lt.children[e].id===t.id){this.children.splice(e,1);break}}static handleStart(){this.isRunning||(this.isRunning=!0,Vh(this.runLoop))}static runLoop(){Lt.children.length?(Lt.runFrames(),Vh(Lt.runLoop)):Lt.isRunning=!1}static runFrames(){let t,e=Ns();if(!(e-Lt.lastTime<Lt.duration)){Lt.lastTime=e;for(let i=0,a=this.children.length;i<a;i++)t=this.children[i],t.calculateTimers(),t.calculateCounters(),Lt.messages=Lt.messages.concat(t.out),t.out.length=0;if(Lt.messages.length){if(Lt.actived){let i=[];i.push(hg),i.push(cg),i.push(fg),this.messages.forEach(a=>i.push(yg(a,this.maxLetters))),i.push(pg),console.log(i.join(`
32
- `))}Lt.messages.length=0}}}}const Oa=20,Na=["avg","min","max","stdDev","count","FPS"],Hr=gg(Na,1),hg=dg(Na,Oa),cg=mg(Na,Oa),fg=vg(Na,Oa),pg=xg(Oa);function dg(n,t=20){let e="┌";e+="─".repeat(t),e+="┬";for(let i=0,a=n.length;i<a;i++)e+="─".repeat(Hr),i<a-1?e+="┬":e+="┐";return e}function gg(n,t=0){let e=0;for(let i=0,a=n.length;i<a;i++)e=Math.max(e,n[i].length);return e+t}function mg(n,t=20){let e="│";e+=" ".repeat(t),e+="│";for(let i=0,a=n.length;i<a;i++)e+=" ".repeat(Math.max(Hr-n[i].length-1,0)),e+=n[i],e+=" │";return e}function vg(n,t=20){let e="├";e+="─".repeat(t),e+="┼";for(let i=0,a=n.length;i<a;i++)e+="─".repeat(Hr),i<a-1?e+="┴":e+="┘";return e}function yg(n,t=20){let e="│";e+=" ".repeat(Math.max(t-n.name.length,0)),e+=n.name,e+="│";const i=typeof n.avg=="string"?Hr-n.avg.length:Hr-n.avg.toString().length;return e+=" ".repeat(Math.max(i,0)),e+=n.avg+" ",e+=" ".repeat(Math.max(Hr-n.min.toString().length,0)),e+=n.min+" ",e+=" ".repeat(Math.max(Hr-n.max.toString().length,0)),e+=n.max+" ",e+=" ".repeat(Math.max(Hr-n.stdDev.toString().length,0)),e+=n.stdDev+" ",e+=" ".repeat(Math.max(Hr-n.count.toString().length,0)),e+=n.count+" ",e+=" ".repeat(Math.max(Hr-n.FPS.toString().length,0)),e+=n.FPS,e}function xg(n=20){let t="└";for(let e=0;e<n;e++)t+="─";return t+="┘",t}var Ze=(n=>(n.GROS="gros",n.RM="rm",n.WS="ws",n.SU="su",n.EQ="eq",n.FN="fn",n.GL="gl",n.IP="ip",n))(Ze||{}),Ms=(n=>(n.BACKGROUND="background",n.ASSETS="assets",n.ANNOTATIONS="annotations",n.TEXT="text",n.ASSET_LABELS="asset-labels",n.LABELS="labels",n))(Ms||{});class qr{_listeners=new Map;destroy(){this._listeners.clear()}addEventListener(t,e){let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.includes(e)||i.push(e)}addEventListeners(t,e){const i=t.split(","),a=i.length;for(let o=0;o<a;o++)this.addEventListener(i[o].trim(),e)}isListening(t){var e;return this._listeners.has(t)&&!!((e=this._listeners.get(t))!=null&&e.length)}hasEventListener(t,e){var i;return this._listeners.size===0?!1:this._listeners.has(t)&&!!((i=this._listeners.get(t))!=null&&i.includes(e))}removeEventListener(t,e){const i=this._listeners.get(t);if(i){const a=i.indexOf(e);a>-1&&i.splice(a,1)}}dispatchEvent(t){const e=this._listeners.get(t.type);if(e){t.target=this;const i=e.slice(0);for(let a=0,o=i.length;a<o;a++)i[a].call(this,t);t.target=void 0}}dispatchEventAsync(t){const e=this._listeners.get(t.type);e&&setTimeout(()=>{for(const i of e)i.call(this,t)})}}function Ju(n,t="http://www.w3.org/2000/svg"){var e,i;return(i=(e=Xe.window)==null?void 0:e.document)==null?void 0:i.createElementNS(t,n)}async function zh(n=2e3){return new Promise(t=>setTimeout(t,(Math.random()+.5)*n))}function $h(n,t=[]){var e,i;return!n||!n.value||(t.push(n.value),(e=n.children)!=null&&e.length&&((i=n.children)==null||i.forEach(a=>$h(a,t)))),t}function Gh(n){if(!n)return"inches";let t=n.querySelector("#defaultView"),e=t==null?void 0:t.getAttribute("units");return e||"inches"}function Eg(n){if(!n)return 1;let t=Gh(n),e=1;switch(t){case"mm":e=500/39.3701;break;case"cm":e=50/39.3701;break;case"Metres":e=.5/39.3701;break;case"m":e=.5/39.3701;break;default:e=1}return e}function bg(n,t=new It){if(!n)return t;let e=n.split(" "),i=St.map(e,a=>parseFloat(a));return(i==null?void 0:i.length)!==4||(t.min.set(i[0],i[1]),t.max.set(i[0]+i[2],i[1]+i[3])),t}function Ag(n=new It){let t="";const e=[];return e.push(n.min.x),e.push(n.min.y),e.push(Math.abs(n.max.x-n.min.x)),e.push(Math.abs(n.max.y-n.min.y)),t=e.join(" "),t}function Yh(n){var t;if((t=n==null?void 0:n.children)!=null&&t.length){for(let e=0,i=n.children.length;e<i;e++)if(n.children[e].nodeName==="g")return n.children[e]}}const wg=new Lt().start();class Dg{isSvgRenderer=!0;id;params;container=Xe.window.document.getElementsByTagName("body")[0];cameraVersion=-1;viewAreaLimit=-1;constructor(t){this.id="SvgRenderer@"+Date.now(),this.params=t,Xe.config=t,this.initSvg(),Lt.active(this.params.monitorDuration)}destroy(){Lt.active(0)}initSvg(){if(this.params.containerId&&(this.container=Xe.window.document.getElementById(this.params.containerId)),this.container||(this.container=Xe.window.document.getElementsByTagName("body")[0]),!this.params.width||!this.params.height){const t=this.container.getBoundingClientRect();this.params.width=t.width,this.params.height=t.height}this.container.style.overflow="hidden",this.container.style.transform="translateZ(0)",this.setSize(this.params.width,this.params.height)}resize(){var e,i;const t=(i=(e=this.container)==null?void 0:e.parentElement)==null?void 0:i.getBoundingClientRect();t&&this.setSize(t.width,t.height)}setSize(t,e){this.container.style.width=t+"px",this.container.style.height=e+"px",this.params.width=t,this.params.height=e,this.params.camera||(this.params.camera={}),this.params.camera.width=this.params.width,this.params.camera.height=this.params.height,this.params.aspect=this.params.width/this.params.height,this.params.camera.aspect=this.params.aspect,this.params.camera.left=this.params.width*-.5,this.params.camera.right=this.params.width*.5,this.params.camera.top=this.params.height*.5,this.params.camera.bottom=this.params.height*-.5}getSize(t){return t.set(this.params.width,this.params.height)}clean(){}async render(t,e){var a;if(!t||!e||this.cameraVersion===(e==null?void 0:e.version))return;e.updateMatrixWorld(),Zh.set(0,0).unproject(e),jh.set(this.params.width,this.params.height).unproject(e),Xh.setFromPoints([Zh,jh]).round();let i=Ag(Xh);(a=t.svg)==null||a.setAttribute("viewBox",i),this.cameraVersion=e.version||-1,wg.addTimer("render cycle")}autoClear;getRenderTarget(){}setRenderTarget(t){}renderTexture(t){}}const Xh=new It,Zh=new G,jh=new G;class ie{isMatrix3=!0;elements=[1,0,0,0,1,0,0,0,1];constructor(){}static equals(t,e,i=1e-6){if(t.elements.length!=e.elements.length)return!1;for(let a=0,o=t.elements.length;a<o;a++){const l=t.elements[a]-e.elements[a];if(Math.abs(l)>i)return!1}return!0}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}clone(){return new ie().fromArray(this.elements)}compose(t,e,i){const a=Math.sin(e.x),o=Math.cos(e.x);return this.set(i.x*o,i.y*a*-1,t.x,i.x*a,i.y*o,t.y,0,0,1)}composeWithCenter(t,e,i,a){return Tr.identity(),Ma.makeTranslation(t.x,t.y),Bs.makeRotation(e.x),ki.makeScale(i.x,i.y),ge.copy(a).applyMatrix3(ki),Tr.multiply(to.makeTranslation(-ge.x,-ge.y)).multiply(Ma).multiply(to.makeTranslation(ge.x,ge.y)).multiply(Bs).multiply(to.makeTranslation(-ge.x,-ge.y)).multiply(ki),this.copy(Tr)}decompose(t,e,i){const a=Tr.copy(this).elements,o=Math.sqrt(a[0]*a[0]+a[3]*a[3]),l=Math.sqrt(a[1]*a[1]+a[4]*a[4]),c=a[0]*a[4]-a[3]*a[1];a[0]||a[3]?i.set(o,c/o):a[1]||a[4]?i.set(c/l,l):i.set(0,0);let f=0;a[0]||a[3]?f=a[3]>0?-Math.acos(a[0]/o):Math.acos(a[0]/o):a[1]||a[4]?f=Math.PI/2-(a[4]>0?Math.acos(-a[1]/l):-Math.acos(a[1]/l)):f=0,f!==0&&i.y<0&&(f*=-1),e.set(f,f),t.set(a[6],a[7])}compose2(t,e,i){return this.identity().translate(t.x,t.y).rotate(e.x).scale(i.x,i.y),this}decompose2(t,e,i){const a=this.clone();a.scale(-1,1);const o=a.elements[0],l=a.elements[1],c=a.elements[3],f=a.elements[4];let v=0,x=0,D=0;if(o!==0||c!==0){const C=Math.hypot(o,c);v=C,x=(o*f-l*c)/C;const S=Math.acos(o/C);D=c>0?-S:S}else if(l!==0||f!==0){const C=Math.hypot(l,f);v=(o*f-l*c)/C,x=C;const S=Math.acos(l/C);D=Math.PI/2+(f>0?-S:S)}else v=0,x=0,D=0;v=-v,t.x=a.elements[6],t.y=a.elements[7],e.x=e.y=D/Math.PI/180,i.x=v,i.y=x}composeSvgTransform(t=0,e=0,i){if(!i&&!t&&!e)return this;let a=i==null?void 0:i.split(") ").map(o=>o.trim()+")").filter(o=>o!==")");return a||(a=[]),(t||e)&&a.push(`translate(${t},${e})`),this.identity(),Tr.identity(),a.forEach(o=>{const l=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(o),c=/rotate\(\s*(-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+))?)?\s*\)/.exec(o),f=/translate\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(o);if(l){const v=Number(l[1])||1,x=Number(l[2])||v;Tr.multiply(ki.makeScale(v,x))}else c?Number(c[2])||Number(c[3])?(Ee.set(Number(c[2]||"0"),Number(c[3]||"0")),Tr.multiply(Bs.makeRotationByPoint(Wh(Number(c[1])),Ee))):Tr.multiply(Bs.makeRotation(Wh(Number(c[1])||0))):f&&Tr.multiply(Ma.makeTranslation(Number(f[1])||0,Number(f[2])||0))}),this.copy(Tr),this}decomposeSvgMatrix(t,e,i){const a=Tr.copy(this).elements;Ee.set(a[0],a[1]),ge.set(a[3],a[4]);let o=Ee.length();Ee.normalize();let l=Ee.dot(ge);Qh.copy(Ee).multiplyScalar(-l),ge.add(Qh);const c=ge.length()||0;ge.normalize(),Ee.x*ge.y<ge.x*Ee.y&&(Ee.x=-Ee.x,Ee.y=-Ee.y,o=-o,l=-l);const f=o?Math.atan2(Ee.y,Ee.x):Math.atan2(-Ee.x,ge.y);t.set(a[6],a[7]),e.set(f,f),i.set(o,c)}determinant(){const t=this.elements,e=t[0],i=t[3],a=t[6],o=t[1],l=t[4],c=t[7],f=t[2],v=t[5],x=t[8];return e*l*x-e*v*c-o*i*x+o*v*a+f*i*c-f*l*a}equals(t,e=0){const i=this.elements,a=t.elements;for(let o=0;o<9;o++)if(Math.abs(i[o]-a[o])>e)return!1;return!0}extractBasis2(t,e){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),this}flipY(){return this.multiply(ki.makeScale(1,-1))}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}getComponents(t=[1,0,0,1,0,0]){return t[0]=this.elements[0],t[1]=this.elements[1],t[2]=this.elements[3],t[3]=this.elements[4],t[4]=this.elements[6],t[5]=this.elements[7],t}getNormalMatrix(t){return this.setFromMatrix(t).invert().transpose()}getRotation(t){let e=this.elements,i=0,a=0;e[0]||e[3]?i=Math.sqrt(e[0]*e[0]+e[3]*e[3]):(e[1]||e[4])&&(a=Math.sqrt(e[1]*e[1]+e[4]*e[4]));let o=0;e[0]||e[3]?o=e[3]>0?-Math.acos(e[0]/i):Math.acos(e[0]/i):(e[1]||e[4])&&(o=Math.PI/2-(e[4]>0?Math.acos(-e[1]/a):-Math.acos(e[1]/a))),this.getScale(ge),o!==0&&ge.y<0&&(o*=-1),t.set(o,o)}getScale(t){let e=this.elements,i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),a=Math.sqrt(e[3]*e[3]+e[4]*e[4]),o=e[0]*e[4]-e[3]*e[1];e[0]||e[1]?t.set(o/a,a):e[3]||e[4]?t.set(i,o/i):t.set(0,0)}getTransition(t){t.set(this.elements[6],this.elements[7])}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}invert(){const t=this.elements,e=t[0],i=t[1],a=t[2],o=t[3],l=t[4],c=t[5],f=t[6],v=t[7],x=t[8],D=x*l-c*v,C=c*f-x*o,S=v*o-l*f,H=e*D+i*C+a*S;if(H===0)return this.set(0,0,0,0,0,0,0,0,0);const I=1/H;return t[0]=D*I,t[1]=(a*v-x*i)*I,t[2]=(c*i-a*l)*I,t[3]=C*I,t[4]=(x*e-a*f)*I,t[5]=(a*o-c*e)*I,t[6]=S*I,t[7]=(i*f-v*e)*I,t[8]=(l*e-i*o)*I,this}lookAt(t,e,i){return this.identity().rotate(e.angle()-t.angle()+i.angle())}makeProjection(t,e,i,a,o,l){const c=o/(e-t),f=l/(i-a),v=o/2-(e+t)*c,x=l/2+(i+a)*f;return this.elements[0]=c,this.elements[3]=0,this.elements[6]=v,this.elements[1]=0,this.elements[4]=-f,this.elements[7]=x,this.elements[2]=0,this.elements[5]=0,this.elements[8]=1,this}makeRotation(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,i,e,0,0,0,1),this}makeRotationByPoint(t,e){const i=Math.cos(t),a=Math.sin(t),o=-e.x*i+e.y*a+e.x,l=-e.x*a-e.y*i+e.y;return this.set(i,-a,o,a,i,l,0,0,1),this}makeRotationFromQuaternion(t){return this.compose(_g,t,Tg)}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}multiply(t){return this.multiplyMatrices(this,t)}multiplyMatrices(t,e){const i=t.elements,a=e.elements,o=this.elements,l=i[0],c=i[3],f=i[6],v=i[1],x=i[4],D=i[7],C=i[2],S=i[5],H=i[8],I=a[0],B=a[3],F=a[6],W=a[1],Y=a[4],A=a[7],$=a[2],q=a[5],tt=a[8];return o[0]=l*I+c*W+f*$,o[3]=l*B+c*Y+f*q,o[6]=l*F+c*A+f*tt,o[1]=v*I+x*W+D*$,o[4]=v*B+x*Y+D*q,o[7]=v*F+x*A+D*tt,o[2]=C*I+S*W+H*$,o[5]=C*B+S*Y+H*q,o[8]=C*F+S*A+H*tt,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}premultiply(t){return this.multiplyMatrices(t,this)}rotate(t){return this.premultiply(Bs.makeRotation(-t))}scale(t,e){return this.premultiply(ki.makeScale(t,e))}set(t,e,i,a,o,l,c,f,v){return this.elements[0]=t,this.elements[3]=e,this.elements[6]=i,this.elements[1]=a,this.elements[4]=o,this.elements[7]=l,this.elements[2]=c,this.elements[5]=f,this.elements[8]=v,this}setFromDomMatrix(t){return typeof t.m11<"u"&&typeof t.m21<"u"&&typeof t.m41<"u"&&typeof t.m12<"u"&&typeof t.m22<"u"&&typeof t.m42<"u"&&typeof t.m14<"u"&&typeof t.m24<"u"&&typeof t.m44<"u"?this.set(t.m11,t.m21,t.m41,t.m12,t.m22,t.m42,t.m14,t.m24,t.m44):typeof t.a<"u"&&typeof t.b<"u"&&typeof t.c<"u"&&typeof t.d<"u"&&typeof t.e<"u"&&typeof t.f<"u"&&this.set(t.a,t.c,t.e,t.b,t.d,t.f,0,0,1),this}setFromMatrix(t){const e=t.elements;return this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]),this}setUvTransform(t,e,i,a,o,l,c){const f=Math.cos(o),v=Math.sin(o);return this.set(i*f,i*v,-i*(f*l+v*c)+l+t,-a*v,a*f,-a*(-v*l+f*c)+c+e,0,0,1),this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}toString(){return`[${this.elements[0]},${this.elements[1]}, ${this.elements[3]},${this.elements[4]}, ${this.elements[6]},${this.elements[7]}]`}translate(t,e){return this.premultiply(Ma.makeTranslation(t,e))}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}}const Ee=new G,ge=new G,Qh=new G,Tr=new ie,Ma=new ie,Bs=new ie,ki=new ie,to=new ie,_g=new G(0,0,0),Tg=new G(1,1,1),be=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],Cg=()=>{const n=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(be[n&255]+be[n>>8&255]+be[n>>16&255]+be[n>>24&255]+"-"+be[t&255]+be[t>>8&255]+"-"+be[t>>16&15|64]+be[t>>24&255]+"-"+be[e&63|128]+be[e>>8&255]+"-"+be[e>>16&255]+be[e>>24&255]+be[i&255]+be[i>>8&255]+be[i>>16&255]+be[i>>24&255]).toLowerCase()};let Sg=0;const eo=new G,Cr=new ie,Kh=new G,ro=new It,Is=new G,no=new G,ti=new G,Og=new G(0,1),Ng={type:"added"},io={type:"removed"};class Jh extends qr{isObject2=!0;id=Sg++;uuid=Cg();name;type="Object2";featureKey="Object2_"+this.id;_version=0;parent;children=[];up=new G(0,1);position=new G;rotation=new G;scaled=new G(1,1);flipY=!1;selectable=!1;matrix=new ie;matrixWorld=new ie;matrixWorldInverse=new ie;modelViewMatrix=new ie;normalMatrix=new ie;fixed=!1;dynamically=!1;matrixAutoUpdate=!1;matrixWorldNeedsUpdate=!1;matrixWorldAutoUpdate=!1;composeNode=!1;isInComposeNode=!1;alignCenter=!1;boundingBox=new It;boundingBoxWorld=new It;boundingBoxNeedsUpdate=!1;centerPoint=new G;visible=!0;castShadow=!1;receiveShadow=!1;renderOrder=0;animations=[];finalSize;userData={};DefaultUp=new G(0,1);_autoSort=!0;constructor(t={}){super(),t.name!==void 0?this.name=t.name:this.name="Object2",t.flipY!==void 0&&(this.flipY=t.flipY),t.selectable!==void 0&&(this.selectable=t.selectable),t.finalSize!==void 0&&(this.finalSize=t.finalSize),this.setAttrs(t)}set needsUpdate(t){t&&this._version++}get version(){return this._version}set version(t){this._version=t}destroy(){super.destroy(),this.clear(),this.parent=void 0,this.dispatchEvent(io)}setPosition(t){return this.position.set(t.x,t.y),this}translate(t,e){this.position.x+=t,this.position.y+=e}setScale(t,e){return this.scaled.set(t,e),this}setRotationFromMatrix(t){t.decompose(Is,this.rotation,no)}setRotation(t){return this.rotation.set(t,t),this}rotate(t){this.rotation.x+=t}scale(t,e){e?(this.scaled.x*=t,this.scaled.y*=e):this.scaled.multiplyScalar(t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(Cr.copy(this.matrixWorld).invert())}lookAt(t){Kh.copy(t),this.updateWorldMatrix(!0,!1),this.matrixWorld.getTransition(Is),Cr.lookAt(Is,Kh,Og),Cr.getRotation(ti),this.rotation.set(ti.x,ti.x),this.parent&&(this.parent.matrixWorld.getRotation(ti),this.rotate(ti.x))}applyMatrix3(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.rotation,this.scaled)}updateMatrix(){eo.copy(this.scaled),this.flipY&&(eo.y*=-1),this.matrix.compose(this.position,this.rotation,eo),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.matrixWorldNeedsUpdate=!1,t=!0,this.boundingBoxNeedsUpdate=!0);const e=this.children;for(let i=0,a=e.length;i<a;i++)e[i].updateMatrixWorld(t);this.boundingBoxNeedsUpdate&&(this.updateBoundingBox(),this.boundingBoxNeedsUpdate=!1)}updateWorldMatrix(t=!1,e=!1){const i=this.parent;if(t&&i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),e){const a=this.children;for(let o=0,l=a.length;o<l;o++)a[o].updateWorldMatrix(!1,!0)}}updateModelViewMatrix(t){Cr.copy(this.matrixWorld),this.isInComposeNode?this.modelViewMatrix.copy(this.matrix):t&&this.fixed?this.modelViewMatrix.copy(t.projectionMatrix):t?this.modelViewMatrix.multiplyMatrices(t.viewMatrix,Cr):this.modelViewMatrix.copy(Cr);for(let e=0,i=this.children.length;e<i;e++)this.children[e].updateModelViewMatrix(t)}computeBoundingBox(){this.boundingBox.makeEmpty(),this.centerPoint.set(0,0);for(let t=0,e=this.children.length;t<e;t++)this.children[t].updateMatrixWorld(),ro.copy(this.children[t].computeBoundingBox()),ro.applyMatrix3(Cr.copy(this.children[t].matrixWorld)),this.boundingBox.union(ro);return this.boundingBox.applyMatrix3(Cr.copy(this.matrixWorld).invert()),this.boundingBox}updateBoundingBox(){this.boundingBox.isEmpty()||this.boundingBoxWorld.copy(this.boundingBox).applyMatrix3(this.matrixWorld)}setAttrs(t){if(!t)return this;for(const e in t)if(!(e==="children"||t[e]===void 0)){if(e==="userData"&&t[e]){Object.keys(t[e]).forEach(i=>this.userData[i]=t[e][i]);continue}this.userData[e]=t[e]}return this}add(t){return!t||!t.isObject2||t===this?this:(t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.isInComposeNode=this.composeNode||this.isInComposeNode,t.selectable&&t.parent.setSelectable(t.selectable),this._autoSort&&this.children.sort((e,i)=>e.renderOrder-i.renderOrder),t.dispatchEvent(Ng),this)}adds(t){if(!t||!t.length)return this;this._autoSort=!1;for(let e=0,i=t.length;e<i;e++)e===t.length-1&&(this._autoSort=!0),this.add(t[e]);return this}remove(t){const e=this.children.indexOf(t);return e!==-1&&(t.parent=void 0,this.children.splice(e,1),t.dispatchEvent(io)),this}removes(t){for(let e=0,i=t.length;e<i;e++)this.remove(t[e]);return this}removeFromParent(){const t=this.parent;return t&&t.remove(this),this}moveToLast(){var e;if(!this.parent)return;let t=this.clone();this.removeFromParent(),(e=t.parent)==null||e.add(t)}clear(){for(let t=0;t<this.children.length;t++){const e=this.children[t];e.parent=void 0,e.destroy(),e.dispatchEvent(io)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),Cr.copy(this.matrixWorld).invert(),t.parent&&(t.parent.updateWorldMatrix(!0,!1),Cr.multiply(t.parent.matrixWorld)),t.applyMatrix3(Cr),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let i=0,a=this.children.length;i<a;i++){const l=this.children[i].getObjectByProperty(t,e);if(l!==void 0)return l}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(t,ti,no),t}getWorldRotation(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Is,t,no),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Is,ti,t),t}getWorldDirection(t){return this.updateWorldMatrix(!0,!1),t.set(this.matrixWorld.elements[6],this.matrixWorld.elements[7]).normalize()}traverse(t){t(this);const e=this.children;for(let i=0,a=e.length;i<a;i++)e[i].traverse(t)}traverseVisible(t){if(this.visible)return;t(this);const e=this.children;for(let i=0,a=e.length;i<a;i++)e[i].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e&&(t(e),e.traverseAncestors(t))}onBeforeRender(t,e,i){}render(t){}onAfterRender(t,e,i){}setSelectable(t){this.selectable=t,this.parent&&this.parent.setSelectable(t)}raycast(t,e=[]){}clone(t=!0){const e=this.constructor;return new e(this.userData).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.type=t.type,this.featureKey=t.featureKey,this._version=0,this.parent=t.parent,this.up.copy(t.up),this.position.copy(t.position),this.rotation.copy(t.rotation),this.scaled.copy(t.scaled),this.flipY=t.flipY,this.selectable=t.selectable,this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.modelViewMatrix.copy(t.modelViewMatrix),this.normalMatrix.copy(t.normalMatrix),this.fixed=t.fixed,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.composeNode=t.composeNode,this.alignCenter=t.alignCenter,this.boundingBox.copy(t.boundingBox),this.boundingBoxWorld.copy(t.boundingBoxWorld),this.boundingBoxNeedsUpdate=t.boundingBoxNeedsUpdate,this.centerPoint.copy(t.centerPoint),this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e)for(let i=0;i<t.children.length;i++){const a=t.children[i];this.add(a.clone())}return this}}const Mg=new G,tc=new It;class Bg extends Jh{name="Scene";type="Scene";isScene=!0;view;background;featureKey="Scene_"+this.id;matrixAutoUpdate=!1;constructor(){super()}destroy(){super.destroy(),this.boundingBox.makeEmpty()}setup(t){this.view=t}fullscreen(t=1e3,e=!1){this.view&&(this.computeBoundingBox(),tc.copy(this.boundingBox).expandByVector(Mg.set(t,t)),console.log("Scene.fullscreen: ",this.name,this.boundingBox.min.round().toString(),this.boundingBox.max.round().toString()),this.view.resetCameraByBoundingBox(tc,e))}onBeforeRender(t,e,i){super.onBeforeRender(t,e,i),i&&this.cameraVersion!==i.version&&(this.matrixAutoUpdate||this.updateMatrix(),this.needsUpdate=!0,this.cameraVersion=i.version)}render(t){var e;this.visible&&((e=this.children)==null||e.forEach(function(i){i.isShape&&i.render(t)}))}getIntersectObjects(t,e=Ze.RM,i=[]){throw new Error("must be implemented in derived")}}class Ig{isLoading=!1;itemsLoaded=0;itemsTotal=0;urlModifier;handlers=[];onStart;onLoad;onProgress;onError;constructor(t,e,i){this.onLoad=t,this.onProgress=e,this.onError=i}itemStart(t){this.itemsTotal++,this.isLoading||this.onStart!==void 0&&this.onStart(t,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(t){this.itemsLoaded++,this.onProgress!==void 0&&this.onProgress(t,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,this.onLoad!==void 0&&this.onLoad())}itemError(t){this.onError!==void 0&&this.onError(t)}resolveURL(t){return this.urlModifier!==void 0?this.urlModifier(t):t}setURLModifier(t){return this.urlModifier=t,this}addHandler(t,e){return this.handlers.push(t,e),this}removeHandler(t){const e=this.handlers.indexOf(t);return e!==-1&&this.handlers.splice(e,2),this}getHandler(t){for(let e=0,i=this.handlers.length;e<i;e+=2){const a=this.handlers[e],o=this.handlers[e+1];if(a.global&&(a.lastIndex=0),a.test(t))return o}return null}}const ec={enabled:!1,files:{},add:function(n,t){this.enabled&&(this.files[n]=t)},get:function(n){if(this.enabled)return this.files[n]},remove:function(n){delete this.files[n]},clear:function(){this.files={}}},Lg=new Ig;class rc{manager;crossOrigin="anonymous";withCredentials=!1;path="";resourcePath="";requestHeader={};constructor(t=Lg){this.manager=t}loadAsync(t,e){const i=this;return new Promise(function(a,o){i.load(t,a,e,o)})}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}const an={};class Rg extends Error{response;constructor(t,e){super(t),this.response=e}}class Pg extends rc{mimeType;responseType;constructor(t){super(t)}load(t,e,i,a){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const o=ec.get(t);if(o!==void 0)return this.manager.itemStart(t),setTimeout(()=>{e&&e(o),this.manager.itemEnd(t)},0),o;if(an[t]!==void 0){an[t].push({onLoad:e,onProgress:i,onError:a});return}an[t]=[],an[t].push({onLoad:e,onProgress:i,onError:a});const l=new Xe.window.Request(t,{headers:new Xe.window.Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),c=this.mimeType,f=this.responseType;fetch(l).then(v=>{if(v.status===200||v.status===0){if(v.status===0&&console.warn("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||v.body===void 0||v.body.getReader===void 0)return v;const x=an[t],D=v.body.getReader(),C=v.headers.get("Content-Length")||v.headers.get("X-File-Size"),S=C?parseInt(C):0,H=S!==0;let I=0;const B=new ReadableStream({start(F){W();function W(){D.read().then(({done:Y,value:A})=>{if(Y)F.close();else{I+=A.byteLength;const $=new ProgressEvent("progress",{lengthComputable:H,loaded:I,total:S});for(let q=0,tt=x.length;q<tt;q++){const ot=x[q];ot.onProgress&&ot.onProgress($)}F.enqueue(A),W()}})}}});return new Response(B)}else throw new Rg(`fetch for "${v.url}" responded with ${v.status}: ${v.statusText}`,v)}).then(v=>{switch(f){case"arraybuffer":return v.arrayBuffer();case"blob":return v.blob();case"document":return v.text().then(x=>new DOMParser().parseFromString(x,c));case"json":return v.json();default:if(c===void 0)return v.text();{const D=/charset="?([^;"\s]*)"?/i.exec(c),C=D&&D[1]?D[1].toLowerCase():void 0,S=new TextDecoder(C);return v.arrayBuffer().then(H=>S.decode(H))}}}).then(v=>{ec.add(t,v);const x=an[t];delete an[t];for(let D=0,C=x.length;D<C;D++){const S=x[D];S.onLoad&&S.onLoad(v)}}).catch(v=>{const x=an[t];if(x===void 0)throw this.manager.itemError(t),v;delete an[t];for(let D=0,C=x.length;D<C;D++){const S=x[D];S.onError&&S.onError(v)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setMimeType(t){return this.mimeType=t,this}setResponseType(t){return this.responseType=t,this}}class nc extends rc{constructor(t){super(t)}load(t,e,i,a){const o=this,l=new Pg(o.manager);l.setPath(o.path),l.setRequestHeader(o.requestHeader),l.setWithCredentials(o.withCredentials),l.load(t,function(c){try{e&&e(c)}catch(f){a?a(f):console.error(f),o.manager.itemError(t)}},i,a)}}const Ui="ae",ic="-",Ba="rm-assets",sc="rm-labels";function Ls(n){return n+ic+Ms.ASSETS}function Ia(n){return n+ic+Ms.LABELS}const Fg={rm:["su-assets","su-labels","eq-assets","eq-labels","fn-assets","fn-labels"],su:[Ba,sc,"eq-assets","eq-labels","fn-assets","fn-labels"],eq:[Ba,sc,"su-assets","su-labels","fn-assets","fn-labels"]},Kt=" ";function kg(n){let t="";Array.isArray(n)||(n=[n]);for(let e=0;e<n.length;e++){const i=n[e];if(i.type===P.CLOSE_PATH)t+="z";else if(i.type===P.HORIZ_LINE_TO)t+=(i.relative?"h":"H")+i.x;else if(i.type===P.VERT_LINE_TO)t+=(i.relative?"v":"V")+i.y;else if(i.type===P.MOVE_TO)t+=(i.relative?"m":"M")+i.x+Kt+i.y;else if(i.type===P.LINE_TO)t+=(i.relative?"l":"L")+i.x+Kt+i.y;else if(i.type===P.CURVE_TO)t+=(i.relative?"c":"C")+i.x1+Kt+i.y1+Kt+i.x2+Kt+i.y2+Kt+i.x+Kt+i.y;else if(i.type===P.SMOOTH_CURVE_TO)t+=(i.relative?"s":"S")+i.x2+Kt+i.y2+Kt+i.x+Kt+i.y;else if(i.type===P.QUAD_TO)t+=(i.relative?"q":"Q")+i.x1+Kt+i.y1+Kt+i.x+Kt+i.y;else if(i.type===P.SMOOTH_QUAD_TO)t+=(i.relative?"t":"T")+i.x+Kt+i.y;else if(i.type===P.ARC)t+=(i.relative?"a":"A")+i.rX+Kt+i.rY+Kt+i.xRot+Kt+ +i.lArcFlag+Kt+ +i.sweepFlag+Kt+i.x+Kt+i.y;else throw new Error(`Unexpected command type "${i==null?void 0:i.type}" at index ${e}.`)}return t}function so([n,t],e){return[n*Math.cos(e)-t*Math.sin(e),n*Math.sin(e)+t*Math.cos(e)]}function Sr(...n){for(let t=0;t<n.length;t++)if(typeof n[t]!="number")throw new Error(`assertNumbers arguments[${t}] is not a number. ${typeof n[t]} == typeof ${n[t]}`);return!0}const Sn=Math.PI;function ao(n,t,e){n.lArcFlag=n.lArcFlag===0?0:1,n.sweepFlag=n.sweepFlag===0?0:1;let{rX:i,rY:a}=n;const{x:o,y:l}=n;i=Math.abs(n.rX),a=Math.abs(n.rY);const[c,f]=so([(t-o)/2,(e-l)/2],-n.xRot/180*Sn),v=Math.pow(c,2)/Math.pow(i,2)+Math.pow(f,2)/Math.pow(a,2);1<v&&(i*=Math.sqrt(v),a*=Math.sqrt(v)),n.rX=i,n.rY=a;const x=Math.pow(i,2)*Math.pow(f,2)+Math.pow(a,2)*Math.pow(c,2),D=(n.lArcFlag!==n.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(i,2)*Math.pow(a,2)-x)/x)),C=i*f/a*D,S=-a*c/i*D,H=so([C,S],n.xRot/180*Sn);n.cX=H[0]+(t+o)/2,n.cY=H[1]+(e+l)/2,n.phi1=Math.atan2((f-S)/a,(c-C)/i),n.phi2=Math.atan2((-f-S)/a,(-c-C)/i),n.sweepFlag===0&&n.phi2>n.phi1&&(n.phi2-=2*Sn),n.sweepFlag===1&&n.phi2<n.phi1&&(n.phi2+=2*Sn),n.phi1*=180/Sn,n.phi2*=180/Sn}function ac(n,t,e){Sr(n,t,e);const i=n*n+t*t-e*e;if(0>i)return[];if(i===0)return[[n*e/(n*n+t*t),t*e/(n*n+t*t)]];const a=Math.sqrt(i);return[[(n*e+t*a)/(n*n+t*t),(t*e-n*a)/(n*n+t*t)],[(n*e-t*a)/(n*n+t*t),(t*e+n*a)/(n*n+t*t)]]}const un=Math.PI/180;function uc(n,t,e){return(1-e)*n+e*t}function oc(n,t,e,i){return n+Math.cos(i/180*Sn)*t+Math.sin(i/180*Sn)*e}function lc(n,t,e,i){const o=t-n,l=e-t,c=i-e,f=3*o+3*c-6*l,v=(l-o)*6,x=3*o;return Math.abs(f)<1e-6?[-x/v]:Ug(v/f,x/f,1e-6)}function hc(n,t,e,i,a){const o=1-a,l=o*o*o,c=3*o*o*a,f=3*o*a*a,v=a*a*a;return n*l+t*c+e*f+i*v}function Ug(n,t,e=1e-6){const i=n*n/4-t;if(i<-e)return[];if(i<=e)return[-n/2];const a=Math.sqrt(i);return[-(n/2)-a,-(n/2)+a]}function Hg(n,t,e){n.cX||ao(n,t,e);const i=Math.min(n.phi1,n.phi2),a=Math.max(n.phi1,n.phi2),o=a-i,l=Math.ceil(o/90),c=new Array(l);let f=t,v=e;for(let x=0;x<l;x++){const D=uc(n.phi1,n.phi2,x/l),C=uc(n.phi1,n.phi2,(x+1)/l),S=C-D,H=4/3*Math.tan(S*un/4),[I,B]=[Math.cos(D*un)-H*Math.sin(D*un),Math.sin(D*un)+H*Math.cos(D*un)],[F,W]=[Math.cos(C*un),Math.sin(C*un)],[Y,A]=[F+H*Math.sin(C*un),W-H*Math.cos(C*un)],$={relative:n.relative,type:P.CURVE_TO},q=(tt,ot)=>{const[K,nt]=so([tt*n.rX,ot*n.rY],n.xRot);return[n.cX+K,n.cY+nt]};[$.x1,$.y1]=q(I,B),[$.x2,$.y2]=q(Y,A),[$.x,$.y]=q(F,W),n.relative&&($.x1-=f,$.y1-=v,$.x2-=f,$.y2-=v,$.x-=f,$.y-=v),[f,v]=[$.x,$.y],c[x]=$}return c}function qg(n=1e13){Sr(n);function t(e){return Math.round(e*n)/n}return function(i){return"x1"in i&&typeof i.x1<"u"&&(i.x1=t(i.x1)),"y1"in i&&typeof i.y1<"u"&&(i.y1=t(i.y1)),"x2"in i&&typeof i.x2<"u"&&(i.x2=t(i.x2)),"y2"in i&&typeof i.y2<"u"&&(i.y2=t(i.y2)),"x"in i&&typeof i.x<"u"&&(i.x=t(i.x)),"y"in i&&typeof i.y<"u"&&(i.y=t(i.y)),"rX"in i&&typeof i.rX<"u"&&(i.rX=t(i.rX)),"rY"in i&&typeof i.rY<"u"&&(i.rY=t(i.rY)),i}}function cc(){return Or((n,t,e)=>(n.relative&&(typeof n.x1<"u"&&(n.x1+=t),typeof n.y1<"u"&&(n.y1+=e),typeof n.x2<"u"&&(n.x2+=t),typeof n.y2<"u"&&(n.y2+=e),typeof n.x<"u"&&(n.x+=t),typeof n.y<"u"&&(n.y+=e),n.relative=!1),n))}function Wg(){return Or((n,t,e)=>(n.relative||(typeof n.x1<"u"&&(n.x1-=t),typeof n.y1<"u"&&(n.y1-=e),typeof n.x2<"u"&&(n.x2-=t),typeof n.y2<"u"&&(n.y2-=e),typeof n.x<"u"&&(n.x-=t),typeof n.y<"u"&&(n.y-=e),n.relative=!0),n))}function Vg(n=!0,t=!0,e=!0){return Or((i,a,o,l,c)=>{if(isNaN(l)&&!(i.type&P.MOVE_TO))throw new Error("path must start with moveto");return t&&i.type&P.HORIZ_LINE_TO&&(i.type=P.LINE_TO,i.y=i.relative?0:o),e&&i.type&P.VERT_LINE_TO&&(i.type=P.LINE_TO,i.x=i.relative?0:a),n&&i.type&P.CLOSE_PATH&&(i.type=P.LINE_TO,i.x=i.relative?l-a:l,i.y=i.relative?c-o:c),i.type&P.ARC&&(i.rX===0||i.rY===0)&&(i.type=P.LINE_TO,delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag),i})}function fc(){let n=NaN,t=NaN,e=NaN,i=NaN;return Or((a,o,l)=>(a.type&P.SMOOTH_CURVE_TO&&(a.type=P.CURVE_TO,n=isNaN(n)?o:n,t=isNaN(t)?l:t,a.x1=a.relative?o-n:2*o-n,a.y1=a.relative?l-t:2*l-t),a.type&P.CURVE_TO?(n=a.relative?o+a.x2:a.x2,t=a.relative?l+a.y2:a.y2):(n=NaN,t=NaN),a.type&P.SMOOTH_QUAD_TO&&(a.type=P.QUAD_TO,e=isNaN(e)?o:e,i=isNaN(i)?l:i,a.x1=a.relative?o-e:2*o-e,a.y1=a.relative?l-i:2*l-i),a.type&P.QUAD_TO?(e=a.relative?o+a.x1:a.x1,i=a.relative?l+a.y1:a.y1):(e=NaN,i=NaN),a))}function pc(){let n=NaN,t=NaN;return Or((e,i,a)=>{if(e.type&P.SMOOTH_QUAD_TO&&(e.type=P.QUAD_TO,n=isNaN(n)?i:n,t=isNaN(t)?a:t,e.x1=e.relative?i-n:2*i-n,e.y1=e.relative?a-t:2*a-t),e.type&P.QUAD_TO){n=e.relative?i+e.x1:e.x1,t=e.relative?a+e.y1:e.y1;const o=e.x1,l=e.y1;e.type=P.CURVE_TO,e.x1=((e.relative?0:i)+o*2)/3,e.y1=((e.relative?0:a)+l*2)/3,e.x2=(e.x+o*2)/3,e.y2=(e.y+l*2)/3}else n=NaN,t=NaN;return e})}function Or(n){let t=0,e=0,i=NaN,a=NaN;return function(l){if(isNaN(i)&&!(l.type&P.MOVE_TO))throw new Error("path must start with moveto");const c=n(l,t,e,i,a);return l.type&P.CLOSE_PATH&&(t=i,e=a),"x"in l&&typeof l.x<"u"&&(t=l.relative?t+l.x:l.x),"y"in l&&typeof l.y<"u"&&(e=l.relative?e+l.y:l.y),l.type&P.MOVE_TO&&(i=t,a=e),c}}function zg(n=0){Sr(n);let t=NaN,e=NaN,i=NaN,a=NaN;return Or((o,l,c,f,v)=>{const x=Math.abs;let D=!1,C=0,S=0;if(o.type&P.SMOOTH_CURVE_TO&&(C=isNaN(t)?0:l-t,S=isNaN(e)?0:c-e),o.type&(P.CURVE_TO|P.SMOOTH_CURVE_TO)?(t=o.relative?l+o.x2:o.x2,e=o.relative?c+o.y2:o.y2):(t=NaN,e=NaN),o.type&P.SMOOTH_QUAD_TO?(i=isNaN(i)?l:2*l-i,a=isNaN(a)?c:2*c-a):o.type&P.QUAD_TO?(i=o.relative?l+o.x1:o.x1,a=o.relative?c+o.y1:o.y2):(i=NaN,a=NaN),o.type&P.LINE_COMMANDS||o.type&P.ARC&&(o.rX===0||o.rY===0||!o.lArcFlag)||o.type&P.CURVE_TO||o.type&P.SMOOTH_CURVE_TO||o.type&P.QUAD_TO||o.type&P.SMOOTH_QUAD_TO){const H=typeof o.x>"u"?0:o.relative?o.x:o.x-l,I=typeof o.y>"u"?0:o.relative?o.y:o.y-c;C=isNaN(i)?typeof o.x1>"u"?C:o.relative?o.x:o.x1-l:i-l,S=isNaN(a)?typeof o.y1>"u"?S:o.relative?o.y:o.y1-c:a-c;const B=typeof o.x2>"u"?0:o.relative?o.x:o.x2-l,F=typeof o.y2>"u"?0:o.relative?o.y:o.y2-c;x(H)<=n&&x(I)<=n&&x(C)<=n&&x(S)<=n&&x(B)<=n&&x(F)<=n&&(D=!0)}return o.type&P.CLOSE_PATH&&x(l-f)<=n&&x(c-v)<=n&&(D=!0),D?[]:o})}function On(n,t,e,i,a,o){return Sr(n,t,e,i,a,o),Or((l,c,f,v)=>{const x=l.x1,D=l.x2,C=l.relative&&!isNaN(v),S=typeof l.x<"u"?l.x:C?0:c,H=typeof l.y<"u"?l.y:C?0:f;l.type&P.HORIZ_LINE_TO&&t!==0&&(l.type=P.LINE_TO,l.y=l.relative?0:f),l.type&P.VERT_LINE_TO&&e!==0&&(l.type=P.LINE_TO,l.x=l.relative?0:c),typeof l.x<"u"&&(l.x=l.x*n+H*e+(C?0:a)),typeof l.y<"u"&&(l.y=S*t+l.y*i+(C?0:o)),typeof l.x1<"u"&&(l.x1=l.x1*n+l.y1*e+(C?0:a)),typeof l.y1<"u"&&(l.y1=x*t+l.y1*i+(C?0:o)),typeof l.x2<"u"&&(l.x2=l.x2*n+l.y2*e+(C?0:a)),typeof l.y2<"u"&&(l.y2=D*t+l.y2*i+(C?0:o));function I(F){return F*F}const B=n*i-t*e;if(typeof l.xRot<"u"&&(n!==1||t!==0||e!==0||i!==1))if(B===0)delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag,l.type=P.LINE_TO;else{const F=l.xRot*Math.PI/180,W=Math.sin(F),Y=Math.cos(F),A=1/I(l.rX),$=1/I(l.rY),q=I(Y)*A+I(W)*$,tt=2*W*Y*(A-$),ot=I(W)*A+I(Y)*$,K=q*i*i-tt*t*i+ot*t*t,nt=tt*(n*i+t*e)-2*(q*e*i+ot*n*t),J=q*e*e-tt*n*e+ot*n*n,it=(Math.atan2(nt,K-J)+Math.PI)%Math.PI/2,ht=Math.sin(it),dt=Math.cos(it);l.rX=Math.abs(B)/Math.sqrt(K*I(dt)+nt*ht*dt+J*I(ht)),l.rY=Math.abs(B)/Math.sqrt(K*I(ht)-nt*ht*dt+J*I(dt)),l.xRot=it*180/Math.PI}return typeof l.sweepFlag<"u"&&0>B&&(l.sweepFlag=+!l.sweepFlag),l})}function $g(n,t=0,e=0){Sr(n,t,e);const i=Math.sin(n),a=Math.cos(n);return On(a,i,-i,a,t-t*a+e*i,e-t*i-e*a)}function Gg(n,t=0){return Sr(n,t),On(1,0,0,1,n,t)}function Yg(n,t=n){return Sr(n,t),On(n,0,0,t,0,0)}function Xg(n){return Sr(n),On(1,0,Math.atan(n),1,0,0)}function Zg(n){return Sr(n),On(1,Math.atan(n),0,1,0,0)}function jg(n=0){return Sr(n),On(-1,0,0,1,n,0)}function Qg(n=0){return Sr(n),On(1,0,0,-1,0,n)}function Kg(){return Or((n,t,e)=>P.ARC===n.type?Hg(n,n.relative?0:t,n.relative?0:e):n)}function Jg(){return Or((n,t,e)=>(n.relative&&(t=0,e=0),P.ARC===n.type&&ao(n,t,e),n))}function dc(){return n=>({...n})}function t0(){const n=dc(),t=cc(),e=pc(),i=fc(),a=Or((o,l,c)=>{const f=i(e(t(n(o))));function v(D){D>a.maxX&&(a.maxX=D),D<a.minX&&(a.minX=D)}function x(D){D>a.maxY&&(a.maxY=D),D<a.minY&&(a.minY=D)}if(f.type&P.DRAWING_COMMANDS&&(v(l),x(c)),f.type&P.HORIZ_LINE_TO&&v(f.x),f.type&P.VERT_LINE_TO&&x(f.y),f.type&P.LINE_TO&&(v(f.x),x(f.y)),f.type&P.CURVE_TO){v(f.x),x(f.y);const D=lc(l,f.x1,f.x2,f.x);for(const S of D)0<S&&1>S&&v(hc(l,f.x1,f.x2,f.x,S));const C=lc(c,f.y1,f.y2,f.y);for(const S of C)0<S&&1>S&&x(hc(c,f.y1,f.y2,f.y,S))}if(f.type&P.ARC){v(f.x),x(f.y),ao(f,l,c);const D=f.xRot/180*Math.PI,C=Math.cos(D)*f.rX,S=Math.sin(D)*f.rX,H=-Math.sin(D)*f.rY,I=Math.cos(D)*f.rY,[B,F]=f.phi1<f.phi2?[f.phi1,f.phi2]:-180>f.phi2?[f.phi2+360,f.phi1+360]:[f.phi2,f.phi1],W=([$,q])=>{const ot=Math.atan2(q,$)*180/Math.PI;return ot<B?ot+360:ot},Y=ac(H,-C,0).map(W);for(const $ of Y)$>B&&$<F&&v(oc(f.cX,C,H,$));const A=ac(I,-S,0).map(W);for(const $ of A)$>B&&$<F&&x(oc(f.cY,S,I,$))}return o});return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}const le={ROUND:qg,TO_ABS:cc,TO_REL:Wg,NORMALIZE_HVZ:Vg,NORMALIZE_ST:fc,QT_TO_C:pc,INFO:Or,SANITIZE:zg,MATRIX:On,ROTATE:$g,TRANSLATE:Gg,SCALE:Yg,SKEW_X:Xg,SKEW_Y:Zg,X_AXIS_SYMMETRY:jg,Y_AXIS_SYMMETRY:Qg,A_TO_C:Kg,ANNOTATE_ARCS:Jg,CLONE:dc,CALCULATE_BOUNDS:t0};class gc{round(t){return this.transform(le.ROUND(t))}toAbs(){return this.transform(le.TO_ABS())}toRel(){return this.transform(le.TO_REL())}normalizeHVZ(t,e,i){return this.transform(le.NORMALIZE_HVZ(t,e,i))}normalizeST(){return this.transform(le.NORMALIZE_ST())}qtToC(){return this.transform(le.QT_TO_C())}aToC(){return this.transform(le.A_TO_C())}sanitize(t){return this.transform(le.SANITIZE(t))}translate(t,e){return this.transform(le.TRANSLATE(t,e))}scale(t,e){return this.transform(le.SCALE(t,e))}rotate(t,e,i){return this.transform(le.ROTATE(t,e,i))}matrix(t,e,i,a,o,l){return this.transform(le.MATRIX(t,e,i,a,o,l))}skewX(t){return this.transform(le.SKEW_X(t))}skewY(t){return this.transform(le.SKEW_Y(t))}xSymmetry(t){return this.transform(le.X_AXIS_SYMMETRY(t))}ySymmetry(t){return this.transform(le.Y_AXIS_SYMMETRY(t))}annotateArcs(){return this.transform(le.ANNOTATE_ARCS())}}const e0=n=>n===" "||n===" "||n==="\r"||n===`
33
- `,mc=n=>48<=n.charCodeAt(0)&&n.charCodeAt(0)<=57;class r0 extends gc{curNumber="";curCommandType=-1;curCommandRelative=!1;canParseCommandOrComma=!0;curNumberHasExp=!1;curNumberHasExpDigits=!1;curNumberHasDecimal=!1;curArgs=[];constructor(){super()}finish(t=[]){if(this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t}parse(t,e=[]){const i=a=>{e.push(a),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let a=0;a<t.length;a++){const o=t[a],l=this.curCommandType===P.ARC&&(this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber.length===1&&(this.curNumber==="0"||this.curNumber==="1"),c=mc(o)&&(this.curNumber==="0"&&o==="0"||l);if(mc(o)&&!c){this.curNumber+=o,this.curNumberHasExpDigits=this.curNumberHasExp;continue}if(o==="e"||o==="E"){this.curNumber+=o,this.curNumberHasExp=!0;continue}if((o==="-"||o==="+")&&this.curNumberHasExp&&!this.curNumberHasExpDigits){this.curNumber+=o;continue}if(o==="."&&!this.curNumberHasExp&&!this.curNumberHasDecimal&&!l){this.curNumber+=o,this.curNumberHasDecimal=!0;continue}if(this.curNumber&&this.curCommandType!==-1){const f=Number(this.curNumber);if(isNaN(f))throw new SyntaxError(`Invalid number ending at ${a}`);if(this.curCommandType===P.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>f)throw new SyntaxError(`Expected positive number, got "${f}" at index "${a}"`)}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${a}"`)}this.curArgs.push(f),this.curArgs.length===n0[this.curCommandType]&&(P.HORIZ_LINE_TO===this.curCommandType?i({type:P.HORIZ_LINE_TO,relative:this.curCommandRelative,x:f}):P.VERT_LINE_TO===this.curCommandType?i({type:P.VERT_LINE_TO,relative:this.curCommandRelative,y:f}):this.curCommandType===P.MOVE_TO||this.curCommandType===P.LINE_TO||this.curCommandType===P.SMOOTH_QUAD_TO?(i({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),P.MOVE_TO===this.curCommandType&&(this.curCommandType=P.LINE_TO)):this.curCommandType===P.CURVE_TO?i({type:P.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===P.SMOOTH_CURVE_TO?i({type:P.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===P.QUAD_TO?i({type:P.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===P.ARC&&i({type:P.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!e0(o)){if(o===","&&this.canParseCommandOrComma){this.canParseCommandOrComma=!1;continue}if(o==="+"||o==="-"||o==="."){this.curNumber=o,this.curNumberHasDecimal=o===".";continue}if(c){this.curNumber=o,this.curNumberHasDecimal=!1;continue}if(this.curArgs.length!==0)throw new SyntaxError(`Unterminated command at index ${a}.`);if(!this.canParseCommandOrComma)throw new SyntaxError(`Unexpected character "${o}" at index ${a}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,o==="z"||o==="Z"){e.push({type:P.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;continue}else if(o==="h"||o==="H")this.curCommandType=P.HORIZ_LINE_TO,this.curCommandRelative=o==="h";else if(o==="v"||o==="V")this.curCommandType=P.VERT_LINE_TO,this.curCommandRelative=o==="v";else if(o==="m"||o==="M")this.curCommandType=P.MOVE_TO,this.curCommandRelative=o==="m";else if(o==="l"||o==="L")this.curCommandType=P.LINE_TO,this.curCommandRelative=o==="l";else if(o==="c"||o==="C")this.curCommandType=P.CURVE_TO,this.curCommandRelative=o==="c";else if(o==="s"||o==="S")this.curCommandType=P.SMOOTH_CURVE_TO,this.curCommandRelative=o==="s";else if(o==="q"||o==="Q")this.curCommandType=P.QUAD_TO,this.curCommandRelative=o==="q";else if(o==="t"||o==="T")this.curCommandType=P.SMOOTH_QUAD_TO,this.curCommandRelative=o==="t";else if(o==="a"||o==="A")this.curCommandType=P.ARC,this.curCommandRelative=o==="a";else throw new SyntaxError(`Unexpected character "${o}" at index ${a}.`)}}return e}transform(t){return Object.create(this,{parse:{value(i,a=[]){const o=Object.getPrototypeOf(this).parse.call(this,i);for(const l of o){const c=t(l);Array.isArray(c)?a.push(...c):a.push(c)}return a}}})}}class P extends gc{commands;constructor(t){super(),typeof t=="string"?this.commands=P.parse(t):this.commands=t}encode(){return P.encode(this.commands)}getBounds(){const t=le.CALCULATE_BOUNDS();return this.transform(t),t}transform(t){const e=[];for(const i of this.commands){const a=t(i);Array.isArray(a)?e.push(...a):e.push(a)}return this.commands=e,this}static encode(t){return kg(t)}static parse(t){const e=new r0,i=[];return e.parse(t,i),e.finish(i),i}static CLOSE_PATH=1;static MOVE_TO=2;static HORIZ_LINE_TO=4;static VERT_LINE_TO=8;static LINE_TO=16;static CURVE_TO=32;static SMOOTH_CURVE_TO=64;static QUAD_TO=128;static SMOOTH_QUAD_TO=256;static ARC=512;static LINE_COMMANDS=P.LINE_TO|P.HORIZ_LINE_TO|P.VERT_LINE_TO;static DRAWING_COMMANDS=P.HORIZ_LINE_TO|P.VERT_LINE_TO|P.LINE_TO|P.CURVE_TO|P.SMOOTH_CURVE_TO|P.QUAD_TO|P.SMOOTH_QUAD_TO|P.ARC}const n0={[P.MOVE_TO]:2,[P.LINE_TO]:2,[P.HORIZ_LINE_TO]:1,[P.VERT_LINE_TO]:1,[P.CLOSE_PATH]:0,[P.QUAD_TO]:4,[P.SMOOTH_QUAD_TO]:2,[P.CURVE_TO]:6,[P.SMOOTH_CURVE_TO]:4,[P.ARC]:7};class uo extends P{name="Path2";version=0;viewMatrix=new ie;boundingBox=new It;constructor(t={}){super(t.commands),this.toAbs()}static getInstanceByPath(t){if(!t)return;const e=t.getAttribute("d");if(!e)return;const i=e.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"");return new uo({commands:i})}computeBoundingBox(){var t;this.boundingBox.makeEmpty(),Wr.identity();for(let e=0,i=((t=this.commands)==null?void 0:t.length)||0;e<i;e++){const a=this.commands[e];switch(a.type){case P.MOVE_TO:this.boundingBox.expandByXY(a.x,a.y),Wr.set(a.x,a.y);break;case P.LINE_TO:this.boundingBox.expandByXY(a.x,a.y),Wr.set(a.x,a.y);break;case P.HORIZ_LINE_TO:this.boundingBox.expandByXY(a.x,Wr.y),Wr.set(a.x,Wr.y);break;case P.VERT_LINE_TO:this.boundingBox.expandByXY(Wr.x,a.y),Wr.set(Wr.x,a.y);break;case P.QUAD_TO:this.boundingBox.expandByXY(a.x,a.y),Wr.set(a.x,a.y);break}}return this.boundingBox}render(t){var e;t.beginPath();for(let i=0,a=((e=this.commands)==null?void 0:e.length)||0;i<a;i++){const o=this.commands[i];switch(o.type){case P.MOVE_TO:t.moveTo(o.x,o.y);break;case P.LINE_TO:t.lineTo(o.x,o.y);break}}}applyMatrix(t){return this.version++,this.matrix(t.elements[0],t.elements[1],t.elements[3],t.elements[4],t.elements[6],t.elements[7]),this}copy(t){return this.commands=St.cloneDeep(t.commands),this.version=0,this}clone(){const t=this.constructor;return new t().copy(this)}static render(t,e){if(!(!t||!(e!=null&&e.length))){t.beginPath();for(let i=0,a=(e==null?void 0:e.length)||0;i<a;i++){const o=e[i];switch(o.type){case P.MOVE_TO:t.moveTo(o.x,o.y);break;case P.LINE_TO:t.lineTo(o.x,o.y);break}}}}}const Wr=new G;class i0{svg;offset=new G;svgRoot;layers=[];elementsMap={};boundingBoxMap={};boundingBox=new It;svgSkeletons=[];data;_exceptTypes=["view"];_exceptIds=["viewer","mirror"];_lvi=0;bindSvg(t){return this.svg=t,this.svgRoot=Yh(this.svg),this.layers=this.getLayers(2),this.getElementsMap(this.svg,this.elementsMap),this}getLayers(t){var e;if(!this.svg)throw new Error("please bind svg first");return t===2&&((e=this.layers)!=null&&e.length)?this.layers:(this.layers=this._getSvgLayer(this.svg,t),this.layers)}_getSvgLayer(t,e=0,i=0,a=[]){var c;let o,l=t.id;if(this._exceptTypes.includes(t.tagName)||t.tagName==="defs")return this._lvi--,a;if(e&&this._lvi>e)return a;l&&!this._exceptIds.includes(l)&&(o={id:l,label:l,children:[]},a.push(o)),this._lvi++;for(let f=0,v=t.children.length;f<v;f++)o?this._getSvgLayer(t.children[f],e,this._lvi,o.children):this._getSvgLayer(t.children[f],e,this._lvi,a);return((c=o==null?void 0:o.children)==null?void 0:c.length)===0&&delete o.children,this._lvi=i,a}getElementsMap(t,e={}){return this.traverseSvg(t,i=>{i!==t&&i.id&&(e[i.id]=i)}),e}computeBoundingBoxMap(){var e;if(Object.keys(this.boundingBoxMap).length)return this.boundingBoxMap;let t=(e=this.svg)==null?void 0:e.getBoundingClientRect();return t&&this.offset.set(t.left,t.top),this.traverseSvg(this.svg,i=>{if(!i.id)return;if(i.tagName==="use"){const l=this.getUseSymbolId(i);if(!l)return;const c=this.boundingBoxMap[l];if(c&&!c.isEmpty()){on.set(Number(i.getAttribute("x")||"0"),Number(i.getAttribute("y")||"0")),La.composeSvgTransform(on.x,on.y,i.getAttribute("transform"));const x=new It().copy(c).applyMatrix3(La);this.boundingBoxMap[i.id]=x;return}const f=this.getUseElementBoundingBoxWithSymbol(i);if(!f)return;this.boundingBoxMap[l]=f,on.set(Number(i.getAttribute("x")||"0"),Number(i.getAttribute("y")||"0")),La.composeSvgTransform(on.x,on.y,i.getAttribute("transform"));const v=new It().copy(f).applyMatrix3(La);this.boundingBoxMap[i.id]=v,this.boundingBox.expandByBox(v);return}if(typeof i.getBBox!="function")return;const a=i.getBBox();if((!a.width||!a.height)&&i.tagName==="path"){const l=uo.getInstanceByPath(i),c=l==null?void 0:l.computeBoundingBox();if(!c||c.isEmpty())return;c.getSize(on),a.x=c.min.x,a.y=c.max.y,a.width=on.x,a.height=on.y}if(!a.width||!a.height)return;const o=new It(new G(a.x,a.y),new G(a.x+a.width,a.y+a.height));this.boundingBoxMap[i.id]=o.round(),this.boundingBox.expandByBox(o)}),this.boundingBoxMap}updateLayersVisibility(t,e=!1){if(!this.elementsMap)throw new Error("please bind svg first");this._updateAllLayersVisibility(!e),t!=null&&t.length||(t=["background"]);for(let i=0,a=t.length;i<a;i++){const o=this.getElementById(t[i]);o&&this._updateLayersVisibility(o,e,!0,!0)}}_updateAllLayersVisibility(t=!1){Object.values(this.elementsMap).forEach(e=>{e.tagName==="svg"||e.tagName==="symbol"||!e.getAttribute("id")||(e.style.display=t?"block":"none")})}_updateLayersVisibility(t,e=!1,i=!1,a=!1){var o,l;if(!(!t||t.tagName==="svg"||!t.getAttribute("id"))){if(t.style.display=e?"block":"none",i&&e){let c=t.parentElement;for(;c&&c.tagName!=="svg";)c.style.display=e?"block":"none",c=c.parentElement}if(a&&((o=t.children)==null?void 0:o.length)>0)for(let c=0,f=(l=t.children)==null?void 0:l.length;c<f;c++)this._updateLayersVisibility(t.children[c],e,!1,!0)}}updateVisibilityByAssetType(t,e=!1,i){i||(i=Fg[t]),this.updateLayersVisibility(i,!e)}updateVisibilityByAssetTypes(t,e=!1,i){if(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length))for(let a=0,o=t.length;a<o;a++)this.updateVisibilityByAssetType(t[a],e,i)}getElementById(t){if(!this.elementsMap)throw new Error("please bind svg first");return this.elementsMap[t]}getElementBoundingBox(t){return this.boundingBoxMap[t]}findSkeletonByPath(t=[]){let e=0,i;const a=Object.keys(this.elementsMap);for(let o=0,l=a.length;o<l;o++){const c=this.elementsMap[a[o]];if(!c)continue;const f=c.getAttribute("d");f&&(f.length<e||(e=f.length,i=c.id?c:c.parent))}return i&&t.push(i),t}setTextInChildren2(t,e){var a;let i;((a=t==null?void 0:t.children)==null?void 0:a.length)<2?(i=Ju("text"),i.setAttribute("dy","1em"),t.appendChild(i)):i=t.children[t.children.length-1],i.innerHTML=e}traverseSvg(t,e){var i;if(!this._exceptTypes.includes(t.tagName)&&!(t.tagName!=="svg"&&t.tagName!=="defs"&&!t.id)&&!(t.tagName==="g"&&((i=t.children)==null?void 0:i.length)===0)){this._exceptIds.includes(t.id)||e(t);for(let a=0,o=t.children.length;a<o;a++)this.traverseSvg(t.children[a],e)}}traverseSvgTLayers(t,e){var i;if(Array.isArray(t)){for(let a=0,o=t.length;a<o;a++)this.traverseSvgTLayers(t[a],e);return}if(e(t),!!((i=t.children)!=null&&i.length))for(let a=0,o=t.children.length;a<o;a++)this.traverseSvgTLayers(t.children[a],e)}getLabelElementsByType(t,e={}){const i=this.getElementById(Ia(t));return i&&this.getElementsMap(i,e),e}getLabelElementById(t,e="rm"){if(!t)return;const i=this.getElementById(t);if(!i)return;let a=i.getAttribute("aid");return a||(a="l-"+e+"-"+t),this.getElementById(a)}setLabelsById(t,e,i="rm"){var l,c;const a=this.getLabelElementById(t,i);if(!a)return;const o=((l=a.children)==null?void 0:l.length)||0;for(let f=0,v=((e==null?void 0:e.length)||0)-(o-1);f<v;f++){const x=Ju("text");x.setAttribute("x","0"),x.setAttribute("y",o+f+"em"),a.appendChild(x)}for(let f=1,v=(c=a.children)==null?void 0:c.length;f<v;f++)a.children[f].textContent=e&&f<=e.length?e[f-1]:""}clearAssetLabelsByType(t="rm"){var a;const e=this.getLabelElementsByType(t),i=St.keys(e);for(let o=0,l=i.length;o<l;o++){const c=e[i[o]];for(let f=1,v=((a=c.children)==null?void 0:a.length)||0;f<v;f++)c.children[f].textContent=""}}getUseSymbolId(t){var e;if(!(!t||t.tagName!=="use"))return(e=t.getAttribute("xlink:href"))==null?void 0:e.substring(1)}getUseSymbol(t){if(!t||t.tagName!=="use")return;const e=this.getUseSymbolId(t);if(e)return this.getElementById(e)}setElementState2selected(t,e=!1){var a;if(!t)return;if(t.tagName==="use"){const o=this._getSymbolBox(t);if(!o)return;e?(a=t.parentNode)==null||a.insertBefore(o,t):t.parentNode&&t.parentNode.contains(o)&&t.parentNode.removeChild(o);return}let i=t.getAttribute("class");i||(i=""),e?i="danger":i=St.replace(i,"danger","").trim(),t.setAttribute("class",i)}_getSymbolBox(t){if(!t)return;const e=t.id+"-boundingBox";let i=this.getElementById(e);if(i)return i;const a=this.getUseSymbol(t);if(!a)return;let o=this.getElementBoundingBox(t.id);if(!o||o.isEmpty())return;i=document.createElementNS("http://www.w3.org/2000/svg","rect"),i.setAttribute("id",e),i.setAttribute("class","danger"),i.setAttribute("x",o.min.x.toString()),i.setAttribute("y",o.min.y.toString());const l=new G;return o.getSize(l),i.setAttribute("width",l.x.toString()),i.setAttribute("height",l.y.toString()),a.getAttribute("transform")&&i.setAttribute("transform",a.getAttribute("transform")||""),a.getAttribute("style")&&i.setAttribute("style",a.getAttribute("style")||""),this.elementsMap[e]=i,i}getUseElementBoundingBoxWithSymbol(t){var f;if(!t)return;const e=(f=t.getAttribute("xlink:href"))==null?void 0:f.substring(1);if(!e)return;let i=this.getElementById(e);if(!i)return;const a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top="-9999px",a.style.left="-9999px";let o;if(St.lowerCase(i.tagName)==="symbol"){o=document.createElementNS("http://www.w3.org/2000/svg","g");for(let v=0,x=i.childNodes.length;v<x;v++){const D=i.childNodes[v].cloneNode(!0);o.appendChild(D)}}else o=i.cloneNode(!0);a.appendChild(o),o.setAttribute("style","stroke: #333333;"),document.body.appendChild(a);const l=a.getBBox();if(document.body.removeChild(a),!l)return;const c=new It;return c.set(new G(l.x,l.y),new G(l.x+l.width,l.y+l.height)),c}fontZoom(t,e=1){const i=this.getElementById(t);if(!i)return;let a=i.getAttribute("font-size");a||(a="12");const o=/(\d+)([a-zA-Z%]+)/.exec(a),l=o&&(o==null?void 0:o.length)>2?o[2]:"";let c=Math.round(parseFloat(a)*e*100)/100;i.setAttribute("font-size",c+l)}getCentroid(t,e=new G){const i=t.getAttribute("insX"),a=t.getAttribute("insY");return i||a?e.set(Number(i||"0"),Number(a||"0")):this.getCentroidByDom(t,e)}getCentroidByDom(t,e=new G){const i=Number(t.getAttribute("x")||"0"),a=Number(t.getAttribute("y")||"0"),o=t.getBBox();let l=1,c=1,f=t.getAttribute("transform");if(!f)return e.set(i,a);const v=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(f);if(typeof v>"u"||v==null){const x=t.transform.baseVal;if(f&&x.numberOfItems>0){let D=x.getItem(0);D&&D.type===SVGTransform.SVG_TRANSFORM_SCALE&&(l=D.matrix.a!==0?D.matrix.a:1,c=D.matrix.d!==0?D.matrix.d:l)}else return e.set((o.x+o.width/2)*l,(o.y+o.height/2)*c)}else l=v[1]&&Number(v[1])>0?Number(v[1]):1,c=v[2]&&Number(v[2])>0?Number(v[2]):l;return i&&a?e.set(i*l,a*c):e.set((o.x+o.width/2)*l,(o.y+o.height/2)*c),e}_lastLinked=[];linkAssetsByTree(t,e){if(t||(t=Ze.RM),this.clearLinkedLines(t),!e||!e.value)return;const i=this.getLinesByTree(e);this.drawLinkedLines(t,i)}clearLinkedLines(t){var a;const e=Ls(t);if(this.getElementById(e)){for(let o=((a=this._lastLinked)==null?void 0:a.length)-1;o>=0;o--){const l=this._lastLinked[o];l.parentNode&&l.parentNode.removeChild(l),this._lastLinked.splice(o,1)}this._lastLinked.length=0}}drawLinkedLines(t,e){var o;if(!(e!=null&&e.length))return;const i=Ls(t),a=this.getElementById(i);if(a)for(let l=0,c=e.length;l<c;l++){const f=e[l][0],v=e[l][((o=e[l])==null?void 0:o.length)-1],x=Ju("line");x.setAttribute("x1",f.x.toString()),x.setAttribute("y1",f.y.toString()),x.setAttribute("x2",v.x.toString()),x.setAttribute("y2",v.y.toString()),x.setAttribute("class","danger"),x.setAttribute("style","stroke-width: 2;"),a.appendChild(x),this._lastLinked.push(x)}}getLinesByTree(t,e=[]){var o;if(!(t!=null&&t.value))return e;const i=this.getElementBoundingBox(t.value);if(!i)return e;const a=i.getCenter();return(o=t.children)==null||o.forEach(l=>{var v;const c=this.getElementBoundingBox(l==null?void 0:l.value);if(!c)return;const f=c.getCenter();e.push([a,f]),(v=l.children)!=null&&v.length&&this.getLinesByTree(l,e)}),e}}const on=new G,La=new ie;class s0{name="SvgPainter";params;chef;constructor(t={},e){this.params=t,this.chef=e}drawSocialDistanceCircles(t,e="http://www.w3.org/2000/svg"){var S,H,I;if(!t)return;const i=Eg(t),a=Gh(t),o=2*i,l=(H=(S=this.params.socialDistance)==null?void 0:S.colors)!=null&&H.length?(I=this.params.socialDistance)==null?void 0:I.colors:[ne.green,ne.red],c=this.getRadius(a),f=t.querySelector(`#${Ba}`),v=f==null?void 0:f.querySelectorAll("path");if(!f||!(v!=null&&v.length))return;let x,D;const C=new Array;for(let B=0,F=(v==null?void 0:v.length)||0;B<F;B++){if(x=v[B],D=x.getAttribute("id"),!D)continue;const W=this.chef.getElementBoundingBox(D);if(!W)continue;const Y=new G;W.getCenter(Y),C.push({id:D,cp:Y})}for(let B=0,F=C.length;B<F;B++){C[B].color=l[0];for(let W=0,Y=F;W<Y;W++)C[B]!==C[W]&&G.getDistance(C[B].cp,C[W].cp)<c*2&&(C[B].color=l[1])}for(let B=0,F=C.length;B<F;B++){let W=this.createCircle(C[B],c,o,e);f.appendChild(W)}}clearSocialDistanceCircles(t){if(!t)return;const e=t.querySelector(`#${Ba}`),i=e==null?void 0:e.querySelectorAll("circle");if(!(!e||!(i!=null&&i.length)))for(let a=0,o=(i==null?void 0:i.length)||0;a<o;a++){const l=i[a].getAttribute("id");l&&(l==null?void 0:l.indexOf("_circle"))>-1&&e.removeChild(i[a])}}getRadius(t){var i,a,o;let e=((a=(i=this.params)==null?void 0:i.socialDistance)==null?void 0:a.radius)||3;return((o=this.params)==null?void 0:o.displayUnits)==="imperial"?t==="Metres"||t==="m"?e/=3.28084:t==="cm"?e=e/3.28084*100:t==="mm"?e=e/3.28084*1e3:(t==="INCH"||t==="inches")&&(e*=12):t==="INCH"||t==="inches"?e=e*3.28084*12:t==="cm"?e*=100:t==="mm"&&(e*=1e3),e}createCircle(t,e,i,a){const o=document.createElementNS(a,"circle");return o.setAttributeNS(null,"id",t.id+"_circle"),o.setAttributeNS(null,"cx",t.cp.x),o.setAttributeNS(null,"cy",t.cp.y),o.setAttributeNS(null,"r",String(e)),o.setAttributeNS(null,"style",`pointer-events:none;fill-opacity:0.1;stroke:${t.color};stroke-width:${i}px;`),o}}const a0=function(n){return(n||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")};function Ra(n,t){if(!n||!t)return!1;if(t.indexOf(" ")!==-1)throw new Error("className should not contain space.");return n.classList?n.classList.contains(t):(" "+n.className+" ").indexOf(" "+t+" ")>-1}function Rs(n,t){if(!n)return;let e=n.className;const i=(t||"").split(" ");for(let a=0,o=i.length;a<o;a++){const l=i[a];l&&(n.classList?n.classList.add(l):Ra(n,l)||(e+=" "+l))}n.classList||(n.className=e)}function Ps(n,t){if(!n||!t)return;const e=t.split(" ");let i=" "+n.className+" ";for(let a=0,o=e.length;a<o;a++){const l=e[a];l&&(n.classList?n.classList.remove(l):Ra(n,l)&&(i=i.replace(" "+l+" "," ")))}n.classList||(n.className=a0(i))}class vc extends Bg{isSvgScene=!0;name="SvgScene";dynamically=!0;params;socialDistanceEnable=!1;container;svg;svgStr="";svgRoot;viewBox=new It;chef;defaultLayers=[];skeletonLayers=[];currentLayers=[];assetType;assetsMap={};legend=[];selectedList=[];painter;_lastHighlightType="";_lastHighlightIds=[];clickSvgElementHandler=this.handleClickSvgElement.bind(this);constructor(t={}){super(),this.params=t,this.assetType=t.assetType||Ze.RM,this.params.socialDistanceEnable&&(this.socialDistanceEnable=!0),this.container=this.params.containerId?document.getElementById(this.params.containerId):Xe.window.document.getElementsByTagName("body")[0],this.chef=new i0,this.painter=new s0(t,this.chef)}get isMounted(){var t;return((t=this.container.querySelectorAll("svg"))==null?void 0:t.length)>0}destroy(){var t;super.destroy(),this.unmount(),(t=this.camera)==null||t.destroy()}mount(){this.svg&&(this.container.contains(this.svg)||this.container.appendChild(this.svg),this.chef.computeBoundingBoxMap())}unmount(){this.svg&&this.svg.parentNode&&this.container.contains(this.svg)&&this.container.removeChild(this.svg)}computeBoundingBox(){return this.boundingBox.makeEmpty(),!this.chef||!this.svg?this.boundingBox:(this.chef.computeBoundingBoxMap(),this.boundingBox.copy(this.chef.boundingBox),console.warn("svgScene.computeBoundingBox: ",this.chef.boundingBox.toString()),this.boundingBox)}async load(t){return new nc().loadAsync(t)}bind(t){if(this.svgStr=t,this.svg=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,console.warn("bind: ",this.name),!this.svg)throw new Error("svg load failed");let e=this.svg.getAttribute("viewBox");e&&(bg(e,this.viewBox),this.chef.bindSvg(this.svg),this.svgRoot=Yh(this.svg),this.svg.setAttribute("viewBox",`0 0 ${this.params.width} ${this.params.height}`),this.svg.setAttribute("style","transform: translateZ(0);"),this.appendStyles(),console.log(this.name,"viewBox -> ",e,this.viewBox.toString()),this.setAssetsMap(this.assetType,this.assetsMap))}appendStyles(){var e;let t=(e=this.svg)==null?void 0:e.querySelector("style");t&&(t.appendChild(document.createTextNode(`.default { stroke: ${this.params.defaultStroke}; fill: ${this.params.defaultFill}; }`)),t.appendChild(document.createTextNode(`.info { stroke: ${this.params.infoStroke}; fill: ${this.params.infoFill}; }`)),t.appendChild(document.createTextNode(`.primary { stroke: ${this.params.primaryStroke}; fill: ${this.params.primaryFill}; }`)),t.appendChild(document.createTextNode(`.success { stroke: ${this.params.successStroke}; fill: ${this.params.successFill}; }`)),t.appendChild(document.createTextNode(`.warning { stroke: ${this.params.warningStroke}; fill: ${this.params.warningFill}; }`)),t.appendChild(document.createTextNode(`.danger { stroke: ${this.params.dangerStroke}; fill: ${this.params.dangerFill}; }`)),t.appendChild(document.createTextNode(`.active { stroke: ${this.params.activeStroke}; fill: ${this.params.activeFill}; }`)))}getLayers(t=2){return this.svg?this.chef.getLayers(t):[]}setDefaultLayers(t){t!=null&&t.length&&(this.defaultLayers=t)}setSkeletonLayers(t){t!=null&&t.length&&(this.skeletonLayers=t)}setCurrentLayers(t){t!=null&&t.length&&(this.currentLayers=t)}showDefaultLayers(t,e=!1){this.setDefaultLayers(t),this.chef.updateLayersVisibility(t,e)}updateLayersVisibility(t,e=!1){this.chef.updateLayersVisibility(t,e)}setAssetType(t,e){this.assetsMap={},this.assetType=t,this.setAssetsMap(this.assetType,this.assetsMap),e||(e=[Ls(t)],t!==Ze.RM&&e.unshift(Ls(Ze.RM))),this.setDefaultLayers(e),this.updateLayersVisibility(this.defaultLayers,!0)}isBelongsToAssetType(t,e){e||(e=this.assetType);const i=this.getAssetsByType(e);return i==null?void 0:i.hasOwnProperty(t)}setAssetsMap(t,e={}){const i=this.chef.getElementById(Ls(t));if(!i)return e;e[t]=this.chef.getElementsMap(i);const a=Ia(t),o=this.chef.getElementById(a);if(!o)return e;const l=this.chef.getElementsMap(o),c=St.keys(l);if(!(c!=null&&c.length))return e;if(St.startsWith(c[0],`l-${t}-`)){const f=`l-${t}-`.length;for(let v=0,x=c.length;v<x;v++){const D=c[v].slice(f);l[D]=l[c[v]],delete l[c[v]]}}return e[a]=l,e}getAssetsByType(t){return this.assetsMap.hasOwnProperty(t)||this.setAssetsMap(t,this.assetsMap),this.assetsMap[t]}getElementById(t){if(!t)return;const e=this.getAssetsByType(this.assetType);if(!(!e||!Object.hasOwnProperty.call(e,t)))return e[t]}getAssetIdsByType(t){const e=this.getAssetsByType(t),i=[];return e?St.keys(e):i}clearFillOrStroke(t="fill"){const e=this.getAssetsByType(this.assetType),i=St.keys(e);let a;for(let o=0,l=i.length;o<l;o++)a=e[i[o]],!(!a||!a.hasAttribute(t))&&(a.removeAttribute(t),t==="stroke"&&a.removeAttribute("stroke-width"));this.clearLegendBy(t)}clearFillOrStrokeByIds(t,e="fill"){const i=this.getAssetsByType(this.assetType),a=St.keys(i);let o;for(let l=0,c=a.length;l<c;l++)t!=null&&t.length&&!t.includes(a[l])||(o=i[a[l]],!(!o||!o.hasAttribute(e))&&(o.removeAttribute(e),e==="stroke"&&o.removeAttribute("stroke-width")));this.clearLegendBy(e)}setFillOrStrokeByIds(t,e,i="fill"){const a=this.getAssetsByType(this.assetType),o=St.keys(a);let l;for(let c=0,f=o.length;c<f;c++)t.includes(o[c])&&(l=a[o[c]],l&&(l.setAttribute(i,e),i==="stroke"&&l.setAttribute("stroke-width","7"),this.addLegend(i,e,o[c])))}addLegend(t,e,i){let a=this.legend.find(o=>o.color===e);a||(a={type:t,color:e,ids:[]},this.legend.push(a)),a.ids.push(i)}clearLegendBy(t){var e;t||(this.legend.length=0);for(let i=((e=this.legend)==null?void 0:e.length)-1;i>=0;i--)this.legend[i].type===t&&this.legend.splice(i,i)}getLegend(){return this.legend}showSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.defaultLayers,!1),this.chef.updateLayersVisibility(this.skeletonLayers,!0))}hideSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.skeletonLayers,!1),this.chef.updateLayersVisibility(this.defaultLayers,!0))}setAssetLabels(t,e){this.chef.setLabelsById(t,e,this.assetType)}getAssetLabelsMap(t){var a,o;if(!t)return;const e=Ia(t);let i=this.getAssetsByType(e);if(!i||!((a=Object.keys(i))!=null&&a.length)){let l=this.chef.getElementById(e);if(l||(l=this.chef.getElementById(t+"-txt-label")),!l)return;i=this.chef.getElementsMap(l),this.assetsMap[e]=i}if(!(!i||!((o=Object.keys(i))!=null&&o.length)))return i}getAssetLabelById(t,e){var l,c;const i=this.getAssetLabelsMap(t);if(!i)return;let a=i[e];if(a&&((l=a==null?void 0:a.childNodes)!=null&&l.length))return a.childNodes[0].textContent||"";const o="l-"+t+"-"+e;if(a=i[o],a&&((c=a==null?void 0:a.children)!=null&&c.length))return a.children[0].textContent||""}clearAssetLabels(){this.chef.clearAssetLabelsByType(this.assetType)}bindAssetsEvents(t){var a;const e=(a=this.svg)==null?void 0:a.querySelector("#"+t);if(!e)return;e.querySelectorAll("[id]").forEach(o=>{o instanceof SVGElement&&o.addEventListener("click",this.clickSvgElementHandler)})}handleClickSvgElement(t){var e;typeof t.preventDefault=="function"&&t.preventDefault(),console.warn("svgScene.handleClickSvgElement: ",(e=t==null?void 0:t.target)==null?void 0:e.id,t==null?void 0:t.target),this.dispatchEvent({type:"click",data:t})}socialDistanceEnableChanged(t){this.socialDistanceEnable=!!t,t?this.painter.drawSocialDistanceCircles(this.svg):this.painter.clearSocialDistanceCircles(this.svg)}highlightAssets(t,e){var a;this.resetHighlightAssets(t);const i=this.getAssetsByType(t);!i||!((a=Object.keys(i))!=null&&a.length)||(this._lastHighlightType=t,this._lastHighlightIds=Array.isArray(e)?e:[e],this._lastHighlightIds.forEach(o=>{o&&i[o]&&Rs(i[o],"active")}))}resetHighlightAssets(t){var i;const e=this.getAssetsByType(t||this._lastHighlightType);!e||!((i=Object.keys(e))!=null&&i.length)||(this._lastHighlightIds.forEach(a=>{a&&e[a]&&Ps(e[a],"active")}),this._lastHighlightIds.length=0)}getIntersectObjects(t,e=Ze.RM,i=[]){i.length=0;const a=[],o=this.getAssetsByType(e),l=St.keys(o);for(let f=0,v=l.length;f<v;f++){const x=this.chef.getElementBoundingBox(o[l[f]].id);x&&x.containsPoint(t.worldCoords)&&a.push(o[l[f]])}const c=St.sortBy(a,f=>{var v;return(v=this.chef.getElementBoundingBox(f.id))==null?void 0:v.getArea()});return i.push(...c),i}clearSelected(){var t,e;if((t=this.selectedList)!=null&&t.length)for(let i=((e=this.selectedList)==null?void 0:e.length)-1;i>=0;i--){let a=this.selectedList[i];this.selectedList.splice(i,1),this.chef.setElementState2selected(a,!1)}}clearSelectedById(t){var i,a;let e=(i=this.selectedList)==null?void 0:i.findIndex(o=>o.getAttribute("id")===t);e>-1&&(this.chef.setElementState2selected(this.selectedList[e],!1),(a=this.selectedList)==null||a.splice(e,1))}selectByIds(t,e=!1){Array.isArray(t)||(t=[t]),e||this.clearSelected();const i=St.uniq(St.map(this.selectedList,o=>o.getAttribute("id")||"")),a=this.getAssetsByType(this.assetType);for(let o=t.length-1;o>=0;o--)i.includes(t[o])?(this.clearSelectedById(t[o]),t.splice(o,1)):Object.hasOwnProperty.call(a,t[o])&&this.selectedList.push(a[t[o]]);this.selectedList.forEach(o=>{this.chef.setElementState2selected(o,!0)})}getSelectedIds(){var e;if(!((e=this.selectedList)!=null&&e.length))return;const t=[];for(let i=0,a=this.selectedList.length;i<a;i++)this.selectedList[i].id&&t.push(this.selectedList[i].id);return t}getSelectedBoundingBox(){var e;const t=new It;return(e=this.selectedList)!=null&&e.length?(this.selectedList.forEach(i=>{const a=this.chef.boundingBoxMap[i.id];a&&t.expandByBox(a)}),t):t.copy(this.boundingBox)}getElementsByBox(t){const e=[],i=Object.keys(this.chef.boundingBoxMap),a=this.getAssetsByType(this.assetType);for(let o=0,l=i.length;o<l;o++)if(a.hasOwnProperty(i[o])&&!(i[o].indexOf("-assets")>-1)&&t.intersectsBox(this.chef.boundingBoxMap[i[o]])){const c=a[i[o]];c&&e.push(c)}return e}getBoundingBoxById(t){if(this.chef.boundingBoxMap.hasOwnProperty(t))return new It().copy(this.chef.boundingBoxMap[t])}_lastLinkedIds=[];linkAssetsByTree(t){this.chef.linkAssetsByTree(this.assetType,t);const e=this.chef.getElementById(Ms.ASSET_LABELS);e&&(e.style.display="block");const i=Ia(this.assetType),a=this.chef.getElementById(i);a&&(a.style.display="block");const o=this.assetsMap[i];o&&(this._lastLinkedIds.forEach(l=>{o[l].style.display="none"}),this._lastLinkedIds=$h(t),this._lastLinkedIds.forEach(l=>{o[l].style.display="block"}))}onBeforeRender(){}fullscreen(t=1e3,e=!1){}update(){}}class u0 extends vc{name="SvgLoadingScene";constructor(t){super(t),this.bind(`<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100">
30
+ `)+$+`return __p
31
+ }`;var xt=Zd(function(){return Nt(m,nt+"return "+$).apply(e,E)});if(xt.source=$,ih(xt))throw xt;return xt}function yb(i){return It(i).toLowerCase()}function vb(i){return It(i).toUpperCase()}function mb(i,s,o){if(i=It(i),i&&(o||s===e))return np(i);if(!i||!(s=hr(s)))return i;var h=$r(i),p=$r(s),m=sp(h,p),E=ap(h,p)+1;return ln(h,m,E).join("")}function xb(i,s,o){if(i=It(i),i&&(o||s===e))return i.slice(0,op(i)+1);if(!i||!(s=hr(s)))return i;var h=$r(i),p=ap(h,$r(s))+1;return ln(h,0,p).join("")}function Eb(i,s,o){if(i=It(i),i&&(o||s===e))return i.replace(la,"");if(!i||!(s=hr(s)))return i;var h=$r(i),p=sp(h,$r(s));return ln(h,p).join("")}function Ab(i,s){var o=rt,h=J;if(Xt(s)){var p="separator"in s?s.separator:p;o="length"in s?gt(s.length):o,h="omission"in s?hr(s.omission):h}i=It(i);var m=i.length;if(ys(i)){var E=$r(i);m=E.length}if(o>=m)return i;var T=o-vs(h);if(T<1)return h;var S=E?ln(E,0,T).join(""):i.slice(0,T);if(p===e)return S+h;if(E&&(T+=S.length-T),nh(p)){if(i.slice(T).search(p)){var W,V=S;for(p.global||(p=El(p.source,It(ca.exec(p))+"g")),p.lastIndex=0;W=p.exec(V);)var $=W.index;S=S.slice(0,$===e?T:$)}}else if(i.indexOf(hr(p),T)!=T){var Q=S.lastIndexOf(p);Q>-1&&(S=S.slice(0,Q))}return S+h}function bb(i){return i=It(i),i&&ar.test(i)?i.replace(xr,jv):i}var wb=Ts(function(i,s,o){return i+(o?" ":"")+s.toUpperCase()}),uh=Qp("toUpperCase");function Xd(i,s,o){return i=It(i),s=o?e:s,s===e?Gv(i)?tm(i):Fv(i):i.match(s)||[]}var Zd=Et(function(i,s){try{return or(i,e,s)}catch(o){return ih(o)?o:new pt(o)}}),Tb=Mi(function(i,s){return wr(s,function(o){o=li(o),Oi(i,o,eh(i[o],i))}),i});function _b(i){var s=i==null?0:i.length,o=ut();return i=s?$t(i,function(h){if(typeof h[1]!="function")throw new Tr(l);return[o(h[0]),h[1]]}):[],Et(function(h){for(var p=-1;++p<s;){var m=i[p];if(or(m[0],this,h))return or(m[1],this,h)}})}function Cb(i){return jm(Cr(i,A))}function oh(i){return function(){return i}}function Db(i,s){return i==null||i!==i?s:i}var Sb=Kp(),Ob=Kp(!0);function Je(i){return i}function lh(i){return Sp(typeof i=="function"?i:Cr(i,A))}function Nb(i){return Np(Cr(i,A))}function Mb(i,s){return Mp(i,Cr(s,A))}var Bb=Et(function(i,s){return function(o){return Ta(o,i,s)}}),Ib=Et(function(i,s){return function(o){return Ta(i,o,s)}});function hh(i,s,o){var h=Ee(s),p=Bu(s,h);o==null&&!(Xt(s)&&(p.length||!h.length))&&(o=s,s=i,i=this,p=Bu(s,Ee(s)));var m=!(Xt(o)&&"chain"in o)||!!o.chain,E=Ii(i);return wr(p,function(T){var S=s[T];i[T]=S,E&&(i.prototype[T]=function(){var W=this.__chain__;if(m||W){var V=i(this.__wrapped__),$=V.__actions__=Qe(this.__actions__);return $.push({func:S,args:arguments,thisArg:i}),V.__chain__=W,V}return S.apply(i,rn([this.value()],arguments))})}),i}function Rb(){return we._===this&&(we._=am),this}function ch(){}function Lb(i){return i=gt(i),Et(function(s){return Bp(s,i)})}var Pb=Wl($t),Fb=Wl(Jf),Ub=Wl(pl);function Qd(i){return Zl(i)?dl(li(i)):d1(i)}function kb(i){return function(s){return i==null?e:Ln(i,s)}}var Hb=td(),qb=td(!0);function fh(){return[]}function ph(){return!1}function Wb(){return{}}function Vb(){return""}function $b(){return!0}function zb(i,s){if(i=gt(i),i<1||i>Bt)return[];var o=se,h=Be(i,se);s=ut(s),i-=se;for(var p=vl(h,s);++o<i;)s(o);return p}function Gb(i){return dt(i)?$t(i,li):cr(i)?[i]:Qe(yd(It(i)))}function Yb(i){var s=++nm;return It(i)+s}var Xb=Uu(function(i,s){return i+s},0),Zb=Vl("ceil"),Qb=Uu(function(i,s){return i/s},1),jb=Vl("floor");function Kb(i){return i&&i.length?Mu(i,Je,Sl):e}function Jb(i,s){return i&&i.length?Mu(i,ut(s,2),Sl):e}function tw(i){return rp(i,Je)}function ew(i,s){return rp(i,ut(s,2))}function rw(i){return i&&i.length?Mu(i,Je,Bl):e}function iw(i,s){return i&&i.length?Mu(i,ut(s,2),Bl):e}var nw=Uu(function(i,s){return i*s},1),sw=Vl("round"),aw=Uu(function(i,s){return i-s},0);function uw(i){return i&&i.length?yl(i,Je):0}function ow(i,s){return i&&i.length?yl(i,ut(s,2)):0}return v.after=NE,v.ary=Dd,v.assign=vA,v.assignIn=qd,v.assignInWith=ju,v.assignWith=mA,v.at=xA,v.before=Sd,v.bind=eh,v.bindAll=Tb,v.bindKey=Od,v.castArray=WE,v.chain=Td,v.chunk=j1,v.compact=K1,v.concat=J1,v.cond=_b,v.conforms=Cb,v.constant=oh,v.countBy=uE,v.create=EA,v.curry=Nd,v.curryRight=Md,v.debounce=Bd,v.defaults=AA,v.defaultsDeep=bA,v.defer=ME,v.delay=BE,v.difference=tx,v.differenceBy=ex,v.differenceWith=rx,v.drop=ix,v.dropRight=nx,v.dropRightWhile=sx,v.dropWhile=ax,v.fill=ux,v.filter=lE,v.flatMap=fE,v.flatMapDeep=pE,v.flatMapDepth=dE,v.flatten=Ed,v.flattenDeep=ox,v.flattenDepth=lx,v.flip=IE,v.flow=Sb,v.flowRight=Ob,v.fromPairs=hx,v.functions=OA,v.functionsIn=NA,v.groupBy=gE,v.initial=fx,v.intersection=px,v.intersectionBy=dx,v.intersectionWith=gx,v.invert=BA,v.invertBy=IA,v.invokeMap=vE,v.iteratee=lh,v.keyBy=mE,v.keys=Ee,v.keysIn=Ke,v.map=zu,v.mapKeys=LA,v.mapValues=PA,v.matches=Nb,v.matchesProperty=Mb,v.memoize=Yu,v.merge=FA,v.mergeWith=Wd,v.method=Bb,v.methodOf=Ib,v.mixin=hh,v.negate=Xu,v.nthArg=Lb,v.omit=UA,v.omitBy=kA,v.once=RE,v.orderBy=xE,v.over=Pb,v.overArgs=LE,v.overEvery=Fb,v.overSome=Ub,v.partial=rh,v.partialRight=Id,v.partition=EE,v.pick=HA,v.pickBy=Vd,v.property=Qd,v.propertyOf=kb,v.pull=xx,v.pullAll=bd,v.pullAllBy=Ex,v.pullAllWith=Ax,v.pullAt=bx,v.range=Hb,v.rangeRight=qb,v.rearg=PE,v.reject=wE,v.remove=wx,v.rest=FE,v.reverse=Jl,v.sampleSize=_E,v.set=WA,v.setWith=VA,v.shuffle=CE,v.slice=Tx,v.sortBy=OE,v.sortedUniq=Mx,v.sortedUniqBy=Bx,v.split=fb,v.spread=UE,v.tail=Ix,v.take=Rx,v.takeRight=Lx,v.takeRightWhile=Px,v.takeWhile=Fx,v.tap=Kx,v.throttle=kE,v.thru=$u,v.toArray=Ud,v.toPairs=$d,v.toPairsIn=zd,v.toPath=Gb,v.toPlainObject=Hd,v.transform=$A,v.unary=HE,v.union=Ux,v.unionBy=kx,v.unionWith=Hx,v.uniq=qx,v.uniqBy=Wx,v.uniqWith=Vx,v.unset=zA,v.unzip=th,v.unzipWith=wd,v.update=GA,v.updateWith=YA,v.values=Ds,v.valuesIn=XA,v.without=$x,v.words=Xd,v.wrap=qE,v.xor=zx,v.xorBy=Gx,v.xorWith=Yx,v.zip=Xx,v.zipObject=Zx,v.zipObjectDeep=Qx,v.zipWith=jx,v.entries=$d,v.entriesIn=zd,v.extend=qd,v.extendWith=ju,hh(v,v),v.add=Xb,v.attempt=Zd,v.camelCase=KA,v.capitalize=Gd,v.ceil=Zb,v.clamp=ZA,v.clone=VE,v.cloneDeep=zE,v.cloneDeepWith=GE,v.cloneWith=$E,v.conformsTo=YE,v.deburr=Yd,v.defaultTo=Db,v.divide=Qb,v.endsWith=JA,v.eq=Gr,v.escape=tb,v.escapeRegExp=eb,v.every=oE,v.find=hE,v.findIndex=md,v.findKey=wA,v.findLast=cE,v.findLastIndex=xd,v.findLastKey=TA,v.floor=jb,v.forEach=_d,v.forEachRight=Cd,v.forIn=_A,v.forInRight=CA,v.forOwn=DA,v.forOwnRight=SA,v.get=sh,v.gt=XE,v.gte=ZE,v.has=MA,v.hasIn=ah,v.head=Ad,v.identity=Je,v.includes=yE,v.indexOf=cx,v.inRange=QA,v.invoke=RA,v.isArguments=Un,v.isArray=dt,v.isArrayBuffer=QE,v.isArrayLike=je,v.isArrayLikeObject=te,v.isBoolean=jE,v.isBuffer=hn,v.isDate=KE,v.isElement=JE,v.isEmpty=tA,v.isEqual=eA,v.isEqualWith=rA,v.isError=ih,v.isFinite=iA,v.isFunction=Ii,v.isInteger=Rd,v.isLength=Zu,v.isMap=Ld,v.isMatch=nA,v.isMatchWith=sA,v.isNaN=aA,v.isNative=uA,v.isNil=lA,v.isNull=oA,v.isNumber=Pd,v.isObject=Xt,v.isObjectLike=jt,v.isPlainObject=Na,v.isRegExp=nh,v.isSafeInteger=hA,v.isSet=Fd,v.isString=Qu,v.isSymbol=cr,v.isTypedArray=Cs,v.isUndefined=cA,v.isWeakMap=fA,v.isWeakSet=pA,v.join=yx,v.kebabCase=rb,v.last=Sr,v.lastIndexOf=vx,v.lowerCase=ib,v.lowerFirst=nb,v.lt=dA,v.lte=gA,v.max=Kb,v.maxBy=Jb,v.mean=tw,v.meanBy=ew,v.min=rw,v.minBy=iw,v.stubArray=fh,v.stubFalse=ph,v.stubObject=Wb,v.stubString=Vb,v.stubTrue=$b,v.multiply=nw,v.nth=mx,v.noConflict=Rb,v.noop=ch,v.now=Gu,v.pad=sb,v.padEnd=ab,v.padStart=ub,v.parseInt=ob,v.random=jA,v.reduce=AE,v.reduceRight=bE,v.repeat=lb,v.replace=hb,v.result=qA,v.round=sw,v.runInContext=D,v.sample=TE,v.size=DE,v.snakeCase=cb,v.some=SE,v.sortedIndex=_x,v.sortedIndexBy=Cx,v.sortedIndexOf=Dx,v.sortedLastIndex=Sx,v.sortedLastIndexBy=Ox,v.sortedLastIndexOf=Nx,v.startCase=pb,v.startsWith=db,v.subtract=aw,v.sum=uw,v.sumBy=ow,v.template=gb,v.times=zb,v.toFinite=Ri,v.toInteger=gt,v.toLength=kd,v.toLower=yb,v.toNumber=Or,v.toSafeInteger=yA,v.toString=It,v.toUpper=vb,v.trim=mb,v.trimEnd=xb,v.trimStart=Eb,v.truncate=Ab,v.unescape=bb,v.uniqueId=Yb,v.upperCase=wb,v.upperFirst=uh,v.each=_d,v.eachRight=Cd,v.first=Ad,hh(v,function(){var i={};return ui(v,function(s,o){Lt.call(v.prototype,o)||(i[o]=s)}),i}(),{chain:!1}),v.VERSION=n,wr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){v[i].placeholder=v}),wr(["drop","take"],function(i,s){bt.prototype[i]=function(o){o=o===e?1:de(gt(o),0);var h=this.__filtered__&&!s?new bt(this):this.clone();return h.__filtered__?h.__takeCount__=Be(o,h.__takeCount__):h.__views__.push({size:Be(o,se),type:i+(h.__dir__<0?"Right":"")}),h},bt.prototype[i+"Right"]=function(o){return this.reverse()[i](o).reverse()}}),wr(["filter","map","takeWhile"],function(i,s){var o=s+1,h=o==ct||o==O;bt.prototype[i]=function(p){var m=this.clone();return m.__iteratees__.push({iteratee:ut(p,3),type:o}),m.__filtered__=m.__filtered__||h,m}}),wr(["head","last"],function(i,s){var o="take"+(s?"Right":"");bt.prototype[i]=function(){return this[o](1).value()[0]}}),wr(["initial","tail"],function(i,s){var o="drop"+(s?"":"Right");bt.prototype[i]=function(){return this.__filtered__?new bt(this):this[o](1)}}),bt.prototype.compact=function(){return this.filter(Je)},bt.prototype.find=function(i){return this.filter(i).head()},bt.prototype.findLast=function(i){return this.reverse().find(i)},bt.prototype.invokeMap=Et(function(i,s){return typeof i=="function"?new bt(this):this.map(function(o){return Ta(o,i,s)})}),bt.prototype.reject=function(i){return this.filter(Xu(ut(i)))},bt.prototype.slice=function(i,s){i=gt(i);var o=this;return o.__filtered__&&(i>0||s<0)?new bt(o):(i<0?o=o.takeRight(-i):i&&(o=o.drop(i)),s!==e&&(s=gt(s),o=s<0?o.dropRight(-s):o.take(s-i)),o)},bt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},bt.prototype.toArray=function(){return this.take(se)},ui(bt.prototype,function(i,s){var o=/^(?:filter|find|map|reject)|While$/.test(s),h=/^(?:head|last)$/.test(s),p=v[h?"take"+(s=="last"?"Right":""):s],m=h||/^find/.test(s);p&&(v.prototype[s]=function(){var E=this.__wrapped__,T=h?[1]:arguments,S=E instanceof bt,W=T[0],V=S||dt(E),$=function(At){var Tt=p.apply(v,rn([At],T));return h&&Q?Tt[0]:Tt};V&&o&&typeof W=="function"&&W.length!=1&&(S=V=!1);var Q=this.__chain__,nt=!!this.__actions__.length,ot=m&&!Q,xt=S&&!nt;if(!m&&V){E=xt?E:new bt(this);var lt=i.apply(E,T);return lt.__actions__.push({func:$u,args:[$],thisArg:e}),new _r(lt,Q)}return ot&&xt?i.apply(this,T):(lt=this.thru($),ot?h?lt.value()[0]:lt.value():lt)})}),wr(["pop","push","shift","sort","splice","unshift"],function(i){var s=yu[i],o=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);v.prototype[i]=function(){var p=arguments;if(h&&!this.__chain__){var m=this.value();return s.apply(dt(m)?m:[],p)}return this[o](function(E){return s.apply(dt(E)?E:[],p)})}}),ui(bt.prototype,function(i,s){var o=v[s];if(o){var h=o.name+"";Lt.call(As,h)||(As[h]=[]),As[h].push({name:s,func:o})}}),As[Fu(e,R).name]=[{name:"wrapper",func:e}],bt.prototype.clone=bm,bt.prototype.reverse=wm,bt.prototype.value=Tm,v.prototype.at=Jx,v.prototype.chain=tE,v.prototype.commit=eE,v.prototype.next=rE,v.prototype.plant=nE,v.prototype.reverse=sE,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=aE,v.prototype.first=v.prototype.head,va&&(v.prototype[va]=iE),v},ms=em();Nn?((Nn.exports=ms)._=ms,ll._=ms):we._=ms}).call(Os)}(Wa,Wa.exports);var kg=Wa.exports;const Mt=yh(kg);class St{isBox2=!0;min;max;constructor(t=new Y(1/0,1/0),e=new Y(-1/0,-1/0)){this.min=t,this.max=e}applyMatrix3(t){return this.isEmpty()?this:(qs[0].set(this.min.x,this.min.y).applyMatrix3(t),qs[1].set(this.min.x,this.max.y).applyMatrix3(t),qs[3].set(this.max.x,this.max.y).applyMatrix3(t),qs[2].set(this.max.x,this.min.y).applyMatrix3(t),this.setFromPoints(qs),this)}clone(){return new St().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}ceil(){return this.min.ceilToZero(),this.max.ceilToZero(),this}distanceToPoint(t){return Br.copy(t).clamp(this.min,this.max).sub(t).length()}expandByXY(t,e){return this.min.minXY(t,e),this.max.maxXY(t,e),this}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByPoints(t){if(!t||!t.length)return this;for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t){return t.updateWorldMatrix(!1,!1),t.geometry.boundingBox!==void 0?((!t.geometry.boundingBox||t.geometry.boundingBox.isEmpty())&&t.computeBoundingBox(),Qn.copy(t.geometry.boundingBox),Qn.applyMatrix3(t.matrixWorld),this.union(Qn)):t.geometry.points&&t.geometry.points.length&&(Qn.setFromPoints(t.geometry.points),Qn.applyMatrix3(t.matrixWorld),this.union(Qn)),this}expandByBox(t){this.expandByPoint(t.min),this.expandByPoint(t.max)}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}floor(){return this.min.floorToZero(),this.max.floorToZero(),this}getCenter(t=new Y){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}getPoints(t=[]){return t.length=0,t[0]={x:this.min.x,y:this.min.y},t[1]={x:this.min.x,y:this.max.y},t[2]={x:this.max.x,y:this.max.y},t[3]={x:this.max.x,y:this.min.y},t}getArea(){return this.getSize(Br),Br.x*Br.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}intersectsBox(t){return t?!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y):!1}intersectsObject(t){return!t||!t.geometry?!1:this.intersectsBox(t.geometry.boundingBox)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}round(){return this.min.roundToZero(),this.max.roundToZero(),this}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(Br.fromArray(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=Br.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromProjectionMatrix(t){return this.min.set(t.elements[6],t.elements[7]),this.max.set(t.elements[6],t.elements[7]),this}setFromObject(t){return this.makeEmpty(),this.expandByObject(t)}setFromMinMaxString(t,e=" "){if(this.makeEmpty(),!(t!=null&&t.length))return this;let n=t.split(e),a=Mt.map(n,u=>parseFloat(u));for(let u=0,l=a.length;u<l;u+=2)this.expandByPoint(Br.fromArray(a,u));return this}translate(t){return this.min.add(t),this.max.add(t),this}toString(){return`{"min":${this.min.toString()},"max":${this.max.toString()}}`}fromString(t){return t?(this.copy(JSON.parse(t)),this):this}union(t){return t.validate()?(this.min.min(t.min),this.max.max(t.max),this):this}validate(){return this.min.validate()&&this.max.validate()}unproject(t){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}centralArrange(t=1,e=20,n=10){const a=e+n;this.getCenter(Br),this.getSize(fn),fn.subScalar(e);const u=Math.floor(fn.x/a),l=Math.ceil(t/u),c=u*a,f=l*a;if(fn.x<a||fn.y<a||c>=fn.x||f>=fn.y)return Br.clone();let y=[],A=0,_=0;for(let C=0;C<t;C++){const F=u>t?t*a:c,N=Br.x-F/2+_*a+a/2,M=Br.y-f/2+A*a+a/2;y.push(new Y(N,M)),_++,_>=u&&(_=0,A++)}return y}}const Qn=new St,qs=[new Y,new Y,new Y,new Y],Br=new Y,fn=new Y,Hg=Object.freeze(Object.defineProperty({__proto__:null,default:St},Symbol.toStringTag,{value:"Module"})),qg=Zt.window.requestAnimationFrame,Ws=Zt.window.performance?()=>Zt.window.performance.now():()=>new Date().getTime(),oc=qg;class Pt{static idCounter=0;static children=[];static isRunning=!1;static actived=!1;static duration=0;static lastTime=Ws();static messages=[];static maxLetters=20;id=Pt.idCounter++;timers=new Map;timersDuration=new Map;counters=new Map;countersAmount=new Map;out=[];constructor(){}static active(t){t?Pt.actived=!0:Pt.actived=!1,Pt.duration=t||0}static add(t){this.children.push(t),this.handleStart()}static remove(t){for(let e=0,n=Pt.children.length;e<n;e++)if(Pt.children[e].id===t.id){this.children.splice(e,1);break}}static handleStart(){this.isRunning||(this.isRunning=!0,oc(this.runLoop))}static runLoop(){Pt.children.length?(Pt.runFrames(),oc(Pt.runLoop)):Pt.isRunning=!1}static runFrames(){let t,e=Ws();if(!(e-Pt.lastTime<Pt.duration)){Pt.lastTime=e;for(let n=0,a=this.children.length;n<a;n++)t=this.children[n],t.calculateTimers(),t.calculateCounters(),Pt.messages=Pt.messages.concat(t.out),t.out.length=0;if(Pt.messages.length){if(Pt.actived){let n=[];n.push(Wg),n.push(Vg),n.push($g),this.messages.forEach(a=>n.push(Qg(a,this.maxLetters))),n.push(zg),console.log(n.join(`
32
+ `))}Pt.messages.length=0}}}destroy(){Pt.remove(this)}addTimer(t,e=Ws(),n=Ws()-(this.timersDuration.get(t)||Ws())){this.addTimerDuration(t,n),this.timersDuration.set(t,e)}addTimerDuration(t,e){var n;this.timers.has(t)||this.timers.set(t,[]),(n=this.timers.get(t))==null||n.push(e)}calculateTimers(){this.timers.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateDurations(e,t)),t.length=0)})}addCounterAmount(t,e){var n;this.counters.has(t)||this.counters.set(t,[]),(n=this.counters.get(t))==null||n.push(e)}calculateCounters(){this.counters.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateAmounts(e,t)),t.length=0)})}start(){return this.stop(),Pt.add(this),this}stop(){return Pt.remove(this),this}calculateDurations(t,e){const n={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return n;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=parseFloat(this.stdDev(e,c).toFixed(2));return{name:t,avg:this.fd(c),min:this.fd(u),max:this.fd(l),stdDev:f,count:a,FPS:Math.ceil(a/Pt.duration*1e3)}}calculateAmounts(t,e){const n={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return n;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=this.stdDev(e,c);return{name:t,avg:c,min:u,max:l,stdDev:f,count:a,FPS:Math.ceil(a/Pt.duration*1e3)}}minMaxAvg(t){let e=t[0],n=t[0],a=t.length,u=0;for(let c=0;c<t.length;c++){const f=t[c];u+=f,f<e&&(e=f),f>n&&(n=f)}const l=u/a;return{min:this.fx(e),max:this.fx(n),avg:this.fx(l)}}stdDev(t,e){let n=0;for(let u=0;u<t.length;u++){const l=t[u];n+=(l-e)*(l-e)}const a=t.length;return this.fx(Math.sqrt(n/a))}fd(t){return t>1e3?(t/1e3).toFixed(1)+"s":t.toFixed(1)+"ms"}fx(t,e=1){return e===1?Math.round(t*10)/10:e===2?Math.round(t*100)/100:e===3?Math.round(t*1e3)/1e3:t}}const Va=20,$a=["avg","min","max","stdDev","count","FPS"],Qr=Yg($a,1),Wg=Gg($a,Va),Vg=Xg($a,Va),$g=Zg($a,Va),zg=jg(Va);function Gg(r,t=20){let e="┌";e+="─".repeat(t),e+="┬";for(let n=0,a=r.length;n<a;n++)e+="─".repeat(Qr),n<a-1?e+="┬":e+="┐";return e}function Yg(r,t=0){let e=0;for(let n=0,a=r.length;n<a;n++)e=Math.max(e,r[n].length);return e+t}function Xg(r,t=20){let e="│";e+=" ".repeat(t),e+="│";for(let n=0,a=r.length;n<a;n++)e+=" ".repeat(Math.max(Qr-r[n].length-1,0)),e+=r[n],e+=" │";return e}function Zg(r,t=20){let e="├";e+="─".repeat(t),e+="┼";for(let n=0,a=r.length;n<a;n++)e+="─".repeat(Qr),n<a-1?e+="┴":e+="┘";return e}function Qg(r,t=20){let e="│";e+=" ".repeat(Math.max(t-r.name.length,0)),e+=r.name,e+="│";const n=typeof r.avg=="string"?Qr-r.avg.length:Qr-r.avg.toString().length;return e+=" ".repeat(Math.max(n,0)),e+=r.avg+" ",e+=" ".repeat(Math.max(Qr-r.min.toString().length,0)),e+=r.min+" ",e+=" ".repeat(Math.max(Qr-r.max.toString().length,0)),e+=r.max+" ",e+=" ".repeat(Math.max(Qr-r.stdDev.toString().length,0)),e+=r.stdDev+" ",e+=" ".repeat(Math.max(Qr-r.count.toString().length,0)),e+=r.count+" ",e+=" ".repeat(Math.max(Qr-r.FPS.toString().length,0)),e+=r.FPS,e}function jg(r=20){let t="└";for(let e=0;e<r;e++)t+="─";return t+="┘",t}var er=(r=>(r.GROS="gros",r.RM="rm",r.WS="ws",r.SU="su",r.EQ="eq",r.FN="fn",r.GL="gl",r.IP="ip",r))(er||{}),Vs=(r=>(r.BACKGROUND="background",r.ASSETS="assets",r.ANNOTATIONS="annotations",r.TEXT="text",r.ASSET_LABELS="asset-labels",r.LABELS="labels",r))(Vs||{});class Ir{_listeners=new Map;destroy(){this._listeners.clear()}addEventListener(t,e){let n=this._listeners.get(t);n||(n=[],this._listeners.set(t,n)),n.includes(e)||n.push(e)}addEventListeners(t,e){const n=t.split(","),a=n.length;for(let u=0;u<a;u++)this.addEventListener(n[u].trim(),e)}isListening(t){var e;return this._listeners.has(t)&&!!((e=this._listeners.get(t))!=null&&e.length)}hasEventListener(t,e){var n;return this._listeners.size===0?!1:this._listeners.has(t)&&!!((n=this._listeners.get(t))!=null&&n.includes(e))}removeEventListener(t,e){const n=this._listeners.get(t);if(n){const a=n.indexOf(e);a>-1&&n.splice(a,1)}}dispatchEvent(t){const e=this._listeners.get(t.type);if(e){t.target=this;const n=e.slice(0);for(let a=0,u=n.length;a<u;a++)n[a].call(this,t);t.target=void 0}}dispatchEventAsync(t){const e=this._listeners.get(t.type);e&&setTimeout(()=>{for(const n of e)n.call(this,t)})}}function vo(r,t="http://www.w3.org/2000/svg"){var e,n;return(n=(e=Zt.window)==null?void 0:e.document)==null?void 0:n.createElementNS(t,r)}async function lc(r=2e3){return new Promise(t=>setTimeout(t,(Math.random()+.5)*r))}function hc(r,t=[]){var e,n;return!r||!r.value||(t.push(r.value),(e=r.children)!=null&&e.length&&((n=r.children)==null||n.forEach(a=>hc(a,t)))),t}function cc(r){if(!r)return"inches";let t=r.querySelector("#defaultView"),e=t==null?void 0:t.getAttribute("units");return e||"inches"}function Kg(r){if(!r)return 1;let t=cc(r),e=1;switch(t){case"mm":e=500/39.3701;break;case"cm":e=50/39.3701;break;case"Metres":e=.5/39.3701;break;case"m":e=.5/39.3701;break;default:e=1}return e}function Jg(r,t=new St){if(!r)return t;let e=r.split(" "),n=Mt.map(e,a=>parseFloat(a));return(n==null?void 0:n.length)!==4||(t.min.set(n[0],n[1]),t.max.set(n[0]+n[2],n[1]+n[3])),t}function t0(r=new St){let t="";const e=[];return e.push(r.min.x),e.push(r.min.y),e.push(Math.abs(r.max.x-r.min.x)),e.push(Math.abs(r.max.y-r.min.y)),t=e.join(" "),t}function fc(r){var t;if((t=r==null?void 0:r.children)!=null&&t.length){for(let e=0,n=r.children.length;e<n;e++)if(r.children[e].nodeName==="g")return r.children[e]}}const e0=new Pt().start();class r0{isSvgRenderer=!0;id;params;container=Zt.window.document.getElementsByTagName("body")[0];cameraVersion=-1;viewAreaLimit=-1;constructor(t){this.id="SvgRenderer@"+Date.now(),this.params=t,Zt.config=t,this.initSvg(),Pt.active(this.params.monitorDuration)}destroy(){Pt.active(0)}initSvg(){if(this.params.containerId&&(this.container=Zt.window.document.getElementById(this.params.containerId)),this.container||(this.container=Zt.window.document.getElementsByTagName("body")[0]),!this.params.width||!this.params.height){const t=this.container.getBoundingClientRect();this.params.width=t.width,this.params.height=t.height}this.container.style.overflow="hidden",this.container.style.transform="translateZ(0)",this.setSize(this.params.width,this.params.height)}resize(){var e,n;const t=(n=(e=this.container)==null?void 0:e.parentElement)==null?void 0:n.getBoundingClientRect();t&&this.setSize(t.width,t.height)}setSize(t,e){this.container.style.width=t+"px",this.container.style.height=e+"px",this.params.width=t,this.params.height=e,this.params.camera||(this.params.camera={}),this.params.camera.width=this.params.width,this.params.camera.height=this.params.height,this.params.aspect=this.params.width/this.params.height,this.params.camera.aspect=this.params.aspect,this.params.camera.left=this.params.width*-.5,this.params.camera.right=this.params.width*.5,this.params.camera.top=this.params.height*.5,this.params.camera.bottom=this.params.height*-.5}getSize(t){return t.set(this.params.width,this.params.height)}clean(){}async render(t,e){var a;if(!t||!e||this.cameraVersion===(e==null?void 0:e.version))return;e.updateMatrixWorld(),dc.set(0,0).unproject(e),gc.set(this.params.width,this.params.height).unproject(e),pc.setFromPoints([dc,gc]);let n=t0(pc);(a=t.svg)==null||a.setAttribute("viewBox",n),this.cameraVersion=e.version||-1,e0.addTimer("render cycle")}autoClear;getRenderTarget(){}setRenderTarget(t){}renderTexture(t){}}const pc=new St,dc=new Y,gc=new Y;class re{isMatrix3=!0;elements=[1,0,0,0,1,0,0,0,1];constructor(){}static equals(t,e,n=1e-6){if(t.elements.length!=e.elements.length)return!1;for(let a=0,u=t.elements.length;a<u;a++){const l=t.elements[a]-e.elements[a];if(Math.abs(l)>n)return!1}return!0}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}clone(){return new re().fromArray(this.elements)}compose(t,e,n){const a=Math.sin(e.x),u=Math.cos(e.x);return this.set(n.x*u,n.y*a*-1,t.x,n.x*a,n.y*u,t.y,0,0,1)}composeWithCenter(t,e,n,a){return Rr.identity(),za.makeTranslation(t.x,t.y),$s.makeRotation(e.x),jn.makeScale(n.x,n.y),Ae.copy(a).applyMatrix3(jn),Rr.multiply(mo.makeTranslation(-Ae.x,-Ae.y)).multiply(za).multiply(mo.makeTranslation(Ae.x,Ae.y)).multiply($s).multiply(mo.makeTranslation(-Ae.x,-Ae.y)).multiply(jn),this.copy(Rr)}decompose(t,e,n){const a=Rr.copy(this).elements,u=Math.sqrt(a[0]*a[0]+a[3]*a[3]),l=Math.sqrt(a[1]*a[1]+a[4]*a[4]),c=a[0]*a[4]-a[3]*a[1];a[0]||a[3]?n.set(u,c/u):a[1]||a[4]?n.set(c/l,l):n.set(0,0);let f=0;a[0]||a[3]?f=a[3]>0?-Math.acos(a[0]/u):Math.acos(a[0]/u):a[1]||a[4]?f=Math.PI/2-(a[4]>0?Math.acos(-a[1]/l):-Math.acos(a[1]/l)):f=0,f!==0&&n.y<0&&(f*=-1),e.set(f,f),t.set(a[6],a[7])}compose2(t,e,n){return this.identity().translate(t.x,t.y).rotate(e.x).scale(n.x,n.y),this}decompose2(t,e,n){const a=this.clone();a.scale(-1,1);const u=a.elements[0],l=a.elements[1],c=a.elements[3],f=a.elements[4];let d=0,y=0,A=0;if(u!==0||c!==0){const _=Math.hypot(u,c);d=_,y=(u*f-l*c)/_;const C=Math.acos(u/_);A=c>0?-C:C}else if(l!==0||f!==0){const _=Math.hypot(l,f);d=(u*f-l*c)/_,y=_;const C=Math.acos(l/_);A=Math.PI/2+(f>0?-C:C)}else d=0,y=0,A=0;d=-d,t.x=a.elements[6],t.y=a.elements[7],e.x=e.y=A/Math.PI/180,n.x=d,n.y=y}composeSvgTransform(t=0,e=0,n){if(!n&&!t&&!e)return this;let a=n==null?void 0:n.split(") ").map(u=>u.trim()+")").filter(u=>u!==")");return a||(a=[]),(t||e)&&a.push(`translate(${t},${e})`),this.identity(),Rr.identity(),a.forEach(u=>{const l=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(u),c=/rotate\(\s*(-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+)(?:[ ,](-?\d*\.?\d+))?)?\s*\)/.exec(u),f=/translate\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(u);if(l){const d=Number(l[1])||1,y=Number(l[2])||d;Rr.multiply(jn.makeScale(d,y))}else c?Number(c[2])||Number(c[3])?(Ce.set(Number(c[2]||"0"),Number(c[3]||"0")),Rr.multiply($s.makeRotationByPoint(uc(Number(c[1])),Ce))):Rr.multiply($s.makeRotation(uc(Number(c[1])||0))):f&&Rr.multiply(za.makeTranslation(Number(f[1])||0,Number(f[2])||0))}),this.copy(Rr),this}decomposeSvgMatrix(t,e,n){const a=Rr.copy(this).elements;Ce.set(a[0],a[1]),Ae.set(a[3],a[4]);let u=Ce.length();Ce.normalize();let l=Ce.dot(Ae);yc.copy(Ce).multiplyScalar(-l),Ae.add(yc);const c=Ae.length()||0;Ae.normalize(),Ce.x*Ae.y<Ae.x*Ce.y&&(Ce.x=-Ce.x,Ce.y=-Ce.y,u=-u,l=-l);const f=u?Math.atan2(Ce.y,Ce.x):Math.atan2(-Ce.x,Ae.y);t.set(a[6],a[7]),e.set(f,f),n.set(u,c)}determinant(){const t=this.elements,e=t[0],n=t[3],a=t[6],u=t[1],l=t[4],c=t[7],f=t[2],d=t[5],y=t[8];return e*l*y-e*d*c-u*n*y+u*d*a+f*n*c-f*l*a}equals(t,e=0){const n=this.elements,a=t.elements;for(let u=0;u<9;u++)if(Math.abs(n[u]-a[u])>e)return!1;return!0}extractBasis2(t,e){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),this}flipY(){return this.multiply(jn.makeScale(1,-1))}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}getComponents(t=[1,0,0,1,0,0]){return t[0]=this.elements[0],t[1]=this.elements[1],t[2]=this.elements[3],t[3]=this.elements[4],t[4]=this.elements[6],t[5]=this.elements[7],t}getNormalMatrix(t){return this.setFromMatrix(t).invert().transpose()}getRotation(t){let e=this.elements;const n=Math.sqrt(e[0]*e[0]+e[3]*e[3]),a=Math.sqrt(e[1]*e[1]+e[4]*e[4]);let u=0;e[0]||e[3]?u=e[3]>0?-Math.acos(e[0]/n):Math.acos(e[0]/n):e[1]||e[4]?u=Math.PI/2-(e[4]>0?Math.acos(-e[1]/a):-Math.acos(e[1]/a)):u=0,this.getScale(Ae),u!==0&&Ae.x<0&&(u*=-1),t.set(u,u)}getScale(t){let e=this.elements,n=Math.sqrt(e[0]*e[0]+e[1]*e[1]),a=Math.sqrt(e[3]*e[3]+e[4]*e[4]),u=e[0]*e[4]-e[3]*e[1];e[0]||e[1]?t.set(u/a,a):e[3]||e[4]?t.set(n,u/n):t.set(0,0)}getTransition(t){t.set(this.elements[6],this.elements[7])}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}invert(){const t=this.elements,e=t[0],n=t[1],a=t[2],u=t[3],l=t[4],c=t[5],f=t[6],d=t[7],y=t[8],A=y*l-c*d,_=c*f-y*u,C=d*u-l*f,F=e*A+n*_+a*C;if(F===0)return this.set(0,0,0,0,0,0,0,0,0);const N=1/F;return t[0]=A*N,t[1]=(a*d-y*n)*N,t[2]=(c*n-a*l)*N,t[3]=_*N,t[4]=(y*e-a*f)*N,t[5]=(a*u-c*e)*N,t[6]=C*N,t[7]=(n*f-d*e)*N,t[8]=(l*e-n*u)*N,this}lookAt(t,e,n){return this.identity().rotate(e.angle()-t.angle()+n.angle())}makeProjection(t,e,n,a,u,l){const c=u/(e-t),f=l/(n-a),d=u/2-(e+t)*c,y=l/2+(n+a)*f;return this.elements[0]=c,this.elements[3]=0,this.elements[6]=d,this.elements[1]=0,this.elements[4]=-f,this.elements[7]=y,this.elements[2]=0,this.elements[5]=0,this.elements[8]=1,this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeRotationByPoint(t,e){const n=Math.cos(t),a=Math.sin(t),u=-e.x*n+e.y*a+e.x,l=-e.x*a-e.y*n+e.y;return this.set(n,-a,u,a,n,l,0,0,1),this}makeRotationFromQuaternion(t){return this.compose(i0,t,n0)}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}multiply(t){return this.multiplyMatrices(this,t)}multiplyMatrices(t,e){const n=t.elements,a=e.elements,u=this.elements,l=n[0],c=n[3],f=n[6],d=n[1],y=n[4],A=n[7],_=n[2],C=n[5],F=n[8],N=a[0],M=a[3],R=a[6],q=a[1],z=a[4],w=a[7],L=a[2],k=a[5],j=a[8];return u[0]=l*N+c*q+f*L,u[3]=l*M+c*z+f*k,u[6]=l*R+c*w+f*j,u[1]=d*N+y*q+A*L,u[4]=d*M+y*z+A*k,u[7]=d*R+y*w+A*j,u[2]=_*N+C*q+F*L,u[5]=_*M+C*z+F*k,u[8]=_*R+C*w+F*j,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}premultiply(t){return this.multiplyMatrices(t,this)}rotate(t){return this.premultiply($s.makeRotation(-t))}scale(t,e){return this.premultiply(jn.makeScale(t,e))}set(t,e,n,a,u,l,c,f,d){return this.elements[0]=t,this.elements[3]=e,this.elements[6]=n,this.elements[1]=a,this.elements[4]=u,this.elements[7]=l,this.elements[2]=c,this.elements[5]=f,this.elements[8]=d,this}setFromDomMatrix(t){return typeof t.m11<"u"&&typeof t.m21<"u"&&typeof t.m41<"u"&&typeof t.m12<"u"&&typeof t.m22<"u"&&typeof t.m42<"u"&&typeof t.m14<"u"&&typeof t.m24<"u"&&typeof t.m44<"u"?this.set(t.m11,t.m21,t.m41,t.m12,t.m22,t.m42,t.m14,t.m24,t.m44):typeof t.a<"u"&&typeof t.b<"u"&&typeof t.c<"u"&&typeof t.d<"u"&&typeof t.e<"u"&&typeof t.f<"u"&&this.set(t.a,t.c,t.e,t.b,t.d,t.f,0,0,1),this}setFromMatrix(t){const e=t.elements;return this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]),this}setUvTransform(t,e,n,a,u,l,c){const f=Math.cos(u),d=Math.sin(u);return this.set(n*f,n*d,-n*(f*l+d*c)+l+t,-a*d,a*f,-a*(-d*l+f*c)+c+e,0,0,1),this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}toString(){return`[${this.elements[0]},${this.elements[1]}, ${this.elements[3]},${this.elements[4]}, ${this.elements[6]},${this.elements[7]}]`}translate(t,e){return this.premultiply(za.makeTranslation(t,e))}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}}const Ce=new Y,Ae=new Y,yc=new Y,Rr=new re,za=new re,$s=new re,jn=new re,mo=new re,i0=new Y(0,0,0),n0=new Y(1,1,1),De=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],s0=()=>{const r=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(De[r&255]+De[r>>8&255]+De[r>>16&255]+De[r>>24&255]+"-"+De[t&255]+De[t>>8&255]+"-"+De[t>>16&15|64]+De[t>>24&255]+"-"+De[e&63|128]+De[e>>8&255]+"-"+De[e>>16&255]+De[e>>24&255]+De[n&255]+De[n>>8&255]+De[n>>16&255]+De[n>>24&255]).toLowerCase()};let a0=0;const xo=new Y,jr=new re,vc=new Y,Eo=new St,zs=new Y,Ao=new Y,pn=new Y,u0=new Y(0,1),o0={type:"added"},bo={type:"removed"};class mc extends Ir{isObject2=!0;id=a0++;uuid=s0();name;type="Object2";featureKey="Object2_"+this.id;parent;children=[];up=new Y(0,1);position=new Y;rotation=new Y;scaled=new Y(1,1);flipY=!1;selectable=!1;matrix=new re;matrixWorld=new re;matrixWorldInverse=new re;modelViewMatrix=new re;normalMatrix=new re;fixed=!1;dynamically=!1;matrixAutoUpdate=!1;matrixWorldNeedsUpdate=!1;matrixWorldAutoUpdate=!1;composeNode=!1;isInComposeNode=!1;alignCenter=!1;boundingBox=new St;boundingBoxWorld=new St;boundingBoxNeedsUpdate=!1;centerPoint=new Y;visible=!0;castShadow=!1;receiveShadow=!1;renderOrder=0;animations=[];finalSize;userData={};DefaultUp=new Y(0,1);_autoSort=!0;constructor(t={}){super(),t.name!==void 0?this.name=t.name:this.name="Object2",t.flipY!==void 0&&(this.flipY=t.flipY),t.selectable!==void 0&&(this.selectable=t.selectable),t.finalSize!==void 0&&(this.finalSize=t.finalSize),this.setAttrs(t)}_version=0;get version(){return this._version}set version(t){this._version=t}set needsUpdate(t){t&&this._version++}destroy(){super.destroy(),this.clear(),this.parent=void 0,this.dispatchEvent(bo)}setPosition(t){return this.position.set(t.x,t.y),this}translate(t,e){this.position.x+=t,this.position.y+=e}setScale(t,e){return this.scaled.set(t,e),this}setRotationFromMatrix(t){t.decompose(zs,this.rotation,Ao)}setRotation(t){return this.rotation.set(t,t),this}rotate(t){this.rotation.x+=t}scale(t,e){e?(this.scaled.x*=t,this.scaled.y*=e):this.scaled.multiplyScalar(t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix3(jr.copy(this.matrixWorld).invert())}lookAt(t){vc.copy(t),this.updateWorldMatrix(!0,!1),this.matrixWorld.getTransition(zs),jr.lookAt(zs,vc,u0),jr.getRotation(pn),this.rotation.set(pn.x,pn.x),this.parent&&(this.parent.matrixWorld.getRotation(pn),this.rotate(pn.x))}applyMatrix3(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.rotation,this.scaled)}updateMatrix(){xo.copy(this.scaled),this.flipY&&(xo.y*=-1),this.matrix.compose(this.position,this.rotation,xo),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.matrixWorldNeedsUpdate=!1,t=!0,this.boundingBoxNeedsUpdate=!0);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].updateMatrixWorld(t);this.boundingBoxNeedsUpdate&&(this.updateBoundingBox(),this.boundingBoxNeedsUpdate=!1)}updateWorldMatrix(t=!1,e=!1){const n=this.parent;if(t&&n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent?this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix):this.matrixWorld.copy(this.matrix),this.matrixWorldInverse.copy(this.matrixWorld).invert(),e){const a=this.children;for(let u=0,l=a.length;u<l;u++)a[u].updateWorldMatrix(!1,!0)}}updateModelViewMatrix(t){jr.copy(this.matrixWorld),this.isInComposeNode?this.modelViewMatrix.copy(this.matrix):t&&this.fixed?this.modelViewMatrix.copy(t.projectionMatrix):t?this.modelViewMatrix.multiplyMatrices(t.viewMatrix,jr):this.modelViewMatrix.copy(jr);for(let e=0,n=this.children.length;e<n;e++)this.children[e].updateModelViewMatrix(t)}computeBoundingBox(){this.boundingBox.makeEmpty(),this.centerPoint.set(0,0);for(let t=0,e=this.children.length;t<e;t++)this.children[t].updateMatrixWorld(),Eo.copy(this.children[t].computeBoundingBox()),Eo.applyMatrix3(jr.copy(this.children[t].matrixWorld)),this.boundingBox.union(Eo);return this.boundingBox.applyMatrix3(this.matrixWorldInverse),this.boundingBox}updateBoundingBox(){this.boundingBox.isEmpty()||this.boundingBoxWorld.copy(this.boundingBox).applyMatrix3(this.matrixWorld)}setAttrs(t){if(!t)return this;for(const e in t)if(!(e==="children"||t[e]===void 0)){if(e==="userData"&&t[e]){Object.keys(t[e]).forEach(n=>this.userData[n]=t[e][n]);continue}this.userData[e]=t[e]}return this}add(t){return!t||!t.isObject2||t===this?this:(t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.isInComposeNode=this.composeNode||this.isInComposeNode,t.selectable&&t.parent.setSelectable(t.selectable),this._autoSort&&this.children.sort((e,n)=>e.renderOrder-n.renderOrder),t.dispatchEvent(o0),this.matrixAutoUpdate||(this.matrixWorldNeedsUpdate=!0),this)}adds(t){if(!t||!t.length)return this;this._autoSort=!1;for(let e=0,n=t.length;e<n;e++)e===t.length-1&&(this._autoSort=!0),this.add(t[e]);return this}remove(t){const e=this.children.indexOf(t);return e!==-1&&(t.parent=void 0,this.children.splice(e,1),t.dispatchEvent(bo)),this}removes(t){for(let e=0,n=t.length;e<n;e++)this.remove(t[e]);return this}removeFromParent(){const t=this.parent;return t&&t.remove(this),this}moveToLast(){var e;if(!this.parent)return;let t=this.clone();this.removeFromParent(),(e=t.parent)==null||e.add(t)}clear(){for(let t=0;t<this.children.length;t++){const e=this.children[t];e.parent=void 0,e.destroy(),e.dispatchEvent(bo)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),jr.copy(this.matrixWorld).invert(),t.parent&&(t.parent.updateWorldMatrix(!0,!1),jr.multiply(t.parent.matrixWorld)),t.applyMatrix3(jr),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,a=this.children.length;n<a;n++){const l=this.children[n].getObjectByProperty(t,e);if(l!==void 0)return l}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(t,pn,Ao),t}getWorldRotation(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zs,t,Ao),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zs,pn,t),t}getWorldDirection(t){return this.updateWorldMatrix(!0,!1),t.set(this.matrixWorld.elements[6],this.matrixWorld.elements[7]).normalize()}traverse(t){t(this);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].traverse(t)}traverseVisible(t){if(this.visible)return;t(this);const e=this.children;for(let n=0,a=e.length;n<a;n++)e[n].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e&&(t(e),e.traverseAncestors(t))}onBeforeRender(t,e,n){}render(t){}onAfterRender(t,e,n){}setSelectable(t){this.selectable=t,this.parent&&this.parent.setSelectable(t)}raycast(t,e=[]){}clone(t=!0){const e=this.constructor;return new e(this.userData).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.type=t.type,this.featureKey=t.featureKey,this._version=0,this.parent=t.parent,this.up.copy(t.up),this.position.copy(t.position),this.rotation.copy(t.rotation),this.scaled.copy(t.scaled),this.flipY=t.flipY,this.selectable=t.selectable,this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.modelViewMatrix.copy(t.modelViewMatrix),this.normalMatrix.copy(t.normalMatrix),this.fixed=t.fixed,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.composeNode=t.composeNode,this.alignCenter=t.alignCenter,this.boundingBox.copy(t.boundingBox),this.boundingBoxWorld.copy(t.boundingBoxWorld),this.boundingBoxNeedsUpdate=t.boundingBoxNeedsUpdate,this.centerPoint.copy(t.centerPoint),this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e)for(let n=0;n<t.children.length;n++){const a=t.children[n];this.add(a.clone())}return this}}class l0 extends mc{name="Scene";type="Scene";isScene=!0;view;background;featureKey="Scene_"+this.id;matrixAutoUpdate=!1;constructor(){super()}destroy(){super.destroy(),this.boundingBox.makeEmpty()}setup(t){this.view=t}onBeforeRender(t,e,n){super.onBeforeRender(t,e,n),n&&this.cameraVersion!==n.version&&(this.matrixAutoUpdate||this.updateMatrix(),this.needsUpdate=!0,this.cameraVersion=n.version)}render(t){var e;this.visible&&((e=this.children)==null||e.forEach(function(n){n.isShape&&n.render(t)}))}getIntersectObjects(t,e=er.RM,n=[]){throw new Error("must be implemented in derived")}}class h0{isLoading=!1;itemsLoaded=0;itemsTotal=0;urlModifier;handlers=[];onStart;onLoad;onProgress;onError;constructor(t,e,n){this.onLoad=t,this.onProgress=e,this.onError=n}itemStart(t){this.itemsTotal++,this.isLoading||this.onStart!==void 0&&this.onStart(t,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(t){this.itemsLoaded++,this.onProgress!==void 0&&this.onProgress(t,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,this.onLoad!==void 0&&this.onLoad())}itemError(t){this.onError!==void 0&&this.onError(t)}resolveURL(t){return this.urlModifier!==void 0?this.urlModifier(t):t}setURLModifier(t){return this.urlModifier=t,this}addHandler(t,e){return this.handlers.push(t,e),this}removeHandler(t){const e=this.handlers.indexOf(t);return e!==-1&&this.handlers.splice(e,2),this}getHandler(t){for(let e=0,n=this.handlers.length;e<n;e+=2){const a=this.handlers[e],u=this.handlers[e+1];if(a.global&&(a.lastIndex=0),a.test(t))return u}return null}}const xc={enabled:!1,files:{},add:function(r,t){this.enabled&&(this.files[r]=t)},get:function(r){if(this.enabled)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}},c0=new h0;class Ec{manager;crossOrigin="anonymous";withCredentials=!1;path="";resourcePath="";requestHeader={};constructor(t=c0){this.manager=t}loadAsync(t,e){const n=this;return new Promise(function(a,u){n.load(t,a,e,u)})}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}const gi={};class f0 extends Error{response;constructor(t,e){super(t),this.response=e}}class p0 extends Ec{mimeType;responseType;constructor(t){super(t)}load(t,e,n,a){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const u=xc.get(t);if(u!==void 0)return this.manager.itemStart(t),setTimeout(()=>{e&&e(u),this.manager.itemEnd(t)},0),u;if(gi[t]!==void 0){gi[t].push({onLoad:e,onProgress:n,onError:a});return}gi[t]=[],gi[t].push({onLoad:e,onProgress:n,onError:a});const l=new Zt.window.Request(t,{headers:new Zt.window.Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),c=this.mimeType,f=this.responseType;fetch(l).then(d=>{if(d.status===200||d.status===0){if(d.status===0&&console.warn("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||d.body===void 0||d.body.getReader===void 0)return d;const y=gi[t],A=d.body.getReader(),_=d.headers.get("Content-Length")||d.headers.get("X-File-Size"),C=_?parseInt(_):0,F=C!==0;let N=0;const M=new ReadableStream({start(R){q();function q(){A.read().then(({done:z,value:w})=>{if(z)R.close();else{N+=w.byteLength;const L=new ProgressEvent("progress",{lengthComputable:F,loaded:N,total:C});for(let k=0,j=y.length;k<j;k++){const tt=y[k];tt.onProgress&&tt.onProgress(L)}R.enqueue(w),q()}})}}});return new Response(M)}else throw new f0(`fetch for "${d.url}" responded with ${d.status}: ${d.statusText}`,d)}).then(d=>{switch(f){case"arraybuffer":return d.arrayBuffer();case"blob":return d.blob();case"document":return d.text().then(y=>new DOMParser().parseFromString(y,c));case"json":return d.json();default:if(c===void 0)return d.text();{const A=/charset="?([^;"\s]*)"?/i.exec(c),_=A&&A[1]?A[1].toLowerCase():void 0,C=new TextDecoder(_);return d.arrayBuffer().then(F=>C.decode(F))}}}).then(d=>{xc.add(t,d);const y=gi[t];delete gi[t];for(let A=0,_=y.length;A<_;A++){const C=y[A];C.onLoad&&C.onLoad(d)}}).catch(d=>{const y=gi[t];if(y===void 0)throw this.manager.itemError(t),d;delete gi[t];for(let A=0,_=y.length;A<_;A++){const C=y[A];C.onError&&C.onError(d)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setMimeType(t){return this.mimeType=t,this}setResponseType(t){return this.responseType=t,this}}class Ac extends Ec{constructor(t){super(t)}load(t,e,n,a){const u=this,l=new p0(u.manager);l.setPath(u.path),l.setRequestHeader(u.requestHeader),l.setWithCredentials(u.withCredentials),l.load(t,function(c){try{e&&e(c)}catch(f){a?a(f):console.error(f),u.manager.itemError(t)}},n,a)}}const Kn="ae",bc="-",Ga="rm-assets",wc="rm-labels";function Gs(r){return r+bc+Vs.ASSETS}function Ya(r){return r+bc+Vs.LABELS}const d0={rm:["su-assets","su-labels","eq-assets","eq-labels","fn-assets","fn-labels"],su:[Ga,wc,"eq-assets","eq-labels","fn-assets","fn-labels"],eq:[Ga,wc,"su-assets","su-labels","fn-assets","fn-labels"]};function wo(r,t,e){const n=r==null?void 0:r.getAttribute(t);return n?Number(n):e}new re().makeScale(1,-1);function g0(r,t,e,n,a,u,l,c,f){let d=f*(Math.PI/180),y=Math.cos(d)*(r-e)/2+Math.sin(d)*(t-n)/2,A=-1*Math.sin(d)*(r-e)/2+Math.cos(d)*(t-n)/2,_=y*y/(l*l)+A*A/(c*c);_>1&&(l*=Math.sqrt(_),c*=Math.sqrt(_));let C=Math.sqrt((l*l*(c*c)-l*l*(A*A)-c*c*(y*y))/(l*l*(A*A)+c*c*(y*y)));a===u&&(C*=-1),isNaN(C)&&(C=0);let F=C*l*A/c,N=C*-c*y/l,M=(r+e)/2+Math.cos(d)*F-Math.sin(d)*N,R=(t+n)/2+Math.sin(d)*F+Math.cos(d)*N,q=function(Z){return Math.sqrt(Z[0]*Z[0]+Z[1]*Z[1])},z=function(Z,rt){return(Z[0]*rt[0]+Z[1]*rt[1])/(q(Z)*q(rt))},w=function(Z,rt){return(Z[0]*rt[1]<Z[1]*rt[0]?-1:1)*Math.acos(z(Z,rt))},L=w([1,0],[(y-F)/l,(A-N)/c]),k=[(y-F)/l,(A-N)/c],j=[(-1*y-F)/l,(-1*A-N)/c],tt=w(k,j);return z(k,j)<=-1&&(tt=Math.PI),z(k,j)>=1&&(tt=0),u===0&&tt>0&&(tt=tt-2*Math.PI),u===1&&tt<0&&(tt=tt+2*Math.PI),[M,R,l,c,L,tt,d,u]}const ie=" ";function y0(r){let t="";Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;e++){const n=r[e];if(n.type===H.CLOSE_PATH)t+="z";else if(n.type===H.HORIZ_LINE_TO)t+=(n.relative?"h":"H")+n.x;else if(n.type===H.VERT_LINE_TO)t+=(n.relative?"v":"V")+n.y;else if(n.type===H.MOVE_TO)t+=(n.relative?"m":"M")+n.x+ie+n.y;else if(n.type===H.LINE_TO)t+=(n.relative?"l":"L")+n.x+ie+n.y;else if(n.type===H.CURVE_TO)t+=(n.relative?"c":"C")+n.x1+ie+n.y1+ie+n.x2+ie+n.y2+ie+n.x+ie+n.y;else if(n.type===H.SMOOTH_CURVE_TO)t+=(n.relative?"s":"S")+n.x2+ie+n.y2+ie+n.x+ie+n.y;else if(n.type===H.QUAD_TO)t+=(n.relative?"q":"Q")+n.x1+ie+n.y1+ie+n.x+ie+n.y;else if(n.type===H.SMOOTH_QUAD_TO)t+=(n.relative?"t":"T")+n.x+ie+n.y;else if(n.type===H.ARC)t+=(n.relative?"a":"A")+n.rX+ie+n.rY+ie+n.xRot+ie+ +n.lArcFlag+ie+ +n.sweepFlag+ie+n.x+ie+n.y;else throw new Error(`Unexpected command type "${n==null?void 0:n.type}" at index ${e}.`)}return t}function To([r,t],e){return[r*Math.cos(e)-t*Math.sin(e),r*Math.sin(e)+t*Math.cos(e)]}function Lr(...r){for(let t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error(`assertNumbers arguments[${t}] is not a number. ${typeof r[t]} == typeof ${r[t]}`);return!0}const Ui=Math.PI;function _o(r,t,e){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;let{rX:n,rY:a}=r;const{x:u,y:l}=r;n=Math.abs(r.rX),a=Math.abs(r.rY);const[c,f]=To([(t-u)/2,(e-l)/2],-r.xRot/180*Ui),d=Math.pow(c,2)/Math.pow(n,2)+Math.pow(f,2)/Math.pow(a,2);1<d&&(n*=Math.sqrt(d),a*=Math.sqrt(d)),r.rX=n,r.rY=a;const y=Math.pow(n,2)*Math.pow(f,2)+Math.pow(a,2)*Math.pow(c,2),A=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(a,2)-y)/y)),_=n*f/a*A,C=-a*c/n*A,F=To([_,C],r.xRot/180*Ui);r.cX=F[0]+(t+u)/2,r.cY=F[1]+(e+l)/2,r.phi1=Math.atan2((f-C)/a,(c-_)/n),r.phi2=Math.atan2((-f-C)/a,(-c-_)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*Ui),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*Ui),r.phi1*=180/Ui,r.phi2*=180/Ui}function Tc(r,t,e){Lr(r,t,e);const n=r*r+t*t-e*e;if(0>n)return[];if(n===0)return[[r*e/(r*r+t*t),t*e/(r*r+t*t)]];const a=Math.sqrt(n);return[[(r*e+t*a)/(r*r+t*t),(t*e-r*a)/(r*r+t*t)],[(r*e-t*a)/(r*r+t*t),(t*e+r*a)/(r*r+t*t)]]}const yi=Math.PI/180;function _c(r,t,e){return(1-e)*r+e*t}function Cc(r,t,e,n){return r+Math.cos(n/180*Ui)*t+Math.sin(n/180*Ui)*e}function Dc(r,t,e,n){const u=t-r,l=e-t,c=n-e,f=3*u+3*c-6*l,d=(l-u)*6,y=3*u;return Math.abs(f)<1e-6?[-y/d]:v0(d/f,y/f,1e-6)}function Sc(r,t,e,n,a){const u=1-a,l=u*u*u,c=3*u*u*a,f=3*u*a*a,d=a*a*a;return r*l+t*c+e*f+n*d}function v0(r,t,e=1e-6){const n=r*r/4-t;if(n<-e)return[];if(n<=e)return[-r/2];const a=Math.sqrt(n);return[-(r/2)-a,-(r/2)+a]}function m0(r,t,e){r.cX||_o(r,t,e);const n=Math.min(r.phi1,r.phi2),a=Math.max(r.phi1,r.phi2),u=a-n,l=Math.ceil(u/90),c=new Array(l);let f=t,d=e;for(let y=0;y<l;y++){const A=_c(r.phi1,r.phi2,y/l),_=_c(r.phi1,r.phi2,(y+1)/l),C=_-A,F=4/3*Math.tan(C*yi/4),[N,M]=[Math.cos(A*yi)-F*Math.sin(A*yi),Math.sin(A*yi)+F*Math.cos(A*yi)],[R,q]=[Math.cos(_*yi),Math.sin(_*yi)],[z,w]=[R+F*Math.sin(_*yi),q-F*Math.cos(_*yi)],L={relative:r.relative,type:H.CURVE_TO},k=(j,tt)=>{const[Z,rt]=To([j*r.rX,tt*r.rY],r.xRot);return[r.cX+Z,r.cY+rt]};[L.x1,L.y1]=k(N,M),[L.x2,L.y2]=k(z,w),[L.x,L.y]=k(R,q),r.relative&&(L.x1-=f,L.y1-=d,L.x2-=f,L.y2-=d,L.x-=f,L.y-=d),[f,d]=[L.x,L.y],c[y]=L}return c}function x0(r=1e13){Lr(r);function t(e){return Math.round(e*r)/r}return function(n){return"x1"in n&&typeof n.x1<"u"&&(n.x1=t(n.x1)),"y1"in n&&typeof n.y1<"u"&&(n.y1=t(n.y1)),"x2"in n&&typeof n.x2<"u"&&(n.x2=t(n.x2)),"y2"in n&&typeof n.y2<"u"&&(n.y2=t(n.y2)),"x"in n&&typeof n.x<"u"&&(n.x=t(n.x)),"y"in n&&typeof n.y<"u"&&(n.y=t(n.y)),"rX"in n&&typeof n.rX<"u"&&(n.rX=t(n.rX)),"rY"in n&&typeof n.rY<"u"&&(n.rY=t(n.rY)),n}}function Oc(){return Pr((r,t,e)=>(r.relative&&(typeof r.x1<"u"&&(r.x1+=t),typeof r.y1<"u"&&(r.y1+=e),typeof r.x2<"u"&&(r.x2+=t),typeof r.y2<"u"&&(r.y2+=e),typeof r.x<"u"&&(r.x+=t),typeof r.y<"u"&&(r.y+=e),r.relative=!1),r))}function E0(){return Pr((r,t,e)=>(r.relative||(typeof r.x1<"u"&&(r.x1-=t),typeof r.y1<"u"&&(r.y1-=e),typeof r.x2<"u"&&(r.x2-=t),typeof r.y2<"u"&&(r.y2-=e),typeof r.x<"u"&&(r.x-=t),typeof r.y<"u"&&(r.y-=e),r.relative=!0),r))}function A0(r=!0,t=!0,e=!0){return Pr((n,a,u,l,c)=>{if(isNaN(l)&&!(n.type&H.MOVE_TO))throw new Error("path must start with moveto");return t&&n.type&H.HORIZ_LINE_TO&&(n.type=H.LINE_TO,n.y=n.relative?0:u),e&&n.type&H.VERT_LINE_TO&&(n.type=H.LINE_TO,n.x=n.relative?0:a),r&&n.type&H.CLOSE_PATH&&(n.type=H.LINE_TO,n.x=n.relative?l-a:l,n.y=n.relative?c-u:c),n.type&H.ARC&&(n.rX===0||n.rY===0)&&(n.type=H.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n})}function Nc(){let r=NaN,t=NaN,e=NaN,n=NaN;return Pr((a,u,l)=>(a.type&H.SMOOTH_CURVE_TO&&(a.type=H.CURVE_TO,r=isNaN(r)?u:r,t=isNaN(t)?l:t,a.x1=a.relative?u-r:2*u-r,a.y1=a.relative?l-t:2*l-t),a.type&H.CURVE_TO?(r=a.relative?u+a.x2:a.x2,t=a.relative?l+a.y2:a.y2):(r=NaN,t=NaN),a.type&H.SMOOTH_QUAD_TO&&(a.type=H.QUAD_TO,e=isNaN(e)?u:e,n=isNaN(n)?l:n,a.x1=a.relative?u-e:2*u-e,a.y1=a.relative?l-n:2*l-n),a.type&H.QUAD_TO?(e=a.relative?u+a.x1:a.x1,n=a.relative?l+a.y1:a.y1):(e=NaN,n=NaN),a))}function Mc(){let r=NaN,t=NaN;return Pr((e,n,a)=>{if(e.type&H.SMOOTH_QUAD_TO&&(e.type=H.QUAD_TO,r=isNaN(r)?n:r,t=isNaN(t)?a:t,e.x1=e.relative?n-r:2*n-r,e.y1=e.relative?a-t:2*a-t),e.type&H.QUAD_TO){r=e.relative?n+e.x1:e.x1,t=e.relative?a+e.y1:e.y1;const u=e.x1,l=e.y1;e.type=H.CURVE_TO,e.x1=((e.relative?0:n)+u*2)/3,e.y1=((e.relative?0:a)+l*2)/3,e.x2=(e.x+u*2)/3,e.y2=(e.y+l*2)/3}else r=NaN,t=NaN;return e})}function Pr(r){let t=0,e=0,n=NaN,a=NaN;return function(l){if(isNaN(n)&&!(l.type&H.MOVE_TO))throw new Error("path must start with moveto");const c=r(l,t,e,n,a);return l.type&H.CLOSE_PATH&&(t=n,e=a),"x"in l&&typeof l.x<"u"&&(t=l.relative?t+l.x:l.x),"y"in l&&typeof l.y<"u"&&(e=l.relative?e+l.y:l.y),l.type&H.MOVE_TO&&(n=t,a=e),c}}function b0(r=0){Lr(r);let t=NaN,e=NaN,n=NaN,a=NaN;return Pr((u,l,c,f,d)=>{const y=Math.abs;let A=!1,_=0,C=0;if(u.type&H.SMOOTH_CURVE_TO&&(_=isNaN(t)?0:l-t,C=isNaN(e)?0:c-e),u.type&(H.CURVE_TO|H.SMOOTH_CURVE_TO)?(t=u.relative?l+u.x2:u.x2,e=u.relative?c+u.y2:u.y2):(t=NaN,e=NaN),u.type&H.SMOOTH_QUAD_TO?(n=isNaN(n)?l:2*l-n,a=isNaN(a)?c:2*c-a):u.type&H.QUAD_TO?(n=u.relative?l+u.x1:u.x1,a=u.relative?c+u.y1:u.y2):(n=NaN,a=NaN),u.type&H.LINE_COMMANDS||u.type&H.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&H.CURVE_TO||u.type&H.SMOOTH_CURVE_TO||u.type&H.QUAD_TO||u.type&H.SMOOTH_QUAD_TO){const F=typeof u.x>"u"?0:u.relative?u.x:u.x-l,N=typeof u.y>"u"?0:u.relative?u.y:u.y-c;_=isNaN(n)?typeof u.x1>"u"?_:u.relative?u.x:u.x1-l:n-l,C=isNaN(a)?typeof u.y1>"u"?C:u.relative?u.y:u.y1-c:a-c;const M=typeof u.x2>"u"?0:u.relative?u.x:u.x2-l,R=typeof u.y2>"u"?0:u.relative?u.y:u.y2-c;y(F)<=r&&y(N)<=r&&y(_)<=r&&y(C)<=r&&y(M)<=r&&y(R)<=r&&(A=!0)}return u.type&H.CLOSE_PATH&&y(l-f)<=r&&y(c-d)<=r&&(A=!0),A?[]:u})}function ki(r,t,e,n,a,u){return Lr(r,t,e,n,a,u),Pr((l,c,f,d)=>{const y=l.x1,A=l.x2,_=l.relative&&!isNaN(d),C=typeof l.x<"u"?l.x:_?0:c,F=typeof l.y<"u"?l.y:_?0:f;l.type&H.HORIZ_LINE_TO&&t!==0&&(l.type=H.LINE_TO,l.y=l.relative?0:f),l.type&H.VERT_LINE_TO&&e!==0&&(l.type=H.LINE_TO,l.x=l.relative?0:c),typeof l.x<"u"&&(l.x=l.x*r+F*e+(_?0:a)),typeof l.y<"u"&&(l.y=C*t+l.y*n+(_?0:u)),typeof l.x1<"u"&&(l.x1=l.x1*r+l.y1*e+(_?0:a)),typeof l.y1<"u"&&(l.y1=y*t+l.y1*n+(_?0:u)),typeof l.x2<"u"&&(l.x2=l.x2*r+l.y2*e+(_?0:a)),typeof l.y2<"u"&&(l.y2=A*t+l.y2*n+(_?0:u));function N(R){return R*R}const M=r*n-t*e;if(typeof l.xRot<"u"&&(r!==1||t!==0||e!==0||n!==1))if(M===0)delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag,l.type=H.LINE_TO;else{const R=l.xRot*Math.PI/180,q=Math.sin(R),z=Math.cos(R),w=1/N(l.rX),L=1/N(l.rY),k=N(z)*w+N(q)*L,j=2*q*z*(w-L),tt=N(q)*w+N(z)*L,Z=k*n*n-j*t*n+tt*t*t,rt=j*(r*n+t*e)-2*(k*e*n+tt*r*t),J=k*e*e-j*r*e+tt*r*r,st=(Math.atan2(rt,Z-J)+Math.PI)%Math.PI/2,ht=Math.sin(st),ct=Math.cos(st);l.rX=Math.abs(M)/Math.sqrt(Z*N(ct)+rt*ht*ct+J*N(ht)),l.rY=Math.abs(M)/Math.sqrt(Z*N(ht)-rt*ht*ct+J*N(ct)),l.xRot=st*180/Math.PI}return typeof l.sweepFlag<"u"&&0>M&&(l.sweepFlag=+!l.sweepFlag),l})}function w0(r,t=0,e=0){Lr(r,t,e);const n=Math.sin(r),a=Math.cos(r);return ki(a,n,-n,a,t-t*a+e*n,e-t*n-e*a)}function T0(r,t=0){return Lr(r,t),ki(1,0,0,1,r,t)}function _0(r,t=r){return Lr(r,t),ki(r,0,0,t,0,0)}function C0(r){return Lr(r),ki(1,0,Math.atan(r),1,0,0)}function D0(r){return Lr(r),ki(1,Math.atan(r),0,1,0,0)}function S0(r=0){return Lr(r),ki(-1,0,0,1,r,0)}function O0(r=0){return Lr(r),ki(1,0,0,-1,0,r)}function N0(){return Pr((r,t,e)=>H.ARC===r.type?m0(r,r.relative?0:t,r.relative?0:e):r)}function M0(){return Pr((r,t,e)=>(r.relative&&(t=0,e=0),H.ARC===r.type&&_o(r,t,e),r))}function Bc(){return r=>({...r})}function B0(){const r=Bc(),t=Oc(),e=Mc(),n=Nc(),a=Pr((u,l,c)=>{const f=n(e(t(r(u))));function d(A){A>a.maxX&&(a.maxX=A),A<a.minX&&(a.minX=A)}function y(A){A>a.maxY&&(a.maxY=A),A<a.minY&&(a.minY=A)}if(f.type&H.DRAWING_COMMANDS&&(d(l),y(c)),f.type&H.HORIZ_LINE_TO&&d(f.x),f.type&H.VERT_LINE_TO&&y(f.y),f.type&H.LINE_TO&&(d(f.x),y(f.y)),f.type&H.CURVE_TO){d(f.x),y(f.y);const A=Dc(l,f.x1,f.x2,f.x);for(const C of A)0<C&&1>C&&d(Sc(l,f.x1,f.x2,f.x,C));const _=Dc(c,f.y1,f.y2,f.y);for(const C of _)0<C&&1>C&&y(Sc(c,f.y1,f.y2,f.y,C))}if(f.type&H.ARC){d(f.x),y(f.y),_o(f,l,c);const A=f.xRot/180*Math.PI,_=Math.cos(A)*f.rX,C=Math.sin(A)*f.rX,F=-Math.sin(A)*f.rY,N=Math.cos(A)*f.rY,[M,R]=f.phi1<f.phi2?[f.phi1,f.phi2]:-180>f.phi2?[f.phi2+360,f.phi1+360]:[f.phi2,f.phi1],q=([L,k])=>{const tt=Math.atan2(k,L)*180/Math.PI;return tt<M?tt+360:tt},z=Tc(F,-_,0).map(q);for(const L of z)L>M&&L<R&&d(Cc(f.cX,_,F,L));const w=Tc(N,-C,0).map(q);for(const L of w)L>M&&L<R&&y(Cc(f.cY,C,N,L))}return u});return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}const ye={ROUND:x0,TO_ABS:Oc,TO_REL:E0,NORMALIZE_HVZ:A0,NORMALIZE_ST:Nc,QT_TO_C:Mc,INFO:Pr,SANITIZE:b0,MATRIX:ki,ROTATE:w0,TRANSLATE:T0,SCALE:_0,SKEW_X:C0,SKEW_Y:D0,X_AXIS_SYMMETRY:S0,Y_AXIS_SYMMETRY:O0,A_TO_C:N0,ANNOTATE_ARCS:M0,CLONE:Bc,CALCULATE_BOUNDS:B0};let Ic=class{round(t){return this.transform(ye.ROUND(t))}toAbs(){return this.transform(ye.TO_ABS())}toRel(){return this.transform(ye.TO_REL())}normalizeHVZ(t,e,n){return this.transform(ye.NORMALIZE_HVZ(t,e,n))}normalizeST(){return this.transform(ye.NORMALIZE_ST())}qtToC(){return this.transform(ye.QT_TO_C())}aToC(){return this.transform(ye.A_TO_C())}sanitize(t){return this.transform(ye.SANITIZE(t))}translate(t,e){return this.transform(ye.TRANSLATE(t,e))}scale(t,e){return this.transform(ye.SCALE(t,e))}rotate(t,e,n){return this.transform(ye.ROTATE(t,e,n))}matrix(t,e,n,a,u,l){return this.transform(ye.MATRIX(t,e,n,a,u,l))}skewX(t){return this.transform(ye.SKEW_X(t))}skewY(t){return this.transform(ye.SKEW_Y(t))}xSymmetry(t){return this.transform(ye.X_AXIS_SYMMETRY(t))}ySymmetry(t){return this.transform(ye.Y_AXIS_SYMMETRY(t))}annotateArcs(){return this.transform(ye.ANNOTATE_ARCS())}};const I0=r=>r===" "||r===" "||r==="\r"||r===`
33
+ `,Rc=r=>48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57;let R0=class extends Ic{curNumber="";curCommandType=-1;curCommandRelative=!1;canParseCommandOrComma=!0;curNumberHasExp=!1;curNumberHasExpDigits=!1;curNumberHasDecimal=!1;curArgs=[];constructor(){super()}finish(t=[]){if(this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t}parse(t,e=[]){const n=a=>{e.push(a),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let a=0;a<t.length;a++){const u=t[a],l=this.curCommandType===H.ARC&&(this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber.length===1&&(this.curNumber==="0"||this.curNumber==="1"),c=Rc(u)&&(this.curNumber==="0"&&u==="0"||l);if(Rc(u)&&!c){this.curNumber+=u,this.curNumberHasExpDigits=this.curNumberHasExp;continue}if(u==="e"||u==="E"){this.curNumber+=u,this.curNumberHasExp=!0;continue}if((u==="-"||u==="+")&&this.curNumberHasExp&&!this.curNumberHasExpDigits){this.curNumber+=u;continue}if(u==="."&&!this.curNumberHasExp&&!this.curNumberHasDecimal&&!l){this.curNumber+=u,this.curNumberHasDecimal=!0;continue}if(this.curNumber&&this.curCommandType!==-1){const f=Number(this.curNumber);if(isNaN(f))throw new SyntaxError(`Invalid number ending at ${a}`);if(this.curCommandType===H.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>f)throw new SyntaxError(`Expected positive number, got "${f}" at index "${a}"`)}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${a}"`)}this.curArgs.push(f),this.curArgs.length===L0[this.curCommandType]&&(H.HORIZ_LINE_TO===this.curCommandType?n({type:H.HORIZ_LINE_TO,relative:this.curCommandRelative,x:f}):H.VERT_LINE_TO===this.curCommandType?n({type:H.VERT_LINE_TO,relative:this.curCommandRelative,y:f}):this.curCommandType===H.MOVE_TO||this.curCommandType===H.LINE_TO||this.curCommandType===H.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),H.MOVE_TO===this.curCommandType&&(this.curCommandType=H.LINE_TO)):this.curCommandType===H.CURVE_TO?n({type:H.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===H.SMOOTH_CURVE_TO?n({type:H.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===H.QUAD_TO?n({type:H.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===H.ARC&&n({type:H.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!I0(u)){if(u===","&&this.canParseCommandOrComma){this.canParseCommandOrComma=!1;continue}if(u==="+"||u==="-"||u==="."){this.curNumber=u,this.curNumberHasDecimal=u===".";continue}if(c){this.curNumber=u,this.curNumberHasDecimal=!1;continue}if(this.curArgs.length!==0)throw new SyntaxError(`Unterminated command at index ${a}.`);if(!this.canParseCommandOrComma)throw new SyntaxError(`Unexpected character "${u}" at index ${a}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,u==="z"||u==="Z"){e.push({type:H.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;continue}else if(u==="h"||u==="H")this.curCommandType=H.HORIZ_LINE_TO,this.curCommandRelative=u==="h";else if(u==="v"||u==="V")this.curCommandType=H.VERT_LINE_TO,this.curCommandRelative=u==="v";else if(u==="m"||u==="M")this.curCommandType=H.MOVE_TO,this.curCommandRelative=u==="m";else if(u==="l"||u==="L")this.curCommandType=H.LINE_TO,this.curCommandRelative=u==="l";else if(u==="c"||u==="C")this.curCommandType=H.CURVE_TO,this.curCommandRelative=u==="c";else if(u==="s"||u==="S")this.curCommandType=H.SMOOTH_CURVE_TO,this.curCommandRelative=u==="s";else if(u==="q"||u==="Q")this.curCommandType=H.QUAD_TO,this.curCommandRelative=u==="q";else if(u==="t"||u==="T")this.curCommandType=H.SMOOTH_QUAD_TO,this.curCommandRelative=u==="t";else if(u==="a"||u==="A")this.curCommandType=H.ARC,this.curCommandRelative=u==="a";else throw new SyntaxError(`Unexpected character "${u}" at index ${a}.`)}}return e}transform(t){return Object.create(this,{parse:{value(n,a=[]){const u=Object.getPrototypeOf(this).parse.call(this,n);for(const l of u){const c=t(l);Array.isArray(c)?a.push(...c):a.push(c)}return a}}})}},H=class tr extends Ic{commands;constructor(t){super(),typeof t=="string"?this.commands=tr.parse(t):this.commands=t}encode(){return tr.encode(this.commands)}getBounds(){const t=ye.CALCULATE_BOUNDS();return this.transform(t),t}transform(t){const e=[];for(const n of this.commands){const a=t(n);Array.isArray(a)?e.push(...a):e.push(a)}return this.commands=e,this}static encode(t){return y0(t)}static parse(t){const e=new R0,n=[];return e.parse(t,n),e.finish(n),n}static CLOSE_PATH=1;static MOVE_TO=2;static HORIZ_LINE_TO=4;static VERT_LINE_TO=8;static LINE_TO=16;static CURVE_TO=32;static SMOOTH_CURVE_TO=64;static QUAD_TO=128;static SMOOTH_QUAD_TO=256;static ARC=512;static LINE_COMMANDS=tr.LINE_TO|tr.HORIZ_LINE_TO|tr.VERT_LINE_TO;static DRAWING_COMMANDS=tr.HORIZ_LINE_TO|tr.VERT_LINE_TO|tr.LINE_TO|tr.CURVE_TO|tr.SMOOTH_CURVE_TO|tr.QUAD_TO|tr.SMOOTH_QUAD_TO|tr.ARC};const L0={[H.MOVE_TO]:2,[H.LINE_TO]:2,[H.HORIZ_LINE_TO]:1,[H.VERT_LINE_TO]:1,[H.CLOSE_PATH]:0,[H.QUAD_TO]:4,[H.SMOOTH_QUAD_TO]:2,[H.CURVE_TO]:6,[H.SMOOTH_CURVE_TO]:4,[H.ARC]:7},ne=" ";function P0(r){let t="";Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;e++){const n=r[e];if(n.type===X.CLOSE_PATH)t+="z";else if(n.type===X.HORIZ_LINE_TO)t+=(n.relative?"h":"H")+n.x;else if(n.type===X.VERT_LINE_TO)t+=(n.relative?"v":"V")+n.y;else if(n.type===X.MOVE_TO)t+=(n.relative?"m":"M")+n.x+ne+n.y;else if(n.type===X.LINE_TO)t+=(n.relative?"l":"L")+n.x+ne+n.y;else if(n.type===X.CURVE_TO)t+=(n.relative?"c":"C")+n.x1+ne+n.y1+ne+n.x2+ne+n.y2+ne+n.x+ne+n.y;else if(n.type===X.SMOOTH_CURVE_TO)t+=(n.relative?"s":"S")+n.x2+ne+n.y2+ne+n.x+ne+n.y;else if(n.type===X.QUAD_TO)t+=(n.relative?"q":"Q")+n.x1+ne+n.y1+ne+n.x+ne+n.y;else if(n.type===X.SMOOTH_QUAD_TO)t+=(n.relative?"t":"T")+n.x+ne+n.y;else if(n.type===X.ARC)t+=(n.relative?"a":"A")+n.rX+ne+n.rY+ne+n.xRot+ne+ +n.lArcFlag+ne+ +n.sweepFlag+ne+n.x+ne+n.y;else throw new Error(`Unexpected command type "${n==null?void 0:n.type}" at index ${e}.`)}return t}class Lc{round(t){return this.transform(ce.ROUND(t))}toAbs(){return this.transform(ce.TO_ABS())}toRel(){return this.transform(ce.TO_REL())}normalizeHVZ(t,e,n){return this.transform(ce.NORMALIZE_HVZ(t,e,n))}normalizeST(){return this.transform(ce.NORMALIZE_ST())}qtToC(){return this.transform(ce.QT_TO_C())}aToC(){return this.transform(ce.A_TO_C())}sanitize(t){return this.transform(ce.SANITIZE(t))}translate(t,e){return this.transform(ce.TRANSLATE(t,e))}scale(t,e){return this.transform(ce.SCALE(t,e))}rotate(t,e,n){return this.transform(ce.ROTATE(t,e,n))}matrix(t,e,n,a,u,l){return this.transform(ce.MATRIX(t,e,n,a,u,l))}skewX(t){return this.transform(ce.SKEW_X(t))}skewY(t){return this.transform(ce.SKEW_Y(t))}xSymmetry(t){return this.transform(ce.X_AXIS_SYMMETRY(t))}ySymmetry(t){return this.transform(ce.Y_AXIS_SYMMETRY(t))}annotateArcs(){return this.transform(ce.ANNOTATE_ARCS())}}const F0=r=>r===" "||r===" "||r==="\r"||r===`
34
+ `,Pc=r=>48<=r.charCodeAt(0)&&r.charCodeAt(0)<=57;class U0 extends Lc{constructor(){super(),this.curNumber="",this.curCommandType=-1,this.curCommandRelative=!1,this.canParseCommandOrComma=!0,this.curNumberHasExp=!1,this.curNumberHasExpDigits=!1,this.curNumberHasDecimal=!1,this.curArgs=[]}finish(t=[]){if(this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t}parse(t,e=[]){const n=a=>{e.push(a),this.curArgs.length=0,this.canParseCommandOrComma=!0};for(let a=0;a<t.length;a++){const u=t[a],l=this.curCommandType===X.ARC&&(this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber.length===1&&(this.curNumber==="0"||this.curNumber==="1"),c=Pc(u)&&(this.curNumber==="0"&&u==="0"||l);if(Pc(u)&&!c){this.curNumber+=u,this.curNumberHasExpDigits=this.curNumberHasExp;continue}if(u==="e"||u==="E"){this.curNumber+=u,this.curNumberHasExp=!0;continue}if((u==="-"||u==="+")&&this.curNumberHasExp&&!this.curNumberHasExpDigits){this.curNumber+=u;continue}if(u==="."&&!this.curNumberHasExp&&!this.curNumberHasDecimal&&!l){this.curNumber+=u,this.curNumberHasDecimal=!0;continue}if(this.curNumber&&this.curCommandType!==-1){const f=Number(this.curNumber);if(isNaN(f))throw new SyntaxError(`Invalid number ending at ${a}`);if(this.curCommandType===X.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>f)throw new SyntaxError(`Expected positive number, got "${f}" at index "${a}"`)}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${a}"`)}this.curArgs.push(f),this.curArgs.length===k0[this.curCommandType]&&(X.HORIZ_LINE_TO===this.curCommandType?n({type:X.HORIZ_LINE_TO,relative:this.curCommandRelative,x:f}):X.VERT_LINE_TO===this.curCommandType?n({type:X.VERT_LINE_TO,relative:this.curCommandRelative,y:f}):this.curCommandType===X.MOVE_TO||this.curCommandType===X.LINE_TO||this.curCommandType===X.SMOOTH_QUAD_TO?(n({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),X.MOVE_TO===this.curCommandType&&(this.curCommandType=X.LINE_TO)):this.curCommandType===X.CURVE_TO?n({type:X.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===X.SMOOTH_CURVE_TO?n({type:X.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===X.QUAD_TO?n({type:X.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===X.ARC&&n({type:X.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!F0(u)){if(u===","&&this.canParseCommandOrComma){this.canParseCommandOrComma=!1;continue}if(u==="+"||u==="-"||u==="."){this.curNumber=u,this.curNumberHasDecimal=u===".";continue}if(c){this.curNumber=u,this.curNumberHasDecimal=!1;continue}if(this.curArgs.length!==0)throw new SyntaxError(`Unterminated command at index ${a}.`);if(!this.canParseCommandOrComma)throw new SyntaxError(`Unexpected character "${u}" at index ${a}. Command cannot follow comma`);if(this.canParseCommandOrComma=!1,u==="z"||u==="Z"){e.push({type:X.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1;continue}else if(u==="h"||u==="H")this.curCommandType=X.HORIZ_LINE_TO,this.curCommandRelative=u==="h";else if(u==="v"||u==="V")this.curCommandType=X.VERT_LINE_TO,this.curCommandRelative=u==="v";else if(u==="m"||u==="M")this.curCommandType=X.MOVE_TO,this.curCommandRelative=u==="m";else if(u==="l"||u==="L")this.curCommandType=X.LINE_TO,this.curCommandRelative=u==="l";else if(u==="c"||u==="C")this.curCommandType=X.CURVE_TO,this.curCommandRelative=u==="c";else if(u==="s"||u==="S")this.curCommandType=X.SMOOTH_CURVE_TO,this.curCommandRelative=u==="s";else if(u==="q"||u==="Q")this.curCommandType=X.QUAD_TO,this.curCommandRelative=u==="q";else if(u==="t"||u==="T")this.curCommandType=X.SMOOTH_QUAD_TO,this.curCommandRelative=u==="t";else if(u==="a"||u==="A")this.curCommandType=X.ARC,this.curCommandRelative=u==="a";else throw new SyntaxError(`Unexpected character "${u}" at index ${a}.`)}}return e}transform(t){return Object.create(this,{parse:{value(n,a=[]){const u=Object.getPrototypeOf(this).parse.call(this,n);for(const l of u){const c=t(l);Array.isArray(c)?a.push(...c):a.push(c)}return a}}})}}const Ft=class Ft extends Lc{constructor(t){super(),typeof t=="string"?this.commands=Ft.parse(t):this.commands=t}encode(){return Ft.encode(this.commands)}getBounds(){const t=ce.CALCULATE_BOUNDS();return this.transform(t),t}transform(t){const e=[];for(const n of this.commands){const a=t(n);Array.isArray(a)?e.push(...a):e.push(a)}return this.commands=e,this}static encode(t){return P0(t)}static parse(t){const e=new U0,n=[];return e.parse(t,n),e.finish(n),n}};Ft.CLOSE_PATH=1,Ft.MOVE_TO=2,Ft.HORIZ_LINE_TO=4,Ft.VERT_LINE_TO=8,Ft.LINE_TO=16,Ft.CURVE_TO=32,Ft.SMOOTH_CURVE_TO=64,Ft.QUAD_TO=128,Ft.SMOOTH_QUAD_TO=256,Ft.ARC=512,Ft.LINE_COMMANDS=Ft.LINE_TO|Ft.HORIZ_LINE_TO|Ft.VERT_LINE_TO,Ft.DRAWING_COMMANDS=Ft.HORIZ_LINE_TO|Ft.VERT_LINE_TO|Ft.LINE_TO|Ft.CURVE_TO|Ft.SMOOTH_CURVE_TO|Ft.QUAD_TO|Ft.SMOOTH_QUAD_TO|Ft.ARC;let X=Ft;const k0={[X.MOVE_TO]:2,[X.LINE_TO]:2,[X.HORIZ_LINE_TO]:1,[X.VERT_LINE_TO]:1,[X.CLOSE_PATH]:0,[X.QUAD_TO]:4,[X.SMOOTH_QUAD_TO]:2,[X.CURVE_TO]:6,[X.SMOOTH_CURVE_TO]:4,[X.ARC]:7};function Co([r,t],e){return[r*Math.cos(e)-t*Math.sin(e),r*Math.sin(e)+t*Math.cos(e)]}function Fr(...r){for(let t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error(`assertNumbers arguments[${t}] is not a number. ${typeof r[t]} == typeof ${r[t]}`);return!0}const Hi=Math.PI;function Do(r,t,e){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;let{rX:n,rY:a}=r;const{x:u,y:l}=r;n=Math.abs(r.rX),a=Math.abs(r.rY);const[c,f]=Co([(t-u)/2,(e-l)/2],-r.xRot/180*Hi),d=Math.pow(c,2)/Math.pow(n,2)+Math.pow(f,2)/Math.pow(a,2);1<d&&(n*=Math.sqrt(d),a*=Math.sqrt(d)),r.rX=n,r.rY=a;const y=Math.pow(n,2)*Math.pow(f,2)+Math.pow(a,2)*Math.pow(c,2),A=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(a,2)-y)/y)),_=n*f/a*A,C=-a*c/n*A,F=Co([_,C],r.xRot/180*Hi);r.cX=F[0]+(t+u)/2,r.cY=F[1]+(e+l)/2,r.phi1=Math.atan2((f-C)/a,(c-_)/n),r.phi2=Math.atan2((-f-C)/a,(-c-_)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*Hi),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*Hi),r.phi1*=180/Hi,r.phi2*=180/Hi}function Fc(r,t,e){Fr(r,t,e);const n=r*r+t*t-e*e;if(0>n)return[];if(n===0)return[[r*e/(r*r+t*t),t*e/(r*r+t*t)]];const a=Math.sqrt(n);return[[(r*e+t*a)/(r*r+t*t),(t*e-r*a)/(r*r+t*t)],[(r*e-t*a)/(r*r+t*t),(t*e+r*a)/(r*r+t*t)]]}const vi=Math.PI/180;function Uc(r,t,e){return(1-e)*r+e*t}function kc(r,t,e,n){return r+Math.cos(n/180*Hi)*t+Math.sin(n/180*Hi)*e}function Hc(r,t,e,n){const u=t-r,l=e-t,c=n-e,f=3*u+3*c-6*l,d=(l-u)*6,y=3*u;return Math.abs(f)<1e-6?[-y/d]:H0(d/f,y/f,1e-6)}function qc(r,t,e,n,a){const u=1-a,l=u*u*u,c=3*u*u*a,f=3*u*a*a,d=a*a*a;return r*l+t*c+e*f+n*d}function H0(r,t,e=1e-6){const n=r*r/4-t;if(n<-e)return[];if(n<=e)return[-r/2];const a=Math.sqrt(n);return[-(r/2)-a,-(r/2)+a]}function q0(r,t,e){r.cX||Do(r,t,e);const n=Math.min(r.phi1,r.phi2),a=Math.max(r.phi1,r.phi2),u=a-n,l=Math.ceil(u/90),c=new Array(l);let f=t,d=e;for(let y=0;y<l;y++){const A=Uc(r.phi1,r.phi2,y/l),_=Uc(r.phi1,r.phi2,(y+1)/l),C=_-A,F=4/3*Math.tan(C*vi/4),[N,M]=[Math.cos(A*vi)-F*Math.sin(A*vi),Math.sin(A*vi)+F*Math.cos(A*vi)],[R,q]=[Math.cos(_*vi),Math.sin(_*vi)],[z,w]=[R+F*Math.sin(_*vi),q-F*Math.cos(_*vi)],L={relative:r.relative,type:X.CURVE_TO},k=(j,tt)=>{const[Z,rt]=Co([j*r.rX,tt*r.rY],r.xRot);return[r.cX+Z,r.cY+rt]};[L.x1,L.y1]=k(N,M),[L.x2,L.y2]=k(z,w),[L.x,L.y]=k(R,q),r.relative&&(L.x1-=f,L.y1-=d,L.x2-=f,L.y2-=d,L.x-=f,L.y-=d),[f,d]=[L.x,L.y],c[y]=L}return c}function W0(r=1e13){Fr(r);function t(e){return Math.round(e*r)/r}return function(n){return"x1"in n&&typeof n.x1<"u"&&(n.x1=t(n.x1)),"y1"in n&&typeof n.y1<"u"&&(n.y1=t(n.y1)),"x2"in n&&typeof n.x2<"u"&&(n.x2=t(n.x2)),"y2"in n&&typeof n.y2<"u"&&(n.y2=t(n.y2)),"x"in n&&typeof n.x<"u"&&(n.x=t(n.x)),"y"in n&&typeof n.y<"u"&&(n.y=t(n.y)),"rX"in n&&typeof n.rX<"u"&&(n.rX=t(n.rX)),"rY"in n&&typeof n.rY<"u"&&(n.rY=t(n.rY)),n}}function Wc(){return Ur((r,t,e)=>(r.relative&&(typeof r.x1<"u"&&(r.x1+=t),typeof r.y1<"u"&&(r.y1+=e),typeof r.x2<"u"&&(r.x2+=t),typeof r.y2<"u"&&(r.y2+=e),typeof r.x<"u"&&(r.x+=t),typeof r.y<"u"&&(r.y+=e),r.relative=!1),r))}function V0(){return Ur((r,t,e)=>(r.relative||(typeof r.x1<"u"&&(r.x1-=t),typeof r.y1<"u"&&(r.y1-=e),typeof r.x2<"u"&&(r.x2-=t),typeof r.y2<"u"&&(r.y2-=e),typeof r.x<"u"&&(r.x-=t),typeof r.y<"u"&&(r.y-=e),r.relative=!0),r))}function $0(r=!0,t=!0,e=!0){return Ur((n,a,u,l,c)=>{if(isNaN(l)&&!(n.type&X.MOVE_TO))throw new Error("path must start with moveto");return t&&n.type&X.HORIZ_LINE_TO&&(n.type=X.LINE_TO,n.y=n.relative?0:u),e&&n.type&X.VERT_LINE_TO&&(n.type=X.LINE_TO,n.x=n.relative?0:a),r&&n.type&X.CLOSE_PATH&&(n.type=X.LINE_TO,n.x=n.relative?l-a:l,n.y=n.relative?c-u:c),n.type&X.ARC&&(n.rX===0||n.rY===0)&&(n.type=X.LINE_TO,delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag),n})}function Vc(){let r=NaN,t=NaN,e=NaN,n=NaN;return Ur((a,u,l)=>(a.type&X.SMOOTH_CURVE_TO&&(a.type=X.CURVE_TO,r=isNaN(r)?u:r,t=isNaN(t)?l:t,a.x1=a.relative?u-r:2*u-r,a.y1=a.relative?l-t:2*l-t),a.type&X.CURVE_TO?(r=a.relative?u+a.x2:a.x2,t=a.relative?l+a.y2:a.y2):(r=NaN,t=NaN),a.type&X.SMOOTH_QUAD_TO&&(a.type=X.QUAD_TO,e=isNaN(e)?u:e,n=isNaN(n)?l:n,a.x1=a.relative?u-e:2*u-e,a.y1=a.relative?l-n:2*l-n),a.type&X.QUAD_TO?(e=a.relative?u+a.x1:a.x1,n=a.relative?l+a.y1:a.y1):(e=NaN,n=NaN),a))}function $c(){let r=NaN,t=NaN;return Ur((e,n,a)=>{if(e.type&X.SMOOTH_QUAD_TO&&(e.type=X.QUAD_TO,r=isNaN(r)?n:r,t=isNaN(t)?a:t,e.x1=e.relative?n-r:2*n-r,e.y1=e.relative?a-t:2*a-t),e.type&X.QUAD_TO){r=e.relative?n+e.x1:e.x1,t=e.relative?a+e.y1:e.y1;const u=e.x1,l=e.y1;e.type=X.CURVE_TO,e.x1=((e.relative?0:n)+u*2)/3,e.y1=((e.relative?0:a)+l*2)/3,e.x2=(e.x+u*2)/3,e.y2=(e.y+l*2)/3}else r=NaN,t=NaN;return e})}function Ur(r){let t=0,e=0,n=NaN,a=NaN;return function(l){if(isNaN(n)&&!(l.type&X.MOVE_TO))throw new Error("path must start with moveto");const c=r(l,t,e,n,a);return l.type&X.CLOSE_PATH&&(t=n,e=a),"x"in l&&typeof l.x<"u"&&(t=l.relative?t+l.x:l.x),"y"in l&&typeof l.y<"u"&&(e=l.relative?e+l.y:l.y),l.type&X.MOVE_TO&&(n=t,a=e),c}}function z0(r=0){Fr(r);let t=NaN,e=NaN,n=NaN,a=NaN;return Ur((u,l,c,f,d)=>{const y=Math.abs;let A=!1,_=0,C=0;if(u.type&X.SMOOTH_CURVE_TO&&(_=isNaN(t)?0:l-t,C=isNaN(e)?0:c-e),u.type&(X.CURVE_TO|X.SMOOTH_CURVE_TO)?(t=u.relative?l+u.x2:u.x2,e=u.relative?c+u.y2:u.y2):(t=NaN,e=NaN),u.type&X.SMOOTH_QUAD_TO?(n=isNaN(n)?l:2*l-n,a=isNaN(a)?c:2*c-a):u.type&X.QUAD_TO?(n=u.relative?l+u.x1:u.x1,a=u.relative?c+u.y1:u.y2):(n=NaN,a=NaN),u.type&X.LINE_COMMANDS||u.type&X.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&X.CURVE_TO||u.type&X.SMOOTH_CURVE_TO||u.type&X.QUAD_TO||u.type&X.SMOOTH_QUAD_TO){const F=typeof u.x>"u"?0:u.relative?u.x:u.x-l,N=typeof u.y>"u"?0:u.relative?u.y:u.y-c;_=isNaN(n)?typeof u.x1>"u"?_:u.relative?u.x:u.x1-l:n-l,C=isNaN(a)?typeof u.y1>"u"?C:u.relative?u.y:u.y1-c:a-c;const M=typeof u.x2>"u"?0:u.relative?u.x:u.x2-l,R=typeof u.y2>"u"?0:u.relative?u.y:u.y2-c;y(F)<=r&&y(N)<=r&&y(_)<=r&&y(C)<=r&&y(M)<=r&&y(R)<=r&&(A=!0)}return u.type&X.CLOSE_PATH&&y(l-f)<=r&&y(c-d)<=r&&(A=!0),A?[]:u})}function qi(r,t,e,n,a,u){return Fr(r,t,e,n,a,u),Ur((l,c,f,d)=>{const y=l.x1,A=l.x2,_=l.relative&&!isNaN(d),C=typeof l.x<"u"?l.x:_?0:c,F=typeof l.y<"u"?l.y:_?0:f;l.type&X.HORIZ_LINE_TO&&t!==0&&(l.type=X.LINE_TO,l.y=l.relative?0:f),l.type&X.VERT_LINE_TO&&e!==0&&(l.type=X.LINE_TO,l.x=l.relative?0:c),typeof l.x<"u"&&(l.x=l.x*r+F*e+(_?0:a)),typeof l.y<"u"&&(l.y=C*t+l.y*n+(_?0:u)),typeof l.x1<"u"&&(l.x1=l.x1*r+l.y1*e+(_?0:a)),typeof l.y1<"u"&&(l.y1=y*t+l.y1*n+(_?0:u)),typeof l.x2<"u"&&(l.x2=l.x2*r+l.y2*e+(_?0:a)),typeof l.y2<"u"&&(l.y2=A*t+l.y2*n+(_?0:u));function N(R){return R*R}const M=r*n-t*e;if(typeof l.xRot<"u"&&(r!==1||t!==0||e!==0||n!==1))if(M===0)delete l.rX,delete l.rY,delete l.xRot,delete l.lArcFlag,delete l.sweepFlag,l.type=X.LINE_TO;else{const R=l.xRot*Math.PI/180,q=Math.sin(R),z=Math.cos(R),w=1/N(l.rX),L=1/N(l.rY),k=N(z)*w+N(q)*L,j=2*q*z*(w-L),tt=N(q)*w+N(z)*L,Z=k*n*n-j*t*n+tt*t*t,rt=j*(r*n+t*e)-2*(k*e*n+tt*r*t),J=k*e*e-j*r*e+tt*r*r,st=(Math.atan2(rt,Z-J)+Math.PI)%Math.PI/2,ht=Math.sin(st),ct=Math.cos(st);l.rX=Math.abs(M)/Math.sqrt(Z*N(ct)+rt*ht*ct+J*N(ht)),l.rY=Math.abs(M)/Math.sqrt(Z*N(ht)-rt*ht*ct+J*N(ct)),l.xRot=st*180/Math.PI}return typeof l.sweepFlag<"u"&&0>M&&(l.sweepFlag=+!l.sweepFlag),l})}function G0(r,t=0,e=0){Fr(r,t,e);const n=Math.sin(r),a=Math.cos(r);return qi(a,n,-n,a,t-t*a+e*n,e-t*n-e*a)}function Y0(r,t=0){return Fr(r,t),qi(1,0,0,1,r,t)}function X0(r,t=r){return Fr(r,t),qi(r,0,0,t,0,0)}function Z0(r){return Fr(r),qi(1,0,Math.atan(r),1,0,0)}function Q0(r){return Fr(r),qi(1,Math.atan(r),0,1,0,0)}function j0(r=0){return Fr(r),qi(-1,0,0,1,r,0)}function K0(r=0){return Fr(r),qi(1,0,0,-1,0,r)}function J0(){return Ur((r,t,e)=>X.ARC===r.type?q0(r,r.relative?0:t,r.relative?0:e):r)}function t2(){return Ur((r,t,e)=>(r.relative&&(t=0,e=0),X.ARC===r.type&&Do(r,t,e),r))}function zc(){return r=>({...r})}function e2(){const r=zc(),t=Wc(),e=$c(),n=Vc(),a=Ur((u,l,c)=>{const f=n(e(t(r(u))));function d(A){A>a.maxX&&(a.maxX=A),A<a.minX&&(a.minX=A)}function y(A){A>a.maxY&&(a.maxY=A),A<a.minY&&(a.minY=A)}if(f.type&X.DRAWING_COMMANDS&&(d(l),y(c)),f.type&X.HORIZ_LINE_TO&&d(f.x),f.type&X.VERT_LINE_TO&&y(f.y),f.type&X.LINE_TO&&(d(f.x),y(f.y)),f.type&X.CURVE_TO){d(f.x),y(f.y);const A=Hc(l,f.x1,f.x2,f.x);for(const C of A)0<C&&1>C&&d(qc(l,f.x1,f.x2,f.x,C));const _=Hc(c,f.y1,f.y2,f.y);for(const C of _)0<C&&1>C&&y(qc(c,f.y1,f.y2,f.y,C))}if(f.type&X.ARC){d(f.x),y(f.y),Do(f,l,c);const A=f.xRot/180*Math.PI,_=Math.cos(A)*f.rX,C=Math.sin(A)*f.rX,F=-Math.sin(A)*f.rY,N=Math.cos(A)*f.rY,[M,R]=f.phi1<f.phi2?[f.phi1,f.phi2]:-180>f.phi2?[f.phi2+360,f.phi1+360]:[f.phi2,f.phi1],q=([L,k])=>{const tt=Math.atan2(k,L)*180/Math.PI;return tt<M?tt+360:tt},z=Fc(F,-_,0).map(q);for(const L of z)L>M&&L<R&&d(kc(f.cX,_,F,L));const w=Fc(N,-C,0).map(q);for(const L of w)L>M&&L<R&&y(kc(f.cY,C,N,L))}return u});return a.minX=1/0,a.maxX=-1/0,a.minY=1/0,a.maxY=-1/0,a}const ce={ROUND:W0,TO_ABS:Wc,TO_REL:V0,NORMALIZE_HVZ:$0,NORMALIZE_ST:Vc,QT_TO_C:$c,INFO:Ur,SANITIZE:z0,MATRIX:qi,ROTATE:G0,TRANSLATE:Y0,SCALE:X0,SKEW_X:Z0,SKEW_Y:Q0,X_AXIS_SYMMETRY:j0,Y_AXIS_SYMMETRY:K0,A_TO_C:J0,ANNOTATE_ARCS:t2,CLONE:zc,CALCULATE_BOUNDS:e2};class Ys extends H{name="Geo2";params;viewMatrix=new re;boundingBox=new St;constructor(t={}){super(t.commands),this.params=t,this.toAbs(),t.flipY&&this.matrix(1,0,0,-1,0,0)}_version=0;get version(){return this._version}set version(t){this._version=t}set needsUpdate(t){t&&this._version++}static render(t,e){if(!(!t||!(e!=null&&e.length))){Ot.identity();for(let n=0,a=(e==null?void 0:e.length)||0;n<a;n++){const u=e[n];switch(u.type){case H.MOVE_TO:t.moveTo(u.x,u.y),Ot.set(u.x,u.y);break;case H.LINE_TO:t.lineTo(u.x,u.y),Ot.set(u.x,u.y);break;case H.ARC:t.arc(u.x,u.y,u.rX,u.phi1||0,u.phi2||Math.PI*2,u.sweepFlag!==1),Ot.set(u.x,u.y);break;case H.HORIZ_LINE_TO:Ot.set(u.x,Ot.y);break;case H.VERT_LINE_TO:Ot.set(Ot.x,u.y);break;case H.CURVE_TO:Ot.set(u.x,u.y);break;case H.SMOOTH_CURVE_TO:Ot.set(u.x,u.y);break;case H.QUAD_TO:Ot.set(u.x,u.y);break;case H.SMOOTH_QUAD_TO:Ot.set(u.x,u.y);break}}}}setFromPoints(t){return t!=null&&t.length?(this.params.points=t,this.recomputePath(),this):this}recomputePath(){throw new Error("must be implemented in derived")}computeBoundingBox(){var t;this.boundingBox.makeEmpty(),Ot.identity();for(let e=0,n=((t=this.commands)==null?void 0:t.length)||0;e<n;e++){const a=this.commands[e];switch(a.type){case H.MOVE_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.LINE_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.ARC:typeof a.xRot>"u"?(this.boundingBox.expandByXY(a.x,a.y),kr.set(a.x,a.y).addScalar(-a.rX),this.boundingBox.expandByPoint(kr),kr.set(a.x,a.y).addScalar(a.rX),this.boundingBox.expandByPoint(kr)):this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break;case H.HORIZ_LINE_TO:this.boundingBox.expandByXY(a.x,Ot.y),Ot.set(a.x,Ot.y);break;case H.VERT_LINE_TO:this.boundingBox.expandByXY(Ot.x,a.y),Ot.set(Ot.x,a.y);break;case H.QUAD_TO:this.boundingBox.expandByXY(a.x,a.y),Ot.set(a.x,a.y);break}}return this.boundingBox}render(t){Ys.render(t,this.commands)}applyMatrix(t){return this.needsUpdate=!0,this.matrix(t.elements[0],t.elements[1],t.elements[3],t.elements[4],t.elements[6],t.elements[7]),this}getRenderCommands(t){var u;const e=[];for(let l=0,c=((u=this.commands)==null?void 0:u.length)||0;l<c;l++)e.push(Object.assign({},this.commands[l]));if(!t)return e;Ot.identity();const n=ce.MATRIX(t.elements[0],t.elements[1],t.elements[3],t.elements[4],t.elements[6],t.elements[7]),a=[];for(let l=0,c=e.length;l<c;l++){const f=e[l],d=n(f);if(d.type===H.ARC&&typeof d.xRot<"u"){const y=g0(Ot.x,Ot.y,d.x,d.y,d.lArcFlag,d.sweepFlag,d.rX,d.rY,0);d.x=y[0],d.y=y[1],d.rX=y[2]>y[3]?y[2]:y[3],d.phi1=y[4],d.phi2=y[4]+y[5],d.sweepFlag=y[7],d.phi2===0&&(d.phi2=d.phi1>0?1e-6:-1e-6)}else if(d.type===H.ARC&&(t.getScale(kr),d.rX=d.rY*Math.abs(kr.x),d.phi1!==0||d.phi2!==Math.PI*2)){t.getRotation(kr),d.phi1+=kr.x,d.phi2+=kr.x;const y=a[a.length-1];y.x=(y.x||0)+Math.cos(kr.x)*d.rX*2,y.y=(y.y||0)+Math.sin(kr.x)*d.rX*2}Array.isArray(d)?a.push(...d):a.push(d),typeof d.x>"u"?Ot.set(Ot.x,d.y):typeof d.y>"u"?Ot.set(d.x,Ot.y):Ot.set(d.x,d.y)}return a}copy(t){return this.commands=Mt.cloneDeep(t.commands),this.version=0,this}clone(){const t=this.constructor;return new t(this.params).copy(this)}}const Ot=new Y,kr=new Y;class r2 extends Ys{isCircle=!0;radius=1;start=0;end=Math.PI*2;constructor(t={}){t.commands||(t.commands=[]),super(t),typeof t.radius<"u"&&(this.radius=t.radius),typeof t.start<"u"&&(this.start=t.start),typeof t.end<"u"&&(this.end=t.end),this.recomputePath()}recomputePath(){var n,a;if(!((a=(n=this.params)==null?void 0:n.points)!=null&&a.length))return this;const t=this.params.points,e=[];for(let u=0,l=t.length;u<l;u++)e.push({type:H.MOVE_TO,x:t[u].x>0?t[u].x+this.radius:t[u].x-this.radius,y:t[u].y,relative:!1}),e.push({type:H.ARC,rX:this.radius,rY:this.radius,xRot:void 0,lArcFlag:0,sweepFlag:1,phi1:this.start,phi2:this.end,x:t[u].x,y:t[u].y,relative:!1});return this.commands=e,this}}class i2{params;constructor(t={}){this.params=t}destroy(){}static getInstanceByElement(t,e=!1){if(!t)return;let n;switch(t.nodeName){case"path":n=this.getInstanceByPath(t,e);break;case"circle":n=this.getInstanceByCircle(t,e);break}return n||console.error(`unsupported: ${t.nodeName}`),n}static getInstanceByPath(t,e=!1){if(!t)return;const n=t.getAttribute("d");if(!n)return;const a=n.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"");return new Ys({commands:a,flipY:e})}static getInstanceByCircle(t,e=!1){if(!t||t.nodeName!=="circle")return;Gc.set(wo(t,"cx",0),wo(t,"cy",0));const n=wo(t,"r",0);return new r2({points:[Gc.clone()],radius:n,flipY:e})}static getInstance(t,e=!1){if(t)return new Ys({commands:t,flipY:e})}}const Gc=new Y;class n2{svg;offset=new Y;svgRoot;layers=[];elementsMap={};boundingBoxMap={};boundingBox=new St;svgSkeletons=[];data;_exceptTypes=["view"];_exceptIds=["viewer","mirror"];_lvi=0;bindSvg(t){return this.svg=t,this.svgRoot=fc(this.svg),this.layers=this.getLayers(2),this.getElementsMap(this.svg,this.elementsMap),this}getLayers(t){var e;if(!this.svg)throw new Error("please bind svg first");return t===2&&((e=this.layers)!=null&&e.length)?this.layers:(this.layers=this._getSvgLayer(this.svg,t),this.layers)}_getSvgLayer(t,e=0,n=0,a=[]){var c;let u,l=t.id;if(this._exceptTypes.includes(t.tagName)||t.tagName==="defs")return this._lvi--,a;if(e&&this._lvi>e)return a;l&&!this._exceptIds.includes(l)&&(u={value:l,label:l,children:[]},a.push(u)),this._lvi++;for(let f=0,d=t.children.length;f<d;f++)u?this._getSvgLayer(t.children[f],e,this._lvi,u.children):this._getSvgLayer(t.children[f],e,this._lvi,a);return((c=u==null?void 0:u.children)==null?void 0:c.length)===0&&delete u.children,this._lvi=n,a}getElementsMap(t,e={}){return this.traverseSvg(t,n=>{n!==t&&n.id&&(e[n.id]=n)}),e}computeBoundingBoxMap(){var e;if(Object.keys(this.boundingBoxMap).length)return this.boundingBoxMap;let t=(e=this.svg)==null?void 0:e.getBoundingClientRect();return t&&this.offset.set(t.left,t.top),this.traverseSvg(this.svg,n=>{if(!n.id)return;if(n.tagName==="use"){const l=this.getUseSymbolId(n);if(!l)return;const c=this.boundingBoxMap[l];if(c&&!c.isEmpty()){mi.set(Number(n.getAttribute("x")||"0"),Number(n.getAttribute("y")||"0")),Xa.composeSvgTransform(mi.x,mi.y,n.getAttribute("transform"));const y=new St().copy(c).applyMatrix3(Xa);this.boundingBoxMap[n.id]=y;return}const f=this.getUseElementBoundingBoxWithSymbol(n);if(!f)return;this.boundingBoxMap[l]=f,mi.set(Number(n.getAttribute("x")||"0"),Number(n.getAttribute("y")||"0")),Xa.composeSvgTransform(mi.x,mi.y,n.getAttribute("transform"));const d=new St().copy(f).applyMatrix3(Xa);this.boundingBoxMap[n.id]=d,this.boundingBox.expandByBox(d);return}if(typeof n.getBBox!="function")return;const a=n.getBBox();if((!a.width||!a.height)&&n.tagName==="path"){const l=i2.getInstanceByPath(n),c=l==null?void 0:l.computeBoundingBox();if(!c||c.isEmpty())return;c.getSize(mi),a.x=c.min.x,a.y=c.max.y,a.width=mi.x,a.height=mi.y}if(!a.width||!a.height)return;const u=new St(new Y(a.x,a.y),new Y(a.x+a.width,a.y+a.height));this.boundingBoxMap[n.id]=u.round(),this.boundingBox.expandByBox(u)}),this.boundingBoxMap}updateLayersVisibility(t,e=!1){if(!this.elementsMap)throw new Error("please bind svg first");this._updateAllLayersVisibility(!e),t!=null&&t.length||(t=["background"]);for(let n=0,a=t.length;n<a;n++){const u=this.getElementById(t[n]);u&&this._updateLayersVisibility(u,e,!0,!0)}}_updateAllLayersVisibility(t=!1){Object.values(this.elementsMap).forEach(e=>{e.tagName==="svg"||e.tagName==="symbol"||!e.getAttribute("id")||(e.style.display=t?"block":"none")})}_updateLayersVisibility(t,e=!1,n=!1,a=!1){var u,l;if(!(!t||t.tagName==="svg"||!t.getAttribute("id"))){if(t.style.display=e?"block":"none",n&&e){let c=t.parentElement;for(;c&&c.tagName!=="svg";)c.style.display=e?"block":"none",c=c.parentElement}if(a&&((u=t.children)==null?void 0:u.length)>0)for(let c=0,f=(l=t.children)==null?void 0:l.length;c<f;c++)this._updateLayersVisibility(t.children[c],e,!1,!0)}}updateVisibilityByAssetType(t,e=!1,n){n||(n=d0[t]),this.updateLayersVisibility(n,!e)}updateVisibilityByAssetTypes(t,e=!1,n){if(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length))for(let a=0,u=t.length;a<u;a++)this.updateVisibilityByAssetType(t[a],e,n)}getElementById(t){if(!this.elementsMap)throw new Error("please bind svg first");return this.elementsMap[t]}getElementBoundingBox(t){return this.boundingBoxMap[t]}findSkeletonByPath(t=[]){let e=0,n;const a=Object.keys(this.elementsMap);for(let u=0,l=a.length;u<l;u++){const c=this.elementsMap[a[u]];if(!c)continue;const f=c.getAttribute("d");f&&(f.length<e||(e=f.length,n=c.id?c:c.parent))}return n&&t.push(n),t}setTextInChildren2(t,e){var a;let n;((a=t==null?void 0:t.children)==null?void 0:a.length)<2?(n=vo("text"),n.setAttribute("dy","1em"),t.appendChild(n)):n=t.children[t.children.length-1],n.innerHTML=e}traverseSvg(t,e){var n;if(!this._exceptTypes.includes(t.tagName)&&!(t.tagName!=="svg"&&t.tagName!=="defs"&&!t.id)&&!(t.tagName==="g"&&((n=t.children)==null?void 0:n.length)===0)){this._exceptIds.includes(t.id)||e(t);for(let a=0,u=t.children.length;a<u;a++)this.traverseSvg(t.children[a],e)}}traverseSvgTLayers(t,e){var n;if(Array.isArray(t)){for(let a=0,u=t.length;a<u;a++)this.traverseSvgTLayers(t[a],e);return}if(e(t),!!((n=t.children)!=null&&n.length))for(let a=0,u=t.children.length;a<u;a++)this.traverseSvgTLayers(t.children[a],e)}getLabelElementsByType(t,e={}){const n=this.getElementById(Ya(t));return n&&this.getElementsMap(n,e),e}getLabelElementById(t,e="rm"){if(!t)return;const n=this.getElementById(t);if(!n)return;let a=n.getAttribute("aid");return a||(a="l-"+e+"-"+t),this.getElementById(a)}setLabelsById(t,e,n="rm"){var l,c;const a=this.getLabelElementById(t,n);if(!a)return;const u=((l=a.children)==null?void 0:l.length)||0;for(let f=0,d=((e==null?void 0:e.length)||0)-(u-1);f<d;f++){const y=vo("text");y.setAttribute("x","0"),y.setAttribute("y",u+f+"em"),a.appendChild(y)}for(let f=1,d=(c=a.children)==null?void 0:c.length;f<d;f++)a.children[f].textContent=e&&f<=e.length?e[f-1]:""}clearAssetLabelsByType(t="rm"){var a;const e=this.getLabelElementsByType(t),n=Mt.keys(e);for(let u=0,l=n.length;u<l;u++){const c=e[n[u]];for(let f=1,d=((a=c.children)==null?void 0:a.length)||0;f<d;f++)c.children[f].textContent=""}}getUseSymbolId(t){var e;if(!(!t||t.tagName!=="use"))return(e=t.getAttribute("xlink:href"))==null?void 0:e.substring(1)}getUseSymbol(t){if(!t||t.tagName!=="use")return;const e=this.getUseSymbolId(t);if(e)return this.getElementById(e)}setElementState2selected(t,e=!1){var a;if(!t)return;if(t.tagName==="use"){const u=this._getSymbolBox(t);if(!u)return;e?(a=t.parentNode)==null||a.insertBefore(u,t):t.parentNode&&t.parentNode.contains(u)&&t.parentNode.removeChild(u);return}let n=t.getAttribute("class");n||(n=""),e?n="danger":n=Mt.replace(n,"danger","").trim(),t.setAttribute("class",n)}_getSymbolBox(t){if(!t)return;const e=t.id+"-boundingBox";let n=this.getElementById(e);if(n)return n;const a=this.getUseSymbol(t);if(!a)return;let u=this.getElementBoundingBox(t.id);if(!u||u.isEmpty())return;n=document.createElementNS("http://www.w3.org/2000/svg","rect"),n.setAttribute("id",e),n.setAttribute("class","danger"),n.setAttribute("x",u.min.x.toString()),n.setAttribute("y",u.min.y.toString());const l=new Y;return u.getSize(l),n.setAttribute("width",l.x.toString()),n.setAttribute("height",l.y.toString()),a.getAttribute("transform")&&n.setAttribute("transform",a.getAttribute("transform")||""),a.getAttribute("style")&&n.setAttribute("style",a.getAttribute("style")||""),this.elementsMap[e]=n,n}getUseElementBoundingBoxWithSymbol(t){var f;if(!t)return;const e=(f=t.getAttribute("xlink:href"))==null?void 0:f.substring(1);if(!e)return;let n=this.getElementById(e);if(!n)return;const a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top="-9999px",a.style.left="-9999px";let u;if(Mt.lowerCase(n.tagName)==="symbol"){u=document.createElementNS("http://www.w3.org/2000/svg","g");for(let d=0,y=n.childNodes.length;d<y;d++){const A=n.childNodes[d].cloneNode(!0);u.appendChild(A)}}else u=n.cloneNode(!0);a.appendChild(u),u.setAttribute("style","stroke: #333333;"),document.body.appendChild(a);const l=a.getBBox();if(document.body.removeChild(a),!l)return;const c=new St;return c.set(new Y(l.x,l.y),new Y(l.x+l.width,l.y+l.height)),c}fontZoom(t,e=1){const n=this.getElementById(t);if(!n)return;let a=n.getAttribute("font-size");a||(a="12");const u=/(\d+)([a-zA-Z%]+)/.exec(a),l=u&&(u==null?void 0:u.length)>2?u[2]:"";let c=Math.round(parseFloat(a)*e*100)/100;n.setAttribute("font-size",c+l)}getCentroid(t,e=new Y){const n=t.getAttribute("insX"),a=t.getAttribute("insY");return n||a?e.set(Number(n||"0"),Number(a||"0")):this.getCentroidByDom(t,e)}getCentroidByDom(t,e=new Y){const n=Number(t.getAttribute("x")||"0"),a=Number(t.getAttribute("y")||"0"),u=t.getBBox();let l=1,c=1,f=t.getAttribute("transform");if(!f)return e.set(n,a);const d=/scale\(\s*([^\s,)]+)[ ,]([^\s,)]+)/.exec(f);if(typeof d>"u"||d==null){const y=t.transform.baseVal;if(f&&y.numberOfItems>0){let A=y.getItem(0);A&&A.type===SVGTransform.SVG_TRANSFORM_SCALE&&(l=A.matrix.a!==0?A.matrix.a:1,c=A.matrix.d!==0?A.matrix.d:l)}else return e.set((u.x+u.width/2)*l,(u.y+u.height/2)*c)}else l=d[1]&&Number(d[1])>0?Number(d[1]):1,c=d[2]&&Number(d[2])>0?Number(d[2]):l;return n&&a?e.set(n*l,a*c):e.set((u.x+u.width/2)*l,(u.y+u.height/2)*c),e}_lastLinked=[];linkAssetsByTree(t,e){if(t||(t=er.RM),this.clearLinkedLines(t),!e||!e.value)return;const n=this.getLinesByTree(e);this.drawLinkedLines(t,n)}clearLinkedLines(t){var a;const e=Gs(t);if(this.getElementById(e)){for(let u=((a=this._lastLinked)==null?void 0:a.length)-1;u>=0;u--){const l=this._lastLinked[u];l.parentNode&&l.parentNode.removeChild(l),this._lastLinked.splice(u,1)}this._lastLinked.length=0}}drawLinkedLines(t,e){var u;if(!(e!=null&&e.length))return;const n=Gs(t),a=this.getElementById(n);if(a)for(let l=0,c=e.length;l<c;l++){const f=e[l][0],d=e[l][((u=e[l])==null?void 0:u.length)-1],y=vo("line");y.setAttribute("x1",f.x.toString()),y.setAttribute("y1",f.y.toString()),y.setAttribute("x2",d.x.toString()),y.setAttribute("y2",d.y.toString()),y.setAttribute("class","danger"),y.setAttribute("style","stroke-width: 2;"),a.appendChild(y),this._lastLinked.push(y)}}getLinesByTree(t,e=[]){var u;if(!(t!=null&&t.value))return e;const n=this.getElementBoundingBox(t.value);if(!n)return e;const a=n.getCenter();return(u=t.children)==null||u.forEach(l=>{var d;const c=this.getElementBoundingBox(l==null?void 0:l.value);if(!c)return;const f=c.getCenter();e.push([a,f]),(d=l.children)!=null&&d.length&&this.getLinesByTree(l,e)}),e}}const mi=new Y,Xa=new re;class s2{name="SvgPainter";params;chef;constructor(t={},e){this.params=t,this.chef=e}drawSocialDistanceCircles(t,e="http://www.w3.org/2000/svg"){var C,F,N;if(!t)return;const n=Kg(t),a=cc(t),u=2*n,l=(F=(C=this.params.socialDistance)==null?void 0:C.colors)!=null&&F.length?(N=this.params.socialDistance)==null?void 0:N.colors:[he.green,he.red],c=this.getRadius(a),f=t.querySelector(`#${Ga}`),d=f==null?void 0:f.querySelectorAll("path");if(!f||!(d!=null&&d.length))return;let y,A;const _=new Array;for(let M=0,R=(d==null?void 0:d.length)||0;M<R;M++){if(y=d[M],A=y.getAttribute("id"),!A)continue;const q=this.chef.getElementBoundingBox(A);if(!q)continue;const z=new Y;q.getCenter(z),_.push({id:A,cp:z})}for(let M=0,R=_.length;M<R;M++){_[M].color=l[0];for(let q=0,z=R;q<z;q++)_[M]!==_[q]&&Y.getDistance(_[M].cp,_[q].cp)<c*2&&(_[M].color=l[1])}for(let M=0,R=_.length;M<R;M++){let q=this.createCircle(_[M],c,u,e);f.appendChild(q)}}clearSocialDistanceCircles(t){if(!t)return;const e=t.querySelector(`#${Ga}`),n=e==null?void 0:e.querySelectorAll("circle");if(!(!e||!(n!=null&&n.length)))for(let a=0,u=(n==null?void 0:n.length)||0;a<u;a++){const l=n[a].getAttribute("id");l&&(l==null?void 0:l.indexOf("_circle"))>-1&&e.removeChild(n[a])}}getRadius(t){var n,a,u;let e=((a=(n=this.params)==null?void 0:n.socialDistance)==null?void 0:a.radius)||3;return((u=this.params)==null?void 0:u.displayUnits)==="imperial"?t==="Metres"||t==="m"?e/=3.28084:t==="cm"?e=e/3.28084*100:t==="mm"?e=e/3.28084*1e3:(t==="INCH"||t==="inches")&&(e*=12):t==="INCH"||t==="inches"?e=e*3.28084*12:t==="cm"?e*=100:t==="mm"&&(e*=1e3),e}createCircle(t,e,n,a){const u=document.createElementNS(a,"circle");return u.setAttributeNS(null,"id",t.id+"_circle"),u.setAttributeNS(null,"cx",t.cp.x),u.setAttributeNS(null,"cy",t.cp.y),u.setAttributeNS(null,"r",String(e)),u.setAttributeNS(null,"style",`pointer-events:none;fill-opacity:0.1;stroke:${t.color};stroke-width:${n}px;`),u}}const a2=function(r){return(r||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")};function Za(r,t){if(!r||!t)return!1;if(t.indexOf(" ")!==-1)throw new Error("className should not contain space.");return r.classList?r.classList.contains(t):(" "+r.className+" ").indexOf(" "+t+" ")>-1}function Xs(r,t){if(!r)return;let e=r.className;const n=(t||"").split(" ");for(let a=0,u=n.length;a<u;a++){const l=n[a];l&&(r.classList?r.classList.add(l):Za(r,l)||(e+=" "+l))}r.classList||(r.className=e)}function Zs(r,t){if(!r||!t)return;const e=t.split(" ");let n=" "+r.className+" ";for(let a=0,u=e.length;a<u;a++){const l=e[a];l&&(r.classList?r.classList.remove(l):Za(r,l)&&(n=n.replace(" "+l+" "," ")))}r.classList||(r.className=a2(n))}class Yc extends l0{isSvgScene=!0;name="SvgScene";dynamically=!0;params;socialDistanceEnable=!1;container;svg;svgStr="";svgRoot;viewBox=new St;chef;defaultLayers=[];skeletonLayers=[];currentLayers=[];assetType;assetsMap={};legend=[];selectedList=[];painter;_lastHighlightType="";_lastHighlightIds=[];clickSvgElementHandler=this.handleClickSvgElement.bind(this);constructor(t={}){super(),this.params=t,this.assetType=t.assetType||er.RM,this.params.socialDistanceEnable&&(this.socialDistanceEnable=!0),this.container=this.params.containerId?document.getElementById(this.params.containerId):Zt.window.document.getElementsByTagName("body")[0],this.chef=new n2,this.painter=new s2(t,this.chef)}get isMounted(){var t;return((t=this.container.querySelectorAll("svg"))==null?void 0:t.length)>0}destroy(){var t;super.destroy(),this.unmount(),(t=this.camera)==null||t.destroy()}mount(){this.svg&&(this.container.contains(this.svg)||this.container.appendChild(this.svg),this.chef.computeBoundingBoxMap())}unmount(){this.svg&&this.svg.parentNode&&this.container.contains(this.svg)&&this.container.removeChild(this.svg)}computeBoundingBox(){return this.boundingBox.makeEmpty(),!this.chef||!this.svg?this.boundingBox:(this.chef.computeBoundingBoxMap(),this.boundingBox.copy(this.chef.boundingBox),console.warn("svgScene.computeBoundingBox: ",this.chef.boundingBox.toString()),this.boundingBox)}async load(t){return new Ac().loadAsync(t)}bind(t){if(this.svgStr=t,this.svg=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,console.warn("bind: ",this.name),!this.svg)throw new Error("svg load failed");let e=this.svg.getAttribute("viewBox");e&&(Jg(e,this.viewBox),this.chef.bindSvg(this.svg),this.svgRoot=fc(this.svg),this.svg.setAttribute("viewBox",`0 0 ${this.params.width} ${this.params.height}`),this.svg.setAttribute("style","transform: translateZ(0);"),this.appendStyles(),console.log(this.name,"viewBox -> ",e,this.viewBox.toString()),this.setAssetsMap(this.assetType,this.assetsMap))}appendStyles(){var e;let t=(e=this.svg)==null?void 0:e.querySelector("style");t&&(t.appendChild(document.createTextNode(`.default { stroke: ${this.params.defaultStroke}; fill: ${this.params.defaultFill}; }`)),t.appendChild(document.createTextNode(`.info { stroke: ${this.params.infoStroke}; fill: ${this.params.infoFill}; }`)),t.appendChild(document.createTextNode(`.primary { stroke: ${this.params.primaryStroke}; fill: ${this.params.primaryFill}; }`)),t.appendChild(document.createTextNode(`.success { stroke: ${this.params.successStroke}; fill: ${this.params.successFill}; }`)),t.appendChild(document.createTextNode(`.warning { stroke: ${this.params.warningStroke}; fill: ${this.params.warningFill}; }`)),t.appendChild(document.createTextNode(`.danger { stroke: ${this.params.dangerStroke}; fill: ${this.params.dangerFill}; }`)),t.appendChild(document.createTextNode(`.active { stroke: ${this.params.activeStroke}; fill: ${this.params.activeFill}; }`)))}getLayers(t=2){return this.svg?this.chef.getLayers(t):[]}setDefaultLayers(t){t!=null&&t.length&&(this.defaultLayers=t)}setSkeletonLayers(t){t!=null&&t.length&&(this.skeletonLayers=t)}setCurrentLayers(t){t!=null&&t.length&&(this.currentLayers=t)}showDefaultLayers(t,e=!1){this.setDefaultLayers(t),this.chef.updateLayersVisibility(t,e)}updateLayersVisibility(t,e=!1){this.chef.updateLayersVisibility(t,e)}setAssetType(t,e){this.assetsMap={},this.assetType=t,this.setAssetsMap(this.assetType,this.assetsMap),e||(e=[Gs(t)],t!==er.RM&&e.unshift(Gs(er.RM))),this.setDefaultLayers(e),this.updateLayersVisibility(this.defaultLayers,!0)}isBelongsToAssetType(t,e){e||(e=this.assetType);const n=this.getAssetsByType(e);return n==null?void 0:n.hasOwnProperty(t)}setAssetsMap(t,e={}){const n=this.chef.getElementById(Gs(t));if(!n)return e;e[t]=this.chef.getElementsMap(n);const a=Ya(t),u=this.chef.getElementById(a);if(!u)return e;const l=this.chef.getElementsMap(u),c=Mt.keys(l);if(!(c!=null&&c.length))return e;if(Mt.startsWith(c[0],`l-${t}-`)){const f=`l-${t}-`.length;for(let d=0,y=c.length;d<y;d++){const A=c[d].slice(f);l[A]=l[c[d]],delete l[c[d]]}}return e[a]=l,e}getAssetsByType(t){return this.assetsMap.hasOwnProperty(t)||this.setAssetsMap(t,this.assetsMap),this.assetsMap[t]}getElementById(t){if(!t)return;const e=this.getAssetsByType(this.assetType);if(!(!e||!Object.hasOwnProperty.call(e,t)))return e[t]}getAssetIdsByType(t){const e=this.getAssetsByType(t),n=[];return e?Mt.keys(e):n}clearFillOrStroke(t="fill"){const e=this.getAssetsByType(this.assetType),n=Mt.keys(e);let a;for(let u=0,l=n.length;u<l;u++)a=e[n[u]],!(!a||!a.hasAttribute(t))&&(a.removeAttribute(t),t==="stroke"&&a.removeAttribute("stroke-width"));this.clearLegendBy(t)}clearFillOrStrokeByIds(t,e="fill"){const n=this.getAssetsByType(this.assetType),a=Mt.keys(n);let u;for(let l=0,c=a.length;l<c;l++)t!=null&&t.length&&!t.includes(a[l])||(u=n[a[l]],!(!u||!u.hasAttribute(e))&&(u.removeAttribute(e),e==="stroke"&&u.removeAttribute("stroke-width")));this.clearLegendBy(e)}setFillOrStrokeByIds(t,e,n="fill"){const a=this.getAssetsByType(this.assetType),u=Mt.keys(a);let l;for(let c=0,f=u.length;c<f;c++)t.includes(u[c])&&(l=a[u[c]],l&&(l.setAttribute(n,e),n==="stroke"&&l.setAttribute("stroke-width","7"),this.addLegend(n,e,u[c])))}addLegend(t,e,n){let a=this.legend.find(u=>u.color===e);a||(a={type:t,color:e,ids:[]},this.legend.push(a)),a.ids.push(n)}clearLegendBy(t){var e;t||(this.legend.length=0);for(let n=((e=this.legend)==null?void 0:e.length)-1;n>=0;n--)this.legend[n].type===t&&this.legend.splice(n,n)}getLegend(){return this.legend}showSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.defaultLayers,!1),this.chef.updateLayersVisibility(this.skeletonLayers,!0))}hideSkeleton(){var t;(t=this.skeletonLayers)!=null&&t.length&&(this.chef.updateLayersVisibility(this.skeletonLayers,!1),this.chef.updateLayersVisibility(this.defaultLayers,!0))}setAssetLabels(t,e){this.chef.setLabelsById(t,e,this.assetType)}getAssetLabelsMap(t){var a,u;if(!t)return;const e=Ya(t);let n=this.getAssetsByType(e);if(!n||!((a=Object.keys(n))!=null&&a.length)){let l=this.chef.getElementById(e);if(l||(l=this.chef.getElementById(t+"-txt-label")),!l)return;n=this.chef.getElementsMap(l),this.assetsMap[e]=n}if(!(!n||!((u=Object.keys(n))!=null&&u.length)))return n}getAssetLabelById(t,e){var l,c;const n=this.getAssetLabelsMap(t);if(!n)return;let a=n[e];if(a&&((l=a==null?void 0:a.childNodes)!=null&&l.length))return a.childNodes[0].textContent||"";const u="l-"+t+"-"+e;if(a=n[u],a&&((c=a==null?void 0:a.children)!=null&&c.length))return a.children[0].textContent||""}clearAssetLabels(){this.chef.clearAssetLabelsByType(this.assetType)}bindAssetsEvents(t){var a;const e=(a=this.svg)==null?void 0:a.querySelector("#"+t);if(!e)return;e.querySelectorAll("[id]").forEach(u=>{u instanceof SVGElement&&u.addEventListener("click",this.clickSvgElementHandler)})}handleClickSvgElement(t){var e;typeof t.preventDefault=="function"&&t.preventDefault(),console.warn("svgScene.handleClickSvgElement: ",(e=t==null?void 0:t.target)==null?void 0:e.id,t==null?void 0:t.target),this.dispatchEvent({type:"click",data:t})}socialDistanceEnableChanged(t){this.socialDistanceEnable=!!t,t?this.painter.drawSocialDistanceCircles(this.svg):this.painter.clearSocialDistanceCircles(this.svg)}highlightAssets(t,e){var a;this.resetHighlightAssets(t);const n=this.getAssetsByType(t);!n||!((a=Object.keys(n))!=null&&a.length)||(this._lastHighlightType=t,this._lastHighlightIds=Array.isArray(e)?e:[e],this._lastHighlightIds.forEach(u=>{u&&n[u]&&Xs(n[u],"active")}))}resetHighlightAssets(t){var n;const e=this.getAssetsByType(t||this._lastHighlightType);!e||!((n=Object.keys(e))!=null&&n.length)||(this._lastHighlightIds.forEach(a=>{a&&e[a]&&Zs(e[a],"active")}),this._lastHighlightIds.length=0)}getIntersectObjects(t,e=er.RM,n=[]){n.length=0;const a=[],u=this.getAssetsByType(e),l=Mt.keys(u);for(let f=0,d=l.length;f<d;f++){const y=this.chef.getElementBoundingBox(u[l[f]].id);y&&y.containsPoint(t.worldCoords)&&a.push(u[l[f]])}const c=Mt.sortBy(a,f=>{var d;return(d=this.chef.getElementBoundingBox(f.id))==null?void 0:d.getArea()});return n.push(...c),n}clearSelected(){var t,e;if((t=this.selectedList)!=null&&t.length)for(let n=((e=this.selectedList)==null?void 0:e.length)-1;n>=0;n--){let a=this.selectedList[n];this.selectedList.splice(n,1),this.chef.setElementState2selected(a,!1)}}clearSelectedById(t){var n,a;let e=(n=this.selectedList)==null?void 0:n.findIndex(u=>u.getAttribute("id")===t);e>-1&&(this.chef.setElementState2selected(this.selectedList[e],!1),(a=this.selectedList)==null||a.splice(e,1))}selectByIds(t,e=!1){Array.isArray(t)||(t=[t]),e||this.clearSelected();const n=Mt.uniq(Mt.map(this.selectedList,u=>u.getAttribute("id")||"")),a=this.getAssetsByType(this.assetType);for(let u=t.length-1;u>=0;u--)n.includes(t[u])?(this.clearSelectedById(t[u]),t.splice(u,1)):Object.hasOwnProperty.call(a,t[u])&&this.selectedList.push(a[t[u]]);this.selectedList.forEach(u=>{this.chef.setElementState2selected(u,!0)})}getSelectedIds(){var e;if(!((e=this.selectedList)!=null&&e.length))return;const t=[];for(let n=0,a=this.selectedList.length;n<a;n++)this.selectedList[n].id&&t.push(this.selectedList[n].id);return t}getSelectedBoundingBox(){var e;const t=new St;return(e=this.selectedList)!=null&&e.length?(this.selectedList.forEach(n=>{const a=this.chef.boundingBoxMap[n.id];a&&t.expandByBox(a)}),t):t.copy(this.boundingBox)}getElementsByBox(t){const e=[],n=Object.keys(this.chef.boundingBoxMap),a=this.getAssetsByType(this.assetType);for(let u=0,l=n.length;u<l;u++)if(a.hasOwnProperty(n[u])&&!(n[u].indexOf("-assets")>-1)&&t.intersectsBox(this.chef.boundingBoxMap[n[u]])){const c=a[n[u]];c&&e.push(c)}return e}getBoundingBoxById(t){if(this.chef.boundingBoxMap.hasOwnProperty(t))return new St().copy(this.chef.boundingBoxMap[t])}_lastLinkedIds=[];linkAssetsByTree(t){this.chef.linkAssetsByTree(this.assetType,t);const e=this.chef.getElementById(Vs.ASSET_LABELS);e&&(e.style.display="block");const n=Ya(this.assetType),a=this.chef.getElementById(n);a&&(a.style.display="block");const u=this.assetsMap[n];u&&(this._lastLinkedIds.forEach(l=>{u[l]&&(u[l].style.display="none")}),this._lastLinkedIds=hc(t),this._lastLinkedIds.forEach(l=>{u[l]&&(u[l].style.display="block")}))}onBeforeRender(){}fullscreen(t=1e3,e=!1){}update(){}}class u2 extends Yc{name="SvgLoadingScene";constructor(t){super(t),this.bind(`<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100">
34
35
  <view id="defaultView" viewBox="0 0 100 100" />
35
36
  <style> #svg-loading-fast circle {animation: svg-loading-fast 2s ease infinite;}
36
37
  @keyframes svg-loading-fast {
@@ -42,30 +43,30 @@ function print() { __p += __j.call(arguments, '') }
42
43
  <text x="50" y="55" style="text-anchor: middle; fill: #5CC9F5; font-size: 15px;">loading</text>
43
44
  <circle cx="50" cy="50" r="40" style="fill: none; stroke: #5CC9F5; stroke-width: 1px;" />
44
45
  </g>
45
- </svg>`)}}var yc={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
46
+ </svg>`)}}var Xc={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
46
47
  * http://hammerjs.github.io/
47
48
  *
48
49
  * Copyright (c) 2016 Jorik Tangelder;
49
- * Licensed under the MIT license */(function(n){(function(t,e,i,a){var o=["","webkit","Moz","MS","ms","o"],l=e.createElement("div"),c="function",f=Math.round,v=Math.abs,x=Date.now;function D(d,y,b){return setTimeout(Y(d,b),y)}function C(d,y,b){return Array.isArray(d)?(S(d,b[y],b),!0):!1}function S(d,y,b){var N;if(d)if(d.forEach)d.forEach(y,b);else if(d.length!==a)for(N=0;N<d.length;)y.call(b,d[N],N,d),N++;else for(N in d)d.hasOwnProperty(N)&&y.call(b,d[N],N,d)}function H(d,y,b){var N="DEPRECATED METHOD: "+y+`
50
+ * Licensed under the MIT license */(function(r){(function(t,e,n,a){var u=["","webkit","Moz","MS","ms","o"],l=e.createElement("div"),c="function",f=Math.round,d=Math.abs,y=Date.now;function A(g,x,b){return setTimeout(z(g,b),x)}function _(g,x,b){return Array.isArray(g)?(C(g,b[x],b),!0):!1}function C(g,x,b){var B;if(g)if(g.forEach)g.forEach(x,b);else if(g.length!==a)for(B=0;B<g.length;)x.call(b,g[B],B,g),B++;else for(B in g)g.hasOwnProperty(B)&&x.call(b,g[B],B,g)}function F(g,x,b){var B="DEPRECATED METHOD: "+x+`
50
51
  `+b+` AT
51
- `;return function(){var z=new Error("get-stack-trace"),Z=z&&z.stack?z.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",vt=t.console&&(t.console.warn||t.console.log);return vt&&vt.call(t.console,N,Z),d.apply(this,arguments)}}var I;typeof Object.assign!="function"?I=function(y){if(y===a||y===null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(y),N=1;N<arguments.length;N++){var z=arguments[N];if(z!==a&&z!==null)for(var Z in z)z.hasOwnProperty(Z)&&(b[Z]=z[Z])}return b}:I=Object.assign;var B=H(function(y,b,N){for(var z=Object.keys(b),Z=0;Z<z.length;)(!N||N&&y[z[Z]]===a)&&(y[z[Z]]=b[z[Z]]),Z++;return y},"extend","Use `assign`."),F=H(function(y,b){return B(y,b,!0)},"merge","Use `assign`.");function W(d,y,b){var N=y.prototype,z;z=d.prototype=Object.create(N),z.constructor=d,z._super=N,b&&I(z,b)}function Y(d,y){return function(){return d.apply(y,arguments)}}function A(d,y){return typeof d==c?d.apply(y&&y[0]||a,y):d}function $(d,y){return d===a?y:d}function q(d,y,b){S(nt(y),function(N){d.addEventListener(N,b,!1)})}function tt(d,y,b){S(nt(y),function(N){d.removeEventListener(N,b,!1)})}function ot(d,y){for(;d;){if(d==y)return!0;d=d.parentNode}return!1}function K(d,y){return d.indexOf(y)>-1}function nt(d){return d.trim().split(/\s+/g)}function J(d,y,b){if(d.indexOf&&!b)return d.indexOf(y);for(var N=0;N<d.length;){if(b&&d[N][b]==y||!b&&d[N]===y)return N;N++}return-1}function it(d){return Array.prototype.slice.call(d,0)}function ht(d,y,b){for(var N=[],z=[],Z=0;Z<d.length;){var vt=d[Z][y];J(z,vt)<0&&N.push(d[Z]),z[Z]=vt,Z++}return N=N.sort(function(re,fe){return re[y]>fe[y]}),N}function dt(d,y){for(var b,N,z=y[0].toUpperCase()+y.slice(1),Z=0;Z<o.length;){if(b=o[Z],N=b?b+z:y,N in d)return N;Z++}return a}var lt=1;function O(){return lt++}function gt(d){var y=d.ownerDocument||d;return y.defaultView||y.parentWindow||t}var Ot=/mobile|tablet|ip(ad|hone|od)|android/i,Se="ontouchstart"in t,me=dt(t,"PointerEvent")!==a,Jt=Se&&Ot.test(navigator.userAgent),he="touch",Mr="pen",Oe="mouse",te="kinect",Ae=25,Ht=1,Vt=2,_t=4,Ft=8,we=1,Ne=2,Ue=4,Gt=8,De=16,ce=Ne|Ue,zt=Gt|De,Yr=ce|zt,cn=["x","y"],ee=["clientX","clientY"];function Tt(d,y){var b=this;this.manager=d,this.callback=y,this.element=d.element,this.target=d.options.inputTarget,this.domHandler=function(N){A(d.options.enable,[d])&&b.handler(N)},this.init()}Tt.prototype={handler:function(){},init:function(){this.evEl&&q(this.element,this.evEl,this.domHandler),this.evTarget&&q(this.target,this.evTarget,this.domHandler),this.evWin&&q(gt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&tt(this.element,this.evEl,this.domHandler),this.evTarget&&tt(this.target,this.evTarget,this.domHandler),this.evWin&&tt(gt(this.element),this.evWin,this.domHandler)}};function Ke(d){var y,b=d.options.inputClass;return b?y=b:me?y=tr:Jt?y=Hn:Se?y=js:y=mt,new y(d,He)}function He(d,y,b){var N=b.pointers.length,z=b.changedPointers.length,Z=y&Ht&&N-z===0,vt=y&(_t|Ft)&&N-z===0;b.isFirst=!!Z,b.isFinal=!!vt,Z&&(d.session={}),b.eventType=y,fn(d,b),d.emit("hammer.input",b),d.recognize(b),d.session.prevInput=b}function fn(d,y){var b=d.session,N=y.pointers,z=N.length;b.firstInput||(b.firstInput=Je(y)),z>1&&!b.firstMultiple?b.firstMultiple=Je(y):z===1&&(b.firstMultiple=!1);var Z=b.firstInput,vt=b.firstMultiple,Zt=vt?vt.center:Z.center,re=y.center=qe(N);y.timeStamp=x(),y.deltaTime=y.timeStamp-Z.timeStamp,y.angle=pn(Zt,re),y.distance=Xr(Zt,re),cr(b,y),y.offsetDirection=Pn(y.deltaX,y.deltaY);var fe=Rn(y.deltaTime,y.deltaX,y.deltaY);y.overallVelocityX=fe.x,y.overallVelocityY=fe.y,y.overallVelocity=v(fe.x)>v(fe.y)?fe.x:fe.y,y.scale=vt?L(vt.pointers,N):1,y.rotation=vt?li(vt.pointers,N):0,y.maxPointers=b.prevInput?y.pointers.length>b.prevInput.maxPointers?y.pointers.length:b.prevInput.maxPointers:y.pointers.length,Ln(b,y);var dr=d.element;ot(y.srcEvent.target,dr)&&(dr=y.srcEvent.target),y.target=dr}function cr(d,y){var b=y.center,N=d.offsetDelta||{},z=d.prevDelta||{},Z=d.prevInput||{};(y.eventType===Ht||Z.eventType===_t)&&(z=d.prevDelta={x:Z.deltaX||0,y:Z.deltaY||0},N=d.offsetDelta={x:b.x,y:b.y}),y.deltaX=z.x+(b.x-N.x),y.deltaY=z.y+(b.y-N.y)}function Ln(d,y){var b=d.lastInterval||y,N=y.timeStamp-b.timeStamp,z,Z,vt,Zt;if(y.eventType!=Ft&&(N>Ae||b.velocity===a)){var re=y.deltaX-b.deltaX,fe=y.deltaY-b.deltaY,dr=Rn(N,re,fe);Z=dr.x,vt=dr.y,z=v(dr.x)>v(dr.y)?dr.x:dr.y,Zt=Pn(re,fe),d.lastInterval=y}else z=b.velocity,Z=b.velocityX,vt=b.velocityY,Zt=b.direction;y.velocity=z,y.velocityX=Z,y.velocityY=vt,y.direction=Zt}function Je(d){for(var y=[],b=0;b<d.pointers.length;)y[b]={clientX:f(d.pointers[b].clientX),clientY:f(d.pointers[b].clientY)},b++;return{timeStamp:x(),pointers:y,center:qe(y),deltaX:d.deltaX,deltaY:d.deltaY}}function qe(d){var y=d.length;if(y===1)return{x:f(d[0].clientX),y:f(d[0].clientY)};for(var b=0,N=0,z=0;z<y;)b+=d[z].clientX,N+=d[z].clientY,z++;return{x:f(b/y),y:f(N/y)}}function Rn(d,y,b){return{x:y/d||0,y:b/d||0}}function Pn(d,y){return d===y?we:v(d)>=v(y)?d<0?Ne:Ue:y<0?Gt:De}function Xr(d,y,b){b||(b=cn);var N=y[b[0]]-d[b[0]],z=y[b[1]]-d[b[1]];return Math.sqrt(N*N+z*z)}function pn(d,y,b){b||(b=cn);var N=y[b[0]]-d[b[0]],z=y[b[1]]-d[b[1]];return Math.atan2(z,N)*180/Math.PI}function li(d,y){return pn(y[1],y[0],ee)+pn(d[1],d[0],ee)}function L(d,y){return Xr(y[0],y[1],ee)/Xr(d[0],d[1],ee)}var Q={mousedown:Ht,mousemove:Vt,mouseup:_t},rt="mousedown",At="mousemove mouseup";function mt(){this.evEl=rt,this.evWin=At,this.pressed=!1,Tt.apply(this,arguments)}W(mt,Tt,{handler:function(y){var b=Q[y.type];b&Ht&&y.button===0&&(this.pressed=!0),b&Vt&&y.which!==1&&(b=_t),this.pressed&&(b&_t&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[y],changedPointers:[y],pointerType:Oe,srcEvent:y}))}});var se={pointerdown:Ht,pointermove:Vt,pointerup:_t,pointercancel:Ft,pointerout:Ft},_e={2:he,3:Mr,4:Oe,5:te},fr="pointerdown",Fn="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(fr="MSPointerDown",Fn="MSPointerMove MSPointerUp MSPointerCancel");function tr(){this.evEl=fr,this.evWin=Fn,Tt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}W(tr,Tt,{handler:function(y){var b=this.store,N=!1,z=y.type.toLowerCase().replace("ms",""),Z=se[z],vt=_e[y.pointerType]||y.pointerType,Zt=vt==he,re=J(b,y.pointerId,"pointerId");Z&Ht&&(y.button===0||Zt)?re<0&&(b.push(y),re=b.length-1):Z&(_t|Ft)&&(N=!0),!(re<0)&&(b[re]=y,this.callback(this.manager,Z,{pointers:b,changedPointers:[y],pointerType:vt,srcEvent:y}),N&&b.splice(re,1))}});var hi={touchstart:Ht,touchmove:Vt,touchend:_t,touchcancel:Ft},kn="touchstart",Zr="touchstart touchmove touchend touchcancel";function ci(){this.evTarget=kn,this.evWin=Zr,this.started=!1,Tt.apply(this,arguments)}W(ci,Tt,{handler:function(y){var b=hi[y.type];if(b===Ht&&(this.started=!0),!!this.started){var N=fi.call(this,y,b);b&(_t|Ft)&&N[0].length-N[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:N[0],changedPointers:N[1],pointerType:he,srcEvent:y})}}});function fi(d,y){var b=it(d.touches),N=it(d.changedTouches);return y&(_t|Ft)&&(b=ht(b.concat(N),"identifier")),[b,N]}var Un={touchstart:Ht,touchmove:Vt,touchend:_t,touchcancel:Ft},Po="touchstart touchmove touchend touchcancel";function Hn(){this.evTarget=Po,this.targetIds={},Tt.apply(this,arguments)}W(Hn,Tt,{handler:function(y){var b=Un[y.type],N=Fo.call(this,y,b);N&&this.callback(this.manager,b,{pointers:N[0],changedPointers:N[1],pointerType:he,srcEvent:y})}});function Fo(d,y){var b=it(d.touches),N=this.targetIds;if(y&(Ht|Vt)&&b.length===1)return N[b[0].identifier]=!0,[b,b];var z,Z,vt=it(d.changedTouches),Zt=[],re=this.target;if(Z=b.filter(function(fe){return ot(fe.target,re)}),y===Ht)for(z=0;z<Z.length;)N[Z[z].identifier]=!0,z++;for(z=0;z<vt.length;)N[vt[z].identifier]&&Zt.push(vt[z]),y&(_t|Ft)&&delete N[vt[z].identifier],z++;if(Zt.length)return[ht(Z.concat(Zt),"identifier"),Zt]}var Zs=2500,Wa=25;function js(){Tt.apply(this,arguments);var d=Y(this.handler,this);this.touch=new Hn(this.manager,d),this.mouse=new mt(this.manager,d),this.primaryTouch=null,this.lastTouches=[]}W(js,Tt,{handler:function(y,b,N){var z=N.pointerType==he,Z=N.pointerType==Oe;if(!(Z&&N.sourceCapabilities&&N.sourceCapabilities.firesTouchEvents)){if(z)ko.call(this,b,N);else if(Z&&Uo.call(this,N))return;this.callback(y,b,N)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function ko(d,y){d&Ht?(this.primaryTouch=y.changedPointers[0].identifier,Va.call(this,y)):d&(_t|Ft)&&Va.call(this,y)}function Va(d){var y=d.changedPointers[0];if(y.identifier===this.primaryTouch){var b={x:y.clientX,y:y.clientY};this.lastTouches.push(b);var N=this.lastTouches,z=function(){var Z=N.indexOf(b);Z>-1&&N.splice(Z,1)};setTimeout(z,Zs)}}function Uo(d){for(var y=d.srcEvent.clientX,b=d.srcEvent.clientY,N=0;N<this.lastTouches.length;N++){var z=this.lastTouches[N],Z=Math.abs(y-z.x),vt=Math.abs(b-z.y);if(Z<=Wa&&vt<=Wa)return!0}return!1}var za=dt(l.style,"touchAction"),$a=za!==a,Ga="compute",Qs="auto",Ks="manipulation",dn="none",pi="pan-x",di="pan-y",ji=Ho();function Js(d,y){this.manager=d,this.set(y)}Js.prototype={set:function(d){d==Ga&&(d=this.compute()),$a&&this.manager.element.style&&ji[d]&&(this.manager.element.style[za]=d),this.actions=d.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var d=[];return S(this.manager.recognizers,function(y){A(y.options.enable,[y])&&(d=d.concat(y.getTouchAction()))}),Qi(d.join(" "))},preventDefaults:function(d){var y=d.srcEvent,b=d.offsetDirection;if(this.manager.session.prevented){y.preventDefault();return}var N=this.actions,z=K(N,dn)&&!ji[dn],Z=K(N,di)&&!ji[di],vt=K(N,pi)&&!ji[pi];if(z){var Zt=d.pointers.length===1,re=d.distance<2,fe=d.deltaTime<250;if(Zt&&re&&fe)return}if(!(vt&&Z)&&(z||Z&&b&ce||vt&&b&zt))return this.preventSrc(y)},preventSrc:function(d){this.manager.session.prevented=!0,d.preventDefault()}};function Qi(d){if(K(d,dn))return dn;var y=K(d,pi),b=K(d,di);return y&&b?dn:y||b?y?pi:di:K(d,Ks)?Ks:Qs}function Ho(){if(!$a)return!1;var d={},y=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(b){d[b]=y?t.CSS.supports("touch-action",b):!0}),d}var gn=1,We=2,qn=4,jr=8,pr=jr,Wn=16,er=32;function Br(d){this.options=I({},this.defaults,d||{}),this.id=O(),this.manager=null,this.options.enable=$(this.options.enable,!0),this.state=gn,this.simultaneous={},this.requireFail=[]}Br.prototype={defaults:{},set:function(d){return I(this.options,d),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(d){if(C(d,"recognizeWith",this))return this;var y=this.simultaneous;return d=Ki(d,this),y[d.id]||(y[d.id]=d,d.recognizeWith(this)),this},dropRecognizeWith:function(d){return C(d,"dropRecognizeWith",this)?this:(d=Ki(d,this),delete this.simultaneous[d.id],this)},requireFailure:function(d){if(C(d,"requireFailure",this))return this;var y=this.requireFail;return d=Ki(d,this),J(y,d)===-1&&(y.push(d),d.requireFailure(this)),this},dropRequireFailure:function(d){if(C(d,"dropRequireFailure",this))return this;d=Ki(d,this);var y=J(this.requireFail,d);return y>-1&&this.requireFail.splice(y,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(d){return!!this.simultaneous[d.id]},emit:function(d){var y=this,b=this.state;function N(z){y.manager.emit(z,d)}b<jr&&N(y.options.event+Ya(b)),N(y.options.event),d.additionalEvent&&N(d.additionalEvent),b>=jr&&N(y.options.event+Ya(b))},tryEmit:function(d){if(this.canEmit())return this.emit(d);this.state=er},canEmit:function(){for(var d=0;d<this.requireFail.length;){if(!(this.requireFail[d].state&(er|gn)))return!1;d++}return!0},recognize:function(d){var y=I({},d);if(!A(this.options.enable,[this,y])){this.reset(),this.state=er;return}this.state&(pr|Wn|er)&&(this.state=gn),this.state=this.process(y),this.state&(We|qn|jr|Wn)&&this.tryEmit(y)},process:function(d){},getTouchAction:function(){},reset:function(){}};function Ya(d){return d&Wn?"cancel":d&jr?"end":d&qn?"move":d&We?"start":""}function Xa(d){return d==De?"down":d==Gt?"up":d==Ne?"left":d==Ue?"right":""}function Ki(d,y){var b=y.manager;return b?b.get(d):d}function Ve(){Br.apply(this,arguments)}W(Ve,Br,{defaults:{pointers:1},attrTest:function(d){var y=this.options.pointers;return y===0||d.pointers.length===y},process:function(d){var y=this.state,b=d.eventType,N=y&(We|qn),z=this.attrTest(d);return N&&(b&Ft||!z)?y|Wn:N||z?b&_t?y|jr:y&We?y|qn:We:er}});function gi(){Ve.apply(this,arguments),this.pX=null,this.pY=null}W(gi,Ve,{defaults:{event:"pan",threshold:10,pointers:1,direction:Yr},getTouchAction:function(){var d=this.options.direction,y=[];return d&ce&&y.push(di),d&zt&&y.push(pi),y},directionTest:function(d){var y=this.options,b=!0,N=d.distance,z=d.direction,Z=d.deltaX,vt=d.deltaY;return z&y.direction||(y.direction&ce?(z=Z===0?we:Z<0?Ne:Ue,b=Z!=this.pX,N=Math.abs(d.deltaX)):(z=vt===0?we:vt<0?Gt:De,b=vt!=this.pY,N=Math.abs(d.deltaY))),d.direction=z,b&&N>y.threshold&&z&y.direction},attrTest:function(d){return Ve.prototype.attrTest.call(this,d)&&(this.state&We||!(this.state&We)&&this.directionTest(d))},emit:function(d){this.pX=d.deltaX,this.pY=d.deltaY;var y=Xa(d.direction);y&&(d.additionalEvent=this.options.event+y),this._super.emit.call(this,d)}});function Ji(){Ve.apply(this,arguments)}W(Ji,Ve,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[dn]},attrTest:function(d){return this._super.attrTest.call(this,d)&&(Math.abs(d.scale-1)>this.options.threshold||this.state&We)},emit:function(d){if(d.scale!==1){var y=d.scale<1?"in":"out";d.additionalEvent=this.options.event+y}this._super.emit.call(this,d)}});function mi(){Br.apply(this,arguments),this._timer=null,this._input=null}W(mi,Br,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Qs]},process:function(d){var y=this.options,b=d.pointers.length===y.pointers,N=d.distance<y.threshold,z=d.deltaTime>y.time;if(this._input=d,!N||!b||d.eventType&(_t|Ft)&&!z)this.reset();else if(d.eventType&Ht)this.reset(),this._timer=D(function(){this.state=pr,this.tryEmit()},y.time,this);else if(d.eventType&_t)return pr;return er},reset:function(){clearTimeout(this._timer)},emit:function(d){this.state===pr&&(d&&d.eventType&_t?this.manager.emit(this.options.event+"up",d):(this._input.timeStamp=x(),this.manager.emit(this.options.event,this._input)))}});function ta(){Ve.apply(this,arguments)}W(ta,Ve,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[dn]},attrTest:function(d){return this._super.attrTest.call(this,d)&&(Math.abs(d.rotation)>this.options.threshold||this.state&We)}});function ts(){Ve.apply(this,arguments)}W(ts,Ve,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:ce|zt,pointers:1},getTouchAction:function(){return gi.prototype.getTouchAction.call(this)},attrTest:function(d){var y=this.options.direction,b;return y&(ce|zt)?b=d.overallVelocity:y&ce?b=d.overallVelocityX:y&zt&&(b=d.overallVelocityY),this._super.attrTest.call(this,d)&&y&d.offsetDirection&&d.distance>this.options.threshold&&d.maxPointers==this.options.pointers&&v(b)>this.options.velocity&&d.eventType&_t},emit:function(d){var y=Xa(d.offsetDirection);y&&this.manager.emit(this.options.event+y,d),this.manager.emit(this.options.event,d)}});function mn(){Br.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}W(mn,Br,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ks]},process:function(d){var y=this.options,b=d.pointers.length===y.pointers,N=d.distance<y.threshold,z=d.deltaTime<y.time;if(this.reset(),d.eventType&Ht&&this.count===0)return this.failTimeout();if(N&&z&&b){if(d.eventType!=_t)return this.failTimeout();var Z=this.pTime?d.timeStamp-this.pTime<y.interval:!0,vt=!this.pCenter||Xr(this.pCenter,d.center)<y.posThreshold;this.pTime=d.timeStamp,this.pCenter=d.center,!vt||!Z?this.count=1:this.count+=1,this._input=d;var Zt=this.count%y.taps;if(Zt===0)return this.hasRequireFailures()?(this._timer=D(function(){this.state=pr,this.tryEmit()},y.interval,this),We):pr}return er},failTimeout:function(){return this._timer=D(function(){this.state=er},this.options.interval,this),er},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==pr&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Ir(d,y){return y=y||{},y.recognizers=$(y.recognizers,Ir.defaults.preset),new es(d,y)}Ir.VERSION="2.0.7",Ir.defaults={domEvents:!1,touchAction:Ga,enable:!0,inputTarget:null,inputClass:null,preset:[[ta,{enable:!1}],[Ji,{enable:!1},["rotate"]],[ts,{direction:ce}],[gi,{direction:ce},["swipe"]],[mn],[mn,{event:"doubletap",taps:2},["tap"]],[mi]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var qo=1,ea=2;function es(d,y){this.options=I({},Ir.defaults,y||{}),this.options.inputTarget=this.options.inputTarget||d,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=d,this.input=Ke(this),this.touchAction=new Js(this,this.options.touchAction),rs(this,!0),S(this.options.recognizers,function(b){var N=this.add(new b[0](b[1]));b[2]&&N.recognizeWith(b[2]),b[3]&&N.requireFailure(b[3])},this)}es.prototype={set:function(d){return I(this.options,d),d.touchAction&&this.touchAction.update(),d.inputTarget&&(this.input.destroy(),this.input.target=d.inputTarget,this.input.init()),this},stop:function(d){this.session.stopped=d?ea:qo},recognize:function(d){var y=this.session;if(!y.stopped){this.touchAction.preventDefaults(d);var b,N=this.recognizers,z=y.curRecognizer;(!z||z&&z.state&pr)&&(z=y.curRecognizer=null);for(var Z=0;Z<N.length;)b=N[Z],y.stopped!==ea&&(!z||b==z||b.canRecognizeWith(z))?b.recognize(d):b.reset(),!z&&b.state&(We|qn|jr)&&(z=y.curRecognizer=b),Z++}},get:function(d){if(d instanceof Br)return d;for(var y=this.recognizers,b=0;b<y.length;b++)if(y[b].options.event==d)return y[b];return null},add:function(d){if(C(d,"add",this))return this;var y=this.get(d.options.event);return y&&this.remove(y),this.recognizers.push(d),d.manager=this,this.touchAction.update(),d},remove:function(d){if(C(d,"remove",this))return this;if(d=this.get(d),d){var y=this.recognizers,b=J(y,d);b!==-1&&(y.splice(b,1),this.touchAction.update())}return this},on:function(d,y){if(d!==a&&y!==a){var b=this.handlers;return S(nt(d),function(N){b[N]=b[N]||[],b[N].push(y)}),this}},off:function(d,y){if(d!==a){var b=this.handlers;return S(nt(d),function(N){y?b[N]&&b[N].splice(J(b[N],y),1):delete b[N]}),this}},emit:function(d,y){this.options.domEvents&&Wo(d,y);var b=this.handlers[d]&&this.handlers[d].slice();if(!(!b||!b.length)){y.type=d,y.preventDefault=function(){y.srcEvent.preventDefault()};for(var N=0;N<b.length;)b[N](y),N++}},destroy:function(){this.element&&rs(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function rs(d,y){var b=d.element;if(b.style){var N;S(d.options.cssProps,function(z,Z){N=dt(b.style,Z),y?(d.oldCssProps[N]=b.style[N],b.style[N]=z):b.style[N]=d.oldCssProps[N]||""}),y||(d.oldCssProps={})}}function Wo(d,y){var b=e.createEvent("Event");b.initEvent(d,!0,!0),b.gesture=y,y.target.dispatchEvent(b)}I(Ir,{INPUT_START:Ht,INPUT_MOVE:Vt,INPUT_END:_t,INPUT_CANCEL:Ft,STATE_POSSIBLE:gn,STATE_BEGAN:We,STATE_CHANGED:qn,STATE_ENDED:jr,STATE_RECOGNIZED:pr,STATE_CANCELLED:Wn,STATE_FAILED:er,DIRECTION_NONE:we,DIRECTION_LEFT:Ne,DIRECTION_RIGHT:Ue,DIRECTION_UP:Gt,DIRECTION_DOWN:De,DIRECTION_HORIZONTAL:ce,DIRECTION_VERTICAL:zt,DIRECTION_ALL:Yr,Manager:es,Input:Tt,TouchAction:Js,TouchInput:Hn,MouseInput:mt,PointerEventInput:tr,TouchMouseInput:js,SingleTouchInput:ci,Recognizer:Br,AttrRecognizer:Ve,Tap:mn,Pan:gi,Swipe:ts,Pinch:Ji,Rotate:ta,Press:mi,on:q,off:tt,each:S,merge:F,extend:B,assign:I,inherit:W,bindFn:Y,prefixed:dt});var Za=typeof t<"u"?t:typeof self<"u"?self:{};Za.Hammer=Ir,n.exports?n.exports=Ir:t[i]=Ir})(window,document,"Hammer")})(yc);var o0=yc.exports;const Nn=Ql(o0),xc=new G,Nr=new G;class l0 extends qr{name="orbit-controller.ts";isSvg=!1;dom;domOffset=new G;camera;hammer;enabled=!0;enablePan=!0;enableRotate=!0;rotateSpeed=1;enableZoom=!0;minZoom=0;maxZoom=1/0;zoomSpeed=1;zoomChanged=!1;distanceStart=1;distanceEnd=1;state=-1;EPS=1e-6;focus=new G;target=new G;scaled=1;rotateTheta=0;enableDamping=!1;dampingFactor=.05;mouseButtons={LEFT:2,MIDDLE:1,RIGHT:0};isWheeling=!1;finalTimer;rotateStart=new G;rotateEnd=new G;rotateDelta=new G;panStart=new G;panEnd=new G;panOffset=new G;dollyStart=0;dollyOffset=new G;contextMenuHandler=this.handleContextMenu.bind(this);wheelHandler=this.handleWheel.bind(this);pointerDownHandler=this.handlePointerDown.bind(this);pointerUpHandler=this.handlePointerUp.bind(this);pointerMoveHandler=this.handlePointerMove.bind(this);pointerOverHandler=St.debounce(this.handlePointerOver.bind(this),100);pointerLeaveHandler=this.handlePointerLeave.bind(this);tapHandler=this.handleTap.bind(this);panHandler=this.handlePan.bind(this);pinchHandler=this.handlePinch.bind(this);pressHandler=this.handlePress.bind(this);swipeHandler=this.handleSwipe.bind(this);hammerInputHandler=this.handleHammerInput.bind(this);constructor(t,e,i=!1){super(),this.isSvg=i,this.dom=t,this.camera=e,this.scaled=e.scaled.x;let a=this.dom.getBoundingClientRect();this.domOffset.set(a.left,a.top),this.dom.style.touchAction="none",this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}update(){xc.copy(this.camera.position).sub(this.target),this.target.add(this.panOffset),this.camera.position.copy(this.target).add(xc),this.camera.position.add(this.dollyOffset),this.camera.scaled.set(this.scaled,this.scaled),this.camera.update(),this.panOffset.set(0,0),this.dollyOffset.set(0,0),this.scaled=this.camera.scaled.x}bindEvents(){this.unbindEvents(),this.hammer=new Nn.Manager(this.dom,{domEvents:!0});const t=new Nn.Pan({threshold:0,pointers:0}),e=new Nn.Pinch({threshold:0}),i=new Nn.Tap({event:"singletap",taps:1}),a=new Nn.Press({});this.hammer.add([t,i,a,e]),e.recognizeWith(t),this.hammer.on(["panstart","panmove","panend"].join(" "),this.panHandler),this.hammer.on(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),this.hammer.on("singletap",this.tapHandler),this.hammer.on("press",this.pressHandler),this.hammer.on("swipe",this.swipeHandler),this.hammer.on("hammer.input",this.hammerInputHandler),this.dom.addEventListener("contextmenu",this.contextMenuHandler),this.dom.addEventListener("wheel",this.wheelHandler,{passive:!1}),this.dom.addEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.addEventListener("pointerdown",this.pointerDownHandler),this.dom.addEventListener("pointerleave",this.pointerLeaveHandler))}unbindEvents(){var t,e,i,a,o,l,c,f;(t=this.hammer)==null||t.off(["panstart","panmove","panend"].join(" "),this.panHandler),(e=this.hammer)==null||e.off(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),(i=this.hammer)==null||i.off("singletap",this.tapHandler),(a=this.hammer)==null||a.off("press",this.pressHandler),(o=this.hammer)==null||o.off("swipe",this.swipeHandler),(l=this.hammer)==null||l.off("hammer.input",this.hammerInputHandler),this.dom.removeEventListener("contextmenu",this.contextMenuHandler),this.dom.removeEventListener("wheel",this.wheelHandler),this.dom.removeEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.removeEventListener("pointerdown",this.pointerDownHandler),this.dom.removeEventListener("pointerleave",this.pointerLeaveHandler)),(c=this.hammer)==null||c.stop(!0),(f=this.hammer)==null||f.destroy()}setFocus(t,e){this.focus.set(t,e).sub(this.domOffset).unproject(this.camera)}handleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Tap: ",t),Nr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"tap",data:{screenCoords:{x:Nr.x,y:Nr.y}},e:t})}handleDoubleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】DoubleTap: ",t),Nr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"doubletap",data:{screenCoords:{x:Nr.x,y:Nr.y}}})}handlePress(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Press: ",t)}handlePan(t){var i;if(((i=t.pointers)==null?void 0:i.length)!==1)return;typeof t.preventDefault=="function"&&t.preventDefault();const e={type:"panmove",data:{}};(t.isFirst||t.type==="panstart")&&(this.state=2,this.panStart.set(t.center.x,t.center.y),e.type="panstart"),(t.isFinal||t.type==="panend")&&(this.state=-1,e.type="panend"),this.panEnd.set(t.center.x,t.center.y),this.panOffset.subVectors(this.panEnd,this.panStart).multiplyScalar(-this.camera.scaled.x,-this.camera.scaled.y*(this.camera.flipY?1:-1)),this.panStart.copy(this.panEnd),Nr.set(t.center.x,t.center.y).sub(this.domOffset),e.data.screenCoords=Nr.clone(),this.dispatchEvent(e),this.enablePan&&this.update()}handlePinch(t){typeof t.preventDefault=="function"&&t.preventDefault(),t.type==="pinchstart"&&(this.dollyStart=this.camera.scaled.x,this.state=1),(t.isFinal||t.type==="pinchend")&&(this.state=-1),this.scaled=this.dollyStart*(1/t.scale);let e=(this.scaled-this.camera.scaled.x)/this.camera.scaled.x;this.setFocus(t.center.x,t.center.y),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-e).sub(this.camera.position),this.update()}handleRotate(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleSwipe(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleHammerInput(t){t.isFirst&&(this.state=9),t.isFinal&&(this.state=-1)}handleContextMenu(t){this.enabled&&typeof t.preventDefault=="function"&&t.preventDefault()}handleWheel(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),!this.enabled||!this.enableZoom||this.state!==-1)return;this.isWheeling||(this.dispatchEvent({type:"wheelstart"}),this.isWheeling=!0),typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.stopPropagation=="function"&&t.stopPropagation();let e=t.deltaY;(t==null?void 0:t.deltaMode)===1?e*=16:(t==null?void 0:t.deltaMode)===2&&(e*=100),t!=null&&t.ctrlKey&&(e*=10),this.setFocus(t.clientX,t.clientY);let i=this.getZoomScale(e);e<0?this.onDollyIn(i):e>0?this.onDollyOut(i):(this.scaled=this.camera.scaled.x,this.dollyOffset.set(0,0)),this.update(),clearTimeout(this.finalTimer),this.finalTimer=setTimeout(()=>{this.isWheeling&&(this.dispatchEvent({type:"wheelend"}),this.isWheeling=!1)},500)}onDollyIn(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x*t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,1-t).sub(this.camera.position)}onDollyOut(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x/t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-1+t).sub(this.camera.position)}getZoomScale(t){return Math.pow(.95,this.zoomSpeed*Math.abs(t*.03))}handlePointerDown(t){if(!this.enabled||t.button!==2)return;this.dom.addEventListener("pointermove",this.pointerMoveHandler),this.dom.addEventListener("pointerup",this.pointerUpHandler);let e=-1;t.button===0?e=this.mouseButtons.LEFT:t.button===1?e=this.mouseButtons.MIDDLE:t.button===2&&(e=this.mouseButtons.RIGHT),e===0&&(this.rotateStart.set(t.clientX,t.clientY),this.setFocus(this.rotateStart.x,this.rotateStart.y),this.state=0)}handlePointerUp(){this.dom.removeEventListener("pointermove",this.pointerMoveHandler),this.dom.removeEventListener("pointerup",this.pointerUpHandler),this.state=-1}handlePointerLeave(){this.state=-1}handlePointerMove(t){if(this.enabled&&this.state===0){if(!this.enableRotate)return;this.onRotate(t.clientX,t.clientY)}}handlePointerOver(t){t.buttons>0||(Nr.set(t.clientX,t.clientY).sub(this.domOffset),this.dispatchEvent({type:"pointerover",data:{screenCoords:{x:Nr.x,y:Nr.y}},e:t}))}onRotate(t,e){this.rotateEnd.set(t,e),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart).multiplyScalar(this.rotateSpeed);const i=this.rotateDelta.x*Math.PI*2/this.dom.clientHeight;this.rotateTheta-=i,this.rotateStart.copy(this.rotateEnd),this.camera.rotation.x-=this.rotateTheta,this.target.rotateAround(this.focus,-this.rotateTheta),this.camera.position.copy(this.target),this.camera.update(),this.rotateTheta=0}}var Dt=(n=>(n.CONTEXTMENU="contextmenu",n.LOSTPOINTERCAPTURE="lostpointercapture",n.MOUSEOVER="mouseover",n.MOUSEOUT="mouseout",n.MOUSELEAVE="mouseleave",n.MOUSEENTER="mouseenter",n.MOUSEMOVE="mousemove",n.MOUSEDOWN="mousedown",n.MOUSEUP="mouseup",n.POINTERMOVE="pointermove",n.POINTERDOWN="pointerdown",n.POINTERUP="pointerup",n.POINTERCANCEL="pointercancel",n.POINTEROUT="pointerout",n.POINTERLEAVE="pointerleave",n.POINTEROVER="pointerover",n.POINTERENTER="pointerenter",n.TOUCHSTART="touchstart",n.TOUCHEND="touchend",n.TOUCHMOVE="touchmove",n.TOUCHCANCEL="touchcancel",n.WHEEL="wheel",n.WHEEL_START="wheelstart",n.WHEEL_END="wheelend",n.MOUSEWHEEL="mousewheel",n.CLICK="click",n.DBLCLICK="dblclick",n.CONTEXT_LOST="contextlost",n.CONTEXT_RESTORED="contextrestored",n.CONTROLS_CHANGED="controlschanged",n.TAP="tap",n.SINGLE_TAP="singletap",n.DOUBLE_TAP="doubletap",n.PRESS="press",n.PAN="pan",n.PAN_START="panstart",n.PAN_MOVE="panmove",n.PAN_END="panend",n.ROTATE="rotate",n.ROTATE_START="rotatestart",n.ROTATE_MOVE="rotatemove",n.ROTATE_END="rotateend",n.PINCH="pinch",n.PINCH_START="pinchstart",n.PINCH_MOVE="pinchmove",n.PINCH_END="pinchend",n.PINCH_IN="pinchin",n.PINCH_OUT="pinchout",n.SWIPE="swipe",n.CHANGE_START="change_start",n.CHANGE_END="change_end",n))(Dt||{});const Hi=new G;class h0 extends Jh{isCamera=!0;type="Camera2";name="Camera2";params;matrixAutoUpdate=!1;matrixWorldAutoUpdate=!1;projectionMatrix=new ie;projectionMatrixInverse=new ie;viewMatrix=new ie;viewMatrixNeedsUpdate=!0;viewArea=0;left=-1;right=1;top=1;bottom=-1;width=2;height=2;aspect=1;view;constructor(t){super(),this.params=t,this.width=(t==null?void 0:t.width)!==void 0?t.width:2,this.height=(t==null?void 0:t.height)!==void 0?t.height:2,this.aspect=(t==null?void 0:t.aspect)!==void 0?t.aspect:1,(t==null?void 0:t.left)!==void 0&&(this.left=t.left),(t==null?void 0:t.right)!==void 0&&(this.right=t.right),(t==null?void 0:t.top)!==void 0&&(this.top=t.top),(t==null?void 0:t.bottom)!==void 0&&(this.bottom=t.bottom);const e=(this.right+this.left)/2,i=(this.top+this.bottom)/2;if(this.aspect>1){const a=Math.round((this.right-this.left)/2/this.aspect);this.top=i+a,this.bottom=i-a}else if(this.aspect<1){const a=Math.round((this.top-this.bottom)/2*this.aspect);this.left=e-a,this.right=e+a}this.flipY=(t==null?void 0:t.flipY)===!0,this.updateProjectionMatrix(),t!=null&&t.eye&&this.position.fromArray(t.eye),t!=null&&t.up&&this.up.fromArray(t.up),this.computeBoundingBox(),this.update()}destroy(){super.destroy()}get pixelWidth(){return this.scaled.x}set(t=-1,e=1,i=1,a=-1){Hi.set(t+e,a+i).multiplyScalar(.5);const o=Math.max((e-t)/this.width,(i-a)/this.height);this.position.set(Hi.x,Hi.y),this.rotation.set(0,0),this.scaled.set(o,o),this.update()}setByBox(t){if(!t||t.isEmpty())throw new Error("box is empty");this.set(t.min.x,t.max.x,t.max.y,t.min.y)}resize(){this.setSize(this.params.width,this.params.height)}setSize(t,e){this.width=t||2,this.height=e||2,this.left=this.params.left||-1,this.right=this.params.right||1,this.top=this.params.top||1,this.bottom=this.params.bottom||-1,this.aspect=t/e;const i=(this.right+this.left)/2,a=(this.top+this.bottom)/2;if(this.aspect>1){const o=Math.round((this.right-this.left)/2/this.aspect);this.top=a+o,this.bottom=a-o}else if(this.aspect<1){const o=Math.round((this.top-this.bottom)/2*this.aspect);this.left=i-o,this.right=i+o}this.updateProjectionMatrix(),this.update()}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[6],-e[7]).normalize()}getCameraPosition(){return{x:this.position.x,y:this.position.y,z:this.position.z,s:this.scaled.x,r:this.rotation.x}}updateMatrixWorld(t=!1){super.updateMatrixWorld(t),this.updateViewMatrix()}updateProjectionMatrix(){this.parent===void 0&&this.matrixWorldAutoUpdate&&this.updateMatrixWorld(),this.projectionMatrix.makeProjection(this.left,this.right,this.top,this.bottom,this.width,this.height),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}updateViewMatrix(){this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.viewMatrix.multiplyMatrices(this.projectionMatrix,this.matrixWorldInverse)}update(){this.matrixAutoUpdate||this.updateMatrix(),this.updateMatrixWorld(),this.needsUpdate=!0,this.updateBoundingBox(),this.dispatchEvent({type:"update"})}computeBoundingBox(){return Hi.set(this.width,this.height).multiplyScalar(.5).multiplyScalar(this.scaled.x),this.boundingBox.min.subVectors(this.position,Hi),this.boundingBox.max.addVectors(this.position,Hi),this.boundingBox}updateBoundingBox(){super.updateBoundingBox(),this.viewArea=this.boundingBoxWorld.getArea()}toJSON(){const t={};return t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.width=this.width,t.height=this.height,t.aspect=this.aspect,t.position=this.position.toArray(),t.rotation=this.rotation.toArray(),t.scaled=this.scaled.toArray(),t}fromJSON(t){this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.position.fromArray(t.position),this.rotation.fromArray(t.rotation),this.scaled.fromArray(t.scaled)}clone(){return new this.constructor.prototype.constructor().copy(this)}copy(t,e=!0){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this}}var oo=(n=>(n.UPDATE="update",n))(oo||{});class Ec extends qr{name="SvgSelectRect";container;el;constructor(t){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.el=document.createElement("div"),this.el.setAttribute("id",Ui+"SvgSelectRect"),this.el.setAttribute("class",Ui+"-svg-select-rect"),this.el.style.display="none",this.container.appendChild(this.el)}destroy(){super.destroy(),this.el&&this.el.remove()}draw(t){bc.copy(t).getSize(ho),lo.copy(bc.min),this.el.style.display="none",this.el.style.position="absolute",this.el.style.left=lo.x+"px",this.el.style.top=lo.y+"px",this.el.style.width=ho.x+"px",this.el.style.height=ho.y+"px",this.el.style.display="block",this.el.style.background=new Ut(ne.darkBlue).setA(.1).getStyle(),this.el.style.border=ne.darkBlue+" 1px dashed"}hide(){this.el.style.display="none"}}const bc=new It,lo=new G,ho=new G;class c0 extends qr{name="SvgMultiSelector";controller;scene;container;p1=new G;p2=new G;graph;selectEnable=!1;multiSelectEnable=!1;controllerTapHandler=this.handleControllerTap.bind(this);controllerPanStartHandler=this.handleControllerPanStart.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPanEndHandler=this.handleControllerPanEnd.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.graph=new Ec(t),this.bindControllerEvents()}destroy(){this.unbindControllerEvents(),super.destroy()}bindScene(t){this.scene=t}selectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.selectEnable=!!t}multiSelectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.multiSelectEnable=!!t,this.controller.enablePan=!this.multiSelectEnable}bindControllerEvents(){this.controller.addEventListener(Dt.TAP,this.controllerTapHandler),this.controller.addEventListener(Dt.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(Dt.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(Dt.PAN_END,this.controllerPanEndHandler)}unbindControllerEvents(){this.controller.removeEventListener(Dt.TAP,this.controllerTapHandler),this.controller.removeEventListener(Dt.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(Dt.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(Dt.PAN_END,this.controllerPanEndHandler)}handleControllerTap(t){var i,a,o,l,c,f;if((t==null?void 0:t.type)!==Dt.TAP||!this.selectEnable&&!this.multiSelectEnable)return;const e=((i=t==null?void 0:t.e)==null?void 0:i.target)||((o=(a=t==null?void 0:t.e)==null?void 0:a.srcEvent)==null?void 0:o.target)||((c=(l=t==null?void 0:t.e)==null?void 0:l.srcEvent)==null?void 0:c.srcElement);e!=null&&e.id&&(f=this.scene)!=null&&f.isBelongsToAssetType(e==null?void 0:e.id)&&this.dispatchEvent({type:"SELECTED",data:{...t.data,target:[e],selected:[e==null?void 0:e.id]}})}handleControllerPanStart(t){(t==null?void 0:t.type)===Dt.PAN_START&&this.multiSelectEnable&&(this.p1.copy(t.data.screenCoords),ei.makeEmpty().expandByPoint(this.p1),this.graph.draw(ei))}handleControllerPanMove(t){(t==null?void 0:t.type)===Dt.PAN_MOVE&&this.multiSelectEnable&&(this.p2.copy(t.data.screenCoords),ei.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(ei))}handleControllerPanEnd(t){var a;if((t==null?void 0:t.type)!==Dt.PAN_END||!this.multiSelectEnable)return;this.p2.copy(t.data.screenCoords),ei.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera);const e=(a=this.scene)==null?void 0:a.getElementsByBox(ei),i=[];(e||[]).forEach(o=>i.push(o.id)),this.graph.hide(),ei.makeEmpty(),this.dispatchEvent({type:"SELECTED",data:{target:e,selected:i}})}}var co=(n=>(n.SELECTED="SELECTED",n))(co||{});const ei=new It;var ri=(n=>(n.DEFAULT="default",n.INFO="info",n.PRIMARY="primary",n.SUCCESS="success",n.WARNING="warning",n.DANGER="danger",n))(ri||{});class f0{camera;screenCoords=new G;worldCoords=new G;params={Shape:{},Line:{threshold:1},Points:{threshold:1},Sprite:{}};constructor(){}setFromCamera(t,e){return this.camera=e,this.screenCoords.set(t.x,t.y),this.worldCoords.copy(this.screenCoords).unproject(e),this}intersectObjects(t,e=!0,i=[]){for(let a=0,o=t.length;a<o;a++)this.intersectObject(t[a],e,i)}intersectObject(t,e=!1,i=[]){if(!t.selectable||(t.raycast(this,i),!e||t.composeNode))return i;for(let a=0,o=t.children.length;a<o;a++)this.intersectObject(t.children[a],e,i);return i}}var Fe="top",or="bottom",lr="right",ke="left",fo="auto",Fs=[Fe,or,lr,ke],qi="start",ks="end",p0="clippingParents",Ac="viewport",Us="popper",d0="reference",wc=Fs.reduce(function(n,t){return n.concat([t+"-"+qi,t+"-"+ks])},[]),Dc=[].concat(Fs,[fo]).reduce(function(n,t){return n.concat([t,t+"-"+qi,t+"-"+ks])},[]),g0="beforeRead",m0="read",v0="afterRead",y0="beforeMain",x0="main",E0="afterMain",b0="beforeWrite",A0="write",w0="afterWrite",D0=[g0,m0,v0,y0,x0,E0,b0,A0,w0];function Vr(n){return n?(n.nodeName||"").toLowerCase():null}function je(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function ni(n){var t=je(n).Element;return n instanceof t||n instanceof Element}function hr(n){var t=je(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function po(n){if(typeof ShadowRoot>"u")return!1;var t=je(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function _0(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},a=t.attributes[e]||{},o=t.elements[e];!hr(o)||!Vr(o)||(Object.assign(o.style,i),Object.keys(a).forEach(function(l){var c=a[l];c===!1?o.removeAttribute(l):o.setAttribute(l,c===!0?"":c)}))})}function T0(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(i){var a=t.elements[i],o=t.attributes[i]||{},l=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:e[i]),c=l.reduce(function(f,v){return f[v]="",f},{});!hr(a)||!Vr(a)||(Object.assign(a.style,c),Object.keys(o).forEach(function(f){a.removeAttribute(f)}))})}}const _c={name:"applyStyles",enabled:!0,phase:"write",fn:_0,effect:T0,requires:["computeStyles"]};function zr(n){return n.split("-")[0]}var ii=Math.max,Pa=Math.min,Wi=Math.round;function go(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Tc(){return!/^((?!chrome|android).)*safari/i.test(go())}function Vi(n,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var i=n.getBoundingClientRect(),a=1,o=1;t&&hr(n)&&(a=n.offsetWidth>0&&Wi(i.width)/n.offsetWidth||1,o=n.offsetHeight>0&&Wi(i.height)/n.offsetHeight||1);var l=ni(n)?je(n):window,c=l.visualViewport,f=!Tc()&&e,v=(i.left+(f&&c?c.offsetLeft:0))/a,x=(i.top+(f&&c?c.offsetTop:0))/o,D=i.width/a,C=i.height/o;return{width:D,height:C,top:x,right:v+D,bottom:x+C,left:v,x:v,y:x}}function mo(n){var t=Vi(n),e=n.offsetWidth,i=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:i}}function Cc(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&po(e)){var i=t;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ln(n){return je(n).getComputedStyle(n)}function C0(n){return["table","td","th"].indexOf(Vr(n))>=0}function Mn(n){return((ni(n)?n.ownerDocument:n.document)||window.document).documentElement}function Fa(n){return Vr(n)==="html"?n:n.assignedSlot||n.parentNode||(po(n)?n.host:null)||Mn(n)}function Sc(n){return!hr(n)||ln(n).position==="fixed"?null:n.offsetParent}function S0(n){var t=/firefox/i.test(go()),e=/Trident/i.test(go());if(e&&hr(n)){var i=ln(n);if(i.position==="fixed")return null}var a=Fa(n);for(po(a)&&(a=a.host);hr(a)&&["html","body"].indexOf(Vr(a))<0;){var o=ln(a);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return a;a=a.parentNode}return null}function Hs(n){for(var t=je(n),e=Sc(n);e&&C0(e)&&ln(e).position==="static";)e=Sc(e);return e&&(Vr(e)==="html"||Vr(e)==="body"&&ln(e).position==="static")?t:e||S0(n)||t}function vo(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function qs(n,t,e){return ii(n,Pa(t,e))}function O0(n,t,e){var i=qs(n,t,e);return i>e?e:i}function Oc(){return{top:0,right:0,bottom:0,left:0}}function Nc(n){return Object.assign({},Oc(),n)}function Mc(n,t){return t.reduce(function(e,i){return e[i]=n,e},{})}var N0=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,Nc(typeof t!="number"?t:Mc(t,Fs))};function M0(n){var t,e=n.state,i=n.name,a=n.options,o=e.elements.arrow,l=e.modifiersData.popperOffsets,c=zr(e.placement),f=vo(c),v=[ke,lr].indexOf(c)>=0,x=v?"height":"width";if(!(!o||!l)){var D=N0(a.padding,e),C=mo(o),S=f==="y"?Fe:ke,H=f==="y"?or:lr,I=e.rects.reference[x]+e.rects.reference[f]-l[f]-e.rects.popper[x],B=l[f]-e.rects.reference[f],F=Hs(o),W=F?f==="y"?F.clientHeight||0:F.clientWidth||0:0,Y=I/2-B/2,A=D[S],$=W-C[x]-D[H],q=W/2-C[x]/2+Y,tt=qs(A,q,$),ot=f;e.modifiersData[i]=(t={},t[ot]=tt,t.centerOffset=tt-q,t)}}function B0(n){var t=n.state,e=n.options,i=e.element,a=i===void 0?"[data-popper-arrow]":i;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||Cc(t.elements.popper,a)&&(t.elements.arrow=a))}const I0={name:"arrow",enabled:!0,phase:"main",fn:M0,effect:B0,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function zi(n){return n.split("-")[1]}var L0={top:"auto",right:"auto",bottom:"auto",left:"auto"};function R0(n,t){var e=n.x,i=n.y,a=t.devicePixelRatio||1;return{x:Wi(e*a)/a||0,y:Wi(i*a)/a||0}}function Bc(n){var t,e=n.popper,i=n.popperRect,a=n.placement,o=n.variation,l=n.offsets,c=n.position,f=n.gpuAcceleration,v=n.adaptive,x=n.roundOffsets,D=n.isFixed,C=l.x,S=C===void 0?0:C,H=l.y,I=H===void 0?0:H,B=typeof x=="function"?x({x:S,y:I}):{x:S,y:I};S=B.x,I=B.y;var F=l.hasOwnProperty("x"),W=l.hasOwnProperty("y"),Y=ke,A=Fe,$=window;if(v){var q=Hs(e),tt="clientHeight",ot="clientWidth";if(q===je(e)&&(q=Mn(e),ln(q).position!=="static"&&c==="absolute"&&(tt="scrollHeight",ot="scrollWidth")),q=q,a===Fe||(a===ke||a===lr)&&o===ks){A=or;var K=D&&q===$&&$.visualViewport?$.visualViewport.height:q[tt];I-=K-i.height,I*=f?1:-1}if(a===ke||(a===Fe||a===or)&&o===ks){Y=lr;var nt=D&&q===$&&$.visualViewport?$.visualViewport.width:q[ot];S-=nt-i.width,S*=f?1:-1}}var J=Object.assign({position:c},v&&L0),it=x===!0?R0({x:S,y:I},je(e)):{x:S,y:I};if(S=it.x,I=it.y,f){var ht;return Object.assign({},J,(ht={},ht[A]=W?"0":"",ht[Y]=F?"0":"",ht.transform=($.devicePixelRatio||1)<=1?"translate("+S+"px, "+I+"px)":"translate3d("+S+"px, "+I+"px, 0)",ht))}return Object.assign({},J,(t={},t[A]=W?I+"px":"",t[Y]=F?S+"px":"",t.transform="",t))}function P0(n){var t=n.state,e=n.options,i=e.gpuAcceleration,a=i===void 0?!0:i,o=e.adaptive,l=o===void 0?!0:o,c=e.roundOffsets,f=c===void 0?!0:c,v={placement:zr(t.placement),variation:zi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Bc(Object.assign({},v,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Bc(Object.assign({},v,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const F0={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:P0,data:{}};var ka={passive:!0};function k0(n){var t=n.state,e=n.instance,i=n.options,a=i.scroll,o=a===void 0?!0:a,l=i.resize,c=l===void 0?!0:l,f=je(t.elements.popper),v=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&v.forEach(function(x){x.addEventListener("scroll",e.update,ka)}),c&&f.addEventListener("resize",e.update,ka),function(){o&&v.forEach(function(x){x.removeEventListener("scroll",e.update,ka)}),c&&f.removeEventListener("resize",e.update,ka)}}const U0={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:k0,data:{}};var H0={left:"right",right:"left",bottom:"top",top:"bottom"};function Ua(n){return n.replace(/left|right|bottom|top/g,function(t){return H0[t]})}var q0={start:"end",end:"start"};function Ic(n){return n.replace(/start|end/g,function(t){return q0[t]})}function yo(n){var t=je(n),e=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:e,scrollTop:i}}function xo(n){return Vi(Mn(n)).left+yo(n).scrollLeft}function W0(n,t){var e=je(n),i=Mn(n),a=e.visualViewport,o=i.clientWidth,l=i.clientHeight,c=0,f=0;if(a){o=a.width,l=a.height;var v=Tc();(v||!v&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}return{width:o,height:l,x:c+xo(n),y:f}}function V0(n){var t,e=Mn(n),i=yo(n),a=(t=n.ownerDocument)==null?void 0:t.body,o=ii(e.scrollWidth,e.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),l=ii(e.scrollHeight,e.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),c=-i.scrollLeft+xo(n),f=-i.scrollTop;return ln(a||e).direction==="rtl"&&(c+=ii(e.clientWidth,a?a.clientWidth:0)-o),{width:o,height:l,x:c,y:f}}function Eo(n){var t=ln(n),e=t.overflow,i=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+a+i)}function Lc(n){return["html","body","#document"].indexOf(Vr(n))>=0?n.ownerDocument.body:hr(n)&&Eo(n)?n:Lc(Fa(n))}function Ws(n,t){var e;t===void 0&&(t=[]);var i=Lc(n),a=i===((e=n.ownerDocument)==null?void 0:e.body),o=je(i),l=a?[o].concat(o.visualViewport||[],Eo(i)?i:[]):i,c=t.concat(l);return a?c:c.concat(Ws(Fa(l)))}function bo(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function z0(n,t){var e=Vi(n,!1,t==="fixed");return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}function Rc(n,t,e){return t===Ac?bo(W0(n,e)):ni(t)?z0(t,e):bo(V0(Mn(n)))}function $0(n){var t=Ws(Fa(n)),e=["absolute","fixed"].indexOf(ln(n).position)>=0,i=e&&hr(n)?Hs(n):n;return ni(i)?t.filter(function(a){return ni(a)&&Cc(a,i)&&Vr(a)!=="body"}):[]}function G0(n,t,e,i){var a=t==="clippingParents"?$0(n):[].concat(t),o=[].concat(a,[e]),l=o[0],c=o.reduce(function(f,v){var x=Rc(n,v,i);return f.top=ii(x.top,f.top),f.right=Pa(x.right,f.right),f.bottom=Pa(x.bottom,f.bottom),f.left=ii(x.left,f.left),f},Rc(n,l,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function Pc(n){var t=n.reference,e=n.element,i=n.placement,a=i?zr(i):null,o=i?zi(i):null,l=t.x+t.width/2-e.width/2,c=t.y+t.height/2-e.height/2,f;switch(a){case Fe:f={x:l,y:t.y-e.height};break;case or:f={x:l,y:t.y+t.height};break;case lr:f={x:t.x+t.width,y:c};break;case ke:f={x:t.x-e.width,y:c};break;default:f={x:t.x,y:t.y}}var v=a?vo(a):null;if(v!=null){var x=v==="y"?"height":"width";switch(o){case qi:f[v]=f[v]-(t[x]/2-e[x]/2);break;case ks:f[v]=f[v]+(t[x]/2-e[x]/2);break}}return f}function Vs(n,t){t===void 0&&(t={});var e=t,i=e.placement,a=i===void 0?n.placement:i,o=e.strategy,l=o===void 0?n.strategy:o,c=e.boundary,f=c===void 0?p0:c,v=e.rootBoundary,x=v===void 0?Ac:v,D=e.elementContext,C=D===void 0?Us:D,S=e.altBoundary,H=S===void 0?!1:S,I=e.padding,B=I===void 0?0:I,F=Nc(typeof B!="number"?B:Mc(B,Fs)),W=C===Us?d0:Us,Y=n.rects.popper,A=n.elements[H?W:C],$=G0(ni(A)?A:A.contextElement||Mn(n.elements.popper),f,x,l),q=Vi(n.elements.reference),tt=Pc({reference:q,element:Y,strategy:"absolute",placement:a}),ot=bo(Object.assign({},Y,tt)),K=C===Us?ot:q,nt={top:$.top-K.top+F.top,bottom:K.bottom-$.bottom+F.bottom,left:$.left-K.left+F.left,right:K.right-$.right+F.right},J=n.modifiersData.offset;if(C===Us&&J){var it=J[a];Object.keys(nt).forEach(function(ht){var dt=[lr,or].indexOf(ht)>=0?1:-1,lt=[Fe,or].indexOf(ht)>=0?"y":"x";nt[ht]+=it[lt]*dt})}return nt}function Y0(n,t){t===void 0&&(t={});var e=t,i=e.placement,a=e.boundary,o=e.rootBoundary,l=e.padding,c=e.flipVariations,f=e.allowedAutoPlacements,v=f===void 0?Dc:f,x=zi(i),D=x?c?wc:wc.filter(function(H){return zi(H)===x}):Fs,C=D.filter(function(H){return v.indexOf(H)>=0});C.length===0&&(C=D);var S=C.reduce(function(H,I){return H[I]=Vs(n,{placement:I,boundary:a,rootBoundary:o,padding:l})[zr(I)],H},{});return Object.keys(S).sort(function(H,I){return S[H]-S[I]})}function X0(n){if(zr(n)===fo)return[];var t=Ua(n);return[Ic(n),t,Ic(t)]}function Z0(n){var t=n.state,e=n.options,i=n.name;if(!t.modifiersData[i]._skip){for(var a=e.mainAxis,o=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!0:l,f=e.fallbackPlacements,v=e.padding,x=e.boundary,D=e.rootBoundary,C=e.altBoundary,S=e.flipVariations,H=S===void 0?!0:S,I=e.allowedAutoPlacements,B=t.options.placement,F=zr(B),W=F===B,Y=f||(W||!H?[Ua(B)]:X0(B)),A=[B].concat(Y).reduce(function(Oe,te){return Oe.concat(zr(te)===fo?Y0(t,{placement:te,boundary:x,rootBoundary:D,padding:v,flipVariations:H,allowedAutoPlacements:I}):te)},[]),$=t.rects.reference,q=t.rects.popper,tt=new Map,ot=!0,K=A[0],nt=0;nt<A.length;nt++){var J=A[nt],it=zr(J),ht=zi(J)===qi,dt=[Fe,or].indexOf(it)>=0,lt=dt?"width":"height",O=Vs(t,{placement:J,boundary:x,rootBoundary:D,altBoundary:C,padding:v}),gt=dt?ht?lr:ke:ht?or:Fe;$[lt]>q[lt]&&(gt=Ua(gt));var Ot=Ua(gt),Se=[];if(o&&Se.push(O[it]<=0),c&&Se.push(O[gt]<=0,O[Ot]<=0),Se.every(function(Oe){return Oe})){K=J,ot=!1;break}tt.set(J,Se)}if(ot)for(var me=H?3:1,Jt=function(te){var Ae=A.find(function(Ht){var Vt=tt.get(Ht);if(Vt)return Vt.slice(0,te).every(function(_t){return _t})});if(Ae)return K=Ae,"break"},he=me;he>0;he--){var Mr=Jt(he);if(Mr==="break")break}t.placement!==K&&(t.modifiersData[i]._skip=!0,t.placement=K,t.reset=!0)}}const j0={name:"flip",enabled:!0,phase:"main",fn:Z0,requiresIfExists:["offset"],data:{_skip:!1}};function Fc(n,t,e){return e===void 0&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function kc(n){return[Fe,lr,or,ke].some(function(t){return n[t]>=0})}function Q0(n){var t=n.state,e=n.name,i=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,l=Vs(t,{elementContext:"reference"}),c=Vs(t,{altBoundary:!0}),f=Fc(l,i),v=Fc(c,a,o),x=kc(f),D=kc(v);t.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:v,isReferenceHidden:x,hasPopperEscaped:D},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":x,"data-popper-escaped":D})}const K0={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Q0};function J0(n,t,e){var i=zr(n),a=[ke,Fe].indexOf(i)>=0?-1:1,o=typeof e=="function"?e(Object.assign({},t,{placement:n})):e,l=o[0],c=o[1];return l=l||0,c=(c||0)*a,[ke,lr].indexOf(i)>=0?{x:c,y:l}:{x:l,y:c}}function t2(n){var t=n.state,e=n.options,i=n.name,a=e.offset,o=a===void 0?[0,0]:a,l=Dc.reduce(function(x,D){return x[D]=J0(D,t.rects,o),x},{}),c=l[t.placement],f=c.x,v=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=v),t.modifiersData[i]=l}const e2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:t2};function r2(n){var t=n.state,e=n.name;t.modifiersData[e]=Pc({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const n2={name:"popperOffsets",enabled:!0,phase:"read",fn:r2,data:{}};function i2(n){return n==="x"?"y":"x"}function s2(n){var t=n.state,e=n.options,i=n.name,a=e.mainAxis,o=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!1:l,f=e.boundary,v=e.rootBoundary,x=e.altBoundary,D=e.padding,C=e.tether,S=C===void 0?!0:C,H=e.tetherOffset,I=H===void 0?0:H,B=Vs(t,{boundary:f,rootBoundary:v,padding:D,altBoundary:x}),F=zr(t.placement),W=zi(t.placement),Y=!W,A=vo(F),$=i2(A),q=t.modifiersData.popperOffsets,tt=t.rects.reference,ot=t.rects.popper,K=typeof I=="function"?I(Object.assign({},t.rects,{placement:t.placement})):I,nt=typeof K=="number"?{mainAxis:K,altAxis:K}:Object.assign({mainAxis:0,altAxis:0},K),J=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,it={x:0,y:0};if(q){if(o){var ht,dt=A==="y"?Fe:ke,lt=A==="y"?or:lr,O=A==="y"?"height":"width",gt=q[A],Ot=gt+B[dt],Se=gt-B[lt],me=S?-ot[O]/2:0,Jt=W===qi?tt[O]:ot[O],he=W===qi?-ot[O]:-tt[O],Mr=t.elements.arrow,Oe=S&&Mr?mo(Mr):{width:0,height:0},te=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Oc(),Ae=te[dt],Ht=te[lt],Vt=qs(0,tt[O],Oe[O]),_t=Y?tt[O]/2-me-Vt-Ae-nt.mainAxis:Jt-Vt-Ae-nt.mainAxis,Ft=Y?-tt[O]/2+me+Vt+Ht+nt.mainAxis:he+Vt+Ht+nt.mainAxis,we=t.elements.arrow&&Hs(t.elements.arrow),Ne=we?A==="y"?we.clientTop||0:we.clientLeft||0:0,Ue=(ht=J==null?void 0:J[A])!=null?ht:0,Gt=gt+_t-Ue-Ne,De=gt+Ft-Ue,ce=qs(S?Pa(Ot,Gt):Ot,gt,S?ii(Se,De):Se);q[A]=ce,it[A]=ce-gt}if(c){var zt,Yr=A==="x"?Fe:ke,cn=A==="x"?or:lr,ee=q[$],Tt=$==="y"?"height":"width",Ke=ee+B[Yr],He=ee-B[cn],fn=[Fe,ke].indexOf(F)!==-1,cr=(zt=J==null?void 0:J[$])!=null?zt:0,Ln=fn?Ke:ee-tt[Tt]-ot[Tt]-cr+nt.altAxis,Je=fn?ee+tt[Tt]+ot[Tt]-cr-nt.altAxis:He,qe=S&&fn?O0(Ln,ee,Je):qs(S?Ln:Ke,ee,S?Je:He);q[$]=qe,it[$]=qe-ee}t.modifiersData[i]=it}}const a2={name:"preventOverflow",enabled:!0,phase:"main",fn:s2,requiresIfExists:["offset"]};function u2(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function o2(n){return n===je(n)||!hr(n)?yo(n):u2(n)}function l2(n){var t=n.getBoundingClientRect(),e=Wi(t.width)/n.offsetWidth||1,i=Wi(t.height)/n.offsetHeight||1;return e!==1||i!==1}function h2(n,t,e){e===void 0&&(e=!1);var i=hr(t),a=hr(t)&&l2(t),o=Mn(t),l=Vi(n,a,e),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!e)&&((Vr(t)!=="body"||Eo(o))&&(c=o2(t)),hr(t)?(f=Vi(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):o&&(f.x=xo(o))),{x:l.left+c.scrollLeft-f.x,y:l.top+c.scrollTop-f.y,width:l.width,height:l.height}}function c2(n){var t=new Map,e=new Set,i=[];n.forEach(function(o){t.set(o.name,o)});function a(o){e.add(o.name);var l=[].concat(o.requires||[],o.requiresIfExists||[]);l.forEach(function(c){if(!e.has(c)){var f=t.get(c);f&&a(f)}}),i.push(o)}return n.forEach(function(o){e.has(o.name)||a(o)}),i}function f2(n){var t=c2(n);return D0.reduce(function(e,i){return e.concat(t.filter(function(a){return a.phase===i}))},[])}function p2(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}function d2(n){var t=n.reduce(function(e,i){var a=e[i.name];return e[i.name]=a?Object.assign({},a,i,{options:Object.assign({},a.options,i.options),data:Object.assign({},a.data,i.data)}):i,e},{});return Object.keys(t).map(function(e){return t[e]})}var Uc={placement:"bottom",modifiers:[],strategy:"absolute"};function Hc(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function g2(n){n===void 0&&(n={});var t=n,e=t.defaultModifiers,i=e===void 0?[]:e,a=t.defaultOptions,o=a===void 0?Uc:a;return function(c,f,v){v===void 0&&(v=o);var x={placement:"bottom",orderedModifiers:[],options:Object.assign({},Uc,o),modifiersData:{},elements:{reference:c,popper:f},attributes:{},styles:{}},D=[],C=!1,S={state:x,setOptions:function(F){var W=typeof F=="function"?F(x.options):F;I(),x.options=Object.assign({},o,x.options,W),x.scrollParents={reference:ni(c)?Ws(c):c.contextElement?Ws(c.contextElement):[],popper:Ws(f)};var Y=f2(d2([].concat(i,x.options.modifiers)));return x.orderedModifiers=Y.filter(function(A){return A.enabled}),H(),S.update()},forceUpdate:function(){if(!C){var F=x.elements,W=F.reference,Y=F.popper;if(Hc(W,Y)){x.rects={reference:h2(W,Hs(Y),x.options.strategy==="fixed"),popper:mo(Y)},x.reset=!1,x.placement=x.options.placement,x.orderedModifiers.forEach(function(nt){return x.modifiersData[nt.name]=Object.assign({},nt.data)});for(var A=0;A<x.orderedModifiers.length;A++){if(x.reset===!0){x.reset=!1,A=-1;continue}var $=x.orderedModifiers[A],q=$.fn,tt=$.options,ot=tt===void 0?{}:tt,K=$.name;typeof q=="function"&&(x=q({state:x,options:ot,name:K,instance:S})||x)}}}},update:p2(function(){return new Promise(function(B){S.forceUpdate(),B(x)})}),destroy:function(){I(),C=!0}};if(!Hc(c,f))return S;S.setOptions(v).then(function(B){!C&&v.onFirstUpdate&&v.onFirstUpdate(B)});function H(){x.orderedModifiers.forEach(function(B){var F=B.name,W=B.options,Y=W===void 0?{}:W,A=B.effect;if(typeof A=="function"){var $=A({state:x,name:F,instance:S,options:Y}),q=function(){};D.push($||q)}})}function I(){D.forEach(function(B){return B()}),D=[]}return S}}var m2=[U0,n2,F0,_c,e2,j0,a2,I0,K0],v2=g2({defaultModifiers:m2}),y2="tippy-box",qc="tippy-content",x2="tippy-backdrop",Wc="tippy-arrow",Vc="tippy-svg-arrow",si={passive:!0,capture:!0},zc=function(){return document.body};function E2(n,t){return{}.hasOwnProperty.call(n,t)}function Ao(n,t,e){if(Array.isArray(n)){var i=n[t];return i??(Array.isArray(e)?e[t]:e)}return n}function wo(n,t){var e={}.toString.call(n);return e.indexOf("[object")===0&&e.indexOf(t+"]")>-1}function $c(n,t){return typeof n=="function"?n.apply(void 0,t):n}function Gc(n,t){if(t===0)return n;var e;return function(i){clearTimeout(e),e=setTimeout(function(){n(i)},t)}}function b2(n,t){var e=Object.assign({},n);return t.forEach(function(i){delete e[i]}),e}function A2(n){return n.split(/\s+/).filter(Boolean)}function $i(n){return[].concat(n)}function Yc(n,t){n.indexOf(t)===-1&&n.push(t)}function w2(n){return n.filter(function(t,e){return n.indexOf(t)===e})}function D2(n){return n.split("-")[0]}function Ha(n){return[].slice.call(n)}function Xc(n){return Object.keys(n).reduce(function(t,e){return n[e]!==void 0&&(t[e]=n[e]),t},{})}function zs(){return document.createElement("div")}function $s(n){return["Element","Fragment"].some(function(t){return wo(n,t)})}function _2(n){return wo(n,"NodeList")}function T2(n){return wo(n,"MouseEvent")}function C2(n){return!!(n&&n._tippy&&n._tippy.reference===n)}function S2(n){return $s(n)?[n]:_2(n)?Ha(n):Array.isArray(n)?n:Ha(document.querySelectorAll(n))}function Do(n,t){n.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Zc(n,t){n.forEach(function(e){e&&e.setAttribute("data-state",t)})}function O2(n){var t,e=$i(n),i=e[0];return i!=null&&(t=i.ownerDocument)!=null&&t.body?i.ownerDocument:document}function N2(n,t){var e=t.clientX,i=t.clientY;return n.every(function(a){var o=a.popperRect,l=a.popperState,c=a.props,f=c.interactiveBorder,v=D2(l.placement),x=l.modifiersData.offset;if(!x)return!0;var D=v==="bottom"?x.top.y:0,C=v==="top"?x.bottom.y:0,S=v==="right"?x.left.x:0,H=v==="left"?x.right.x:0,I=o.top-i+D>f,B=i-o.bottom-C>f,F=o.left-e+S>f,W=e-o.right-H>f;return I||B||F||W})}function _o(n,t,e){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(a){n[i](a,e)})}function jc(n,t){for(var e=t;e;){var i;if(n.contains(e))return!0;e=e.getRootNode==null||(i=e.getRootNode())==null?void 0:i.host}return!1}var $r={isTouch:!1},Qc=0;function M2(){$r.isTouch||($r.isTouch=!0,window.performance&&document.addEventListener("mousemove",Kc))}function Kc(){var n=performance.now();n-Qc<20&&($r.isTouch=!1,document.removeEventListener("mousemove",Kc)),Qc=n}function B2(){var n=document.activeElement;if(C2(n)){var t=n._tippy;n.blur&&!t.state.isVisible&&n.blur()}}function I2(){document.addEventListener("touchstart",M2,si),window.addEventListener("blur",B2)}var L2=typeof window<"u"&&typeof document<"u",R2=L2?!!window.msCrypto:!1;function Gi(n){var t=n==="destroy"?"n already-":" ";return[n+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Jc(n){var t=/[ \t]{2,}/g,e=/^[ \t]*/gm;return n.replace(t," ").replace(e,"").trim()}function P2(n){return Jc(`
52
+ `;return function(){var G=new Error("get-stack-trace"),K=G&&G.stack?G.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",mt=t.console&&(t.console.warn||t.console.log);return mt&&mt.call(t.console,B,K),g.apply(this,arguments)}}var N;typeof Object.assign!="function"?N=function(x){if(x===a||x===null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(x),B=1;B<arguments.length;B++){var G=arguments[B];if(G!==a&&G!==null)for(var K in G)G.hasOwnProperty(K)&&(b[K]=G[K])}return b}:N=Object.assign;var M=F(function(x,b,B){for(var G=Object.keys(b),K=0;K<G.length;)(!B||B&&x[G[K]]===a)&&(x[G[K]]=b[G[K]]),K++;return x},"extend","Use `assign`."),R=F(function(x,b){return M(x,b,!0)},"merge","Use `assign`.");function q(g,x,b){var B=x.prototype,G;G=g.prototype=Object.create(B),G.constructor=g,G._super=B,b&&N(G,b)}function z(g,x){return function(){return g.apply(x,arguments)}}function w(g,x){return typeof g==c?g.apply(x&&x[0]||a,x):g}function L(g,x){return g===a?x:g}function k(g,x,b){C(rt(x),function(B){g.addEventListener(B,b,!1)})}function j(g,x,b){C(rt(x),function(B){g.removeEventListener(B,b,!1)})}function tt(g,x){for(;g;){if(g==x)return!0;g=g.parentNode}return!1}function Z(g,x){return g.indexOf(x)>-1}function rt(g){return g.trim().split(/\s+/g)}function J(g,x,b){if(g.indexOf&&!b)return g.indexOf(x);for(var B=0;B<g.length;){if(b&&g[B][b]==x||!b&&g[B]===x)return B;B++}return-1}function st(g){return Array.prototype.slice.call(g,0)}function ht(g,x,b){for(var B=[],G=[],K=0;K<g.length;){var mt=g[K][x];J(G,mt)<0&&B.push(g[K]),G[K]=mt,K++}return B=B.sort(function(oe,xe){return oe[x]>xe[x]}),B}function ct(g,x){for(var b,B,G=x[0].toUpperCase()+x.slice(1),K=0;K<u.length;){if(b=u[K],B=b?b+G:x,B in g)return B;K++}return a}var ft=1;function O(){return ft++}function yt(g){var x=g.ownerDocument||g;return x.defaultView||x.parentWindow||t}var Bt=/mobile|tablet|ip(ad|hone|od)|android/i,Re="ontouchstart"in t,be=ct(t,"PointerEvent")!==a,se=Re&&Bt.test(navigator.userAgent),ve="touch",qr="pen",Le="mouse",ae="kinect",Se=25,Vt=1,Gt=2,Ct=4,Ht=8,Oe=1,Pe=2,ze=4,Qt=8,Ne=16,me=Pe|ze,Yt=Qt|Ne,ii=me|Yt,Ai=["x","y"],ue=["clientX","clientY"];function Dt(g,x){var b=this;this.manager=g,this.callback=x,this.element=g.element,this.target=g.options.inputTarget,this.domHandler=function(B){w(g.options.enable,[g])&&b.handler(B)},this.init()}Dt.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(yt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&j(this.element,this.evEl,this.domHandler),this.evTarget&&j(this.target,this.evTarget,this.domHandler),this.evWin&&j(yt(this.element),this.evWin,this.domHandler)}};function nr(g){var x,b=g.options.inputClass;return b?x=b:be?x=ar:se?x=Ki:Re?x=ha:x=vt,new x(g,Ge)}function Ge(g,x,b){var B=b.pointers.length,G=b.changedPointers.length,K=x&Vt&&B-G===0,mt=x&(Ct|Ht)&&B-G===0;b.isFirst=!!K,b.isFinal=!!mt,K&&(g.session={}),b.eventType=x,bi(g,b),g.emit("hammer.input",b),g.recognize(b),g.session.prevInput=b}function bi(g,x){var b=g.session,B=x.pointers,G=B.length;b.firstInput||(b.firstInput=sr(x)),G>1&&!b.firstMultiple?b.firstMultiple=sr(x):G===1&&(b.firstMultiple=!1);var K=b.firstInput,mt=b.firstMultiple,Jt=mt?mt.center:K.center,oe=x.center=Ye(B);x.timeStamp=y(),x.deltaTime=x.timeStamp-K.timeStamp,x.angle=wi(Jt,oe),x.distance=ni(Jt,oe),mr(b,x),x.offsetDirection=Xi(x.deltaX,x.deltaY);var xe=Yi(x.deltaTime,x.deltaX,x.deltaY);x.overallVelocityX=xe.x,x.overallVelocityY=xe.y,x.overallVelocity=d(xe.x)>d(xe.y)?xe.x:xe.y,x.scale=mt?P(mt.pointers,B):1,x.rotation=mt?bn(mt.pointers,B):0,x.maxPointers=b.prevInput?x.pointers.length>b.prevInput.maxPointers?x.pointers.length:b.prevInput.maxPointers:x.pointers.length,Gi(b,x);var Ar=g.element;tt(x.srcEvent.target,Ar)&&(Ar=x.srcEvent.target),x.target=Ar}function mr(g,x){var b=x.center,B=g.offsetDelta||{},G=g.prevDelta||{},K=g.prevInput||{};(x.eventType===Vt||K.eventType===Ct)&&(G=g.prevDelta={x:K.deltaX||0,y:K.deltaY||0},B=g.offsetDelta={x:b.x,y:b.y}),x.deltaX=G.x+(b.x-B.x),x.deltaY=G.y+(b.y-B.y)}function Gi(g,x){var b=g.lastInterval||x,B=x.timeStamp-b.timeStamp,G,K,mt,Jt;if(x.eventType!=Ht&&(B>Se||b.velocity===a)){var oe=x.deltaX-b.deltaX,xe=x.deltaY-b.deltaY,Ar=Yi(B,oe,xe);K=Ar.x,mt=Ar.y,G=d(Ar.x)>d(Ar.y)?Ar.x:Ar.y,Jt=Xi(oe,xe),g.lastInterval=x}else G=b.velocity,K=b.velocityX,mt=b.velocityY,Jt=b.direction;x.velocity=G,x.velocityX=K,x.velocityY=mt,x.direction=Jt}function sr(g){for(var x=[],b=0;b<g.pointers.length;)x[b]={clientX:f(g.pointers[b].clientX),clientY:f(g.pointers[b].clientY)},b++;return{timeStamp:y(),pointers:x,center:Ye(x),deltaX:g.deltaX,deltaY:g.deltaY}}function Ye(g){var x=g.length;if(x===1)return{x:f(g[0].clientX),y:f(g[0].clientY)};for(var b=0,B=0,G=0;G<x;)b+=g[G].clientX,B+=g[G].clientY,G++;return{x:f(b/x),y:f(B/x)}}function Yi(g,x,b){return{x:x/g||0,y:b/g||0}}function Xi(g,x){return g===x?Oe:d(g)>=d(x)?g<0?Pe:ze:x<0?Qt:Ne}function ni(g,x,b){b||(b=Ai);var B=x[b[0]]-g[b[0]],G=x[b[1]]-g[b[1]];return Math.sqrt(B*B+G*G)}function wi(g,x,b){b||(b=Ai);var B=x[b[0]]-g[b[0]],G=x[b[1]]-g[b[1]];return Math.atan2(G,B)*180/Math.PI}function bn(g,x){return wi(x[1],x[0],ue)+wi(g[1],g[0],ue)}function P(g,x){return ni(x[0],x[1],ue)/ni(g[0],g[1],ue)}var it={mousedown:Vt,mousemove:Gt,mouseup:Ct},at="mousedown",wt="mousemove mouseup";function vt(){this.evEl=at,this.evWin=wt,this.pressed=!1,Dt.apply(this,arguments)}q(vt,Dt,{handler:function(x){var b=it[x.type];b&Vt&&x.button===0&&(this.pressed=!0),b&Gt&&x.which!==1&&(b=Ct),this.pressed&&(b&Ct&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[x],changedPointers:[x],pointerType:Le,srcEvent:x}))}});var fe={pointerdown:Vt,pointermove:Gt,pointerup:Ct,pointercancel:Ht,pointerout:Ht},Me={2:ve,3:qr,4:Le,5:ae},xr="pointerdown",Zi="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(xr="MSPointerDown",Zi="MSPointerMove MSPointerUp MSPointerCancel");function ar(){this.evEl=xr,this.evWin=Zi,Dt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}q(ar,Dt,{handler:function(x){var b=this.store,B=!1,G=x.type.toLowerCase().replace("ms",""),K=fe[G],mt=Me[x.pointerType]||x.pointerType,Jt=mt==ve,oe=J(b,x.pointerId,"pointerId");K&Vt&&(x.button===0||Jt)?oe<0&&(b.push(x),oe=b.length-1):K&(Ct|Ht)&&(B=!0),!(oe<0)&&(b[oe]=x,this.callback(this.manager,K,{pointers:b,changedPointers:[x],pointerType:mt,srcEvent:x}),B&&b.splice(oe,1))}});var wn={touchstart:Vt,touchmove:Gt,touchend:Ct,touchcancel:Ht},Qi="touchstart",si="touchstart touchmove touchend touchcancel";function Tn(){this.evTarget=Qi,this.evWin=si,this.started=!1,Dt.apply(this,arguments)}q(Tn,Dt,{handler:function(x){var b=wn[x.type];if(b===Vt&&(this.started=!0),!!this.started){var B=_n.call(this,x,b);b&(Ct|Ht)&&B[0].length-B[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:B[0],changedPointers:B[1],pointerType:ve,srcEvent:x})}}});function _n(g,x){var b=st(g.touches),B=st(g.changedTouches);return x&(Ct|Ht)&&(b=ht(b.concat(B),"identifier")),[b,B]}var ji={touchstart:Vt,touchmove:Gt,touchend:Ct,touchcancel:Ht},el="touchstart touchmove touchend touchcancel";function Ki(){this.evTarget=el,this.targetIds={},Dt.apply(this,arguments)}q(Ki,Dt,{handler:function(x){var b=ji[x.type],B=rl.call(this,x,b);B&&this.callback(this.manager,b,{pointers:B[0],changedPointers:B[1],pointerType:ve,srcEvent:x})}});function rl(g,x){var b=st(g.touches),B=this.targetIds;if(x&(Vt|Gt)&&b.length===1)return B[b[0].identifier]=!0,[b,b];var G,K,mt=st(g.changedTouches),Jt=[],oe=this.target;if(K=b.filter(function(xe){return tt(xe.target,oe)}),x===Vt)for(G=0;G<K.length;)B[K[G].identifier]=!0,G++;for(G=0;G<mt.length;)B[mt[G].identifier]&&Jt.push(mt[G]),x&(Ct|Ht)&&delete B[mt[G].identifier],G++;if(Jt.length)return[ht(K.concat(Jt),"identifier"),Jt]}var la=2500,su=25;function ha(){Dt.apply(this,arguments);var g=z(this.handler,this);this.touch=new Ki(this.manager,g),this.mouse=new vt(this.manager,g),this.primaryTouch=null,this.lastTouches=[]}q(ha,Dt,{handler:function(x,b,B){var G=B.pointerType==ve,K=B.pointerType==Le;if(!(K&&B.sourceCapabilities&&B.sourceCapabilities.firesTouchEvents)){if(G)il.call(this,b,B);else if(K&&nl.call(this,B))return;this.callback(x,b,B)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function il(g,x){g&Vt?(this.primaryTouch=x.changedPointers[0].identifier,au.call(this,x)):g&(Ct|Ht)&&au.call(this,x)}function au(g){var x=g.changedPointers[0];if(x.identifier===this.primaryTouch){var b={x:x.clientX,y:x.clientY};this.lastTouches.push(b);var B=this.lastTouches,G=function(){var K=B.indexOf(b);K>-1&&B.splice(K,1)};setTimeout(G,la)}}function nl(g){for(var x=g.srcEvent.clientX,b=g.srcEvent.clientY,B=0;B<this.lastTouches.length;B++){var G=this.lastTouches[B],K=Math.abs(x-G.x),mt=Math.abs(b-G.y);if(K<=su&&mt<=su)return!0}return!1}var uu=ct(l.style,"touchAction"),ou=uu!==a,lu="compute",ca="auto",fa="manipulation",Ti="none",Cn="pan-x",Dn="pan-y",os=sl();function pa(g,x){this.manager=g,this.set(x)}pa.prototype={set:function(g){g==lu&&(g=this.compute()),ou&&this.manager.element.style&&os[g]&&(this.manager.element.style[uu]=g),this.actions=g.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var g=[];return C(this.manager.recognizers,function(x){w(x.options.enable,[x])&&(g=g.concat(x.getTouchAction()))}),ls(g.join(" "))},preventDefaults:function(g){var x=g.srcEvent,b=g.offsetDirection;if(this.manager.session.prevented){x.preventDefault();return}var B=this.actions,G=Z(B,Ti)&&!os[Ti],K=Z(B,Dn)&&!os[Dn],mt=Z(B,Cn)&&!os[Cn];if(G){var Jt=g.pointers.length===1,oe=g.distance<2,xe=g.deltaTime<250;if(Jt&&oe&&xe)return}if(!(mt&&K)&&(G||K&&b&me||mt&&b&Yt))return this.preventSrc(x)},preventSrc:function(g){this.manager.session.prevented=!0,g.preventDefault()}};function ls(g){if(Z(g,Ti))return Ti;var x=Z(g,Cn),b=Z(g,Dn);return x&&b?Ti:x||b?x?Cn:Dn:Z(g,fa)?fa:ca}function sl(){if(!ou)return!1;var g={},x=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(b){g[b]=x?t.CSS.supports("touch-action",b):!0}),g}var _i=1,Xe=2,Ji=4,ai=8,Er=ai,tn=16,ur=32;function Wr(g){this.options=N({},this.defaults,g||{}),this.id=O(),this.manager=null,this.options.enable=L(this.options.enable,!0),this.state=_i,this.simultaneous={},this.requireFail=[]}Wr.prototype={defaults:{},set:function(g){return N(this.options,g),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(g){if(_(g,"recognizeWith",this))return this;var x=this.simultaneous;return g=hs(g,this),x[g.id]||(x[g.id]=g,g.recognizeWith(this)),this},dropRecognizeWith:function(g){return _(g,"dropRecognizeWith",this)?this:(g=hs(g,this),delete this.simultaneous[g.id],this)},requireFailure:function(g){if(_(g,"requireFailure",this))return this;var x=this.requireFail;return g=hs(g,this),J(x,g)===-1&&(x.push(g),g.requireFailure(this)),this},dropRequireFailure:function(g){if(_(g,"dropRequireFailure",this))return this;g=hs(g,this);var x=J(this.requireFail,g);return x>-1&&this.requireFail.splice(x,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(g){return!!this.simultaneous[g.id]},emit:function(g){var x=this,b=this.state;function B(G){x.manager.emit(G,g)}b<ai&&B(x.options.event+hu(b)),B(x.options.event),g.additionalEvent&&B(g.additionalEvent),b>=ai&&B(x.options.event+hu(b))},tryEmit:function(g){if(this.canEmit())return this.emit(g);this.state=ur},canEmit:function(){for(var g=0;g<this.requireFail.length;){if(!(this.requireFail[g].state&(ur|_i)))return!1;g++}return!0},recognize:function(g){var x=N({},g);if(!w(this.options.enable,[this,x])){this.reset(),this.state=ur;return}this.state&(Er|tn|ur)&&(this.state=_i),this.state=this.process(x),this.state&(Xe|Ji|ai|tn)&&this.tryEmit(x)},process:function(g){},getTouchAction:function(){},reset:function(){}};function hu(g){return g&tn?"cancel":g&ai?"end":g&Ji?"move":g&Xe?"start":""}function cu(g){return g==Ne?"down":g==Qt?"up":g==Pe?"left":g==ze?"right":""}function hs(g,x){var b=x.manager;return b?b.get(g):g}function Ze(){Wr.apply(this,arguments)}q(Ze,Wr,{defaults:{pointers:1},attrTest:function(g){var x=this.options.pointers;return x===0||g.pointers.length===x},process:function(g){var x=this.state,b=g.eventType,B=x&(Xe|Ji),G=this.attrTest(g);return B&&(b&Ht||!G)?x|tn:B||G?b&Ct?x|ai:x&Xe?x|Ji:Xe:ur}});function Sn(){Ze.apply(this,arguments),this.pX=null,this.pY=null}q(Sn,Ze,{defaults:{event:"pan",threshold:10,pointers:1,direction:ii},getTouchAction:function(){var g=this.options.direction,x=[];return g&me&&x.push(Dn),g&Yt&&x.push(Cn),x},directionTest:function(g){var x=this.options,b=!0,B=g.distance,G=g.direction,K=g.deltaX,mt=g.deltaY;return G&x.direction||(x.direction&me?(G=K===0?Oe:K<0?Pe:ze,b=K!=this.pX,B=Math.abs(g.deltaX)):(G=mt===0?Oe:mt<0?Qt:Ne,b=mt!=this.pY,B=Math.abs(g.deltaY))),g.direction=G,b&&B>x.threshold&&G&x.direction},attrTest:function(g){return Ze.prototype.attrTest.call(this,g)&&(this.state&Xe||!(this.state&Xe)&&this.directionTest(g))},emit:function(g){this.pX=g.deltaX,this.pY=g.deltaY;var x=cu(g.direction);x&&(g.additionalEvent=this.options.event+x),this._super.emit.call(this,g)}});function cs(){Ze.apply(this,arguments)}q(cs,Ze,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ti]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.scale-1)>this.options.threshold||this.state&Xe)},emit:function(g){if(g.scale!==1){var x=g.scale<1?"in":"out";g.additionalEvent=this.options.event+x}this._super.emit.call(this,g)}});function On(){Wr.apply(this,arguments),this._timer=null,this._input=null}q(On,Wr,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ca]},process:function(g){var x=this.options,b=g.pointers.length===x.pointers,B=g.distance<x.threshold,G=g.deltaTime>x.time;if(this._input=g,!B||!b||g.eventType&(Ct|Ht)&&!G)this.reset();else if(g.eventType&Vt)this.reset(),this._timer=A(function(){this.state=Er,this.tryEmit()},x.time,this);else if(g.eventType&Ct)return Er;return ur},reset:function(){clearTimeout(this._timer)},emit:function(g){this.state===Er&&(g&&g.eventType&Ct?this.manager.emit(this.options.event+"up",g):(this._input.timeStamp=y(),this.manager.emit(this.options.event,this._input)))}});function da(){Ze.apply(this,arguments)}q(da,Ze,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ti]},attrTest:function(g){return this._super.attrTest.call(this,g)&&(Math.abs(g.rotation)>this.options.threshold||this.state&Xe)}});function fs(){Ze.apply(this,arguments)}q(fs,Ze,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:me|Yt,pointers:1},getTouchAction:function(){return Sn.prototype.getTouchAction.call(this)},attrTest:function(g){var x=this.options.direction,b;return x&(me|Yt)?b=g.overallVelocity:x&me?b=g.overallVelocityX:x&Yt&&(b=g.overallVelocityY),this._super.attrTest.call(this,g)&&x&g.offsetDirection&&g.distance>this.options.threshold&&g.maxPointers==this.options.pointers&&d(b)>this.options.velocity&&g.eventType&Ct},emit:function(g){var x=cu(g.offsetDirection);x&&this.manager.emit(this.options.event+x,g),this.manager.emit(this.options.event,g)}});function Ci(){Wr.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}q(Ci,Wr,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[fa]},process:function(g){var x=this.options,b=g.pointers.length===x.pointers,B=g.distance<x.threshold,G=g.deltaTime<x.time;if(this.reset(),g.eventType&Vt&&this.count===0)return this.failTimeout();if(B&&G&&b){if(g.eventType!=Ct)return this.failTimeout();var K=this.pTime?g.timeStamp-this.pTime<x.interval:!0,mt=!this.pCenter||ni(this.pCenter,g.center)<x.posThreshold;this.pTime=g.timeStamp,this.pCenter=g.center,!mt||!K?this.count=1:this.count+=1,this._input=g;var Jt=this.count%x.taps;if(Jt===0)return this.hasRequireFailures()?(this._timer=A(function(){this.state=Er,this.tryEmit()},x.interval,this),Xe):Er}return ur},failTimeout:function(){return this._timer=A(function(){this.state=ur},this.options.interval,this),ur},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Er&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Vr(g,x){return x=x||{},x.recognizers=L(x.recognizers,Vr.defaults.preset),new ps(g,x)}Vr.VERSION="2.0.7",Vr.defaults={domEvents:!1,touchAction:lu,enable:!0,inputTarget:null,inputClass:null,preset:[[da,{enable:!1}],[cs,{enable:!1},["rotate"]],[fs,{direction:me}],[Sn,{direction:me},["swipe"]],[Ci],[Ci,{event:"doubletap",taps:2},["tap"]],[On]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var al=1,ga=2;function ps(g,x){this.options=N({},Vr.defaults,x||{}),this.options.inputTarget=this.options.inputTarget||g,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=g,this.input=nr(this),this.touchAction=new pa(this,this.options.touchAction),ds(this,!0),C(this.options.recognizers,function(b){var B=this.add(new b[0](b[1]));b[2]&&B.recognizeWith(b[2]),b[3]&&B.requireFailure(b[3])},this)}ps.prototype={set:function(g){return N(this.options,g),g.touchAction&&this.touchAction.update(),g.inputTarget&&(this.input.destroy(),this.input.target=g.inputTarget,this.input.init()),this},stop:function(g){this.session.stopped=g?ga:al},recognize:function(g){var x=this.session;if(!x.stopped){this.touchAction.preventDefaults(g);var b,B=this.recognizers,G=x.curRecognizer;(!G||G&&G.state&Er)&&(G=x.curRecognizer=null);for(var K=0;K<B.length;)b=B[K],x.stopped!==ga&&(!G||b==G||b.canRecognizeWith(G))?b.recognize(g):b.reset(),!G&&b.state&(Xe|Ji|ai)&&(G=x.curRecognizer=b),K++}},get:function(g){if(g instanceof Wr)return g;for(var x=this.recognizers,b=0;b<x.length;b++)if(x[b].options.event==g)return x[b];return null},add:function(g){if(_(g,"add",this))return this;var x=this.get(g.options.event);return x&&this.remove(x),this.recognizers.push(g),g.manager=this,this.touchAction.update(),g},remove:function(g){if(_(g,"remove",this))return this;if(g=this.get(g),g){var x=this.recognizers,b=J(x,g);b!==-1&&(x.splice(b,1),this.touchAction.update())}return this},on:function(g,x){if(g!==a&&x!==a){var b=this.handlers;return C(rt(g),function(B){b[B]=b[B]||[],b[B].push(x)}),this}},off:function(g,x){if(g!==a){var b=this.handlers;return C(rt(g),function(B){x?b[B]&&b[B].splice(J(b[B],x),1):delete b[B]}),this}},emit:function(g,x){this.options.domEvents&&ul(g,x);var b=this.handlers[g]&&this.handlers[g].slice();if(!(!b||!b.length)){x.type=g,x.preventDefault=function(){x.srcEvent.preventDefault()};for(var B=0;B<b.length;)b[B](x),B++}},destroy:function(){this.element&&ds(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function ds(g,x){var b=g.element;if(b.style){var B;C(g.options.cssProps,function(G,K){B=ct(b.style,K),x?(g.oldCssProps[B]=b.style[B],b.style[B]=G):b.style[B]=g.oldCssProps[B]||""}),x||(g.oldCssProps={})}}function ul(g,x){var b=e.createEvent("Event");b.initEvent(g,!0,!0),b.gesture=x,x.target.dispatchEvent(b)}N(Vr,{INPUT_START:Vt,INPUT_MOVE:Gt,INPUT_END:Ct,INPUT_CANCEL:Ht,STATE_POSSIBLE:_i,STATE_BEGAN:Xe,STATE_CHANGED:Ji,STATE_ENDED:ai,STATE_RECOGNIZED:Er,STATE_CANCELLED:tn,STATE_FAILED:ur,DIRECTION_NONE:Oe,DIRECTION_LEFT:Pe,DIRECTION_RIGHT:ze,DIRECTION_UP:Qt,DIRECTION_DOWN:Ne,DIRECTION_HORIZONTAL:me,DIRECTION_VERTICAL:Yt,DIRECTION_ALL:ii,Manager:ps,Input:Dt,TouchAction:pa,TouchInput:Ki,MouseInput:vt,PointerEventInput:ar,TouchMouseInput:ha,SingleTouchInput:Tn,Recognizer:Wr,AttrRecognizer:Ze,Tap:Ci,Pan:Sn,Swipe:fs,Pinch:cs,Rotate:da,Press:On,on:k,off:j,each:C,merge:R,extend:M,assign:N,inherit:q,bindFn:z,prefixed:ct});var fu=typeof t<"u"?t:typeof self<"u"?self:{};fu.Hammer=Vr,r.exports?r.exports=Vr:t[n]=Vr})(window,document,"Hammer")})(Xc);var o2=Xc.exports;const Wi=yh(o2),Zc=new Y,Hr=new Y;class Qc extends Ir{name="orbit-controller.ts";isSvg=!1;dom;domOffset=new Y;camera;hammer;enabled=!0;enablePan=!0;enableRotate=!0;rotateSpeed=1;enableZoom=!0;minZoom=0;maxZoom=1/0;zoomSpeed=1;zoomChanged=!1;distanceStart=1;distanceEnd=1;state=-1;EPS=1e-6;focus=new Y;target=new Y;scaled=1;rotateTheta=0;enableDamping=!1;dampingFactor=.05;mouseButtons={LEFT:2,MIDDLE:1,RIGHT:0};isWheeling=!1;finalTimer;rotateStart=new Y;rotateEnd=new Y;rotateDelta=new Y;panStart=new Y;panEnd=new Y;panOffset=new Y;dollyStart=0;dollyOffset=new Y;contextMenuHandler=this.handleContextMenu.bind(this);wheelHandler=this.handleWheel.bind(this);pointerDownHandler=this.handlePointerDown.bind(this);pointerUpHandler=this.handlePointerUp.bind(this);pointerMoveHandler=this.handlePointerMove.bind(this);pointerOverHandler=Mt.debounce(this.handlePointerOver.bind(this),100);pointerLeaveHandler=this.handlePointerLeave.bind(this);tapHandler=this.handleTap.bind(this);panHandler=this.handlePan.bind(this);pinchHandler=this.handlePinch.bind(this);pressHandler=this.handlePress.bind(this);swipeHandler=this.handleSwipe.bind(this);hammerInputHandler=this.handleHammerInput.bind(this);constructor(t,e,n=!1){super(),this.isSvg=n,this.dom=t,this.camera=e,this.scaled=e.scaled.x;let a=this.dom.getBoundingClientRect();this.domOffset.set(a.left,a.top),this.dom.style.touchAction="none",this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}update(){Zc.copy(this.camera.position).sub(this.target),this.target.add(this.panOffset),this.camera.position.copy(this.target).add(Zc),this.camera.position.add(this.dollyOffset),this.camera.scaled.set(this.scaled,this.scaled),this.camera.update(),this.panOffset.set(0,0),this.dollyOffset.set(0,0),this.scaled=this.camera.scaled.x,this.dispatchEvent({type:"cameraChanged",data:{t:this.camera.position,r:this.camera.rotation.x,s:this.camera.scaled.x}})}bindEvents(){this.unbindEvents(),this.hammer=new Wi.Manager(this.dom,{domEvents:!0});const t=new Wi.Pan({threshold:0,pointers:0}),e=new Wi.Pinch({threshold:0}),n=new Wi.Tap({event:"singletap",taps:1}),a=new Wi.Press({});this.hammer.add([t,n,a,e]),e.recognizeWith(t),this.hammer.on(["panstart","panmove","panend"].join(" "),this.panHandler),this.hammer.on(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),this.hammer.on("singletap",this.tapHandler),this.hammer.on("press",this.pressHandler),this.hammer.on("swipe",this.swipeHandler),this.hammer.on("hammer.input",this.hammerInputHandler),this.dom.addEventListener("contextmenu",this.contextMenuHandler),this.dom.addEventListener("wheel",this.wheelHandler,{passive:!1}),this.dom.addEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.addEventListener("pointerdown",this.pointerDownHandler),this.dom.addEventListener("pointerleave",this.pointerLeaveHandler))}unbindEvents(){var t,e,n,a,u,l,c,f;(t=this.hammer)==null||t.off(["panstart","panmove","panend"].join(" "),this.panHandler),(e=this.hammer)==null||e.off(["pinchstart","pinchmove","pinchend"].join(" "),this.pinchHandler),(n=this.hammer)==null||n.off("singletap",this.tapHandler),(a=this.hammer)==null||a.off("press",this.pressHandler),(u=this.hammer)==null||u.off("swipe",this.swipeHandler),(l=this.hammer)==null||l.off("hammer.input",this.hammerInputHandler),this.dom.removeEventListener("contextmenu",this.contextMenuHandler),this.dom.removeEventListener("wheel",this.wheelHandler),this.dom.removeEventListener("mousemove",this.pointerOverHandler),this.isSvg||(this.dom.removeEventListener("pointerdown",this.pointerDownHandler),this.dom.removeEventListener("pointerleave",this.pointerLeaveHandler)),(c=this.hammer)==null||c.stop(!0),(f=this.hammer)==null||f.destroy()}setFocus(t,e){this.focus.set(t,e).sub(this.domOffset).unproject(this.camera)}handleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Tap: ",t),Hr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"tap",data:{screenCoords:{x:Hr.x,y:Hr.y}},e:t})}handleDoubleTap(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】DoubleTap: ",t),Hr.set(t.center.x,t.center.y).sub(this.domOffset),this.dispatchEvent({type:"doubletap",data:{screenCoords:{x:Hr.x,y:Hr.y}}})}handlePress(t){typeof t.preventDefault=="function"&&t.preventDefault(),console.log("【orbitController】Press: ",t)}handlePan(t){var n;if(((n=t.pointers)==null?void 0:n.length)!==1)return;typeof t.preventDefault=="function"&&t.preventDefault();const e={type:"panmove",data:{}};(t.isFirst||t.type==="panstart")&&(this.state=2,this.panStart.set(t.center.x,t.center.y),e.type="panstart"),(t.isFinal||t.type==="panend")&&(this.state=-1,e.type="panend"),this.panEnd.set(t.center.x,t.center.y),this.panOffset.subVectors(this.panEnd,this.panStart).multiplyScalar(-this.camera.scaled.x,-this.camera.scaled.y*(this.camera.flipY?1:-1)),this.panStart.copy(this.panEnd),Hr.set(t.center.x,t.center.y).sub(this.domOffset),e.data.screenCoords=Hr.clone(),this.dispatchEvent(e),this.enablePan&&this.update()}handlePinch(t){typeof t.preventDefault=="function"&&t.preventDefault(),t.type==="pinchstart"&&(this.dollyStart=this.camera.scaled.x,this.state=1),(t.isFinal||t.type==="pinchend")&&(this.state=-1),this.scaled=this.dollyStart*(1/t.scale);let e=(this.scaled-this.camera.scaled.x)/this.camera.scaled.x;this.setFocus(t.center.x,t.center.y),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-e).sub(this.camera.position),this.update()}handleRotate(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleSwipe(t){typeof t.preventDefault=="function"&&t.preventDefault()}handleHammerInput(t){t.isFirst&&(this.state=9),t.isFinal&&(this.state=-1)}handleContextMenu(t){this.enabled&&typeof t.preventDefault=="function"&&t.preventDefault()}handleWheel(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),!this.enabled||!this.enableZoom||this.state!==-1)return;this.isWheeling||(this.dispatchEvent({type:"wheelstart"}),this.isWheeling=!0),typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.stopPropagation=="function"&&t.stopPropagation();let e=t.deltaY;(t==null?void 0:t.deltaMode)===1?e*=16:(t==null?void 0:t.deltaMode)===2&&(e*=100),t!=null&&t.ctrlKey&&(e*=10),this.setFocus(t.clientX,t.clientY);let n=this.getZoomScale(e);e<0?this.onDollyIn(n):e>0?this.onDollyOut(n):(this.scaled=this.camera.scaled.x,this.dollyOffset.set(0,0)),this.update(),clearTimeout(this.finalTimer),this.finalTimer=setTimeout(()=>{this.isWheeling&&(this.dispatchEvent({type:"wheelend"}),this.isWheeling=!1)},500)}onDollyIn(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x*t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,1-t).sub(this.camera.position)}onDollyOut(t){this.scaled=Math.max(this.minZoom,Math.min(this.maxZoom,this.camera.scaled.x/t)),this.dollyOffset.copy(this.camera.position).lerp(this.focus,-1+t).sub(this.camera.position)}getZoomScale(t){return Math.pow(.95,this.zoomSpeed*Math.abs(t*.03))}handlePointerDown(t){if(!this.enabled||t.button!==2)return;this.dom.addEventListener("pointermove",this.pointerMoveHandler),this.dom.addEventListener("pointerup",this.pointerUpHandler);let e=-1;t.button===0?e=this.mouseButtons.LEFT:t.button===1?e=this.mouseButtons.MIDDLE:t.button===2&&(e=this.mouseButtons.RIGHT),e===0&&(this.rotateStart.set(t.clientX,t.clientY),this.setFocus(this.rotateStart.x,this.rotateStart.y),this.state=0)}handlePointerUp(){this.dom.removeEventListener("pointermove",this.pointerMoveHandler),this.dom.removeEventListener("pointerup",this.pointerUpHandler),this.state=-1}handlePointerLeave(){this.state=-1}handlePointerMove(t){if(this.enabled&&this.state===0){if(!this.enableRotate)return;this.onRotate(t.clientX,t.clientY)}}handlePointerOver(t){t.buttons>0||(Hr.set(t.clientX,t.clientY).sub(this.domOffset),this.dispatchEvent({type:"pointerover",data:{screenCoords:{x:Hr.x,y:Hr.y}},e:t}))}onRotate(t,e){this.rotateEnd.set(t,e),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart).multiplyScalar(this.rotateSpeed);const n=this.rotateDelta.x*Math.PI*2/this.dom.clientHeight;this.rotateTheta-=n,this.rotateStart.copy(this.rotateEnd),this.camera.rotation.x-=this.rotateTheta,this.target.rotateAround(this.focus,-this.rotateTheta),this.camera.position.copy(this.target),this.camera.update(),this.rotateTheta=0}}var _t=(r=>(r.CONTEXTMENU="contextmenu",r.LOSTPOINTERCAPTURE="lostpointercapture",r.MOUSEOVER="mouseover",r.MOUSEOUT="mouseout",r.MOUSELEAVE="mouseleave",r.MOUSEENTER="mouseenter",r.MOUSEMOVE="mousemove",r.MOUSEDOWN="mousedown",r.MOUSEUP="mouseup",r.POINTERMOVE="pointermove",r.POINTERDOWN="pointerdown",r.POINTERUP="pointerup",r.POINTERCANCEL="pointercancel",r.POINTEROUT="pointerout",r.POINTERLEAVE="pointerleave",r.POINTEROVER="pointerover",r.POINTERENTER="pointerenter",r.TOUCHSTART="touchstart",r.TOUCHEND="touchend",r.TOUCHMOVE="touchmove",r.TOUCHCANCEL="touchcancel",r.WHEEL="wheel",r.WHEEL_START="wheelstart",r.WHEEL_END="wheelend",r.MOUSEWHEEL="mousewheel",r.CLICK="click",r.DBLCLICK="dblclick",r.CONTEXT_LOST="contextlost",r.CONTEXT_RESTORED="contextrestored",r.CONTROLS_CHANGED="controlschanged",r.TAP="tap",r.SINGLE_TAP="singletap",r.DOUBLE_TAP="doubletap",r.PRESS="press",r.PAN="pan",r.PAN_START="panstart",r.PAN_MOVE="panmove",r.PAN_END="panend",r.ROTATE="rotate",r.ROTATE_START="rotatestart",r.ROTATE_MOVE="rotatemove",r.ROTATE_END="rotateend",r.PINCH="pinch",r.PINCH_START="pinchstart",r.PINCH_MOVE="pinchmove",r.PINCH_END="pinchend",r.PINCH_IN="pinchin",r.PINCH_OUT="pinchout",r.SWIPE="swipe",r.CHANGE_START="change_start",r.CHANGE_END="change_end",r.CAMERA_CHANGED="cameraChanged",r))(_t||{});const Qs=new Y;class jc extends mc{isCamera=!0;type="Camera2";name="Camera2";params;matrixAutoUpdate=!1;matrixWorldAutoUpdate=!1;projectionMatrix=new re;projectionMatrixInverse=new re;viewMatrix=new re;viewMatrixNeedsUpdate=!0;viewArea=0;left=-1;right=1;top=1;bottom=-1;width=2;height=2;aspect=1;view;constructor(t){super(),this.params=t,this.width=(t==null?void 0:t.width)!==void 0?t.width:2,this.height=(t==null?void 0:t.height)!==void 0?t.height:2,this.aspect=(t==null?void 0:t.aspect)!==void 0?t.aspect:1,(t==null?void 0:t.left)!==void 0&&(this.left=t.left),(t==null?void 0:t.right)!==void 0&&(this.right=t.right),(t==null?void 0:t.top)!==void 0&&(this.top=t.top),(t==null?void 0:t.bottom)!==void 0&&(this.bottom=t.bottom);const e=(this.right+this.left)/2,n=(this.top+this.bottom)/2;if(this.aspect>1){const a=Math.round((this.right-this.left)/2/this.aspect);this.top=n+a,this.bottom=n-a}else if(this.aspect<1){const a=Math.round((this.top-this.bottom)/2*this.aspect);this.left=e-a,this.right=e+a}this.flipY=(t==null?void 0:t.flipY)===!0,this.updateProjectionMatrix(),t!=null&&t.eye&&this.position.fromArray(t.eye),t!=null&&t.up&&this.up.fromArray(t.up),this.computeBoundingBox(),this.update()}destroy(){super.destroy()}get pixelWidth(){return this.scaled.x}set(t=-1,e=1,n=1,a=-1){Qs.set(t+e,a+n).multiplyScalar(.5);const u=Math.max((e-t)/this.width,(n-a)/this.height);this.setTRS(Qs,0,u)}setByBox(t){if(!t||t.isEmpty()){console.error(`setByBox: ${t==null?void 0:t.toString()}`);return}this.set(t.min.x,t.max.x,t.max.y,t.min.y)}setTRS(t={x:0,y:0},e=0,n=0){this.position.set(t.x||0,t.y||0),this.rotation.set(e,e),this.scaled.set(n,n),this.update()}resize(){this.setSize(this.params.width,this.params.height)}setSize(t,e){this.width=t||2,this.height=e||2,this.left=this.params.left||-1,this.right=this.params.right||1,this.top=this.params.top||1,this.bottom=this.params.bottom||-1,this.aspect=t/e;const n=(this.right+this.left)/2,a=(this.top+this.bottom)/2;if(this.aspect>1){const u=Math.round((this.right-this.left)/2/this.aspect);this.top=a+u,this.bottom=a-u}else if(this.aspect<1){const u=Math.round((this.top-this.bottom)/2*this.aspect);this.left=n-u,this.right=n+u}this.updateProjectionMatrix(),this.update()}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[6],-e[7]).normalize()}getCameraPosition(){return{x:this.position.x,y:this.position.y,z:this.position.z,s:this.scaled.x,r:this.rotation.x}}updateMatrixWorld(t=!1){super.updateMatrixWorld(t),this.updateViewMatrix()}updateProjectionMatrix(){this.parent===void 0&&this.matrixWorldAutoUpdate&&this.updateMatrixWorld(),this.projectionMatrix.makeProjection(this.left,this.right,this.top,this.bottom,this.width,this.height),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}updateViewMatrix(){this.matrixWorldInverse.copy(this.matrixWorld).invert(),this.viewMatrix.multiplyMatrices(this.projectionMatrix,this.matrixWorldInverse)}update(){this.matrixAutoUpdate||this.updateMatrix(),this.updateMatrixWorld(),this.needsUpdate=!0,this.updateBoundingBox(),this.dispatchEvent({type:"update",data:{t:this.position,r:this.rotation.x,s:this.scaled.x}})}computeBoundingBox(){return Qs.set(this.width,this.height).multiplyScalar(.5).multiplyScalar(this.scaled.x),this.boundingBox.min.subVectors(this.position,Qs),this.boundingBox.max.addVectors(this.position,Qs),this.boundingBox}updateBoundingBox(){super.updateBoundingBox(),this.viewArea=this.boundingBoxWorld.getArea()}toJSON(){const t={};return t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.width=this.width,t.height=this.height,t.aspect=this.aspect,t.position=this.position.toArray(),t.rotation=this.rotation.toArray(),t.scaled=this.scaled.toArray(),t}fromJSON(t){this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.position.fromArray(t.position),this.rotation.fromArray(t.rotation),this.scaled.fromArray(t.scaled),this.updateProjectionMatrix(),this.update()}clone(){return new this.constructor.prototype.constructor().copy(this)}copy(t,e=!0){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.width=t.width,this.height=t.height,this.aspect=t.aspect,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this}}var Qa=(r=>(r.UPDATE="update",r))(Qa||{});class Kc extends Ir{name="SvgSelectRect";container;el;constructor(t){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.el=document.createElement("div"),this.el.setAttribute("id",Kn+"SvgSelectRect"),this.el.setAttribute("class",Kn+"-svg-select-rect"),this.el.style.display="none",this.container.appendChild(this.el)}destroy(){super.destroy(),this.el&&this.el.remove()}draw(t){Jc.copy(t).getSize(Oo),So.copy(Jc.min),this.el.style.display="none",this.el.style.position="absolute",this.el.style.left=So.x+"px",this.el.style.top=So.y+"px",this.el.style.width=Oo.x+"px",this.el.style.height=Oo.y+"px",this.el.style.display="block",this.el.style.background=new Wt(he.darkBlue).setA(.1).getStyle(),this.el.style.border=he.darkBlue+" 1px dashed"}hide(){this.el.style.display="none"}}const Jc=new St,So=new Y,Oo=new Y;class l2 extends Ir{name="SvgMultiSelector";controller;scene;container;p1=new Y;p2=new Y;graph;selectEnable=!1;multiSelectEnable=!1;controllerTapHandler=this.handleControllerTap.bind(this);controllerPanStartHandler=this.handleControllerPanStart.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPanEndHandler=this.handleControllerPanEnd.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.graph=new Kc(t),this.bindControllerEvents()}destroy(){this.unbindControllerEvents(),super.destroy()}bindScene(t){this.scene=t}selectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.selectEnable=!!t}multiSelectEnableChanged(t){var e;(e=this.scene)==null||e.clearSelected(),this.multiSelectEnable=!!t,this.controller.enablePan=!this.multiSelectEnable}bindControllerEvents(){this.controller.addEventListener(_t.TAP,this.controllerTapHandler),this.controller.addEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(_t.PAN_END,this.controllerPanEndHandler)}unbindControllerEvents(){this.controller.removeEventListener(_t.TAP,this.controllerTapHandler),this.controller.removeEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(_t.PAN_END,this.controllerPanEndHandler)}handleControllerTap(t){var n,a,u,l,c,f;if((t==null?void 0:t.type)!==_t.TAP||!this.selectEnable&&!this.multiSelectEnable)return;const e=((n=t==null?void 0:t.e)==null?void 0:n.target)||((u=(a=t==null?void 0:t.e)==null?void 0:a.srcEvent)==null?void 0:u.target)||((c=(l=t==null?void 0:t.e)==null?void 0:l.srcEvent)==null?void 0:c.srcElement);e!=null&&e.id&&(f=this.scene)!=null&&f.isBelongsToAssetType(e==null?void 0:e.id)&&this.dispatchEvent({type:"SELECTED",data:{...t.data,target:[e],selected:[e==null?void 0:e.id]}})}handleControllerPanStart(t){(t==null?void 0:t.type)===_t.PAN_START&&this.multiSelectEnable&&(this.p1.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1),this.graph.draw(dn))}handleControllerPanMove(t){(t==null?void 0:t.type)===_t.PAN_MOVE&&this.multiSelectEnable&&(this.p2.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(dn))}handleControllerPanEnd(t){var a;if((t==null?void 0:t.type)!==_t.PAN_END||!this.multiSelectEnable)return;this.p2.copy(t.data.screenCoords),dn.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera);const e=(a=this.scene)==null?void 0:a.getElementsByBox(dn),n=[];(e||[]).forEach(u=>n.push(u.id)),this.graph.hide(),dn.makeEmpty(),this.dispatchEvent({type:"SELECTED",data:{target:e,selected:n}})}}var No=(r=>(r.SELECTED="SELECTED",r))(No||{});const dn=new St;var gn=(r=>(r.DEFAULT="default",r.INFO="info",r.PRIMARY="primary",r.SUCCESS="success",r.WARNING="warning",r.DANGER="danger",r))(gn||{});class h2{camera;screenCoords=new Y;worldCoords=new Y;params={Shape:{},Line:{threshold:1},Points:{threshold:1},Sprite:{}};constructor(){}setFromCamera(t,e){return this.camera=e,this.screenCoords.set(t.x,t.y),this.worldCoords.copy(this.screenCoords).unproject(e),this}intersectObjects(t,e=!0,n=[]){for(let a=0,u=t.length;a<u;a++)this.intersectObject(t[a],e,n)}intersectObject(t,e=!1,n=[]){if(!t.selectable||(t.raycast(this,n),!e||t.composeNode))return n;for(let a=0,u=t.children.length;a<u;a++)this.intersectObject(t.children[a],e,n);return n}}var Ve="top",dr="bottom",gr="right",$e="left",Mo="auto",js=[Ve,dr,gr,$e],Jn="start",Ks="end",c2="clippingParents",tf="viewport",Js="popper",f2="reference",ef=js.reduce(function(r,t){return r.concat([t+"-"+Jn,t+"-"+Ks])},[]),rf=[].concat(js,[Mo]).reduce(function(r,t){return r.concat([t,t+"-"+Jn,t+"-"+Ks])},[]),p2="beforeRead",d2="read",g2="afterRead",y2="beforeMain",v2="main",m2="afterMain",x2="beforeWrite",E2="write",A2="afterWrite",b2=[p2,d2,g2,y2,v2,m2,x2,E2,A2];function Kr(r){return r?(r.nodeName||"").toLowerCase():null}function rr(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var t=r.ownerDocument;return t&&t.defaultView||window}return r}function yn(r){var t=rr(r).Element;return r instanceof t||r instanceof Element}function yr(r){var t=rr(r).HTMLElement;return r instanceof t||r instanceof HTMLElement}function Bo(r){if(typeof ShadowRoot>"u")return!1;var t=rr(r).ShadowRoot;return r instanceof t||r instanceof ShadowRoot}function w2(r){var t=r.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},a=t.attributes[e]||{},u=t.elements[e];!yr(u)||!Kr(u)||(Object.assign(u.style,n),Object.keys(a).forEach(function(l){var c=a[l];c===!1?u.removeAttribute(l):u.setAttribute(l,c===!0?"":c)}))})}function T2(r){var t=r.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],u=t.attributes[n]||{},l=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:e[n]),c=l.reduce(function(f,d){return f[d]="",f},{});!yr(a)||!Kr(a)||(Object.assign(a.style,c),Object.keys(u).forEach(function(f){a.removeAttribute(f)}))})}}const nf={name:"applyStyles",enabled:!0,phase:"write",fn:w2,effect:T2,requires:["computeStyles"]};function Jr(r){return r.split("-")[0]}var vn=Math.max,ja=Math.min,ts=Math.round;function Io(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sf(){return!/^((?!chrome|android).)*safari/i.test(Io())}function es(r,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var n=r.getBoundingClientRect(),a=1,u=1;t&&yr(r)&&(a=r.offsetWidth>0&&ts(n.width)/r.offsetWidth||1,u=r.offsetHeight>0&&ts(n.height)/r.offsetHeight||1);var l=yn(r)?rr(r):window,c=l.visualViewport,f=!sf()&&e,d=(n.left+(f&&c?c.offsetLeft:0))/a,y=(n.top+(f&&c?c.offsetTop:0))/u,A=n.width/a,_=n.height/u;return{width:A,height:_,top:y,right:d+A,bottom:y+_,left:d,x:d,y}}function Ro(r){var t=es(r),e=r.offsetWidth,n=r.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:r.offsetLeft,y:r.offsetTop,width:e,height:n}}function af(r,t){var e=t.getRootNode&&t.getRootNode();if(r.contains(t))return!0;if(e&&Bo(e)){var n=t;do{if(n&&r.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function xi(r){return rr(r).getComputedStyle(r)}function _2(r){return["table","td","th"].indexOf(Kr(r))>=0}function Vi(r){return((yn(r)?r.ownerDocument:r.document)||window.document).documentElement}function Ka(r){return Kr(r)==="html"?r:r.assignedSlot||r.parentNode||(Bo(r)?r.host:null)||Vi(r)}function uf(r){return!yr(r)||xi(r).position==="fixed"?null:r.offsetParent}function C2(r){var t=/firefox/i.test(Io()),e=/Trident/i.test(Io());if(e&&yr(r)){var n=xi(r);if(n.position==="fixed")return null}var a=Ka(r);for(Bo(a)&&(a=a.host);yr(a)&&["html","body"].indexOf(Kr(a))<0;){var u=xi(a);if(u.transform!=="none"||u.perspective!=="none"||u.contain==="paint"||["transform","perspective"].indexOf(u.willChange)!==-1||t&&u.willChange==="filter"||t&&u.filter&&u.filter!=="none")return a;a=a.parentNode}return null}function ta(r){for(var t=rr(r),e=uf(r);e&&_2(e)&&xi(e).position==="static";)e=uf(e);return e&&(Kr(e)==="html"||Kr(e)==="body"&&xi(e).position==="static")?t:e||C2(r)||t}function Lo(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function ea(r,t,e){return vn(r,ja(t,e))}function D2(r,t,e){var n=ea(r,t,e);return n>e?e:n}function of(){return{top:0,right:0,bottom:0,left:0}}function lf(r){return Object.assign({},of(),r)}function hf(r,t){return t.reduce(function(e,n){return e[n]=r,e},{})}var S2=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,lf(typeof t!="number"?t:hf(t,js))};function O2(r){var t,e=r.state,n=r.name,a=r.options,u=e.elements.arrow,l=e.modifiersData.popperOffsets,c=Jr(e.placement),f=Lo(c),d=[$e,gr].indexOf(c)>=0,y=d?"height":"width";if(!(!u||!l)){var A=S2(a.padding,e),_=Ro(u),C=f==="y"?Ve:$e,F=f==="y"?dr:gr,N=e.rects.reference[y]+e.rects.reference[f]-l[f]-e.rects.popper[y],M=l[f]-e.rects.reference[f],R=ta(u),q=R?f==="y"?R.clientHeight||0:R.clientWidth||0:0,z=N/2-M/2,w=A[C],L=q-_[y]-A[F],k=q/2-_[y]/2+z,j=ea(w,k,L),tt=f;e.modifiersData[n]=(t={},t[tt]=j,t.centerOffset=j-k,t)}}function N2(r){var t=r.state,e=r.options,n=e.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||af(t.elements.popper,a)&&(t.elements.arrow=a))}const M2={name:"arrow",enabled:!0,phase:"main",fn:O2,effect:N2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rs(r){return r.split("-")[1]}var B2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function I2(r,t){var e=r.x,n=r.y,a=t.devicePixelRatio||1;return{x:ts(e*a)/a||0,y:ts(n*a)/a||0}}function cf(r){var t,e=r.popper,n=r.popperRect,a=r.placement,u=r.variation,l=r.offsets,c=r.position,f=r.gpuAcceleration,d=r.adaptive,y=r.roundOffsets,A=r.isFixed,_=l.x,C=_===void 0?0:_,F=l.y,N=F===void 0?0:F,M=typeof y=="function"?y({x:C,y:N}):{x:C,y:N};C=M.x,N=M.y;var R=l.hasOwnProperty("x"),q=l.hasOwnProperty("y"),z=$e,w=Ve,L=window;if(d){var k=ta(e),j="clientHeight",tt="clientWidth";if(k===rr(e)&&(k=Vi(e),xi(k).position!=="static"&&c==="absolute"&&(j="scrollHeight",tt="scrollWidth")),k=k,a===Ve||(a===$e||a===gr)&&u===Ks){w=dr;var Z=A&&k===L&&L.visualViewport?L.visualViewport.height:k[j];N-=Z-n.height,N*=f?1:-1}if(a===$e||(a===Ve||a===dr)&&u===Ks){z=gr;var rt=A&&k===L&&L.visualViewport?L.visualViewport.width:k[tt];C-=rt-n.width,C*=f?1:-1}}var J=Object.assign({position:c},d&&B2),st=y===!0?I2({x:C,y:N},rr(e)):{x:C,y:N};if(C=st.x,N=st.y,f){var ht;return Object.assign({},J,(ht={},ht[w]=q?"0":"",ht[z]=R?"0":"",ht.transform=(L.devicePixelRatio||1)<=1?"translate("+C+"px, "+N+"px)":"translate3d("+C+"px, "+N+"px, 0)",ht))}return Object.assign({},J,(t={},t[w]=q?N+"px":"",t[z]=R?C+"px":"",t.transform="",t))}function R2(r){var t=r.state,e=r.options,n=e.gpuAcceleration,a=n===void 0?!0:n,u=e.adaptive,l=u===void 0?!0:u,c=e.roundOffsets,f=c===void 0?!0:c,d={placement:Jr(t.placement),variation:rs(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,cf(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,cf(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const L2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:R2,data:{}};var Ja={passive:!0};function P2(r){var t=r.state,e=r.instance,n=r.options,a=n.scroll,u=a===void 0?!0:a,l=n.resize,c=l===void 0?!0:l,f=rr(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return u&&d.forEach(function(y){y.addEventListener("scroll",e.update,Ja)}),c&&f.addEventListener("resize",e.update,Ja),function(){u&&d.forEach(function(y){y.removeEventListener("scroll",e.update,Ja)}),c&&f.removeEventListener("resize",e.update,Ja)}}const F2={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:P2,data:{}};var U2={left:"right",right:"left",bottom:"top",top:"bottom"};function tu(r){return r.replace(/left|right|bottom|top/g,function(t){return U2[t]})}var k2={start:"end",end:"start"};function ff(r){return r.replace(/start|end/g,function(t){return k2[t]})}function Po(r){var t=rr(r),e=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:e,scrollTop:n}}function Fo(r){return es(Vi(r)).left+Po(r).scrollLeft}function H2(r,t){var e=rr(r),n=Vi(r),a=e.visualViewport,u=n.clientWidth,l=n.clientHeight,c=0,f=0;if(a){u=a.width,l=a.height;var d=sf();(d||!d&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}return{width:u,height:l,x:c+Fo(r),y:f}}function q2(r){var t,e=Vi(r),n=Po(r),a=(t=r.ownerDocument)==null?void 0:t.body,u=vn(e.scrollWidth,e.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),l=vn(e.scrollHeight,e.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),c=-n.scrollLeft+Fo(r),f=-n.scrollTop;return xi(a||e).direction==="rtl"&&(c+=vn(e.clientWidth,a?a.clientWidth:0)-u),{width:u,height:l,x:c,y:f}}function Uo(r){var t=xi(r),e=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+a+n)}function pf(r){return["html","body","#document"].indexOf(Kr(r))>=0?r.ownerDocument.body:yr(r)&&Uo(r)?r:pf(Ka(r))}function ra(r,t){var e;t===void 0&&(t=[]);var n=pf(r),a=n===((e=r.ownerDocument)==null?void 0:e.body),u=rr(n),l=a?[u].concat(u.visualViewport||[],Uo(n)?n:[]):n,c=t.concat(l);return a?c:c.concat(ra(Ka(l)))}function ko(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function W2(r,t){var e=es(r,!1,t==="fixed");return e.top=e.top+r.clientTop,e.left=e.left+r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top,e}function df(r,t,e){return t===tf?ko(H2(r,e)):yn(t)?W2(t,e):ko(q2(Vi(r)))}function V2(r){var t=ra(Ka(r)),e=["absolute","fixed"].indexOf(xi(r).position)>=0,n=e&&yr(r)?ta(r):r;return yn(n)?t.filter(function(a){return yn(a)&&af(a,n)&&Kr(a)!=="body"}):[]}function $2(r,t,e,n){var a=t==="clippingParents"?V2(r):[].concat(t),u=[].concat(a,[e]),l=u[0],c=u.reduce(function(f,d){var y=df(r,d,n);return f.top=vn(y.top,f.top),f.right=ja(y.right,f.right),f.bottom=ja(y.bottom,f.bottom),f.left=vn(y.left,f.left),f},df(r,l,n));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function gf(r){var t=r.reference,e=r.element,n=r.placement,a=n?Jr(n):null,u=n?rs(n):null,l=t.x+t.width/2-e.width/2,c=t.y+t.height/2-e.height/2,f;switch(a){case Ve:f={x:l,y:t.y-e.height};break;case dr:f={x:l,y:t.y+t.height};break;case gr:f={x:t.x+t.width,y:c};break;case $e:f={x:t.x-e.width,y:c};break;default:f={x:t.x,y:t.y}}var d=a?Lo(a):null;if(d!=null){var y=d==="y"?"height":"width";switch(u){case Jn:f[d]=f[d]-(t[y]/2-e[y]/2);break;case Ks:f[d]=f[d]+(t[y]/2-e[y]/2);break}}return f}function ia(r,t){t===void 0&&(t={});var e=t,n=e.placement,a=n===void 0?r.placement:n,u=e.strategy,l=u===void 0?r.strategy:u,c=e.boundary,f=c===void 0?c2:c,d=e.rootBoundary,y=d===void 0?tf:d,A=e.elementContext,_=A===void 0?Js:A,C=e.altBoundary,F=C===void 0?!1:C,N=e.padding,M=N===void 0?0:N,R=lf(typeof M!="number"?M:hf(M,js)),q=_===Js?f2:Js,z=r.rects.popper,w=r.elements[F?q:_],L=$2(yn(w)?w:w.contextElement||Vi(r.elements.popper),f,y,l),k=es(r.elements.reference),j=gf({reference:k,element:z,strategy:"absolute",placement:a}),tt=ko(Object.assign({},z,j)),Z=_===Js?tt:k,rt={top:L.top-Z.top+R.top,bottom:Z.bottom-L.bottom+R.bottom,left:L.left-Z.left+R.left,right:Z.right-L.right+R.right},J=r.modifiersData.offset;if(_===Js&&J){var st=J[a];Object.keys(rt).forEach(function(ht){var ct=[gr,dr].indexOf(ht)>=0?1:-1,ft=[Ve,dr].indexOf(ht)>=0?"y":"x";rt[ht]+=st[ft]*ct})}return rt}function z2(r,t){t===void 0&&(t={});var e=t,n=e.placement,a=e.boundary,u=e.rootBoundary,l=e.padding,c=e.flipVariations,f=e.allowedAutoPlacements,d=f===void 0?rf:f,y=rs(n),A=y?c?ef:ef.filter(function(F){return rs(F)===y}):js,_=A.filter(function(F){return d.indexOf(F)>=0});_.length===0&&(_=A);var C=_.reduce(function(F,N){return F[N]=ia(r,{placement:N,boundary:a,rootBoundary:u,padding:l})[Jr(N)],F},{});return Object.keys(C).sort(function(F,N){return C[F]-C[N]})}function G2(r){if(Jr(r)===Mo)return[];var t=tu(r);return[ff(r),t,ff(t)]}function Y2(r){var t=r.state,e=r.options,n=r.name;if(!t.modifiersData[n]._skip){for(var a=e.mainAxis,u=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!0:l,f=e.fallbackPlacements,d=e.padding,y=e.boundary,A=e.rootBoundary,_=e.altBoundary,C=e.flipVariations,F=C===void 0?!0:C,N=e.allowedAutoPlacements,M=t.options.placement,R=Jr(M),q=R===M,z=f||(q||!F?[tu(M)]:G2(M)),w=[M].concat(z).reduce(function(Le,ae){return Le.concat(Jr(ae)===Mo?z2(t,{placement:ae,boundary:y,rootBoundary:A,padding:d,flipVariations:F,allowedAutoPlacements:N}):ae)},[]),L=t.rects.reference,k=t.rects.popper,j=new Map,tt=!0,Z=w[0],rt=0;rt<w.length;rt++){var J=w[rt],st=Jr(J),ht=rs(J)===Jn,ct=[Ve,dr].indexOf(st)>=0,ft=ct?"width":"height",O=ia(t,{placement:J,boundary:y,rootBoundary:A,altBoundary:_,padding:d}),yt=ct?ht?gr:$e:ht?dr:Ve;L[ft]>k[ft]&&(yt=tu(yt));var Bt=tu(yt),Re=[];if(u&&Re.push(O[st]<=0),c&&Re.push(O[yt]<=0,O[Bt]<=0),Re.every(function(Le){return Le})){Z=J,tt=!1;break}j.set(J,Re)}if(tt)for(var be=F?3:1,se=function(ae){var Se=w.find(function(Vt){var Gt=j.get(Vt);if(Gt)return Gt.slice(0,ae).every(function(Ct){return Ct})});if(Se)return Z=Se,"break"},ve=be;ve>0;ve--){var qr=se(ve);if(qr==="break")break}t.placement!==Z&&(t.modifiersData[n]._skip=!0,t.placement=Z,t.reset=!0)}}const X2={name:"flip",enabled:!0,phase:"main",fn:Y2,requiresIfExists:["offset"],data:{_skip:!1}};function yf(r,t,e){return e===void 0&&(e={x:0,y:0}),{top:r.top-t.height-e.y,right:r.right-t.width+e.x,bottom:r.bottom-t.height+e.y,left:r.left-t.width-e.x}}function vf(r){return[Ve,gr,dr,$e].some(function(t){return r[t]>=0})}function Z2(r){var t=r.state,e=r.name,n=t.rects.reference,a=t.rects.popper,u=t.modifiersData.preventOverflow,l=ia(t,{elementContext:"reference"}),c=ia(t,{altBoundary:!0}),f=yf(l,n),d=yf(c,a,u),y=vf(f),A=vf(d);t.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:d,isReferenceHidden:y,hasPopperEscaped:A},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":y,"data-popper-escaped":A})}const Q2={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Z2};function j2(r,t,e){var n=Jr(r),a=[$e,Ve].indexOf(n)>=0?-1:1,u=typeof e=="function"?e(Object.assign({},t,{placement:r})):e,l=u[0],c=u[1];return l=l||0,c=(c||0)*a,[$e,gr].indexOf(n)>=0?{x:c,y:l}:{x:l,y:c}}function K2(r){var t=r.state,e=r.options,n=r.name,a=e.offset,u=a===void 0?[0,0]:a,l=rf.reduce(function(y,A){return y[A]=j2(A,t.rects,u),y},{}),c=l[t.placement],f=c.x,d=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=l}const J2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:K2};function ty(r){var t=r.state,e=r.name;t.modifiersData[e]=gf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ey={name:"popperOffsets",enabled:!0,phase:"read",fn:ty,data:{}};function ry(r){return r==="x"?"y":"x"}function iy(r){var t=r.state,e=r.options,n=r.name,a=e.mainAxis,u=a===void 0?!0:a,l=e.altAxis,c=l===void 0?!1:l,f=e.boundary,d=e.rootBoundary,y=e.altBoundary,A=e.padding,_=e.tether,C=_===void 0?!0:_,F=e.tetherOffset,N=F===void 0?0:F,M=ia(t,{boundary:f,rootBoundary:d,padding:A,altBoundary:y}),R=Jr(t.placement),q=rs(t.placement),z=!q,w=Lo(R),L=ry(w),k=t.modifiersData.popperOffsets,j=t.rects.reference,tt=t.rects.popper,Z=typeof N=="function"?N(Object.assign({},t.rects,{placement:t.placement})):N,rt=typeof Z=="number"?{mainAxis:Z,altAxis:Z}:Object.assign({mainAxis:0,altAxis:0},Z),J=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,st={x:0,y:0};if(k){if(u){var ht,ct=w==="y"?Ve:$e,ft=w==="y"?dr:gr,O=w==="y"?"height":"width",yt=k[w],Bt=yt+M[ct],Re=yt-M[ft],be=C?-tt[O]/2:0,se=q===Jn?j[O]:tt[O],ve=q===Jn?-tt[O]:-j[O],qr=t.elements.arrow,Le=C&&qr?Ro(qr):{width:0,height:0},ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:of(),Se=ae[ct],Vt=ae[ft],Gt=ea(0,j[O],Le[O]),Ct=z?j[O]/2-be-Gt-Se-rt.mainAxis:se-Gt-Se-rt.mainAxis,Ht=z?-j[O]/2+be+Gt+Vt+rt.mainAxis:ve+Gt+Vt+rt.mainAxis,Oe=t.elements.arrow&&ta(t.elements.arrow),Pe=Oe?w==="y"?Oe.clientTop||0:Oe.clientLeft||0:0,ze=(ht=J==null?void 0:J[w])!=null?ht:0,Qt=yt+Ct-ze-Pe,Ne=yt+Ht-ze,me=ea(C?ja(Bt,Qt):Bt,yt,C?vn(Re,Ne):Re);k[w]=me,st[w]=me-yt}if(c){var Yt,ii=w==="x"?Ve:$e,Ai=w==="x"?dr:gr,ue=k[L],Dt=L==="y"?"height":"width",nr=ue+M[ii],Ge=ue-M[Ai],bi=[Ve,$e].indexOf(R)!==-1,mr=(Yt=J==null?void 0:J[L])!=null?Yt:0,Gi=bi?nr:ue-j[Dt]-tt[Dt]-mr+rt.altAxis,sr=bi?ue+j[Dt]+tt[Dt]-mr-rt.altAxis:Ge,Ye=C&&bi?D2(Gi,ue,sr):ea(C?Gi:nr,ue,C?sr:Ge);k[L]=Ye,st[L]=Ye-ue}t.modifiersData[n]=st}}const ny={name:"preventOverflow",enabled:!0,phase:"main",fn:iy,requiresIfExists:["offset"]};function sy(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function ay(r){return r===rr(r)||!yr(r)?Po(r):sy(r)}function uy(r){var t=r.getBoundingClientRect(),e=ts(t.width)/r.offsetWidth||1,n=ts(t.height)/r.offsetHeight||1;return e!==1||n!==1}function oy(r,t,e){e===void 0&&(e=!1);var n=yr(t),a=yr(t)&&uy(t),u=Vi(t),l=es(r,a,e),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(n||!n&&!e)&&((Kr(t)!=="body"||Uo(u))&&(c=ay(t)),yr(t)?(f=es(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):u&&(f.x=Fo(u))),{x:l.left+c.scrollLeft-f.x,y:l.top+c.scrollTop-f.y,width:l.width,height:l.height}}function ly(r){var t=new Map,e=new Set,n=[];r.forEach(function(u){t.set(u.name,u)});function a(u){e.add(u.name);var l=[].concat(u.requires||[],u.requiresIfExists||[]);l.forEach(function(c){if(!e.has(c)){var f=t.get(c);f&&a(f)}}),n.push(u)}return r.forEach(function(u){e.has(u.name)||a(u)}),n}function hy(r){var t=ly(r);return b2.reduce(function(e,n){return e.concat(t.filter(function(a){return a.phase===n}))},[])}function cy(r){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(r())})})),t}}function fy(r){var t=r.reduce(function(e,n){var a=e[n.name];return e[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,e},{});return Object.keys(t).map(function(e){return t[e]})}var mf={placement:"bottom",modifiers:[],strategy:"absolute"};function xf(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function py(r){r===void 0&&(r={});var t=r,e=t.defaultModifiers,n=e===void 0?[]:e,a=t.defaultOptions,u=a===void 0?mf:a;return function(c,f,d){d===void 0&&(d=u);var y={placement:"bottom",orderedModifiers:[],options:Object.assign({},mf,u),modifiersData:{},elements:{reference:c,popper:f},attributes:{},styles:{}},A=[],_=!1,C={state:y,setOptions:function(R){var q=typeof R=="function"?R(y.options):R;N(),y.options=Object.assign({},u,y.options,q),y.scrollParents={reference:yn(c)?ra(c):c.contextElement?ra(c.contextElement):[],popper:ra(f)};var z=hy(fy([].concat(n,y.options.modifiers)));return y.orderedModifiers=z.filter(function(w){return w.enabled}),F(),C.update()},forceUpdate:function(){if(!_){var R=y.elements,q=R.reference,z=R.popper;if(xf(q,z)){y.rects={reference:oy(q,ta(z),y.options.strategy==="fixed"),popper:Ro(z)},y.reset=!1,y.placement=y.options.placement,y.orderedModifiers.forEach(function(rt){return y.modifiersData[rt.name]=Object.assign({},rt.data)});for(var w=0;w<y.orderedModifiers.length;w++){if(y.reset===!0){y.reset=!1,w=-1;continue}var L=y.orderedModifiers[w],k=L.fn,j=L.options,tt=j===void 0?{}:j,Z=L.name;typeof k=="function"&&(y=k({state:y,options:tt,name:Z,instance:C})||y)}}}},update:cy(function(){return new Promise(function(M){C.forceUpdate(),M(y)})}),destroy:function(){N(),_=!0}};if(!xf(c,f))return C;C.setOptions(d).then(function(M){!_&&d.onFirstUpdate&&d.onFirstUpdate(M)});function F(){y.orderedModifiers.forEach(function(M){var R=M.name,q=M.options,z=q===void 0?{}:q,w=M.effect;if(typeof w=="function"){var L=w({state:y,name:R,instance:C,options:z}),k=function(){};A.push(L||k)}})}function N(){A.forEach(function(M){return M()}),A=[]}return C}}var dy=[F2,ey,L2,nf,J2,X2,ny,M2,Q2],gy=py({defaultModifiers:dy}),yy="tippy-box",Ef="tippy-content",vy="tippy-backdrop",Af="tippy-arrow",bf="tippy-svg-arrow",mn={passive:!0,capture:!0},wf=function(){return document.body};function my(r,t){return{}.hasOwnProperty.call(r,t)}function Ho(r,t,e){if(Array.isArray(r)){var n=r[t];return n??(Array.isArray(e)?e[t]:e)}return r}function qo(r,t){var e={}.toString.call(r);return e.indexOf("[object")===0&&e.indexOf(t+"]")>-1}function Tf(r,t){return typeof r=="function"?r.apply(void 0,t):r}function _f(r,t){if(t===0)return r;var e;return function(n){clearTimeout(e),e=setTimeout(function(){r(n)},t)}}function xy(r,t){var e=Object.assign({},r);return t.forEach(function(n){delete e[n]}),e}function Ey(r){return r.split(/\s+/).filter(Boolean)}function is(r){return[].concat(r)}function Cf(r,t){r.indexOf(t)===-1&&r.push(t)}function Ay(r){return r.filter(function(t,e){return r.indexOf(t)===e})}function by(r){return r.split("-")[0]}function eu(r){return[].slice.call(r)}function Df(r){return Object.keys(r).reduce(function(t,e){return r[e]!==void 0&&(t[e]=r[e]),t},{})}function na(){return document.createElement("div")}function sa(r){return["Element","Fragment"].some(function(t){return qo(r,t)})}function wy(r){return qo(r,"NodeList")}function Ty(r){return qo(r,"MouseEvent")}function _y(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function Cy(r){return sa(r)?[r]:wy(r)?eu(r):Array.isArray(r)?r:eu(document.querySelectorAll(r))}function Wo(r,t){r.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Sf(r,t){r.forEach(function(e){e&&e.setAttribute("data-state",t)})}function Dy(r){var t,e=is(r),n=e[0];return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function Sy(r,t){var e=t.clientX,n=t.clientY;return r.every(function(a){var u=a.popperRect,l=a.popperState,c=a.props,f=c.interactiveBorder,d=by(l.placement),y=l.modifiersData.offset;if(!y)return!0;var A=d==="bottom"?y.top.y:0,_=d==="top"?y.bottom.y:0,C=d==="right"?y.left.x:0,F=d==="left"?y.right.x:0,N=u.top-n+A>f,M=n-u.bottom-_>f,R=u.left-e+C>f,q=e-u.right-F>f;return N||M||R||q})}function Vo(r,t,e){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(a){r[n](a,e)})}function Of(r,t){for(var e=t;e;){var n;if(r.contains(e))return!0;e=e.getRootNode==null||(n=e.getRootNode())==null?void 0:n.host}return!1}var ti={isTouch:!1},Nf=0;function Oy(){ti.isTouch||(ti.isTouch=!0,window.performance&&document.addEventListener("mousemove",Mf))}function Mf(){var r=performance.now();r-Nf<20&&(ti.isTouch=!1,document.removeEventListener("mousemove",Mf)),Nf=r}function Ny(){var r=document.activeElement;if(_y(r)){var t=r._tippy;r.blur&&!t.state.isVisible&&r.blur()}}function My(){document.addEventListener("touchstart",Oy,mn),window.addEventListener("blur",Ny)}var By=typeof window<"u"&&typeof document<"u",Iy=By?!!window.msCrypto:!1;function ns(r){var t=r==="destroy"?"n already-":" ";return[r+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Bf(r){var t=/[ \t]{2,}/g,e=/^[ \t]*/gm;return r.replace(t," ").replace(e,"").trim()}function Ry(r){return Bf(`
52
53
  %ctippy.js
53
54
 
54
- %c`+Jc(n)+`
55
+ %c`+Bf(r)+`
55
56
 
56
57
  %c👷‍ This is a development-only message. It will be removed in production.
57
- `)}function tf(n){return[P2(n),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Gs;process.env.NODE_ENV!=="production"&&F2();function F2(){Gs=new Set}function hn(n,t){if(n&&!Gs.has(t)){var e;Gs.add(t),(e=console).warn.apply(e,tf(t))}}function To(n,t){if(n&&!Gs.has(t)){var e;Gs.add(t),(e=console).error.apply(e,tf(t))}}function k2(n){var t=!n,e=Object.prototype.toString.call(n)==="[object Object]"&&!n.addEventListener;To(t,["tippy() was passed","`"+String(n)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),To(e,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var ef={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},U2={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Qe=Object.assign({appendTo:zc,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},ef,U2),H2=Object.keys(Qe),q2=function(t){process.env.NODE_ENV!=="production"&&sf(t,[]);var e=Object.keys(t);e.forEach(function(i){Qe[i]=t[i]})};function rf(n){var t=n.plugins||[],e=t.reduce(function(i,a){var o=a.name,l=a.defaultValue;if(o){var c;i[o]=n[o]!==void 0?n[o]:(c=Qe[o])!=null?c:l}return i},{});return Object.assign({},n,e)}function W2(n,t){var e=t?Object.keys(rf(Object.assign({},Qe,{plugins:t}))):H2,i=e.reduce(function(a,o){var l=(n.getAttribute("data-tippy-"+o)||"").trim();if(!l)return a;if(o==="content")a[o]=l;else try{a[o]=JSON.parse(l)}catch{a[o]=l}return a},{});return i}function nf(n,t){var e=Object.assign({},t,{content:$c(t.content,[n])},t.ignoreAttributes?{}:W2(n,t.plugins));return e.aria=Object.assign({},Qe.aria,e.aria),e.aria={expanded:e.aria.expanded==="auto"?t.interactive:e.aria.expanded,content:e.aria.content==="auto"?t.interactive?null:"describedby":e.aria.content},e}function sf(n,t){n===void 0&&(n={}),t===void 0&&(t=[]);var e=Object.keys(n);e.forEach(function(i){var a=b2(Qe,Object.keys(ef)),o=!E2(a,i);o&&(o=t.filter(function(l){return l.name===i}).length===0),hn(o,["`"+i+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
58
+ `)}function If(r){return[Ry(r),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var aa;process.env.NODE_ENV!=="production"&&Ly();function Ly(){aa=new Set}function Ei(r,t){if(r&&!aa.has(t)){var e;aa.add(t),(e=console).warn.apply(e,If(t))}}function $o(r,t){if(r&&!aa.has(t)){var e;aa.add(t),(e=console).error.apply(e,If(t))}}function Py(r){var t=!r,e=Object.prototype.toString.call(r)==="[object Object]"&&!r.addEventListener;$o(t,["tippy() was passed","`"+String(r)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),$o(e,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Rf={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Fy={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ir=Object.assign({appendTo:wf,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Rf,Fy),Uy=Object.keys(ir),ky=function(t){process.env.NODE_ENV!=="production"&&Ff(t,[]);var e=Object.keys(t);e.forEach(function(n){ir[n]=t[n]})};function Lf(r){var t=r.plugins||[],e=t.reduce(function(n,a){var u=a.name,l=a.defaultValue;if(u){var c;n[u]=r[u]!==void 0?r[u]:(c=ir[u])!=null?c:l}return n},{});return Object.assign({},r,e)}function Hy(r,t){var e=t?Object.keys(Lf(Object.assign({},ir,{plugins:t}))):Uy,n=e.reduce(function(a,u){var l=(r.getAttribute("data-tippy-"+u)||"").trim();if(!l)return a;if(u==="content")a[u]=l;else try{a[u]=JSON.parse(l)}catch{a[u]=l}return a},{});return n}function Pf(r,t){var e=Object.assign({},t,{content:Tf(t.content,[r])},t.ignoreAttributes?{}:Hy(r,t.plugins));return e.aria=Object.assign({},ir.aria,e.aria),e.aria={expanded:e.aria.expanded==="auto"?t.interactive:e.aria.expanded,content:e.aria.content==="auto"?t.interactive?null:"describedby":e.aria.content},e}function Ff(r,t){r===void 0&&(r={}),t===void 0&&(t=[]);var e=Object.keys(r);e.forEach(function(n){var a=xy(ir,Object.keys(Rf)),u=!my(a,n);u&&(u=t.filter(function(l){return l.name===n}).length===0),Ei(u,["`"+n+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
58
59
 
59
60
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
60
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var V2=function(){return"innerHTML"};function Co(n,t){n[V2()]=t}function af(n){var t=zs();return n===!0?t.className=Wc:(t.className=Vc,$s(n)?t.appendChild(n):Co(t,n)),t}function uf(n,t){$s(t.content)?(Co(n,""),n.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Co(n,t.content):n.textContent=t.content)}function So(n){var t=n.firstElementChild,e=Ha(t.children);return{box:t,content:e.find(function(i){return i.classList.contains(qc)}),arrow:e.find(function(i){return i.classList.contains(Wc)||i.classList.contains(Vc)}),backdrop:e.find(function(i){return i.classList.contains(x2)})}}function of(n){var t=zs(),e=zs();e.className=y2,e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=zs();i.className=qc,i.setAttribute("data-state","hidden"),uf(i,n.props),t.appendChild(e),e.appendChild(i),a(n.props,n.props);function a(o,l){var c=So(t),f=c.box,v=c.content,x=c.arrow;l.theme?f.setAttribute("data-theme",l.theme):f.removeAttribute("data-theme"),typeof l.animation=="string"?f.setAttribute("data-animation",l.animation):f.removeAttribute("data-animation"),l.inertia?f.setAttribute("data-inertia",""):f.removeAttribute("data-inertia"),f.style.maxWidth=typeof l.maxWidth=="number"?l.maxWidth+"px":l.maxWidth,l.role?f.setAttribute("role",l.role):f.removeAttribute("role"),(o.content!==l.content||o.allowHTML!==l.allowHTML)&&uf(v,n.props),l.arrow?x?o.arrow!==l.arrow&&(f.removeChild(x),f.appendChild(af(l.arrow))):f.appendChild(af(l.arrow)):x&&f.removeChild(x)}return{popper:t,onUpdate:a}}of.$$tippy=!0;var z2=1,qa=[],Oo=[];function $2(n,t){var e=nf(n,Object.assign({},Qe,rf(Xc(t)))),i,a,o,l=!1,c=!1,f=!1,v=!1,x,D,C,S=[],H=Gc(Gt,e.interactiveDebounce),I,B=z2++,F=null,W=w2(e.plugins),Y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},A={id:B,reference:n,popper:zs(),popperInstance:F,props:e,state:Y,plugins:W,clearDelayTimeouts:Ln,setProps:Je,setContent:qe,show:Rn,hide:Pn,hideWithInteractivity:Xr,enable:fn,disable:cr,unmount:pn,destroy:li};if(!e.render)return process.env.NODE_ENV!=="production"&&To(!0,"render() function has not been supplied."),A;var $=e.render(A),q=$.popper,tt=$.onUpdate;q.setAttribute("data-tippy-root",""),q.id="tippy-"+A.id,A.popper=q,n._tippy=A,q._tippy=A;var ot=W.map(function(L){return L.fn(A)}),K=n.hasAttribute("aria-expanded");return we(),me(),gt(),Ot("onCreate",[A]),e.showOnCreate&&Ke(),q.addEventListener("mouseenter",function(){A.props.interactive&&A.state.isVisible&&A.clearDelayTimeouts()}),q.addEventListener("mouseleave",function(){A.props.interactive&&A.props.trigger.indexOf("mouseenter")>=0&&dt().addEventListener("mousemove",H)}),A;function nt(){var L=A.props.touch;return Array.isArray(L)?L:[L,0]}function J(){return nt()[0]==="hold"}function it(){var L;return!!((L=A.props.render)!=null&&L.$$tippy)}function ht(){return I||n}function dt(){var L=ht().parentNode;return L?O2(L):document}function lt(){return So(q)}function O(L){return A.state.isMounted&&!A.state.isVisible||$r.isTouch||x&&x.type==="focus"?0:Ao(A.props.delay,L?0:1,Qe.delay)}function gt(L){L===void 0&&(L=!1),q.style.pointerEvents=A.props.interactive&&!L?"":"none",q.style.zIndex=""+A.props.zIndex}function Ot(L,Q,rt){if(rt===void 0&&(rt=!0),ot.forEach(function(mt){mt[L]&&mt[L].apply(mt,Q)}),rt){var At;(At=A.props)[L].apply(At,Q)}}function Se(){var L=A.props.aria;if(L.content){var Q="aria-"+L.content,rt=q.id,At=$i(A.props.triggerTarget||n);At.forEach(function(mt){var se=mt.getAttribute(Q);if(A.state.isVisible)mt.setAttribute(Q,se?se+" "+rt:rt);else{var _e=se&&se.replace(rt,"").trim();_e?mt.setAttribute(Q,_e):mt.removeAttribute(Q)}})}}function me(){if(!(K||!A.props.aria.expanded)){var L=$i(A.props.triggerTarget||n);L.forEach(function(Q){A.props.interactive?Q.setAttribute("aria-expanded",A.state.isVisible&&Q===ht()?"true":"false"):Q.removeAttribute("aria-expanded")})}}function Jt(){dt().removeEventListener("mousemove",H),qa=qa.filter(function(L){return L!==H})}function he(L){if(!($r.isTouch&&(f||L.type==="mousedown"))){var Q=L.composedPath&&L.composedPath()[0]||L.target;if(!(A.props.interactive&&jc(q,Q))){if($i(A.props.triggerTarget||n).some(function(rt){return jc(rt,Q)})){if($r.isTouch||A.state.isVisible&&A.props.trigger.indexOf("click")>=0)return}else Ot("onClickOutside",[A,L]);A.props.hideOnClick===!0&&(A.clearDelayTimeouts(),A.hide(),c=!0,setTimeout(function(){c=!1}),A.state.isMounted||Ae())}}}function Mr(){f=!0}function Oe(){f=!1}function te(){var L=dt();L.addEventListener("mousedown",he,!0),L.addEventListener("touchend",he,si),L.addEventListener("touchstart",Oe,si),L.addEventListener("touchmove",Mr,si)}function Ae(){var L=dt();L.removeEventListener("mousedown",he,!0),L.removeEventListener("touchend",he,si),L.removeEventListener("touchstart",Oe,si),L.removeEventListener("touchmove",Mr,si)}function Ht(L,Q){_t(L,function(){!A.state.isVisible&&q.parentNode&&q.parentNode.contains(q)&&Q()})}function Vt(L,Q){_t(L,Q)}function _t(L,Q){var rt=lt().box;function At(mt){mt.target===rt&&(_o(rt,"remove",At),Q())}if(L===0)return Q();_o(rt,"remove",D),_o(rt,"add",At),D=At}function Ft(L,Q,rt){rt===void 0&&(rt=!1);var At=$i(A.props.triggerTarget||n);At.forEach(function(mt){mt.addEventListener(L,Q,rt),S.push({node:mt,eventType:L,handler:Q,options:rt})})}function we(){J()&&(Ft("touchstart",Ue,{passive:!0}),Ft("touchend",De,{passive:!0})),A2(A.props.trigger).forEach(function(L){if(L!=="manual")switch(Ft(L,Ue),L){case"mouseenter":Ft("mouseleave",De);break;case"focus":Ft(R2?"focusout":"blur",ce);break;case"focusin":Ft("focusout",ce);break}})}function Ne(){S.forEach(function(L){var Q=L.node,rt=L.eventType,At=L.handler,mt=L.options;Q.removeEventListener(rt,At,mt)}),S=[]}function Ue(L){var Q,rt=!1;if(!(!A.state.isEnabled||zt(L)||c)){var At=((Q=x)==null?void 0:Q.type)==="focus";x=L,I=L.currentTarget,me(),!A.state.isVisible&&T2(L)&&qa.forEach(function(mt){return mt(L)}),L.type==="click"&&(A.props.trigger.indexOf("mouseenter")<0||l)&&A.props.hideOnClick!==!1&&A.state.isVisible?rt=!0:Ke(L),L.type==="click"&&(l=!rt),rt&&!At&&He(L)}}function Gt(L){var Q=L.target,rt=ht().contains(Q)||q.contains(Q);if(!(L.type==="mousemove"&&rt)){var At=Tt().concat(q).map(function(mt){var se,_e=mt._tippy,fr=(se=_e.popperInstance)==null?void 0:se.state;return fr?{popperRect:mt.getBoundingClientRect(),popperState:fr,props:e}:null}).filter(Boolean);N2(At,L)&&(Jt(),He(L))}}function De(L){var Q=zt(L)||A.props.trigger.indexOf("click")>=0&&l;if(!Q){if(A.props.interactive){A.hideWithInteractivity(L);return}He(L)}}function ce(L){A.props.trigger.indexOf("focusin")<0&&L.target!==ht()||A.props.interactive&&L.relatedTarget&&q.contains(L.relatedTarget)||He(L)}function zt(L){return $r.isTouch?J()!==L.type.indexOf("touch")>=0:!1}function Yr(){cn();var L=A.props,Q=L.popperOptions,rt=L.placement,At=L.offset,mt=L.getReferenceClientRect,se=L.moveTransition,_e=it()?So(q).arrow:null,fr=mt?{getBoundingClientRect:mt,contextElement:mt.contextElement||ht()}:n,Fn={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(kn){var Zr=kn.state;if(it()){var ci=lt(),fi=ci.box;["placement","reference-hidden","escaped"].forEach(function(Un){Un==="placement"?fi.setAttribute("data-placement",Zr.placement):Zr.attributes.popper["data-popper-"+Un]?fi.setAttribute("data-"+Un,""):fi.removeAttribute("data-"+Un)}),Zr.attributes.popper={}}}},tr=[{name:"offset",options:{offset:At}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!se}},Fn];it()&&_e&&tr.push({name:"arrow",options:{element:_e,padding:3}}),tr.push.apply(tr,(Q==null?void 0:Q.modifiers)||[]),A.popperInstance=v2(fr,q,Object.assign({},Q,{placement:rt,onFirstUpdate:C,modifiers:tr}))}function cn(){A.popperInstance&&(A.popperInstance.destroy(),A.popperInstance=null)}function ee(){var L=A.props.appendTo,Q,rt=ht();A.props.interactive&&L===zc||L==="parent"?Q=rt.parentNode:Q=$c(L,[rt]),Q.contains(q)||Q.appendChild(q),A.state.isMounted=!0,Yr(),process.env.NODE_ENV!=="production"&&hn(A.props.interactive&&L===Qe.appendTo&&rt.nextElementSibling!==q,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
61
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var qy=function(){return"innerHTML"};function zo(r,t){r[qy()]=t}function Uf(r){var t=na();return r===!0?t.className=Af:(t.className=bf,sa(r)?t.appendChild(r):zo(t,r)),t}function kf(r,t){sa(t.content)?(zo(r,""),r.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?zo(r,t.content):r.textContent=t.content)}function Go(r){var t=r.firstElementChild,e=eu(t.children);return{box:t,content:e.find(function(n){return n.classList.contains(Ef)}),arrow:e.find(function(n){return n.classList.contains(Af)||n.classList.contains(bf)}),backdrop:e.find(function(n){return n.classList.contains(vy)})}}function Hf(r){var t=na(),e=na();e.className=yy,e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var n=na();n.className=Ef,n.setAttribute("data-state","hidden"),kf(n,r.props),t.appendChild(e),e.appendChild(n),a(r.props,r.props);function a(u,l){var c=Go(t),f=c.box,d=c.content,y=c.arrow;l.theme?f.setAttribute("data-theme",l.theme):f.removeAttribute("data-theme"),typeof l.animation=="string"?f.setAttribute("data-animation",l.animation):f.removeAttribute("data-animation"),l.inertia?f.setAttribute("data-inertia",""):f.removeAttribute("data-inertia"),f.style.maxWidth=typeof l.maxWidth=="number"?l.maxWidth+"px":l.maxWidth,l.role?f.setAttribute("role",l.role):f.removeAttribute("role"),(u.content!==l.content||u.allowHTML!==l.allowHTML)&&kf(d,r.props),l.arrow?y?u.arrow!==l.arrow&&(f.removeChild(y),f.appendChild(Uf(l.arrow))):f.appendChild(Uf(l.arrow)):y&&f.removeChild(y)}return{popper:t,onUpdate:a}}Hf.$$tippy=!0;var Wy=1,ru=[],Yo=[];function Vy(r,t){var e=Pf(r,Object.assign({},ir,Lf(Df(t)))),n,a,u,l=!1,c=!1,f=!1,d=!1,y,A,_,C=[],F=_f(Qt,e.interactiveDebounce),N,M=Wy++,R=null,q=Ay(e.plugins),z={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},w={id:M,reference:r,popper:na(),popperInstance:R,props:e,state:z,plugins:q,clearDelayTimeouts:Gi,setProps:sr,setContent:Ye,show:Yi,hide:Xi,hideWithInteractivity:ni,enable:bi,disable:mr,unmount:wi,destroy:bn};if(!e.render)return process.env.NODE_ENV!=="production"&&$o(!0,"render() function has not been supplied."),w;var L=e.render(w),k=L.popper,j=L.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+w.id,w.popper=k,r._tippy=w,k._tippy=w;var tt=q.map(function(P){return P.fn(w)}),Z=r.hasAttribute("aria-expanded");return Oe(),be(),yt(),Bt("onCreate",[w]),e.showOnCreate&&nr(),k.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),k.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&ct().addEventListener("mousemove",F)}),w;function rt(){var P=w.props.touch;return Array.isArray(P)?P:[P,0]}function J(){return rt()[0]==="hold"}function st(){var P;return!!((P=w.props.render)!=null&&P.$$tippy)}function ht(){return N||r}function ct(){var P=ht().parentNode;return P?Dy(P):document}function ft(){return Go(k)}function O(P){return w.state.isMounted&&!w.state.isVisible||ti.isTouch||y&&y.type==="focus"?0:Ho(w.props.delay,P?0:1,ir.delay)}function yt(P){P===void 0&&(P=!1),k.style.pointerEvents=w.props.interactive&&!P?"":"none",k.style.zIndex=""+w.props.zIndex}function Bt(P,it,at){if(at===void 0&&(at=!0),tt.forEach(function(vt){vt[P]&&vt[P].apply(vt,it)}),at){var wt;(wt=w.props)[P].apply(wt,it)}}function Re(){var P=w.props.aria;if(P.content){var it="aria-"+P.content,at=k.id,wt=is(w.props.triggerTarget||r);wt.forEach(function(vt){var fe=vt.getAttribute(it);if(w.state.isVisible)vt.setAttribute(it,fe?fe+" "+at:at);else{var Me=fe&&fe.replace(at,"").trim();Me?vt.setAttribute(it,Me):vt.removeAttribute(it)}})}}function be(){if(!(Z||!w.props.aria.expanded)){var P=is(w.props.triggerTarget||r);P.forEach(function(it){w.props.interactive?it.setAttribute("aria-expanded",w.state.isVisible&&it===ht()?"true":"false"):it.removeAttribute("aria-expanded")})}}function se(){ct().removeEventListener("mousemove",F),ru=ru.filter(function(P){return P!==F})}function ve(P){if(!(ti.isTouch&&(f||P.type==="mousedown"))){var it=P.composedPath&&P.composedPath()[0]||P.target;if(!(w.props.interactive&&Of(k,it))){if(is(w.props.triggerTarget||r).some(function(at){return Of(at,it)})){if(ti.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else Bt("onClickOutside",[w,P]);w.props.hideOnClick===!0&&(w.clearDelayTimeouts(),w.hide(),c=!0,setTimeout(function(){c=!1}),w.state.isMounted||Se())}}}function qr(){f=!0}function Le(){f=!1}function ae(){var P=ct();P.addEventListener("mousedown",ve,!0),P.addEventListener("touchend",ve,mn),P.addEventListener("touchstart",Le,mn),P.addEventListener("touchmove",qr,mn)}function Se(){var P=ct();P.removeEventListener("mousedown",ve,!0),P.removeEventListener("touchend",ve,mn),P.removeEventListener("touchstart",Le,mn),P.removeEventListener("touchmove",qr,mn)}function Vt(P,it){Ct(P,function(){!w.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&it()})}function Gt(P,it){Ct(P,it)}function Ct(P,it){var at=ft().box;function wt(vt){vt.target===at&&(Vo(at,"remove",wt),it())}if(P===0)return it();Vo(at,"remove",A),Vo(at,"add",wt),A=wt}function Ht(P,it,at){at===void 0&&(at=!1);var wt=is(w.props.triggerTarget||r);wt.forEach(function(vt){vt.addEventListener(P,it,at),C.push({node:vt,eventType:P,handler:it,options:at})})}function Oe(){J()&&(Ht("touchstart",ze,{passive:!0}),Ht("touchend",Ne,{passive:!0})),Ey(w.props.trigger).forEach(function(P){if(P!=="manual")switch(Ht(P,ze),P){case"mouseenter":Ht("mouseleave",Ne);break;case"focus":Ht(Iy?"focusout":"blur",me);break;case"focusin":Ht("focusout",me);break}})}function Pe(){C.forEach(function(P){var it=P.node,at=P.eventType,wt=P.handler,vt=P.options;it.removeEventListener(at,wt,vt)}),C=[]}function ze(P){var it,at=!1;if(!(!w.state.isEnabled||Yt(P)||c)){var wt=((it=y)==null?void 0:it.type)==="focus";y=P,N=P.currentTarget,be(),!w.state.isVisible&&Ty(P)&&ru.forEach(function(vt){return vt(P)}),P.type==="click"&&(w.props.trigger.indexOf("mouseenter")<0||l)&&w.props.hideOnClick!==!1&&w.state.isVisible?at=!0:nr(P),P.type==="click"&&(l=!at),at&&!wt&&Ge(P)}}function Qt(P){var it=P.target,at=ht().contains(it)||k.contains(it);if(!(P.type==="mousemove"&&at)){var wt=Dt().concat(k).map(function(vt){var fe,Me=vt._tippy,xr=(fe=Me.popperInstance)==null?void 0:fe.state;return xr?{popperRect:vt.getBoundingClientRect(),popperState:xr,props:e}:null}).filter(Boolean);Sy(wt,P)&&(se(),Ge(P))}}function Ne(P){var it=Yt(P)||w.props.trigger.indexOf("click")>=0&&l;if(!it){if(w.props.interactive){w.hideWithInteractivity(P);return}Ge(P)}}function me(P){w.props.trigger.indexOf("focusin")<0&&P.target!==ht()||w.props.interactive&&P.relatedTarget&&k.contains(P.relatedTarget)||Ge(P)}function Yt(P){return ti.isTouch?J()!==P.type.indexOf("touch")>=0:!1}function ii(){Ai();var P=w.props,it=P.popperOptions,at=P.placement,wt=P.offset,vt=P.getReferenceClientRect,fe=P.moveTransition,Me=st()?Go(k).arrow:null,xr=vt?{getBoundingClientRect:vt,contextElement:vt.contextElement||ht()}:r,Zi={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Qi){var si=Qi.state;if(st()){var Tn=ft(),_n=Tn.box;["placement","reference-hidden","escaped"].forEach(function(ji){ji==="placement"?_n.setAttribute("data-placement",si.placement):si.attributes.popper["data-popper-"+ji]?_n.setAttribute("data-"+ji,""):_n.removeAttribute("data-"+ji)}),si.attributes.popper={}}}},ar=[{name:"offset",options:{offset:wt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!fe}},Zi];st()&&Me&&ar.push({name:"arrow",options:{element:Me,padding:3}}),ar.push.apply(ar,(it==null?void 0:it.modifiers)||[]),w.popperInstance=gy(xr,k,Object.assign({},it,{placement:at,onFirstUpdate:_,modifiers:ar}))}function Ai(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function ue(){var P=w.props.appendTo,it,at=ht();w.props.interactive&&P===wf||P==="parent"?it=at.parentNode:it=Tf(P,[at]),it.contains(k)||it.appendChild(k),w.state.isMounted=!0,ii(),process.env.NODE_ENV!=="production"&&Ei(w.props.interactive&&P===ir.appendTo&&at.nextElementSibling!==k,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
61
62
 
62
63
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
63
64
 
64
65
  `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
65
66
 
66
- `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Tt(){return Ha(q.querySelectorAll("[data-tippy-root]"))}function Ke(L){A.clearDelayTimeouts(),L&&Ot("onTrigger",[A,L]),te();var Q=O(!0),rt=nt(),At=rt[0],mt=rt[1];$r.isTouch&&At==="hold"&&mt&&(Q=mt),Q?i=setTimeout(function(){A.show()},Q):A.show()}function He(L){if(A.clearDelayTimeouts(),Ot("onUntrigger",[A,L]),!A.state.isVisible){Ae();return}if(!(A.props.trigger.indexOf("mouseenter")>=0&&A.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(L.type)>=0&&l)){var Q=O(!1);Q?a=setTimeout(function(){A.state.isVisible&&A.hide()},Q):o=requestAnimationFrame(function(){A.hide()})}}function fn(){A.state.isEnabled=!0}function cr(){A.hide(),A.state.isEnabled=!1}function Ln(){clearTimeout(i),clearTimeout(a),cancelAnimationFrame(o)}function Je(L){if(process.env.NODE_ENV!=="production"&&hn(A.state.isDestroyed,Gi("setProps")),!A.state.isDestroyed){Ot("onBeforeUpdate",[A,L]),Ne();var Q=A.props,rt=nf(n,Object.assign({},Q,Xc(L),{ignoreAttributes:!0}));A.props=rt,we(),Q.interactiveDebounce!==rt.interactiveDebounce&&(Jt(),H=Gc(Gt,rt.interactiveDebounce)),Q.triggerTarget&&!rt.triggerTarget?$i(Q.triggerTarget).forEach(function(At){At.removeAttribute("aria-expanded")}):rt.triggerTarget&&n.removeAttribute("aria-expanded"),me(),gt(),tt&&tt(Q,rt),A.popperInstance&&(Yr(),Tt().forEach(function(At){requestAnimationFrame(At._tippy.popperInstance.forceUpdate)})),Ot("onAfterUpdate",[A,L])}}function qe(L){A.setProps({content:L})}function Rn(){process.env.NODE_ENV!=="production"&&hn(A.state.isDestroyed,Gi("show"));var L=A.state.isVisible,Q=A.state.isDestroyed,rt=!A.state.isEnabled,At=$r.isTouch&&!A.props.touch,mt=Ao(A.props.duration,0,Qe.duration);if(!(L||Q||rt||At)&&!ht().hasAttribute("disabled")&&(Ot("onShow",[A],!1),A.props.onShow(A)!==!1)){if(A.state.isVisible=!0,it()&&(q.style.visibility="visible"),gt(),te(),A.state.isMounted||(q.style.transition="none"),it()){var se=lt(),_e=se.box,fr=se.content;Do([_e,fr],0)}C=function(){var tr;if(!(!A.state.isVisible||v)){if(v=!0,q.offsetHeight,q.style.transition=A.props.moveTransition,it()&&A.props.animation){var hi=lt(),kn=hi.box,Zr=hi.content;Do([kn,Zr],mt),Zc([kn,Zr],"visible")}Se(),me(),Yc(Oo,A),(tr=A.popperInstance)==null||tr.forceUpdate(),Ot("onMount",[A]),A.props.animation&&it()&&Vt(mt,function(){A.state.isShown=!0,Ot("onShown",[A])})}},ee()}}function Pn(){process.env.NODE_ENV!=="production"&&hn(A.state.isDestroyed,Gi("hide"));var L=!A.state.isVisible,Q=A.state.isDestroyed,rt=!A.state.isEnabled,At=Ao(A.props.duration,1,Qe.duration);if(!(L||Q||rt)&&(Ot("onHide",[A],!1),A.props.onHide(A)!==!1)){if(A.state.isVisible=!1,A.state.isShown=!1,v=!1,l=!1,it()&&(q.style.visibility="hidden"),Jt(),Ae(),gt(!0),it()){var mt=lt(),se=mt.box,_e=mt.content;A.props.animation&&(Do([se,_e],At),Zc([se,_e],"hidden"))}Se(),me(),A.props.animation?it()&&Ht(At,A.unmount):A.unmount()}}function Xr(L){process.env.NODE_ENV!=="production"&&hn(A.state.isDestroyed,Gi("hideWithInteractivity")),dt().addEventListener("mousemove",H),Yc(qa,H),H(L)}function pn(){process.env.NODE_ENV!=="production"&&hn(A.state.isDestroyed,Gi("unmount")),A.state.isVisible&&A.hide(),A.state.isMounted&&(cn(),Tt().forEach(function(L){L._tippy.unmount()}),q.parentNode&&q.parentNode.removeChild(q),Oo=Oo.filter(function(L){return L!==A}),A.state.isMounted=!1,Ot("onHidden",[A]))}function li(){process.env.NODE_ENV!=="production"&&hn(A.state.isDestroyed,Gi("destroy")),!A.state.isDestroyed&&(A.clearDelayTimeouts(),A.unmount(),Ne(),delete n._tippy,A.state.isDestroyed=!0,Ot("onDestroy",[A]))}}function Ys(n,t){t===void 0&&(t={});var e=Qe.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(k2(n),sf(t,e)),I2();var i=Object.assign({},t,{plugins:e}),a=S2(n);if(process.env.NODE_ENV!=="production"){var o=$s(i.content),l=a.length>1;hn(o&&l,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
67
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Dt(){return eu(k.querySelectorAll("[data-tippy-root]"))}function nr(P){w.clearDelayTimeouts(),P&&Bt("onTrigger",[w,P]),ae();var it=O(!0),at=rt(),wt=at[0],vt=at[1];ti.isTouch&&wt==="hold"&&vt&&(it=vt),it?n=setTimeout(function(){w.show()},it):w.show()}function Ge(P){if(w.clearDelayTimeouts(),Bt("onUntrigger",[w,P]),!w.state.isVisible){Se();return}if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(P.type)>=0&&l)){var it=O(!1);it?a=setTimeout(function(){w.state.isVisible&&w.hide()},it):u=requestAnimationFrame(function(){w.hide()})}}function bi(){w.state.isEnabled=!0}function mr(){w.hide(),w.state.isEnabled=!1}function Gi(){clearTimeout(n),clearTimeout(a),cancelAnimationFrame(u)}function sr(P){if(process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("setProps")),!w.state.isDestroyed){Bt("onBeforeUpdate",[w,P]),Pe();var it=w.props,at=Pf(r,Object.assign({},it,Df(P),{ignoreAttributes:!0}));w.props=at,Oe(),it.interactiveDebounce!==at.interactiveDebounce&&(se(),F=_f(Qt,at.interactiveDebounce)),it.triggerTarget&&!at.triggerTarget?is(it.triggerTarget).forEach(function(wt){wt.removeAttribute("aria-expanded")}):at.triggerTarget&&r.removeAttribute("aria-expanded"),be(),yt(),j&&j(it,at),w.popperInstance&&(ii(),Dt().forEach(function(wt){requestAnimationFrame(wt._tippy.popperInstance.forceUpdate)})),Bt("onAfterUpdate",[w,P])}}function Ye(P){w.setProps({content:P})}function Yi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("show"));var P=w.state.isVisible,it=w.state.isDestroyed,at=!w.state.isEnabled,wt=ti.isTouch&&!w.props.touch,vt=Ho(w.props.duration,0,ir.duration);if(!(P||it||at||wt)&&!ht().hasAttribute("disabled")&&(Bt("onShow",[w],!1),w.props.onShow(w)!==!1)){if(w.state.isVisible=!0,st()&&(k.style.visibility="visible"),yt(),ae(),w.state.isMounted||(k.style.transition="none"),st()){var fe=ft(),Me=fe.box,xr=fe.content;Wo([Me,xr],0)}_=function(){var ar;if(!(!w.state.isVisible||d)){if(d=!0,k.offsetHeight,k.style.transition=w.props.moveTransition,st()&&w.props.animation){var wn=ft(),Qi=wn.box,si=wn.content;Wo([Qi,si],vt),Sf([Qi,si],"visible")}Re(),be(),Cf(Yo,w),(ar=w.popperInstance)==null||ar.forceUpdate(),Bt("onMount",[w]),w.props.animation&&st()&&Gt(vt,function(){w.state.isShown=!0,Bt("onShown",[w])})}},ue()}}function Xi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("hide"));var P=!w.state.isVisible,it=w.state.isDestroyed,at=!w.state.isEnabled,wt=Ho(w.props.duration,1,ir.duration);if(!(P||it||at)&&(Bt("onHide",[w],!1),w.props.onHide(w)!==!1)){if(w.state.isVisible=!1,w.state.isShown=!1,d=!1,l=!1,st()&&(k.style.visibility="hidden"),se(),Se(),yt(!0),st()){var vt=ft(),fe=vt.box,Me=vt.content;w.props.animation&&(Wo([fe,Me],wt),Sf([fe,Me],"hidden"))}Re(),be(),w.props.animation?st()&&Vt(wt,w.unmount):w.unmount()}}function ni(P){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("hideWithInteractivity")),ct().addEventListener("mousemove",F),Cf(ru,F),F(P)}function wi(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("unmount")),w.state.isVisible&&w.hide(),w.state.isMounted&&(Ai(),Dt().forEach(function(P){P._tippy.unmount()}),k.parentNode&&k.parentNode.removeChild(k),Yo=Yo.filter(function(P){return P!==w}),w.state.isMounted=!1,Bt("onHidden",[w]))}function bn(){process.env.NODE_ENV!=="production"&&Ei(w.state.isDestroyed,ns("destroy")),!w.state.isDestroyed&&(w.clearDelayTimeouts(),w.unmount(),Pe(),delete r._tippy,w.state.isDestroyed=!0,Bt("onDestroy",[w]))}}function ua(r,t){t===void 0&&(t={});var e=ir.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(Py(r),Ff(t,e)),My();var n=Object.assign({},t,{plugins:e}),a=Cy(r);if(process.env.NODE_ENV!=="production"){var u=sa(n.content),l=a.length>1;Ei(u&&l,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
67
68
 
68
69
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
69
70
 
70
71
  `,`1) content: element.innerHTML
71
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var c=a.reduce(function(f,v){var x=v&&$2(v,i);return x&&f.push(x),f},[]);return $s(n)?c[0]:c}Ys.defaultProps=Qe,Ys.setDefaultProps=q2,Ys.currentInput=$r,Object.assign({},_c,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}}),Ys.setDefaultProps({render:of});let G2=0;const Bn=Ys(document.body,{theme:"translucent",animation:"scale",inertia:!0,delay:[200,100],content:"",allowHTML:!0,placement:"left-start",trigger:"manual",arrow:!0});class No{constructor(t,e){this.container=t,this.text=e,t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.text=e}name="Label";id="Label"+G2++;el;position=new G;get isMounted(){return Bn.state.isMounted}get isShown(){return Bn.state.isShown}destroy(){this.text="",this.position.identity()}setHtml(t=""){return this.text=t,this}update(t){t&&(this.position.copy(t),Bn.show())}async show(t){if(t)return await this.hide(),this.position.copy(t),Bn.setContent(this.text),Bn.setProps({getReferenceClientRect:()=>({width:0,height:0,right:this.position.x,left:this.position.x,bottom:this.position.y,top:this.position.y,x:this.position.x,y:this.position.y,toJSON(){}})}),Bn.clearDelayTimeouts(),Bn.show(),new Promise(e=>{St.delay(function(){e()},300)})}async hide(){return Bn.hide(),new Promise(t=>{St.delay(function(){t()},100)})}}let Y2=0;class X2 extends qr{name="DummyPoint";id="dummyPoint"+Y2++;container;offset=new G;el;label;radius=10;position=new G;worldPosition=new G;userData;constructor(t,e){var a,o;super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let i=this.container.getBoundingClientRect();this.offset.set(i.left,i.top),this.userData=e,(a=this.userData)!=null&&a.type||St.set(this,"userData.type",ri.DEFAULT),this.initDom(),this.setType((o=this.userData)==null?void 0:o.type),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){var t;this.el&&((t=this.el)!=null&&t.parentNode||this.container.appendChild(this.el))}unmount(){var t,e,i,a;(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(i=this.el)==null||i.remove(),(a=this.label)==null||a.hide()}setText(t=""){return this.el?(this.el.innerText=t,this):this}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-point"),this.el.setAttribute(Ui+"-id",(t=this.userData)==null?void 0:t.value)}initLabel(){var t;(t=this.userData)!=null&&t.label&&(this.label=new No(this.container,this.userData.label))}setActive(t){return t?(Rs(this.el,"active"),this.showLabel()):(Ps(this.el,"active"),this.hideLabel()),this}showLabel(){var t;(t=this.label)==null||t.show(Z2.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var i;if(!this.userData)return this;const e=(i=this.userData)==null?void 0:i.type;return t||(t=ri.DEFAULT),e&&Ra(this.el,e)&&Ps(this.el,e),this.userData.type=t,Rs(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const Z2=new G;let j2=0;class Q2 extends qr{name="DummyRect";id="dummyRect"+j2++;container;offset=new G;el;radius=10;position=new G;worldPosition=new G;label;userData;constructor(t,e){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let i=this.container.getBoundingClientRect();this.offset.set(i.left,i.top),this.userData=e,this.initDom(),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){this.container.appendChild(this.el)}unmount(){var t,e,i,a;this.setText(""),(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(i=this.el)==null||i.remove(),(a=this.label)==null||a.hide()}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-rect"),this.el.setAttribute(Ui+"-id",((t=this.userData)==null?void 0:t.rmId)||"undefined")}initLabel(){this.label=new No(this.container,"")}setText(t=""){return this.el.innerText=t,this}setActive(t){return t?Rs(this.el,"active"):Ps(this.el,"active"),this}showLabel(){var t;(t=this.label)==null||t.show(K2.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var i;if(!this.userData)return this;const e=(i=this.userData)==null?void 0:i.type;return t=ri.DEFAULT,e&&Ra(this.el,e)&&Ps(this.el,e),this.userData.type=t,Rs(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const K2=new G;class J2 extends qr{name="Dummies";container;controller;scene;viewMatrix=new ie;dummies=[];rmMap=new Map;mergedMap=new Map;cameraUpdateHandler=this.handleCameraUpdate.bind(this);controllerTapHandler=this.handleControllerTap.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.clearDummies()}bindEvents(){this.controller.camera.addEventListener(oo.UPDATE,this.cameraUpdateHandler),this.controller.addEventListener(Dt.TAP,this.controllerTapHandler)}unbindEvents(){this.controller.camera.removeEventListener(oo.UPDATE,this.cameraUpdateHandler),this.controller.removeEventListener(Dt.TAP,this.controllerTapHandler)}bindScene(t){this.scene=t}update(t){var e,i,a;if(t){this.viewMatrix.copy(t);for(let o=0,l=(this.dummies||[]).length;o<l;o++){const c=this.dummies[o],f=(i=this.scene)==null?void 0:i.getElementById((e=c.userData)==null?void 0:e.rmId);if(f){const v=(a=this.scene)==null?void 0:a.chef.getElementBoundingBox(f.id);v==null||v.getCenter(In),In.applyMatrix3(this.viewMatrix).round(),c.position.copy(In)}else In.copy(c.worldPosition).applyMatrix3(this.viewMatrix).round(),c.update(In)}this.mergeDummies()}}setDummies(t){this.clearDummies();for(let e=0,i=(t||[]).length;e<i;e++)this.addDummy(t[e])}addDummy(t){var a,o;const e=new X2(this.container,t);this.dummies.push(e);const i=(a=e.userData)==null?void 0:a.rmId;return i&&(this.rmMap.has(i)||this.rmMap.set(i,[]),(o=this.rmMap.get(i))==null||o.push(e)),e}removeDummy(t){var a;const e=this.dummies.indexOf(t);e>-1&&this.dummies.splice(e,1);const i=(a=t.userData)==null?void 0:a.rmId;if(i){const o=this.mergedMap.get(i);o==null||o.destroy(),this.mergedMap.delete(i);const l=this.rmMap.get(i);if(!l)return;if(l.length===1)this.rmMap.delete(i);else{const c=l.indexOf(t);c>-1&&(l.splice(c,1),this.rmMap.set(i,l))}}t.destroy()}clearDummies(t){var e,i,a;for(let o=(((e=this.dummies)==null?void 0:e.length)||0)-1;o>=0;o--){const l=this.dummies[o];(!t||(i=l==null?void 0:l.userData)!=null&&i.type&&(t!=null&&t.includes((a=l.userData)==null?void 0:a.type)))&&this.removeDummy(l)}t||(this.dummies.length=0,this.mergedMap.clear(),this.rmMap.clear())}mergeDummies(){this.rmMap.forEach((t,e)=>{var a,o,l,c;if((a=this.scene)==null?void 0:a.getElementById(e)){const f=(o=this.scene)==null?void 0:o.chef.getElementBoundingBox(e);if(!f)return;Mo.copy(f).applyMatrix3(this.viewMatrix).round(),Mo.getSize(In);const v=t[0].radius,x=Mo.centralArrange(t.length,v*2,v*2);if(In.x<v*3||In.y<v*3){t.forEach(C=>C.unmount());const D=this.mergedMap.get(e);D==null||D.unmount()}else if(Array.isArray(x))this.mergedMap.has(e)&&((l=this.mergedMap.get(e))==null||l.unmount()),t.forEach((D,C)=>{D.isMounted||D.mount(),D.update(x[C])});else{t.forEach(S=>S.unmount());let D=this.mergedMap.get(e);if(D)D.isMounted||D.mount();else{const S=St.cloneDeep(t[0].userData)||{},H=St.reduce(t,(B,F)=>{var W,Y;return(W=F.userData)!=null&&W.label&&B.push((Y=F.userData)==null?void 0:Y.label),B},[]);S.label=H.join(", ");const I=St.reduce(t,(B,F)=>{var W,Y;return(W=F.userData)!=null&&W.value&&B.push((Y=F.userData)==null?void 0:Y.value),B},[]);S.value=I.join(","),S.rmId=e,D=new Q2(this.container,S),this.mergedMap.set(e,D)}D.setText(t.length.toString());const C=St.reduce(t,(S,H)=>{var I,B;return(I=H.userData)!=null&&I.label&&S.push((B=H.userData)==null?void 0:B.label),S},[]);(c=D.label)==null||c.setHtml(C.join(", <br />")),D.update(t[0].position)}}})}getDummyById(t){return this.dummies.find(e=>{var i;return((i=e.userData)==null?void 0:i.value)===t})}setActiveByIds(t){var e,i;if(this.resetActives(),!!t&&(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length)))for(let a=0,o=t.length;a<o;a++){const l=this.getDummyById(t[a]);if(l&&l.setActive(!0),l&&((e=l.userData)!=null&&e.rmId)){const c=this.mergedMap.get((i=l.userData)==null?void 0:i.rmId);c&&c.setActive(!0)}}}resetActives(){this.dummies.forEach(t=>t.setActive(!1)),this.mergedMap.forEach(t=>t.setActive(!1))}showDummyLabel(t){if(!t)return;const e=this.getDummyById(t);e&&e.showLabel();const i=this.mergedMap.get(t);i&&i.showLabel()}async hideDummyLabel(){this.dummies.forEach(t=>t.hideLabel()),this.mergedMap.forEach(t=>t.hideLabel())}handleCameraUpdate(){this.update(this.controller.camera.viewMatrix)}handleControllerTap(t){var a,o,l,c,f;if((t==null?void 0:t.type)!==Dt.TAP)return;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(o=t==null?void 0:t.e)==null?void 0:o.srcEvent)==null?void 0:l.target)||((f=(c=t==null?void 0:t.e)==null?void 0:c.srcEvent)==null?void 0:f.srcElement),i=e==null?void 0:e.getAttribute(Ui+"-id");i&&console.warn("【TODO】handleControllerTap: ",i)}}const In=new G,Mo=new It;(function(){return window[Nn.prefixed(window,"requestAnimationFrame")]||function(n){window.setTimeout(n,1e3/60)}})();class tm extends qr{name="DragController";dragFake=!1;container;offset=new G;controller;scene;raycaster;dummies;_els=[];_hms=new Map;_vos=new Map;_elMap=new Map;_panType=ri.SUCCESS;onPanHandler=this.handleOnPan.bind(this);panEndHandler=St.debounce(this.handlePanEnd.bind(this),500);constructor(t,e,i=!0){super(),this.container=t;let a=this.container.getBoundingClientRect();this.offset.set(a.left,a.top),this.controller=e,this.dummies=new J2(t,e),this.raycaster=new f0,this.dragFake=i}destroy(){var t;super.destroy();for(let e=(((t=this._els)==null?void 0:t.length)||0)-1;e>=0;e--)this.drop(this._els[e]);this.dummies.destroy()}bindScene(t){var e;this.scene=t,(e=this.dummies)==null||e.bindScene(t)}drag(t,e){t&&(this._els.includes(t)||(this.bindEvent(t),this._els.push(t),this._vos.set(t,e)))}drop(t){if(!t)return;this.unbindEvent(t),this._vos.delete(t),this._elMap.delete(t);const e=this._els.findIndex(i=>i===t);e>-1&&this._els.splice(e,1)}bindEvent(t){if(!t)return;const e=new Nn.Manager(t,{domEvents:!0});e.add(new Nn.Pan({threshold:0,pointers:0})),e.on(["panstart","panmove","panend"].join(" "),this.onPanHandler),this._hms.set(t,e)}unbindEvent(t){if(!t)return;const e=this._hms.get(t);e&&(e.off(["panstart","panmove","panend"].join(" "),this.onPanHandler),e.destroy(),this._hms.delete(t))}handleOnPan(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.srcEvent.stopPropagation=="function"&&t.srcEvent.stopPropagation(),typeof t.srcEvent.stopImmediatePropagation=="function"&&t.srcEvent.stopImmediatePropagation(),!this.controller)return;t.type==="panstart"||t.isFirst?this.controller.enablePan=!1:t.type==="panmove"||t.type==="panend"&&(this.controller.enablePan=!0);const e=this._vos.get(t.target);if(!e)return;const i=St.cloneDeep(e);i.type=this._panType;const a=this._getDummy(t.target,i);Xs.set(t.center.x,t.center.y).sub(this.offset),a.worldPosition.copy(Xs).unproject(this.controller.camera),a.update(Xs),this.panEndHandler({type:"panend",e:t})}handlePanEnd(t){if((t==null?void 0:t.type)!=="panend")return;const e=this.getDummies(!0);this.dispatchEvent({type:"panend",data:e})}getDummies(t=!0){const e=[];return this._els.forEach(i=>{var o;let a=this._vos.get(i);if(!(!a||a.type!==ri.SUCCESS)){if(t){const l=this._elMap.get(i);if(!l||!this.controller.camera)return;Xs.copy(l.position),this.raycaster.setFromCamera(Xs,this.controller.camera);const c=[];if((o=this.scene)==null||o.getIntersectObjects(this.raycaster,Ze.RM,c),!(c!=null&&c.length))return;a=St.cloneDeep(a),a.rmId=c[0].id}e.push(a)}}),e}setDummiesByVos(t){var e,i;for(let a=0,o=(t||[]).length;a<o;a++){const l=(e=this.dummies)==null?void 0:e.addDummy(t[a]);if(!l)continue;const c=St.cloneDeep(t[a]);delete c.rmId,delete c.wsId,this.drag(l.el,c)}(i=this.dummies)==null||i.update(this.controller.camera.viewMatrix)}clearDummies(t){var e,i;for(let a=(((e=this._els)==null?void 0:e.length)||0)-1;a>=0;a--){const o=this._vos.get(this._els[a]);(!t||t&&(o!=null&&o.type)&&t.includes(o.type))&&this.drop(this._els[a])}(i=this.dummies)==null||i.clearDummies(t)}getDummyById(t){return this.dummies.getDummyById(t)}highlightDummies(t){var e;(e=this.dummies)==null||e.setActiveByIds(t)}resetHighlightDummies(){var t;(t=this.dummies)==null||t.resetActives()}showDummyLabel(t){var e;(e=this.dummies)==null||e.showDummyLabel(t)}start(){}_getDummy(t,e){let i=this._elMap.get(t);if(i||(i=this.dummies.addDummy(e).setType(ri.SUCCESS),this._elMap.set(t,i)),i.isMounted||i.mount(),this.dummies.dummies.includes(i)||this.dummies.dummies.push(i),!this._elMap.get(i.el)){this._elMap.set(i.el,i);const o=St.cloneDeep(e);delete o.rmId,delete o.wsId,this.drag(i.el,o)}return i}}const Xs=new G;var Yi=Object.freeze({Linear:Object.freeze({None:function(n){return n},In:function(n){return n},Out:function(n){return n},InOut:function(n){return n}}),Quadratic:Object.freeze({In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}}),Cubic:Object.freeze({In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}}),Quartic:Object.freeze({In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}}),Quintic:Object.freeze({In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}}),Sinusoidal:Object.freeze({In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}}),Exponential:Object.freeze({In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut: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)}}),Circular:Object.freeze({In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}}),Elastic:Object.freeze({In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(n){var t=1.70158;return n===1?1:n*n*((t+1)*n-t)},Out:function(n){var t=1.70158;return n===0?0:--n*n*((t+1)*n+t)+1},InOut:function(n){var t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)}}),Bounce:Object.freeze({In:function(n){return 1-Yi.Bounce.Out(1-n)},Out: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},InOut:function(n){return n<.5?Yi.Bounce.In(n*2)*.5:Yi.Bounce.Out(n*2-1)*.5+.5}}),generatePow:function(n){return n===void 0&&(n=4),n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return Math.pow(t,n)},Out:function(t){return 1-Math.pow(1-t,n)},InOut:function(t){return t<.5?Math.pow(t*2,n)/2:(1-Math.pow(2-t*2,n))/2+.5}}}}),Xi=function(){return performance.now()},lf=function(){function n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return n.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},n.prototype.removeAll=function(){this._tweens={}},n.prototype.add=function(){for(var t,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];for(var a=0,o=e;a<o.length;a++){var l=o[a];(t=l._group)===null||t===void 0||t.remove(l),l._group=this,this._tweens[l.getId()]=l,this._tweensAddedDuringUpdate[l.getId()]=l}},n.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,a=t;i<a.length;i++){var o=a[i];o._group=void 0,delete this._tweens[o.getId()],delete this._tweensAddedDuringUpdate[o.getId()]}},n.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},n.prototype.update=function(t,e){t===void 0&&(t=Xi()),e===void 0&&(e=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<i.length;a++){var o=this._tweens[i[a]],l=!e;o&&o.update(t,l)===!1&&!e&&this.remove(o)}i=Object.keys(this._tweensAddedDuringUpdate)}},n}(),ai={Linear:function(n,t){var e=n.length-1,i=e*t,a=Math.floor(i),o=ai.Utils.Linear;return t<0?o(n[0],n[1],i):t>1?o(n[e],n[e-1],e-i):o(n[a],n[a+1>e?e:a+1],i-a)},Bezier:function(n,t){for(var e=0,i=n.length-1,a=Math.pow,o=ai.Utils.Bernstein,l=0;l<=i;l++)e+=a(1-t,i-l)*a(t,l)*n[l]*o(i,l);return e},CatmullRom:function(n,t){var e=n.length-1,i=e*t,a=Math.floor(i),o=ai.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(a=Math.floor(i=e*(1+t))),o(n[(a-1+e)%e],n[a],n[(a+1)%e],n[(a+2)%e],i-a)):t<0?n[0]-(o(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[e]-(o(n[e],n[e],n[e-1],n[e-1],i-e)-n[e]):o(n[a?a-1:0],n[a],n[e<a+1?e:a+1],n[e<a+2?e:a+2],i-a)},Utils:{Linear:function(n,t,e){return(t-n)*e+n},Bernstein:function(n,t){var e=ai.Utils.Factorial;return e(n)/e(t)/e(n-t)},Factorial:function(){var n=[1];return function(t){var e=1;if(n[t])return n[t];for(var i=t;i>1;i--)e*=i;return n[t]=e,e}}(),CatmullRom:function(n,t,e,i,a){var o=(e-n)*.5,l=(i-t)*.5,c=a*a,f=a*c;return(2*t-2*e+o+l)*f+(-3*t+3*e-2*o-l)*c+o*a+t}}},Bo=function(){function n(){}return n.nextId=function(){return n._nextId++},n._nextId=0,n}(),Io=new lf,em=function(){function n(t,e){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Yi.Linear.None,this._interpolationFunction=ai.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Bo.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof e=="object"?(this._group=e,e.add(this)):e===!0&&(this._group=Io,Io.add(this))}return n.prototype.getId=function(){return this._id},n.prototype.isPlaying=function(){return this._isPlaying},n.prototype.isPaused=function(){return this._isPaused},n.prototype.getDuration=function(){return this._duration},n.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},n.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},n.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},n.prototype.start=function(t,e){if(t===void 0&&(t=Xi()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var o in this._valuesEnd)a[o]=this._valuesEnd[o];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},n.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},n.prototype._setupProperties=function(t,e,i,a,o){for(var l in i){var c=t[l],f=Array.isArray(c),v=f?"array":typeof c,x=!f&&Array.isArray(i[l]);if(!(v==="undefined"||v==="function")){if(x){var D=i[l];if(D.length===0)continue;for(var C=[c],S=0,H=D.length;S<H;S+=1){var I=this._handleRelativeValue(c,D[S]);if(isNaN(I)){x=!1,console.warn("Found invalid interpolation list. Skipping.");break}C.push(I)}x&&(i[l]=C)}if((v==="object"||f)&&c&&!x){e[l]=f?[]:{};var B=c;for(var F in B)e[l][F]=B[F];a[l]=f?[]:{};var D=i[l];if(!this._isDynamic){var W={};for(var F in D)W[F]=D[F];i[l]=D=W}this._setupProperties(B,e[l],D,a[l],o)}else(typeof e[l]>"u"||o)&&(e[l]=c),f||(e[l]*=1),x?a[l]=i[l].slice().reverse():a[l]=e[l]||0}}},n.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},n.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},n.prototype.pause=function(t){return t===void 0&&(t=Xi()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},n.prototype.resume=function(t){return t===void 0&&(t=Xi()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},n.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},n.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},n.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},n.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},n.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},n.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},n.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},n.prototype.easing=function(t){return t===void 0&&(t=Yi.Linear.None),this._easingFunction=t,this},n.prototype.interpolation=function(t){return t===void 0&&(t=ai.Linear),this._interpolationFunction=t,this},n.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},n.prototype.onStart=function(t){return this._onStartCallback=t,this},n.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},n.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},n.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},n.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},n.prototype.onStop=function(t){return this._onStopCallback=t,this},n.prototype.update=function(t,e){var i=this,a;if(t===void 0&&(t=Xi()),e===void 0&&(e=n.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(e)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var l=t-this._startTime,c=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),f=this._duration+this._repeat*c,v=function(){if(i._duration===0||l>f)return 1;var I=Math.trunc(l/c),B=l-I*c,F=Math.min(B/i._duration,1);return F===0&&l===i._duration?1:F},x=v(),D=this._easingFunction(x);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,D),this._onUpdateCallback&&this._onUpdateCallback(this._object,x),this._duration===0||l>=this._duration)if(this._repeat>0){var C=Math.min(Math.trunc((l-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=C);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*C,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var S=0,H=this._chainedTweens.length;S<H;S++)this._chainedTweens[S].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},n.prototype._updateProperties=function(t,e,i,a){for(var o in i)if(e[o]!==void 0){var l=e[o]||0,c=i[o],f=Array.isArray(t[o]),v=Array.isArray(c),x=!f&&v;x?t[o]=this._interpolationFunction(c,a):typeof c=="object"&&c?this._updateProperties(t[o],l,c,a):(c=this._handleRelativeValue(l,c),typeof c=="number"&&(t[o]=l+(c-l)*a))}},n.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},n.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},n.autoStartOnUpdate=!1,n}(),rm="25.0.0",nm=Bo.nextId,Gr=Io,im=Gr.getAll.bind(Gr),sm=Gr.removeAll.bind(Gr),am=Gr.add.bind(Gr),um=Gr.remove.bind(Gr),om=Gr.update.bind(Gr),hf={Easing:Yi,Group:lf,Interpolation:ai,now:Xi,Sequence:Bo,nextId:nm,Tween:em,VERSION:rm,getAll:im,removeAll:sm,add:am,remove:um,update:om};class lm extends qr{name="SvgView";params;container;offset=new G;camera;controller;scene;p1=new G;p2=new G;graph;multiSelector;dummiesController;zoomToSelectEnable=!1;zoomBox=new It;selectEnable=!1;multiSelectEnable=!1;tween;animateDuration;label;controllerPanStartHandler=this.handlePanStart.bind(this);controllerPanEndHandler=this.handlePanEnd.bind(this);controllerWheelStartHandler=this.handlePanStart.bind(this);controllerWheelEndHandler=this.handlePanEnd.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPointerOverHandler=this.handleControllerPointerOver.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);_currentAssetId;constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.camera||(this.params.camera={}),this.params.camera.flipY=!0,this.animateDuration=this.params.animateDuration||300,this.camera=new h0(this.params.camera),this.container=this.params.containerId?document.getElementById(this.params.containerId):Xe.window.document.getElementsByTagName("body")[0];let e=this.container.getBoundingClientRect();this.offset.set(e.left,e.top),this.controller=new l0(this.container,this.camera,!0),this.graph=new Ec(this.container),this.multiSelector=new c0(this.container,this.controller),this.dummiesController=new tm(this.container,this.controller),this.bindControllerEvents(),this.initLabel()}destroy(){var t;this.unbindControllerEvents(),super.destroy(),(t=this.label)==null||t.destroy()}initLabel(){this.label=new No(this.container,"")}showAssetsLabel(t,e,i){var o,l,c,f,v;if(!e)return;t||(t=(o=this.scene)==null?void 0:o.assetType);const a=(l=this.scene)==null?void 0:l.chef.getElementBoundingBox(e);a&&!a.isEmpty()&&(i||(i=(c=this.scene)==null?void 0:c.getAssetLabelById(t,e),i||(i=e)),(f=this.label)==null||f.setHtml(i),ui.copy(a.min).applyMatrix3(this.camera.viewMatrix).add(this.offset).round(),(v=this.label)==null||v.show(ui))}async hideAssetsLabel(){var t;return(t=this.label)==null?void 0:t.hide()}bindScene(t){var e;this.scene=t,this.multiSelector.bindScene(this.scene),(e=this.dummiesController)==null||e.bindScene(this.scene)}async setByBox(t,e=!0){await this.resetCameraByBoundingBox(t,e)}zoomIn(){this.controller.scaled=this.camera.scaled.x*.9,this.controller.update()}zoomOut(){this.controller.scaled=this.camera.scaled.x*1.1,this.controller.update()}zoomToSelectEnableChanged(t){console.log("TODO: zoomToSelectEnableChanged: ",t),this.zoomToSelectEnable=t,this.controller.enablePan=!this.zoomToSelectEnable}selectEnableChanged(t){this.selectEnable=!!t,this.multiSelector.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.multiSelector.multiSelectEnableChanged(t)}getIntersectObjects(t,e,i=[]){return this.scene?this.scene.getIntersectObjects(t,e,i):i}async focusAt(t,e=500){return this.camera?(Wt.setFromCenterAndSize(t,ui.set(e*2,e*2)),this.resetCameraByBoundingBox(Wt,!0)):Promise.resolve()}async focusAtById(t,e=500){var a;const i=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);if(console.log("focusAtById: ",t,i==null?void 0:i.toString()),i){i.expandByScalar(e),Wt.copy(this.camera.boundingBoxWorld),Wt.containsBox(i)||await this.resetCameraByBoundingBox(i,!0);return}}async focusAtDummy(t,e=500){var o,l;const i=this.dummiesController.getDummyById(t),a=(o=i==null?void 0:i.userData)==null?void 0:o.rmId;if(a){const c=(l=this.scene)==null?void 0:l.getBoundingBoxById(a);if(c){c.expandByScalar(e),Wt.copy(this.camera.boundingBoxWorld),Wt.containsBox(c)||await this.resetCameraByBoundingBox(c,!0);return}}if(i!=null&&i.position&&!(i!=null&&i.position.isEmpty())){Wt.setFromCenterAndSize(i.worldPosition,ui.set(e*2,e*2)),this.camera.boundingBoxWorld.containsBox(Wt)||await this.resetCameraByBoundingBox(Wt,!0);return}}async resetCameraByBoundingBox(t,e=!1){if(!this.camera)return Promise.resolve();if(!t||t.isEmpty())throw new Error("BoundingBox empty");if(!e)return this.camera.setByBox(t),Promise.resolve();const i=this.camera.getCameraPosition();t.getCenter(ui),t.getSize(Lo);const a=Math.max(Lo.x/this.camera.width,Lo.y/this.camera.height),o={x:ui.x,y:ui.y,z:0,s:a,r:0};await this.animateCamera(i,o)}async animateCamera(t,e){return this.controller&&(this.controller.enabled=!1),this.tween&&this.tween.stop(),new Promise(i=>{this.tween=new hf.Tween(t).to(e,this.animateDuration).easing(hf.Easing.Exponential.Out).onUpdate(a=>{this.camera.position.set(a.x,a.y),this.camera.scaled.set(a.s,a.s),this.camera.rotation.set(a.r,a.r),this.camera.update()}).onComplete(()=>{this.controller&&(this.controller.enabled=!0),i()}).start()})}fullscreen(){this.scene&&(this.scene&&!this.scene.viewBox.isEmpty()?Wt.copy(this.scene.viewBox):(this.scene.updateMatrixWorld(!0),this.scene.computeBoundingBox(),Wt.copy(this.scene.boundingBox)),this.resetCameraByBoundingBox(Wt,!0))}saveCameraPosition(t){Wt.copy(this.camera.boundingBoxWorld);const e=t?Zi+t:Zi;sessionStorage.setItem(e,JSON.stringify(Wt))}restoreCameraPosition(t){const e=t?Zi+t:Zi,i=sessionStorage.getItem(e);if(!i)return this.fullscreen();Wt.copy(JSON.parse(i)),this.resetCameraByBoundingBox(Wt,!0)}clearCameraPosition(t){const e=t?Zi+t:Zi;sessionStorage.setItem(e,"")}bindControllerEvents(){this.controller.addEventListener(Dt.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(Dt.PAN_END,this.controllerPanEndHandler),this.controller.addEventListener(Dt.WHEEL_START,this.controllerWheelStartHandler),this.controller.addEventListener(Dt.WHEEL_END,this.controllerWheelEndHandler),this.controller.addEventListener(Dt.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(Dt.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.addEventListener(co.SELECTED,this.multiSelectorSelectedHandler)}unbindControllerEvents(){this.controller.removeEventListener(Dt.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(Dt.PAN_END,this.controllerPanEndHandler),this.controller.removeEventListener(Dt.WHEEL_START,this.controllerWheelStartHandler),this.controller.removeEventListener(Dt.WHEEL_END,this.controllerWheelEndHandler),this.controller.removeEventListener(Dt.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(Dt.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.removeEventListener(co.SELECTED,this.multiSelectorSelectedHandler)}handlePanStart(t){if(!((t==null?void 0:t.type)!==Dt.PAN_START&&(t==null?void 0:t.type)!==Dt.WHEEL_START)&&this.zoomToSelectEnable){this.p1.copy(t.data.screenCoords),Wt.makeEmpty().expandByPoint(this.p1),this.graph.draw(Wt);return}}handlePanEnd(t){if(!((t==null?void 0:t.type)!==Dt.PAN_END&&(t==null?void 0:t.type)!==Dt.WHEEL_END)&&this.zoomToSelectEnable){this.p2.copy(t.data.screenCoords),Wt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera),this.setByBox(Wt),this.graph.hide(),Wt.makeEmpty();return}}handleControllerPanMove(t){(t==null?void 0:t.type)===Dt.PAN_MOVE&&this.zoomToSelectEnable&&(this.p2.copy(t.data.screenCoords),Wt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(Wt))}handleControllerPointerOver(t){var a,o,l,c,f;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(o=t==null?void 0:t.e)==null?void 0:o.srcEvent)==null?void 0:l.target);let i=e==null?void 0:e.id;(i==null?void 0:i.indexOf("dummy"))>-1?(i=e.getAttribute(Ui+"-id"),i&&this._currentAssetId!==i&&this.dispatchEvent({type:"POINTEROVER",data:{id:i,assetType:"dummy"},e:t.e})):i&&((c=this.scene)!=null&&c.isBelongsToAssetType(i,Ze.WS))?this._currentAssetId!==i&&this.dispatchEvent({type:"POINTEROVER",data:{id:i,assetType:Ze.WS},e:t.e}):i&&((f=this.scene)!=null&&f.isBelongsToAssetType(i,Ze.RM))?this._currentAssetId!==i&&this.dispatchEvent({type:"POINTEROVER",data:{id:i,assetType:Ze.RM},e:t.e}):(this._currentAssetId=void 0,this.dispatchEvent({type:"POINTERLEAVE",e:t.e})),this._currentAssetId=i}handleMultiSelectorSelected(t){console.warn("handleMultiSelectorSelected:",t.data),this.dispatchEvent({type:"SELECTED",data:t.data})}setDummies(t){this.dummiesController.setDummiesByVos(t)}clearDummies(t){this.dummiesController.clearDummies(t)}update(t){this.tween&&this.tween.update(t)}}const Zi="camera_position_",Wt=new It,ui=new G,Lo=new G;var oi=(n=>(n.SELECTED="SELECTED",n.POINTEROVER="POINTEROVER",n.POINTERLEAVE="POINTERLEAVE",n))(oi||{});class hm extends qr{name="SvgApp";params;renderer;view;scene;loadingScene;mainScene;zoomToSelectEnable=!1;zoomBox=new It;selectEnable=!1;multiSelectEnable=!1;runningHandler=this.running.bind(this);pointerOverHandler=this.handlePointerOver.bind(this);pointerLeaveHandler=this.handlePointerLeave.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);dragEndHandler=this.handleDragEnd.bind(this);constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.defaultFill||(this.params.defaultFill=Ut.getMoreTransparent(ne.white,.3)),this.params.defaultStroke||(this.params.defaultStroke=Ut.getMoreTransparent(ne.darkWhite,.8)),this.params.infoFill||(this.params.infoFill=Ut.getMoreTransparent(ne.gray,.3)),this.params.infoStroke||(this.params.infoStroke=Ut.getMoreTransparent(ne.darkGray,.8)),this.params.primaryFill||(this.params.primaryFill=Ut.getMoreTransparent(ne.blue,.3)),this.params.primaryStroke||(this.params.primaryStroke=Ut.getMoreTransparent(ne.darkBlue,.8)),this.params.successFill||(this.params.successFill=Ut.getMoreTransparent(ne.green,.3)),this.params.successStroke||(this.params.successStroke=Ut.getMoreTransparent(ne.darkGreen,.8)),this.params.warningFill||(this.params.warningFill=Ut.getMoreTransparent(ne.yellow,.3)),this.params.warningStroke||(this.params.warningStroke=Ut.getMoreTransparent(ne.darkYellow,.8)),this.params.dangerFill||(this.params.dangerFill=Ut.getMoreTransparent(ne.red,.3)),this.params.dangerStroke||(this.params.dangerStroke=Ut.getMoreTransparent(ne.darkRed,.8)),this.params.activeFill||(this.params.activeFill=Ut.getMoreTransparent(ne.brown,.3)),this.params.activeStroke||(this.params.activeStroke=Ut.getMoreTransparent(ne.darkBrown,.8)),this.renderer=new Dg(t),this.view=new lm(t),this.trans2LoadingScene()}get isLoadingScene(){var t;return((t=this.scene)==null?void 0:t.name)==="SvgLoadingScene"}destroy(){var t,e;this.unbindAssetsEvents(),super.destroy(),(t=this.view)==null||t.destroy(),(e=this.renderer)==null||e.destroy()}resize(){var t,e,i;(t=this.renderer)==null||t.resize(),(i=(e=this.view)==null?void 0:e.camera)==null||i.resize()}isScene(t){var e;return((e=this.scene)==null?void 0:e.uuid)===t.uuid}removeScene(t){this.scene=void 0,t==null||t.destroy()}trans2MainScene(){var t,e;(t=this.scene)==null||t.unmount(),this.scene=this.mainScene,this.scene.isMounted||this.scene.mount(),this.view.bindScene(this.scene),(e=this.loadingScene)==null||e.destroy()}trans2LoadingScene(){var e,i;this.loadingScene=new u0(this.params),(e=this.scene)==null||e.unmount(),this.scene=this.loadingScene,this.scene.isMounted||this.scene.mount();const t=new It().copy(this.loadingScene.viewBox).expandByVector(new G(1,1).multiplyScalar(360));this.view.setByBox(t,!1),(i=this.mainScene)==null||i.destroy()}start(){requestAnimationFrame(this.runningHandler)}running(t){this.scene&&(this.scene.update(),this.renderer.render(this.scene,this.view.camera),this.view.update(t),requestAnimationFrame(this.runningHandler))}async load(t,e,i=2,a){this.isLoadingScene||this.trans2LoadingScene(),await zh(this.params.syncDelay);const o=await new nc().loadAsync(t);this.mainScene=new vc(this.params),this.mainScene.bind(o),this.view.setByBox(this.mainScene.viewBox);const l=this.mainScene.getLayers(i);return e!=null&&e.length||(e=St.map(l,"label")),this.mainScene.showDefaultLayers(e,!0),a!=null&&a.length&&this.setSkeletons(a),this.trans2MainScene(),this.bindAssetsEvents(),console.log("svgApp.load: ",l),l}setSkeletons(t){var e;(e=this.scene)==null||e.setSkeletonLayers(t)}getLayers(t=2){var e;return(e=this.scene)==null?void 0:e.getLayers(t)}updateLayersVisibility(t,e=!1){var i;(i=this.scene)==null||i.updateLayersVisibility(t,e)}selectByIds(t){var e;(e=this.scene)==null||e.selectByIds(t,this.multiSelectEnable)}getSelectedIds(){var t;return(t=this.scene)==null?void 0:t.getSelectedIds()}async targetByIds(t){var e;this.scene&&((e=this.scene)==null||e.selectByIds(t,!1),Ro.copy(this.scene.getSelectedBoundingBox()).expandByVector(new G(1,1).multiplyScalar(100)),await zh(100),Ro.isEmpty()||await this.view.setByBox(Ro))}linkAssetsByTree(t){var e;(e=this.scene)==null||e.linkAssetsByTree(t)}setViewAreaLimit(t){this.renderer.viewAreaLimit=t}setAssetType(t,e){var i;(i=this.scene)==null||i.setAssetType(t,e)}getAssetIdsByType(t){var e;return(e=this.scene)==null?void 0:e.getAssetIdsByType(t)}clearFill(){var t;(t=this.scene)==null||t.clearFillOrStroke("fill")}clearFillByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"fill")}setFillByIds(t,e){var i;(i=this.scene)==null||i.setFillOrStrokeByIds(t,e,"fill")}clearStroke(){var t;(t=this.scene)==null||t.clearFillOrStroke("stroke")}clearStrokeByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"stroke")}setStrokeByIds(t,e){var i;(i=this.scene)==null||i.setFillOrStrokeByIds(t,e,"stroke")}getLegend(){var t;return(t=this.scene)==null?void 0:t.getLegend()}setAssetLabels(t,e){var i;(i=this.scene)==null||i.setAssetLabels(t,e)}clearAssetLabels(){var t;(t=this.scene)==null||t.clearAssetLabels()}fullscreen(){this.view.fullscreen()}saveCameraPosition(t){this.view.saveCameraPosition(t)}restoreCameraPosition(t){this.view.restoreCameraPosition(t)}clearCameraPosition(t){this.view.clearCameraPosition(t)}zoomIn(){this.view.zoomIn()}zoomOut(){this.view.zoomOut()}focusAt(t,e=1e3){var i;(i=this.view)==null||i.focusAt(t,e)}async focusAtById(t,e=1e3){var i;return(i=this.view)==null?void 0:i.focusAtById(t,e)}async focusAtDummy(t,e=1e3){var i;return(i=this.view)==null?void 0:i.focusAtDummy(t,e)}showAssetsLabel(t,e,i){var a,o,l,c;e?t==="dummy"?(l=(o=(a=this.view)==null?void 0:a.dummiesController)==null?void 0:o.dummies)==null||l.showDummyLabel(e):(c=this.view)==null||c.showAssetsLabel(t,e,i):this.hideAssetsLabel()}hideAssetsLabel(){var t,e,i,a;(i=(e=(t=this.view)==null?void 0:t.dummiesController)==null?void 0:e.dummies)==null||i.hideDummyLabel(),(a=this.view)==null||a.hideAssetsLabel()}highlightAssets(t,e){var i;(i=this.scene)==null||i.highlightAssets(t,e)}resetHighlightAssets(t){var e;(e=this.scene)==null||e.resetHighlightAssets(t)}fontZoomIn(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",1.1)}fontZoomOut(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",.9)}zoomToSelectEnableChanged(t){this.view.zoomToSelectEnableChanged(t)}selectEnableChanged(t){this.selectEnable=!!t,this.view.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.view.multiSelectEnableChanged(t)}clearSelected(){var t;(t=this.scene)==null||t.clearSelected()}socialDistanceEnableChanged(t){var e;(e=this.scene)==null||e.socialDistanceEnableChanged(t)}getBoundingBoxById(t,e=!0){var a;if(!t)return;const i=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);return i&&e&&i.applyMatrix3(this.view.camera.viewMatrix).round(),i}setDummies(t){var e;(e=this.view)==null||e.setDummies(t)}clearDummies(t){var e;(e=this.view)==null||e.clearDummies(t)}highlightDummies(t){var e,i;(i=(e=this.view)==null?void 0:e.dummiesController)==null||i.highlightDummies(t)}resetHighlightDummies(){var t,e;(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.resetHighlightDummies()}bindAssetsEvents(){var t,e;this.view.addEventListener(oi.POINTEROVER,this.pointerOverHandler),this.view.addEventListener(oi.POINTERLEAVE,this.pointerLeaveHandler),this.view.addEventListener(oi.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.addEventListener("panend",this.dragEndHandler)}unbindAssetsEvents(){var t,e;this.view.removeEventListener(oi.POINTEROVER,this.pointerOverHandler),this.view.removeEventListener(oi.POINTERLEAVE,this.pointerLeaveHandler),this.view.removeEventListener(oi.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.removeEventListener("panend",this.dragEndHandler)}handleMultiSelectorSelected(t){this.dispatchEvent({type:"SELECTED",data:t.data})}handlePointerOver(t){this.dispatchEvent({type:"pointerover",data:t.data,e:t.e})}handlePointerLeave(t){this.dispatchEvent({type:"pointerleave",data:t.data,e:t.e})}handleInitializeStart(){console.log("App.initializeStart ...")}async handleInitializeComplete(t){console.log("App.initializeComplete ...",t),t!=null&&t.data&&this.launch()}handleDragEnd(t){this.dispatchEvent(t)}launch(){console.log("App.launch ...")}}const Ro=new It;var cf=(n=>(n.SELECTED="SELECTED",n.POINTEROVER="pointerover",n.POINTERLEAVE="pointerleave",n.DRAG_END="panend",n))(cf||{});function cm(n){return new Worker("/environment.worker.js",{type:"module",name:n==null?void 0:n.name})}de.AppEnum=cf,de.AssetTypeEnum=Ze,de.Box2=og,de.Color=Ut,de.ColorsEnum=ne,de.EnvironmentWorker=cm,de.GLOB=Xe,de.LayerTypeEnum=Ms,de.Monitor=Lt,de.SvgApp=hm,de.Vector2=ag,de.defaultConfig=Ti,Object.defineProperty(de,Symbol.toStringTag,{value:"Module"})});
72
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var c=a.reduce(function(f,d){var y=d&&Vy(d,n);return y&&f.push(y),f},[]);return sa(r)?c[0]:c}ua.defaultProps=ir,ua.setDefaultProps=ky,ua.currentInput=ti,Object.assign({},nf,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),ua.setDefaultProps({render:Hf});let $y=0;const $i=ua(document.body,{theme:"translucent",animation:"scale",inertia:!0,delay:[200,100],content:"",allowHTML:!0,placement:"left-start",trigger:"manual",arrow:!0});class Xo{constructor(t,e){this.container=t,this.text=e,t?this.container=t:this.container=document.getElementsByTagName("body")[0],this.text=e}name="Label";id="Label"+$y++;el;position=new Y;get isMounted(){return $i.state.isMounted}get isShown(){return $i.state.isShown}destroy(){this.text="",this.position.identity()}setHtml(t=""){return this.text=t,this}update(t){t&&(this.position.copy(t),$i.show())}async show(t){if(t)return await this.hide(),this.position.copy(t),$i.setContent(this.text),$i.setProps({getReferenceClientRect:()=>({width:0,height:0,right:this.position.x,left:this.position.x,bottom:this.position.y,top:this.position.y,x:this.position.x,y:this.position.y,toJSON(){}})}),$i.clearDelayTimeouts(),$i.show(),new Promise(e=>{Mt.delay(function(){e()},300)})}async hide(){return $i.hide(),new Promise(t=>{Mt.delay(function(){t()},100)})}}let zy=0;class Gy extends Ir{name="DummyPoint";id="dummyPoint"+zy++;container;offset=new Y;el;label;radius=10;position=new Y;worldPosition=new Y;userData;constructor(t,e){var a,u;super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let n=this.container.getBoundingClientRect();this.offset.set(n.left,n.top),this.userData=e,(a=this.userData)!=null&&a.type||Mt.set(this,"userData.type",gn.DEFAULT),this.initDom(),this.setType((u=this.userData)==null?void 0:u.type),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){var t;this.el&&((t=this.el)!=null&&t.parentNode||this.container.appendChild(this.el))}unmount(){var t,e,n,a;(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(n=this.el)==null||n.remove(),(a=this.label)==null||a.hide()}setText(t=""){return this.el?(this.el.innerText=t,this):this}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-point"),this.el.setAttribute(Kn+"-id",(t=this.userData)==null?void 0:t.value)}initLabel(){var t;(t=this.userData)!=null&&t.label&&(this.label=new Xo(this.container,this.userData.label))}setActive(t){return t?(Xs(this.el,"active"),this.showLabel()):(Zs(this.el,"active"),this.hideLabel()),this}showLabel(){var t;(t=this.label)==null||t.show(Yy.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var n;if(!this.userData)return this;const e=(n=this.userData)==null?void 0:n.type;return t||(t=gn.DEFAULT),e&&Za(this.el,e)&&Zs(this.el,e),this.userData.type=t,Xs(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const Yy=new Y;let Xy=0;class Zy extends Ir{name="DummyRect";id="dummyRect"+Xy++;container;offset=new Y;el;radius=10;position=new Y;worldPosition=new Y;label;userData;constructor(t,e){super(),t?this.container=t:this.container=document.getElementsByTagName("body")[0];let n=this.container.getBoundingClientRect();this.offset.set(n.left,n.top),this.userData=e,this.initDom(),this.mount(),this.initLabel()}destroy(){var t;super.destroy(),this.unmount(),(t=this.label)==null||t.destroy()}get isMounted(){var t;return!!((t=this.el)!=null&&t.parentNode)}mount(){this.container.appendChild(this.el)}unmount(){var t,e,n,a;this.setText(""),(e=(t=this.el)==null?void 0:t.parentNode)==null||e.removeChild(this.el),(n=this.el)==null||n.remove(),(a=this.label)==null||a.hide()}initDom(){var t;this.el=document.createElement("div"),this.el.setAttribute("id",this.id),this.el.setAttribute("class","dummy-rect"),this.el.setAttribute(Kn+"-id",((t=this.userData)==null?void 0:t.rmId)||"undefined")}initLabel(){this.label=new Xo(this.container,"")}setText(t=""){return this.el.innerText=t,this}setActive(t){return t?Xs(this.el,"active"):Zs(this.el,"active"),this}showLabel(){var t;(t=this.label)==null||t.show(Qy.copy(this.position).add(this.offset).subScalar(this.radius))}hideLabel(){var t;(t=this.label)==null||t.hide()}setType(t){var n;if(!this.userData)return this;const e=(n=this.userData)==null?void 0:n.type;return t=gn.DEFAULT,e&&Za(this.el,e)&&Zs(this.el,e),this.userData.type=t,Xs(this.el,this.userData.type),this}update(t,e=!1){!t||!this.isMounted||(e||t.subScalar(this.radius).round(),this.position.copy(t),this.el.style.transform=`translate3D(${this.position.x}px, ${this.position.y}px, 0)`)}}const Qy=new Y;class jy extends Ir{name="Dummies";container;controller;scene;viewMatrix=new re;dummies=[];rmMap=new Map;mergedMap=new Map;cameraUpdateHandler=this.handleCameraUpdate.bind(this);controllerTapHandler=this.handleControllerTap.bind(this);constructor(t,e){super(),this.container=t,this.controller=e,this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.clearDummies()}bindEvents(){this.controller.camera.addEventListener(Qa.UPDATE,this.cameraUpdateHandler),this.controller.addEventListener(_t.TAP,this.controllerTapHandler)}unbindEvents(){this.controller.camera.removeEventListener(Qa.UPDATE,this.cameraUpdateHandler),this.controller.removeEventListener(_t.TAP,this.controllerTapHandler)}bindScene(t){this.scene=t}update(t){var e,n,a;if(t){this.viewMatrix.copy(t);for(let u=0,l=(this.dummies||[]).length;u<l;u++){const c=this.dummies[u],f=(n=this.scene)==null?void 0:n.getElementById((e=c.userData)==null?void 0:e.rmId);if(f){const d=(a=this.scene)==null?void 0:a.chef.getElementBoundingBox(f.id);d==null||d.getCenter(zi),zi.applyMatrix3(this.viewMatrix).round(),c.position.copy(zi)}else zi.copy(c.worldPosition).applyMatrix3(this.viewMatrix).round(),c.update(zi)}this.mergeDummies()}}setDummies(t){this.clearDummies();for(let e=0,n=(t||[]).length;e<n;e++)this.addDummy(t[e])}addDummy(t){var a,u;const e=new Gy(this.container,t);this.dummies.push(e);const n=(a=e.userData)==null?void 0:a.rmId;return n&&(this.rmMap.has(n)||this.rmMap.set(n,[]),(u=this.rmMap.get(n))==null||u.push(e)),e}removeDummy(t){var a;const e=this.dummies.indexOf(t);e>-1&&this.dummies.splice(e,1);const n=(a=t.userData)==null?void 0:a.rmId;if(n){const u=this.mergedMap.get(n);u==null||u.destroy(),this.mergedMap.delete(n);const l=this.rmMap.get(n);if(!l)return;if(l.length===1)this.rmMap.delete(n);else{const c=l.indexOf(t);c>-1&&(l.splice(c,1),this.rmMap.set(n,l))}}t.destroy()}clearDummies(t){var e,n,a;for(let u=(((e=this.dummies)==null?void 0:e.length)||0)-1;u>=0;u--){const l=this.dummies[u];(!t||(n=l==null?void 0:l.userData)!=null&&n.type&&(t!=null&&t.includes((a=l.userData)==null?void 0:a.type)))&&this.removeDummy(l)}t||(this.dummies.length=0,this.mergedMap.clear(),this.rmMap.clear())}mergeDummies(){this.rmMap.forEach((t,e)=>{var a,u,l,c;if((a=this.scene)==null?void 0:a.getElementById(e)){const f=(u=this.scene)==null?void 0:u.chef.getElementBoundingBox(e);if(!f)return;Zo.copy(f).applyMatrix3(this.viewMatrix).round(),Zo.getSize(zi);const d=t[0].radius,y=Zo.centralArrange(t.length,d*2,d*2);if(zi.x<d*3||zi.y<d*3){t.forEach(_=>_.unmount());const A=this.mergedMap.get(e);A==null||A.unmount()}else if(Array.isArray(y))this.mergedMap.has(e)&&((l=this.mergedMap.get(e))==null||l.unmount()),t.forEach((A,_)=>{A.isMounted||A.mount(),A.update(y[_])});else{t.forEach(C=>C.unmount());let A=this.mergedMap.get(e);if(A)A.isMounted||A.mount();else{const C=Mt.cloneDeep(t[0].userData)||{},F=Mt.reduce(t,(M,R)=>{var q,z;return(q=R.userData)!=null&&q.label&&M.push((z=R.userData)==null?void 0:z.label),M},[]);C.label=F.join(", ");const N=Mt.reduce(t,(M,R)=>{var q,z;return(q=R.userData)!=null&&q.value&&M.push((z=R.userData)==null?void 0:z.value),M},[]);C.value=N.join(","),C.rmId=e,A=new Zy(this.container,C),this.mergedMap.set(e,A)}A.setText(t.length.toString());const _=Mt.reduce(t,(C,F)=>{var N,M;return(N=F.userData)!=null&&N.label&&C.push((M=F.userData)==null?void 0:M.label),C},[]);(c=A.label)==null||c.setHtml(_.join(", <br />")),A.update(t[0].position)}}})}getDummyById(t){return this.dummies.find(e=>{var n;return((n=e.userData)==null?void 0:n.value)===t})}setActiveByIds(t){var e,n;if(this.resetActives(),!!t&&(Array.isArray(t)||(t=[t]),!!(t!=null&&t.length)))for(let a=0,u=t.length;a<u;a++){const l=this.getDummyById(t[a]);if(l&&l.setActive(!0),l&&((e=l.userData)!=null&&e.rmId)){const c=this.mergedMap.get((n=l.userData)==null?void 0:n.rmId);c&&c.setActive(!0)}}}resetActives(){this.dummies.forEach(t=>t.setActive(!1)),this.mergedMap.forEach(t=>t.setActive(!1))}showDummyLabel(t){if(!t)return;const e=this.getDummyById(t);e&&e.showLabel();const n=this.mergedMap.get(t);n&&n.showLabel()}async hideDummyLabel(){this.dummies.forEach(t=>t.hideLabel()),this.mergedMap.forEach(t=>t.hideLabel())}handleCameraUpdate(){this.update(this.controller.camera.viewMatrix)}handleControllerTap(t){var a,u,l,c,f;if((t==null?void 0:t.type)!==_t.TAP)return;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(u=t==null?void 0:t.e)==null?void 0:u.srcEvent)==null?void 0:l.target)||((f=(c=t==null?void 0:t.e)==null?void 0:c.srcEvent)==null?void 0:f.srcElement),n=e==null?void 0:e.getAttribute(Kn+"-id");n&&console.warn("【TODO】handleControllerTap: ",n)}}const zi=new Y,Zo=new St;(function(){return window[Wi.prefixed(window,"requestAnimationFrame")]||function(r){window.setTimeout(r,1e3/60)}})();class Ky extends Ir{name="DragController";dragFake=!1;container;offset=new Y;controller;scene;raycaster;dummies;_els=[];_hms=new Map;_vos=new Map;_elMap=new Map;_panType=gn.SUCCESS;onPanHandler=this.handleOnPan.bind(this);panEndHandler=Mt.debounce(this.handlePanEnd.bind(this),500);constructor(t,e,n=!0){super(),this.container=t;let a=this.container.getBoundingClientRect();this.offset.set(a.left,a.top),this.controller=e,this.dummies=new jy(t,e),this.raycaster=new h2,this.dragFake=n}destroy(){var t;super.destroy();for(let e=(((t=this._els)==null?void 0:t.length)||0)-1;e>=0;e--)this.drop(this._els[e]);this.dummies.destroy()}bindScene(t){var e;this.scene=t,(e=this.dummies)==null||e.bindScene(t)}drag(t,e){t&&(this._els.includes(t)||(this.bindEvent(t),this._els.push(t),this._vos.set(t,e)))}drop(t){if(!t)return;this.unbindEvent(t),this._vos.delete(t),this._elMap.delete(t);const e=this._els.findIndex(n=>n===t);e>-1&&this._els.splice(e,1)}bindEvent(t){if(!t)return;const e=new Wi.Manager(t,{domEvents:!0});e.add(new Wi.Pan({threshold:0,pointers:0})),e.on(["panstart","panmove","panend"].join(" "),this.onPanHandler),this._hms.set(t,e)}unbindEvent(t){if(!t)return;const e=this._hms.get(t);e&&(e.off(["panstart","panmove","panend"].join(" "),this.onPanHandler),e.destroy(),this._hms.delete(t))}handleOnPan(t){if(typeof t.preventDefault=="function"&&t.preventDefault(),typeof t.srcEvent.stopPropagation=="function"&&t.srcEvent.stopPropagation(),typeof t.srcEvent.stopImmediatePropagation=="function"&&t.srcEvent.stopImmediatePropagation(),!this.controller)return;t.type==="panstart"||t.isFirst?this.controller.enablePan=!1:t.type==="panmove"||t.type==="panend"&&(this.controller.enablePan=!0);const e=this._vos.get(t.target);if(!e)return;const n=Mt.cloneDeep(e);n.type=this._panType;const a=this._getDummy(t.target,n);oa.set(t.center.x,t.center.y).sub(this.offset),a.worldPosition.copy(oa).unproject(this.controller.camera),a.update(oa),this.panEndHandler({type:"panend",e:t})}handlePanEnd(t){if((t==null?void 0:t.type)!=="panend")return;const e=this.getDummies(!0);this.dispatchEvent({type:"panend",data:e})}getDummies(t=!0){const e=[];return this._els.forEach(n=>{var u;let a=this._vos.get(n);if(!(!a||a.type!==gn.SUCCESS)){if(t){const l=this._elMap.get(n);if(!l||!this.controller.camera)return;oa.copy(l.position),this.raycaster.setFromCamera(oa,this.controller.camera);const c=[];if((u=this.scene)==null||u.getIntersectObjects(this.raycaster,er.RM,c),!(c!=null&&c.length))return;a=Mt.cloneDeep(a),a.rmId=c[0].id}e.push(a)}}),e}setDummiesByVos(t){var e,n;for(let a=0,u=(t||[]).length;a<u;a++){const l=(e=this.dummies)==null?void 0:e.addDummy(t[a]);if(!l)continue;const c=Mt.cloneDeep(t[a]);delete c.rmId,delete c.wsId,this.drag(l.el,c)}(n=this.dummies)==null||n.update(this.controller.camera.viewMatrix)}clearDummies(t){var e,n;for(let a=(((e=this._els)==null?void 0:e.length)||0)-1;a>=0;a--){const u=this._vos.get(this._els[a]);(!t||t&&(u!=null&&u.type)&&t.includes(u.type))&&this.drop(this._els[a])}(n=this.dummies)==null||n.clearDummies(t)}getDummyById(t){return this.dummies.getDummyById(t)}highlightDummies(t){var e;(e=this.dummies)==null||e.setActiveByIds(t)}resetHighlightDummies(){var t;(t=this.dummies)==null||t.resetActives()}showDummyLabel(t){var e;(e=this.dummies)==null||e.showDummyLabel(t)}start(){}_getDummy(t,e){let n=this._elMap.get(t);if(n||(n=this.dummies.addDummy(e).setType(gn.SUCCESS),this._elMap.set(t,n)),n.isMounted||n.mount(),this.dummies.dummies.includes(n)||this.dummies.dummies.push(n),!this._elMap.get(n.el)){this._elMap.set(n.el,n);const u=Mt.cloneDeep(e);delete u.rmId,delete u.wsId,this.drag(n.el,u)}return n}}const oa=new Y;var ss=Object.freeze({Linear:Object.freeze({None:function(r){return r},In:function(r){return r},Out:function(r){return r},InOut:function(r){return r}}),Quadratic:Object.freeze({In:function(r){return r*r},Out:function(r){return r*(2-r)},InOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)}}),Cubic:Object.freeze({In:function(r){return r*r*r},Out:function(r){return--r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)}}),Quartic:Object.freeze({In:function(r){return r*r*r*r},Out:function(r){return 1- --r*r*r*r},InOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)}}),Quintic:Object.freeze({In:function(r){return r*r*r*r*r},Out:function(r){return--r*r*r*r*r+1},InOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)}}),Sinusoidal:Object.freeze({In:function(r){return 1-Math.sin((1-r)*Math.PI/2)},Out:function(r){return Math.sin(r*Math.PI/2)},InOut:function(r){return .5*(1-Math.sin(Math.PI*(.5-r)))}}),Exponential:Object.freeze({In:function(r){return r===0?0:Math.pow(1024,r-1)},Out:function(r){return r===1?1:1-Math.pow(2,-10*r)},InOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)}}),Circular:Object.freeze({In:function(r){return 1-Math.sqrt(1-r*r)},Out:function(r){return Math.sqrt(1- --r*r)},InOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)}}),Elastic:Object.freeze({In:function(r){return r===0?0:r===1?1:-Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI)},Out:function(r){return r===0?0:r===1?1:Math.pow(2,-10*r)*Math.sin((r-.1)*5*Math.PI)+1},InOut:function(r){return r===0?0:r===1?1:(r*=2,r<1?-.5*Math.pow(2,10*(r-1))*Math.sin((r-1.1)*5*Math.PI):.5*Math.pow(2,-10*(r-1))*Math.sin((r-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(r){var t=1.70158;return r===1?1:r*r*((t+1)*r-t)},Out:function(r){var t=1.70158;return r===0?0:--r*r*((t+1)*r+t)+1},InOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)}}),Bounce:Object.freeze({In:function(r){return 1-ss.Bounce.Out(1-r)},Out:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},InOut:function(r){return r<.5?ss.Bounce.In(r*2)*.5:ss.Bounce.Out(r*2-1)*.5+.5}}),generatePow:function(r){return r===void 0&&(r=4),r=r<Number.EPSILON?Number.EPSILON:r,r=r>1e4?1e4:r,{In:function(t){return Math.pow(t,r)},Out:function(t){return 1-Math.pow(1-t,r)},InOut:function(t){return t<.5?Math.pow(t*2,r)/2:(1-Math.pow(2-t*2,r))/2+.5}}}}),as=function(){return performance.now()},qf=function(){function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return r.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},r.prototype.removeAll=function(){this._tweens={}},r.prototype.add=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var a=0,u=e;a<u.length;a++){var l=u[a];(t=l._group)===null||t===void 0||t.remove(l),l._group=this,this._tweens[l.getId()]=l,this._tweensAddedDuringUpdate[l.getId()]=l}},r.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,a=t;n<a.length;n++){var u=a[n];u._group=void 0,delete this._tweens[u.getId()],delete this._tweensAddedDuringUpdate[u.getId()]}},r.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},r.prototype.update=function(t,e){t===void 0&&(t=as()),e===void 0&&(e=!0);var n=Object.keys(this._tweens);if(n.length!==0)for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var a=0;a<n.length;a++){var u=this._tweens[n[a]],l=!e;u&&u.update(t,l)===!1&&!e&&this.remove(u)}n=Object.keys(this._tweensAddedDuringUpdate)}},r}(),xn={Linear:function(r,t){var e=r.length-1,n=e*t,a=Math.floor(n),u=xn.Utils.Linear;return t<0?u(r[0],r[1],n):t>1?u(r[e],r[e-1],e-n):u(r[a],r[a+1>e?e:a+1],n-a)},Bezier:function(r,t){for(var e=0,n=r.length-1,a=Math.pow,u=xn.Utils.Bernstein,l=0;l<=n;l++)e+=a(1-t,n-l)*a(t,l)*r[l]*u(n,l);return e},CatmullRom:function(r,t){var e=r.length-1,n=e*t,a=Math.floor(n),u=xn.Utils.CatmullRom;return r[0]===r[e]?(t<0&&(a=Math.floor(n=e*(1+t))),u(r[(a-1+e)%e],r[a],r[(a+1)%e],r[(a+2)%e],n-a)):t<0?r[0]-(u(r[0],r[0],r[1],r[1],-n)-r[0]):t>1?r[e]-(u(r[e],r[e],r[e-1],r[e-1],n-e)-r[e]):u(r[a?a-1:0],r[a],r[e<a+1?e:a+1],r[e<a+2?e:a+2],n-a)},Utils:{Linear:function(r,t,e){return(t-r)*e+r},Bernstein:function(r,t){var e=xn.Utils.Factorial;return e(r)/e(t)/e(r-t)},Factorial:function(){var r=[1];return function(t){var e=1;if(r[t])return r[t];for(var n=t;n>1;n--)e*=n;return r[t]=e,e}}(),CatmullRom:function(r,t,e,n,a){var u=(e-r)*.5,l=(n-t)*.5,c=a*a,f=a*c;return(2*t-2*e+u+l)*f+(-3*t+3*e-2*u-l)*c+u*a+t}}},Qo=function(){function r(){}return r.nextId=function(){return r._nextId++},r._nextId=0,r}(),jo=new qf,Jy=function(){function r(t,e){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=ss.Linear.None,this._interpolationFunction=xn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Qo.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof e=="object"?(this._group=e,e.add(this)):e===!0&&(this._group=jo,jo.add(this))}return r.prototype.getId=function(){return this._id},r.prototype.isPlaying=function(){return this._isPlaying},r.prototype.isPaused=function(){return this._isPaused},r.prototype.getDuration=function(){return this._duration},r.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e<0?0:e,this},r.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},r.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},r.prototype.start=function(t,e){if(t===void 0&&(t=as()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var a={};for(var u in this._valuesEnd)a[u]=this._valuesEnd[u];this._valuesEnd=a}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},r.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},r.prototype._setupProperties=function(t,e,n,a,u){for(var l in n){var c=t[l],f=Array.isArray(c),d=f?"array":typeof c,y=!f&&Array.isArray(n[l]);if(!(d==="undefined"||d==="function")){if(y){var A=n[l];if(A.length===0)continue;for(var _=[c],C=0,F=A.length;C<F;C+=1){var N=this._handleRelativeValue(c,A[C]);if(isNaN(N)){y=!1,console.warn("Found invalid interpolation list. Skipping.");break}_.push(N)}y&&(n[l]=_)}if((d==="object"||f)&&c&&!y){e[l]=f?[]:{};var M=c;for(var R in M)e[l][R]=M[R];a[l]=f?[]:{};var A=n[l];if(!this._isDynamic){var q={};for(var R in A)q[R]=A[R];n[l]=A=q}this._setupProperties(M,e[l],A,a[l],u)}else(typeof e[l]>"u"||u)&&(e[l]=c),f||(e[l]*=1),y?a[l]=n[l].slice().reverse():a[l]=e[l]||0}}},r.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},r.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},r.prototype.pause=function(t){return t===void 0&&(t=as()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},r.prototype.resume=function(t){return t===void 0&&(t=as()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},r.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},r.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},r.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},r.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},r.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},r.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},r.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},r.prototype.easing=function(t){return t===void 0&&(t=ss.Linear.None),this._easingFunction=t,this},r.prototype.interpolation=function(t){return t===void 0&&(t=xn.Linear),this._interpolationFunction=t,this},r.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},r.prototype.onStart=function(t){return this._onStartCallback=t,this},r.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},r.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},r.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},r.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},r.prototype.onStop=function(t){return this._onStopCallback=t,this},r.prototype.update=function(t,e){var n=this,a;if(t===void 0&&(t=as()),e===void 0&&(e=r.autoStartOnUpdate),this._isPaused)return!0;var u;if(!this._goToEnd&&!this._isPlaying)if(e)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var l=t-this._startTime,c=this._duration+((a=this._repeatDelayTime)!==null&&a!==void 0?a:this._delayTime),f=this._duration+this._repeat*c,d=function(){if(n._duration===0||l>f)return 1;var N=Math.trunc(l/c),M=l-N*c,R=Math.min(M/n._duration,1);return R===0&&l===n._duration?1:R},y=d(),A=this._easingFunction(y);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,A),this._onUpdateCallback&&this._onUpdateCallback(this._object,y),this._duration===0||l>=this._duration)if(this._repeat>0){var _=Math.min(Math.trunc((l-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=_);for(u in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[u]=="string"&&(this._valuesStartRepeat[u]=this._valuesStartRepeat[u]+parseFloat(this._valuesEnd[u])),this._yoyo&&this._swapEndStartRepeatValues(u),this._valuesStart[u]=this._valuesStartRepeat[u];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*_,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var C=0,F=this._chainedTweens.length;C<F;C++)this._chainedTweens[C].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},r.prototype._updateProperties=function(t,e,n,a){for(var u in n)if(e[u]!==void 0){var l=e[u]||0,c=n[u],f=Array.isArray(t[u]),d=Array.isArray(c),y=!f&&d;y?t[u]=this._interpolationFunction(c,a):typeof c=="object"&&c?this._updateProperties(t[u],l,c,a):(c=this._handleRelativeValue(l,c),typeof c=="number"&&(t[u]=l+(c-l)*a))}},r.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},r.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},r.autoStartOnUpdate=!1,r}(),tv="25.0.0",ev=Qo.nextId,ei=jo,rv=ei.getAll.bind(ei),iv=ei.removeAll.bind(ei),nv=ei.add.bind(ei),sv=ei.remove.bind(ei),av=ei.update.bind(ei),iu={Easing:ss,Group:qf,Interpolation:xn,now:as,Sequence:Qo,nextId:ev,Tween:Jy,VERSION:tv,getAll:rv,removeAll:iv,add:nv,remove:sv,update:av};class uv{name="View";params;visible=!0;cvs;scene;scenes=[];camera;controller;tween;animateDuration;constructor(t={}){this.params=t,this.animateDuration=this.params.animateDuration||300,this.cvs=t.cvs,this.camera=new jc(t.camera||{})}destroy(){this.controller&&this.controller.destroy(),this.camera&&this.camera.destroy(),this.scene&&this.scene.destroy(),this.scenes.forEach(t=>t.destroy()),this.scenes.length=0}bindScene(t){this.scenes.push(t),this.reset(),this.scene=t,t.isStatic}saveCameraPosition(t){us.copy(this.camera.boundingBoxWorld);const e=t?vr+t:vr;sessionStorage.setItem(e,JSON.stringify(us))}clearCameraPosition(t){const e=t?vr+t:vr;sessionStorage.setItem(e,"")}restoreCameraPosition(t){const e=t?vr+t:vr,n=sessionStorage.getItem(e);n&&(us.copy(JSON.parse(n)),this.resetCameraByBoundingBox(us,!0))}fullscreen(t=10,e=!1){this.scene&&(this.scene.boundingBox.isEmpty()&&this.scene.computeBoundingBox(),us.copy(this.scene.boundingBox).expandByVector(nu.set(t,t)),this.resetCameraByBoundingBox(us,e))}handleCameraChanged(t){console.warn("handleCameraChanged: ",t.target.camera.position.z,t.target.camera.scaled.x)}reset(){}async resetCameraByBoundingBox(t,e=!1){if(!this.camera)return;if(!t||t.isEmpty())throw new Error("BoundingBox empty");if(!e)return this.camera.setByBox(t),Promise.resolve();const n=this.camera.getCameraPosition();t.getCenter(nu),t.getSize(Ko);const a=Math.max(Ko.x/this.camera.width,Ko.y/this.camera.height),u={x:nu.x,y:nu.y,z:0,s:a,r:0};await this.animateCamera(n,u)}async animateCamera(t,e){return this.controller&&(this.controller.enabled=!1),this.tween&&this.tween.stop(),new Promise(n=>{this.tween=new iu.Tween(t).to(e,this.animateDuration).easing(iu.Easing.Exponential.Out).onUpdate(a=>{this.camera.position.set(a.x,a.y),this.camera.scaled.set(a.s,a.s),this.camera.rotation.set(a.r,a.r),this.camera.update()}).onComplete(()=>{this.controller&&(this.controller.enabled=!0),n()}).start()})}computeBoundingBox(t,e=new St){return!t||!t.length||(e.makeEmpty(),t.forEach(n=>e.union(n.computeBoundingBox()))),e}expandScenesBoundingBox(t,e=new St){t.forEach(n=>n.boundingBox.union(e))}update(t){this.tween&&this.tween.update(t)}}const vr="camera_position_",nu=new Y,Ko=new Y,us=new St;class ov extends Ir{name="SvgView";params;container;offset=new Y;camera;controller;scene;p1=new Y;p2=new Y;graph;multiSelector;dummiesController;zoomToSelectEnable=!1;zoomBox=new St;selectEnable=!1;multiSelectEnable=!1;tween;animateDuration;label;controllerPanStartHandler=this.handlePanStart.bind(this);controllerPanEndHandler=this.handlePanEnd.bind(this);controllerWheelStartHandler=this.handlePanStart.bind(this);controllerWheelEndHandler=this.handlePanEnd.bind(this);controllerPanMoveHandler=this.handleControllerPanMove.bind(this);controllerPointerOverHandler=this.handleControllerPointerOver.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);_currentAssetId;constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.camera||(this.params.camera={}),this.params.camera.flipY=!0,this.animateDuration=this.params.animateDuration||300,this.camera=new jc(this.params.camera),this.container=this.params.containerId?document.getElementById(this.params.containerId):Zt.window.document.getElementsByTagName("body")[0];let e=this.container.getBoundingClientRect();this.offset.set(e.left,e.top),this.controller=new Qc(this.container,this.camera,!0),this.graph=new Kc(this.container),this.multiSelector=new l2(this.container,this.controller),this.dummiesController=new Ky(this.container,this.controller),this.bindControllerEvents(),this.initLabel()}destroy(){var t;this.unbindControllerEvents(),super.destroy(),(t=this.label)==null||t.destroy()}initLabel(){this.label=new Xo(this.container,"")}showAssetsLabel(t,e,n){var u,l,c,f,d;if(!e)return;t||(t=(u=this.scene)==null?void 0:u.assetType);const a=(l=this.scene)==null?void 0:l.chef.getElementBoundingBox(e);a&&!a.isEmpty()&&(n||(n=(c=this.scene)==null?void 0:c.getAssetLabelById(t,e),n||(n=e)),(f=this.label)==null||f.setHtml(n),En.copy(a.min).applyMatrix3(this.camera.viewMatrix).add(this.offset).round(),(d=this.label)==null||d.show(En))}async hideAssetsLabel(){var t;return(t=this.label)==null?void 0:t.hide()}bindScene(t){var e;this.scene=t,this.multiSelector.bindScene(this.scene),(e=this.dummiesController)==null||e.bindScene(this.scene)}async setByBox(t,e=!0){await this.resetCameraByBoundingBox(t,e)}zoomIn(){this.controller.scaled=this.camera.scaled.x*.9,this.controller.update()}zoomOut(){this.controller.scaled=this.camera.scaled.x*1.1,this.controller.update()}zoomToSelectEnableChanged(t){console.log("TODO: zoomToSelectEnableChanged: ",t),this.zoomToSelectEnable=t,this.controller.enablePan=!this.zoomToSelectEnable}selectEnableChanged(t){this.selectEnable=!!t,this.multiSelector.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.multiSelector.multiSelectEnableChanged(t)}getIntersectObjects(t,e,n=[]){return this.scene?this.scene.getIntersectObjects(t,e,n):n}async focusAt(t,e=500){return this.camera?(zt.setFromCenterAndSize(t,En.set(e*2,e*2)),this.resetCameraByBoundingBox(zt,!0)):Promise.resolve()}async focusAtById(t,e=500){var a;const n=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);if(console.log("focusAtById: ",t,n==null?void 0:n.toString()),n){n.expandByScalar(e),zt.copy(this.camera.boundingBoxWorld),zt.containsBox(n)||await this.resetCameraByBoundingBox(n,!0);return}}async focusAtDummy(t,e=500){var u,l;const n=this.dummiesController.getDummyById(t),a=(u=n==null?void 0:n.userData)==null?void 0:u.rmId;if(a){const c=(l=this.scene)==null?void 0:l.getBoundingBoxById(a);if(c){c.expandByScalar(e),zt.copy(this.camera.boundingBoxWorld),zt.containsBox(c)||await this.resetCameraByBoundingBox(c,!0);return}}if(n!=null&&n.position&&!(n!=null&&n.position.isEmpty())){zt.setFromCenterAndSize(n.worldPosition,En.set(e*2,e*2)),this.camera.boundingBoxWorld.containsBox(zt)||await this.resetCameraByBoundingBox(zt,!0);return}}async resetCameraByBoundingBox(t,e=!1){if(!this.camera)return Promise.resolve();if(!t||t.isEmpty())throw new Error("BoundingBox empty");if(!e)return this.camera.setByBox(t),Promise.resolve();const n=this.camera.getCameraPosition();t.getCenter(En),t.getSize(Jo);const a=Math.max(Jo.x/this.camera.width,Jo.y/this.camera.height),u={x:En.x,y:En.y,z:0,s:a,r:0};await this.animateCamera(n,u)}async animateCamera(t,e){return this.controller&&(this.controller.enabled=!1),this.tween&&this.tween.stop(),new Promise(n=>{this.tween=new iu.Tween(t).to(e,this.animateDuration).easing(iu.Easing.Exponential.Out).onUpdate(a=>{this.camera.position.set(a.x,a.y),this.camera.scaled.set(a.s,a.s),this.camera.rotation.set(a.r,a.r),this.camera.update()}).onComplete(()=>{this.controller&&(this.controller.enabled=!0),n()}).start()})}fullscreen(){this.scene&&(this.scene&&!this.scene.viewBox.isEmpty()?zt.copy(this.scene.viewBox):(this.scene.updateMatrixWorld(!0),this.scene.computeBoundingBox(),zt.copy(this.scene.boundingBox)),this.resetCameraByBoundingBox(zt,!0))}saveCameraPosition(t){zt.copy(this.camera.boundingBoxWorld);const e=t?vr+t:vr;sessionStorage.setItem(e,JSON.stringify(zt))}restoreCameraPosition(t){const e=t?vr+t:vr,n=sessionStorage.getItem(e);if(!n)return this.fullscreen();zt.copy(JSON.parse(n)),this.resetCameraByBoundingBox(zt,!0)}clearCameraPosition(t){const e=t?vr+t:vr;sessionStorage.setItem(e,"")}bindControllerEvents(){this.controller.addEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.addEventListener(_t.PAN_END,this.controllerPanEndHandler),this.controller.addEventListener(_t.WHEEL_START,this.controllerWheelStartHandler),this.controller.addEventListener(_t.WHEEL_END,this.controllerWheelEndHandler),this.controller.addEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.addEventListener(_t.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.addEventListener(No.SELECTED,this.multiSelectorSelectedHandler)}unbindControllerEvents(){this.controller.removeEventListener(_t.PAN_START,this.controllerPanStartHandler),this.controller.removeEventListener(_t.PAN_END,this.controllerPanEndHandler),this.controller.removeEventListener(_t.WHEEL_START,this.controllerWheelStartHandler),this.controller.removeEventListener(_t.WHEEL_END,this.controllerWheelEndHandler),this.controller.removeEventListener(_t.PAN_MOVE,this.controllerPanMoveHandler),this.controller.removeEventListener(_t.POINTEROVER,this.controllerPointerOverHandler),this.multiSelector.removeEventListener(No.SELECTED,this.multiSelectorSelectedHandler)}handlePanStart(t){if(!((t==null?void 0:t.type)!==_t.PAN_START&&(t==null?void 0:t.type)!==_t.WHEEL_START)&&this.zoomToSelectEnable){this.p1.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1),this.graph.draw(zt);return}}handlePanEnd(t){if(!((t==null?void 0:t.type)!==_t.PAN_END&&(t==null?void 0:t.type)!==_t.WHEEL_END)&&this.zoomToSelectEnable){this.p2.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2).unproject(this.controller.camera),this.setByBox(zt),this.graph.hide(),zt.makeEmpty();return}}handleControllerPanMove(t){(t==null?void 0:t.type)===_t.PAN_MOVE&&this.zoomToSelectEnable&&(this.p2.copy(t.data.screenCoords),zt.makeEmpty().expandByPoint(this.p1).expandByPoint(this.p2),this.graph.draw(zt))}handleControllerPointerOver(t){var a,u,l,c,f;const e=((a=t==null?void 0:t.e)==null?void 0:a.target)||((l=(u=t==null?void 0:t.e)==null?void 0:u.srcEvent)==null?void 0:l.target);let n=e==null?void 0:e.id;(n==null?void 0:n.indexOf("dummy"))>-1?(n=e.getAttribute(Kn+"-id"),n&&this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:"dummy"},e:t.e})):n&&((c=this.scene)!=null&&c.isBelongsToAssetType(n,er.WS))?this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:er.WS},e:t.e}):n&&((f=this.scene)!=null&&f.isBelongsToAssetType(n,er.RM))?this._currentAssetId!==n&&this.dispatchEvent({type:"POINTEROVER",data:{id:n,assetType:er.RM},e:t.e}):(this._currentAssetId=void 0,this.dispatchEvent({type:"POINTERLEAVE",e:t.e})),this._currentAssetId=n}handleMultiSelectorSelected(t){console.warn("handleMultiSelectorSelected:",t.data),this.dispatchEvent({type:"SELECTED",data:t.data})}setDummies(t){this.dummiesController.setDummiesByVos(t)}clearDummies(t){this.dummiesController.clearDummies(t)}update(t){this.tween&&this.tween.update(t)}}const zt=new St,En=new Y,Jo=new Y;var An=(r=>(r.SELECTED="SELECTED",r.POINTEROVER="POINTEROVER",r.POINTERLEAVE="POINTERLEAVE",r))(An||{});class lv extends Ir{name="SvgApp";params;renderer;view;scene;loadingScene;mainScene;zoomToSelectEnable=!1;zoomBox=new St;selectEnable=!1;multiSelectEnable=!1;runningHandler=this.running.bind(this);pointerOverHandler=this.handlePointerOver.bind(this);pointerLeaveHandler=this.handlePointerLeave.bind(this);multiSelectorSelectedHandler=this.handleMultiSelectorSelected.bind(this);dragEndHandler=this.handleDragEnd.bind(this);constructor(t={}){super(),this.params=t,this.params.zoomToSelectEnable&&(this.zoomToSelectEnable=!0),this.params.selectEnable&&(this.selectEnable=!0),this.params.multiSelectEnable&&(this.multiSelectEnable=!0),this.params.defaultFill||(this.params.defaultFill=Wt.getMoreTransparent(he.white,.3)),this.params.defaultStroke||(this.params.defaultStroke=Wt.getMoreTransparent(he.darkWhite,.8)),this.params.infoFill||(this.params.infoFill=Wt.getMoreTransparent(he.gray,.3)),this.params.infoStroke||(this.params.infoStroke=Wt.getMoreTransparent(he.darkGray,.8)),this.params.primaryFill||(this.params.primaryFill=Wt.getMoreTransparent(he.blue,.3)),this.params.primaryStroke||(this.params.primaryStroke=Wt.getMoreTransparent(he.darkBlue,.8)),this.params.successFill||(this.params.successFill=Wt.getMoreTransparent(he.green,.3)),this.params.successStroke||(this.params.successStroke=Wt.getMoreTransparent(he.darkGreen,.8)),this.params.warningFill||(this.params.warningFill=Wt.getMoreTransparent(he.yellow,.3)),this.params.warningStroke||(this.params.warningStroke=Wt.getMoreTransparent(he.darkYellow,.8)),this.params.dangerFill||(this.params.dangerFill=Wt.getMoreTransparent(he.red,.3)),this.params.dangerStroke||(this.params.dangerStroke=Wt.getMoreTransparent(he.darkRed,.8)),this.params.activeFill||(this.params.activeFill=Wt.getMoreTransparent(he.brown,.3)),this.params.activeStroke||(this.params.activeStroke=Wt.getMoreTransparent(he.darkBrown,.8)),this.renderer=new r0(t),this.view=new ov(t),this.trans2LoadingScene()}get isLoadingScene(){var t;return((t=this.scene)==null?void 0:t.name)==="SvgLoadingScene"}destroy(){var t,e;this.unbindAssetsEvents(),super.destroy(),(t=this.view)==null||t.destroy(),(e=this.renderer)==null||e.destroy()}resize(){var t,e,n;(t=this.renderer)==null||t.resize(),(n=(e=this.view)==null?void 0:e.camera)==null||n.resize()}isScene(t){var e;return((e=this.scene)==null?void 0:e.uuid)===t.uuid}removeScene(t){this.scene=void 0,t==null||t.destroy()}trans2MainScene(){var t,e;(t=this.scene)==null||t.unmount(),this.scene=this.mainScene,this.scene.isMounted||this.scene.mount(),this.view.bindScene(this.scene),(e=this.loadingScene)==null||e.destroy()}trans2LoadingScene(){var e,n;this.loadingScene=new u2(this.params),(e=this.scene)==null||e.unmount(),this.scene=this.loadingScene,this.scene.isMounted||this.scene.mount();const t=new St().copy(this.loadingScene.viewBox).expandByVector(new Y(1,1).multiplyScalar(360));this.view.setByBox(t,!1),(n=this.mainScene)==null||n.destroy()}start(){requestAnimationFrame(this.runningHandler)}running(t){this.scene&&(this.scene.update(),this.renderer.render(this.scene,this.view.camera),this.view.update(t),requestAnimationFrame(this.runningHandler))}async load(t,e,n=2,a){this.isLoadingScene||this.trans2LoadingScene(),await lc(this.params.syncDelay);const u=await new Ac().loadAsync(t);this.mainScene=new Yc(this.params),this.mainScene.bind(u),this.view.setByBox(this.mainScene.viewBox);const l=this.mainScene.getLayers(n);return e!=null&&e.length||(e=Mt.map(l,"label")),this.mainScene.showDefaultLayers(e,!0),a!=null&&a.length&&this.setSkeletons(a),this.trans2MainScene(),this.bindAssetsEvents(),console.log("svgApp.load: ",l),l}setSkeletons(t){var e;(e=this.scene)==null||e.setSkeletonLayers(t)}getLayers(t=2){var e;return(e=this.scene)==null?void 0:e.getLayers(t)}updateLayersVisibility(t,e=!1){var n;(n=this.scene)==null||n.updateLayersVisibility(t,e)}selectByIds(t){var e;(e=this.scene)==null||e.selectByIds(t,this.multiSelectEnable)}getSelectedIds(){var t;return(t=this.scene)==null?void 0:t.getSelectedIds()}async targetByIds(t){var e;this.scene&&((e=this.scene)==null||e.selectByIds(t,!1),tl.copy(this.scene.getSelectedBoundingBox()).expandByVector(new Y(1,1).multiplyScalar(100)),await lc(100),tl.isEmpty()||await this.view.setByBox(tl))}linkAssetsByTree(t){var e;(e=this.scene)==null||e.linkAssetsByTree(t)}setViewAreaLimit(t){this.renderer.viewAreaLimit=t}setAssetType(t,e){var n;(n=this.scene)==null||n.setAssetType(t,e)}getAssetIdsByType(t){var e;return(e=this.scene)==null?void 0:e.getAssetIdsByType(t)}clearFill(){var t;(t=this.scene)==null||t.clearFillOrStroke("fill")}clearFillByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"fill")}setFillByIds(t,e){var n;(n=this.scene)==null||n.setFillOrStrokeByIds(t,e,"fill")}clearStroke(){var t;(t=this.scene)==null||t.clearFillOrStroke("stroke")}clearStrokeByIds(t){var e;(e=this.scene)==null||e.clearFillOrStrokeByIds(t,"stroke")}setStrokeByIds(t,e){var n;(n=this.scene)==null||n.setFillOrStrokeByIds(t,e,"stroke")}getLegend(){var t;return(t=this.scene)==null?void 0:t.getLegend()}setAssetLabels(t,e){var n;(n=this.scene)==null||n.setAssetLabels(t,e)}clearAssetLabels(){var t;(t=this.scene)==null||t.clearAssetLabels()}fullscreen(){this.view.fullscreen()}saveCameraPosition(t){this.view.saveCameraPosition(t)}restoreCameraPosition(t){this.view.restoreCameraPosition(t)}clearCameraPosition(t){this.view.clearCameraPosition(t)}zoomIn(){this.view.zoomIn()}zoomOut(){this.view.zoomOut()}focusAt(t,e=1e3){var n;(n=this.view)==null||n.focusAt(t,e)}async focusAtById(t,e=1e3){var n;return(n=this.view)==null?void 0:n.focusAtById(t,e)}async focusAtDummy(t,e=1e3){var n;return(n=this.view)==null?void 0:n.focusAtDummy(t,e)}showAssetsLabel(t,e,n){var a,u,l,c;e?t==="dummy"?(l=(u=(a=this.view)==null?void 0:a.dummiesController)==null?void 0:u.dummies)==null||l.showDummyLabel(e):(c=this.view)==null||c.showAssetsLabel(t,e,n):this.hideAssetsLabel()}hideAssetsLabel(){var t,e,n,a;(n=(e=(t=this.view)==null?void 0:t.dummiesController)==null?void 0:e.dummies)==null||n.hideDummyLabel(),(a=this.view)==null||a.hideAssetsLabel()}highlightAssets(t,e){var n;(n=this.scene)==null||n.highlightAssets(t,e)}resetHighlightAssets(t){var e;(e=this.scene)==null||e.resetHighlightAssets(t)}fontZoomIn(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",1.1)}fontZoomOut(){var t;(t=this.scene)==null||t.chef.fontZoom("asset-labels",.9)}zoomToSelectEnableChanged(t){this.view.zoomToSelectEnableChanged(t)}selectEnableChanged(t){this.selectEnable=!!t,this.view.selectEnableChanged(t)}multiSelectEnableChanged(t){this.multiSelectEnable=!!t,this.view.multiSelectEnableChanged(t)}clearSelected(){var t;(t=this.scene)==null||t.clearSelected()}socialDistanceEnableChanged(t){var e;(e=this.scene)==null||e.socialDistanceEnableChanged(t)}getBoundingBoxById(t,e=!0){var a;if(!t)return;const n=(a=this.scene)==null?void 0:a.getBoundingBoxById(t);return n&&e&&n.applyMatrix3(this.view.camera.viewMatrix).round(),n}setDummies(t){var e;(e=this.view)==null||e.setDummies(t)}clearDummies(t){var e;(e=this.view)==null||e.clearDummies(t)}highlightDummies(t){var e,n;(n=(e=this.view)==null?void 0:e.dummiesController)==null||n.highlightDummies(t)}resetHighlightDummies(){var t,e;(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.resetHighlightDummies()}bindAssetsEvents(){var t,e;this.view.addEventListener(An.POINTEROVER,this.pointerOverHandler),this.view.addEventListener(An.POINTERLEAVE,this.pointerLeaveHandler),this.view.addEventListener(An.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.addEventListener("panend",this.dragEndHandler)}unbindAssetsEvents(){var t,e;this.view.removeEventListener(An.POINTEROVER,this.pointerOverHandler),this.view.removeEventListener(An.POINTERLEAVE,this.pointerLeaveHandler),this.view.removeEventListener(An.SELECTED,this.multiSelectorSelectedHandler),(e=(t=this.view)==null?void 0:t.dummiesController)==null||e.removeEventListener("panend",this.dragEndHandler)}handleMultiSelectorSelected(t){this.dispatchEvent({type:"SELECTED",data:t.data})}handlePointerOver(t){this.dispatchEvent({type:"pointerover",data:t.data,e:t.e})}handlePointerLeave(t){this.dispatchEvent({type:"pointerleave",data:t.data,e:t.e})}handleInitializeStart(){console.log("App.initializeStart ...")}async handleInitializeComplete(t){console.log("App.initializeComplete ...",t),t!=null&&t.data&&this.launch()}handleDragEnd(t){this.dispatchEvent(t)}launch(){console.log("App.launch ...")}}const tl=new St;var Wf=(r=>(r.SELECTED="SELECTED",r.POINTEROVER="pointerover",r.POINTERLEAVE="pointerleave",r.DRAG_END="panend",r))(Wf||{});class hv{static cached=new Map;static cachedCanvas=new Map;static destroy(){this.cached.clear(),this.cachedCanvas.clear()}static createCanvas(t){var a;if(!((a=Zt.window)!=null&&a.document))throw new Error("environment not support");let e;t.containerId&&(e=Zt.window.document.getElementById(t.containerId)),e||(e=Zt.window.document.getElementsByTagName("body")[0]);let n;if(t.canvasId&&(n=Zt.window.document.getElementById(t.canvasId)||void 0),t.width||(t.width=e==null?void 0:e.offsetWidth),t.height||(t.height=e==null?void 0:e.offsetHeight),t.dpr||(t.dpr=Zt.dpr),n)this.resizeCanvas(n,t.width,t.height,t.dpr);else{if(n=this.createHtmlCanvas(t.width,t.height,t.dpr),!n)throw new Error("error environment");t.canvasId&&n.setAttribute("id",t.canvasId),e==null||e.appendChild(n)}return n.style.background=t.background||"transparent",n}static getContext2D(t,e={}){const n={alpha:!0,willReadFrequently:!!e.willReadFrequently},a=t.getContext("2d",n);if(!a)throw new Error("getContext2D error");return a.scale(e.dpr||1,e.dpr||1),a}static resizeCanvas(t,e,n,a=1){t instanceof OffscreenCanvas?(t.width=e,t.height=n):t instanceof HTMLCanvasElement&&(t.setAttribute("width",(e*a).toString()),t.setAttribute("height",(n*a).toString()),t.style.width=e+"px",t.style.height=n+"px",t.style.padding="0",t.style.margin="0",t.style.border="0",t.style.imageRendering="pixelated",t.style.transform="translateZ(0)")}static async getImageBitmapByCanvasAsync(t){if(t)return t instanceof OffscreenCanvas?t.transferToImageBitmap():t instanceof HTMLCanvasElement?await createImageBitmap(t):void 0}static get(t,e,n,a=1){let u=this.cached.get(t);return u||(u=this.create(e,n,a),this.set(t,u)),this.resizeCanvas(u,e,n,a),u}static set(t,e){if(!t||!e)throw new Error("error input");return this.cached.set(t,e)}static remove(t){this.cached.has(t)&&this.cached.delete(t)}static create(t,e,n=1){var a;if((a=Zt.window)!=null&&a.OffscreenCanvas)return new OffscreenCanvas(t,e);throw new Error("environment does not support")}static createHtmlCanvas(t,e,n=1){if(!Zt.window.document)throw new Error("environment does not support");const a=Zt.window.document.createElement("canvas");return this.resizeCanvas(a,t,e,n),a}static measureText(t,e,n=new Y){if(!t)throw new Error("input error");const u=this.get("measureText",1,1).getContext("2d");if(!u)throw new Error("bufferCtx not found");e.render(u);const l=u.measureText(t);if(!l)throw new Error("measureText error");const c=l.actualBoundingBoxRight+l.actualBoundingBoxLeft,f=l.actualBoundingBoxAscent+l.actualBoundingBoxDescent;return n.set(c,f),n}}function Vf(r){return new Worker("/renderer.worker.js",{type:"module",name:r==null?void 0:r.name})}class cv extends uv{name="OpeView";constructor(t={}){super(t),this.initController(this.camera)}destroy(){this.controller&&this.controller.destroy(),super.destroy()}initController(t){let e=this.params.cvs;!e&&this.params.canvasId&&(e=document.getElementById(this.params.canvasId)),!(!this.params.controls||!t||!e)&&(this.controller&&this.controller.destroy(),this.controller=new Qc(e,t))}handleCameraChanged(t){console.warn("handleCameraChanged: ",t.target.camera.position.z,t.target.camera.scaled.x)}}var ri=(r=>(r.INIT="init",r.LOAD="load",r.LOADED="loaded",r.GET_LAYERS="getLayers",r.TERMINATE="terminate",r.CAMERA_SYNC="cameraSync",r.CAMERA_CHANGED="cameraChanged",r.SCENES_CHANGED="scenesChanged",r.UPDATE_LAYERS_VISIBILITY="updateLayersVisibility",r))(ri||{});class fv extends Ir{cvs;worker=new Vf;view;boundingBox=new St;workerMessageHandler=this.handleWorkerMessage.bind(this);cameraHandler=this.handleCameraChanged.bind(this);runningHandler=this.running.bind(this);constructor(t={}){super(),t.workerRender=!0,this.params=t,Zt.config=t;const e=hv.createCanvas(t);if(!e.transferControlToOffscreen)throw new Error("not support transferControlToOffscreen");this.cvs=e.transferControlToOffscreen(),this.view=new cv(t),this.view.camera.name="mainCamera",this.view.camera.resize(),this.bindEvents()}destroy(){super.destroy(),this.unbindEvents(),this.worker.postMessage({task:ri.TERMINATE}),this.worker.terminate()}bindEvents(){var t,e;(e=(t=this.view)==null?void 0:t.camera)==null||e.addEventListener(Qa.UPDATE,this.cameraHandler),this.worker.addEventListener("message",this.workerMessageHandler)}unbindEvents(){var t,e;(e=(t=this.view)==null?void 0:t.controller)==null||e.removeEventListener(_t.CAMERA_CHANGED,this.cameraHandler),this.worker.removeEventListener("message",this.workerMessageHandler)}handleWorkerMessage(t){var e,n,a,u,l;switch(t.data.task){case ri.CAMERA_SYNC:if(!((e=t==null?void 0:t.data)!=null&&e.data))break;const c=JSON.parse(t.data.data);(a=(n=this.view)==null?void 0:n.camera)==null||a.fromJSON(c),this.view.camera.computeBoundingBox(),console.log("CAMERA_SYNC: ",c);break;case ri.CAMERA_CHANGED:const{t:f,r:d,s:y}=t.data.data;console.log("CAMERA_CHANGED: ",this.view.camera.width,f,d,y),(l=(u=this.view)==null?void 0:u.camera)==null||l.setTRS(f,d,y);break;case ri.SCENES_CHANGED:const{box:A}=t.data.data;if(!A)return;this.boundingBox.fromString(A);break}}handleCameraChanged(t){this.worker.postMessage({task:ri.CAMERA_CHANGED,data:t.data})}promiseWorkerResponse(t,e){return new Promise((n,a)=>{const u=c=>{var f,d,y;((f=c==null?void 0:c.data)==null?void 0:f.task)===t&&(this.worker.removeEventListener("message",u),this.worker.removeEventListener("error",l),console.log("AppOffscreen::response: ",(d=c==null?void 0:c.data)==null?void 0:d.task,(y=c==null?void 0:c.data)==null?void 0:y.data),n(c.data.data))},l=c=>{this.worker.removeEventListener("message",u),this.worker.removeEventListener("error",l),a(c.error)};this.worker.addEventListener("message",u),this.worker.addEventListener("error",l),this.worker.postMessage({task:t,data:e})})}resize(){var t;(t=this.view.camera)==null||t.resize()}async load(t,e){return this.promiseWorkerResponse(ri.LOAD,{url:t,layers:e})}async getLayers(t=2){return this.promiseWorkerResponse(ri.GET_LAYERS,{lv:t})}async fullscreen(){await this.view.resetCameraByBoundingBox(this.boundingBox,!0)}saveCameraPosition(t){this.view.saveCameraPosition(t)}restoreCameraPosition(t){this.view.restoreCameraPosition(t)}clearCameraPosition(t){this.view.clearCameraPosition(t)}updateLayersVisibility(t,e=!1){this.worker.postMessage({task:ri.UPDATE_LAYERS_VISIBILITY,data:{ids:t,visible:e}})}start(){this.worker.postMessage({task:ri.INIT,data:{cvs:this.cvs,config:this.params}},[this.cvs]),requestAnimationFrame(this.runningHandler)}running(t){var e;(e=this.view)==null||e.update(t),requestAnimationFrame(this.runningHandler)}stop(){}}function pv(r){return new Worker("/environment.worker.js",{type:"module",name:r==null?void 0:r.name})}le.AppEnum=Wf,le.AppOffscreen=fv,le.AssetTypeEnum=er,le.Box2=Hg,le.Color=Wt,le.ColorsEnum=he,le.EnvironmentWorker=pv,le.GLOB=Zt,le.LayerTypeEnum=Vs,le.Monitor=Pt,le.RendererWorker=Vf,le.SvgApp=lv,le.Vector2=Ug,le.defaultConfig=kn,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});