@nocobase/plugin-data-visualization 1.9.0 → 1.9.2
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.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
(self.webpackChunk_nocobase_plugin_data_visualization=self.webpackChunk_nocobase_plugin_data_visualization||[]).push([["950"],{823:function(t,e,n){"use strict";let r,i,o,a;n.r(e),n.d(e,{Sankey:function(){return Hk},Mix:function(){return HY},Bar:function(){return G2},Stock:function(){return HS},Rose:function(){return Hd},Sunburst:function(){return HK},Histogram:function(){return Hv},Funnel:function(){return G9},DualAxes:function(){return G6},G2:function(){return tw},Liquid:function(){return HC},Column:function(){return G3},CirclePacking:function(){return Hz},Radar:function(){return Ha},Box:function(){return Hw},Scatter:function(){return Hi},Waterfall:function(){return Hg},Treemap:function(){return HR},BidirectionalBar:function(){return HH},Area:function(){return G0},WordCloud:function(){return HL},Line:function(){return Ht},RadialBar:function(){return HF},Gauge:function(){return HA},Venn:function(){return HU},Tiny:function(){return Hp},Heatmap:function(){return Hx},Bullet:function(){return HP},measureTextWidth:function(){return HQ},Base:function(){return GQ},Violin:function(){return H$},Pie:function(){return Hn}});var l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,S,_,P,j,A,T,C,N,L,I,R,D,F,B,z,W,$,G,H,V,U,q,Y,X,K,Z,Q,J,tt,te,tn,tr,ti,to,ta,tl,ts,tu,tc,tf,tp,th,td,ty,tg,tm={};n.r(tm),n.d(tm,{geoAlbers:function(){return r0},geoAlbersUsa:function(){return ii},geoAzimuthalEqualArea:function(){return rR},geoAzimuthalEqualAreaRaw:function(){return rI},geoAzimuthalEquidistant:function(){return r8},geoAzimuthalEquidistantRaw:function(){return r6},geoConicConformal:function(){return rq},geoConicConformalRaw:function(){return rU},geoConicEqualArea:function(){return rJ},geoConicEqualAreaRaw:function(){return rQ},geoConicEquidistant:function(){return ir},geoConicEquidistantRaw:function(){return ie},geoEqualEarth:function(){return r4},geoEqualEarthRaw:function(){return r3},geoEquirectangular:function(){return rG},geoEquirectangularRaw:function(){return r$},geoGnomonic:function(){return rZ},geoGnomonicRaw:function(){return rK},geoIdentity:function(){return it},geoMercator:function(){return rF},geoMercatorRaw:function(){return rD},geoNaturalEarth1:function(){return r7},geoNaturalEarth1Raw:function(){return r9},geoOrthographic:function(){return rX},geoOrthographicRaw:function(){return rY},geoProjection:function(){return rN},geoProjectionMutator:function(){return rL},geoStereographic:function(){return r2},geoStereographicRaw:function(){return r1},geoTransverseMercator:function(){return rW},geoTransverseMercatorRaw:function(){return rz}});var tv={};n.r(tv),n.d(tv,{add:function(){return oW},adjoint:function(){return oa},clone:function(){return i7},copy:function(){return ot},create:function(){return i9},determinant:function(){return ol},equals:function(){return oU},exactEquals:function(){return oV},frob:function(){return oz},fromQuat:function(){return oP},fromQuat2:function(){return ow},fromRotation:function(){return om},fromRotationTranslation:function(){return oO},fromRotationTranslationScale:function(){return oS},fromRotationTranslationScaleOrigin:function(){return o_},fromScaling:function(){return og},fromTranslation:function(){return oy},fromValues:function(){return oe},fromXRotation:function(){return ov},fromYRotation:function(){return ob},fromZRotation:function(){return ox},frustum:function(){return oj},getRotation:function(){return oM},getScaling:function(){return ok},getTranslation:function(){return oE},identity:function(){return or},invert:function(){return oo},lookAt:function(){return oD},mul:function(){return oq},multiply:function(){return os},multiplyScalar:function(){return oG},multiplyScalarAndAdd:function(){return oH},ortho:function(){return oI},orthoNO:function(){return oL},orthoZO:function(){return oR},perspective:function(){return oT},perspectiveFromFieldOfView:function(){return oN},perspectiveNO:function(){return oA},perspectiveZO:function(){return oC},rotate:function(){return of},rotateX:function(){return op},rotateY:function(){return oh},rotateZ:function(){return od},scale:function(){return oc},set:function(){return on},str:function(){return oB},sub:function(){return oY},subtract:function(){return o$},targetTo:function(){return oF},translate:function(){return ou},transpose:function(){return oi}});var tb={};n.r(tb),n.d(tb,{frequency:function(){return A5},id:function(){return A3},name:function(){return A4},weight:function(){return A2}});var tx={};n.r(tx),n.d(tx,{area:function(){return Cw},bottom:function(){return Cj},bottomLeft:function(){return Cj},bottomRight:function(){return Cj},inside:function(){return Cj},left:function(){return Cj},outside:function(){return CN},right:function(){return Cj},spider:function(){return CI},surround:function(){return CD},top:function(){return Cj},topLeft:function(){return Cj},topRight:function(){return Cj}});var tO={};n.r(tO),n.d(tO,{interpolateBlues:function(){return Lm},interpolateBrBG:function(){return NB},interpolateBuGn:function(){return N5},interpolateBuPu:function(){return N4},interpolateCividis:function(){return LP},interpolateCool:function(){return LF},interpolateCubehelixDefault:function(){return LR},interpolateGnBu:function(){return N8},interpolateGreens:function(){return Lb},interpolateGreys:function(){return LO},interpolateInferno:function(){return LX},interpolateMagma:function(){return LY},interpolateOrRd:function(){return N7},interpolateOranges:function(){return L_},interpolatePRGn:function(){return NW},interpolatePiYG:function(){return NG},interpolatePlasma:function(){return LK},interpolatePuBu:function(){return Lr},interpolatePuBuGn:function(){return Le},interpolatePuOr:function(){return NV},interpolatePuRd:function(){return Lo},interpolatePurples:function(){return LE},interpolateRainbow:function(){return Lz},interpolateRdBu:function(){return Nq},interpolateRdGy:function(){return NX},interpolateRdPu:function(){return Ll},interpolateRdYlBu:function(){return NZ},interpolateRdYlGn:function(){return NJ},interpolateReds:function(){return LM},interpolateSinebow:function(){return LH},interpolateSpectral:function(){return N1},interpolateTurbo:function(){return LV},interpolateViridis:function(){return Lq},interpolateWarm:function(){return LD},interpolateYlGn:function(){return Lf},interpolateYlGnBu:function(){return Lu},interpolateYlOrBr:function(){return Lh},interpolateYlOrRd:function(){return Ly},schemeAccent:function(){return CQ},schemeBlues:function(){return Lg},schemeBrBG:function(){return NF},schemeBuGn:function(){return N2},schemeBuPu:function(){return N3},schemeCategory10:function(){return CZ},schemeDark2:function(){return CJ},schemeGnBu:function(){return N6},schemeGreens:function(){return Lv},schemeGreys:function(){return Lx},schemeObservable10:function(){return C0},schemeOrRd:function(){return N9},schemeOranges:function(){return LS},schemePRGn:function(){return Nz},schemePaired:function(){return C1},schemePastel1:function(){return C2},schemePastel2:function(){return C5},schemePiYG:function(){return N$},schemePuBu:function(){return Ln},schemePuBuGn:function(){return Lt},schemePuOr:function(){return NH},schemePuRd:function(){return Li},schemePurples:function(){return Lw},schemeRdBu:function(){return NU},schemeRdGy:function(){return NY},schemeRdPu:function(){return La},schemeRdYlBu:function(){return NK},schemeRdYlGn:function(){return NQ},schemeReds:function(){return Lk},schemeSet1:function(){return C3},schemeSet2:function(){return C4},schemeSet3:function(){return C6},schemeSpectral:function(){return N0},schemeTableau10:function(){return C8},schemeYlGn:function(){return Lc},schemeYlGnBu:function(){return Ls},schemeYlOrBr:function(){return Lp},schemeYlOrRd:function(){return Ld}});var tw={};n.r(tw),n.d(tw,{AREA_CLASS_NAME:function(){return E1},Academy:function(){return bA},Bin:function(){return _m},BinX:function(){return _v},COMPONENT_CLASS_NAME:function(){return EJ},Chart:function(){return Rg},ChartEvent:function(){return kL},Classic:function(){return bM},ClassicDark:function(){return bP},Dark:function(){return b_},DiffY:function(){return __},DodgeX:function(){return _x},ELEMENT_CLASS_NAME:function(){return EK},Filter:function(){return _0},FlexX:function(){return _K},Group:function(){return _W},GroupColor:function(){return _H},GroupX:function(){return _$},GroupY:function(){return _G},Jitter:function(){return _w},JitterX:function(){return _E},JitterY:function(){return _k},LABEL_CLASS_NAME:function(){return E0},LABEL_LAYER_CLASS_NAME:function(){return EX},Light:function(){return bk},LinearAxis:function(){return Ow},MAIN_LAYER_CLASS_NAME:function(){return EY},MASK_CLASS_NAME:function(){return E2},MaybeDefaultX:function(){return m$},MaybeDefaultY:function(){return mV},MaybeFunctionAttribute:function(){return m2},MaybeGradient:function(){return yc},MaybeIdentityX:function(){return g4},MaybeIdentityY:function(){return g3},MaybeKey:function(){return dx},MaybeSeries:function(){return yf},MaybeSize:function(){return gr},MaybeStackY:function(){return Rd},MaybeTitle:function(){return dm},MaybeTooltip:function(){return dv},MaybeTuple:function(){return gF},MaybeTupleX:function(){return m_},MaybeTupleY:function(){return mA},MaybeVisualPosition:function(){return gz},MaybeZeroPadding:function(){return gG},MaybeZeroX:function(){return hN},MaybeZeroY:function(){return gn},MaybeZeroY1:function(){return hC},MaybeZeroZ:function(){return Ry},NormalizeY:function(){return _A},PLOT_CLASS_NAME:function(){return EQ},Pack:function(){return _Z},Runtime:function(){return Rp},Sample:function(){return _J},Select:function(){return _I},SelectX:function(){return _D},SelectY:function(){return _B},Selection:function(){return pA},SortColor:function(){return _X},SortX:function(){return _q},SortY:function(){return _Y},StackEnter:function(){return _P},StackY:function(){return S2},SymmetryY:function(){return _S},VIEW_CLASS_NAME:function(){return EZ},corelib:function(){return PS},extend:function(){return Th},geolib:function(){return ip},graphlib:function(){return Tf},plotlib:function(){return hh},register:function(){return Ru},render:function(){return IJ},renderToMountedElement:function(){return I0},select:function(){return pj},stdlib:function(){return Tp}});var tE={}.toString,tk=function(t,e){return tE.call(t)==="[object "+e+"]"},tM=function(t){return Array.isArray?Array.isArray(t):tk(t,"Array")},tS=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},t_=function(t,e){if(t){if(tM(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(tS(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},tP=function(t){return tk(t,"Function")},tj=Array.prototype;tj.splice,tj.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var tA=function(t){return tk(t,"Number")},tT=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return t_(t,function(n,r){tP(t)&&"prototype"===r||e.push(n)}),e},tC=function(t){if("object"!=typeof t||null===t||!tk(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},tN=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&tC(a)?(tC(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):tM(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},tL=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},tI=function(t,e){if(!tL(t))return -1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var tR=function(t){return t};function tD(t){return null==t?0:tL(t)?t.length:Object.keys(t).length}var tF=function(t,e){return(tF=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function tB(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tF(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var tz=function(){return(tz=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function tW(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function t$(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function l(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,l)}s((r=r.apply(t,e||[])).next())})}function tG(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function tH(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function tV(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function tU(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],a=0,l=o.length;a<l;a++,i++)r[i]=o[a];return r}function tq(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function tY(t,e,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function tX(){this.map={}}!function(t,e){if(!tP(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return eG||(eG=document.createElement("canvas").getContext("2d")),eG.font=[o,a,i,n+"px",r].join(" "),eG.measureText(tk(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),tU([t],tT(e)).join("")}),tX.prototype.has=function(t){return void 0!==this.map[t]},tX.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},tX.prototype.set=function(t,e){this.map[t]=e},tX.prototype.clear=function(){this.map={}},tX.prototype.delete=function(t){delete this.map[t]},tX.prototype.size=function(){return Object.keys(this.map).length};class tK{constructor(t){this.options=tN({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=tN({},this.options,t),this.rescale(t)}rescale(t){}}function tZ(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function tQ(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function tJ(t,e,n,r,i){let o=n||0,a=r||t.length,l=i||(t=>t);for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}var t0=n(254),t1=n.n(t0);function t2(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function t5(t){let e=t1().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=t2(a,o,e+1/3);return[255*l,255*t2(a,o,e),255*t2(a,o,e-1/3),i]}(r):null}let t3=(t,e)=>n=>t*(1-n)+e*n,t4=(t,e)=>{let n=t5(t),r=t5(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},t6=(t,e)=>"number"==typeof t&&"number"==typeof e?t3(t,e):"string"==typeof t&&"string"==typeof e?t4(t,e):()=>t,t8=(t,e)=>{let n=t3(t,e);return t=>Math.round(n(t))};function t9(t){return null!=t&&!Number.isNaN(t)}let t7=Math.sqrt(50),et=Math.sqrt(10),ee=Math.sqrt(2);function en(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=t7?10:o>=et?5:o>=ee?2:1)*10**i:-(10**-i)/(o>=t7?10:o>=et?5:o>=ee?2:1)}function er(t,e,n){let r=Math.abs(e-t)/Math.max(0,n),i=10**Math.floor(Math.log(r)/Math.LN10),o=r/i;return o>=t7?i*=10:o>=et?i*=5:o>=ee&&(i*=2),e<t?-i:i}let ei=(t,e,n=5)=>{let r,i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=en(l,s,n))>0?r=en(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=en(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},eo=(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=tZ(o,a),i=n(l,s)):(r=tZ(a,o),i=n(s,l)),tQ(i,r)},ea=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=tZ(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=tJ(t,e,1,r)-1,a=i[n];return tQ(o[n],a)(e)}},el=(t,e,n,r)=>(Math.min(t.length,e.length)>2?ea:eo)(t,e,r?t8:n);class es extends tK{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:t3,tickCount:5}}map(t){return t9(t)?this.output(t):this.options.unknown}invert(t){return t9(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return ei}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):tR}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=el(n.map(t),r,o,i);this.output=tQ(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=el(i,r.map(t),t3);this.input=tQ(e,n,o)}}let eu=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=en(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class ec extends es{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:t6,tickMethod:eu,tickCount:5}}chooseTransforms(){return[tR,tR]}clone(){return new ec(this.options)}}var ef=function(t){return null==t},ep=function(t){return ef(t)?"":t.toString()},eh=function(t){var e=ep(t);return e.charAt(0).toUpperCase()+e.substring(1)},ed=t=>t;function ey(t,e){t&&em.hasOwnProperty(t.type)&&em[t.type](t,e)}var eg={Feature:function(t,e){ey(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ey(n[r].geometry,e)}},em={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){ev(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ev(n[r],e,0)},Polygon:function(t,e){eb(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)eb(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ey(n[r],e)}};function ev(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function eb(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)ev(t[n],e,1);e.polygonEnd()}function ex(t,e){t&&eg.hasOwnProperty(t.type)?eg[t.type](t,e):ey(t,e)}class eO{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){let e=this._partials,n=0;for(let r=0;r<this._n&&r<32;r++){let i=e[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){let t=this._partials,e=this._n,n,r,i,o=0;if(e>0){for(o=t[--e];e>0&&(o=(n=o)+(r=t[--e]),!(i=r-(o-n))););e>0&&(i<0&&t[e-1]<0||i>0&&t[e-1]>0)&&(n=o+(r=2*i),r==n-o&&(o=n))}return o}}var ew=Math.PI,eE=ew/2,ek=ew/4,eM=2*ew,eS=180/ew,e_=ew/180,eP=Math.abs,ej=Math.atan,eA=Math.atan2,eT=Math.cos,eC=Math.ceil,eN=Math.exp,eL=Math.log,eI=Math.pow,eR=Math.sin,eD=Math.sign||function(t){return t>0?1:t<0?-1:0},eF=Math.sqrt,eB=Math.tan;function ez(t){return t>1?0:t<-1?ew:Math.acos(t)}function eW(t){return t>1?eE:t<-1?-eE:Math.asin(t)}function e$(){}var eG,eH,eV,eU,eq,eY=new eO,eX=new eO,eK={point:e$,lineStart:e$,lineEnd:e$,polygonStart:function(){eK.lineStart=eZ,eK.lineEnd=e0},polygonEnd:function(){eK.lineStart=eK.lineEnd=eK.point=e$,eY.add(eP(eX)),eX=new eO},result:function(){var t=eY/2;return eY=new eO,t}};function eZ(){eK.point=eQ}function eQ(t,e){eK.point=eJ,eH=eU=t,eV=eq=e}function eJ(t,e){eX.add(eq*t-eU*e),eU=t,eq=e}function e0(){eJ(eH,eV)}var e1,e2,e5,e3,e4=1/0,e6=1/0,e8=-1/0,e9=e8,e7={point:function(t,e){t<e4&&(e4=t),t>e8&&(e8=t),e<e6&&(e6=e),e>e9&&(e9=e)},lineStart:e$,lineEnd:e$,polygonStart:e$,polygonEnd:e$,result:function(){var t=[[e4,e6],[e8,e9]];return e8=e9=-(e6=e4=1/0),t}},nt=0,ne=0,nn=0,nr=0,ni=0,no=0,na=0,nl=0,ns=0,nu={point:nc,lineStart:nf,lineEnd:nd,polygonStart:function(){nu.lineStart=ny,nu.lineEnd=ng},polygonEnd:function(){nu.point=nc,nu.lineStart=nf,nu.lineEnd=nd},result:function(){var t=ns?[na/ns,nl/ns]:no?[nr/no,ni/no]:nn?[nt/nn,ne/nn]:[NaN,NaN];return nt=ne=nn=nr=ni=no=na=nl=ns=0,t}};function nc(t,e){nt+=t,ne+=e,++nn}function nf(){nu.point=np}function np(t,e){nu.point=nh,nc(e5=t,e3=e)}function nh(t,e){var n=t-e5,r=e-e3,i=eF(n*n+r*r);nr+=i*(e5+t)/2,ni+=i*(e3+e)/2,no+=i,nc(e5=t,e3=e)}function nd(){nu.point=nc}function ny(){nu.point=nm}function ng(){nv(e1,e2)}function nm(t,e){nu.point=nv,nc(e1=e5=t,e2=e3=e)}function nv(t,e){var n=t-e5,r=e-e3,i=eF(n*n+r*r);nr+=i*(e5+t)/2,ni+=i*(e3+e)/2,no+=i,na+=(i=e3*t-e5*e)*(e5+t),nl+=i*(e3+e),ns+=3*i,nc(e5=t,e3=e)}function nb(t){this._context=t}nb.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,eM)}},result:e$};var nx,nO,nw,nE,nk,nM=new eO,nS={point:e$,lineStart:function(){nS.point=n_},lineEnd:function(){nx&&nP(nO,nw),nS.point=e$},polygonStart:function(){nx=!0},polygonEnd:function(){nx=null},result:function(){var t=+nM;return nM=new eO,t}};function n_(t,e){nS.point=nP,nO=nE=t,nw=nk=e}function nP(t,e){nE-=t,nk-=e,nM.add(eF(nE*nE+nk*nk)),nE=t,nk=e}class nj{constructor(t){this._append=null==t?nA:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return nA;if(e!==r){let t=10**e;r=e,i=function(e){let n=1;this._+=e[0];for(let r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return i}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==o||this._append!==i){let t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,o=t,i=this._append,a=this._,this._=e}this._+=a}}result(){let t=this._;return this._="",t.length?t:null}}function nA(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function nT(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),ex(t,i(o))),o.result()}return a.area=function(t){return ex(t,i(eK)),eK.result()},a.measure=function(t){return ex(t,i(nS)),nS.result()},a.bounds=function(t){return ex(t,i(e7)),e7.result()},a.centroid=function(t){return ex(t,i(nu)),nu.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,ed):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new nj(n)):new nb(e=t),"function"!=typeof r&&o.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(o.pointRadius(+t),+t),a):r},a.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);n=e}return null===e&&(o=new nj(n)),a},a.projection(t).digits(n).context(e)}function nC(t,e,n){t*=1,e*=1,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=Array(i);++r<i;)o[r]=t+r*n;return o}function nN(t,e,n){var r=nC(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function nL(t,e,n){var r=nC(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}var nI={}.toString,nR=function(t,e){return nI.call(t)==="[object "+e+"]"},nD=function(t){return Array.isArray?Array.isArray(t):nR(t,"Array")},nF=function(t){return"object"==typeof t&&null!==t},nB=function(t){if(!nF(t)||!nR(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},nz=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&nB(a)?(nB(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):nD(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},nW=function(t){var e=ep(t);return e.charAt(0).toLowerCase()+e.substring(1)};function n$(t){return t}function nG(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),n$)}function nH(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function nV(t=""){throw Error(t)}function nU(t,e){let{attributes:n}=e,r=new Set(["id","className"]);for(let[e,i]of Object.entries(n))r.has(e)||("transform"===e&&t.attr(e,""),t.attr(e,i))}function nq(t){return null!=t&&!Number.isNaN(t)}function nY(t,e){return nX(t,e)||{}}function nX(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[nW(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function nK(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function nZ(t,e){if(void 0===t)return null;if("number"==typeof t)return t;let n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function nQ(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function nJ(t){return null===t||!1===t}function n0(t,e,n={},r=!1){return nJ(t)||Array.isArray(t)&&r?t:nz(n,nY(t,e))}function n1(t,e={}){return nJ(t)||Array.isArray(t)||!n2(t)?t:nz(e,t)}function n2(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function n5(t,e){return"object"==typeof t?nY(t,e):t}function n3(t){return function(e,n){var r=eT(e),i=eT(n),o=t(r*i);return o===1/0?[2,0]:[o*i*eR(e),o*eR(n)]}}function n4(t){return function(e,n){var r=eF(e*e+n*n),i=t(r),o=eR(i);return[eA(e*o,r*eT(i)),eW(r&&n*o/r)]}}function n6(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:e$,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function n8(t,e){return 1e-6>eP(t[0]-e[0])&&1e-6>eP(t[1]-e[1])}function n9(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function n7(t,e,n,r,i){var o,a,l=[],s=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(n8(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd();return}a[0]+=2e-6}l.push(n=new n9(r,t,null,!0)),s.push(n.o=new n9(r,null,n,!1)),l.push(n=new n9(a,t,null,!1)),s.push(n.o=new n9(a,null,n,!0))}}),l.length){for(s.sort(e),rt(l),rt(s),o=0,a=s.length;o<a;++o)s[o].e=n=!n;for(var u,c,f=l[0];;){for(var p=f,h=!0;p.v;)if((p=p.n)===f)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(o=0,a=u.length;o<a;++o)i.point((c=u[o])[0],c[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(h)for(o=(u=p.p.z).length-1;o>=0;--o)i.point((c=u[o])[0],c[1]);else r(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,h=!h}while(!p.v);i.lineEnd()}}}function rt(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function re(t){return[eA(t[1],t[0]),eW(t[2])]}function rn(t){var e=t[0],n=t[1],r=eT(n);return[r*eT(e),r*eR(e),eR(n)]}function rr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ri(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ro(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ra(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function rl(t){var e=eF(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function rs(t){return eP(t[0])<=ew?t[0]:eD(t[0])*((eP(t[0])+ew)%eM-ew)}function ru(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function rc(t,e,n,r){return function(i){var o,a,l,s=e(i),u=n6(),c=e(u),f=!1,p={point:h,lineStart:y,lineEnd:g,polygonStart:function(){p.point=v,p.lineStart=b,p.lineEnd=x,a=[],o=[]},polygonEnd:function(){p.point=h,p.lineStart=y,p.lineEnd=g,a=ru(a);var t=function(t,e){var n=rs(e),r=e[1],i=eR(r),o=[eR(n),-eT(n),0],a=0,l=0,s=new eO;1===i?r=eE+1e-6:-1===i&&(r=-eE-1e-6);for(var u=0,c=t.length;u<c;++u)if(p=(f=t[u]).length)for(var f,p,h=f[p-1],d=rs(h),y=h[1]/2+ek,g=eR(y),v=eT(y),b=0;b<p;++b,d=O,g=E,v=k,h=x){var x=f[b],O=rs(x),w=x[1]/2+ek,E=eR(w),k=eT(w),M=O-d,S=M>=0?1:-1,_=S*M,P=_>ew,j=g*E;if(s.add(eA(j*S*eR(_),v*k+j*eT(_))),a+=P?M+S*eM:M,P^d>=n^O>=n){var A=ri(rn(h),rn(x));rl(A);var T=ri(o,A);rl(T);var C=(P^M>=0?-1:1)*eW(T[2]);(r>C||r===C&&(A[0]||A[1]))&&(l+=P^M>=0?1:-1)}}return(a<-1e-6||a<1e-6&&s<-1e-12)^1&l}(o,r);a.length?(f||(i.polygonStart(),f=!0),n7(a,rp,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(e,n){t(e,n)&&i.point(e,n)}function d(t,e){s.point(t,e)}function y(){p.point=d,s.lineStart()}function g(){p.point=h,s.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function b(){c.lineStart(),l=[]}function x(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),p=u.result(),h=p.length;if(l.pop(),o.push(l),l=null,h){if(1&s){if((e=(n=p[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}return}h>1&&2&s&&p.push(p.pop().concat(p.shift())),a.push(p.filter(rf))}}return p}}function rf(t){return t.length>1}function rp(t,e){return((t=t.x)[0]<0?t[1]-eE-1e-6:eE-t[1])-((e=e.x)[0]<0?e[1]-eE-1e-6:eE-e[1])}var rh=rc(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var l,s,u,c,f,p,h,d=o>0?ew:-ew,y=eP(o-n);1e-6>eP(y-ew)?(t.point(n,r=(r+a)/2>0?eE:-eE),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),t.point(o,r),e=0):i!==d&&y>=ew&&(1e-6>eP(n-i)&&(n-=1e-6*i),1e-6>eP(o-d)&&(o-=1e-6*d),l=n,s=r,u=o,c=a,r=eP(h=eR(l-u))>1e-6?ej((eR(s)*(p=eT(c))*eR(u)-eR(c)*(f=eT(s))*eR(l))/(f*p*h)):(s+c)/2,t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),e=0),t.point(n=o,r=a),i=d},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*eE,r.point(-ew,i),r.point(0,i),r.point(ew,i),r.point(ew,0),r.point(ew,-i),r.point(0,-i),r.point(-ew,-i),r.point(-ew,0),r.point(-ew,i);else if(eP(t[0]-e[0])>1e-6){var o=t[0]<e[0]?ew:-ew;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-ew,-eE]);function rd(t,e){e=rn(e),e[0]-=t,rl(e);var n=ez(-e[1]);return((0>-e[2]?-n:n)+eM-1e-6)%eM}function ry(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,l,u){var c=0,f=0;if(null==i||(c=a(i,l))!==(f=a(o,l))||0>s(i,o)^l>0)do u.point(0===c||3===c?t:n,c>1?r:e);while((c=(c+l+4)%4)!==f);else u.point(o[0],o[1])}function a(r,i){return 1e-6>eP(r[0]-t)?i>0?0:3:1e-6>eP(r[0]-n)?i>0?2:1:1e-6>eP(r[1]-e)?+(i>0):i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,u,c,f,p,h,d,y,g,v,b,x=a,O=n6(),w={point:E,lineStart:function(){w.point=k,u&&u.push(c=[]),v=!0,g=!1,d=y=NaN},lineEnd:function(){s&&(k(f,p),h&&g&&O.rejoin(),s.push(O.result())),w.point=E,g&&x.lineEnd()},polygonStart:function(){x=O,s=[],u=[],b=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var o,a,l=u[n],s=1,c=l.length,f=l[0],p=f[0],h=f[1];s<c;++s)o=p,a=h,p=(f=l[s])[0],h=f[1],a<=r?h>r&&(p-o)*(r-a)>(h-a)*(t-o)&&++e:h<=r&&(p-o)*(r-a)<(h-a)*(t-o)&&--e;return e}(),n=b&&e,i=(s=ru(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&n7(s,l,e,o,a),a.polygonEnd()),x=a,s=u=c=null}};function E(t,e){i(t,e)&&x.point(t,e)}function k(o,a){var l=i(o,a);if(u&&c.push([o,a]),v)f=o,p=a,h=l,v=!1,l&&(x.lineStart(),x.point(o,a));else if(l&&g)x.point(o,a);else{var s=[d=Math.max(-1e9,Math.min(1e9,d)),y=Math.max(-1e9,Math.min(1e9,y))],O=[o=Math.max(-1e9,Math.min(1e9,o)),a=Math.max(-1e9,Math.min(1e9,a))];!function(t,e,n,r,i,o){var a,l=t[0],s=t[1],u=e[0],c=e[1],f=0,p=1,h=u-l,d=c-s;if(a=n-l,!h&&a>0)return;if(a/=h,h<0){if(a<f)return;a<p&&(p=a)}else if(h>0){if(a>p)return;a>f&&(f=a)}if(a=i-l,h||!(a<0)){if(a/=h,h<0){if(a>p)return;a>f&&(f=a)}else if(h>0){if(a<f)return;a<p&&(p=a)}if(a=r-s,d||!(a>0)){if(a/=d,d<0){if(a<f)return;a<p&&(p=a)}else if(d>0){if(a>p)return;a>f&&(f=a)}if(a=o-s,d||!(a<0)){if(a/=d,d<0){if(a>p)return;a>f&&(f=a)}else if(d>0){if(a<f)return;a<p&&(p=a)}return f>0&&(t[0]=l+f*h,t[1]=s+f*d),p<1&&(e[0]=l+p*h,e[1]=s+p*d),!0}}}}(s,O,t,e,n,r)?l&&(x.lineStart(),x.point(o,a),b=!1):(g||(x.lineStart(),x.point(s[0],s[1])),x.point(O[0],O[1]),l||x.lineEnd(),b=!1)}d=o,y=a,g=l}return w}}function rg(t,e){function n(n,r){return e((n=t(n,r))[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function rm(t,e){return eP(t)>ew&&(t-=Math.round(t/eM)*eM),[t,e]}function rv(t,e,n){return(t%=eM)?e||n?rg(rx(t),rO(e,n)):rx(t):e||n?rO(e,n):rm}function rb(t){return function(e,n){return eP(e+=t)>ew&&(e-=Math.round(e/eM)*eM),[e,n]}}function rx(t){var e=rb(t);return e.invert=rb(-t),e}function rO(t,e){var n=eT(t),r=eR(t),i=eT(e),o=eR(e);function a(t,e){var a=eT(e),l=eT(t)*a,s=eR(t)*a,u=eR(e),c=u*n+l*r;return[eA(s*i-c*o,l*n-u*r),eW(c*i+s*o)]}return a.invert=function(t,e){var a=eT(e),l=eT(t)*a,s=eR(t)*a,u=eR(e),c=u*i-s*o;return[eA(s*i+u*o,l*n+c*r),eW(c*n-l*r)]},a}function rw(t){return function(e){var n=new rE;for(var r in t)n[r]=t[r];return n.stream=e,n}}function rE(){}function rk(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),ex(n,t.stream(e7)),e(e7.result()),null!=r&&t.clipExtent(r),t}function rM(t,e,n){return rk(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,l])},n)}function rS(t,e,n){return rM(t,[[0,0],e],n)}function r_(t,e,n){return rk(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function rP(t,e,n){return rk(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}rm.invert=rm,rE.prototype={constructor:rE,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var rj=eT(30*e_);function rA(t,e){var n;return+e?function(t,e){function n(r,i,o,a,l,s,u,c,f,p,h,d,y,g){var v=u-r,b=c-i,x=v*v+b*b;if(x>4*e&&y--){var O=a+p,w=l+h,E=s+d,k=eF(O*O+w*w+E*E),M=eW(E/=k),S=1e-6>eP(eP(E)-1)||1e-6>eP(o-f)?(o+f)/2:eA(w,O),_=t(S,M),P=_[0],j=_[1],A=P-r,T=j-i,C=b*A-v*T;(C*C/x>e||eP((v*A+b*T)/x-.5)>.3||a*p+l*h+s*d<rj)&&(n(r,i,o,a,l,s,P,j,S,O/=k,w/=k,E,y,g),g.point(P,j),n(P,j,S,O,w,E,u,c,f,p,h,d,y,g))}}return function(e){var r,i,o,a,l,s,u,c,f,p,h,d,y={point:g,lineStart:v,lineEnd:x,polygonStart:function(){e.polygonStart(),y.lineStart=O},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){c=NaN,y.point=b,e.lineStart()}function b(r,i){var o=rn([r,i]),a=t(r,i);n(c,f,u,p,h,d,c=a[0],f=a[1],u=r,p=o[0],h=o[1],d=o[2],16,e),e.point(c,f)}function x(){y.point=g,e.lineEnd()}function O(){v(),y.point=w,y.lineEnd=E}function w(t,e){b(r=t,e),i=c,o=f,a=p,l=h,s=d,y.point=b}function E(){n(c,f,u,p,h,d,i,o,r,a,l,s,16,e),y.lineEnd=x,x()}return y}}(t,e):(n=t,rw({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}))}var rT=rw({point:function(t,e){this.stream.point(t*e_,e*e_)}});function rC(t,e,n,r,i,o){if(!o){function a(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return a.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},a}var l=eT(o),s=eR(o),u=l*t,c=s*t,f=l/t,p=s/t,h=(s*n-l*e)/t,d=(s*e+l*n)/t;function y(t,o){return[u*(t*=r)-c*(o*=i)+e,n-c*t-u*o]}return y.invert=function(t,e){return[r*(f*t-p*e+h),i*(d-p*t-f*e)]},y}function rN(t){return rL(function(){return t})()}function rL(t){var e,n,r,i,o,a,l,s,u,c,f=150,p=480,h=250,d=0,y=0,g=0,v=0,b=0,x=0,O=1,w=1,E=null,k=rh,M=null,S=ed,_=.5;function P(t){return s(t[0]*e_,t[1]*e_)}function j(t){return(t=s.invert(t[0],t[1]))&&[t[0]*eS,t[1]*eS]}function A(){var t=rC(f,0,0,O,w,x).apply(null,e(d,y)),r=rC(f,p-t[0],h-t[1],O,w,x);return n=rv(g,v,b),l=rg(e,r),s=rg(n,l),a=rA(l,_),T()}function T(){return u=c=null,P}return P.stream=function(t){var e;return u&&c===t?u:u=rT((e=n,rw({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}}))(k(a(S(c=t)))))},P.preclip=function(t){return arguments.length?(k=t,E=void 0,T()):k},P.postclip=function(t){return arguments.length?(S=t,M=r=i=o=null,T()):S},P.clipAngle=function(t){return arguments.length?(k=+t?function(t){var e=eT(t),n=2*e_,r=e>0,i=eP(e)>1e-6;function o(t,n){return eT(t)*eT(n)>e}function a(t,n,r){var i=rn(t),o=rn(n),a=[1,0,0],l=ri(i,o),s=rr(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=ri(a,l),p=ra(a,e*s/c);ro(p,ra(l,-e*u/c));var h=rr(p,f),d=rr(f,f),y=h*h-d*(rr(p,p)-1);if(!(y<0)){var g=eF(y),v=ra(f,(-h-g)/d);if(ro(v,p),v=re(v),!r)return v;var b,x=t[0],O=n[0],w=t[1],E=n[1];O<x&&(b=x,x=O,O=b);var k=O-x,M=1e-6>eP(k-ew);if(!M&&E<w&&(b=w,w=E,E=b),M||k<1e-6?M?w+E>0^v[1]<(1e-6>eP(v[0]-x)?w:E):w<=v[1]&&v[1]<=E:k>ew^(x<=v[0]&&v[0]<=O)){var S=ra(f,(-h+g)/d);return ro(S,p),[v,re(S)]}}}function l(e,n){var i=r?t:ew-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return rc(o,function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,p){var h,d,y=[f,p],g=o(f,p),v=r?g?0:l(f,p):g?l(f+(f<0?ew:-ew),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||n8(e,d)||n8(y,d))&&(y[2]=1),g!==s?(c=0,g?(t.lineStart(),d=a(y,e),t.point(d[0],d[1])):(d=a(e,y),t.point(d[0],d[1],2),t.lineEnd()),e=d):i&&e&&r^g&&!(v&n)&&(h=a(y,e,!0))&&(c=0,r?(t.lineStart(),t.point(h[0][0],h[0][1]),t.point(h[1][0],h[1][1]),t.lineEnd()):(t.point(h[1][0],h[1][1]),t.lineEnd(),t.lineStart(),t.point(h[0][0],h[0][1],3))),!g||e&&n8(e,y)||t.point(y[0],y[1]),e=y,s=g,n=v},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}},function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var a=eT(e),l=eR(e),s=r*n;null==i?(i=e+r*eM,o=e-s/2):(i=rd(a,i),o=rd(a,o),(r>0?i<o:i>o)&&(i+=r*eM));for(var u,c=i;r>0?c>o:c<o;c-=s)u=re([a,-l*eT(c),-l*eR(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-ew,t-ew])}(E=t*e_):(E=null,rh),T()):E*eS},P.clipExtent=function(t){return arguments.length?(S=null==t?(M=r=i=o=null,ed):ry(M=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),T()):null==M?null:[[M,r],[i,o]]},P.scale=function(t){return arguments.length?(f=+t,A()):f},P.translate=function(t){return arguments.length?(p=+t[0],h=+t[1],A()):[p,h]},P.center=function(t){return arguments.length?(d=t[0]%360*e_,y=t[1]%360*e_,A()):[d*eS,y*eS]},P.rotate=function(t){return arguments.length?(g=t[0]%360*e_,v=t[1]%360*e_,b=t.length>2?t[2]%360*e_:0,A()):[g*eS,v*eS,b*eS]},P.angle=function(t){return arguments.length?(x=t%360*e_,A()):x*eS},P.reflectX=function(t){return arguments.length?(O=t?-1:1,A()):O<0},P.reflectY=function(t){return arguments.length?(w=t?-1:1,A()):w<0},P.precision=function(t){return arguments.length?(a=rA(l,_=t*t),T()):eF(_)},P.fitExtent=function(t,e){return rM(P,t,e)},P.fitSize=function(t,e){return rS(P,t,e)},P.fitWidth=function(t,e){return r_(P,t,e)},P.fitHeight=function(t,e){return rP(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&j,A()}}var rI=n3(function(t){return eF(2/(1+t))});function rR(){return rN(rI).scale(124.75).clipAngle(179.999)}function rD(t,e){return[t,eL(eB((eE+e)/2))]}function rF(){return rB(rD).scale(961/eM)}function rB(t){var e,n,r,i=rN(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=ew*a(),l=i((function(t){function e(e){return e=t(e[0]*e_,e[1]*e_),e[0]*=eS,e[1]*=eS,e}return t=rv(t[0]*e_,t[1]*e_,t.length>2?t[2]*e_:0),e.invert=function(e){return e=t.invert(e[0]*e_,e[1]*e_),e[0]*=eS,e[1]*=eS,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===rD?[[Math.max(l[0]-o,u),e],[Math.min(l[0]+o,n),r]]:[[u,Math.max(l[1]-o,e)],[n,Math.min(l[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),c()):a()},i.translate=function(t){return arguments.length?(l(t),c()):l()},i.center=function(t){return arguments.length?(o(t),c()):o()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),c()):null==u?null:[[u,e],[n,r]]},c()}function rz(t,e){return[eL(eB((eE+e)/2)),-t]}function rW(){var t=rB(rz),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function r$(t,e){return[t,e]}function rG(){return rN(r$).scale(152.63)}function rH(t){var e=0,n=ew/3,r=rL(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*e_,n=t[1]*e_):[e*eS,n*eS]},i}function rV(t){return eB((eE+t)/2)}function rU(t,e){var n=eT(t),r=t===e?eR(t):eL(n/eT(e))/eL(rV(e)/rV(t)),i=n*eI(rV(t),r)/r;if(!r)return rD;function o(t,e){i>0?e<-eE+1e-6&&(e=-eE+1e-6):e>eE-1e-6&&(e=eE-1e-6);var n=i/eI(rV(e),r);return[n*eR(r*t),i-n*eT(r*t)]}return o.invert=function(t,e){var n=i-e,o=eD(r)*eF(t*t+n*n),a=eA(t,eP(n))*eD(n);return n*r<0&&(a-=ew*eD(t)*eD(n)),[a/r,2*ej(eI(i/o,1/r))-eE]},o}function rq(){return rH(rU).scale(109.5).parallels([30,30])}function rY(t,e){return[eT(e)*eR(t),eR(e)]}function rX(){return rN(rY).scale(249.5).clipAngle(90.000001)}function rK(t,e){var n=eT(e),r=eT(t)*n;return[n*eR(t)/r,eR(e)/r]}function rZ(){return rN(rK).scale(144.049).clipAngle(60)}function rQ(t,e){var n=eR(t),r=(n+eR(e))/2;if(1e-6>eP(r)){var i=eT(t);function o(t,e){return[t*i,eR(e)/i]}return o.invert=function(t,e){return[t/i,eW(e*i)]},o}var a=1+n*(2*r-n),l=eF(a)/r;function s(t,e){var n=eF(a-2*r*eR(e))/r;return[n*eR(t*=r),l-n*eT(t)]}return s.invert=function(t,e){var n=l-e,i=eA(t,eP(n))*eD(n);return n*r<0&&(i-=ew*eD(t)*eD(n)),[i/r,eW((a-(t*t+n*n)*r*r)/(2*r))]},s}function rJ(){return rH(rQ).scale(155.424).center([0,33.6442])}function r0(){return rJ().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function r1(t,e){var n=eT(e),r=1+eT(t)*n;return[n*eR(t)/r,eR(e)/r]}function r2(){return rN(r1).scale(250).clipAngle(142)}rI.invert=n4(function(t){return 2*eW(t/2)}),rD.invert=function(t,e){return[t,2*ej(eN(e))-eE]},rz.invert=function(t,e){return[-e,2*ej(eN(t))-eE]},r$.invert=r$,rY.invert=n4(eW),rK.invert=n4(ej),r1.invert=n4(function(t){return 2*ej(t)});var r5=eF(3)/2;function r3(t,e){var n=eW(r5*eR(e)),r=n*n,i=r*r*r;return[t*eT(n)/(r5*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function r4(){return rN(r3).scale(177.158)}r3.invert=function(t,e){for(var n,r,i=e,o=i*i,a=o*o*o,l=0;l<12&&(r=i*(1.340264+-.081106*o+a*(893e-6+.003796*o))-e,i-=n=r/(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o)),a=(o=i*i)*o*o,!(1e-12>eP(n)));++l);return[r5*t*(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o))/eT(i),eW(eR(i)/r5)]};var r6=n3(function(t){return(t=ez(t))&&t/eR(t)});function r8(){return rN(r6).scale(79.4188).clipAngle(179.999)}function r9(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}function r7(){return rN(r9).scale(175.295)}function it(){var t,e,n,r,i,o,a,l=1,s=0,u=0,c=1,f=1,p=0,h=null,d=1,y=1,g=rw({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),v=ed;function b(){return d=l*c,y=l*f,o=a=null,x}function x(n){var r=n[0]*d,i=n[1]*y;if(p){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+s,i+u]}return x.invert=function(n){var r=n[0]-s,i=n[1]-u;if(p){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/y]},x.stream=function(t){return o&&a===t?o:o=g(v(a=t))},x.postclip=function(t){return arguments.length?(v=t,h=n=r=i=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(h=n=r=i=null,ed):ry(h=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),b()):null==h?null:[[h,n],[r,i]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],b()):[s,u]},x.angle=function(n){return arguments.length?(e=eR(p=n%360*e_),t=eT(p),b()):p*eS},x.reflectX=function(t){return arguments.length?(c=t?-1:1,b()):c<0},x.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.fitExtent=function(t,e){return rM(x,t,e)},x.fitSize=function(t,e){return rS(x,t,e)},x.fitWidth=function(t,e){return r_(x,t,e)},x.fitHeight=function(t,e){return rP(x,t,e)},x}function ie(t,e){var n=eT(t),r=t===e?eR(t):(n-eT(e))/(e-t),i=n/r+t;if(1e-6>eP(r))return r$;function o(t,e){var n=i-e,o=r*t;return[n*eR(o),i-n*eT(o)]}return o.invert=function(t,e){var n=i-e,o=eA(t,eP(n))*eD(n);return n*r<0&&(o-=ew*eD(t)*eD(n)),[o/r,i-eD(r)*eF(t*t+n*n)]},o}function ir(){return rH(ie).scale(131.154).center([0,13.9389])}function ii(){var t,e,n,r,i,o,a=r0(),l=rJ().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=rJ().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){o=[t,e]}};function c(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,c}return c.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(t)},c.stream=function(n){var r,i;return t&&e===n?t:(i=(r=[a.stream(e=n),l.stream(n),s.stream(n)]).length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}})},c.precision=function(t){return arguments.length?(a.precision(t),l.precision(t),s.precision(t),f()):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),l.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],c=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,c-.238*e],[o+.455*e,c+.238*e]]).stream(u),r=l.translate([o-.307*e,c+.201*e]).clipExtent([[o-.425*e+1e-6,c+.12*e+1e-6],[o-.214*e-1e-6,c+.234*e-1e-6]]).stream(u),i=s.translate([o-.205*e,c+.212*e]).clipExtent([[o-.214*e+1e-6,c+.166*e+1e-6],[o-.115*e-1e-6,c+.234*e-1e-6]]).stream(u),f()},c.fitExtent=function(t,e){return rM(c,t,e)},c.fitSize=function(t,e){return rS(c,t,e)},c.fitWidth=function(t,e){return r_(c,t,e)},c.fitHeight=function(t,e){return rP(c,t,e)},c.scale(1070)}r6.invert=n4(function(t){return t}),r9.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.045255+a*(-.311325+.259866*o-.005916*11*a)))}while(eP(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]};var io=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ia(t){let{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});let{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[(function(){var t,e,n,r,i,o,a,l,s,u,c,f,p=10,h=10,d=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:b()}}function b(){return nC(eC(r/d)*d,n,d).map(c).concat(nC(eC(l/y)*y,a,y).map(f)).concat(nC(eC(e/p)*p,t,p).filter(function(t){return eP(t%d)>1e-6}).map(s)).concat(nC(eC(o/h)*h,i,h).filter(function(t){return eP(t%y)>1e-6}).map(u))}return v.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(a).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),l>a&&(t=l,l=a,a=t),v.precision(g)):[[r,l],[n,a]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),v.precision(g)):[[e,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(d=+t[0],y=+t[1],v):[d,y]},v.stepMinor=function(t){return arguments.length?(p=+t[0],h=+t[1],v):[p,h]},v.precision=function(p){return arguments.length?(g=+p,s=nN(o,i,90),u=nL(e,t,g),c=nN(l,a,90),f=nL(r,n,g),v):g},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])})()()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function il(t){return"geoPath"===t.type}let is=()=>t=>{let e,{children:n,coordinate:r={}}=t;if(!Array.isArray(n))return[];let{type:i="equalEarth"}=r,o=io(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=tm[`geo${eh(t)}`];if(!e)throw Error(`Unknown coordinate: ${t}`);return e}(i),l=n.map(ia);return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,n,r,i)=>{let s=a();var u,c=s,f=l,p={x:t,y:n,width:r,height:i},h=o;let{outline:d=(()=>{let t=f.filter(il);return t.find(t=>t.sphere)?{type:"Sphere"}:{type:"FeatureCollection",features:t.filter(t=>!t.sphere).flatMap(t=>t.data.value).flatMap(t=>(function(t){if(!t||!t.type)return null;let e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0:null})(t).features)}})()}=h,{size:y="fitExtent"}=h;for(let[t,e]of("fitExtent"===y?function(t,e,n){let{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(c,d,p):"fitWidth"===y&&function(t,e,n){let{width:r,height:i}=n,[[o,a],[l,s]]=nT(t.fitWidth(r,e)).bounds(e),u=Math.ceil(s-a),c=Math.min(Math.ceil(l-o),u),f=t.scale()*(c-1)/c,[p,h]=t.translate();t.scale(f).translate([p,h+(i-u)/2]).precision(.2)}(c,d,p),Object.entries(o)))null==(u=s[t])||u.call(s,e);e=nT(s);let g=new ec({domain:[t,t+r]}),v=new ec({domain:[n,n+i]}),b=t=>{let e=s(t);if(!e)return[null,null];let[n,r]=e;return[g.map(n),v.map(r)]},x=t=>{if(!t)return null;let[e,n]=t,r=[g.invert(e),v.invert(n)];return s.invert(r)};return{transform:t=>b(t),untransform:t=>x(t)}}]]}},children:l.flatMap(t=>il(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:n1(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};is.props={};var iu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ic=()=>t=>{let{type:e,data:n,scale:r,encode:i,style:o,animate:a,key:l,state:s}=t;return[Object.assign(Object.assign({type:"geoView"},iu(t,["type","data","scale","encode","style","animate","key","state"])),{children:[{type:"geoPath",key:`${l}-0`,data:{value:n},scale:r,encode:i,style:o,animate:a,state:s}]})]};function ip(){return{"composition.geoView":is,"composition.geoPath":ic}}function ih(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function id(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function iy(t,e){let n,r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);return r}function ig(t,e){let n,r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function im(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function iv(t,...e){if("function"!=typeof t[Symbol.iterator])throw TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){var r;let i=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),i.sort((t,n)=>{for(let r of e){let e=ix(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>ix(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(ib(n))}function ib(t=im){if(t===im)return ix;if("function"!=typeof t)throw TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function ix(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:+(t>e))}function iO(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?ix:ib(i);r>n;){if(r-n>600){let o=r-n+1,a=e-n+1,l=Math.log(o),s=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*s*(o-s)/o)*(a-o/2<0?-1:1),c=Math.max(n,Math.floor(e-a*s/o+u)),f=Math.min(r,Math.floor(e+(o-a)*s/o+u));iO(t,e,c,f,i)}let o=t[e],a=n,l=r;for(iw(t,n,e),i(t[r],o)>0&&iw(t,n,r);a<l;){for(iw(t,a,l),++a,--l;0>i(t[a],o);)++a;for(;i(t[l],o)>0;)--l}0===i(t[n],o)?iw(t,n,l):iw(t,++l,r),l<=e&&(n=l+1),e<=l&&(r=l-1)}return t}function iw(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function iE(t){return null===t?NaN:+t}function ik(t,e,n){if(!(!(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r*=1)>=r&&(yield r)}}(t,n))).length)||isNaN(e*=1))){if(e<=0||r<2)return ih(t);if(e>=1)return id(t);var r,i=(r-1)*e,o=Math.floor(i),a=id(iO(t,o).subarray(0,o+1));return a+(ih(t.subarray(o+1))-a)*(i-o)}}ic.props={};class iM extends Map{constructor(t,e=i_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(iS(this,t))}has(t){return super.has(iS(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function iS({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function i_(t){return null!==t&&"object"==typeof t?t.valueOf():t}function iP(t){return t}function ij(t,...e){return iN(t,iP,iP,e)}function iA(t,...e){return iN(t,Array.from,iP,e)}function iT(t,e,...n){return iN(t,iP,e,n)}function iC(t,e,...n){return iN(t,Array.from,e,n)}function iN(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new iM,l=r[o++],s=-1;for(let t of i){let e=l(t,++s,i),n=a.get(e);n?n.push(t):a.set(e,[t])}for(let[e,n]of a)a.set(e,t(n,o));return e(a)}(t,0)}var iL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function iI(t,e){return ih(t,t=>e[t])}function iR(t,e){return id(t,t=>e[t])}function iD(t,e){let n=2.5*iF(t,e)-1.5*iz(t,e);return ih(t,t=>e[t]>=n?e[t]:NaN)}function iF(t,e){return ik(t,.25,t=>e[t])}function iB(t,e){return ik(t,.5,t=>e[t])}function iz(t,e){return ik(t,.75,t=>e[t])}function iW(t,e){let n=2.5*iz(t,e)-1.5*iF(t,e);return id(t,t=>e[t]<=n?e[t]:NaN)}function i$(){return(t,e)=>{let{encode:n}=e,{y:r,x:i}=n,{value:o}=r,{value:a}=i;return[Array.from(ij(t,t=>a[+t]).values()).flatMap(t=>{let e=iD(t,o),n=iW(t,o);return t.filter(t=>o[t]<e||o[t]>n)}),e]}}let iG=t=>{let{data:e,encode:n,style:r={},tooltip:i={},transform:o,animate:a}=t,l=iL(t,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,u=iL(r,["point"]),{y:c}=n,f={y:c,y1:c,y2:c,y3:c,y4:c},p={y1:iF,y2:iB,y3:iz},h=n0(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),d=n0(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!s)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:iI},p),{y4:iR})],encode:Object.assign(Object.assign({},n),f),style:u,tooltip:h},l);let y=nY(u,"box"),g=nY(u,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:iD},p),{y4:iW})],encode:Object.assign(Object.assign({},n),f),style:y,tooltip:h,animate:n5(a,"box")},l),{type:"point",data:e,transform:[{type:i$}],encode:n,style:Object.assign({},g),tooltip:d,animate:n5(a,"point")}]};iG.props={};var iH=function(t){return nR(t,"Number")},iV=n(420),iU="undefined"!=typeof Float32Array?Float32Array:Array;function iq(){var t=new iU(3);return iU!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function iY(t){var e=new iU(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function iX(t){return Math.hypot(t[0],t[1],t[2])}function iK(t,e,n){var r=new iU(3);return r[0]=t,r[1]=e,r[2]=n,r}function iZ(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function iQ(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function iJ(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function i0(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function i1(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function i2(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function i5(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function i3(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function i4(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function i6(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],l=e[2];return Math.abs(n-o)<=1e-6*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=1e-6*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-l)<=1e-6*Math.max(1,Math.abs(i),Math.abs(l))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var i8=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function i9(){var t=new iU(16);return iU!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function i7(t){var e=new iU(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function ot(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function oe(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new iU(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=l,g[8]=s,g[9]=u,g[10]=c,g[11]=f,g[12]=p,g[13]=h,g[14]=d,g[15]=y,g}function on(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=l,t[7]=s,t[8]=u,t[9]=c,t[10]=f,t[11]=p,t[12]=h,t[13]=d,t[14]=y,t[15]=g,t}function or(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oi(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],l=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=l}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function oo(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15],b=n*l-r*a,x=n*s-i*a,O=n*u-o*a,w=r*s-i*l,E=r*u-o*l,k=i*u-o*s,M=c*y-f*d,S=c*g-p*d,_=c*v-h*d,P=f*g-p*y,j=f*v-h*y,A=p*v-h*g,T=b*A-x*j+O*P+w*_-E*S+k*M;return T?(T=1/T,t[0]=(l*A-s*j+u*P)*T,t[1]=(i*j-r*A-o*P)*T,t[2]=(y*k-g*E+v*w)*T,t[3]=(p*E-f*k-h*w)*T,t[4]=(s*_-a*A-u*S)*T,t[5]=(n*A-i*_+o*S)*T,t[6]=(g*O-d*k-v*x)*T,t[7]=(c*k-p*O+h*x)*T,t[8]=(a*j-l*_+u*M)*T,t[9]=(r*_-n*j-o*M)*T,t[10]=(d*E-y*O+v*b)*T,t[11]=(f*O-c*E-h*b)*T,t[12]=(l*S-a*P-s*M)*T,t[13]=(n*P-r*S+i*M)*T,t[14]=(y*x-d*w-g*b)*T,t[15]=(c*w-f*x+p*b)*T,t):null}function oa(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];return t[0]=l*(p*v-h*g)-f*(s*v-u*g)+y*(s*h-u*p),t[1]=-(r*(p*v-h*g)-f*(i*v-o*g)+y*(i*h-o*p)),t[2]=r*(s*v-u*g)-l*(i*v-o*g)+y*(i*u-o*s),t[3]=-(r*(s*h-u*p)-l*(i*h-o*p)+f*(i*u-o*s)),t[4]=-(a*(p*v-h*g)-c*(s*v-u*g)+d*(s*h-u*p)),t[5]=n*(p*v-h*g)-c*(i*v-o*g)+d*(i*h-o*p),t[6]=-(n*(s*v-u*g)-a*(i*v-o*g)+d*(i*u-o*s)),t[7]=n*(s*h-u*p)-a*(i*h-o*p)+c*(i*u-o*s),t[8]=a*(f*v-h*y)-c*(l*v-u*y)+d*(l*h-u*f),t[9]=-(n*(f*v-h*y)-c*(r*v-o*y)+d*(r*h-o*f)),t[10]=n*(l*v-u*y)-a*(r*v-o*y)+d*(r*u-o*l),t[11]=-(n*(l*h-u*f)-a*(r*h-o*f)+c*(r*u-o*l)),t[12]=-(a*(f*g-p*y)-c*(l*g-s*y)+d*(l*p-s*f)),t[13]=n*(f*g-p*y)-c*(r*g-i*y)+d*(r*p-i*f),t[14]=-(n*(l*g-s*y)-a*(r*g-i*y)+d*(r*s-i*l)),t[15]=n*(l*p-s*f)-a*(r*p-i*f)+c*(r*s-i*l),t}function ol(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],l=t[6],s=t[7],u=t[8],c=t[9],f=t[10],p=t[11],h=t[12],d=t[13],y=t[14],g=t[15];return(e*a-n*o)*(f*g-p*y)-(e*l-r*o)*(c*g-p*d)+(e*s-i*o)*(c*y-f*d)+(n*l-r*a)*(u*g-p*h)-(n*s-i*a)*(u*y-f*h)+(r*s-i*l)*(u*d-c*h)}function os(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],y=e[12],g=e[13],v=e[14],b=e[15],x=n[0],O=n[1],w=n[2],E=n[3];return t[0]=x*r+O*l+w*f+E*y,t[1]=x*i+O*s+w*p+E*g,t[2]=x*o+O*u+w*h+E*v,t[3]=x*a+O*c+w*d+E*b,x=n[4],O=n[5],w=n[6],E=n[7],t[4]=x*r+O*l+w*f+E*y,t[5]=x*i+O*s+w*p+E*g,t[6]=x*o+O*u+w*h+E*v,t[7]=x*a+O*c+w*d+E*b,x=n[8],O=n[9],w=n[10],E=n[11],t[8]=x*r+O*l+w*f+E*y,t[9]=x*i+O*s+w*p+E*g,t[10]=x*o+O*u+w*h+E*v,t[11]=x*a+O*c+w*d+E*b,x=n[12],O=n[13],w=n[14],E=n[15],t[12]=x*r+O*l+w*f+E*y,t[13]=x*i+O*s+w*p+E*g,t[14]=x*o+O*u+w*h+E*v,t[15]=x*a+O*c+w*d+E*b,t}function ou(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*v+e[12],t[13]=e[1]*y+e[5]*g+e[9]*v+e[13],t[14]=e[2]*y+e[6]*g+e[10]*v+e[14],t[15]=e[3]*y+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=l,t[5]=s,t[6]=u,t[7]=c,t[8]=f,t[9]=p,t[10]=h,t[11]=d,t[12]=r*y+l*g+f*v+e[12],t[13]=i*y+s*g+p*v+e[13],t[14]=o*y+u*g+h*v+e[14],t[15]=a*y+c*g+d*v+e[15]),t}function oc(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function of(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,S,_,P,j=r[0],A=r[1],T=r[2],C=Math.hypot(j,A,T);return C<1e-6?null:(j*=C=1/C,A*=C,T*=C,i=Math.sin(n),a=1-(o=Math.cos(n)),l=e[0],s=e[1],u=e[2],c=e[3],f=e[4],p=e[5],h=e[6],d=e[7],y=e[8],g=e[9],v=e[10],b=e[11],x=j*j*a+o,O=A*j*a+T*i,w=T*j*a-A*i,E=j*A*a-T*i,k=A*A*a+o,M=T*A*a+j*i,S=j*T*a+A*i,_=A*T*a-j*i,P=T*T*a+o,t[0]=l*x+f*O+y*w,t[1]=s*x+p*O+g*w,t[2]=u*x+h*O+v*w,t[3]=c*x+d*O+b*w,t[4]=l*E+f*k+y*M,t[5]=s*E+p*k+g*M,t[6]=u*E+h*k+v*M,t[7]=c*E+d*k+b*M,t[8]=l*S+f*_+y*P,t[9]=s*S+p*_+g*P,t[10]=u*S+h*_+v*P,t[11]=c*S+d*_+b*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function op(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],l=e[6],s=e[7],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*r,t[5]=a*i+c*r,t[6]=l*i+f*r,t[7]=s*i+p*r,t[8]=u*i-o*r,t[9]=c*i-a*r,t[10]=f*i-l*r,t[11]=p*i-s*r,t}function oh(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-u*r,t[1]=a*i-c*r,t[2]=l*i-f*r,t[3]=s*i-p*r,t[8]=o*r+u*i,t[9]=a*r+c*i,t[10]=l*r+f*i,t[11]=s*r+p*i,t}function od(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[4],c=e[5],f=e[6],p=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+u*r,t[1]=a*i+c*r,t[2]=l*i+f*r,t[3]=s*i+p*r,t[4]=u*i-o*r,t[5]=c*i-a*r,t[6]=f*i-l*r,t[7]=p*i-s*r,t}function oy(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function og(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function om(t,e,n){var r,i,o,a=n[0],l=n[1],s=n[2],u=Math.hypot(a,l,s);return u<1e-6?null:(a*=u=1/u,l*=u,s*=u,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=l*a*o+s*r,t[2]=s*a*o-l*r,t[3]=0,t[4]=a*l*o-s*r,t[5]=l*l*o+i,t[6]=s*l*o+a*r,t[7]=0,t[8]=a*s*o+l*r,t[9]=l*s*o-a*r,t[10]=s*s*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function ov(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ob(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ox(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oO(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=r+r,s=i+i,u=o+o,c=r*l,f=r*s,p=r*u,h=i*s,d=i*u,y=o*u,g=a*l,v=a*s,b=a*u;return t[0]=1-(h+y),t[1]=f+b,t[2]=p-v,t[3]=0,t[4]=f-b,t[5]=1-(c+y),t[6]=d+g,t[7]=0,t[8]=p+v,t[9]=d-g,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function ow(t,e){var n=new iU(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=r*r+i*i+o*o+a*a;return f>0?(n[0]=(l*a+c*r+s*o-u*i)*2/f,n[1]=(s*a+c*i+u*r-l*o)*2/f,n[2]=(u*a+c*o+l*i-s*r)*2/f):(n[0]=(l*a+c*r+s*o-u*i)*2,n[1]=(s*a+c*i+u*r-l*o)*2,n[2]=(u*a+c*o+l*i-s*r)*2),oO(t,e,n),t}function oE(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function ok(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],l=e[6],s=e[8],u=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,l),t[2]=Math.hypot(s,u,c),t}function oM(t,e){var n=new iU(3);ok(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,l=e[1]*i,s=e[2]*o,u=e[4]*r,c=e[5]*i,f=e[6]*o,p=e[8]*r,h=e[9]*i,d=e[10]*o,y=a+c+d,g=0;return y>0?(g=2*Math.sqrt(y+1),t[3]=.25*g,t[0]=(f-h)/g,t[1]=(p-s)/g,t[2]=(l-u)/g):a>c&&a>d?(g=2*Math.sqrt(1+a-c-d),t[3]=(f-h)/g,t[0]=.25*g,t[1]=(l+u)/g,t[2]=(p+s)/g):c>d?(g=2*Math.sqrt(1+c-a-d),t[3]=(p-s)/g,t[0]=(l+u)/g,t[1]=.25*g,t[2]=(f+h)/g):(g=2*Math.sqrt(1+d-a-c),t[3]=(l-u)/g,t[0]=(p+s)/g,t[1]=(f+h)/g,t[2]=.25*g),t}function oS(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=e[3],s=i+i,u=o+o,c=a+a,f=i*s,p=i*u,h=i*c,d=o*u,y=o*c,g=a*c,v=l*s,b=l*u,x=l*c,O=r[0],w=r[1],E=r[2];return t[0]=(1-(d+g))*O,t[1]=(p+x)*O,t[2]=(h-b)*O,t[3]=0,t[4]=(p-x)*w,t[5]=(1-(f+g))*w,t[6]=(y+v)*w,t[7]=0,t[8]=(h+b)*E,t[9]=(y-v)*E,t[10]=(1-(f+d))*E,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function o_(t,e,n,r,i){var o=e[0],a=e[1],l=e[2],s=e[3],u=o+o,c=a+a,f=l+l,p=o*u,h=o*c,d=o*f,y=a*c,g=a*f,v=l*f,b=s*u,x=s*c,O=s*f,w=r[0],E=r[1],k=r[2],M=i[0],S=i[1],_=i[2],P=(1-(y+v))*w,j=(h+O)*w,A=(d-x)*w,T=(h-O)*E,C=(1-(p+v))*E,N=(g+b)*E,L=(d+x)*k,I=(g-b)*k,R=(1-(p+y))*k;return t[0]=P,t[1]=j,t[2]=A,t[3]=0,t[4]=T,t[5]=C,t[6]=N,t[7]=0,t[8]=L,t[9]=I,t[10]=R,t[11]=0,t[12]=n[0]+M-(P*M+T*S+L*_),t[13]=n[1]+S-(j*M+C*S+I*_),t[14]=n[2]+_-(A*M+N*S+R*_),t[15]=1,t}function oP(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,l=r+r,s=i+i,u=n*a,c=r*a,f=r*l,p=i*a,h=i*l,d=i*s,y=o*a,g=o*l,v=o*s;return t[0]=1-f-d,t[1]=c+v,t[2]=p-g,t[3]=0,t[4]=c-v,t[5]=1-u-d,t[6]=h+y,t[7]=0,t[8]=p+g,t[9]=h-y,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oj(t,e,n,r,i,o,a){var l=1/(n-e),s=1/(i-r),u=1/(o-a);return t[0]=2*o*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*s,t[6]=0,t[7]=0,t[8]=(n+e)*l,t[9]=(i+r)*s,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t}function oA(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}iq();var oT=oA;function oC(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function oN(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),l=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+l),u=2/(i+o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((a-l)*s*.5),t[9]=(i-o)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function oL(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=(a+o)*u,t[15]=1,t}var oI=oL;function oR(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=o*u,t[15]=1,t}function oD(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d=e[0],y=e[1],g=e[2],v=r[0],b=r[1],x=r[2],O=n[0],w=n[1],E=n[2];return 1e-6>Math.abs(d-O)&&1e-6>Math.abs(y-w)&&1e-6>Math.abs(g-E)?or(t):(h=1/Math.hypot(c=d-O,f=y-w,p=g-E),c*=h,f*=h,p*=h,(h=Math.hypot(i=b*p-x*f,o=x*c-v*p,a=v*f-b*c))?(i*=h=1/h,o*=h,a*=h):(i=0,o=0,a=0),(h=Math.hypot(l=f*a-p*o,s=p*i-c*a,u=c*o-f*i))?(l*=h=1/h,s*=h,u*=h):(l=0,s=0,u=0),t[0]=i,t[1]=l,t[2]=c,t[3]=0,t[4]=o,t[5]=s,t[6]=f,t[7]=0,t[8]=a,t[9]=u,t[10]=p,t[11]=0,t[12]=-(i*d+o*y+a*g),t[13]=-(l*d+s*y+u*g),t[14]=-(c*d+f*y+p*g),t[15]=1,t)}function oF(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=r[0],s=r[1],u=r[2],c=i-n[0],f=o-n[1],p=a-n[2],h=c*c+f*f+p*p;h>0&&(c*=h=1/Math.sqrt(h),f*=h,p*=h);var d=s*p-u*f,y=u*c-l*p,g=l*f-s*c;return(h=d*d+y*y+g*g)>0&&(d*=h=1/Math.sqrt(h),y*=h,g*=h),t[0]=d,t[1]=y,t[2]=g,t[3]=0,t[4]=f*g-p*y,t[5]=p*d-c*g,t[6]=c*y-f*d,t[7]=0,t[8]=c,t[9]=f,t[10]=p,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function oB(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function oz(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function oW(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function o$(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function oG(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function oH(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function oV(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function oU(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],l=t[5],s=t[6],u=t[7],c=t[8],f=t[9],p=t[10],h=t[11],d=t[12],y=t[13],g=t[14],v=t[15],b=e[0],x=e[1],O=e[2],w=e[3],E=e[4],k=e[5],M=e[6],S=e[7],_=e[8],P=e[9],j=e[10],A=e[11],T=e[12],C=e[13],N=e[14],L=e[15];return Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-x)<=1e-6*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(i-O)<=1e-6*Math.max(1,Math.abs(i),Math.abs(O))&&Math.abs(o-w)<=1e-6*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(a-E)<=1e-6*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(l-k)<=1e-6*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(s-M)<=1e-6*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(u-S)<=1e-6*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-_)<=1e-6*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(f-P)<=1e-6*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(p-j)<=1e-6*Math.max(1,Math.abs(p),Math.abs(j))&&Math.abs(h-A)<=1e-6*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(d-T)<=1e-6*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(y-C)<=1e-6*Math.max(1,Math.abs(y),Math.abs(C))&&Math.abs(g-N)<=1e-6*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(v-L)<=1e-6*Math.max(1,Math.abs(v),Math.abs(L))}var oq=os,oY=o$;function oX(){var t=new iU(9);return iU!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function oK(){var t=new iU(4);return iU!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function oZ(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function oQ(){var t=new iU(4);return iU!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function oJ(t,e,n){var r=Math.sin(n*=.5);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function o0(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=n[0],s=n[1],u=n[2],c=n[3];return t[0]=r*c+a*l+i*u-o*s,t[1]=i*c+a*s+o*l-r*u,t[2]=o*c+a*u+r*s-i*l,t[3]=a*c-r*l-i*s-o*u,t}function o1(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,l=a?1/a:0;return t[0]=-n*l,t[1]=-r*l,t[2]=-i*l,t[3]=o*l,t}function o2(t,e,n,r){var i=.5*Math.PI/180,o=Math.sin(e*=i),a=Math.cos(e),l=Math.sin(n*=i),s=Math.cos(n),u=Math.sin(r*=i),c=Math.cos(r);return t[0]=o*s*c-a*l*u,t[1]=a*l*c+o*s*u,t[2]=a*s*u-o*l*c,t[3]=a*s*c+o*l*u,t}oK();var o5=function(t,e,n,r){var i=new iU(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},o3=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},o4=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};iq(),iK(1,0,0),iK(0,1,0),oQ(),oQ(),oX(),PW=new iU(2),iU!=Float32Array&&(PW[0]=0,PW[1]=0);var o6={}.toString,o8=function(t,e){return o6.call(t)==="[object "+e+"]"},o9=function(t){return o8(t,"Number")};function o7(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var at=function(t){return null==t},ae=function(t){return o8(t,"String")},an=function(t,e,n){return t<e?e:t>n?n:t},ar={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ai(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return ar[e]===t.length-1&&"achlmqstvz".includes(e)})}function ao(t){return ai(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function aa(t){return ao(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var al={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function as(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=ar[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,ar[n]))),ar[n]););}function au(t){return t>=48&&t<=57}function ac(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}var af=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function ap(t){if(aa(t))return[].concat(t);for(var e=function(t){if(ao(t))return[].concat(t);var e=function(t){if(ai(t))return[].concat(t);var e=new af(t);for(ac(e);e.index<e.max&&!e.err.length;)!function(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=ar[n[r].toLowerCase()];if(t.segmentStart=r,!function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,ac(t),t.data=[],!o)return as(t);for(;;){for(var a,l=o;l>0;l-=1){if((32|i)==97&&(3===l||4===l)?!function(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);if(48===r){t.param=0,t.index+=1;return}if(49===r){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e}(t):!function(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,l=!1,s=!1,u=!1;if(o>=n){t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';return}if((43===(e=r.charCodeAt(o))||45===e)&&(o+=1,e=r.charCodeAt(o)),!au(e)&&46!==e){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number';return}if(46!==e){if(a=48===e,o+=1,e=r.charCodeAt(o),a&&o<n&&e&&au(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&au(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;au(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(u&&!l&&!s){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent';return}if(o+=1,(43===(e=r.charCodeAt(o))||45===e)&&(o+=1),o<n&&au(r.charCodeAt(o)))for(;o<n&&au(r.charCodeAt(o));)o+=1;else{t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent';return}}t.index=o,t.param=+t.pathValue.slice(i,o)}(t),t.err.length)return;t.data.push(t.param),ac(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,ac(t))}if(t.index>=t.max||!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}as(t)}(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map(function(t){var e,a=t.slice(1).map(Number),l=t[0],s=l.toUpperCase();if("M"===l)return n=a[0],r=a[1],i=n,o=r,["M",n,r];if(l!==s)switch(s){case"A":e=[s,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[s,a[0]+r];break;case"H":e=[s,a[0]+n];break;default:e=[s].concat(a.map(function(t,e){return t+(e%2?r:n)}))}else e=[s].concat(a);var u=e.length;switch(s){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[u-2],r=e[u-1],"M"===s&&(i=n,o=r)}return e})}(t),n=tz({},al),r=0;r<e.length;r+=1){e[r]=function(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,l=t.slice(1).map(Number),s=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)s=["L",t[1],i];else if("V"===n)s=["L",r,t[1]];else if("S"===n){var u=2*r-o,c=2*i-a;e.x1=u,e.y1=c,s=["C",u,c].concat(l)}else if("T"===n){var f=2*r-e.qx,p=2*i-e.qy;e.qx=f,e.qy=p,s=["Q",f,p].concat(l)}else if("Q"===n){var h=l[0],d=l[1];e.qx=h,e.qy=d}return s}(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function ah(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function ad(t,e,n,r,i){var o=o7([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(i<=0)a={x:t,y:e};else if(i>=o)a={x:n,y:r};else{var l=ah([t,e],[n,r],i/o);a={x:l[0],y:l[1]}}return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function ay(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(n*o-r*i<0?-1:1)*Math.acos((n*i+r*o)/a)}function ag(t,e,n,r,i,o,a,l,s,u){var c,f=u.bbox,p=void 0===f||f,h=u.length,d=void 0===h||h,y=u.sampleSize,g=void 0===y?10:y,v="number"==typeof s,b=t,x=e,O=0,w=[b,x,0],E=[b,x],k=0,M={x:0,y:0},S=[{x:b,y:x}];v&&s<=0&&(M={x:b,y:x});for(var _=0;_<=g;_+=1){if(b=(c=function(t,e,n,r,i,o,a,l,s){var u=1-s;return{x:Math.pow(u,3)*t+3*Math.pow(u,2)*s*n+3*u*Math.pow(s,2)*i+Math.pow(s,3)*a,y:Math.pow(u,3)*e+3*Math.pow(u,2)*s*r+3*u*Math.pow(s,2)*o+Math.pow(s,3)*l}}(t,e,n,r,i,o,a,l,_/g)).x,x=c.y,p&&S.push({x:b,y:x}),d&&(O+=o7(E,[b,x])),E=[b,x],v&&O>=s&&s>w[2]){var P=(O-s)/(O-w[2]);M={x:E[0]*(1-P)+w[0]*P,y:E[1]*(1-P)+w[1]*P}}w=[b,x,O]}return v&&s>=O&&(M={x:a,y:l}),{length:O,point:M,min:{x:Math.min.apply(null,S.map(function(t){return t.x})),y:Math.min.apply(null,S.map(function(t){return t.y}))},max:{x:Math.max.apply(null,S.map(function(t){return t.x})),y:Math.max.apply(null,S.map(function(t){return t.y}))}}}function am(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=ap(t),h="number"==typeof e,d=[],y=0,g=0,v=0,b=0,x=[],O=[],w=0,E={x:0,y:0},k=E,M=E,S=E,_=0,P=0,j=p.length;P<j;P+=1)d=(u="M"===(c=(f=p[P])[0]))?d:[y,g].concat(f.slice(1)),u?(k=E={x:v=f[1],y:b=f[2]},w=0,h&&e<.001&&(S=E)):"L"===c?(w=(r=ad(d[0],d[1],d[2],d[3],(e||0)-_)).length,E=r.min,k=r.max,M=r.point):"A"===c?(w=(i=function(t,e,n,r,i,o,a,l,s,u,c){var f,p=c.bbox,h=void 0===p||p,d=c.length,y=void 0===d||d,g=c.sampleSize,v=void 0===g?30:g,b="number"==typeof u,x=t,O=e,w=0,E=[x,O,0],k=[x,O],M=0,S={x:0,y:0},_=[{x:x,y:O}];b&&u<=0&&(S={x:x,y:O});for(var P=0;P<=v;P+=1){if(x=(f=function(t,e,n,r,i,o,a,l,s,u){var c=Math.abs,f=Math.sin,p=Math.cos,h=Math.sqrt,d=Math.PI,y=c(n),g=c(r),v=d/180*((i%360+360)%360);if(t===l&&e===s)return{x:t,y:e};if(0===y||0===g)return ad(t,e,l,s,u).point;var b=(t-l)/2,x=(e-s)/2,O={x:p(v)*b+f(v)*x,y:-f(v)*b+p(v)*x},w=Math.pow(O.x,2)/Math.pow(y,2)+Math.pow(O.y,2)/Math.pow(g,2);w>1&&(y*=h(w),g*=h(w));var E=(Math.pow(y,2)*Math.pow(g,2)-Math.pow(y,2)*Math.pow(O.y,2)-Math.pow(g,2)*Math.pow(O.x,2))/(Math.pow(y,2)*Math.pow(O.y,2)+Math.pow(g,2)*Math.pow(O.x,2)),k=(o!==a?1:-1)*h(E=E<0?0:E),M={x:k*(y*O.y/g),y:k*(-(g*O.x)/y)},S={x:p(v)*M.x-f(v)*M.y+(t+l)/2,y:f(v)*M.x+p(v)*M.y+(e+s)/2},_={x:(O.x-M.x)/y,y:(O.y-M.y)/g},P=ay({x:1,y:0},_),j=ay(_,{x:(-O.x-M.x)/y,y:(-O.y-M.y)/g});!a&&j>0?j-=2*d:a&&j<0&&(j+=2*d);var A=P+(j%=2*d)*u,T=y*p(A),C=g*f(A);return{x:p(v)*T-f(v)*C+S.x,y:f(v)*T+p(v)*C+S.y}}(t,e,n,r,i,o,a,l,s,P/v)).x,O=f.y,h&&_.push({x:x,y:O}),y&&(w+=o7(k,[x,O])),k=[x,O],b&&w>=u&&u>E[2]){var j=(w-u)/(w-E[2]);S={x:k[0]*(1-j)+E[0]*j,y:k[1]*(1-j)+E[1]*j}}E=[x,O,w]}return b&&u>=w&&(S={x:l,y:s}),{length:w,point:S,min:{x:Math.min.apply(null,_.map(function(t){return t.x})),y:Math.min.apply(null,_.map(function(t){return t.y}))},max:{x:Math.max.apply(null,_.map(function(t){return t.x})),y:Math.max.apply(null,_.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-_,n||{})).length,E=i.min,k=i.max,M=i.point):"C"===c?(w=(o=ag(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-_,n||{})).length,E=o.min,k=o.max,M=o.point):"Q"===c?(w=(a=function(t,e,n,r,i,o,a,l){var s,u=l.bbox,c=void 0===u||u,f=l.length,p=void 0===f||f,h=l.sampleSize,d=void 0===h?10:h,y="number"==typeof a,g=t,v=e,b=0,x=[g,v,0],O=[g,v],w=0,E={x:0,y:0},k=[{x:g,y:v}];y&&a<=0&&(E={x:g,y:v});for(var M=0;M<=d;M+=1){if(g=(s=function(t,e,n,r,i,o,a){var l=1-a;return{x:Math.pow(l,2)*t+2*l*a*n+Math.pow(a,2)*i,y:Math.pow(l,2)*e+2*l*a*r+Math.pow(a,2)*o}}(t,e,n,r,i,o,M/d)).x,v=s.y,c&&k.push({x:g,y:v}),p&&(b+=o7(O,[g,v])),O=[g,v],y&&b>=a&&a>x[2]){var S=(b-a)/(b-x[2]);E={x:O[0]*(1-S)+x[0]*S,y:O[1]*(1-S)+x[1]*S}}x=[g,v,b]}return y&&a>=b&&(E={x:i,y:o}),{length:b,point:E,min:{x:Math.min.apply(null,k.map(function(t){return t.x})),y:Math.min.apply(null,k.map(function(t){return t.y}))},max:{x:Math.max.apply(null,k.map(function(t){return t.x})),y:Math.max.apply(null,k.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-_,n||{})).length,E=a.min,k=a.max,M=a.point):"Z"===c&&(w=(l=ad((d=[y,g,v,b])[0],d[1],d[2],d[3],(e||0)-_)).length,E=l.min,k=l.max,M=l.point),h&&_<e&&_+w>=e&&(S=M),O.push(k),x.push(E),_+=w,y=(s="Z"!==c?f.slice(-2):[v,b])[0],g=s[1];return h&&e>=_&&(S={x:y,y:g}),{length:_,point:S,min:{x:Math.min.apply(null,x.map(function(t){return t.x})),y:Math.min.apply(null,x.map(function(t){return t.y}))},max:{x:Math.max.apply(null,O.map(function(t){return t.x})),y:Math.max.apply(null,O.map(function(t){return t.y}))}}}var av=function(t){return Array.isArray?Array.isArray(t):o8(t,"Array")},ab=function(t){if(av(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},ax=function(t){if(av(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},aO=function(t,e){return(t%e+e)%e};function aw(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var aE=function(t,e,n,r){return tq(tq([],ah([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function ak(t,e){if(void 0===e&&(e=!1),aa(t)&&t.every(function(t){var e=t[0];return"MC".includes(e)})){var n,r,i=[].concat(t);return e?[i,[]]:i}for(var o=ap(t),a=tz({},al),l=[],s="",u=o.length,c=[],f=0;f<u;f+=1){o[f]&&(s=o[f][0]),l[f]=s;var p=function(t,e){var n,r,i,o,a,l,s,u,c,f=t[0],p=t.slice(1).map(Number),h=p[0],d=p[1],y=e.x1,g=e.y1,v=e.x,b=e.y;switch(!"TQ".includes(f)&&(e.qx=null,e.qy=null),f){case"M":e.x=h,e.y=d;break;case"A":return["C"].concat(function t(e,n,r,i,o,a,l,s,u,c){var f,p,h,d,y,g=e,v=n,b=r,x=i,O=s,w=u,E=120*Math.PI/180,k=Math.PI/180*(+o||0),M=[];if(c)p=c[0],h=c[1],d=c[2],y=c[3];else{g=(f=aw(g,v,-k)).x,v=f.y,O=(f=aw(O,w,-k)).x,w=f.y;var S=(g-O)/2,_=(v-w)/2,P=S*S/(b*b)+_*_/(x*x);P>1&&(b*=P=Math.sqrt(P),x*=P);var j=b*b,A=x*x,T=(a===l?-1:1)*Math.sqrt(Math.abs((j*A-j*_*_-A*S*S)/(j*_*_+A*S*S)));d=T*b*_/x+(g+O)/2,y=-(T*x)*S/b+(v+w)/2,p=Math.asin(((v-y)/x*1e9>>0)/1e9),h=Math.asin(((w-y)/x*1e9>>0)/1e9),p=g<d?Math.PI-p:p,h=O<d?Math.PI-h:h,p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),l&&p>h&&(p-=2*Math.PI),!l&&h>p&&(h-=2*Math.PI)}var C=h-p;if(Math.abs(C)>E){var N=h,L=O,I=w;M=t(O=d+b*Math.cos(h=p+E*(l&&h>p?1:-1)),w=y+x*Math.sin(h),b,x,o,0,l,L,I,[h,N,d,y])}C=h-p;var R=Math.cos(p),D=Math.cos(h),F=Math.tan(C/4),B=4/3*b*F,z=4/3*x*F,W=[g,v],$=[g+B*Math.sin(p),v-z*R],G=[O+B*Math.sin(h),w-z*D],H=[O,w];if($[0]=2*W[0]-$[0],$[1]=2*W[1]-$[1],c)return $.concat(G,H,M);M=$.concat(G,H,M);for(var V=[],U=0,q=M.length;U<q;U+=1)V[U]=U%2?aw(M[U-1],M[U],k).y:aw(M[U],M[U+1],k).x;return V}((c=[y,g].concat(p))[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9]));case"Q":return e.qx=h,e.qy=d,["C"].concat((n=(c=[y,g].concat(p))[0],r=c[1],i=c[2],o=c[3],a=c[4],l=c[5],[1/3*n+2/3*i,1/3*r+2/3*o,1/3*a+2/3*i,1/3*l+2/3*o,a,l]));case"L":return["C"].concat(aE(y,g,h,d));case"Z":if(y===v&&g===b)return["C",y,g,v,b,v,b];return["C"].concat(aE(y,g,v,b))}return t}(o[f],a);o[f]=p;var h=f;if(o[h].length>7){o[h].shift();for(var d=o[h],y=h;d.length;)l[h]="A",o.splice(y+=1,0,["C"].concat(d.splice(0,6)));o.splice(h,1)}u=o.length,"Z"===s&&c.push(f),r=(n=o[f]).length,a.x1=+n[r-2],a.y1=+n[r-1],a.x2=+n[r-4]||a.x1,a.y2=+n[r-3]||a.y1}return e?[o,c]:o}function aM(t){return t.map(function(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=e&&n[e-1].slice(-2).concat(t.slice(1)),g=e?ag(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],{bbox:!1}).length:0;return d=e?g?(void 0===r&&(r=.5),i=y.slice(0,2),o=y.slice(2,4),a=y.slice(4,6),l=y.slice(6,8),s=ah(i,o,r),u=ah(o,a,r),c=ah(a,l,r),f=ah(s,u,r),p=ah(u,c,r),h=ah(f,p,r),[["C"].concat(s,f,h),["C"].concat(p,c,l)]):[t,t]:[t],{s:t,ss:d,l:g}})}function aS(t){var e,n,r;return e=0,n=0,r=0,ak(t).map(function(t){if("M"===t[0])return e=t[1],n=t[2],0;var i,o,a,l=t.slice(1),s=l[0],u=l[1],c=l[2],f=l[3],p=l[4],h=l[5];return o=e,r=3*((h-(a=n))*(s+c)-(p-o)*(u+f)+u*(o-c)-s*(a-f)+h*(c+o/3)-p*(f+a/3))/20,e=(i=t.slice(-2))[0],n=i[1],r}).reduce(function(t,e){return t+e},0)>=0}var a_=function(t){return o8(t,"Boolean")},aP=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},aj=function(t){return void 0===t};function aA(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function aT(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function aC(){}var aN="\\s*([+-]?\\d+)\\s*",aL="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",aI="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",aR=/^#([0-9a-f]{3,8})$/,aD=RegExp("^rgb\\("+[aN,aN,aN]+"\\)$"),aF=RegExp("^rgb\\("+[aI,aI,aI]+"\\)$"),aB=RegExp("^rgba\\("+[aN,aN,aN,aL]+"\\)$"),az=RegExp("^rgba\\("+[aI,aI,aI,aL]+"\\)$"),aW=RegExp("^hsl\\("+[aL,aI,aI]+"\\)$"),a$=RegExp("^hsla\\("+[aL,aI,aI,aL]+"\\)$"),aG={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function aH(){return this.rgb().formatHex()}function aV(){return this.rgb().formatRgb()}function aU(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=aR.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?aq(e):3===n?new aX(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?aY(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?aY(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=aD.exec(t))?new aX(e[1],e[2],e[3],1):(e=aF.exec(t))?new aX(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=aB.exec(t))?aY(e[1],e[2],e[3],e[4]):(e=az.exec(t))?aY(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=aW.exec(t))?aJ(e[1],e[2]/100,e[3]/100,1):(e=a$.exec(t))?aJ(e[1],e[2]/100,e[3]/100,e[4]):aG.hasOwnProperty(t)?aq(aG[t]):"transparent"===t?new aX(NaN,NaN,NaN,0):null}function aq(t){return new aX(t>>16&255,t>>8&255,255&t,1)}function aY(t,e,n,r){return r<=0&&(t=e=n=NaN),new aX(t,e,n,r)}function aX(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function aK(){return"#"+aQ(this.r)+aQ(this.g)+aQ(this.b)}function aZ(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function aQ(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function aJ(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new a1(t,e,n,r)}function a0(t){if(t instanceof a1)return new a1(t.h,t.s,t.l,t.opacity);if(t instanceof aC||(t=aU(t)),!t)return new a1;if(t instanceof a1)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+(n<r)*6:n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new a1(a,l,s,t.opacity)}function a1(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function a2(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function a5(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function a3(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function a4(t,e){var n=Math.min.apply(Math,tq([],tV(t),!1)),r=Math.min.apply(Math,tq([],tV(e),!1));return{x:n,y:r,width:Math.max.apply(Math,tq([],tV(t),!1))-n,height:Math.max.apply(Math,tq([],tV(e),!1))-r}}function a6(t,e,n,r,i,o){var a=-1,l=1/0,s=[n,r],u=20;o&&o>200&&(u=o/10);for(var c=1/u,f=c/10,p=0;p<=u;p++){var h=p*c,d=[i.apply(void 0,tq([],tV(t.concat([h])),!1)),i.apply(void 0,tq([],tV(e.concat([h])),!1))],y=a3(s[0],s[1],d[0],d[1]);y<l&&(a=h,l=y)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var g=t.length;return{x:t[g-1],y:e[g-1]}}l=1/0;for(var p=0;p<32&&!(f<1e-4);p++){var v=a-f,b=a+f,d=[i.apply(void 0,tq([],tV(t.concat([v])),!1)),i.apply(void 0,tq([],tV(e.concat([v])),!1))],y=a3(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var x=[i.apply(void 0,tq([],tV(t.concat([b])),!1)),i.apply(void 0,tq([],tV(e.concat([b])),!1))],O=a3(s[0],s[1],x[0],x[1]);b<=1&&O<l?(a=b,l=O):f*=.5}}return{x:i.apply(void 0,tq([],tV(t.concat([a])),!1)),y:i.apply(void 0,tq([],tV(e.concat([a])),!1))}}aA(aC,aU,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:aH,formatHex:aH,formatHsl:function(){return a0(this).formatHsl()},formatRgb:aV,toString:aV}),aA(aX,function(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof aC||(i=aU(i)),i)?new aX((i=i.rgb()).r,i.g,i.b,i.opacity):new aX:new aX(t,e,n,null==r?1:r)},aT(aC,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new aX(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new aX(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:aK,formatHex:aK,formatRgb:aZ,toString:aZ})),aA(a1,function(t,e,n,r){return 1==arguments.length?a0(t):new a1(t,e,n,null==r?1:r)},aT(aC,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new a1(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new a1(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new aX(a2(t>=240?t-240:t+120,i,r),a2(t,i,r),a2(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));function a8(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function a9(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function a7(t,e,n,r){var i,o,a,l=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,u=3*e-3*t,c=[];if(a5(l,0))!a5(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;a5(f,0)?c.push(-s/(2*l)):f>0&&(i=(-s+(a=Math.sqrt(f)))/(2*l),o=(-s-a)/(2*l),i>=0&&i<=1&&c.push(i),o>=0&&o<=1&&c.push(o))}return c}function lt(t,e,n,r,i,o,a,l,s,u,c){var f=a6([t,n,i,a],[e,r,o,l],s,u,a9,c);return a3(f.x,f.y,s,u)}function le(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function ln(t,e,n){var r=t+n-2*e;if(a5(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}"undefined"!=typeof globalThis||("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self);var lr={exports:{}};lr.exports=function(){function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return t<e?-1:+(t>e)}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e){i(t,0,t.children.length,e,t)}function i(t,e,n,r,i){i||(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var l=t.children[a];o(i,t.leaf?r(l):l)}return i}function o(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function a(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function s(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function h(n,r,i,o,a){for(var l=[r,i];l.length;)if(!((i=l.pop())-(r=l.pop())<=o)){var s=r+Math.ceil((i-r)/o/2)*o;(function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var l=o-i+1,s=r-i+1,u=Math.log(l),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(l-c)/l)*(s-l/2<0?-1:1),p=Math.max(i,Math.floor(r-s*c/l+f)),h=Math.min(o,Math.floor(r+(l-s)*c/l+f));e(n,r,p,h,a)}var d=n[r],y=i,g=o;for(t(n,i,r),a(n[o],d)>0&&t(n,i,o);y<g;){for(t(n,y,g),y++,g--;0>a(n[y],d);)y++;for(;a(n[g],d)>0;)g--}0===a(n[i],d)?t(n,i,g):t(n,++g,o),g<=r&&(i=g+1),r<=g&&(o=g-1)}})(n,s,r||0,i||n.length-1,a||e),l.push(r,s,s,i)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],l=e.leaf?r(a):a;f(t,l)&&(e.leaf?n.push(a):c(t,l)?this._all(a,n):i.push(a))}e=i.pop()}return n},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||c(t,o))return!0;n.push(i)}}e=n.pop()}return!1},n.prototype.load=function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=p([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var n,r,i,o=this.data,a=this.toBBox(t),l=[],s=[];o||l.length;){if(o||(o=l.pop(),r=l[l.length-1],n=s.pop(),i=!0),o.leaf){var u=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return -1}(t,o.children,e);if(-1!==u){o.children.splice(u,1),l.push(o),this._condense(l);break}}!i&&!o.leaf&&c(o,a)?(l.push(o),s.push(n),n=0,r=o,o=o.children[0]):r?(n++,o=r.children[n],i=!1):o=null}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},n.prototype._build=function(t,e,n,i){var o,a=n-e+1,l=this._maxEntries;if(a<=l)return r(o=p(t.slice(e,n+1)),this.toBBox),o;i||(i=Math.ceil(Math.log(a)/Math.log(l)),l=Math.ceil(a/Math.pow(l,i-1))),(o=p([])).leaf=!1,o.height=i;var s=Math.ceil(a/l),u=s*Math.ceil(Math.sqrt(l));h(t,e,n,u,this.compareMinX);for(var c=e;c<=n;c+=u){var f=Math.min(c+u-1,n);h(t,c,f,s,this.compareMinY);for(var d=c;d<=f;d+=s){var y=Math.min(d+s-1,f);o.children.push(this._build(t,d,y,i-1))}}return r(o,this.toBBox),o},n.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,l=0;l<e.children.length;l++){var u,c,f=e.children[l],p=s(f),h=(u=t,(Math.max((c=f).maxX,u.maxX)-Math.min(c.minX,u.minX))*(Math.max(c.maxY,u.maxY)-Math.min(c.minY,u.minY))-p);h<o?(o=h,i=p<i?p:i,a=f):h===o&&p<i&&(i=p,a=f)}e=a||e.children[0]}return e},n.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],a=this._chooseSubtree(r,this.data,e,i);for(a.children.push(t),o(a,r);e>=0;)if(i[e].children.length>this._maxEntries)this._split(i,e),e--;else break;this._adjustParentBBoxes(r,i,e)},n.prototype._split=function(t,e){var n=t[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);var a=this._chooseSplitIndex(n,o,i),l=p(n.children.splice(a,n.children.length-a));l.height=n.height,l.leaf=n.leaf,r(n,this.toBBox),r(l,this.toBBox),e?t[e-1].children.push(l):this._splitRoot(n,l)},n.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,n){for(var r,o=1/0,a=1/0,l=e;l<=n-e;l++){var u=i(t,0,l,this.toBBox),c=i(t,l,n,this.toBBox),f=function(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY);return Math.max(0,Math.min(t.maxX,e.maxX)-n)*Math.max(0,Math.min(t.maxY,e.maxY)-r)}(u,c),p=s(u)+s(c);f<o?(o=f,r=l,a=p<a?p:a):f===o&&p<a&&(a=p,r=l)}return r||n-e},n.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:a,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},n.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var a=this.toBBox,l=i(t,0,e,a),s=i(t,n-e,n,a),c=u(l)+u(s),f=e;f<n-e;f++){var p=t.children[f];o(l,t.leaf?a(p):p),c+=u(l)}for(var h=n-e-1;h>=e;h--){var d=t.children[h];o(s,t.leaf?a(d):d),c+=u(s)}return c},n.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)o(e[r],t)},n.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},n}();var li=lr.exports;(P$=ja||(ja={})).GROUP="g",P$.CIRCLE="circle",P$.ELLIPSE="ellipse",P$.IMAGE="image",P$.RECT="rect",P$.LINE="line",P$.POLYLINE="polyline",P$.POLYGON="polygon",P$.TEXT="text",P$.PATH="path",P$.HTML="html",P$.MESH="mesh",(PG=jl||(jl={}))[PG.ZERO=0]="ZERO",PG[PG.NEGATIVE_ONE=1]="NEGATIVE_ONE";var lo=function(){function t(){this.plugins=[]}return t.prototype.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},t.prototype.removeAllRenderingPlugins=function(){var t=this;this.plugins.forEach(function(e){var n=t.context.renderingPlugins.indexOf(e);n>=0&&t.context.renderingPlugins.splice(n,1)})},t}(),la=function(){function t(t){this.clipSpaceNearZ=jl.NEGATIVE_ONE,this.plugins=[],this.config=tz({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0},t)}return t.prototype.registerPlugin=function(t){-1===this.plugins.findIndex(function(e){return e===t})&&this.plugins.push(t)},t.prototype.unregisterPlugin=function(t){var e=this.plugins.findIndex(function(e){return e===t});e>-1&&this.plugins.splice(e,1)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getPlugin=function(t){return this.plugins.find(function(e){return e.name===t})},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}();function ll(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function ls(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function lu(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function lc(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function lf(t){return void 0===t?0:t>360||t<-360?t%360:t}function lp(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?iY(t):o9(t)?iK(t,e,n):iK(t[0],t[1]||e,t[2]||n)}function lh(t){return Math.PI/180*t}function ld(t){return 180/Math.PI*t}function ly(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,b;return 16===e.length?(i=.5*Math.PI,a=(o=tV(ok(iq(),e),3))[0],l=o[1],s=o[2],(u=Math.asin(-e[2]/a))<i?u>-i?(n=Math.atan2(e[6]/l,e[10]/s),r=Math.atan2(e[1]/a,e[0]/a)):(r=0,n=-Math.atan2(e[4]/l,e[5]/l)):(r=0,n=Math.atan2(e[4]/l,e[5]/l)),t[0]=n,t[1]=u,t[2]=r,t):(c=e[0],f=e[1],p=e[2],h=e[3],v=c*c+(d=f*f)+(y=p*p)+(g=h*h),(b=c*h-f*p)>.499995*v?(t[0]=Math.PI/2,t[1]=2*Math.atan2(f,c),t[2]=0):b<-.499995*v?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(f,c),t[2]=0):(t[0]=Math.asin(2*(c*p-h*f)),t[1]=Math.atan2(2*(c*h+f*p),1-2*(y+g)),t[2]=Math.atan2(2*(c*f+p*h),1-2*(d+y))),t)}function lg(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var l=ld(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var lm=i9(),lv=i9(),lb=oK(),lx=[iq(),iq(),iq()],lO=iq();function lw(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var lE=function(){function t(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){ll(this.center,t),ll(this.halfExtents,e),ls(this.min,this.center,this.halfExtents),lu(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){lu(this.center,e,t),lc(this.center,this.center,.5),ls(this.halfExtents,e,t),lc(this.halfExtents,this.halfExtents,.5),ll(this.min,t),ll(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e)){if(t.isEmpty(this))return void this.setMinMax(e.getMin(),e.getMax());var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,l=a[0],s=a[1],u=a[2],c=r-l,f=r+l,p=i-s,h=i+s,d=o-u,y=o+u,g=e.center,v=g[0],b=g[1],x=g[2],O=e.halfExtents,w=O[0],E=O[1],k=O[2],M=v-w,S=v+w,_=b-E,P=b+E,j=x-k,A=x+k;M<c&&(c=M),S>f&&(f=S),_<p&&(p=_),P>h&&(h=P),j<d&&(d=j),A>y&&(y=A),n[0]=(c+f)*.5,n[1]=(p+h)*.5,n[2]=(d+y)*.5,a[0]=(f-c)*.5,a[1]=(h-p)*.5,a[2]=(y-d)*.5,this.min[0]=c,this.min[1]=p,this.min[2]=d,this.max[0]=f,this.max[1]=h,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],l=e[4],s=e[8],u=e[1],c=e[5],f=e[9],p=e[2],h=e[6],d=e[10],y=Math.abs(a),g=Math.abs(l),v=Math.abs(s),b=Math.abs(u),x=Math.abs(c),O=Math.abs(f),w=Math.abs(p),E=Math.abs(h),k=Math.abs(d);n[0]=e[12]+a*i[0]+l*i[1]+s*i[2],n[1]=e[13]+u*i[0]+c*i[1]+f*i[2],n[2]=e[14]+p*i[0]+h*i[1]+d*i[2],r[0]=y*o[0]+g*o[1]+v*o[2],r[1]=b*o[0]+x*o[1]+O*o[2],r[2]=w*o[0]+E*o[1]+k*o[2],ls(this.min,n,r),lu(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n,r,i,o,a,l,s=new t,u=(n=[0,0,0],r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n),c=(o=[0,0,0],a=this.getMax(),l=e.getMax(),o[0]=Math.min(a[0],l[0]),o[1]=Math.min(a[1],l[1]),o[2]=Math.min(a[2],l[2]),o);return s.setMinMax(u,c),s},t.prototype.getNegativeFarPoint=function(t){if(273===t.pnVertexFlag)return ll([0,0,0],this.min);if(272===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];if(257===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];if(256===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];if(17===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];else if(16===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];else if(1===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];else return[this.max[0],this.max[1],this.max[2]]},t.prototype.getPositiveFarPoint=function(t){if(273===t.pnVertexFlag)return ll([0,0,0],this.max);if(272===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];if(257===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];if(256===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];if(17===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];else if(16===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];else if(1===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];else return[this.min[0],this.min[1],this.min[2]]},t}(),lk=function(){function t(t,e){this.distance=t||0,this.normal=e||iK(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return i5(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/iX(this.normal);i1(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&i3(n,t,e,i),o},t}();(PH=js||(js={}))[PH.OUTSIDE=0xffffffff]="OUTSIDE",PH[PH.INSIDE=0]="INSIDE",PH[PH.INDETERMINATE=0x7fffffff]="INDETERMINATE";var lM=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new lk)}return t.prototype.extractFromVPMatrix=function(t){var e=tV(t,16),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];iQ(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,iQ(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,iQ(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,iQ(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,iQ(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,iQ(this.planes[5].normal,o+i,u+s,h+p),this.planes[5].distance=v+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}(),lS=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),l_=function(){function t(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),lP="Method not implemented.",lj="Use document.documentElement instead.";(PV=ju||(ju={}))[PV.ORBITING=0]="ORBITING",PV[PV.EXPLORING=1]="EXPLORING",PV[PV.TRACKING=2]="TRACKING",(PU=jc||(jc={}))[PU.DEFAULT=0]="DEFAULT",PU[PU.ROTATIONAL=1]="ROTATIONAL",PU[PU.TRANSLATIONAL=2]="TRANSLATIONAL",PU[PU.CINEMATIC=3]="CINEMATIC",(Pq=jf||(jf={}))[Pq.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Pq[Pq.PERSPECTIVE=1]="PERSPECTIVE";var lA={UPDATED:"updated"},lT=function(){function t(){this.clipSpaceNearZ=jl.NEGATIVE_ONE,this.eventEmitter=new iV,this.matrix=i9(),this.right=iK(1,0,0),this.up=iK(0,1,0),this.forward=iK(0,0,1),this.position=iK(0,0,1),this.focalPoint=iK(0,0,0),this.distanceVector=iK(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=i9(),this.projectionMatrixInverse=i9(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=ju.EXPLORING,this.trackingMode=jc.DEFAULT,this.projectionMode=jf.PERSPECTIVE,this.frustum=new lM,this.orthoMatrix=i9()}return t.prototype.isOrtho=function(){return this.projectionMode===jf.ORTHOGRAPHIC},t.prototype.getProjectionMode=function(){return this.projectionMode},t.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},t.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},t.prototype.getFrustum=function(){return this.frustum},t.prototype.getPosition=function(){return this.position},t.prototype.getFocalPoint=function(){return this.focalPoint},t.prototype.getDollyingStep=function(){return this.dollyingStep},t.prototype.getNear=function(){return this.near},t.prototype.getFar=function(){return this.far},t.prototype.getZoom=function(){return this.zoom},t.prototype.getOrthoMatrix=function(){return this.orthoMatrix},t.prototype.getView=function(){return this.view},t.prototype.setEnableUpdate=function(t){this.enableUpdate=t},t.prototype.setType=function(t,e){return this.type=t,this.type===ju.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===ju.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},t.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},t.prototype.setTrackingMode=function(t){if(this.type!==ju.TRACKING)throw Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},t.prototype.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},t.prototype.getViewTransform=function(){return oo(i9(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=oy(i9(),[t,e,0]);this.jitteredProjectionMatrix=os(i9(),n,this.projectionMatrix)},t.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},t.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},t.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},t.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},t.prototype.setNear=function(t){return this.projectionMode===jf.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},t.prototype.setFar=function(t){return this.projectionMode===jf.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},t.prototype.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===jf.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===jf.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===jf.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===jf.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},t.prototype.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,i=n.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(r,i),this.setFocalPoint(r,i),this.setZoom(t),this.rotate(0,0,o);var a=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),l=iK(a.x-r,a.y-i,0),s=i5(l,this.right)/iX(this.right),u=i5(l,this.up)/iX(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=jf.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,l,s,u,c,f,p,h=this.near*Math.tan(lh(.5*this.fov))/this.zoom,d=2*h,y=this.aspect*d,g=-.5*y;if(null==(p=this.view)?void 0:p.enabled){var v=this.view.fullWidth,b=this.view.fullHeight;g+=this.view.offsetX*y/v,h-=this.view.offsetY*d/b,y*=this.view.width/v,d*=this.view.height/b}return i=this.projectionMatrix,o=g,a=g+y,l=h,s=h-d,u=this.far,this.clipSpaceNearZ===jl.ZERO?(c=-u/(u-t),f=-u*t/(u-t)):(c=-(u+t)/(u-t),f=-2*u*t/(u-t)),i[0]=2*t/(a-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=2*t/(l-s),i[6]=0,i[7]=0,i[8]=(a+o)/(a-o),i[9]=(l+s)/(l-s),i[10]=c,i[11]=-1,i[12]=0,i[13]=0,i[14]=f,i[15]=0,oc(this.projectionMatrix,this.projectionMatrix,iK(1,-1,1)),oo(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=jf.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var a,l=(this.rright-this.left)/(2*this.zoom),s=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,c=(this.top+this.bottom)/2,f=u-l,p=u+l,h=c+s,d=c-s;if(null==(a=this.view)?void 0:a.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,p=f+y*this.view.width,h-=g*this.view.offsetY,d=h-g*this.view.height}return this.clipSpaceNearZ===jl.NEGATIVE_ONE?oI(this.projectionMatrix,f,p,d,h,i,o):oR(this.projectionMatrix,f,p,d,h,i,o),oc(this.projectionMatrix,this.projectionMatrix,iK(1,-1,1)),oo(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},t.prototype.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=lp(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},t.prototype.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r=iK(0,1,0);if(this.focalPoint=lp(t,e,n),this.trackingMode===jc.CINEMATIC){var i=i0(iq(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=ld(Math.asin(e/iX(i))),a=90+ld(Math.atan2(n,t)),l=i9();oh(l,l,lh(a)),op(l,l,lh(o)),r=i4(iq(),[0,1,0],l)}return oo(this.matrix,oD(i9(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},t.prototype.getDistance=function(){return this.distance},t.prototype.getDistanceVector=function(){return this.distanceVector},t.prototype.setDistance=function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=iq();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},t.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},t.prototype.setMinDistance=function(t){return this.minDistance=t,this},t.prototype.setAzimuth=function(t){return this.azimuth=lf(t),this.computeMatrix(),this._getAxes(),this.type===ju.ORBITING||this.type===ju.EXPLORING?this._getPosition():this.type===ju.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=lf(t),this.computeMatrix(),this._getAxes(),this.type===ju.ORBITING||this.type===ju.EXPLORING?this._getPosition():this.type===ju.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=lf(t),this.computeMatrix(),this._getAxes(),this.type===ju.ORBITING||this.type===ju.EXPLORING?this._getPosition():this.type===ju.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getRoll=function(){return this.roll},t.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},t.prototype.computeMatrix=function(){var t=oJ(oQ(),[0,0,1],lh(this.roll));or(this.matrix);var e=oJ(oQ(),[1,0,0],lh((this.rotateWorld&&this.type!==ju.TRACKING||this.type===ju.TRACKING?1:-1)*this.elevation)),n=oJ(oQ(),[0,1,0],lh((this.rotateWorld&&this.type!==ju.TRACKING||this.type===ju.TRACKING?1:-1)*this.azimuth)),r=o0(oQ(),n,e);r=o0(oQ(),r,t);var i=oP(i9(),r);this.type===ju.ORBITING||this.type===ju.EXPLORING?(ou(this.matrix,this.matrix,this.focalPoint),os(this.matrix,this.matrix,i),ou(this.matrix,this.matrix,[0,0,this.distance])):this.type===ju.TRACKING&&(ou(this.matrix,this.matrix,this.position),os(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=lp(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},t.prototype._getAxes=function(){iZ(this.right,lp(oZ(oK(),[1,0,0,0],this.matrix))),iZ(this.up,lp(oZ(oK(),[0,1,0,0],this.matrix))),iZ(this.forward,lp(oZ(oK(),[0,0,1,0],this.matrix))),i2(this.right,this.right),i2(this.up,this.up),i2(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=iX(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===ju.TRACKING||this.rotateWorld?(this.elevation=ld(Math.asin(e/r)),this.azimuth=ld(Math.atan2(-t,-n))):(this.elevation=-ld(Math.asin(e/r)),this.azimuth=-ld(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){iZ(this.position,lp(oZ(oK(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){var t,e,n,r,i,o,a;n=this.distanceVector,r=[0,0,-this.distance],t=oX(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],i=r[0],o=r[1],a=r[2],n[0]=i*m[0]+o*m[3]+a*m[6],n[1]=i*m[1]+o*m[4]+a*m[7],n[2]=i*m[2]+o*m[5]+a*m[8],iJ(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=i0(iq(),this.focalPoint,this.position),this.distance=iX(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===jf.ORTHOGRAPHIC){var t=this.position,e=oJ(oQ(),[0,0,1],-this.roll*Math.PI/180);o_(this.orthoMatrix,e,iK((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),iK(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=os(i9(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(lA.UPDATED)}},t.prototype.rotate=function(t,e,n){throw Error(lP)},t.prototype.pan=function(t,e){throw Error(lP)},t.prototype.dolly=function(t){throw Error(lP)},t.prototype.createLandmark=function(t,e){throw Error(lP)},t.prototype.gotoLandmark=function(t,e){throw Error(lP)},t.prototype.cancelLandmarkAnimation=function(){throw Error(lP)},t}();function lC(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return n.cache=a.set(o,l)||a,l};return n.cache=new(lC.Cache||Map),n}lC.Cache=Map,(PY=jp||(jp={}))[PY.kUnknown=0]="kUnknown",PY[PY.kNumber=1]="kNumber",PY[PY.kPercentage=2]="kPercentage",PY[PY.kEms=3]="kEms",PY[PY.kPixels=4]="kPixels",PY[PY.kRems=5]="kRems",PY[PY.kDegrees=6]="kDegrees",PY[PY.kRadians=7]="kRadians",PY[PY.kGradians=8]="kGradians",PY[PY.kTurns=9]="kTurns",PY[PY.kMilliseconds=10]="kMilliseconds",PY[PY.kSeconds=11]="kSeconds",PY[PY.kInteger=12]="kInteger",(PX=jh||(jh={}))[PX.kUNumber=0]="kUNumber",PX[PX.kUPercent=1]="kUPercent",PX[PX.kULength=2]="kULength",PX[PX.kUAngle=3]="kUAngle",PX[PX.kUTime=4]="kUTime",PX[PX.kUOther=5]="kUOther",(PK=jd||(jd={}))[PK.kAll=0]="kAll",PK[PK.kNonNegative=1]="kNonNegative",PK[PK.kInteger=2]="kInteger",PK[PK.kNonNegativeInteger=3]="kNonNegativeInteger",PK[PK.kPositiveInteger=4]="kPositiveInteger",(PZ=jy||(jy={}))[PZ.kYes=0]="kYes",PZ[PZ.kNo=1]="kNo",(PQ=jg||(jg={}))[PQ.kYes=0]="kYes",PQ[PQ.kNo=1]="kNo";var lN=[{name:"em",unit_type:jp.kEms},{name:"px",unit_type:jp.kPixels},{name:"deg",unit_type:jp.kDegrees},{name:"rad",unit_type:jp.kRadians},{name:"grad",unit_type:jp.kGradians},{name:"ms",unit_type:jp.kMilliseconds},{name:"s",unit_type:jp.kSeconds},{name:"rem",unit_type:jp.kRems},{name:"turn",unit_type:jp.kTurns}];(PJ=jm||(jm={}))[PJ.kUnknownType=0]="kUnknownType",PJ[PJ.kUnparsedType=1]="kUnparsedType",PJ[PJ.kKeywordType=2]="kKeywordType",PJ[PJ.kUnitType=3]="kUnitType",PJ[PJ.kSumType=4]="kSumType",PJ[PJ.kProductType=5]="kProductType",PJ[PJ.kNegateType=6]="kNegateType",PJ[PJ.kInvertType=7]="kInvertType",PJ[PJ.kMinType=8]="kMinType",PJ[PJ.kMaxType=9]="kMaxType",PJ[PJ.kClampType=10]="kClampType",PJ[PJ.kTransformType=11]="kTransformType",PJ[PJ.kPositionType=12]="kPositionType",PJ[PJ.kURLImageType=13]="kURLImageType",PJ[PJ.kColorType=14]="kColorType",PJ[PJ.kUnsupportedColorType=15]="kUnsupportedColorType";var lL=function(t){return t?"number"===t?jp.kNumber:"percent"===t||"%"===t?jp.kPercentage:lN.find(function(e){return e.name===t}).unit_type:jp.kUnknown},lI=function(t){switch(t){case jp.kNumber:case jp.kInteger:return jh.kUNumber;case jp.kPercentage:return jh.kUPercent;case jp.kPixels:return jh.kULength;case jp.kMilliseconds:case jp.kSeconds:return jh.kUTime;case jp.kDegrees:case jp.kRadians:case jp.kGradians:case jp.kTurns:return jh.kUAngle;default:return jh.kUOther}},lR=function(t){switch(t){case jh.kUNumber:return jp.kNumber;case jh.kULength:return jp.kPixels;case jh.kUPercent:return jp.kPercentage;case jh.kUTime:return jp.kSeconds;case jh.kUAngle:return jp.kDegrees;default:return jp.kUnknown}},lD=function(t){var e=1;switch(t){case jp.kPixels:case jp.kDegrees:case jp.kSeconds:break;case jp.kMilliseconds:e=.001;break;case jp.kRadians:e=180/Math.PI;break;case jp.kGradians:e=.9;break;case jp.kTurns:e=360}return e},lF=function(t){switch(t){case jp.kNumber:case jp.kInteger:break;case jp.kPercentage:return"%";case jp.kEms:return"em";case jp.kRems:return"rem";case jp.kPixels:return"px";case jp.kDegrees:return"deg";case jp.kRadians:return"rad";case jp.kGradians:return"grad";case jp.kMilliseconds:return"ms";case jp.kSeconds:return"s";case jp.kTurns:return"turn"}return""},lB=function(){function t(){}return t.isAngle=function(t){return t===jp.kDegrees||t===jp.kRadians||t===jp.kGradians||t===jp.kTurns},t.isLength=function(t){return t>=jp.kEms&&t<jp.kDegrees},t.isRelativeUnit=function(t){return t===jp.kPercentage||t===jp.kEms||t===jp.kRems},t.isTime=function(t){return t===jp.kSeconds||t===jp.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(jy.kNo,jg.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=jm.kUnitType&&this.getType()<=jm.kClampType},t}(),lz=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return tB(e,t),e.prototype.getType=function(){return jm.kColorType},e.prototype.to=function(t){return this},e}(lB);(P0=jv||(jv={}))[P0.Constant=0]="Constant",P0[P0.LinearGradient=1]="LinearGradient",P0[P0.RadialGradient=2]="RadialGradient";var lW=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return tB(e,t),e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(t,e,n){return n},e.prototype.getType=function(){return jm.kColorType},e}(lB),l$=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return tB(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return jm.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(lB),lG=lC(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),lH=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function lV(t){return"function"==typeof t}var lU={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},lq=lC(function(t){var e=lG(t),n=lU[e];return(null==n?void 0:n.alias)||e}),lY=function(t,e){void 0===e&&(e="");var n="";if(Number.isFinite(t)){if(!Number.isNaN(t))throw Error();n="NaN"}else n=t>0?"infinity":"-infinity";return n+e},lX=function(t){return lR(lI(t))},lK=function(t){function e(e,n){void 0===n&&(n=jp.kNumber);var r,i=t.call(this)||this;return i.unit="string"==typeof n?lL(n):n,i.value=e,i}return tB(e,t),e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.equals=function(t){return this.value===t.value&&this.unit===t.unit},e.prototype.getType=function(){return jm.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=lX(this.unit);if(n!==lX(t)||n===jp.kUnknown)return null;var r=lD(this.unit)/lD(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case jp.kUnknown:break;case jp.kInteger:r=Number(this.value).toFixed(0);break;case jp.kNumber:case jp.kPercentage:case jp.kEms:case jp.kRems:case jp.kPixels:case jp.kDegrees:case jp.kRadians:case jp.kGradians:case jp.kMilliseconds:case jp.kSeconds:case jp.kTurns:var i=this.value,o=lF(this.unit);if(i<-999999||i>999999){var a=lF(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?lY(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+r},e}(lB),lZ=new lK(0,"px");new lK(1,"px");var lQ=new lK(0,"deg"),lJ=function(t){function e(e,n,r,i,o){void 0===i&&(i=1),void 0===o&&(o=!1);var a=t.call(this,"rgb")||this;return a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}return tB(e,t),e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(lz),l0=new l$("unset"),l1={"":l0,unset:l0,initial:new l$("initial"),inherit:new l$("inherit")},l2=function(t){return l1[t]||(l1[t]=new l$(t)),l1[t]},l5=new lJ(0,0,0,0,!0),l3=new lJ(0,0,0,0),l4=lC(function(t,e,n,r){return new lJ(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),l6=function(t,e){return void 0===e&&(e=jp.kNumber),new lK(t,e)},l8=new lK(50,"%");(P1=jb||(jb={}))[P1.Standard=0]="Standard",(P2=jx||(jx={}))[P2.ADDED=0]="ADDED",P2[P2.REMOVED=1]="REMOVED",P2[P2.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var l9={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new l_(0,0,0,0)};(P5=jO||(jO={})).COORDINATE="<coordinate>",P5.COLOR="<color>",P5.PAINT="<paint>",P5.NUMBER="<number>",P5.ANGLE="<angle>",P5.OPACITY_VALUE="<opacity-value>",P5.SHADOW_BLUR="<shadow-blur>",P5.LENGTH="<length>",P5.PERCENTAGE="<percentage>",P5.LENGTH_PERCENTAGE="<length> | <percentage>",P5.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",P5.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",P5.LIST_OF_POINTS="<list-of-points>",P5.PATH="<path>",P5.FILTER="<filter>",P5.Z_INDEX="<z-index>",P5.OFFSET_DISTANCE="<offset-distance>",P5.DEFINED_PATH="<defined-path>",P5.MARKER="<marker>",P5.TRANSFORM="<transform>",P5.TRANSFORM_ORIGIN="<transform-origin>",P5.TEXT="<text>",P5.TEXT_TRANSFORM="<text-transform>";var l7=function(){var t={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function n(t){throw Error(e+": "+t)}function r(){return i("linear-gradient",t.linearGradient,a)||i("repeating-linear-gradient",t.repeatingLinearGradient,a)||i("radial-gradient",t.radialGradient,l)||i("repeating-radial-gradient",t.repeatingRadialGradient,l)||i("conic-gradient",t.conicGradient,l)}function i(e,r,i){return o(r,function(r){var o=i();return o&&!b(t.comma)&&n("Missing comma before color stops"),{type:e,orientation:o,colorStops:p(h)}})}function o(e,r){var i=b(e);if(i){b(t.startCall)||n("Missing (");var o=r(i);return b(t.endCall)||n("Missing )"),o}}function a(){return v("directional",t.sideOrCorner,1)||v("angular",t.angleValue,1)}function l(){var n,r,i=s();return i&&((n=[]).push(i),r=e,b(t.comma)&&((i=s())?n.push(i):e=r)),n}function s(){var t,e,n=((t=v("shape",/^(circle)/i,0))&&(t.style=g()||u()),t||((e=v("shape",/^(ellipse)/i,0))&&(e.style=y()||u()),e));if(n)n.at=c();else{var r=u();if(r){n=r;var i=c();i&&(n.at=i)}else{var o=f();o&&(n={type:"default-radial",at:o})}}return n}function u(){return v("extent-keyword",t.extentKeywords,1)}function c(){if(v("position",/^at/,0)){var t=f();return t||n("Missing positioning value"),t}}function f(){var t={x:y(),y:y()};if(t.x||t.y)return{type:"position",value:t}}function p(e){var r=e(),i=[];if(r)for(i.push(r);b(t.comma);)(r=e())?i.push(r):n("One extra comma");return i}function h(){var e=v("hex",t.hexColor,1)||o(t.rgbaColor,function(){return{type:"rgba",value:p(d)}})||o(t.rgbColor,function(){return{type:"rgb",value:p(d)}})||v("literal",t.literalColor,0);return e||n("Expected color definition"),e.length=y(),e}function d(){return b(t.number)[1]}function y(){return v("%",t.percentageValue,1)||v("position-keyword",t.positionKeywords,1)||g()}function g(){return v("px",t.pixelValue,1)||v("em",t.emValue,1)}function v(t,e,n){var r=b(e);if(r)return{type:t,value:r[n]}}function b(t){var n=/^[\n\r\t\s]+/.exec(e);n&&x(n[0].length);var r=t.exec(e);return r&&x(r[0].length),r}function x(t){e=e.substring(t)}return function(t){var i;return e=t,i=p(r),e.length>0&&n("Invalid input not EOF"),i}}(),st=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,se=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,sn=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,sr=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,si={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},so=lC(function(t){var e;return l6("angular"===t.type?Number(t.value):si[t.value]||0,"deg")}),sa=lC(function(t){var e=50,n=50,r="%",i="%";if((null==t?void 0:t.type)==="position"){var o=t.value,a=o.x,l=o.y;(null==a?void 0:a.type)==="position-keyword"&&("left"===a.value?e=0:"center"===a.value?e=50:"right"===a.value?e=100:"top"===a.value?n=0:"bottom"===a.value&&(n=100)),(null==l?void 0:l.type)==="position-keyword"&&("left"===l.value?e=0:"center"===l.value?n=50:"right"===l.value?e=100:"top"===l.value?n=0:"bottom"===l.value&&(n=100)),((null==a?void 0:a.type)==="px"||(null==a?void 0:a.type)==="%"||(null==a?void 0:a.type)==="em")&&(r=null==a?void 0:a.type,e=Number(a.value)),((null==l?void 0:l.type)==="px"||(null==l?void 0:l.type)==="%"||(null==l?void 0:l.type)==="em")&&(i=null==l?void 0:l.type,n=Number(l.value))}return{cx:l6(e,r),cy:l6(n,i)}}),sl=lC(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return l7(t).map(function(t){var e=t.type,n=t.orientation,r=t.colorStops;!function(t){var e,n,r,i=t.length;t[i-1].length=null!=(e=t[i-1].length)?e:{type:"%",value:"100"},i>1&&(t[0].length=null!=(n=t[0].length)?n:{type:"%",value:"0"});for(var o=0,a=Number(t[0].length.value),l=1;l<i;l++){var s=null==(r=t[l].length)?void 0:r.value;if(!at(s)&&!at(a)){for(var u=1;u<l-o;u++)t[o+u].length={type:"%",value:"".concat(a+(Number(s)-a)*u/(l-o))};o=l,a=Number(s)}}}(r);var i=r.map(function(t){var e,n,r;return{offset:l6(Number(t.length.value),"%"),color:(n=(e=t).type,r=e.value,"hex"===n?"#".concat(r):"literal"===n?r:"rgb"===n?"rgb(".concat(r.join(","),")"):"rgba(".concat(r.join(","),")"))}});if("linear-gradient"===e)return new lW(jv.LinearGradient,{angle:n?so(n):lQ,steps:i});if("radial-gradient"===e&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=sa(n[0].at),a=o.cx,l=o.cy,s=void 0;if(n[0].style){var u=n[0].style,c=u.type,f=u.value;s="extent-keyword"===c?l2(f):l6(f,c)}return new lW(jv.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=st.exec(t);if(r){var i=(null==(e=r[2].match(sr))?void 0:e.map(function(t){return t.split(":")}))||[];return[new lW(jv.LinearGradient,{angle:l6(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=tV(t,2),n=e[0],r=e[1];return{offset:l6(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=se.exec(t);if(n){var r=(null==(e=n[4].match(sr))?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:l6(50,"%"),cy:l6(50,"%"),steps:r.map(function(t){var e=tV(t,2),n=e[0],r=e[1];return{offset:l6(100*Number(n),"%"),color:r}})}}return null}(t);if(o)if(!ae(o))return[new lW(jv.RadialGradient,o)];else t=o}else if("p"===n){var a=t,l=sn.exec(a);if(l){var s=l[1],u=l[2];switch(s){case"a":s="repeat";break;case"x":s="repeat-x";break;case"y":s="repeat-y";break;default:s="no-repeat"}return{image:u,repetition:s}}return null}}});function ss(t){return t&&!!t.image}function su(t){return t&&!at(t.r)&&!at(t.g)&&!at(t.b)}var sc=lC(function(t){if(ss(t))return tz({repetition:"repeat"},t);if(at(t)&&(t=""),"transparent"===t)return l3;"currentColor"===t&&(t="black");var e=sl(t);if(e)return e;var n=aU(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),l4.apply(void 0,tq([],tV(r),!1))});function sf(t,e){if(su(t)&&su(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(an(e[n],0,255));return e[3]=an(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function sp(t,e){if(at(e))return l6(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return l6(Number(e),"px");else if("deg".search(t)>=0)return l6(Number(e),"deg")}var n=[];e=e.replace(t,function(t){return n.push(t),"U"+t});var r="U("+t.source+")";return n.map(function(t){return l6(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var sh=function(t){return sp(/px/g,t)},sd=lC(sh);lC(function(t){return sp(RegExp("%","g"),t)});var sy=function(t){return o9(t)||isFinite(Number(t))?l6(Number(t)||0,"px"):sp(RegExp("px|%|em|rem","g"),t)},sg=lC(sy),sm=function(t){return sp(RegExp("deg|rad|grad|turn","g"),t)},sv=lC(sm);function sb(t){var e=0;return t.unit===jp.kDegrees?e=t.value:t.unit===jp.kRadians?e=ld(Number(t.value)):t.unit===jp.kTurns&&(e=360*Number(t.value)),e}function sx(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):ae(t)?n=t.split(" ").map(function(t){return Number(t)}):o9(t)&&(n=[t]),2===e)if(1===n.length)return[n[0],n[0]];else return[n[0],n[1]];return 1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]}function sO(t){return ae(t)?t.split(" ").map(function(t){return sg(t)}):t.map(function(t){return sg(t.toString())})}function sw(t,e,n){if(0===t.value)return 0;if(t.unit===jp.kPixels)return Number(t.value);if(t.unit===jp.kPercentage&&n){var r=n.nodeName===ja.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var sE=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function sk(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;)if(i=e.index+e[0].length,sE.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return sp(/deg|rad|grad|turn|px|%/g,t)||sc(t)})}),n.lastIndex===t.length)return r;return[]}function sM(t){return t.toString()}var sS=function(t){return"number"==typeof t?l6(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?l6(Number(t)):l6(0)},s_=lC(sS);function sP(t,e){return[t,e,sM]}function sj(t,e){return function(n,r){return[n,r,function(n){return sM(an(n,t,e))}]}}function sA(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function sT(t){return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=am(t.parsedStyle.path.absolutePath,void 0,tz(tz({},void 0),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function sC(t,e){return t[0]===e[0]&&t[1]===e[1]}function sN(t,e){var n,r=t.prePoint,i=t.currentPoint,o=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),l=Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2),s=Math.acos((a+l-(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))/(2*Math.sqrt(a)*Math.sqrt(l)));if(!s||0===Math.sin(s)||(void 0===n&&(n=1e-5),Math.abs(s-0)<n))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(o[1]-i[1],o[0]-i[0])),c=Math.abs(Math.atan2(o[0]-i[0],o[1]-i[1]));return{xExtra:e/2*(1/Math.sin(s/2))*Math.cos(s/2-(u=u>Math.PI/2?Math.PI-u:u))-e/2||0,yExtra:e/2*(1/Math.sin(s/2))*Math.cos((c=c>Math.PI/2?Math.PI-c:c)-s/2)-e/2||0}}function sL(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}lC(function(t){return ae(t)?t.split(" ").map(s_):t.map(s_)});var sI=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)},sR=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s=lh(r=aO(r,360));if(t.x===a.x&&t.y===a.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(0===e||0===n)return{x:0,y:0,ellipticalArcAngle:0};var u=(t.x-a.x)/2,c=(t.y-a.y)/2,f={x:Math.cos(s)*u+Math.sin(s)*c,y:-Math.sin(s)*u+Math.cos(s)*c},p=Math.pow(f.x,2)/Math.pow(e,2)+Math.pow(f.y,2)/Math.pow(n,2);p>1&&(e=Math.sqrt(p)*e,n=Math.sqrt(p)*n);var h=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2))/(Math.pow(e,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2)),d=(i!==o?1:-1)*Math.sqrt(h=h<0?0:h),y={x:d*(e*f.y/n),y:d*(-(n*f.x)/e)},g={x:Math.cos(s)*y.x-Math.sin(s)*y.y+(t.x+a.x)/2,y:Math.sin(s)*y.x+Math.cos(s)*y.y+(t.y+a.y)/2},v={x:(f.x-y.x)/e,y:(f.y-y.y)/n},b=sI({x:1,y:0},v),x=sI(v,{x:(-f.x-y.x)/e,y:(-f.y-y.y)/n});!o&&x>0?x-=2*Math.PI:o&&x<0&&(x+=2*Math.PI);var O=b+(x%=2*Math.PI)*l,w=e*Math.cos(O),E=n*Math.sin(O);return{x:Math.cos(s)*w-Math.sin(s)*E+g.x,y:Math.sin(s)*w+Math.cos(s)*E+g.y,ellipticalArcStartAngle:b,ellipticalArcEndAngle:b+x,ellipticalArcAngle:O,ellipticalArcCenter:g,resultantRx:e,resultantRy:n}};function sD(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,o=void 0===i?0:i,a=r.ry,l=void 0===a?0:a,s=r.xRotation,u=r.arcFlag,c=r.sweepFlag,f=sR({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=sR({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),h=p.x-f.x,d=p.y-f.y,y=Math.sqrt(h*h+d*d);return{x:-h/y,y:-d/y}}function sF(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function sB(t,e){return sF(t)*sF(e)?(t[0]*e[0]+t[1]*e[1])/(sF(t)*sF(e)):1}function sz(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(sB(t,e))}function sW(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,l=n-t,s=n+t,u=r-e,c=r+e;return[["M",l,r],["C",l,r-a,n-o,u,n,u],["C",n+o,u,s,r-a,s,r],["C",s,r+a,n+o,c,n,c],["C",n-o,c,l,r+a,l,r],["Z"]]}function s$(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p=[];switch(t.nodeName){case ja.LINE:var h=t.parsedStyle,d=h.x1,y=h.y1,g=h.x2,v=h.y2;p=[["M",void 0===d?0:d,void 0===y?0:y],["L",void 0===g?0:g,void 0===v?0:v]];break;case ja.CIRCLE:var b=t.parsedStyle,x=b.r,O=void 0===x?0:x,w=b.cx,E=void 0===w?0:w,k=b.cy,M=void 0===k?0:k;p=sW(O,O,E,M);break;case ja.ELLIPSE:var S=t.parsedStyle,_=S.rx,P=S.ry,j=S.cx,E=void 0===j?0:j,A=S.cy,M=void 0===A?0:A;p=sW(void 0===_?0:_,void 0===P?0:P,E,M);break;case ja.POLYLINE:case ja.POLYGON:n=t.parsedStyle.points.points,r=t.nodeName===ja.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),p=i;break;case ja.RECT:var T=t.parsedStyle,C=T.width,N=void 0===C?0:C,L=T.height,I=void 0===L?0:L,R=T.x,D=T.y,F=T.radius;p=function(t,e,n,r,i){if(i){var o=tV(i,4),a=o[0],l=o[1],s=o[2],u=o[3],c=t>0?1:-1,f=e>0?1:-1,p=+(c+f!==0);return[["M",c*a+n,r],["L",t-c*l+n,r],l?["A",l,l,0,0,p,t+n,f*l+r]:null,["L",t+n,e-f*s+r],s?["A",s,s,0,0,p,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,p,n,e+r-f*u]:null,["L",n,f*a+r],a?["A",a,a,0,0,p,c*a+n,r]:null,["Z"]].filter(function(t){return t})}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(N,I,void 0===R?0:R,void 0===D?0:D,F&&F.some(function(t){return 0!==t})&&F.map(function(t){return an(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case ja.PATH:p=tq([],tV(t.parsedStyle.path.absolutePath),!1)}if(p.length)return o=p,a=e,u=void 0===(s=(l=t.parsedStyle).defX)?0:s,f=void 0===(c=l.defY)?0:c,o.reduce(function(t,e){var n="";if("M"===e[0]||"L"===e[0]){var r=iK(e[1]-u,e[2]-f,0);a&&i4(r,r,a),n="".concat(e[0]).concat(r[0],",").concat(r[1])}else if("Z"===e[0])n=e[0];else if("C"===e[0]){var i=iK(e[1]-u,e[2]-f,0),o=iK(e[3]-u,e[4]-f,0),l=iK(e[5]-u,e[6]-f,0);a&&(i4(i,i,a),i4(o,o,a),i4(l,l,a)),n="".concat(e[0]).concat(i[0],",").concat(i[1],",").concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1])}else if("A"===e[0]){var s=iK(e[6]-u,e[7]-f,0);a&&i4(s,s,a),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],",").concat(e[5],",").concat(s[0],",").concat(s[1])}else if("Q"===e[0]){var i=iK(e[1]-u,e[2]-f,0),o=iK(e[3]-u,e[4]-f,0);a&&(i4(i,i,a),i4(o,o,a)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}var sG=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};try{e=ap(t)}catch(n){e=ap(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}!function(t){for(var e=0;e<t.length;e++){var n=t[e-1],r=t[e];if("M"===r[0]&&n){var i=n[0],o=[r[1],r[2]],a=void 0;"L"===i||"M"===i?a=[n[1],n[2]]:("C"===i||"A"===i||"Q"===i)&&(a=[n[n.length-2],n[n.length-1]]),a&&sC(o,a)&&(t.splice(e,1),e--)}}}(e);var e,n=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}(e),i=r.polygons,o=r.polylines,a=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=t.length,l=0;l<a;l++){var s=t[l];r=t[l+1];var u=s[0],c={command:u,prePoint:n,params:s,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[s[1],s[2]],o=l;break;case"A":c.arcParams=function(t,e){var n=e[1],r=e[2],i=aO(lh(e[3]),2*Math.PI),o=e[4],a=e[5],l=t[0],s=t[1],u=e[6],c=e[7],f=Math.cos(i)*(l-u)/2+Math.sin(i)*(s-c)/2,p=-1*Math.sin(i)*(l-u)/2+Math.cos(i)*(s-c)/2,h=f*f/(n*n)+p*p/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var d=n*n*(p*p)+r*r*(f*f),y=d?Math.sqrt((n*n*(r*r)-d)/d):1;o===a&&(y*=-1),isNaN(y)&&(y=0);var g=r?y*n*p/r:0,v=n?-(y*r)*f/n:0,b=(l+u)/2+Math.cos(i)*g-Math.sin(i)*v,x=(s+c)/2+Math.sin(i)*g+Math.cos(i)*v,O=[(f-g)/n,(p-v)/r],w=[(-1*f-g)/n,(-1*p-v)/r],E=sz([1,0],O),k=sz(O,w);return -1>=sB(O,w)&&(k=Math.PI),sB(O,w)>=1&&(k=0),0===a&&k>0&&(k-=2*Math.PI),1===a&&k<0&&(k+=2*Math.PI),{cx:b,cy:x,rx:sC(t,[u,c])?0:n,ry:sC(t,[u,c])?0:r,startAngle:E,endAngle:E+k,xRotation:i,arcFlag:o,sweepFlag:a}}(n,s)}if("Z"===u)n=i,r=t[o+1];else{var f=s.length;n=[s[f-2],s[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),c.currentPoint=n,e[o]&&sC(n,e[o].currentPoint)&&(e[o].prePoint=c.prePoint),c.nextPoint=r?[r[r.length-2],r[r.length-1]]:null;var p=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]];else if("Q"===u){var h=[s[1],s[2]];c.startTangent=[p[0]-h[0],p[1]-h[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]]}else if("T"===u){var d=e[l-1],h=sL(d.currentPoint,p);"Q"===d.command?(c.command="Q",c.startTangent=[p[0]-h[0],p[1]-h[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]]):(c.command="TL",c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]])}else if("C"===u){var y=[s[1],s[2]],g=[s[3],s[4]];c.startTangent=[p[0]-y[0],p[1]-y[1]],c.endTangent=[n[0]-g[0],n[1]-g[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[y[0]-g[0],y[1]-g[1]]),0===c.endTangent[0]&&0===c.endTangent[1]&&(c.endTangent=[g[0]-y[0],g[1]-y[1]])}else if("S"===u){var d=e[l-1],y=sL(d.currentPoint,p),g=[s[1],s[2]];"C"===d.command?(c.command="C",c.startTangent=[p[0]-y[0],p[1]-y[1]]):(c.command="SQ",c.startTangent=[p[0]-g[0],p[1]-g[1]]),c.endTangent=[n[0]-g[0],n[1]-g[1]]}else if("A"===u){var v=sD(c,0),b=v.x,x=v.y,O=sD(c,1,!1),w=O.x,E=O.y;c.startTangent=[b,x],c.endTangent=[w,E]}e.push(c)}return e}(e),l=function(t,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=t[o],l=a.currentPoint,s=a.params,u=a.prePoint,c=void 0;switch(a.command){case"Q":c=function(t,e,n,r,i,o){var a=ln(t,n,i)[0],l=ln(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(le(t,n,i,a)),void 0!==l&&u.push(le(e,r,o,l)),a4(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4]);break;case"C":c=function(t,e,n,r,i,o,a,l){for(var s=[t,a],u=[e,l],c=a7(t,n,i,a),f=a7(e,r,o,l),p=0;p<c.length;p++)s.push(a9(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(a9(e,r,o,l,f[p]));return a4(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var f=a.arcParams;c=function(t,e,n,r,i,o,a){for(var l=Math.atan(-r/n*Math.tan(i)),s=1/0,u=-1/0,c=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var p=l+f;o<a?o<p&&p<a&&c.push(p):a<p&&p<o&&c.push(p)}for(var f=0;f<c.length;f++){var h,d=n*Math.cos(i)*Math.cos(h=c[f])-r*Math.sin(i)*Math.sin(h)+t;d<s&&(s=d),d>u&&(u=d)}for(var y=Math.atan(r/(n*Math.tan(i))),g=1/0,v=-1/0,b=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var x=y+f;o<a?o<x&&x<a&&b.push(x):a<x&&x<o&&b.push(x)}for(var f=0;f<b.length;f++){var O,w=n*Math.sin(i)*Math.cos(O=b[f])+r*Math.cos(i)*Math.sin(O)+e;w<g&&(g=w),w>v&&(v=w)}return{x:s,y:g,width:u-s,height:v-g}}(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(l[0]),r.push(l[1])}c&&(a.box=c,n.push(c.x,c.x+c.width),r.push(c.y,c.y+c.height))}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var p=ab(n),h=ab(r),d=ax(n),y=ax(r);if(0===i.length)return{x:p,y:h,width:d-p,height:y-h};for(var o=0;o<i.length;o++){var a=i[o],l=a.currentPoint,g=void 0;l[0]===p?p-=sN(a,0).xExtra:l[0]===d&&(d+=sN(a,e).xExtra),l[1]===h?h-=sN(a,e).yExtra:l[1]===y&&(y+=sN(a,e).yExtra)}return{x:p,y:h,width:d-p,height:y-h}}(a,0),s=l.x,u=l.y,c=l.width,f=l.height;return{absolutePath:e,hasArc:n,segments:a,polygons:i,polylines:o,totalLength:0,rect:{x:Number.isFinite(s)?s:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(c)?c:0,height:Number.isFinite(f)?f:0}}},sH=lC(sG);function sV(t){return ae(t)?sH(t):sG(t)}function sU(t,e,n){var r,i,o,a,l,s,u,c,f,p,h=t.curve,d=e.curve;h&&0!==h.length||(h=ak(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=ak(e.absolutePath,!1),e.curve=d);var y=[h,d];h.length!==d.length&&(y=function t(e,n,r){var i=aM(e),o=aM(n),a=i.length,l=o.length,s=i.filter(function(t){return t.l}).length,u=o.filter(function(t){return t.l}).length,c=i.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,f=o.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/u||0,p=r||Math.max(a,l),h=[c,f],d=[p-a,p-l],y=0,g=[i,o].map(function(t,e){return t.l===p?t.map(function(t){return t.s}):t.map(function(t,n){return y=n&&d[e]&&t.l>=h[e],d[e]-=+!!y,y?t.ss:[t.s]}).flat()});return g[0].length===g[1].length?g:t(g[0],g[1],p)}(h,d));var g=aS(y[0])!==aS(y[1])?[["M"].concat((i=(r=y[0]).slice(1).map(function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):r[0].slice(1).concat(t.slice(1))}).map(function(t){return t.map(function(e,n){return t[t.length-n-2*(1-n%2)]})}).reverse())[0].slice(0,2))].concat(i.map(function(t){return["C"].concat(t.slice(2))})):y[0].map(function(t){return Array.isArray(t)?[].concat(t):t});return[g,(o=y[1],a=o.length-1,l=[],u=0,(f=(c=o.length)-1,p=o.map(function(t,e){return o.map(function(t,n){var r=e+n;return 0===n||o[r]&&"M"===o[r][0]?["M"].concat(o[r].slice(-2)):(r>=c&&(r-=f),o[r])})})).forEach(function(t,e){o.slice(1).forEach(function(t,n){u+=o7(o[(e+n)%a].slice(-2),g[n%a].slice(-2))}),l[e]=u,u=0}),p[l.indexOf(Math.min.apply(null,l))]),function(t){return t}]}function sq(t,e){var n,r,i=ae(t)?t.split(" ").map(function(t){var e=tV(t.split(","),2),n=e[0],r=e[1];return[Number(n),Number(r)]}):t,o=[],a=0,l=function(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=a3(r[0],r[1],i[0],i[1])}return e}(i);i.forEach(function(t,e){if(i[e+1]){var s,u;(n=[0,0])[0]=a/l,s=t[0],u=t[1],r=a3(s,u,i[e+1][0],i[e+1][1]),a+=r,n[1]=a/l,o.push(n)}});var s=Math.min.apply(Math,tq([],tV(i.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,tq([],tV(i.map(function(t){return t[1]})),!1));return e&&(e.parsedStyle.defX=s,e.parsedStyle.defY=u),{points:i,totalLength:l,segments:o}}function sY(t,e){return[t.points,e.points,function(t){return t}]}function sX(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function sK(t){return t}var sZ={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],sK],matrix3d:["NNNNNNNNNNNNNNNN",sK],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",sX([null,null,new lK(1)]),sK],scalex:["N",sX([null,new lK(1),new lK(1)]),sX([null,new lK(1)])],scaley:["N",sX([new lK(1),null,new lK(1)]),sX([new lK(1),null])],scalez:["N",sX([new lK(1),new lK(1),null])],scale3d:["NNN",sK],skew:["Aa",null,sK],skewx:["A",null,sX([null,lQ])],skewy:["A",null,sX([lQ,null])],translate:["Tt",sX([null,null,lZ]),sK],translatex:["T",sX([null,lZ,lZ]),sX([null,lZ])],translatey:["T",sX([lZ,null,lZ]),sX([lZ,null])],translatez:["L",sX([lZ,lZ,null])],translate3d:["TTL",sK]};function sQ(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){i=e.index+e[0].length;var o=e[1],a=sZ[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?lQ:sv(t)},N:s_,T:sg,L:sd})[p.toUpperCase()](f):({a:lQ,n:u[0],t:lZ})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function sJ(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){i=e.index+e[0].length;var o=e[1],a=sZ[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?lQ:sm(t)},N:sS,T:sy,L:sh})[p.toUpperCase()](f):({a:lQ,n:u[0],t:lZ})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function s0(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=lh(sb(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return[Math.cos(i=lh(sb(t.d[0]))),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return[Math.cos(i=lh(sb(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value;var e,n,r,i=lh(sb(t.d[3])),o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var l=Math.sin(i/2),s=l*Math.cos(i/2),u=l*l;return[1-2*(n*n+r*r)*u,2*(e*n*u+r*s),2*(e*r*u-n*s),0,2*(e*n*u-r*s),1-2*(e*e+r*r)*u,2*(n*r*u+e*s),0,2*(e*r*u+n*s),2*(n*r*u-e*s),1-2*(e*e+n*n)*u,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var c=lh(sb(t.d[0]));return[1,Math.tan(lh(sb(t.d[1]))),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return[1,0,0,0,Math.tan(i=lh(sb(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=lh(sb(t.d[0]))),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=sw(t.d[0],0,null)||0,n=sw(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=sw(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=sw(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=sw(t.d[0],0,null)||0,1];case"translate3d":return e=sw(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=sw(t.d[1],0,null)||0,r=sw(t.d[2],0,null)||0,1];case"perspective":var f=sw(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function s1(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function s2(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return!function(t,e,n,r,i,o){if(!(!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0}(lm,t)||(ot(lv,lm),lv[3]=0,lv[7]=0,lv[11]=0,lv[15]=1,1e-8>Math.abs(ol(lv))))){var a,l,s,u,c,f,p,h,d,y,g=lm[3],v=lm[7],b=lm[11],x=lm[12],O=lm[13],w=lm[14],E=lm[15];if(0!==g||0!==v||0!==b){if(lb[0]=g,lb[1]=v,lb[2]=b,lb[3]=E,!oo(lv,lv))return;oi(lv,lv),oZ(i,lb,lv)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=x,e[1]=O,e[2]=w,a=lx,l=lm,a[0][0]=l[0],a[0][1]=l[1],a[0][2]=l[2],a[1][0]=l[4],a[1][1]=l[5],a[1][2]=l[6],a[2][0]=l[8],a[2][1]=l[9],a[2][2]=l[10],n[0]=iX(lx[0]),i2(lx[0],lx[0]),r[0]=i5(lx[0],lx[1]),lw(lx[1],lx[1],lx[0],1,-r[0]),n[1]=iX(lx[1]),i2(lx[1],lx[1]),r[0]/=n[1],r[1]=i5(lx[0],lx[2]),lw(lx[2],lx[2],lx[0],1,-r[1]),r[2]=i5(lx[1],lx[2]),lw(lx[2],lx[2],lx[1],1,-r[2]),n[2]=iX(lx[2]),i2(lx[2],lx[2]),r[1]/=n[2],r[2]/=n[2],s=lx[1],u=lx[2],c=s[0],f=s[1],p=s[2],h=u[0],d=u[1],y=u[2],lO[0]=f*y-p*d,lO[1]=p*h-c*y,lO[2]=c*d-f*h,0>i5(lx[0],lO))for(var k=0;k<3;k++)n[k]*=-1,lx[k][0]*=-1,lx[k][1]*=-1,lx[k][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+lx[0][0]-lx[1][1]-lx[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-lx[0][0]+lx[1][1]-lx[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-lx[0][0]-lx[1][1]+lx[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+lx[0][0]+lx[1][1]+lx[2][2],0)),lx[2][1]>lx[1][2]&&(o[0]=-o[0]),lx[0][2]>lx[2][0]&&(o[1]=-o[1]),lx[1][0]>lx[0][1]&&(o[2]=-o[2])}}(0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(s0).reduce(s1),e,n,r,i,o),[[e,n,r,o,i]]}var s5=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a,l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;s<4;s++)l[s][3]=o[s];for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[3][s]+=e[u]*l[u][s];var c=i[0],f=i[1],p=i[2],h=i[3],d=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];d[0][0]=1-2*(f*f+p*p),d[0][1]=2*(c*f-p*h),d[0][2]=2*(c*p+f*h),d[1][0]=2*(c*f+p*h),d[1][1]=1-2*(c*c+p*p),d[1][2]=2*(f*p-c*h),d[2][0]=2*(c*p-f*h),d[2][1]=2*(f*p+c*h),d[2][2]=1-2*(c*c+f*f),l=t(l,d);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(y[2][1]=r[2],l=t(l,y)),r[1]&&(y[2][1]=0,y[2][0]=r[0],l=t(l,y)),r[0]&&(y[2][0]=0,y[1][0]=r[0],l=t(l,y));for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[s][u]*=n[s];return 0==(a=l)[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}}();function s3(t){return t.toFixed(6).replace(".000000","")}function s4(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=s2(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=s2(e)),null===n[0]||null===r[0])?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e);r=an(r,-1,1);var i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=+Math.sin(n*o)/Math.sqrt(1-r*r),l=0;l<4;l++)i.push(t[l]*(Math.cos(n*o)-r*a)+e[l]*a);return i}(n[0][3],r[0][3],t[5]);return s5(t[0],t[1],t[2],e,t[4]).map(s3).join(",")}])}function s6(t){return t.replace(/[xy]/,"")}function s8(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function s9(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=0;i<t.length;i++)!function(n){var r=t[n],i=r.t,o=r.d,a=+("scale"===i.substring(0,5));e.push({t:i,d:o.map(function(t){return"number"==typeof t?l6(a):l6(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=s4(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]]}else for(var i=0;i<t.length;i++){var u=t[i].t,c=e[i].t,f=t[i].d,p=e[i].d,h=sZ[u],d=sZ[c],y=void 0;if("perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=s4([t[i]],[e[i]]);o.push(s[0]),a.push(s[1]),l.push(["matrix",[s[2]]]);continue}if(u===c)y=u;else if(h[2]&&d[2]&&s6(u)===s6(c))y=s6(u),f=h[2](f),p=d[2](p);else if(h[1]&&d[1]&&s8(u)===s8(c))y=s8(u),f=h[1](f),p=d[1](p);else{var s=s4(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]];break}for(var g=[],v=[],b=[],x=0;x<f.length;x++){var s=function(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,l=e.value||0,s=lX(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=lF(t.unit)):(lK.isLength(t.unit)||lK.isLength(e.unit))&&(a=sw(t,i,n),l=sw(e,i,n),o="px"),[a,l,function(t){return r&&(t=Math.max(t,0)),t+o}]}(f[x],p[x],n,!1,x);g[x]=s[0],v[x]=s[1],b.push(s[2])}o.push(g),a.push(v),l.push([y,b])}if(r){var O=o;o=a,a=O}return[o,a,function(t){return t.map(function(t,e){var n=t.map(function(t,n){return l[e][1][n](t)}).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),l[e][0]+"("+n+")"}).join(" ")}]}var s7=lC(function(t){if(!ae(t))return[l6(t[0]||0,"px"),l6(t[1]||0,"px")];if("text-anchor"===t)return[l6(0,"px"),l6(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[sg(ue(e[0])),sg(ue(e[1]))]}),ut=function(t){if(!ae(t))return[l6(t[0]||0,"px"),l6(t[1]||0,"px")];if("text-anchor"===t)return[l6(0,"px"),l6(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[sy(ue(e[0])),sy(ue(e[1]))]};function ue(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var un=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:jO.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:jO.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:jO.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:jO.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:jO.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:jO.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:jO.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:jO.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:jO.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:jO.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:jO.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:jO.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:jO.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:jO.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:jO.FILTER},{n:"clipPath",syntax:jO.DEFINED_PATH},{n:"textPath",syntax:jO.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:jO.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===ja.CIRCLE||t===ja.ELLIPSE?"center":t===ja.TEXT?"text-anchor":"left top"},l:!0,syntax:jO.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===ja.CIRCLE||t===ja.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:jO.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:jO.COORDINATE},{n:"cy",int:!0,d:"0",syntax:jO.COORDINATE},{n:"cz",int:!0,d:"0",syntax:jO.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:jO.COORDINATE},{n:"y",int:!0,d:"0",syntax:jO.COORDINATE},{n:"z",int:!0,d:"0",syntax:jO.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:jO.COORDINATE},{n:"y1",int:!0,l:!0,syntax:jO.COORDINATE},{n:"z1",int:!0,l:!0,syntax:jO.COORDINATE},{n:"x2",int:!0,l:!0,syntax:jO.COORDINATE},{n:"y2",int:!0,l:!0,syntax:jO.COORDINATE},{n:"z2",int:!0,l:!0,syntax:jO.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:jO.PATH,p:50},{n:"points",int:!0,l:!0,syntax:jO.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:jO.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:jO.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:jO.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:jO.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:jO.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:jO.NUMBER,d:function(t){return t===ja.PATH||t===ja.POLYGON||t===ja.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:jO.MARKER},{n:"markerEnd",syntax:jO.MARKER},{n:"markerMid",syntax:jO.MARKER},{n:"markerStartOffset",syntax:jO.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:jO.LENGTH,l:!0,int:!0,d:"0"}],ur=un.filter(function(t){return!!t.l}).map(function(t){return t.n}),ui={},uo=new WeakMap,ua=function(t,e){var n=uo.get(t);return!n||0===n.length||n.includes(e)},ul=function(){function t(t){var e=this;this.runtime=t,un.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){tq([t.n],tV(t.a||[]),!1).forEach(function(e){ui[e]=t})},t.prototype.unregisterMetadata=function(t){delete ui[t]},t.prototype.getPropertySyntax=function(t){return this.runtime.CSSPropertySyntaxFactory[t]},t.prototype.processProperties=function(t,e,n){var r=this;if(void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0}),!this.runtime.enableCSSParsing){Object.assign(t.attributes,e);var i=Object.keys(e),o=t.parsedStyle.clipPath,a=t.parsedStyle.offsetPath;t.parsedStyle=Object.assign(t.parsedStyle,e);var l=!!n.forceUpdateGeometry;if(!l){for(var s=0;s<ur.length;s++)if(ur[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=sc(e.fill)),e.stroke&&(t.parsedStyle.stroke=sc(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=sc(e.shadowColor)),e.filter&&(t.parsedStyle.filter=sk(e.filter)),at(e.radius)||(t.parsedStyle.radius=sx(e.radius,4)),at(e.lineDash)||(t.parsedStyle.lineDash=sx(e.lineDash,2)),e.points&&(t.parsedStyle.points=sq(e.points,t)),""===e.path&&(t.parsedStyle.path=tz({},l9)),e.path&&(t.parsedStyle.path=sV(e.path),t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y),e.textTransform&&this.runtime.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:e.textTransform},t,null),e.clipPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,e.clipPath,t,this.runtime),e.offsetPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",a,e.offsetPath,t,this.runtime),e.anchor&&(t.parsedStyle.anchor=sx(e.anchor,2)),e.transform&&(t.parsedStyle.transform=sQ(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=s7(e.transformOrigin)),e.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator("",e.markerMid,e.markerMid,null,null)),(t.nodeName!==ja.CIRCLE&&t.nodeName!==ja.ELLIPSE||at(e.cx)&&at(e.cy))&&(t.nodeName!==ja.RECT&&t.nodeName!==ja.IMAGE&&t.nodeName!==ja.GROUP&&t.nodeName!==ja.HTML&&t.nodeName!==ja.TEXT&&t.nodeName!==ja.MESH||at(e.x)&&at(e.y)&&at(e.z))&&(t.nodeName!==ja.LINE||at(e.x1)&&at(e.y1)&&at(e.z1)&&at(e.x2)&&at(e.y2)&&at(e.z2))||this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),at(e.zIndex)||this.runtime.CSSPropertySyntaxFactory["<z-index>"].postProcessor(t,i),e.path&&this.runtime.CSSPropertySyntaxFactory["<path>"].postProcessor(t,i),e.points&&this.runtime.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(t,i),at(e.offsetDistance)||this.runtime.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(t,i),e.transform&&this.runtime.CSSPropertySyntaxFactory["<transform>"].postProcessor(t,i),l&&this.updateGeometry(t);return}var u=n.skipUpdateAttribute,c=n.skipParse,f=n.forceUpdateGeometry,p=n.usedAttributes,h=n.memoize,d=f,y=Object.keys(e);y.forEach(function(n){var r;u||(t.attributes[n]=e[n]),!d&&(null==(r=ui[n])?void 0:r.l)&&(d=!0)}),c||y.forEach(function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t,h)}),(null==p?void 0:p.length)&&(y=Array.from(new Set(y.concat(p)))),y.forEach(function(e){e in t.computedStyle&&(t.parsedStyle[e]=r.computeProperty(e,t.computedStyle[e],t,h))}),d&&this.updateGeometry(t),y.forEach(function(e){e in t.parsedStyle&&r.postProcessProperty(e,t,y)}),this.runtime.enableCSSParsing&&t.children.length&&y.forEach(function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},t.prototype.parseProperty=function(t,e,n,r){var i=ui[t],o=e;if((""===e||at(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=l2(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=l2(e):s&&(!r&&s.parserUnmemoize?o=s.parserUnmemoize(e,n):s.parser&&(o=s.parser(e,n)))}return o},t.prototype.computeProperty=function(t,e,n,r){var i=ui[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof l$){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)at(u)||(e=this.parseProperty(t,lV(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});return at(f)?void this.addUnresolveProperty(n,t):f}}var p=l&&this.getPropertySyntax(l);if(p&&p.calculator){var h=n.parsedStyle[t];a=p.calculator(t,h,e,n,this.runtime)}else a=e instanceof l$?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=ui[t];if(r&&r.syntax){var i=r.syntax&&this.getPropertySyntax(r.syntax);i&&i.postProcessor&&i.postProcessor(e,n)}},t.prototype.addUnresolveProperty=function(t,e){var n=uo.get(t);n||(uo.set(t,[]),n=uo.get(t)),-1===n.indexOf(e)&&n.push(e)},t.prototype.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&ua(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];if("unset"!==r&&"initial"!==r&&"inherit"!==r)return r}},t.prototype.recalc=function(t){var e=uo.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),uo.delete(t)}},t.prototype.updateGeometry=function(t){var e=t.nodeName,n=this.runtime.geometryUpdaterFactory[e];if(n){var r=t.geometry;r.contentBounds||(r.contentBounds=new lE),r.renderBounds||(r.renderBounds=new lE);var i=t.parsedStyle,o=n.update(i,t),a=o.width,l=o.height,s=o.depth,u=o.offsetX,c=o.offsetY,f=o.offsetZ,p=[Math.abs(a)/2,Math.abs(l)/2,(void 0===s?0:s)/2],h=i.stroke,d=i.lineWidth,y=i.increasedLineWidthForHitTesting,g=i.shadowType,v=i.shadowColor,b=i.filter,x=i.transformOrigin,O=i.anchor;e===ja.TEXT?delete i.anchor:e===ja.MESH&&(i.anchor[2]=.5);var w=[(1-2*(O&&O[0]||0))*a/2+(void 0===u?0:u),(1-2*(O&&O[1]||0))*l/2+(void 0===c?0:c),(1-2*(O&&O[2]||0))*p[2]+(void 0===f?0:f)];r.contentBounds.update(w,p);var E=e===ja.POLYLINE||e===ja.POLYGON||e===ja.PATH?Math.SQRT2:.5;if(h&&!h.isNone){var k=((d||0)+(y||0))*E;p[0]+=k,p[1]+=k}if(r.renderBounds.update(w,p),v&&g&&"inner"!==g){var M=r.renderBounds,S=M.min,_=M.max,P=i.shadowBlur,j=i.shadowOffsetX,A=i.shadowOffsetY,T=P||0,C=j||0,N=A||0,L=S[0]-T+C,I=_[0]+T+C,R=S[1]-T+N,D=_[1]+T+N;S[0]=Math.min(S[0],L),_[0]=Math.max(_[0],I),S[1]=Math.min(S[1],R),_[1]=Math.max(_[1],D),r.renderBounds.setMinMax(S,_)}(void 0===b?[]:b).forEach(function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,lu(r.renderBounds.halfExtents,r.renderBounds.halfExtents,[i,i,0]))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,l=n[2].value,s=r.renderBounds,u=s.min,c=s.max,f=u[0]-l+o,p=c[0]+l+o,h=u[1]-l+a,d=c[1]+l+a;u[0]=Math.min(u[0],f),c[0]=Math.max(c[0],p),u[1]=Math.min(u[1],h),c[1]=Math.max(c[1],d),r.renderBounds.setMinMax(u,c)}}),O=i.anchor;var F=a<0,B=l<0,z=(F?-1:1)*(x?sw(x[0],0,t):0),W=(B?-1:1)*(x?sw(x[1],1,t):0);z-=(F?-1:1)*(O&&O[0]||0)*r.contentBounds.halfExtents[0]*2,W-=(B?-1:1)*(O&&O[1]||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(z,W),this.runtime.sceneGraphService.dirtifyToRoot(t)}},t.prototype.updateSizeAttenuation=function(t,e){t.style.isSizeAttenuation?(t.style.rawLineWidth||(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=t.style.rawLineWidth/e,t.nodeName===ja.CIRCLE&&(t.style.rawR||(t.style.rawR=t.style.r),t.style.r=t.style.rawR/e)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===ja.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=ui[t];return!!e&&e.inh},t}(),us=function(){function t(){this.parser=sv,this.parserUnmemoize=sm,this.parserWithCSSDisabled=null,this.mixer=sP}return t.prototype.calculator=function(t,e,n,r){return sb(n)},t}(),uu=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof l$&&(n=null),i.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&i.sceneGraphService.dirtifyToRoot(t)}),n},t}(),uc=function(){function t(){this.parser=sc,this.parserWithCSSDisabled=sc,this.mixer=sf}return t.prototype.calculator=function(t,e,n,r){return n instanceof l$?"none"===n.value?l5:l3:n},t}(),uf=function(){function t(){this.parser=sk}return t.prototype.calculator=function(t,e,n){return n instanceof l$?[]:n},t}();function up(t){var e=t.parsedStyle.fontSize;return at(e)?null:e}var uh=function(){function t(){this.parser=sg,this.parserUnmemoize=sy,this.parserWithCSSDisabled=null,this.mixer=sP}return t.prototype.calculator=function(t,e,n,r,i){if(o9(n))return n;if(!lK.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===jp.kPercentage)return 0;if(n.unit===jp.kEms){if(r.parentNode){var l=up(r.parentNode);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}if(n.unit===jp.kRems){if(null==(o=null==r?void 0:r.ownerDocument)?void 0:o.documentElement){var l=up(r.ownerDocument.documentElement);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),ud=function(){function t(){this.mixer=sA}return t.prototype.parser=function(t){var e,n=sO(o9(t)?[t]:t);return 1===n.length?[n[0],n[0]]:[n[0],n[1]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),uy=function(){function t(){this.mixer=sA}return t.prototype.parser=function(t){var e,n=sO(o9(t)?[t]:t);return 1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),ug=i9();function um(t,e){var n=e.parsedStyle.defX||0,r=e.parsedStyle.defY||0;return e.resetLocalTransform(),e.setLocalPosition(n,r),t.forEach(function(t){var i=t.t,o=t.d;if("scale"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1];e.scaleLocal(a[0],a[1],1)}else if("scalex"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(a[0],1,1)}else if("scaley"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,a[0],1)}else if("scalez"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,1,a[0])}else if("scale3d"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1,1];e.scaleLocal(a[0],a[1],a[2])}else if("translate"===i){var l=o||[lZ,lZ];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[lZ];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[lZ];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[lZ];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[lZ,lZ,lZ];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[lQ];e.rotateLocal(0,0,sb(s[0]))}else if("rotatex"===i){var s=o||[lQ];e.rotateLocal(sb(s[0]),0,0)}else if("rotatey"===i){var s=o||[lQ];e.rotateLocal(0,sb(s[0]),0)}else if("rotatez"===i){var s=o||[lQ];e.rotateLocal(0,0,sb(s[0]))}else if("rotate3d"===i);else if("skew"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0,0];e.setLocalSkew(lh(u[0]),lh(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(lh(u[0]),e.getLocalSkew()[1])}else if("skewy"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(e.getLocalSkew()[0],lh(u[0]))}else if("matrix"===i){var c=tV(o.map(function(t){return t.value}),6),f=c[0],p=c[1],h=c[2],d=c[3],y=c[4],g=c[5];e.setLocalTransform(on(ug,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(on.apply(tv,tq([ug],tV(o.map(function(t){return t.value})),!1)),ug[12]+=n,ug[13]+=r,e.setLocalTransform(ug))}),e.getLocalTransform()}var uv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case ja.CIRCLE:case ja.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;at(a)||(n=a),at(l)||(r=l),at(s)||(i=s);break;case ja.LINE:var u=t.parsedStyle,c=u.x1,f=u.x2,p=Math.min(u.y1,u.y2);n=Math.min(c,f),r=p,i=0;break;case ja.RECT:case ja.IMAGE:case ja.GROUP:case ja.HTML:case ja.TEXT:case ja.MESH:at(t.parsedStyle.x)||(n=t.parsedStyle.x),at(t.parsedStyle.y)||(r=t.parsedStyle.y),at(t.parsedStyle.z)||(i=t.parsedStyle.z)}if(t.nodeName!==ja.PATH&&t.nodeName!==ja.POLYLINE&&t.nodeName!==ja.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!at(n)||!at(r)||!at(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)um(h,t);else{var d=tV(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(at(n)?y:n,at(r)?g:r,at(i)?v:i)}}},e}(uh),ub=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof l$&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),ux=function(){function t(){this.mixer=sP,this.parser=s_,this.parserUnmemoize=sS,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),uO=function(){function t(){this.parser=s_,this.parserUnmemoize=sS,this.parserWithCSSDisabled=null,this.mixer=sj(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.offsetPath,r=e.offsetDistance;if(n){var i=n.nodeName;if(i===ja.LINE||i===ja.PATH||i===ja.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),uw=function(){function t(){this.parser=s_,this.parserUnmemoize=sS,this.parserWithCSSDisabled=null,this.mixer=sj(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),uE=function(){function t(){this.parser=sV,this.parserWithCSSDisabled=sV,this.mixer=sU}return t.prototype.calculator=function(t,e,n){return n instanceof l$&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new l_(0,0,0,0)}:n},t.prototype.postProcessor=function(t,e){if(t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y,t.nodeName===ja.PATH&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(void 0===r?0:r,void 0===i?0:i)}},t}(),uk=function(){function t(){this.parser=sq,this.mixer=sY}return t.prototype.postProcessor=function(t,e){if((t.nodeName===ja.POLYGON||t.nodeName===ja.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),uM=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.mixer=sj(0,1/0),e}return tB(e,t),e}(uh),uS=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof l$)if("unset"===n.value)return"";else return n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),u_=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value},t}(),uP={},uj=0,uA="undefined"!=typeof window&&void 0!==window.document;function uT(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function uC(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n;n=n.parentElement}while(null!==n);return null}function uN(t,e){if(uA)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var uL={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},uI="object"==typeof performance&&performance.now?performance:Date;function uR(t,e,n){var r=!1,i=!1,o=!!e&&!e.isNone,a=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=o,i=a):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:("visible"===t||"all"===t)&&(r=!0,i=!0),[r,i]}var uD=1,uF="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},uB=Date.now(),uz={},uW=Date.now(),u$=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-uW,r=uD++;return uz[r]=t,Object.keys(uz).length>1||setTimeout(function(){uW=e;var t=uz;uz={},Object.keys(t).forEach(function(e){return t[e](uF.performance&&"function"==typeof uF.performance.now?uF.performance.now():Date.now()-uB)})},n>16?0:16-n),r},uG=function(t){return"string"!=typeof t?u$:""===t?uF.requestAnimationFrame:uF[t+"RequestAnimationFrame"]},uH=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],function(t){return!!uG(t)}),uV=uG(uH),uU="string"!=typeof uH?function(t){delete uz[t]}:""===uH?uF.cancelAnimationFrame:uF[uH+"CancelAnimationFrame"]||uF[uH+"CancelRequestAnimationFrame"];uF.requestAnimationFrame=uV,uF.cancelAnimationFrame=uU;var uq=function(){function t(){this.callbacks=[]}return t.prototype.getCallbacksNum=function(){return this.callbacks.length},t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Promise.all(this.callbacks.map(function(e){return e.apply(void 0,tq([],tV(t),!1))}))},t}(),uY=function(){function t(){this.callbacks=[]}return t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t$(this,void 0,void 0,function(){var e,n,r;return tG(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,tq([],tV(t),!1))];case 1:e=i.sent(),n=0,i.label=2;case 2:if(!(n<this.callbacks.length-1))return[3,5];return[4,(0,this.callbacks[n])(e)];case 3:e=i.sent(),i.label=4;case 4:return n++,[3,2];case 5:return[2,e];case 6:return[2,null]}})})},t}(),uX=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){var t=arguments;this.callbacks.forEach(function(e){e.apply(void 0,t)})},t}(),uK=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){if(this.callbacks.length){for(var t=arguments,e=this.callbacks[0].apply(void 0,t),n=0;n<this.callbacks.length-1;n++)e=(0,this.callbacks[n])(e);return e}return null},t}(),uZ=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],uQ=/([\"\'])[^\'\"]+\1/,uJ=function(){function t(){this.parser=sQ,this.parserUnmemoize=sJ,this.parserWithCSSDisabled=sJ,this.mixer=s9}return t.prototype.calculator=function(t,e,n,r){return n instanceof l$?[]:n},t.prototype.postProcessor=function(t){um(t.parsedStyle.transform,t)},t}(),u0=function(){function t(){this.parser=s_,this.parserUnmemoize=sS}return t.prototype.calculator=function(t,e,n,r){return n.value},t.prototype.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0,r.dirtyReason=jx.Z_INDEX_CHANGED)}},t}(),u1=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),u2=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),u5=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.min(n,i);return{width:Math.max(e,r)-o,height:Math.max(n,i)-a}},t}(),u3=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),u4=function(){function t(){}return t.prototype.update=function(t){if(t.points&&av(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,tq([],tV(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,tq([],tV(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,tq([],tV(e.map(function(t){return t[1]})),!1));return{width:r-n,height:Math.max.apply(Math,tq([],tV(e.map(function(t){return t[1]})),!1))-i}}return{width:0,height:0}},t}(),u6=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=void 0===r?0:r,a=void 0===i?0:i;return n&&!ae(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),u8=function(){function t(t){this.globalRuntime=t}return t.prototype.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,l=t.fontWeight,s=t.fontVariant,u=t.lineWidth;return n&&o&&a&&l&&s&&r&&i&&!at(u)},t.prototype.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,l=t.textBaseline,s=t.dx,u=t.dy;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var c=((null==(r=null==(n=null==e?void 0:e.ownerDocument)?void 0:n.defaultView)?void 0:r.getConfig())||{}).offscreenCanvas,f=this.globalRuntime.textService.measureText(i,t,c);t.metrics=f;var p=f.width,h=f.height,d=f.lineHeight,y=f.fontProperties,g=[p/2,h/2,0],v=[0,1],b=0;"center"===o||"middle"===o?(b=a/2,v=[.5,1]):("right"===o||"end"===o)&&(b=a,v=[1,1]);var x=0;return"middle"===l?x=g[1]:"top"===l||"hanging"===l?x=2*g[1]:"alphabetic"===l?x=this.globalRuntime.enableCSSParsing?d-y.ascent:0:("bottom"===l||"ideographic"===l)&&(x=0),s&&(b+=s),u&&(x+=u),t.anchor=[v[0],v[1],0],{width:2*g[0],height:2*g[1],offsetX:b,offsetY:x}},t}(),u9=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new lS,this.page=new lS,this.canvas=new lS,this.viewport=new lS,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t.prototype.clone=function(){throw Error(lP)},t}(),u7=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.client=new lS,e.movement=new lS,e.offset=new lS,e.global=new lS,e.screen=new lS,e}return tB(e,t),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw Error(lP)},e}(u9),ct=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return tB(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw Error("getPredictedEvents is not supported!")},e.prototype.clone=function(){return this.manager.clonePointerEvent(this)},e}(u7),ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(u7),cn=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return tB(e,t),e}(u9),cr=function(){function t(){this.emitter=new iV}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=a_(n)&&n||aP(n)&&n.capture,i=aP(n)&&n.once,o=lV(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=tV(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=lV(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(null==(t=e[0].target)?void 0:t.name)===l&&c.apply(void 0,tq([],tV(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=a_(n)&&n||aP(n)&&n.capture,i=lV(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=lV(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new cn(t,e))},t.prototype.dispatchEvent=function(t,e){var n,r,i;if(void 0===e&&(e=!1),!t.type)throw Error("DisplayObject cannot propagate events outside of the Federated Events API");if(i=this.document?this:this.defaultView?this.defaultView:null==(n=this.ownerDocument)?void 0:n.defaultView){if(t.manager=i.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null==(r=t.manager)||r.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}(),ci=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return tB(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===ja.TEXT&&(n+=this.style.text);try{for(var r=tH(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===ja.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===ja.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return(void 0===t&&(t={}),this.parentNode)?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw Error(lP)},e.prototype.lookupNamespaceURI=function(t){throw Error(lP)},e.prototype.lookupPrefix=function(t){throw Error(lP)},e.prototype.normalize=function(){throw Error(lP)},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(t){if(t===this)return 0;for(var n,r=t,i=this,o=[r],a=[i];null!=(n=r.parentNode)?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var l=o.length>a.length?o:a,s=l===o?a:o;if(l[l.length-s.length]===s[0])return l===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var u=l.length-s.length,c=s.length-1;c>=0;c--){var f=s[c],p=l[u+c];if(p!==f){var h=f.parentNode.childNodes;if(h.indexOf(f)<h.indexOf(p))if(s===o)return e.DOCUMENT_POSITION_PRECEDING;else break;if(l===o)return e.DOCUMENT_POSITION_PRECEDING;break}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t,e){void 0===e&&(e=!1),t(this)||(e?this.childNodes.slice():this.childNodes).forEach(function(e){e.forEach(t)})},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(cr),co=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new iV,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=i9(),this.tmpVec3=iq(),this.onPointerDown=function(t){var e=n.createPointerEvent(t);if(n.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType)n.dispatchEvent(e,"touchstart");else if("mouse"===e.pointerType||"pen"===e.pointerType){var r=2===e.button;n.dispatchEvent(e,r?"rightdown":"mousedown")}n.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),n.freeEvent(e)},this.onPointerUp=function(t){var e,r=uI.now(),i=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);if(n.dispatchEvent(i,"pointerup"),"touch"===i.pointerType)n.dispatchEvent(i,"touchend");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.dispatchEvent(i,o?"rightup":"mouseup")}var a=n.trackingData(t.pointerId),l=n.findMountedTarget(a.pressTargetsByButton[t.button]),s=l;if(l&&!i.composedPath().includes(l)){for(var u=l;u&&!i.composedPath().includes(u);){if(i.currentTarget=u,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType)n.notifyTarget(i,"touchendoutside");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.notifyTarget(i,o?"rightupoutside":"mouseupoutside")}ci.isNode(u)&&(u=u.parentNode)}delete a.pressTargetsByButton[t.button],s=u}if(s){var c=n.clonePointerEvent(i,"click");c.target=s,c.path=[],a.clicksByButton[t.button]||(a.clicksByButton[t.button]={clickCount:0,target:c.target,timeStamp:r});var f=a.clicksByButton[t.button];f.target===c.target&&r-f.timeStamp<200?++f.clickCount:f.clickCount=1,f.target=c.target,f.timeStamp=r,c.detail=f.clickCount,(null==(e=i.detail)?void 0:e.preventClick)||(n.context.config.useNativeClickEvent||"mouse"!==c.pointerType&&"touch"!==c.pointerType||n.dispatchEvent(c,"click"),n.dispatchEvent(c,"pointertap")),n.freeEvent(c)}n.freeEvent(i)},this.onPointerMove=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0),r="mouse"===e.pointerType||"pen"===e.pointerType,i=n.trackingData(t.pointerId),o=n.findMountedTarget(i.overTargets);if(i.overTargets&&o!==e.target){var a="mousemove"===t.type?"mouseout":"pointerout",l=n.createPointerEvent(t,a,o||void 0);if(n.dispatchEvent(l,"pointerout"),r&&n.dispatchEvent(l,"mouseout"),!e.composedPath().includes(o)){var s=n.createPointerEvent(t,"pointerleave",o||void 0);for(s.eventPhase=s.AT_TARGET;s.target&&!e.composedPath().includes(s.target);)s.currentTarget=s.target,n.notifyTarget(s),r&&n.notifyTarget(s,"mouseleave"),ci.isNode(s.target)&&(s.target=s.target.parentNode);n.freeEvent(s)}n.freeEvent(l)}if(o!==e.target){var u="mousemove"===t.type?"mouseover":"pointerover",c=n.clonePointerEvent(e,u);n.dispatchEvent(c,"pointerover"),r&&n.dispatchEvent(c,"mouseover");for(var f=o&&ci.isNode(o)&&o.parentNode;f&&f!==(ci.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;)f=f.parentNode;if(!f||f===(ci.isNode(n.rootTarget)&&n.rootTarget.parentNode)){var p=n.clonePointerEvent(e,"pointerenter");for(p.eventPhase=p.AT_TARGET;p.target&&p.target!==o&&p.target!==(ci.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),ci.isNode(p.target)&&(p.target=p.target.parentNode);n.freeEvent(p)}n.freeEvent(c)}n.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&n.dispatchEvent(e,"touchmove"),r&&(n.dispatchEvent(e,"mousemove"),n.cursor=n.getCursor(e.target)),i.overTargets=e.composedPath(),n.freeEvent(e)},this.onPointerOut=function(t){var e=n.trackingData(t.pointerId);if(e.overTargets){var r="mouse"===t.pointerType||"pen"===t.pointerType,i=n.findMountedTarget(e.overTargets),o=n.createPointerEvent(t,"pointerout",i||void 0);n.dispatchEvent(o),r&&n.dispatchEvent(o,"mouseout");var a=n.createPointerEvent(t,"pointerleave",i||void 0);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(ci.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),ci.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=null,n.freeEvent(o),n.freeEvent(a)}n.cursor=null},this.onPointerOver=function(t){var e=n.trackingData(t.pointerId),r=n.createPointerEvent(t),i="mouse"===r.pointerType||"pen"===r.pointerType;n.dispatchEvent(r,"pointerover"),i&&n.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(n.cursor=n.getCursor(r.target));var o=n.clonePointerEvent(r,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(ci.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),ci.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=r.composedPath(),n.freeEvent(r),n.freeEvent(o)},this.onPointerUpOutside=function(t){var e=n.trackingData(t.pointerId),r=n.findMountedTarget(e.pressTargetsByButton[t.button]),i=n.createPointerEvent(t);if(r){for(var o=r;o;)i.currentTarget=o,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||("mouse"===i.pointerType||"pen"===i.pointerType)&&n.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),ci.isNode(o)&&(o=o.parentNode);delete e.pressTargetsByButton[t.button]}n.freeEvent(i)},this.onWheel=function(t){var e=n.createWheelEvent(t);n.dispatchEvent(e),n.freeEvent(e)},this.onClick=function(t){if(n.context.config.useNativeClickEvent){var e=n.createPointerEvent(t);n.dispatchEvent(e),n.freeEvent(e)}},this.onPointerCancel=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);n.dispatchEvent(e),n.freeEvent(e)}}return t.prototype.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)},t.prototype.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},t.prototype.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new lS(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},t.prototype.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new lS(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},t.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.context.config,o=i.width,a=i.height,l=r.getPerspectiveInverse(),s=r.getWorldTransform(),u=os(this.tmpMatrix,s,l),c=iQ(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return i4(c,c,u),new lS(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=os(this.tmpMatrix,n,r),o=iQ(this.tmpVec3,t.x,t.y,0);i4(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new lS((o[0]+1)/2*l,(1-(o[1]+1)/2)*s)},t.prototype.setPickHandler=function(t){this.pickHandler=t},t.prototype.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},t.prototype.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},t.prototype.dispatchEvent=function(t,e,n){n?(t.eventPhase=t.AT_TARGET,t.currentTarget=this.rootTarget.defaultView||null,this.notifyListeners(t,e)):(t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e)),this.emitter.emit(e||t.type,t)},t.prototype.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},t.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)ci.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},t.prototype.hitTest=function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,o=r.height,a=r.disableHitTesting;return e<0||n<0||e>i||n>o?null:!a&&this.pickHandler(t)||this.rootTarget||null},t.prototype.isNativeEventFromCanvas=function(t){var e,n=this.context.contextService.getDomElement(),r=null==(e=t.nativeEvent)?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},t.prototype.getExistedHTML=function(t){var e,n;if(t.nativeEvent.composedPath)try{for(var r=tH(t.nativeEvent.composedPath()),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.nativeHTMLMap.get(o);if(a)return a}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return null},t.prototype.pickTarget=function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})},t.prototype.createPointerEvent=function(t,e,n,r){var i=this.allocateEvent(ct);this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.nativeEvent=t.nativeEvent,i.originalEvent=t;var o=this.getExistedHTML(i);return i.target=null!=n?n:o||this.isNativeEventFromCanvas(i)&&this.pickTarget(i)||r,"string"==typeof e&&(i.type=e),i},t.prototype.createWheelEvent=function(t){var e=this.allocateEvent(ce);this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t;var n=this.getExistedHTML(e);return e.target=n||this.isNativeEventFromCanvas(e)&&this.pickTarget(e),e},t.prototype.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},t.prototype.cloneWheelEvent=function(t){var e=this.allocateEvent(ce);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e},t.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(ct);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},t.prototype.copyPointerData=function(t,e){e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist},t.prototype.copyMouseData=function(t,e){e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset)},t.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},t.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=uI.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},t.prototype.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},t.prototype.freeEvent=function(t){if(t.manager!==this)throw Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},t.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},t.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},t.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(r===this.rootTarget||ci.isNode(r)&&r.parentNode===e)e=t[n];else break}return e},t.prototype.getCursor=function(t){for(var e=t;e;){var n=!!e.getAttribute&&e.getAttribute("cursor");if(n)return n;e=ci.isNode(e)&&e.parentNode}},t}(),ca=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||cb.offscreenCanvas)this.canvas=t||cb.offscreenCanvas,this.context=this.canvas.getContext("2d",tz({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",tz({willReadFrequently:!0},e)),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",tz({willReadFrequently:!0},e))}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context},t}();(P3=jw||(jw={}))[P3.CAMERA_CHANGED=0]="CAMERA_CHANGED",P3[P3.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",P3[P3.NONE=2]="NONE";var cl=function(){function t(t,e){this.globalRuntime=t,this.context=e,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new uX,initAsync:new uq,dirtycheck:new uK,cull:new uK,beginFrame:new uX,beforeRender:new uX,render:new uX,afterRender:new uX,endFrame:new uX,destroy:new uX,pick:new uY,pickSync:new uK,pointerDown:new uX,pointerUp:new uX,pointerMove:new uX,pointerOut:new uX,pointerOver:new uX,pointerWheel:new uX,pointerCancel:new uX,click:new uX}}return t.prototype.init=function(t){var e=this,n=tz(tz({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(t){t.apply(n,e.globalRuntime)}),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,t()):this.hooks.initAsync.promise().then(function(){e.inited=!0,t()})},t.prototype.getStats=function(){return this.stats},t.prototype.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(jw.CAMERA_CHANGED)},t.prototype.render=function(t,e){var n=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var r=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(r.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),r.renderReasons.size&&this.inited){r.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var i=1===r.renderReasons.size&&r.renderReasons.has(jw.CAMERA_CHANGED),o=!t.disableRenderHooks||!(t.disableRenderHooks&&i);o&&this.renderDisplayObject(r.root,t,r),this.hooks.beginFrame.call(),o&&r.renderListCurrentFrame.forEach(function(t){n.hooks.beforeRender.call(t),n.hooks.render.call(t),n.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),r.renderListCurrentFrame=[],r.renderReasons.clear(),e()}},t.prototype.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),o=i.enableDirtyCheck,a=i.enableCulling;this.globalRuntime.enableCSSParsing&&this.globalRuntime.styleValueRegistry.recalc(t);var l=t.renderable,s=o?l.dirty||n.dirtyRectangleRenderingDisabled?t:null:t;if(s){var u=a?this.hooks.cull.call(s,this.context.camera):s;u&&(this.stats.rendered++,n.renderListCurrentFrame.push(u))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var c=t.sortable;c.dirty&&(this.sort(t,c),c.dirty=!1,c.dirtyChildren=[],c.dirtyReason=void 0),(c.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)})},t.prototype.sort=function(t,e){e.sorted&&e.dirtyReason!==jx.Z_INDEX_CHANGED?e.dirtyChildren.forEach(function(n){if(-1===t.childNodes.indexOf(n)){var r=e.sorted.indexOf(n);r>=0&&e.sorted.splice(r,1)}else if(0===e.sorted.length)e.sorted.push(n);else{var i=function(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;0>uT(t[i],e)?n=i+1:r=i}return n}(e.sorted,n);e.sorted.splice(i,0,n)}}):e.sorted=t.childNodes.slice().sort(uT)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(jw.DISPLAY_OBJECT_CHANGED)},t}(),cs=/\[\s*(.*)=(.*)\s*\]/,cu=function(){function t(){}return t.prototype.selectOne=function(t,e){var n=this;if(t.startsWith("."))return e.find(function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.find(function(e){return e.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.find(function(n){return e!==n&&n.nodeName===t});var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):null},t.prototype.selectAll=function(t,e){var n=this;if(t.startsWith("."))return e.findAll(function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.findAll(function(r){return e!==r&&r.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.findAll(function(n){return e!==n&&n.nodeName===t});var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):[]},t.prototype.is=function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(!t.startsWith("["))return e.nodeName===t;var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i},t.prototype.getIdOrClassname=function(t){return t.substring(1)},t.prototype.getAttribute=function(t){var e=t.match(cs),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}},t.prototype.attributeToString=function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return at(n)?"":n.toString?n.toString():""},t}(),cc=function(t){function e(e,n,r,i,o,a,l,s){var u=t.call(this,null)||this;return u.relatedNode=n,u.prevValue=r,u.newValue=i,u.attrName=o,u.attrChange=a,u.prevParsedValue=l,u.newParsedValue=s,u.type=e,u}return tB(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(u9);function cf(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(P4=jE||(jE={})).REPARENT="reparent",P4.DESTROY="destroy",P4.ATTR_MODIFIED="DOMAttrModified",P4.INSERTED="DOMNodeInserted",P4.REMOVED="removed",P4.MOUNTED="DOMNodeInsertedIntoDocument",P4.UNMOUNTED="DOMNodeRemovedFromDocument",P4.BOUNDS_CHANGED="bounds-changed",P4.CULLED="culled";var cp=new cc(jE.REPARENT,null,"","","",0,"",""),ch=function(){function t(t){var e,n,r,i,o,a,l,s,u,c,f,p,h=this;this.runtime=t,this.pendingEvents=[],this.boundsChangedEvent=new cn(jE.BOUNDS_CHANGED),this.rotate=(e=oQ(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=iK(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=oQ();o2(a,n[0],n[1],n[2]);var l=h.getRotation(t);o3(e,h.getRotation(t.parentNode)),o1(e,e),o0(a,e,a),o0(o.localRotation,a,l),o4(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=oQ(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=iK(e,r,i));var o=t.transformable;o2(n,e[0],e[1],e[2]),o0(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=oQ(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=iK(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){o2(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);o3(r,o1(oQ(),a)),o0(o.localRotation,o.localRotation,r),h.dirtifyLocal(t,o)}else h.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=iK(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,b,x,O,w,E=t.transformable;i6(e,iq())||(i=e,o=e,l=(a=E.localRotation)[0],s=a[1],u=a[2],c=a[3],f=o[0],p=o[1],y=s*(d=o[2])-u*p,g=u*f-l*d,v=l*p-s*f,b=s*v-u*g,x=u*y-l*v,O=l*g-s*y,y*=w=2*c,g*=w,v*=w,b*=2,x*=2,O*=2,i[0]=f+y+b,i[1]=p+g+x,i[2]=d+v+O,iJ(E.localPosition,E.localPosition,e),h.dirtifyLocal(t,E))},this.setPosition=(i=i9(),o=iq(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,i6(h.getPosition(t),o)||(iZ(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(ot(i,t.parentNode.transformable.worldTransform),oo(i,i),i4(n.localPosition,o,i)):iZ(n.localPosition,o),h.dirtifyLocal(t,n))}),this.setLocalPosition=(a=iq(),function(t,e){var n=t.transformable;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,i6(n.localPosition,a)||(iZ(n.localPosition,a),h.dirtifyLocal(t,n))}),this.translate=(l=iq(),s=iq(),u=iq(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=iQ(s,e,n,r)),i6(e,l)||(iJ(u,h.getPosition(t),e),h.setPosition(t,u))}),this.setRotation=function(){var t=oQ();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=o5(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(o3(t,h.getRotation(e.parentNode)),o1(t,t),o0(a.localRotation,t,n),o4(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=i9(),f=iq(),p=o5(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(o_(t.localTransform,t.localRotation,t.localPosition,iK(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=or(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),os(t.localTransform,t.localTransform,e)}var n=o_(c,p,f,t.localScale,t.origin);os(t.localTransform,t.localTransform,n)}else o_(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)})}return t.prototype.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},t.prototype.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},t.prototype.attach=function(t,e,n){var r,i,o=!1;t.parentNode&&(o=t.parentNode!==e,this.detach(t)),t.parentNode=e,at(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var a=e.sortable;((null==(r=null==a?void 0:a.sorted)?void 0:r.length)||(null==(i=t.style)?void 0:i.zIndex))&&(-1===a.dirtyChildren.indexOf(t)&&a.dirtyChildren.push(t),a.dirty=!0,a.dirtyReason=jx.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(cp)},t.prototype.detach=function(t){var e,n;if(t.parentNode){var r=t.transformable,i=t.parentNode.sortable;((null==(e=null==i?void 0:i.sorted)?void 0:e.length)||(null==(n=t.style)?void 0:n.zIndex))&&(-1===i.dirtyChildren.indexOf(t)&&i.dirtyChildren.push(t),i.dirty=!0,i.dirtyReason=jx.REMOVED);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtifyWorld(t,r),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=[e,n,r]);var i=t.transformable;if(e[0]!==i.origin[0]||e[1]!==i.origin[1]||e[2]!==i.origin[2]){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=iK(e,n,r));var i=t.transformable;o2(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.scaleLocal=function(t,e){var n,r,i,o=t.transformable;n=o.localScale,r=o.localScale,i=iK(e[0],e[1],e[2]||1),n[0]=r[0]*i[0],n[1]=r[1]*i[1],n[2]=r[2]*i[2],this.dirtifyLocal(t,o)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=iK(e[0],e[1],e[2]||n.localScale[2]);i6(r,n.localScale)||(iZ(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=o5(e,n,r,i));var o=t.transformable;o3(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){"number"==typeof e&&(r=e,(i=new iU(2))[0]=r,i[1]=n,e=i);var r,i,o,a,l=t.transformable;o=l.localSkew,a=e,o[0]=a[0],o[1]=a[1],this.dirtifyLocal(t,l)},t.prototype.dirtifyLocal=function(t,e){!e.localDirtyFlag&&(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},t.prototype.triggerPendingEvents=function(){var t=this,e=new Set,n=function(n,r){n.isConnected&&!e.has(n.entity)&&(t.boundsChangedEvent.detail=r,t.boundsChangedEvent.target=n,n.isMutationObserved?n.dispatchEvent(t.boundsChangedEvent):n.ownerDocument.defaultView.dispatchEvent(t.boundsChangedEvent,!0),e.add(n.entity))};this.pendingEvents.forEach(function(t){var e=tV(t,2),r=e[0],i=e[1];i.affectChildren?r.forEach(function(t){n(t,i)}):n(r,i)}),this.clearPendingEvents(),e.clear()},t.prototype.clearPendingEvents=function(){this.pendingEvents=[]},t.prototype.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)cf(n),n=n.parentNode;e&&t.forEach(function(t){cf(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},t.prototype.updateDisplayObjectDependency=function(t,e,n,r){if(e&&e!==n){var i=this.displayObjectDependencyMap.get(e);if(i&&i[t]){var o=i[t].indexOf(r);i[t].splice(o,1)}}if(n){var a=this.displayObjectDependencyMap.get(n);a||(this.displayObjectDependencyMap.set(n,{}),a=this.displayObjectDependencyMap.get(n)),a[t]||(a[t]=[]),a[t].push(r)}},t.prototype.informDependentDisplayObjects=function(t){var e=this,n=this.displayObjectDependencyMap.get(t);n&&Object.keys(n).forEach(function(t){n[t].forEach(function(n){e.dirtifyToRoot(n,!0),n.dispatchEvent(new cc(jE.ATTR_MODIFIED,n,e,e,t,cc.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return oE(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return oM(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return ok(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),(e.localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalSkew=function(t){return t.transformable.localSkew},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.localTransform},t.prototype.setLocalTransform=function(t,e){var n=oE(iq(),e),r=oM(oQ(),e),i=ok(iq(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},t.prototype.getTransformedGeometryBounds=function(t,e,n){void 0===e&&(e=!1);var r=this.getGeometryBounds(t,e);if(lE.isEmpty(r))return null;var i=n||new lE;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new lE},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=e?r.renderBounds:r.bounds,o=this.getTransformedGeometryBounds(t,e,i);if(t.childNodes.forEach(function(t){var r=n.getBounds(t,e);r&&(o?o.add(r):(o=i||new lE).update(r.center,r.halfExtents))}),e){var a=uC(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return o||(o=new lE),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=i9();t.parentNode.transformable&&(e=oo(i9(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!lE.isEmpty(n)){var r=new lE;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);lE.isEmpty(i)||(r=new lE).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null==(n=null==(e=t.ownerDocument)?void 0:e.defaultView)?void 0:n.getContextService().getBoundingClientRect();if(r){var a=tV(r.getMin(),2),l=a[0],s=a[1],u=tV(r.getMax(),2),c=u[0],f=u[1];return new l_(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new l_((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)});var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0)}},t.prototype.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?os(e.worldTransform,r.worldTransform,e.localTransform):ot(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),cd={MetricsString:"|\xc9q\xc5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},cy=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,cg=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),cm=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),cv=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&!!(t&&(cm.exec(n)||cg.exec(t)))},this.trimByKinsokuShorui=function(t){var e=tq([],tV(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(e),i=this.runtime.offscreenCanvasCreator.getOrCreateContext(e,{willReadFrequently:!0});i.font=t;var o=cd.MetricsString+cd.BaselineSymbol,a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText(cd.BaselineSymbol).width),s=cd.HeightMultiplier*l;l=l*cd.BaselineMultiplier|0,r.width=a,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,a,s),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,l);var u=i.getImageData(0,0,a||1,s||1).data,c=u.length,f=4*a,p=0,h=0,d=!1;for(p=0;p<l;++p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h+=f}for(n.ascent=l-p,h=c-f,d=!1,p=s;p>l;--p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h-=f}return n.descent=p-l,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n,n},t.prototype.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,l=e.textBaseline,s=e.textAlign,u=e.letterSpacing,c=e.textPath;e.textPathSide,e.textPathStartOffset;var f=e.leading,p=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=o9(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!uQ.test(u)&&0>uZ.indexOf(u)&&(u='"'.concat(u,'"')),l[s]=u}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(l.join(","))}(e),d=this.measureFont(h,n);0===d.fontSize&&(d.fontSize=r,d.ascent=r);var y=this.runtime.offscreenCanvasCreator.getOrCreateContext(n);y.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),v=Array(g.length),b=0;if(c){c.getTotalLength();for(var x=0;x<g.length;x++)var O=y.measureText(g[x]).width+(g[x].length-1)*u}else{for(var x=0;x<g.length;x++){var w=y.measureText(g[x]).width+(g[x].length-1)*u;v[x]=w,b=Math.max(b,w)}var O=b+a,E=o||d.fontSize+a,k=Math.max(E,d.fontSize+a)+(g.length-1)*(E+p);E+=p;var M=0;return"middle"===l?M=-k/2:"bottom"===l||"alphabetic"===l||"ideographic"===l?M=-k:("top"===l||"hanging"===l)&&(M=0),{font:h,width:O,height:k,lines:g,lineWidths:v,lineHeight:E,maxLineWidth:b,fontProperties:d,lineMetrics:v.map(function(t,e){var n=0;return"center"===s||"middle"===s?n-=t/2:("right"===s||"end"===s)&&(n-=t),new l_(n-a/2,M+e*E,t+a,E)})}}},t.prototype.setGraphemeOnPath=function(){},t.prototype.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=e.letterSpacing,a=e.maxLines,l=void 0===a?1/0:a,s=e.textOverflow,u=this.runtime.offscreenCanvasCreator.getOrCreateContext(n),c=(void 0===i?0:i)+o,f="";"ellipsis"===s?f="...":s&&"clip"!==s&&(f=s);for(var p=[],h=0,d=0,y={},g=function(t){return r.getFromCache(t,o,y,u)},v=Array.from(f).reduce(function(t,e){return t+g(e)},0),b=Array.from(t),x=0;x<b.length;x++){var O=b[x],w=t[x-1],E=t[x+1],k=g(O);if(this.isNewline(O)){if(++h>=l){e.isOverflowing=!0;break}d=0,p[h]="";continue}if(d>0&&d+k>c){if(h+1>=l){if(e.isOverflowing=!0,v>0&&v<=c){for(var M=p[h].length,S=0,_=M,P=0;P<M;P++){var j=g(p[h][P]);if(S+j+v>c){_=P;break}S+=j}p[h]=(p[h]||"").slice(0,_)+f}break}if(d=0,p[++h]="",this.isBreakingSpace(O))continue;this.canBreakInLastChar(O)||(p=this.trimToBreakable(p),d=this.sumTextWidthByCache(p[h]||"",y)),this.shouldBreakByKinsokuShorui(O,E)&&(p=this.trimByKinsokuShorui(p),d+=g(w||""))}d+=k,p[h]=(p[h]||"")+O}return p.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&cd.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&cd.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=tq([],tV(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=this.isBreakingSpace(i);return e[e.length-1]+=n.slice(r+1,n.length),e[e.length-2]=n.slice(0,r+ +!o),e},t.prototype.canBreakInLastChar=function(t){return!(t&&cy.test(t))},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce(function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]},0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!cy.test(t[e]))return e;return -1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t}(),cb={},cx=(P8=new u6,P9=new u4,(P6={})[ja.CIRCLE]=new u1,P6[ja.ELLIPSE]=new u2,P6[ja.RECT]=P8,P6[ja.IMAGE]=P8,P6[ja.GROUP]=P8,P6[ja.LINE]=new u5,P6[ja.TEXT]=new u8(cb),P6[ja.POLYLINE]=P9,P6[ja.POLYGON]=P9,P6[ja.PATH]=new u3,P6[ja.HTML]=null,P6[ja.MESH]=null,P6),cO=(jt=new uc,je=new uh,(P7={})[jO.PERCENTAGE]=null,P7[jO.NUMBER]=new ux,P7[jO.ANGLE]=new us,P7[jO.DEFINED_PATH]=new uu,P7[jO.PAINT]=jt,P7[jO.COLOR]=jt,P7[jO.FILTER]=new uf,P7[jO.LENGTH]=je,P7[jO.LENGTH_PERCENTAGE]=je,P7[jO.LENGTH_PERCENTAGE_12]=new ud,P7[jO.LENGTH_PERCENTAGE_14]=new uy,P7[jO.COORDINATE]=new uv,P7[jO.OFFSET_DISTANCE]=new uO,P7[jO.OPACITY_VALUE]=new uw,P7[jO.PATH]=new uE,P7[jO.LIST_OF_POINTS]=new uk,P7[jO.SHADOW_BLUR]=new uM,P7[jO.TEXT]=new uS,P7[jO.TEXT_TRANSFORM]=new u_,P7[jO.TRANSFORM]=new uJ,P7[jO.TRANSFORM_ORIGIN]=new function(){this.parser=s7,this.parserUnmemoize=ut},P7[jO.Z_INDEX]=new u0,P7[jO.MARKER]=new ub,P7);cb.CameraContribution=lT,cb.AnimationTimeline=null,cb.EasingFunction=null,cb.offscreenCanvasCreator=new ca,cb.sceneGraphSelector=new cu,cb.sceneGraphService=new ch(cb),cb.textService=new cv(cb),cb.geometryUpdaterFactory=cx,cb.CSSPropertySyntaxFactory=cO,cb.styleValueRegistry=new ul(cb),cb.layoutRegistry=null,cb.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},cb.enableCSSParsing=!0,cb.enableDataset=!1,cb.enableStyleSyntax=!0,cb.enableSizeAttenuation=!1;var cw=0,cE=new cc(jE.INSERTED,null,"","","",0,"",""),ck=new cc(jE.REMOVED,null,"","","",0,"",""),cM=new cn(jE.DESTROY),cS=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.entity=cw++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:jb.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle=cb.enableCSSParsing?{anchor:l0,opacity:l0,fillOpacity:l0,strokeOpacity:l0,fill:l0,stroke:l0,transform:l0,transformOrigin:l0,visibility:l0,pointerEvents:l0,lineWidth:l0,lineCap:l0,lineJoin:l0,increasedLineWidthForHitTesting:l0,fontSize:l0,fontFamily:l0,fontStyle:l0,fontWeight:l0,fontVariant:l0,textAlign:l0,textBaseline:l0,textTransform:l0,zIndex:l0,filter:l0,shadowType:l0}:null,e.parsedStyle={},e.attributes={},e}return tB(e,t),Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter(function(t){return""!==t})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw Error(lP)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return cb.sceneGraphService.attach(t,this,e),(null==(n=this.ownerDocument)?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),cE.relatedNode=this,t.dispatchEvent(cE),t},e.prototype.insertBefore=function(t,e){if(e){t.parentElement&&t.parentElement.removeChild(t);var n=this.childNodes.indexOf(e);-1===n?this.appendChild(t):this.appendChild(t,n)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.prototype.removeChild=function(t){var e;return ck.relatedNode=this,t.dispatchEvent(ck),(null==(e=t.ownerDocument)?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),cb.sceneGraphService.detach(t),t},e.prototype.removeChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];this.removeChild(e)}},e.prototype.destroyChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];e.childNodes.length&&e.destroyChildren(),e.destroy()}},e.prototype.matches=function(t){return cb.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return cb.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return cb.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return cb.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return cb.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return cb.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return cb.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(cb.sceneGraphService.matches(t,e))return e;e=e.parentElement}while(null!==e);return null},e.prototype.find=function(t){var e=this,n=null;return this.forEach(function(r){return!!(r!==e&&t(r))&&(n=r,!0)}),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach(function(r){r!==e&&t(r)&&n.push(r)}),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach(function(e,n){var i;return null==(i=t.parentNode)?void 0:i.appendChild(e,r+n+1)})}},e.prototype.before=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this),r=tV(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,tq([],tV(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,tq([],tV(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e){return t.appendChild(e)})},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e,n){return t.appendChild(e,n)})},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,tq([],tV(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(cM),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return cb.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return cb.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return cb.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return cb.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return cb.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(t){if("symbol"==typeof t)return cb.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=lq(t);return e=this.attributes[n],cb.enableCSSParsing&&at(e)?null:e},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw Error(lP)},e.prototype.getAttributeNode=function(t){throw Error(lP)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(lP)},e.prototype.hasAttributeNS=function(t,e){throw Error(lP)},e.prototype.removeAttributeNS=function(t,e){throw Error(lP)},e.prototype.removeAttributeNode=function(t){throw Error(lP)},e.prototype.setAttributeNS=function(t,e,n){throw Error(lP)},e.prototype.setAttributeNode=function(t){throw Error(lP)},e.prototype.setAttributeNodeNS=function(t){throw Error(lP)},e.prototype.toggleAttribute=function(t,e){throw Error(lP)},e}(ci);function c_(t){return!!(null==t?void 0:t.nodeName)}var cP=new cc(jE.ATTR_MODIFIED,null,null,null,null,cc.MODIFICATION,null,null),cj={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},cA={anchor:[0,0],fill:l5,stroke:l5,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},cT=tz(tz({},cA),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),cC=tq(tq([],tV(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),cN="data-",cL=function(t){function e(e){var n,r=t.call(this)||this;r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=e,r.config.interactive=null!=(n=r.config.capture)?n:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||ja.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,cb.enableCSSParsing?cA:cT,r.config.initialParsedStyle),cb.enableCSSParsing&&Object.assign(r.attributes,cj),r.initAttributes(r.config.style);var i=cb.globalThis.Proxy?cb.globalThis.Proxy:function(){};return cb.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(cN).concat(lH(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(cN).concat(lH(e)),n),!0}})),cb.enableStyleSyntax&&(r.style=new i({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}})),r}return tB(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.getAnimations().forEach(function(t){t.cancel()})},e.prototype.cloneNode=function(t,e){var n=tz({},this.attributes);for(var r in n){var i=n[r];c_(i)&&"clipPath"!==r&&"offsetPath"!==r&&"textPath"!==r&&(n[r]=i.cloneNode(t)),e&&(n[r]=e(r,i))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:n});return o.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(e){if(!e.style.isMarker){var n=e.cloneNode(t);o.appendChild(n)}}),o},e.prototype.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable,n={forceUpdateGeometry:!0};cb.enableCSSParsing&&(n.usedAttributes=cC);var r={};for(var i in t)r[lq(i)]=t[i];cb.styleValueRegistry.processProperties(this,r,n),e.dirty=!0},e.prototype.setAttribute=function(e,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=!0);var o=lq(e);!aj(n)&&(r||n!==this.attributes[o])&&(this.internalSetAttribute(o,n,{memoize:i}),t.prototype.setAttribute.call(this,o,n))},e.prototype.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r,i=this.renderable,o=this.attributes[t],a=this.parsedStyle[t];cb.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(cP.relatedNode=this,cP.prevValue=o,cP.newValue=e,cP.attrName=t,cP.prevParsedValue=a,cP.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(cP):(cP.target=this,this.ownerDocument.defaultView.dispatchEvent(cP,!0))),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,o,e,a,l)},e.prototype.getBBox=function(){var t=this.getBounds(),e=tV(t.getMin(),2),n=e[0],r=e[1],i=tV(t.getMax(),2);return new l_(n,r,i[0]-n,i[1]-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cb.sceneGraphService.setOrigin(this,lp(t,e,n)),this},e.prototype.getOrigin=function(){return cb.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cb.sceneGraphService.setPosition(this,lp(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cb.sceneGraphService.setLocalPosition(this,lp(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cb.sceneGraphService.translate(this,lp(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cb.sceneGraphService.translateLocal(this,lp(t,e,n)),this},e.prototype.getPosition=function(){return cb.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return cb.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=lp(t,e,n)),cb.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=lp(t,e,n)),cb.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return cb.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return cb.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return ld(tV(ly(iq(),cb.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return ld(tV(ly(iq(),cb.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return cb.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return cb.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return at(e)&&at(n)?cb.sceneGraphService.rotateLocal(this,0,0,t):cb.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return at(e)&&at(n)?cb.sceneGraphService.rotate(this,0,0,t):cb.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return cb.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return cb.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return cb.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return cb.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return cb.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return cb.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return cb.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return cb.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return cb.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){cb.sceneGraphService.resetLocalTransform(this)},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r=null==(n=this.ownerDocument)?void 0:n.timeline;return r?r.play(this,t,e):null},e.prototype.isVisible=function(){var t;return(null==(t=this.parsedStyle)?void 0:t.visibility)==="visible"},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var t;return(null==(t=this.parsedStyle)?void 0:t.pointerEvents)!=="none"},e.prototype.isCulled=function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,tq([],tV(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,tq([],tV(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))-1),this},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=tV(e,2),i=r[0],o=r[1];return i?aP(i)?(Object.keys(i).forEach(function(e){t.setAttribute(e,i[e])}),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.getMatrix=function(t){var e,n,r,i,o,a,l,s,u=t||this.getWorldTransform(),c=tV(oE(iq(),u),2),f=c[0],p=c[1],h=tV(ok(iq(),u),2),d=h[0],y=h[1],g=oM(oQ(),u),v=tV(ly(iq(),g),3),b=v[0],x=v[2];return n=Math.cos(e=b||x),r=Math.sin(e),i=d*n,o=y*r,a=-d*r,l=y*n,(s=new iU(9))[0]=i,s[1]=o,s[2]=0,s[3]=a,s[4]=l,s[5]=0,s[6]=f,s[7]=p,s[8]=1,s},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=tV(lg(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setEulerAngles(a).setPosition(n,r).setLocalScale(i,o)},e.prototype.setLocalMatrix=function(t){var e=tV(lg(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setLocalEulerAngles(a).setLocalPosition(n,r).setLocalScale(i,o)},e.prototype.show=function(){cb.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){cb.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(t){t.style.visibility="hidden"})},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e}(cS),cI=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;cb.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},cR=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.CIRCLE,style:cb.enableCSSParsing?tz({cx:"",cy:"",r:""},n):tz({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:cb.enableCSSParsing?null:[l8,l8]}},r))||this}return tB(e,t),e}(cL),cD=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tW(e,["style"]);return(n=t.call(this,tz({style:cb.enableCSSParsing?tz({x:"",y:""},r):tz({},r)},i))||this).isCustomElement=!0,n}return tB(e,t),e}(cL),cF=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.ELLIPSE,style:cb.enableCSSParsing?tz({cx:"",cy:"",rx:"",ry:""},n):tz({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:cb.enableCSSParsing?null:[l8,l8]}},r))||this}return tB(e,t),e}(cL),cB=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.GROUP,style:cb.enableCSSParsing?tz({x:"",y:"",width:"",height:""},n):tz({},n)},r))||this}return tB(e,t),e}(cL),cz=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tW(e,["style"]);return(n=t.call(this,tz({type:ja.HTML,style:cb.enableCSSParsing?tz({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):tz({},r)},i))||this).cullable.enable=!1,n}return tB(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){if(this.parsedStyle.$el)return this.parsedStyle.$el.getBoundingClientRect();var t=this.parsedStyle;return new l_(t.x,t.y,t.width,t.height)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(e=null==(t=this.ownerDocument)?void 0:t.defaultView)?void 0:e.getContextService().getBoundingClientRect(),i=new lE,o=n.left-((null==r?void 0:r.left)||0),a=n.top-((null==r?void 0:r.top)||0);return i.setMinMax([o,a,0],[o+n.width,a+n.height,0]),i},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=oo(i9(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!lE.isEmpty(e)){var n=new lE;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(cL),cW=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.IMAGE,style:cb.enableCSSParsing?tz({x:"",y:"",img:"",width:"",height:""},n):tz({},n)},r))||this}return tB(e,t),e}(cL),c$=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tW(e,["style"]);(n=t.call(this,tz({type:ja.LINE,style:tz({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},r)},i))||this).markerStartAngle=0,n.markerEndAngle=0;var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd;return a&&c_(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&c_(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&c_(r)&&(this.markerStartAngle=0,r.remove()),i&&c_(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&c_(r)&&(this.markerEndAngle=0,r.remove()),i&&c_(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.x1,h=l.x2,d=l.y1,y=l.y2,g=l.defX,v=l.defY,b=t?s:u;if(b&&c_(b)){var x=0;t?(r=p-g,i=d-v,e=h-p,n=y-d,o=c||0,a=this.markerStartAngle):(r=h-g,i=y-v,e=p-h,n=d-y,o=f||0,a=this.markerEndAngle),x=Math.atan2(n,e),b.setLocalEulerAngles(180*x/Math.PI+a),b.setLocalPosition(r+Math.cos(x)*o,i+Math.sin(x)*o)}},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,o=n.x2,a=n.y2,l=n.defX,s=n.defY,u=a8(r,i,o,a,t),c=u.x,f=u.y,p=i4(iq(),iK(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new lS(p[0],p[1])},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getTotalLength=function(){var t=this.parsedStyle;return a3(t.x1,t.y1,t.x2,t.y2)},e}(cL),cG=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tW(e,["style"]);(n=t.call(this,tz({type:ja.PATH,style:cb.enableCSSParsing?tz({path:"",miterLimit:""},r):tz({},r),initialParsedStyle:cb.enableCSSParsing?null:{miterLimit:4,path:tz({},l9)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&c_(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&c_(s)&&n.placeMarkerMid(s),l&&c_(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&c_(r)&&(this.markerStartAngle=0,r.remove()),i&&c_(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&c_(r)&&(this.markerEndAngle=0,r.remove()),i&&c_(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.defX,h=l.defY,d=t?s:u;if(d&&c_(d)){var y=0;if(t){var g=tV(this.getStartTangent(),2),v=g[0],b=g[1];r=b[0]-p,i=b[1]-h,e=v[0]-b[0],n=v[1]-b[1],o=c||0,a=this.markerStartAngle}else{var x=tV(this.getEndTangent(),2),v=x[0],b=x[1];r=b[0]-p,i=b[1]-h,e=v[0]-b[0],n=v[1]-b[1],o=f||0,a=this.markerEndAngle}y=Math.atan2(n,e),d.setLocalEulerAngles(180*y/Math.PI+a),d.setLocalPosition(r+Math.cos(y)*o,i+Math.sin(y)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&c_(t))for(var o=1;o<n.length-1;o++){var a=tV(n[o].currentPoint,2),l=a[0],s=a[1],u=1===o?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l-r,s-i)}},e.prototype.getTotalLength=function(){return sT(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=am(n.path.absolutePath,t,tz(tz({},void 0),{bbox:!1,length:!0})).point,a=o.x,l=o.y,s=i4(iq(),iK(a-r,l-i,0),e?this.getWorldTransform():this.getLocalTransform());return new lS(s[0],s[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*sT(this),e)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?e.push([n[0]-i[0],n[1]-i[1]]):e.push([r[0],r[1]]),e.push([n[0],n[1]])}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?n.push([i[0]-o[0],i[1]-o[1]]):n.push([r[0],r[1]]),n.push([i[0],i[1]])}return n},e}(cL),cH=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tW(e,["style"]);(n=t.call(this,tz({type:ja.POLYGON,style:cb.enableCSSParsing?tz({points:"",miterLimit:"",isClosed:!0},r):tz({},r),initialParsedStyle:cb.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&c_(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&c_(s)&&n.placeMarkerMid(s),l&&c_(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&c_(r)&&(this.markerStartAngle=0,r.remove()),i&&c_(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&c_(r)&&(this.markerEndAngle=0,r.remove()),i&&c_(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.points,h=l.defX,d=l.defY,y=(p||{}).points,g=t?s:u;if(g&&c_(g)&&y){var v=0;if(r=y[0][0]-h,i=y[0][1]-d,t)e=y[1][0]-y[0][0],n=y[1][1]-y[0][1],o=c||0,a=this.markerStartAngle;else{var b=y.length;this.parsedStyle.isClosed?(e=y[b-1][0]-y[0][0],n=y[b-1][1]-y[0][1]):(r=y[b-1][0]-h,i=y[b-1][1]-d,e=y[b-2][0]-y[b-1][0],n=y[b-2][1]-y[b-1][1]),o=f||0,a=this.markerEndAngle}v=Math.atan2(n,e),g.setLocalEulerAngles(180*v/Math.PI+a),g.setLocalPosition(r+Math.cos(v)*o,i+Math.sin(v)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points,r=e.defX,i=e.defY,o=(n||{}).points;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&c_(t)&&o)for(var a=1;a<(this.parsedStyle.isClosed?o.length:o.length-1);a++){var l=o[a][0]-r,s=o[a][1]-i,u=1===a?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l,s)}},e}(cL),cV=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.POLYLINE,style:cb.enableCSSParsing?tz({points:"",miterLimit:"",isClosed:!1},n):tz({},n),initialParsedStyle:cb.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return tB(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=n.points,a=o.points,l=o.segments,s=0,u=0;l.forEach(function(e,n){t>=e[0]&&t<=e[1]&&(s=(t-e[0])/(e[1]-e[0]),u=n)});var c=a8(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=i4(iq(),iK(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new lS(h[0],h[1])},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(cH),cU=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.RECT,style:cb.enableCSSParsing?tz({x:"",y:"",width:"",height:"",radius:""},n):tz({},n)},r))||this}return tB(e,t),e}(cL),cq=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.TEXT,style:cb.enableCSSParsing?tz({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},n):tz({fill:"black"},n),initialParsedStyle:cb.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},r))||this}return tB(e,t),e.prototype.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.prototype.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.prototype.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},e}(cL),cY=function(){function t(){this.registry={},this.define(ja.CIRCLE,cR),this.define(ja.ELLIPSE,cF),this.define(ja.RECT,cU),this.define(ja.IMAGE,cW),this.define(ja.LINE,c$),this.define(ja.GROUP,cB),this.define(ja.PATH,cG),this.define(ja.POLYGON,cH),this.define(ja.POLYLINE,cV),this.define(ja.TEXT,cq),this.define(ja.HTML,cz)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),cX=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new cb.AnimationTimeline(e)}catch(t){}var n={};return un.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=lV(i)?i(ja.GROUP):i)}),e.documentElement=new cB({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return tB(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?cq:cB);var r=new n(e);return r.ownerDocument=this,r},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw Error(lP)},e.prototype.destroy=function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(t){}},e.prototype.elementsFromBBox=function(t,e,n,r){var i=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),o=[];return i.forEach(function(t){var e=t.displayObject,n=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e.parsedStyle.pointerEvents);(!n||n&&e.isVisible())&&!e.isCulled()&&e.isInteractive()&&o.push(e)}),o.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),o},e.prototype.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return null;var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f&&f[0]||this.documentElement},e.prototype.elementFromPoint=function(t,e){return t$(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tG(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,null];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return[2,(f=p.sent().picked)&&f[0]||this.documentElement]}})})},e.prototype.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return[];var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f[f.length-1]!==this.documentElement&&f.push(this.documentElement),f},e.prototype.elementsFromPoint=function(t,e){return t$(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tG(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,[]];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return(f=p.sent().picked)[f.length-1]!==this.documentElement&&f.push(this.documentElement),[2,f]}})})},e.prototype.appendChild=function(t,e){throw Error(lj)},e.prototype.insertBefore=function(t,e){throw Error(lj)},e.prototype.removeChild=function(t,e){throw Error(lj)},e.prototype.replaceChild=function(t,e,n){throw Error(lj)},e.prototype.append=function(){throw Error(lj)},e.prototype.prepend=function(){throw Error(lj)},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(ci),cK=function(){function t(t){this.strategies=t}return t.prototype.apply=function(e){var n=e.camera,r=e.renderingService,i=e.renderingContext,o=this.strategies;r.hooks.cull.tap(t.tag,function(t){if(t){var e=t.cullable;return(0===o.length?e.visible=i.unculledEntities.indexOf(t.entity)>-1:e.visible=o.every(function(e){return e.isVisible(n,t)}),!t.isCulled()&&t.isVisible())?t:(t.dispatchEvent(new cn(jE.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),cZ=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new ct(null),this.rootWheelEvent=new ce(null),this.onPointerMove=function(e){var n,r,i,o,a=null==(o=null==(i=t.context.renderingContext.root)?void 0:i.ownerDocument)?void 0:o.defaultView;if(!a.supportsTouchEvents||"touch"!==e.pointerType){var l=t.normalizeToPointerEvent(e,a);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,r,i,o,a=null==(o=null==(i=t.context.renderingContext.root)?void 0:i.ownerDocument)?void 0:o.defaultView,l=t.normalizeToPointerEvent(e,a);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}}return t.prototype.apply=function(e){var n=this;this.context=e;var r=e.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(t){return n.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null}),r.hooks.pointerWheel.tap(t.tag,function(t){var e=n.normalizeWheelEvent(t);n.context.eventService.mapEvent(e)}),r.hooks.pointerDown.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.normalizeToPointerEvent(t,i);n.autoPreventDefault&&o[0].isNormalized&&(!t.cancelable&&"cancelable"in t||t.preventDefault());try{for(var a=tH(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.context.contextService.getDomElement(),a="outside";try{a=o&&t.target&&t.target!==o&&o.contains&&!o.contains(t.target)?"outside":""}catch(t){}var l=n.normalizeToPointerEvent(t,i);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=n.bootstrapEvent(n.rootPointerEvent,c,i,t);f.type+=a,n.context.eventService.mapEvent(f)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerMove.tap(t.tag,this.onPointerMove),r.hooks.pointerOver.tap(t.tag,this.onPointerMove),r.hooks.pointerOut.tap(t.tag,this.onPointerMove),r.hooks.click.tap(t.tag,this.onClick),r.hooks.pointerCancel.tap(t.tag,function(t){var e,r,o=n.normalizeToPointerEvent(t,i);try{for(var a=tH(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)})},t.prototype.getViewportXY=function(t){var e,n,r=t.offsetX,i=t.offsetY,o=t.clientX,a=t.clientY;if(!this.context.config.supportsCSSTransform||at(r)||at(i)){var l=this.context.eventService.client2Viewport(new lS(o,a));e=l.x,n=l.y}else e=r,n=i;return{x:e,y:n}},t.prototype.bootstrapEvent=function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var i=this.getViewportXY(e),o=i.x,a=i.y;t.viewport.x=o,t.viewport.y=a;var l=this.context.eventService.viewport2Canvas(t.viewport),s=l.x,u=l.y;return t.canvas.x=s,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=uL[t.type]||t.type),t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.getViewportXY(t),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.context.eventService.viewport2Canvas(e.viewport),a=o.x,l=o.y;return e.canvas.x=a,e.canvas.y=l,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=uI.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.prototype.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];aj(i.button)&&(i.button=0),aj(i.buttons)&&(i.buttons=1),aj(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),aj(i.width)&&(i.width=i.radiusX||1),aj(i.height)&&(i.height=i.radiusY||1),aj(i.tiltX)&&(i.tiltX=0),aj(i.tiltY)&&(i.tiltY=0),aj(i.pointerType)&&(i.pointerType="touch"),aj(i.pointerId)&&(i.pointerId=i.identifier||0),aj(i.pressure)&&(i.pressure=i.force||.5),aj(i.twist)&&(i.twist=0),aj(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(aj(t.isPrimary)&&(t.isPrimary=!0),aj(t.width)&&(t.width=1),aj(t.height)&&(t.height=1),aj(t.tiltX)&&(t.tiltX=0),aj(t.tiltY)&&(t.tiltY=0),aj(t.pointerType)&&(t.pointerType="mouse"),aj(t.pointerId)&&(t.pointerId=1),aj(t.pressure)&&(t.pressure=.5),aj(t.twist)&&(t.twist=0),aj(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),cQ=[ja.CIRCLE,ja.ELLIPSE,ja.IMAGE,ja.RECT,ja.LINE,ja.POLYLINE,ja.POLYGON,ja.TEXT,ja.PATH,ja.HTML],cJ=function(){function t(){}return t.prototype.isVisible=function(t,e){var n,r,i=e.cullable;if(!i.enable)return!0;var o=e.getRenderBounds();if(lE.isEmpty(o))return!1;var a=t.getFrustum(),l=null==(r=null==(n=e.parentNode)?void 0:n.cullable)?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,l||js.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==js.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===js.OUTSIDE||n===js.INSIDE)return n;for(var i=js.INSIDE,o=cQ.indexOf(t.nodeName)>-1,a=0,l=r.length;a<l;++a){var s=1<<a;if((n&s)!=0&&(!o||4!==a&&5!==a)){var u=r[a],c=u.normal,f=u.distance;if(i5(c,e.getPositiveFarPoint(r[a]))+f<0)return js.OUTSIDE;i5(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),c0=function(){function t(){this.toSync=new Set}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext,o=e.rBushRoot,a=i.root.ownerDocument.defaultView;this.rBush=o;var l=function(t){t.target.renderable.dirty=!0,r.dirtify()},s=function(t){var e=t.detail.affectChildren,i=t.target;e&&i.forEach(function(t){n.toSync.add(t)});for(var o=i;o;)o.renderable&&n.toSync.add(o),o=o.parentElement;r.dirtify()},u=function(t){var e=t.target;cb.enableSizeAttenuation&&cb.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),cb.enableCSSParsing&&cb.styleValueRegistry.recalc(e),cb.sceneGraphService.dirtifyToRoot(e),r.dirtify()},c=function(t){var e=t.target,i=e.rBushNode;i.aabb&&n.rBush.remove(i.aabb),n.toSync.delete(e),cb.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(jE.MOUNTED,u),a.addEventListener(jE.UNMOUNTED,c),a.addEventListener(jE.ATTR_MODIFIED,l),a.addEventListener(jE.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(jE.MOUNTED,u),a.removeEventListener(jE.UNMOUNTED,c),a.removeEventListener(jE.ATTR_MODIFIED,l),a.removeEventListener(jE.BOUNDS_CHANGED,s),n.toSync.clear()}),r.hooks.endFrame.tap(t.tag,function(){n.syncRTree()})},t.prototype.syncRTree=function(){var t=this,e=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(n){var r=n.rBushNode;r&&r.aabb&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=tV(i.getMin(),2),a=o[0],l=o[1],s=tV(i.getMax(),2),u=s[0],c=s[1];r.aabb||(r.aabb={}),r.aabb.displayObject=n,r.aabb.minX=a,r.aabb.minY=l,r.aabb.maxX=u,r.aabb.maxY=c}!r.aabb||isNaN(r.aabb.maxX)||isNaN(r.aabb.maxX)||isNaN(r.aabb.minX)||isNaN(r.aabb.minY)||e.push(r.aabb)}),this.rBush.load(e),e.length=0,this.toSync.clear()},t.tag="Prepare",t}();(jn=jk||(jk={})).READY="ready",jn.BEFORE_RENDER="beforerender",jn.RERENDER="rerender",jn.AFTER_RENDER="afterrender",jn.BEFORE_DESTROY="beforedestroy",jn.AFTER_DESTROY="afterdestroy",jn.RESIZE="resize",jn.DIRTY_RECTANGLE="dirtyrectangle",jn.RENDERER_CHANGED="rendererchanged";var c1=new cn(jE.MOUNTED),c2=new cn(jE.UNMOUNTED),c5=new cn(jk.BEFORE_RENDER),c3=new cn(jk.RERENDER),c4=new cn(jk.AFTER_RENDER),c6=function(t){function e(e){var n,r,i=t.call(this)||this;i.Element=cL,i.inited=!1,i.context={},i.document=new cX,i.document.defaultView=i,i.customElements=new cY;var o=e.container,a=e.canvas,l=e.offscreenCanvas,s=e.width,u=e.height,c=e.devicePixelRatio,f=e.renderer,p=e.background,h=e.cursor,d=e.document,y=e.requestAnimationFrame,g=e.cancelAnimationFrame,v=e.createImage,b=e.supportsPointerEvents,x=e.supportsTouchEvents,O=e.supportsCSSTransform,w=e.supportsMutipleCanvasesInOneContainer,E=e.useNativeClickEvent,k=e.alwaysTriggerPointerEventOnCanvas,M=e.isTouchEvent,S=e.isMouseEvent;w||function(t,e){if(t){var n="string"==typeof t?t:t.id||uj++;uP[n]&&uP[n].destroy(),uP[n]=e}}(o,i);var _=s,P=u,j=c;return a&&(j=(j=c||uA&&window.devicePixelRatio||1)>=1?Math.ceil(j):1,_=s||("auto"===(n=uN(a,"width"))?a.offsetWidth:parseFloat(n))||a.width/j,P=u||("auto"===(r=uN(a,"height"))?a.offsetHeight:parseFloat(r))||a.height/j),l&&(cb.offscreenCanvas=l),i.devicePixelRatio=j,i.requestAnimationFrame=null!=y?y:uV.bind(cb.globalThis),i.cancelAnimationFrame=null!=g?g:uU.bind(cb.globalThis),i.supportsTouchEvents=null!=x?x:"ontouchstart"in cb.globalThis,i.supportsPointerEvents=null!=b?b:!!cb.globalThis.PointerEvent,i.isTouchEvent=null!=M?M:function(t){return i.supportsTouchEvents&&t instanceof cb.globalThis.TouchEvent},i.isMouseEvent=null!=S?S:function(t){return!cb.globalThis.MouseEvent||t instanceof cb.globalThis.MouseEvent&&(!i.supportsPointerEvents||!(t instanceof cb.globalThis.PointerEvent))},i.initRenderingContext({container:o,canvas:a,width:_,height:P,renderer:f,offscreenCanvas:l,devicePixelRatio:j,cursor:h||"default",background:p||"transparent",createImage:v,document:d,supportsCSSTransform:O,useNativeClickEvent:E,alwaysTriggerPointerEventOnCanvas:k}),i.initDefaultCamera(_,P,f.clipSpaceNearZ),i.initRenderer(f,!0),i}return tB(e,t),e.prototype.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.prototype.initDefaultCamera=function(t,e,n){var r=this,i=new cb.CameraContribution;i.clipSpaceNearZ=n,i.setType(ju.EXPLORING,jc.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(-(t/2),t/2,e/2,-(e/2),.1,1e3),i.canvas=this,i.eventEmitter.on(lA.UPDATED,function(){r.context.renderingContext.renderReasons.add(jw.CAMERA_CHANGED),cb.enableSizeAttenuation&&r.getConfig().renderer.getConfig().enableSizeAttenuation&&r.updateSizeAttenuation()}),this.context.camera=i},e.prototype.updateSizeAttenuation=function(){var t=this.getCamera().getZoom();this.document.documentElement.forEach(function(e){cb.styleValueRegistry.updateSizeAttenuation(e,t)})},e.prototype.getConfig=function(){return this.context.config},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.context.camera},e.prototype.getContextService=function(){return this.context.contextService},e.prototype.getEventService=function(){return this.context.eventService},e.prototype.getRenderingService=function(){return this.context.renderingService},e.prototype.getRenderingContext=function(){return this.context.renderingContext},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(this.readyPromise=new Promise(function(e){t.resolveReadyPromise=function(){e(t)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1),e||this.dispatchEvent(new cn(jk.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),t&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),e||this.dispatchEvent(new cn(jk.AFTER_DESTROY))},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.context.config;n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.context.camera,i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===jf.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new cn(jk.RESIZE,{width:t,height:e}))},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.prototype.removeChildren=function(){this.document.documentElement.removeChildren()},e.prototype.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.prototype.render=function(){var t=this;this.dispatchEvent(c5),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(c3)}),this.dispatchEvent(c4)},e.prototype.run=function(){var t=this,e=function(){t.render(),t.frameId=t.requestAnimationFrame(e)};e()},e.prototype.initRenderer=function(t,e){var n=this;if(void 0===e&&(e=!1),!t)throw Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new li,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new cZ,new c0,new cK([new cJ])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(tz(tz({},cb),this.context)),this.context.renderingService=new cl(cb,this.context),this.context.eventService=new co(cb,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(t,e,!0)):this.context.contextService.initAsync().then(function(){n.initRenderingService(t,e)})},e.prototype.initRenderingService=function(t,e,n){var r=this;void 0===e&&(e=!1),void 0===n&&(n=!1),this.context.renderingService.init(function(){r.inited=!0,e?(n?r.requestAnimationFrame(function(){r.dispatchEvent(new cn(jk.READY))}):r.dispatchEvent(new cn(jk.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new cn(jk.RENDERER_CHANGED)),e||r.getRoot().forEach(function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)}),r.mountChildren(r.getRoot()),t.getConfig().enableAutoRendering&&r.run()})},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init(cb)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),tq([],tV(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(cb)}),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(c2):(c2.target=t,this.dispatchEvent(c2,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.prototype.mountChildren=function(t){var e=this;this.inited?t.isConnected||(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(c1):(c1.target=t,this.dispatchEvent(c1,!0))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName),t.childNodes.forEach(function(t){e.mountChildren(t)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(cr),c8={}.toString,c9=function(t,e){return c8.call(t)==="[object "+e+"]"},c7=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.landmarks=[],e}return tB(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=lf(e),this.relAzimuth=lf(t),this.relRoll=lf(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===ju.EXPLORING){var r=oJ(oQ(),[1,0,0],lh((this.rotateWorld?1:-1)*this.relElevation)),i=oJ(oQ(),[0,1,0],lh((this.rotateWorld?1:-1)*this.relAzimuth)),o=oJ(oQ(),[0,0,1],lh(this.relRoll)),a=o0(oQ(),i,r);a=o0(oQ(),a,o);var l=oP(i9(),a);ou(this.matrix,this.matrix,[0,0,-this.distance]),os(this.matrix,this.matrix,l),ou(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===ju.ORBITING||this.type===ju.EXPLORING?this._getPosition():this.type===ju.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=lp(t,e,0),r=iY(this.position);return iJ(r,r,i1(iq(),this.right,n[0])),iJ(r,r,i1(iq(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=iY(this.position),r=t*this.dollyingStep;return r=Math.max(Math.min(this.distance+t*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===ju.ORBITING||this.type===ju.EXPLORING?this._getDistance():this.type===ju.TRACKING&&iJ(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.cancelLandmarkAnimation=function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},e.prototype.createLandmark=function(t,e){void 0===e&&(e={});var n,r,i,o,a=e.position,l=void 0===a?this.position:a,s=e.focalPoint,u=void 0===s?this.focalPoint:s,c=e.roll,f=e.zoom,p=new cb.CameraContribution;p.setType(this.type,void 0),p.setPosition(l[0],null!=(n=l[1])?n:this.position[1],null!=(r=l[2])?r:this.position[2]),p.setFocalPoint(u[0],null!=(i=u[1])?i:this.focalPoint[1],null!=(o=u[2])?o:this.focalPoint[2]),p.setRoll(null!=c?c:this.roll),p.setZoom(null!=f?f:this.zoom);var h={name:t,matrix:i7(p.getWorldTransform()),right:iY(p.right),up:iY(p.up),forward:iY(p.forward),position:iY(p.getPosition()),focalPoint:iY(p.getFocalPoint()),distanceVector:iY(p.getDistanceVector()),distance:p.getDistance(),dollyingStep:p.getDollyingStep(),azimuth:p.getAzimuth(),elevation:p.getElevation(),roll:p.getRoll(),relAzimuth:p.relAzimuth,relElevation:p.relElevation,relRoll:p.relRoll,zoom:p.getZoom()};return this.landmarks.push(h),h},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=c9(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=c9(e,"Number")?{duration:e}:e,a=o.easing,l=o.duration,s=void 0===l?100:l,u=o.easingFunction,c=o.onfinish,f=void 0===c?void 0:c,p=o.onframe,h=void 0===p?void 0:p;if(0===s){this.syncFromLandmark(r),f&&f();return}this.cancelLandmarkAnimation();var d=r.position,y=r.focalPoint,g=r.zoom,v=r.roll,b=(void 0===u?void 0:u)||cb.EasingFunction(void 0===a?"linear":a),x=function(){n.setFocalPoint(y),n.setPosition(d),n.setRoll(v),n.setZoom(g),n.computeMatrix(),n.triggerUpdate(),f&&f()},O=function(t){void 0===i&&(i=t);var e=t-i;if(e>s)return void x();var r=b(e/s),o=iq(),a=iq(),l=1,u=0;if(i3(o,n.focalPoint,y,r),i3(a,n.position,d,r),u=n.roll*(1-r)+v*r,l=n.zoom*(1-r)+g*r,n.setFocalPoint(o),n.setPosition(a),n.setRoll(u),n.setZoom(l),i8(o,y)+i8(a,d)<=.01&&void 0==g&&void 0==v)return void x();n.computeMatrix(),n.triggerUpdate(),e<s&&(h&&h(r),n.landmarkAnimationID=n.canvas.requestAnimationFrame(O))};this.canvas.requestAnimationFrame(O)}},e.prototype.syncFromLandmark=function(t){this.matrix=ot(this.matrix,t.matrix),this.right=iZ(this.right,t.right),this.up=iZ(this.up,t.up),this.forward=iZ(this.forward,t.forward),this.position=iZ(this.position,t.position),this.focalPoint=iZ(this.focalPoint,t.focalPoint),this.distanceVector=iZ(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(lT);cb.CameraContribution=c7;var ft=function(){function t(t,e){this.type=t,this.target=e,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),fe=0,fn=new WeakMap,fr=function(){function t(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return t.prototype.enqueue=function(t){var e,n=this.observer.records,r=n.length;if(n.length>0){var i=function(t,e){return t===e?t:jS&&(t===jS||t===jM)?jS:null}(n[r-1],t);if(i){n[r-1]=i;return}}else{e=this.observer,fl.push(e),fa||(fa=!0,void 0!==cb.globalThis?cb.globalThis.setTimeout(fs):fs())}n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(jE.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(jE.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(jE.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(jE.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(jE.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(jE.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=fn.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}},this)},t.prototype.handleEvent=function(t){switch(t.stopImmediatePropagation(),t.type){case jE.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=jM=new ft("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===cc.ADDITION?null:t.prevValue;fo(n,function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(r)||-1!==t.attributeFilter.indexOf(i))){var n;return t.attributeOldValue?(n=o,jS||((jS=ft.copy(jM)).oldValue=n),jS):e}});break;case jE.REMOVED:case jE.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===jE.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=jM=new ft("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,fo(n,function(t){if(t.childList)return e})}jM=jS=void 0},t}();function fi(t){this.callback=t,this.nodes=[],this.records=[],this.uid=fe++}function fo(t,e){for(var n=t;n;n=n.parentNode){var r=fn.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var l=e(a);l&&o.enqueue(l)}}}}fi.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw SyntaxError();var n,r=fn.get(t);r||fn.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new fr(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},fi.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=fn.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}},this),this.records=[]},fi.prototype.takeRecords=function(){var t=this.records;return this.records=[],t};var fa=!1,fl=[];function fs(){fa=!1;var t=fl;fl=[],t.sort(function(t,e){return t.uid-e.uid});var e=!1;t.forEach(function(t){var n=t.takeRecords();t.nodes.forEach(function(e){var n=fn.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(t.callback(n,t),e=!0)}),e&&fs()}var fu=function(t,e,n){return t<e?e:t>n?n:t},fc={}.toString,ff=function(t){return"[object Number]"===fc.call(t)},fp=function(t){return null==t},fh=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return tB(e,t),e}(u9),fd=0,fy=function(){function t(t,e){var n;this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(fd++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(n=this.effect)?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(Error())}}),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(Error())}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;isNaN(t=Number(t))||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),!isNaN(t=Number(t))&&(this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises())))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&0>=Number(this._currentTime))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){return this._totalDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){var t=this;if(this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var e=new fh(null,this,this.currentTime,null);setTimeout(function(){t.oncancel(e)})}},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){!this._idle&&!this._paused&&(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw Error("Unable to rewind negative playback rate animation with infinite duration")},t.prototype.persist=function(){throw Error(lP)},t.prototype.addEventListener=function(t,e,n){throw Error(lP)},t.prototype.removeEventListener=function(t,e,n){throw Error(lP)},t.prototype.dispatchEvent=function(t){throw Error(lP)},t.prototype.commitStyles=function(){throw Error(lP)},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null==(t=this.effect)?void 0:t.update(-1)):this._inEffect=!!(null==(e=this.effect)?void 0:e.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new fh(null,this,this.currentTime,t);setTimeout(function(){e.onfinish&&e.onfinish(n)})}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new fh(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),fg="function"==typeof Float32Array,fm=function(t,e){return 1-3*e+3*t},fv=function(t,e){return 3*e-6*t},fb=function(t){return 3*t},fx=function(t,e,n){return((fm(e,n)*t+fv(e,n))*t+fb(e))*t},fO=function(t,e,n){return 3*fm(e,n)*t*t+2*fv(e,n)*t+fb(e)},fw=function(t,e,n,r,i){var o,a,l=0;do(o=fx(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},fE=function(t,e,n,r){for(var i=0;i<4;++i){var o=fO(e,n,r);if(0===o)break;var a=fx(e,n,r)-t;e-=a/o}return e},fk=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=fg?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=fx(.1*o,t,n);var a=function(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=.1;var a=r+(e-i[--o])/(i[o+1]-i[o])*.1,l=fO(a,t,n);return l>=.001?fE(e,a,t,n):0===l?a:fw(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:fx(a(t),e,r)}},fM=function(t){return Math.pow(t,2)},fS=function(t){return Math.pow(t,3)},f_=function(t){return Math.pow(t,4)},fP=function(t){return Math.pow(t,5)},fj=function(t){return Math.pow(t,6)},fA=function(t){return 1-Math.cos(t*Math.PI/2)},fT=function(t){return 1-Math.sqrt(1-t*t)},fC=function(t){return t*t*(3*t-2)},fN=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},fL=function(t,e){void 0===e&&(e=[]);var n=tV(e,2),r=n[0],i=n[1],o=fu(Number(void 0===r?1:r),1,10),a=fu(Number(void 0===i?.5:i),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin(2*Math.PI*(t-1-a/(2*Math.PI)*Math.asin(1/o))/a)},fI=function(t,e,n){void 0===e&&(e=[]);var r=tV(e,4),i=r[0],o=void 0===i?1:i,a=r[1],l=void 0===a?100:a,s=r[2],u=void 0===s?10:s,c=r[3],f=void 0===c?0:c;o=fu(o,.1,1e3),l=fu(l,.1,1e3),u=fu(u,.1,1e3),f=fu(f,.1,1e3);var p=Math.sqrt(l/o),h=u/(2*Math.sqrt(l*o)),d=h<1?p*Math.sqrt(1-h*h):0,y=h<1?(h*p+-f)/d:-f+p,g=n?n*t/1e3:t;return(g=h<1?Math.exp(-g*h*p)*(+Math.cos(d*g)+y*Math.sin(d*g)):(1+y*g)*Math.exp(-g*p),0===t||1===t)?t:1-g},fR=function(t,e){void 0===e&&(e=[]);var n=tV(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(fu(t,0,1)*i)/i},fD=function(t,e){void 0===e&&(e=[]);var n=tV(e,4);return fk(n[0],n[1],n[2],n[3])(t)},fF=fk(.42,0,1,1),fB=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},fz=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},fW=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},f$={steps:fR,"step-start":function(t){return fR(t,[1,"start"])},"step-end":function(t){return fR(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":fD,ease:function(t){return fD(t,[.25,.1,.25,1])},in:fF,out:fB(fF),"in-out":fz(fF),"out-in":fW(fF),"in-quad":fM,"out-quad":fB(fM),"in-out-quad":fz(fM),"out-in-quad":fW(fM),"in-cubic":fS,"out-cubic":fB(fS),"in-out-cubic":fz(fS),"out-in-cubic":fW(fS),"in-quart":f_,"out-quart":fB(f_),"in-out-quart":fz(f_),"out-in-quart":fW(f_),"in-quint":fP,"out-quint":fB(fP),"in-out-quint":fz(fP),"out-in-quint":fW(fP),"in-expo":fj,"out-expo":fB(fj),"in-out-expo":fz(fj),"out-in-expo":fW(fj),"in-sine":fA,"out-sine":fB(fA),"in-out-sine":fz(fA),"out-in-sine":fW(fA),"in-circ":fT,"out-circ":fB(fT),"in-out-circ":fz(fT),"out-in-circ":fW(fT),"in-back":fC,"out-back":fB(fC),"in-out-back":fz(fC),"out-in-back":fW(fC),"in-bounce":fN,"out-bounce":fB(fN),"in-out-bounce":fz(fN),"out-in-bounce":fW(fN),"in-elastic":fL,"out-elastic":fB(fL),"in-out-elastic":fz(fL),"out-in-elastic":fW(fL),spring:fI,"spring-in":fI,"spring-out":fB(fI),"spring-in-out":fz(fI),"spring-out-in":fW(fI)},fG=function(t){var e;return("-"===(e=(e=t).replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())})).charAt(0)?e.substring(1):e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},fH=function(t){return t};function fV(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var fU="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",fq=RegExp("cubic-bezier\\("+fU+","+fU+","+fU+","+fU+"\\)"),fY=/steps\(\s*(\d+)\s*\)/,fX=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function fK(t){var e=fq.exec(t);if(e)return fk.apply(void 0,tq([],tV(e.slice(1).map(Number)),!1));var n=fY.exec(t);if(n)return fV(Number(n[1]),0);var r=fX.exec(t);return r?fV(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):f$[fG(t)]||f$.linear}function fZ(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var fQ=function(t,e,n){return function(r){var i=function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)){for(var i=e.length,o=n.length,a=Math.max(i,o),l=[],s=0;s<a;s++)l.push(t(e[s<i?s:i-1],n[s<o?s:o-1],r));return l}throw Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r);return!cb.enableCSSParsing&&ff(i)?i:n(i)}},fJ=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=fH,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=fK(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function f0(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}return e.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),e}(t));for(var n=t.map(function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(!isFinite(i=Number(i)))throw Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(fp(a))r=!1;else{if(a<i)throw TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter(function(t){return Number(t.offset)>=0&&1>=Number(t.offset)}),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!=(t=n[r-1].offset)?t:1),r>1&&(n[0].computedOffset=Number(null!=(e=n[0].offset)?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var l=n[a].computedOffset;if(!fp(l)&&!fp(o)){for(var s=1;s<a-i;s++)n[i+s].computedOffset=o+(Number(l)-o)*s/(a-i);i=a,o=Number(l)}}}(),n}var f1="backwards|forwards|both|none".split("|"),f2="reverse|alternate|alternate-reverse".split("|"),f5=function(){function t(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=("number"==typeof(r=null!=(a=n)?a:{duration:"auto"})&&(r=isNaN(r)?{duration:"auto"}:{duration:r}),l=a=r,s=new fJ,"number"!=typeof l||isNaN(l)?void 0!==l&&Object.keys(l).forEach(function(t){void 0!==l[t]&&null!==l[t]&&"auto"!==l[t]&&(("number"==typeof s[t]||"duration"===t)&&("number"!=typeof l[t]||isNaN(l[t]))||"fill"===t&&-1===f1.indexOf(l[t])||("direction"!==t||-1!==f2.indexOf(l[t]))&&(s[t]=l[t]))}):s.duration=l,s),this.timing.effect=this,this.timing.activeDuration=Math.abs((0===(i=u=this.timing).duration||0===i.iterations?0:("auto"===i.duration?0:Number(i.duration))*(null!=(o=i.iterations)?o:1))/(u.playbackRate||1)),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=f0(e,this.timing),this.interpolations=(c=this.normalizedKeyframes,f=this.timing,p=this.target,d=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;o<i.length-1;o++){var a=o,l=o+1,s=i[a].computedOffset,u=i[l].computedOffset,c=s,f=u;0===o&&(c=-1/0,0===u&&(l=a)),o===i.length-2&&(f=1/0,1===s&&(a=l)),n.push({applyFrom:c,applyTo:f,startOffset:i[a].computedOffset,endOffset:i[l].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:function(t,e,n,r){var i=ui[t];if(i&&i.syntax&&i.int){var o=cb.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(cb.enableCSSParsing){var s=cb.styleValueRegistry.parseProperty(t,e,r,!1),u=cb.styleValueRegistry.parseProperty(t,n,r,!1);a=cb.styleValueRegistry.computeProperty(t,s,r,!1),l=cb.styleValueRegistry.computeProperty(t,u,r,!1)}else{var c=o.parserWithCSSDisabled;a=c?c(e,r):e,l=c?c(n,r):n}var f=o.mixer(a,l,r);if(f){var p=fQ.apply(void 0,tq([],tV(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return fQ(!1,!0,function(t){return t?n:e})}(r,i[a].value,i[l].value,e)})}return n.sort(function(t,e){return t.startOffset-e.startOffset}),n}(h=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(fZ(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:fK(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(c,f),p),function(t,e){if(null!==e)d.filter(function(t){return e>=t.applyFrom&&e<t.applyTo}).forEach(function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.setAttribute(n.property,n.interpolation(o),!1,!1)});else for(var n in h)fZ(n)&&t.setAttribute(n,null)});var g=cb.globalThis.Proxy;this.computedTiming=g?new g(this.timing,{get:function(t,e){if("duration"===e)return"auto"===t.duration?0:t.duration;if("fill"===e)return"auto"===t.fill?"none":t.fill;if("localTime"===e)return y.animation&&y.animation.currentTime||null;if("currentIteration"===e)return y.animation&&"running"===y.animation.playState?t.currentIteration||0:null;if("progress"===e)return y.animation&&"running"===y.animation.playState?t.progress||0:null;return t[e]},set:function(){return!0}}):this.timing}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=function(t,e,n){var r,i,o,a,l,s,u,c=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),f=function(t,e,n,r,i){switch(r){case 1:if("backwards"===e||"both"===e)return 0;return null;case 3:return n-i;case 2:if("forwards"===e||"both"===e)return t;return null;case 0:return null}}(t,n.fill,e,c,n.delay);if(null===f)return null;var p="auto"===n.duration?0:n.duration,h=(r=n.iterations,o=i=n.iterationStart,0===p?1!==c&&(o+=r):o+=f/p,o),d=(a=n.iterationStart,l=n.iterations,0==(s=h===1/0?a%1:h%1)&&2===c&&0!==l&&(0!==f||0===p)&&(s=1),s),y=(u=n.iterations,2===c&&u===1/0?1/0:1===d?Math.floor(h)-1:Math.floor(h)),g=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,y,d);return n.currentIteration=y,n.progress=g,n.easingFunction(g)}(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=f0(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach(function(n){e.timing[n]=t[n]})},t}();function f3(t,e){return Number(t.id)-Number(e.id)}var f4=function(){function t(t){var e=this;this.document=t,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(f3),e.animations=e.tick(t,!0,e.animations)[0],n.forEach(function(e){e[1](t)}),e.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t,e,n){var r=new fy(new f5(t,e,n),this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(f3),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach(function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)}),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null==t||t.applyInterpolations()}),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF(function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()})},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],l=[],s=[],u=[];return n.forEach(function(n){n.tick(t,e),n._inEffect?(l.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?s.push(n):u.push(n)}),(r=this.pendingEffects).push.apply(r,tq([],tV(a),!1)),(i=this.pendingEffects).push.apply(i,tq([],tV(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();function f6(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function f8(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function f9(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function f7(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function pt(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function pe(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function pn(t){return f7(t)||f8(t)}function pr(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function pi(t,e=!0){let{transformations:n}=t.getOptions(),[,r,i]=n.find(t=>"polar"===t[0]);return e?[180*+r/Math.PI,180*+i/Math.PI]:[r,i]}cb.EasingFunction=fK,cb.AnimationTimeline=f4;let po=(t={})=>{var e,n;let r=Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t);return Object.assign(Object.assign({},r),(e=r.startAngle,n=r.endAngle,e%=2*Math.PI,n%=2*Math.PI,e<0&&(e=2*Math.PI+e),n<0&&(n=2*Math.PI+n),e>=n&&(n+=2*Math.PI),{startAngle:e,endAngle:n}))},pa=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=po(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};pa.props={};let pl=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),ps=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=pl(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...pa({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};function pu(t,e){let n,r;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}function pc(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function pf(t){return t.map((t,e)=>e)}function pp(t){return t[t.length-1]}function ph(t,e){let n=[[],[]];return t.forEach(t=>{n[+!e(t)].push(t)}),n}function pd([t,e],[n,r]){return[t-n,e-r]}ps.props={};function py([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function pg([t,e]){return Math.atan2(e,t)}function pm([t,e]){return pg([t,e])+Math.PI/2}function pv(t,e){let n=pg(t),r=pg(e);return n<r?r-n:2*Math.PI-(n-r)}function pb(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(let[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);let o=n-e,a=i-r;return[e,r,o,a]}function px([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function pO(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function pw(t,e,n,r,i){let o=pg(pd(r,e))+Math.PI,a=pg(pd(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function pE(t,e,n,r="y",i="between",o=!1){let a="y"===r||!0===r?n:e,l=((t,e)=>{if("y"===t||!0===t)if(e)return 180;else return 90;return 90*!!e})(r,o),s=pf(a),[u,c]=pu(s,t=>a[t]),f=new ec({domain:[u,c],range:[0,100]}),p=t=>iH(a[t])&&!Number.isNaN(a[t])?f.map(a[t]):0,h={between:e=>`${t[e]} ${p(e)}%`,start:e=>0===e?`${t[e]} ${p(e)}%`:`${t[e-1]} ${p(e)}%, ${t[e]} ${p(e)}%`,end:e=>e===t.length-1?`${t[e]} ${p(e)}%`:`${t[e]} ${p(e)}%, ${t[e+1]} ${p(e)}%`},d=s.sort((t,e)=>p(t)-p(e)).map(h[i]||h.between).join(",");return`linear-gradient(${l}deg, ${d})`}function pk(t){let[e,n,r,i]=t;return[i,e,n,r]}function pM(t,e,n){let[r,i,,o]=f6(t)?pk(e):e,[a,l]=n,s=t.getCenter(),u=pm(pd(r,s)),c=pm(pd(i,s)),f=c===u&&a!==l?c+2*Math.PI:c;return{startAngle:u,endAngle:f-u>=0?f:2*Math.PI+f,innerRadius:py(o,s),outerRadius:py(r,s)}}function pS(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function p_(t,e){if(!f8(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function pP(t){if(1===t.length)return t[0];let[[e,n,r=0],[i,o,a=0]]=t;return[(e+i)/2,(n+o)/2,(r+a)/2]}function pj(t){return new pA([t],null,t,t.ownerDocument)}class pA{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=o,this._facetElements=a}selectAll(t){return new pA("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)}selectFacetAll(t){let e="string"==typeof t?this._parent.querySelectorAll(t):t;return new pA(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){let e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new pA([e],null,e,this._document)}append(t){let e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){let r=this._data[t],[i,o]=Array.isArray(r)?r:[r,null],a=e(i,t);a.__data__=i,null!==o&&(a.__fromElements__=o),this._parent.appendChild(a),n.push(a)}return new pA(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){let r=this._elements[t],i=e(r.__data__,t);r.appendChild(i),n.push(i)}return new pA(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new pA([i],null,this._parent,this._document);let o="string"==typeof e?this.createElement(e):e();return o.id=t,n&&(o.className=n),r.appendChild(o),new pA([o],null,this._parent,this._document)}data(t,e=t=>t,n=()=>null){let r=[],i=[],o=new Set(this._elements),a=[],l=new Set,s=new Map(this._elements.map((t,n)=>[e(t.__data__,n),t])),u=new Map(this._facetElements.map((t,n)=>[e(t.__data__,n),t])),c=ij(this._elements,t=>n(t.__data__));for(let f=0;f<t.length;f++){let p=t[f],h=e(p,f),d=n(p,f);if(s.has(h)){let t=s.get(h);t.__data__=p,t.__facet__=!1,i.push(t),o.delete(t),s.delete(h)}else if(u.has(h)){let t=u.get(h);t.__data__=p,t.__facet__=!0,i.push(t),u.delete(h)}else if(c.has(h)){let t=c.get(h);for(let e of(a.push([p,t]),t))o.delete(e);c.delete(h)}else if(s.has(d)){let t=s.get(d);t.__toData__?t.__toData__.push(p):t.__toData__=[p],l.add(t),o.delete(t)}else r.push(p)}let f=[new pA([],r,this._parent,this._document),new pA(i,null,this._parent,this._document),new pA(o,null,this._parent,this._document),new pA([],a,this._parent,this._document),new pA(l,null,this._parent,this._document)];return new pA(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new pA(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=pA.registry[t];return e?new e:nV(`Unknown node type: ${t}`)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){let o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)}remove(){for(let t=0;t<this._elements.length;t++){let e=this._transitions[t];e?Promise.all((Array.isArray(e)?e:[e]).map(t=>t.finished)).then(()=>{this._elements[t].remove()}):this._elements[t].remove()}return new pA([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e<this._elements.length;e++){let n=this._elements[e];t(n.__data__,e,n)}return this}attr(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o[t]=n(r,i,o))})}style(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o.style[t]=n(r,i,o))})}transition(t){let e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each(function(t,r,i){n[r]=e(t,r,i)})}on(t,e){return this.each(function(n,r,i){i.addEventListener(t,e)}),this}call(t,...e){return t(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}pA.registry={g:cB,rect:cU,circle:cR,path:cG,text:cq,ellipse:cF,image:cW,line:c$,polygon:cH,polyline:cV,html:cz};var pT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let pC={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},pN={style:{shape:(t,e)=>{let{shape:n,radius:r}=t,i=pT(t,["shape","radius"]),o=nY(i,"pointer"),a=nY(i,"pin"),{shape:l}=o,s=pT(o,["shape"]),{shape:u}=a,c=pT(a,["shape"]),{coordinate:f,theme:p}=e;return(t,e)=>{let n=t.map(t=>f.invert(t)),[o,a,h]=function(t,e){let{transformations:n}=t.getOptions(),[,...r]=n.find(t=>t[0]===e);return r}(f,"polar"),d=f.clone(),{color:y}=e,g=ps({startAngle:o,endAngle:a,innerRadius:h,outerRadius:r});g.push(["cartesian"]),d.update({transformations:g});let v=n.map(t=>d.map(t)),[b,x]=pP(v),[O,w]=f.getCenter(),E=Object.assign(Object.assign({x1:b,y1:x,x2:O,y2:w,stroke:y},s),i),k=Object.assign(Object.assign({cx:O,cy:w,stroke:y},c),i),M=pj(new cB);return nJ(l)||("function"==typeof l?M.append(()=>l(v,e,d,p)):M.append("line").call(pO,E).node()),nJ(u)||("function"==typeof u?M.append(()=>u(v,e,d,p)):M.append("circle").call(pO,k).node()),M.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},pL={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}},pI=t=>{var e;let{data:n={},scale:r={},style:i={},animate:o={},transform:a=[]}=t,l=pT(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:u,target:c,total:f,scale:p}=function(t,e){let{name:n="score",target:r,total:i,percent:o,thresholds:a=[]}=function(t){if(iH(t)){let e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}(t),l=o||r,s=o?1:i,u=Object.assign({y:{domain:[0,s]}},e);return a.length?{targetData:[{x:n,y:l,color:"target"}],totalData:a.map((t,e)=>({x:n,y:e>=1?t-a[e-1]:t,color:e})),target:l,total:s,scale:u}:{targetData:[{x:n,y:l,color:"target"}],totalData:[{x:n,y:l,color:"target"},{x:n,y:s-l,color:"total"}],target:l,total:s,scale:u}}(n,r),h=nY(i,"text"),d=(e=["pointer","pin"],Object.fromEntries(Object.entries(i).filter(([t])=>e.find(e=>t.startsWith(e)))));return[nz({},pC,Object.assign({type:"interval",transform:[{type:"stackY"}],data:u,scale:p,style:nY(i,"arc"),animate:"object"==typeof o?nY(o,"arc"):o},l)),nz({},pC,pN,Object.assign({type:"point",data:s,scale:p,style:d,animate:"object"==typeof o?nY(o,"indicator"):o},l)),nz({},pL,{style:Object.assign({text:function(t,{target:e,total:n}){let{content:r}=t;return r?r(e,n):e.toString()}(h,{target:c,total:f})},h),animate:"object"==typeof o?nY(o,"text"):o})]};pI.props={};let pR=Math.PI/180;function pD(t){return t.text}function pF(){return"serif"}function pB(){return"normal"}function pz(t){return t.value}function pW(){return 90*~~(2*Math.random())}function p$(){return 1}function pG(){}function pH(t){let e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function pV(t){let e=[],n=-1;for(;++n<t;)e[n]=0;return e}function pU(t){return"function"==typeof t?t:function(){return t}}let pq={archimedean:pH,rectangular:function(t){let e=4*t[0]/t[1],n=0,r=0;return function(t){let i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}};var pY=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let pX={size:[500,500],fontSize:[14,28]};function pK(t){return new Promise((e,n)=>{if(t instanceof HTMLImageElement)return void e(t);if("string"==typeof t){let r=new Image;r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()};return}n()})}let pZ=t=>e=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let n=Object.assign({},pX,t),r=function(){let t=[256,256],e=pD,n=pF,r=pz,i=pB,o=pW,a=p$,l=pH,s=Math.random,u=pG,c=[],f=null,p=1/0,h={};return h.start=function(){let[d,y]=t,g=function(t){t.width=t.height=1;let e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;let n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(document.createElement("canvas")),v=h.board?h.board:pV((t[0]>>5)*t[1]),b=c.length,x=[],O=c.map(function(t,l,s){return t.text=e.call(this,t,l,s),t.font=n.call(this,t,l,s),t.style=pB.call(this,t,l,s),t.weight=i.call(this,t,l,s),t.rotate=o.call(this,t,l,s),t.size=~~r.call(this,t,l,s),t.padding=a.call(this,t,l,s),t}).sort(function(t,e){return e.size-t.size}),w=-1,E=h.board?[{x:0,y:0},{x:d,y:y}]:void 0;function k(){let e=Date.now();for(;Date.now()-e<p&&++w<b;){let e=O[w];e.x=d*(s()+.5)>>1,e.y=y*(s()+.5)>>1,function(t,e,n,r){if(e.sprite)return;let i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);let a=0,l=0,s=0,u=n.length;for(--r;++r<u;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;let t=i.measureText(e.text+"m").width*o,u=e.size<<1;if(e.rotate){let n=Math.sin(e.rotate*pR),r=Math.cos(e.rotate*pR),i=t*r,o=t*n,a=u*r,l=u*n;t=Math.max(Math.abs(i+l),Math.abs(i-l))+31>>5<<5,u=~~Math.max(Math.abs(o+a),Math.abs(o-a))}else t=t+31>>5<<5;if(u>s&&(s=u),a+t>=2048&&(a=0,l+=s,s=0),l+u>=2048)break;i.translate((a+(t>>1))/o,(l+(u>>1))/o),e.rotate&&i.rotate(e.rotate*pR),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=u,e.xoff=a,e.yoff=l,e.x1=t>>1,e.y1=u>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}let c=i.getImageData(0,0,2048/o,2048/o).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;let t=e.width,i=t>>5,o=e.y1-e.y0;for(let t=0;t<o*i;t++)f[t]=0;if(null==(a=e.xoff))return;l=e.yoff;let s=0,u=-1;for(let n=0;n<o;n++){for(let e=0;e<t;e++){let t=i*n+(e>>5),r=c[(l+n)*2048+(a+e)<<2]?1<<31-e%32:0;f[t]|=r,s|=r}s?u=n:(e.y0++,o--,n--,l++)}e.y1=e.y0+u,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}(g,e,O,w),e.hasText&&function(e,n,r){let i=n.x,o=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),u=l(t),c=.5>s()?1:-1,f,p=-c,h,d;for(;(f=u(p+=c))&&!(Math.min(Math.abs(h=~~f[0]),Math.abs(d=~~f[1]))>=a);){;if((n.x=i+h,n.y=o+d,!(n.x+n.x0<0)&&!(n.y+n.y0<0)&&!(n.x+n.x1>t[0])&&!(n.y+n.y1>t[1]))&&(!r||!function(t,e,n){n>>=5;let r=t.sprite,i=t.width>>5,o=t.x-(i<<4),a=127&o,l=32-a,s=t.y1-t.y0,u=(t.y+t.y0)*n+(o>>5),c;for(let t=0;t<s;t++){c=0;for(let n=0;n<=i;n++)if((c<<l|(n<i?(c=r[t*i+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}(n,e,t[0]))&&(!r||n.x+n.x1>r[0].x&&n.x+n.x0<r[1].x&&n.y+n.y1>r[0].y&&n.y+n.y0<r[1].y)){let r=n.sprite,i=n.width>>5,o=t[0]>>5,a=n.x-(i<<4),l=127&a,s=32-l,u=n.y1-n.y0,c,f=(n.y+n.y0)*o+(a>>5);for(let t=0;t<u;t++){c=0;for(let n=0;n<=i;n++)e[f+n]|=c<<s|(n<i?(c=r[t*i+n])>>>l:0);f+=o}return delete n.sprite,!0}}return!1}(v,e,E)&&(u.call(null,"word",{cloud:h,word:e}),x.push(e),E?h.hasImage||function(t,e){let n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}(E,e):E=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}h._tags=x,h._bounds=E,w>=b&&(h.stop(),u.call(null,"end",{cloud:h,words:x,bounds:E}))}return f&&clearInterval(f),f=setInterval(k,0),k(),h},h.stop=function(){return f&&(clearInterval(f),f=null),h},h.createMask=e=>{let n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;let o=r>>5,a=pV((r>>5)*i);n.width=r,n.height=i;let l=n.getContext("2d");l.drawImage(e,0,0,e.width,e.height,0,0,r,i);let s=l.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){let n=o*t+(e>>5),i=t*r+e<<2,l=s[i]>=250&&s[i+1]>=250&&s[i+2]>=250?1<<31-e%32:0;a[n]|=l}h.board=a,h.hasImage=!0},h.timeInterval=function(t){p=null==t?1/0:t},h.words=function(t){c=t},h.size=function(e=[]){t=[+e[0],+e[1]]},h.text=function(t){e=pU(t)},h.font=function(t){n=pU(t)},h.fontWeight=function(t){i=pU(t)},h.rotate=function(t){o=pU(t)},h.spiral=function(t){l=pq[t]||t},h.fontSize=function(t){r=pU(t)},h.padding=function(t){a=pU(t)},h.random=function(t){s=pU(t)},h.on=function(t){u=pU(t)},h}();yield({set(t,e,i){if(void 0===n[t])return this;let o=e?e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},setAsync(t,e,i){var o,a,l,s;return o=this,a=void 0,l=void 0,s=function*(){if(void 0===n[t])return this;let o=e?yield e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},new(l||(l=Promise))(function(t,e){function n(t){try{i(s.next(t))}catch(t){e(t)}}function r(t){try{i(s.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof l?i:new l(function(t){t(i)})).then(n,r)}i((s=s.apply(o,a||[])).next())})}}).set("fontSize",t=>{let n=e.map(t=>t.value);var r=[ih(n),id(n)];if("function"==typeof t)return t;if(Array.isArray(t)){let[e,n]=t;if(!r)return()=>(n+e)/2;let[i,o]=r;return o===i?()=>(n+e)/2:({value:t})=>(n-e)/(o-i)*(t-i)+e}return()=>t}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",pK,r.createMask),r.words([...e]);let i=r.start(),[o,a]=n.size,l=[{x:0,y:0},{x:o,y:a}],{_bounds:s=l,_tags:u,hasImage:c}=i,f=u.map(t=>{var{x:e,y:n}=t;return Object.assign(Object.assign({},pY(t,["x","y"])),{x:e+o/2,y:n+a/2})}),[{x:p,y:h},{x:d,y:y}]=s,g={text:"",value:0,opacity:0,fontSize:0};return f.push(Object.assign(Object.assign({},g),{x:c?0:p,y:c?0:h}),Object.assign(Object.assign({},g),{x:c?o:d,y:c?a:y})),f},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};pZ.props={};var pQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let pJ=(t,e)=>({size:[t,e]}),p0=(t,e)=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}}),p1=(t,e)=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let{width:n,height:r}=e,{data:i,encode:o={},scale:a,style:l={},layout:s={}}=t,u=pQ(t,["data","encode","scale","style","layout"]),c=function(t,e){let{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(i,o),f=yield pZ(Object.assign(Object.assign({},pJ(n,r)),s))(c);return nz({},p0(n,r),Object.assign(Object.assign({data:f,encode:o,scale:a,style:l},u),{axis:!1}))},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};function p2(t,e,n){return Math.max(e,Math.min(t,n))}function p5(t,e=10){return"number"!=typeof t||1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}p1.props={};var p3=function(t){return"function"==typeof t};let p4={pin:function(t,e,n){let r=4*n/3,i=Math.max(r,2*n),o=r/2,a=o+e-i/2,l=Math.asin(o/((i-o)*.85)),s=Math.sin(l)*o,u=Math.cos(l)*o,c=t-u,f=a+s,p=a+o/Math.sin(l);return`
|
|
10
|
+
(self.webpackChunk_nocobase_plugin_data_visualization=self.webpackChunk_nocobase_plugin_data_visualization||[]).push([["950"],{823:function(t,e,n){"use strict";let r,i,o,a;n.r(e),n.d(e,{Sankey:function(){return Hk},Mix:function(){return HY},Bar:function(){return G2},Stock:function(){return HS},Rose:function(){return Hd},Sunburst:function(){return HK},Histogram:function(){return Hv},Funnel:function(){return G9},DualAxes:function(){return G6},G2:function(){return tw},Liquid:function(){return HC},Column:function(){return G3},CirclePacking:function(){return Hz},Radar:function(){return Ha},Box:function(){return Hw},Scatter:function(){return Hi},Waterfall:function(){return Hg},Treemap:function(){return HR},BidirectionalBar:function(){return HH},Area:function(){return G0},WordCloud:function(){return HL},Line:function(){return Ht},RadialBar:function(){return HF},Gauge:function(){return HA},Venn:function(){return HU},Tiny:function(){return Hp},Heatmap:function(){return Hx},Bullet:function(){return HP},measureTextWidth:function(){return HQ},Base:function(){return GQ},Violin:function(){return H$},Pie:function(){return Hn}});var l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,S,_,P,j,A,T,C,N,L,I,R,D,F,B,z,W,$,G,H,V,U,q,Y,X,K,Z,Q,J,tt,te,tn,tr,ti,to,ta,tl,ts,tu,tc,tf,tp,th,td,ty,tg,tm={};n.r(tm),n.d(tm,{geoAlbers:function(){return rU},geoAlbersUsa:function(){return rq},geoAzimuthalEqualArea:function(){return r5},geoAzimuthalEqualAreaRaw:function(){return r2},geoAzimuthalEquidistant:function(){return rR},geoAzimuthalEquidistantRaw:function(){return rI},geoConicConformal:function(){return r7},geoConicConformalRaw:function(){return r9},geoConicEqualArea:function(){return rG},geoConicEqualAreaRaw:function(){return r$},geoConicEquidistant:function(){return rK},geoConicEquidistantRaw:function(){return rX},geoEqualEarth:function(){return r6},geoEqualEarthRaw:function(){return r4},geoEquirectangular:function(){return rz},geoEquirectangularRaw:function(){return rB},geoGnomonic:function(){return ie},geoGnomonicRaw:function(){return it},geoIdentity:function(){return rY},geoMercator:function(){return rQ},geoMercatorRaw:function(){return rZ},geoNaturalEarth1:function(){return rF},geoNaturalEarth1Raw:function(){return rD},geoOrthographic:function(){return rV},geoOrthographicRaw:function(){return rH},geoProjection:function(){return rN},geoProjectionMutator:function(){return rL},geoStereographic:function(){return ii},geoStereographicRaw:function(){return ir},geoTransverseMercator:function(){return r1},geoTransverseMercatorRaw:function(){return r0}});var tv={};n.r(tv),n.d(tv,{add:function(){return oW},adjoint:function(){return oa},clone:function(){return i7},copy:function(){return ot},create:function(){return i9},determinant:function(){return ol},equals:function(){return oU},exactEquals:function(){return oV},frob:function(){return oz},fromQuat:function(){return oP},fromQuat2:function(){return ow},fromRotation:function(){return om},fromRotationTranslation:function(){return oO},fromRotationTranslationScale:function(){return oS},fromRotationTranslationScaleOrigin:function(){return o_},fromScaling:function(){return og},fromTranslation:function(){return oy},fromValues:function(){return oe},fromXRotation:function(){return ov},fromYRotation:function(){return ob},fromZRotation:function(){return ox},frustum:function(){return oj},getRotation:function(){return oM},getScaling:function(){return ok},getTranslation:function(){return oE},identity:function(){return or},invert:function(){return oo},lookAt:function(){return oD},mul:function(){return oq},multiply:function(){return os},multiplyScalar:function(){return oG},multiplyScalarAndAdd:function(){return oH},ortho:function(){return oI},orthoNO:function(){return oL},orthoZO:function(){return oR},perspective:function(){return oT},perspectiveFromFieldOfView:function(){return oN},perspectiveNO:function(){return oA},perspectiveZO:function(){return oC},rotate:function(){return of},rotateX:function(){return op},rotateY:function(){return oh},rotateZ:function(){return od},scale:function(){return oc},set:function(){return on},str:function(){return oB},sub:function(){return oY},subtract:function(){return o$},targetTo:function(){return oF},translate:function(){return ou},transpose:function(){return oi}});var tb={};n.r(tb),n.d(tb,{frequency:function(){return A5},id:function(){return A3},name:function(){return A4},weight:function(){return A2}});var tx={};n.r(tx),n.d(tx,{area:function(){return Cw},bottom:function(){return Cj},bottomLeft:function(){return Cj},bottomRight:function(){return Cj},inside:function(){return Cj},left:function(){return Cj},outside:function(){return CN},right:function(){return Cj},spider:function(){return CI},surround:function(){return CD},top:function(){return Cj},topLeft:function(){return Cj},topRight:function(){return Cj}});var tO={};n.r(tO),n.d(tO,{interpolateBlues:function(){return Lm},interpolateBrBG:function(){return NB},interpolateBuGn:function(){return N5},interpolateBuPu:function(){return N4},interpolateCividis:function(){return LP},interpolateCool:function(){return LF},interpolateCubehelixDefault:function(){return LR},interpolateGnBu:function(){return N8},interpolateGreens:function(){return Lb},interpolateGreys:function(){return LO},interpolateInferno:function(){return LX},interpolateMagma:function(){return LY},interpolateOrRd:function(){return N7},interpolateOranges:function(){return L_},interpolatePRGn:function(){return NW},interpolatePiYG:function(){return NG},interpolatePlasma:function(){return LK},interpolatePuBu:function(){return Lr},interpolatePuBuGn:function(){return Le},interpolatePuOr:function(){return NV},interpolatePuRd:function(){return Lo},interpolatePurples:function(){return LE},interpolateRainbow:function(){return Lz},interpolateRdBu:function(){return Nq},interpolateRdGy:function(){return NX},interpolateRdPu:function(){return Ll},interpolateRdYlBu:function(){return NZ},interpolateRdYlGn:function(){return NJ},interpolateReds:function(){return LM},interpolateSinebow:function(){return LH},interpolateSpectral:function(){return N1},interpolateTurbo:function(){return LV},interpolateViridis:function(){return Lq},interpolateWarm:function(){return LD},interpolateYlGn:function(){return Lf},interpolateYlGnBu:function(){return Lu},interpolateYlOrBr:function(){return Lh},interpolateYlOrRd:function(){return Ly},schemeAccent:function(){return CQ},schemeBlues:function(){return Lg},schemeBrBG:function(){return NF},schemeBuGn:function(){return N2},schemeBuPu:function(){return N3},schemeCategory10:function(){return CZ},schemeDark2:function(){return CJ},schemeGnBu:function(){return N6},schemeGreens:function(){return Lv},schemeGreys:function(){return Lx},schemeObservable10:function(){return C0},schemeOrRd:function(){return N9},schemeOranges:function(){return LS},schemePRGn:function(){return Nz},schemePaired:function(){return C1},schemePastel1:function(){return C2},schemePastel2:function(){return C5},schemePiYG:function(){return N$},schemePuBu:function(){return Ln},schemePuBuGn:function(){return Lt},schemePuOr:function(){return NH},schemePuRd:function(){return Li},schemePurples:function(){return Lw},schemeRdBu:function(){return NU},schemeRdGy:function(){return NY},schemeRdPu:function(){return La},schemeRdYlBu:function(){return NK},schemeRdYlGn:function(){return NQ},schemeReds:function(){return Lk},schemeSet1:function(){return C3},schemeSet2:function(){return C4},schemeSet3:function(){return C6},schemeSpectral:function(){return N0},schemeTableau10:function(){return C8},schemeYlGn:function(){return Lc},schemeYlGnBu:function(){return Ls},schemeYlOrBr:function(){return Lp},schemeYlOrRd:function(){return Ld}});var tw={};n.r(tw),n.d(tw,{AREA_CLASS_NAME:function(){return E1},Academy:function(){return bA},Bin:function(){return _m},BinX:function(){return _v},COMPONENT_CLASS_NAME:function(){return EJ},Chart:function(){return Rg},ChartEvent:function(){return kL},Classic:function(){return bM},ClassicDark:function(){return bP},Dark:function(){return b_},DiffY:function(){return __},DodgeX:function(){return _x},ELEMENT_CLASS_NAME:function(){return EK},Filter:function(){return _0},FlexX:function(){return _K},Group:function(){return _W},GroupColor:function(){return _H},GroupX:function(){return _$},GroupY:function(){return _G},Jitter:function(){return _w},JitterX:function(){return _E},JitterY:function(){return _k},LABEL_CLASS_NAME:function(){return E0},LABEL_LAYER_CLASS_NAME:function(){return EX},Light:function(){return bk},LinearAxis:function(){return Ow},MAIN_LAYER_CLASS_NAME:function(){return EY},MASK_CLASS_NAME:function(){return E2},MaybeDefaultX:function(){return m$},MaybeDefaultY:function(){return mV},MaybeFunctionAttribute:function(){return m2},MaybeGradient:function(){return yc},MaybeIdentityX:function(){return g4},MaybeIdentityY:function(){return g3},MaybeKey:function(){return dx},MaybeSeries:function(){return yf},MaybeSize:function(){return gr},MaybeStackY:function(){return Rd},MaybeTitle:function(){return dm},MaybeTooltip:function(){return dv},MaybeTuple:function(){return gF},MaybeTupleX:function(){return m_},MaybeTupleY:function(){return mA},MaybeVisualPosition:function(){return gz},MaybeZeroPadding:function(){return gG},MaybeZeroX:function(){return hN},MaybeZeroY:function(){return gn},MaybeZeroY1:function(){return hC},MaybeZeroZ:function(){return Ry},NormalizeY:function(){return _A},PLOT_CLASS_NAME:function(){return EQ},Pack:function(){return _Z},Runtime:function(){return Rp},Sample:function(){return _J},Select:function(){return _I},SelectX:function(){return _D},SelectY:function(){return _B},Selection:function(){return pA},SortColor:function(){return _X},SortX:function(){return _q},SortY:function(){return _Y},StackEnter:function(){return _P},StackY:function(){return S2},SymmetryY:function(){return _S},VIEW_CLASS_NAME:function(){return EZ},corelib:function(){return PS},extend:function(){return Th},geolib:function(){return ip},graphlib:function(){return Tf},plotlib:function(){return hh},register:function(){return Ru},render:function(){return IJ},renderToMountedElement:function(){return I0},select:function(){return pj},stdlib:function(){return Tp}});var tE={}.toString,tk=function(t,e){return tE.call(t)==="[object "+e+"]"},tM=function(t){return Array.isArray?Array.isArray(t):tk(t,"Array")},tS=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},t_=function(t,e){if(t){if(tM(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(tS(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},tP=function(t){return tk(t,"Function")},tj=Array.prototype;tj.splice,tj.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var tA=function(t){return tk(t,"Number")},tT=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return t_(t,function(n,r){tP(t)&&"prototype"===r||e.push(n)}),e},tC=function(t){if("object"!=typeof t||null===t||!tk(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},tN=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&tC(a)?(tC(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):tM(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},tL=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},tI=function(t,e){if(!tL(t))return -1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var tR=function(t){return t};function tD(t){return null==t?0:tL(t)?t.length:Object.keys(t).length}var tF=function(t,e){return(tF=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function tB(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tF(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var tz=function(){return(tz=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function tW(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function t$(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function l(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,l)}s((r=r.apply(t,e||[])).next())})}function tG(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function tH(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function tV(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function tU(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],a=0,l=o.length;a<l;a++,i++)r[i]=o[a];return r}function tq(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function tY(t,e,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function tX(){this.map={}}!function(t,e){if(!tP(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return eG||(eG=document.createElement("canvas").getContext("2d")),eG.font=[o,a,i,n+"px",r].join(" "),eG.measureText(tk(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),tU([t],tT(e)).join("")}),tX.prototype.has=function(t){return void 0!==this.map[t]},tX.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},tX.prototype.set=function(t,e){this.map[t]=e},tX.prototype.clear=function(){this.map={}},tX.prototype.delete=function(t){delete this.map[t]},tX.prototype.size=function(){return Object.keys(this.map).length};class tK{constructor(t){this.options=tN({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=tN({},this.options,t),this.rescale(t)}rescale(t){}}function tZ(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function tQ(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function tJ(t,e,n,r,i){let o=n||0,a=r||t.length,l=i||(t=>t);for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}var t0=n(254),t1=n.n(t0);function t2(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function t5(t){let e=t1().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=t2(a,o,e+1/3);return[255*l,255*t2(a,o,e),255*t2(a,o,e-1/3),i]}(r):null}let t3=(t,e)=>n=>t*(1-n)+e*n,t4=(t,e)=>{let n=t5(t),r=t5(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},t6=(t,e)=>"number"==typeof t&&"number"==typeof e?t3(t,e):"string"==typeof t&&"string"==typeof e?t4(t,e):()=>t,t8=(t,e)=>{let n=t3(t,e);return t=>Math.round(n(t))};function t9(t){return null!=t&&!Number.isNaN(t)}let t7=Math.sqrt(50),et=Math.sqrt(10),ee=Math.sqrt(2);function en(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=t7?10:o>=et?5:o>=ee?2:1)*10**i:-(10**-i)/(o>=t7?10:o>=et?5:o>=ee?2:1)}function er(t,e,n){let r=Math.abs(e-t)/Math.max(0,n),i=10**Math.floor(Math.log(r)/Math.LN10),o=r/i;return o>=t7?i*=10:o>=et?i*=5:o>=ee&&(i*=2),e<t?-i:i}let ei=(t,e,n=5)=>{let r,i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=en(l,s,n))>0?r=en(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=en(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},eo=(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=tZ(o,a),i=n(l,s)):(r=tZ(a,o),i=n(s,l)),tQ(i,r)},ea=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=tZ(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=tJ(t,e,1,r)-1,a=i[n];return tQ(o[n],a)(e)}},el=(t,e,n,r)=>(Math.min(t.length,e.length)>2?ea:eo)(t,e,r?t8:n);class es extends tK{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:t3,tickCount:5}}map(t){return t9(t)?this.output(t):this.options.unknown}invert(t){return t9(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return ei}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):tR}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=el(n.map(t),r,o,i);this.output=tQ(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=el(i,r.map(t),t3);this.input=tQ(e,n,o)}}let eu=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=en(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class ec extends es{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:t6,tickMethod:eu,tickCount:5}}chooseTransforms(){return[tR,tR]}clone(){return new ec(this.options)}}var ef=function(t){return null==t},ep=function(t){return ef(t)?"":t.toString()},eh=function(t){var e=ep(t);return e.charAt(0).toUpperCase()+e.substring(1)},ed=t=>t;function ey(t,e){t&&em.hasOwnProperty(t.type)&&em[t.type](t,e)}var eg={Feature:function(t,e){ey(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ey(n[r].geometry,e)}},em={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){ev(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ev(n[r],e,0)},Polygon:function(t,e){eb(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)eb(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ey(n[r],e)}};function ev(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function eb(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)ev(t[n],e,1);e.polygonEnd()}function ex(t,e){t&&eg.hasOwnProperty(t.type)?eg[t.type](t,e):ey(t,e)}class eO{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){let e=this._partials,n=0;for(let r=0;r<this._n&&r<32;r++){let i=e[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){let t=this._partials,e=this._n,n,r,i,o=0;if(e>0){for(o=t[--e];e>0&&(o=(n=o)+(r=t[--e]),!(i=r-(o-n))););e>0&&(i<0&&t[e-1]<0||i>0&&t[e-1]>0)&&(n=o+(r=2*i),r==n-o&&(o=n))}return o}}var ew=Math.PI,eE=ew/2,ek=ew/4,eM=2*ew,eS=180/ew,e_=ew/180,eP=Math.abs,ej=Math.atan,eA=Math.atan2,eT=Math.cos,eC=Math.ceil,eN=Math.exp,eL=Math.log,eI=Math.pow,eR=Math.sin,eD=Math.sign||function(t){return t>0?1:t<0?-1:0},eF=Math.sqrt,eB=Math.tan;function ez(t){return t>1?0:t<-1?ew:Math.acos(t)}function eW(t){return t>1?eE:t<-1?-eE:Math.asin(t)}function e$(){}var eG,eH,eV,eU,eq,eY=new eO,eX=new eO,eK={point:e$,lineStart:e$,lineEnd:e$,polygonStart:function(){eK.lineStart=eZ,eK.lineEnd=e0},polygonEnd:function(){eK.lineStart=eK.lineEnd=eK.point=e$,eY.add(eP(eX)),eX=new eO},result:function(){var t=eY/2;return eY=new eO,t}};function eZ(){eK.point=eQ}function eQ(t,e){eK.point=eJ,eH=eU=t,eV=eq=e}function eJ(t,e){eX.add(eq*t-eU*e),eU=t,eq=e}function e0(){eJ(eH,eV)}var e1,e2,e5,e3,e4=1/0,e6=1/0,e8=-1/0,e9=e8,e7={point:function(t,e){t<e4&&(e4=t),t>e8&&(e8=t),e<e6&&(e6=e),e>e9&&(e9=e)},lineStart:e$,lineEnd:e$,polygonStart:e$,polygonEnd:e$,result:function(){var t=[[e4,e6],[e8,e9]];return e8=e9=-(e6=e4=1/0),t}},nt=0,ne=0,nn=0,nr=0,ni=0,no=0,na=0,nl=0,ns=0,nu={point:nc,lineStart:nf,lineEnd:nd,polygonStart:function(){nu.lineStart=ny,nu.lineEnd=ng},polygonEnd:function(){nu.point=nc,nu.lineStart=nf,nu.lineEnd=nd},result:function(){var t=ns?[na/ns,nl/ns]:no?[nr/no,ni/no]:nn?[nt/nn,ne/nn]:[NaN,NaN];return nt=ne=nn=nr=ni=no=na=nl=ns=0,t}};function nc(t,e){nt+=t,ne+=e,++nn}function nf(){nu.point=np}function np(t,e){nu.point=nh,nc(e5=t,e3=e)}function nh(t,e){var n=t-e5,r=e-e3,i=eF(n*n+r*r);nr+=i*(e5+t)/2,ni+=i*(e3+e)/2,no+=i,nc(e5=t,e3=e)}function nd(){nu.point=nc}function ny(){nu.point=nm}function ng(){nv(e1,e2)}function nm(t,e){nu.point=nv,nc(e1=e5=t,e2=e3=e)}function nv(t,e){var n=t-e5,r=e-e3,i=eF(n*n+r*r);nr+=i*(e5+t)/2,ni+=i*(e3+e)/2,no+=i,na+=(i=e3*t-e5*e)*(e5+t),nl+=i*(e3+e),ns+=3*i,nc(e5=t,e3=e)}function nb(t){this._context=t}nb.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,eM)}},result:e$};var nx,nO,nw,nE,nk,nM=new eO,nS={point:e$,lineStart:function(){nS.point=n_},lineEnd:function(){nx&&nP(nO,nw),nS.point=e$},polygonStart:function(){nx=!0},polygonEnd:function(){nx=null},result:function(){var t=+nM;return nM=new eO,t}};function n_(t,e){nS.point=nP,nO=nE=t,nw=nk=e}function nP(t,e){nE-=t,nk-=e,nM.add(eF(nE*nE+nk*nk)),nE=t,nk=e}class nj{constructor(t){this._append=null==t?nA:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return nA;if(e!==r){let t=10**e;r=e,i=function(e){let n=1;this._+=e[0];for(let r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return i}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==o||this._append!==i){let t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,o=t,i=this._append,a=this._,this._=e}this._+=a}}result(){let t=this._;return this._="",t.length?t:null}}function nA(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function nT(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),ex(t,i(o))),o.result()}return a.area=function(t){return ex(t,i(eK)),eK.result()},a.measure=function(t){return ex(t,i(nS)),nS.result()},a.bounds=function(t){return ex(t,i(e7)),e7.result()},a.centroid=function(t){return ex(t,i(nu)),nu.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,ed):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new nj(n)):new nb(e=t),"function"!=typeof r&&o.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(o.pointRadius(+t),+t),a):r},a.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);n=e}return null===e&&(o=new nj(n)),a},a.projection(t).digits(n).context(e)}function nC(t,e,n){t*=1,e*=1,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=Array(i);++r<i;)o[r]=t+r*n;return o}function nN(t,e,n){var r=nC(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function nL(t,e,n){var r=nC(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}var nI={}.toString,nR=function(t,e){return nI.call(t)==="[object "+e+"]"},nD=function(t){return Array.isArray?Array.isArray(t):nR(t,"Array")},nF=function(t){return"object"==typeof t&&null!==t},nB=function(t){if(!nF(t)||!nR(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},nz=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&nB(a)?(nB(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):nD(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},nW=function(t){var e=ep(t);return e.charAt(0).toLowerCase()+e.substring(1)};function n$(t){return t}function nG(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),n$)}function nH(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function nV(t=""){throw Error(t)}function nU(t,e){let{attributes:n}=e,r=new Set(["id","className"]);for(let[e,i]of Object.entries(n))r.has(e)||("transform"===e&&t.attr(e,""),t.attr(e,i))}function nq(t){return null!=t&&!Number.isNaN(t)}function nY(t,e){return nX(t,e)||{}}function nX(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[nW(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function nK(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function nZ(t,e){if(void 0===t)return null;if("number"==typeof t)return t;let n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function nQ(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function nJ(t){return null===t||!1===t}function n0(t,e,n={},r=!1){return nJ(t)||Array.isArray(t)&&r?t:nz(n,nY(t,e))}function n1(t,e={}){return nJ(t)||Array.isArray(t)||!n2(t)?t:nz(e,t)}function n2(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function n5(t,e){return"object"==typeof t?nY(t,e):t}function n3(t){return function(e,n){var r=eT(e),i=eT(n),o=t(r*i);return o===1/0?[2,0]:[o*i*eR(e),o*eR(n)]}}function n4(t){return function(e,n){var r=eF(e*e+n*n),i=t(r),o=eR(i);return[eA(e*o,r*eT(i)),eW(r&&n*o/r)]}}function n6(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:e$,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function n8(t,e){return 1e-6>eP(t[0]-e[0])&&1e-6>eP(t[1]-e[1])}function n9(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function n7(t,e,n,r,i){var o,a,l=[],s=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(n8(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd();return}a[0]+=2e-6}l.push(n=new n9(r,t,null,!0)),s.push(n.o=new n9(r,null,n,!1)),l.push(n=new n9(a,t,null,!1)),s.push(n.o=new n9(a,null,n,!0))}}),l.length){for(s.sort(e),rt(l),rt(s),o=0,a=s.length;o<a;++o)s[o].e=n=!n;for(var u,c,f=l[0];;){for(var p=f,h=!0;p.v;)if((p=p.n)===f)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(o=0,a=u.length;o<a;++o)i.point((c=u[o])[0],c[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(h)for(o=(u=p.p.z).length-1;o>=0;--o)i.point((c=u[o])[0],c[1]);else r(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,h=!h}while(!p.v);i.lineEnd()}}}function rt(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function re(t){return[eA(t[1],t[0]),eW(t[2])]}function rn(t){var e=t[0],n=t[1],r=eT(n);return[r*eT(e),r*eR(e),eR(n)]}function rr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ri(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ro(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ra(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function rl(t){var e=eF(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function rs(t){return eP(t[0])<=ew?t[0]:eD(t[0])*((eP(t[0])+ew)%eM-ew)}function ru(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function rc(t,e,n,r){return function(i){var o,a,l,s=e(i),u=n6(),c=e(u),f=!1,p={point:h,lineStart:y,lineEnd:g,polygonStart:function(){p.point=v,p.lineStart=b,p.lineEnd=x,a=[],o=[]},polygonEnd:function(){p.point=h,p.lineStart=y,p.lineEnd=g,a=ru(a);var t=function(t,e){var n=rs(e),r=e[1],i=eR(r),o=[eR(n),-eT(n),0],a=0,l=0,s=new eO;1===i?r=eE+1e-6:-1===i&&(r=-eE-1e-6);for(var u=0,c=t.length;u<c;++u)if(p=(f=t[u]).length)for(var f,p,h=f[p-1],d=rs(h),y=h[1]/2+ek,g=eR(y),v=eT(y),b=0;b<p;++b,d=O,g=E,v=k,h=x){var x=f[b],O=rs(x),w=x[1]/2+ek,E=eR(w),k=eT(w),M=O-d,S=M>=0?1:-1,_=S*M,P=_>ew,j=g*E;if(s.add(eA(j*S*eR(_),v*k+j*eT(_))),a+=P?M+S*eM:M,P^d>=n^O>=n){var A=ri(rn(h),rn(x));rl(A);var T=ri(o,A);rl(T);var C=(P^M>=0?-1:1)*eW(T[2]);(r>C||r===C&&(A[0]||A[1]))&&(l+=P^M>=0?1:-1)}}return(a<-1e-6||a<1e-6&&s<-1e-12)^1&l}(o,r);a.length?(f||(i.polygonStart(),f=!0),n7(a,rp,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(e,n){t(e,n)&&i.point(e,n)}function d(t,e){s.point(t,e)}function y(){p.point=d,s.lineStart()}function g(){p.point=h,s.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function b(){c.lineStart(),l=[]}function x(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),p=u.result(),h=p.length;if(l.pop(),o.push(l),l=null,h){if(1&s){if((e=(n=p[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}return}h>1&&2&s&&p.push(p.pop().concat(p.shift())),a.push(p.filter(rf))}}return p}}function rf(t){return t.length>1}function rp(t,e){return((t=t.x)[0]<0?t[1]-eE-1e-6:eE-t[1])-((e=e.x)[0]<0?e[1]-eE-1e-6:eE-e[1])}var rh=rc(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var l,s,u,c,f,p,h,d=o>0?ew:-ew,y=eP(o-n);1e-6>eP(y-ew)?(t.point(n,r=(r+a)/2>0?eE:-eE),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),t.point(o,r),e=0):i!==d&&y>=ew&&(1e-6>eP(n-i)&&(n-=1e-6*i),1e-6>eP(o-d)&&(o-=1e-6*d),l=n,s=r,u=o,c=a,r=eP(h=eR(l-u))>1e-6?ej((eR(s)*(p=eT(c))*eR(u)-eR(c)*(f=eT(s))*eR(l))/(f*p*h)):(s+c)/2,t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),e=0),t.point(n=o,r=a),i=d},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*eE,r.point(-ew,i),r.point(0,i),r.point(ew,i),r.point(ew,0),r.point(ew,-i),r.point(0,-i),r.point(-ew,-i),r.point(-ew,0),r.point(-ew,i);else if(eP(t[0]-e[0])>1e-6){var o=t[0]<e[0]?ew:-ew;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-ew,-eE]);function rd(t,e){e=rn(e),e[0]-=t,rl(e);var n=ez(-e[1]);return((0>-e[2]?-n:n)+eM-1e-6)%eM}function ry(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,l,u){var c=0,f=0;if(null==i||(c=a(i,l))!==(f=a(o,l))||0>s(i,o)^l>0)do u.point(0===c||3===c?t:n,c>1?r:e);while((c=(c+l+4)%4)!==f);else u.point(o[0],o[1])}function a(r,i){return 1e-6>eP(r[0]-t)?i>0?0:3:1e-6>eP(r[0]-n)?i>0?2:1:1e-6>eP(r[1]-e)?+(i>0):i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,u,c,f,p,h,d,y,g,v,b,x=a,O=n6(),w={point:E,lineStart:function(){w.point=k,u&&u.push(c=[]),v=!0,g=!1,d=y=NaN},lineEnd:function(){s&&(k(f,p),h&&g&&O.rejoin(),s.push(O.result())),w.point=E,g&&x.lineEnd()},polygonStart:function(){x=O,s=[],u=[],b=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var o,a,l=u[n],s=1,c=l.length,f=l[0],p=f[0],h=f[1];s<c;++s)o=p,a=h,p=(f=l[s])[0],h=f[1],a<=r?h>r&&(p-o)*(r-a)>(h-a)*(t-o)&&++e:h<=r&&(p-o)*(r-a)<(h-a)*(t-o)&&--e;return e}(),n=b&&e,i=(s=ru(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&n7(s,l,e,o,a),a.polygonEnd()),x=a,s=u=c=null}};function E(t,e){i(t,e)&&x.point(t,e)}function k(o,a){var l=i(o,a);if(u&&c.push([o,a]),v)f=o,p=a,h=l,v=!1,l&&(x.lineStart(),x.point(o,a));else if(l&&g)x.point(o,a);else{var s=[d=Math.max(-1e9,Math.min(1e9,d)),y=Math.max(-1e9,Math.min(1e9,y))],O=[o=Math.max(-1e9,Math.min(1e9,o)),a=Math.max(-1e9,Math.min(1e9,a))];!function(t,e,n,r,i,o){var a,l=t[0],s=t[1],u=e[0],c=e[1],f=0,p=1,h=u-l,d=c-s;if(a=n-l,!h&&a>0)return;if(a/=h,h<0){if(a<f)return;a<p&&(p=a)}else if(h>0){if(a>p)return;a>f&&(f=a)}if(a=i-l,h||!(a<0)){if(a/=h,h<0){if(a>p)return;a>f&&(f=a)}else if(h>0){if(a<f)return;a<p&&(p=a)}if(a=r-s,d||!(a>0)){if(a/=d,d<0){if(a<f)return;a<p&&(p=a)}else if(d>0){if(a>p)return;a>f&&(f=a)}if(a=o-s,d||!(a<0)){if(a/=d,d<0){if(a>p)return;a>f&&(f=a)}else if(d>0){if(a<f)return;a<p&&(p=a)}return f>0&&(t[0]=l+f*h,t[1]=s+f*d),p<1&&(e[0]=l+p*h,e[1]=s+p*d),!0}}}}(s,O,t,e,n,r)?l&&(x.lineStart(),x.point(o,a),b=!1):(g||(x.lineStart(),x.point(s[0],s[1])),x.point(O[0],O[1]),l||x.lineEnd(),b=!1)}d=o,y=a,g=l}return w}}function rg(t,e){function n(n,r){return e((n=t(n,r))[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function rm(t,e){return eP(t)>ew&&(t-=Math.round(t/eM)*eM),[t,e]}function rv(t,e,n){return(t%=eM)?e||n?rg(rx(t),rO(e,n)):rx(t):e||n?rO(e,n):rm}function rb(t){return function(e,n){return eP(e+=t)>ew&&(e-=Math.round(e/eM)*eM),[e,n]}}function rx(t){var e=rb(t);return e.invert=rb(-t),e}function rO(t,e){var n=eT(t),r=eR(t),i=eT(e),o=eR(e);function a(t,e){var a=eT(e),l=eT(t)*a,s=eR(t)*a,u=eR(e),c=u*n+l*r;return[eA(s*i-c*o,l*n-u*r),eW(c*i+s*o)]}return a.invert=function(t,e){var a=eT(e),l=eT(t)*a,s=eR(t)*a,u=eR(e),c=u*i-s*o;return[eA(s*i+u*o,l*n+c*r),eW(c*n-l*r)]},a}function rw(t){return function(e){var n=new rE;for(var r in t)n[r]=t[r];return n.stream=e,n}}function rE(){}function rk(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),ex(n,t.stream(e7)),e(e7.result()),null!=r&&t.clipExtent(r),t}function rM(t,e,n){return rk(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,l])},n)}function rS(t,e,n){return rM(t,[[0,0],e],n)}function r_(t,e,n){return rk(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function rP(t,e,n){return rk(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}rm.invert=rm,rE.prototype={constructor:rE,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var rj=eT(30*e_);function rA(t,e){var n;return+e?function(t,e){function n(r,i,o,a,l,s,u,c,f,p,h,d,y,g){var v=u-r,b=c-i,x=v*v+b*b;if(x>4*e&&y--){var O=a+p,w=l+h,E=s+d,k=eF(O*O+w*w+E*E),M=eW(E/=k),S=1e-6>eP(eP(E)-1)||1e-6>eP(o-f)?(o+f)/2:eA(w,O),_=t(S,M),P=_[0],j=_[1],A=P-r,T=j-i,C=b*A-v*T;(C*C/x>e||eP((v*A+b*T)/x-.5)>.3||a*p+l*h+s*d<rj)&&(n(r,i,o,a,l,s,P,j,S,O/=k,w/=k,E,y,g),g.point(P,j),n(P,j,S,O,w,E,u,c,f,p,h,d,y,g))}}return function(e){var r,i,o,a,l,s,u,c,f,p,h,d,y={point:g,lineStart:v,lineEnd:x,polygonStart:function(){e.polygonStart(),y.lineStart=O},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){c=NaN,y.point=b,e.lineStart()}function b(r,i){var o=rn([r,i]),a=t(r,i);n(c,f,u,p,h,d,c=a[0],f=a[1],u=r,p=o[0],h=o[1],d=o[2],16,e),e.point(c,f)}function x(){y.point=g,e.lineEnd()}function O(){v(),y.point=w,y.lineEnd=E}function w(t,e){b(r=t,e),i=c,o=f,a=p,l=h,s=d,y.point=b}function E(){n(c,f,u,p,h,d,i,o,r,a,l,s,16,e),y.lineEnd=x,x()}return y}}(t,e):(n=t,rw({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}))}var rT=rw({point:function(t,e){this.stream.point(t*e_,e*e_)}});function rC(t,e,n,r,i,o){if(!o){function a(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return a.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},a}var l=eT(o),s=eR(o),u=l*t,c=s*t,f=l/t,p=s/t,h=(s*n-l*e)/t,d=(s*e+l*n)/t;function y(t,o){return[u*(t*=r)-c*(o*=i)+e,n-c*t-u*o]}return y.invert=function(t,e){return[r*(f*t-p*e+h),i*(d-p*t-f*e)]},y}function rN(t){return rL(function(){return t})()}function rL(t){var e,n,r,i,o,a,l,s,u,c,f=150,p=480,h=250,d=0,y=0,g=0,v=0,b=0,x=0,O=1,w=1,E=null,k=rh,M=null,S=ed,_=.5;function P(t){return s(t[0]*e_,t[1]*e_)}function j(t){return(t=s.invert(t[0],t[1]))&&[t[0]*eS,t[1]*eS]}function A(){var t=rC(f,0,0,O,w,x).apply(null,e(d,y)),r=rC(f,p-t[0],h-t[1],O,w,x);return n=rv(g,v,b),l=rg(e,r),s=rg(n,l),a=rA(l,_),T()}function T(){return u=c=null,P}return P.stream=function(t){var e;return u&&c===t?u:u=rT((e=n,rw({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}}))(k(a(S(c=t)))))},P.preclip=function(t){return arguments.length?(k=t,E=void 0,T()):k},P.postclip=function(t){return arguments.length?(S=t,M=r=i=o=null,T()):S},P.clipAngle=function(t){return arguments.length?(k=+t?function(t){var e=eT(t),n=2*e_,r=e>0,i=eP(e)>1e-6;function o(t,n){return eT(t)*eT(n)>e}function a(t,n,r){var i=rn(t),o=rn(n),a=[1,0,0],l=ri(i,o),s=rr(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=ri(a,l),p=ra(a,e*s/c);ro(p,ra(l,-e*u/c));var h=rr(p,f),d=rr(f,f),y=h*h-d*(rr(p,p)-1);if(!(y<0)){var g=eF(y),v=ra(f,(-h-g)/d);if(ro(v,p),v=re(v),!r)return v;var b,x=t[0],O=n[0],w=t[1],E=n[1];O<x&&(b=x,x=O,O=b);var k=O-x,M=1e-6>eP(k-ew);if(!M&&E<w&&(b=w,w=E,E=b),M||k<1e-6?M?w+E>0^v[1]<(1e-6>eP(v[0]-x)?w:E):w<=v[1]&&v[1]<=E:k>ew^(x<=v[0]&&v[0]<=O)){var S=ra(f,(-h+g)/d);return ro(S,p),[v,re(S)]}}}function l(e,n){var i=r?t:ew-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return rc(o,function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,p){var h,d,y=[f,p],g=o(f,p),v=r?g?0:l(f,p):g?l(f+(f<0?ew:-ew),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||n8(e,d)||n8(y,d))&&(y[2]=1),g!==s?(c=0,g?(t.lineStart(),d=a(y,e),t.point(d[0],d[1])):(d=a(e,y),t.point(d[0],d[1],2),t.lineEnd()),e=d):i&&e&&r^g&&!(v&n)&&(h=a(y,e,!0))&&(c=0,r?(t.lineStart(),t.point(h[0][0],h[0][1]),t.point(h[1][0],h[1][1]),t.lineEnd()):(t.point(h[1][0],h[1][1]),t.lineEnd(),t.lineStart(),t.point(h[0][0],h[0][1],3))),!g||e&&n8(e,y)||t.point(y[0],y[1]),e=y,s=g,n=v},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}},function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var a=eT(e),l=eR(e),s=r*n;null==i?(i=e+r*eM,o=e-s/2):(i=rd(a,i),o=rd(a,o),(r>0?i<o:i>o)&&(i+=r*eM));for(var u,c=i;r>0?c>o:c<o;c-=s)u=re([a,-l*eT(c),-l*eR(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-ew,t-ew])}(E=t*e_):(E=null,rh),T()):E*eS},P.clipExtent=function(t){return arguments.length?(S=null==t?(M=r=i=o=null,ed):ry(M=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),T()):null==M?null:[[M,r],[i,o]]},P.scale=function(t){return arguments.length?(f=+t,A()):f},P.translate=function(t){return arguments.length?(p=+t[0],h=+t[1],A()):[p,h]},P.center=function(t){return arguments.length?(d=t[0]%360*e_,y=t[1]%360*e_,A()):[d*eS,y*eS]},P.rotate=function(t){return arguments.length?(g=t[0]%360*e_,v=t[1]%360*e_,b=t.length>2?t[2]%360*e_:0,A()):[g*eS,v*eS,b*eS]},P.angle=function(t){return arguments.length?(x=t%360*e_,A()):x*eS},P.reflectX=function(t){return arguments.length?(O=t?-1:1,A()):O<0},P.reflectY=function(t){return arguments.length?(w=t?-1:1,A()):w<0},P.precision=function(t){return arguments.length?(a=rA(l,_=t*t),T()):eF(_)},P.fitExtent=function(t,e){return rM(P,t,e)},P.fitSize=function(t,e){return rS(P,t,e)},P.fitWidth=function(t,e){return r_(P,t,e)},P.fitHeight=function(t,e){return rP(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&j,A()}}var rI=n3(function(t){return(t=ez(t))&&t/eR(t)});function rR(){return rN(rI).scale(79.4188).clipAngle(179.999)}function rD(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}function rF(){return rN(rD).scale(175.295)}function rB(t,e){return[t,e]}function rz(){return rN(rB).scale(152.63)}function rW(t){var e=0,n=ew/3,r=rL(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*e_,n=t[1]*e_):[e*eS,n*eS]},i}function r$(t,e){var n=eR(t),r=(n+eR(e))/2;if(1e-6>eP(r)){var i=eT(t);function o(t,e){return[t*i,eR(e)/i]}return o.invert=function(t,e){return[t/i,eW(e*i)]},o}var a=1+n*(2*r-n),l=eF(a)/r;function s(t,e){var n=eF(a-2*r*eR(e))/r;return[n*eR(t*=r),l-n*eT(t)]}return s.invert=function(t,e){var n=l-e,i=eA(t,eP(n))*eD(n);return n*r<0&&(i-=ew*eD(t)*eD(n)),[i/r,eW((a-(t*t+n*n)*r*r)/(2*r))]},s}function rG(){return rW(r$).scale(155.424).center([0,33.6442])}function rH(t,e){return[eT(e)*eR(t),eR(e)]}function rV(){return rN(rH).scale(249.5).clipAngle(90.000001)}function rU(){return rG().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function rq(){var t,e,n,r,i,o,a=rU(),l=rG().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=rG().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){o=[t,e]}};function c(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,c}return c.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(t)},c.stream=function(n){var r,i;return t&&e===n?t:(i=(r=[a.stream(e=n),l.stream(n),s.stream(n)]).length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}})},c.precision=function(t){return arguments.length?(a.precision(t),l.precision(t),s.precision(t),f()):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),l.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],c=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,c-.238*e],[o+.455*e,c+.238*e]]).stream(u),r=l.translate([o-.307*e,c+.201*e]).clipExtent([[o-.425*e+1e-6,c+.12*e+1e-6],[o-.214*e-1e-6,c+.234*e-1e-6]]).stream(u),i=s.translate([o-.205*e,c+.212*e]).clipExtent([[o-.214*e+1e-6,c+.166*e+1e-6],[o-.115*e-1e-6,c+.234*e-1e-6]]).stream(u),f()},c.fitExtent=function(t,e){return rM(c,t,e)},c.fitSize=function(t,e){return rS(c,t,e)},c.fitWidth=function(t,e){return r_(c,t,e)},c.fitHeight=function(t,e){return rP(c,t,e)},c.scale(1070)}function rY(){var t,e,n,r,i,o,a,l=1,s=0,u=0,c=1,f=1,p=0,h=null,d=1,y=1,g=rw({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),v=ed;function b(){return d=l*c,y=l*f,o=a=null,x}function x(n){var r=n[0]*d,i=n[1]*y;if(p){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+s,i+u]}return x.invert=function(n){var r=n[0]-s,i=n[1]-u;if(p){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/y]},x.stream=function(t){return o&&a===t?o:o=g(v(a=t))},x.postclip=function(t){return arguments.length?(v=t,h=n=r=i=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(h=n=r=i=null,ed):ry(h=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),b()):null==h?null:[[h,n],[r,i]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],b()):[s,u]},x.angle=function(n){return arguments.length?(e=eR(p=n%360*e_),t=eT(p),b()):p*eS},x.reflectX=function(t){return arguments.length?(c=t?-1:1,b()):c<0},x.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.fitExtent=function(t,e){return rM(x,t,e)},x.fitSize=function(t,e){return rS(x,t,e)},x.fitWidth=function(t,e){return r_(x,t,e)},x.fitHeight=function(t,e){return rP(x,t,e)},x}function rX(t,e){var n=eT(t),r=t===e?eR(t):(n-eT(e))/(e-t),i=n/r+t;if(1e-6>eP(r))return rB;function o(t,e){var n=i-e,o=r*t;return[n*eR(o),i-n*eT(o)]}return o.invert=function(t,e){var n=i-e,o=eA(t,eP(n))*eD(n);return n*r<0&&(o-=ew*eD(t)*eD(n)),[o/r,i-eD(r)*eF(t*t+n*n)]},o}function rK(){return rW(rX).scale(131.154).center([0,13.9389])}function rZ(t,e){return[t,eL(eB((eE+e)/2))]}function rQ(){return rJ(rZ).scale(961/eM)}function rJ(t){var e,n,r,i=rN(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=ew*a(),l=i((function(t){function e(e){return e=t(e[0]*e_,e[1]*e_),e[0]*=eS,e[1]*=eS,e}return t=rv(t[0]*e_,t[1]*e_,t.length>2?t[2]*e_:0),e.invert=function(e){return e=t.invert(e[0]*e_,e[1]*e_),e[0]*=eS,e[1]*=eS,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===rZ?[[Math.max(l[0]-o,u),e],[Math.min(l[0]+o,n),r]]:[[u,Math.max(l[1]-o,e)],[n,Math.min(l[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),c()):a()},i.translate=function(t){return arguments.length?(l(t),c()):l()},i.center=function(t){return arguments.length?(o(t),c()):o()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),c()):null==u?null:[[u,e],[n,r]]},c()}function r0(t,e){return[eL(eB((eE+e)/2)),-t]}function r1(){var t=rJ(r0),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}rI.invert=n4(function(t){return t}),rD.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.045255+a*(-.311325+.259866*o-.005916*11*a)))}while(eP(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]},rB.invert=rB,rH.invert=n4(eW),rZ.invert=function(t,e){return[t,2*ej(eN(e))-eE]},r0.invert=function(t,e){return[-e,2*ej(eN(t))-eE]};var r2=n3(function(t){return eF(2/(1+t))});function r5(){return rN(r2).scale(124.75).clipAngle(179.999)}r2.invert=n4(function(t){return 2*eW(t/2)});var r3=eF(3)/2;function r4(t,e){var n=eW(r3*eR(e)),r=n*n,i=r*r*r;return[t*eT(n)/(r3*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function r6(){return rN(r4).scale(177.158)}function r8(t){return eB((eE+t)/2)}function r9(t,e){var n=eT(t),r=t===e?eR(t):eL(n/eT(e))/eL(r8(e)/r8(t)),i=n*eI(r8(t),r)/r;if(!r)return rZ;function o(t,e){i>0?e<-eE+1e-6&&(e=-eE+1e-6):e>eE-1e-6&&(e=eE-1e-6);var n=i/eI(r8(e),r);return[n*eR(r*t),i-n*eT(r*t)]}return o.invert=function(t,e){var n=i-e,o=eD(r)*eF(t*t+n*n),a=eA(t,eP(n))*eD(n);return n*r<0&&(a-=ew*eD(t)*eD(n)),[a/r,2*ej(eI(i/o,1/r))-eE]},o}function r7(){return rW(r9).scale(109.5).parallels([30,30])}function it(t,e){var n=eT(e),r=eT(t)*n;return[n*eR(t)/r,eR(e)/r]}function ie(){return rN(it).scale(144.049).clipAngle(60)}function ir(t,e){var n=eT(e),r=1+eT(t)*n;return[n*eR(t)/r,eR(e)/r]}function ii(){return rN(ir).scale(250).clipAngle(142)}r4.invert=function(t,e){for(var n,r,i=e,o=i*i,a=o*o*o,l=0;l<12&&(r=i*(1.340264+-.081106*o+a*(893e-6+.003796*o))-e,i-=n=r/(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o)),a=(o=i*i)*o*o,!(1e-12>eP(n)));++l);return[r3*t*(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o))/eT(i),eW(eR(i)/r3)]},it.invert=n4(ej),ir.invert=n4(function(t){return 2*ej(t)});var io=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ia(t){let{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});let{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[(function(){var t,e,n,r,i,o,a,l,s,u,c,f,p=10,h=10,d=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:b()}}function b(){return nC(eC(r/d)*d,n,d).map(c).concat(nC(eC(l/y)*y,a,y).map(f)).concat(nC(eC(e/p)*p,t,p).filter(function(t){return eP(t%d)>1e-6}).map(s)).concat(nC(eC(o/h)*h,i,h).filter(function(t){return eP(t%y)>1e-6}).map(u))}return v.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(a).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),l>a&&(t=l,l=a,a=t),v.precision(g)):[[r,l],[n,a]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),v.precision(g)):[[e,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(d=+t[0],y=+t[1],v):[d,y]},v.stepMinor=function(t){return arguments.length?(p=+t[0],h=+t[1],v):[p,h]},v.precision=function(p){return arguments.length?(g=+p,s=nN(o,i,90),u=nL(e,t,g),c=nN(l,a,90),f=nL(r,n,g),v):g},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])})()()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function il(t){return"geoPath"===t.type}let is=()=>t=>{let e,{children:n,coordinate:r={}}=t;if(!Array.isArray(n))return[];let{type:i="equalEarth"}=r,o=io(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=tm[`geo${eh(t)}`];if(!e)throw Error(`Unknown coordinate: ${t}`);return e}(i),l=n.map(ia);return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,n,r,i)=>{let s=a();var u,c=s,f=l,p={x:t,y:n,width:r,height:i},h=o;let{outline:d=(()=>{let t=f.filter(il);return t.find(t=>t.sphere)?{type:"Sphere"}:{type:"FeatureCollection",features:t.filter(t=>!t.sphere).flatMap(t=>t.data.value).flatMap(t=>(function(t){if(!t||!t.type)return null;let e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0:null})(t).features)}})()}=h,{size:y="fitExtent"}=h;for(let[t,e]of("fitExtent"===y?function(t,e,n){let{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(c,d,p):"fitWidth"===y&&function(t,e,n){let{width:r,height:i}=n,[[o,a],[l,s]]=nT(t.fitWidth(r,e)).bounds(e),u=Math.ceil(s-a),c=Math.min(Math.ceil(l-o),u),f=t.scale()*(c-1)/c,[p,h]=t.translate();t.scale(f).translate([p,h+(i-u)/2]).precision(.2)}(c,d,p),Object.entries(o)))null==(u=s[t])||u.call(s,e);e=nT(s);let g=new ec({domain:[t,t+r]}),v=new ec({domain:[n,n+i]}),b=t=>{let e=s(t);if(!e)return[null,null];let[n,r]=e;return[g.map(n),v.map(r)]},x=t=>{if(!t)return null;let[e,n]=t,r=[g.invert(e),v.invert(n)];return s.invert(r)};return{transform:t=>b(t),untransform:t=>x(t)}}]]}},children:l.flatMap(t=>il(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:n1(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};is.props={};var iu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ic=()=>t=>{let{type:e,data:n,scale:r,encode:i,style:o,animate:a,key:l,state:s}=t;return[Object.assign(Object.assign({type:"geoView"},iu(t,["type","data","scale","encode","style","animate","key","state"])),{children:[{type:"geoPath",key:`${l}-0`,data:{value:n},scale:r,encode:i,style:o,animate:a,state:s}]})]};function ip(){return{"composition.geoView":is,"composition.geoPath":ic}}function ih(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function id(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function iy(t,e){let n,r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);return r}function ig(t,e){let n,r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function im(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function iv(t,...e){if("function"!=typeof t[Symbol.iterator])throw TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){var r;let i=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),i.sort((t,n)=>{for(let r of e){let e=ix(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>ix(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(ib(n))}function ib(t=im){if(t===im)return ix;if("function"!=typeof t)throw TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function ix(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:+(t>e))}function iO(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?ix:ib(i);r>n;){if(r-n>600){let o=r-n+1,a=e-n+1,l=Math.log(o),s=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*s*(o-s)/o)*(a-o/2<0?-1:1),c=Math.max(n,Math.floor(e-a*s/o+u)),f=Math.min(r,Math.floor(e+(o-a)*s/o+u));iO(t,e,c,f,i)}let o=t[e],a=n,l=r;for(iw(t,n,e),i(t[r],o)>0&&iw(t,n,r);a<l;){for(iw(t,a,l),++a,--l;0>i(t[a],o);)++a;for(;i(t[l],o)>0;)--l}0===i(t[n],o)?iw(t,n,l):iw(t,++l,r),l<=e&&(n=l+1),e<=l&&(r=l-1)}return t}function iw(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function iE(t){return null===t?NaN:+t}function ik(t,e,n){if(!(!(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r*=1)>=r&&(yield r)}}(t,n))).length)||isNaN(e*=1))){if(e<=0||r<2)return ih(t);if(e>=1)return id(t);var r,i=(r-1)*e,o=Math.floor(i),a=id(iO(t,o).subarray(0,o+1));return a+(ih(t.subarray(o+1))-a)*(i-o)}}ic.props={};class iM extends Map{constructor(t,e=i_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(iS(this,t))}has(t){return super.has(iS(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function iS({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function i_(t){return null!==t&&"object"==typeof t?t.valueOf():t}function iP(t){return t}function ij(t,...e){return iN(t,iP,iP,e)}function iA(t,...e){return iN(t,Array.from,iP,e)}function iT(t,e,...n){return iN(t,iP,e,n)}function iC(t,e,...n){return iN(t,Array.from,e,n)}function iN(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new iM,l=r[o++],s=-1;for(let t of i){let e=l(t,++s,i),n=a.get(e);n?n.push(t):a.set(e,[t])}for(let[e,n]of a)a.set(e,t(n,o));return e(a)}(t,0)}var iL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function iI(t,e){return ih(t,t=>e[t])}function iR(t,e){return id(t,t=>e[t])}function iD(t,e){let n=2.5*iF(t,e)-1.5*iz(t,e);return ih(t,t=>e[t]>=n?e[t]:NaN)}function iF(t,e){return ik(t,.25,t=>e[t])}function iB(t,e){return ik(t,.5,t=>e[t])}function iz(t,e){return ik(t,.75,t=>e[t])}function iW(t,e){let n=2.5*iz(t,e)-1.5*iF(t,e);return id(t,t=>e[t]<=n?e[t]:NaN)}function i$(){return(t,e)=>{let{encode:n}=e,{y:r,x:i}=n,{value:o}=r,{value:a}=i;return[Array.from(ij(t,t=>a[+t]).values()).flatMap(t=>{let e=iD(t,o),n=iW(t,o);return t.filter(t=>o[t]<e||o[t]>n)}),e]}}let iG=t=>{let{data:e,encode:n,style:r={},tooltip:i={},transform:o,animate:a}=t,l=iL(t,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,u=iL(r,["point"]),{y:c}=n,f={y:c,y1:c,y2:c,y3:c,y4:c},p={y1:iF,y2:iB,y3:iz},h=n0(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),d=n0(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!s)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:iI},p),{y4:iR})],encode:Object.assign(Object.assign({},n),f),style:u,tooltip:h},l);let y=nY(u,"box"),g=nY(u,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:iD},p),{y4:iW})],encode:Object.assign(Object.assign({},n),f),style:y,tooltip:h,animate:n5(a,"box")},l),{type:"point",data:e,transform:[{type:i$}],encode:n,style:Object.assign({},g),tooltip:d,animate:n5(a,"point")}]};iG.props={};var iH=function(t){return nR(t,"Number")},iV=n(420),iU="undefined"!=typeof Float32Array?Float32Array:Array;function iq(){var t=new iU(3);return iU!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function iY(t){var e=new iU(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function iX(t){return Math.hypot(t[0],t[1],t[2])}function iK(t,e,n){var r=new iU(3);return r[0]=t,r[1]=e,r[2]=n,r}function iZ(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function iQ(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function iJ(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function i0(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function i1(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function i2(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function i5(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function i3(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function i4(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function i6(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],l=e[2];return Math.abs(n-o)<=1e-6*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=1e-6*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-l)<=1e-6*Math.max(1,Math.abs(i),Math.abs(l))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var i8=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function i9(){var t=new iU(16);return iU!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function i7(t){var e=new iU(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function ot(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function oe(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new iU(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=l,g[8]=s,g[9]=u,g[10]=c,g[11]=f,g[12]=p,g[13]=h,g[14]=d,g[15]=y,g}function on(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=l,t[7]=s,t[8]=u,t[9]=c,t[10]=f,t[11]=p,t[12]=h,t[13]=d,t[14]=y,t[15]=g,t}function or(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oi(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],l=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=l}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function oo(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15],b=n*l-r*a,x=n*s-i*a,O=n*u-o*a,w=r*s-i*l,E=r*u-o*l,k=i*u-o*s,M=c*y-f*d,S=c*g-p*d,_=c*v-h*d,P=f*g-p*y,j=f*v-h*y,A=p*v-h*g,T=b*A-x*j+O*P+w*_-E*S+k*M;return T?(T=1/T,t[0]=(l*A-s*j+u*P)*T,t[1]=(i*j-r*A-o*P)*T,t[2]=(y*k-g*E+v*w)*T,t[3]=(p*E-f*k-h*w)*T,t[4]=(s*_-a*A-u*S)*T,t[5]=(n*A-i*_+o*S)*T,t[6]=(g*O-d*k-v*x)*T,t[7]=(c*k-p*O+h*x)*T,t[8]=(a*j-l*_+u*M)*T,t[9]=(r*_-n*j-o*M)*T,t[10]=(d*E-y*O+v*b)*T,t[11]=(f*O-c*E-h*b)*T,t[12]=(l*S-a*P-s*M)*T,t[13]=(n*P-r*S+i*M)*T,t[14]=(y*x-d*w-g*b)*T,t[15]=(c*w-f*x+p*b)*T,t):null}function oa(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];return t[0]=l*(p*v-h*g)-f*(s*v-u*g)+y*(s*h-u*p),t[1]=-(r*(p*v-h*g)-f*(i*v-o*g)+y*(i*h-o*p)),t[2]=r*(s*v-u*g)-l*(i*v-o*g)+y*(i*u-o*s),t[3]=-(r*(s*h-u*p)-l*(i*h-o*p)+f*(i*u-o*s)),t[4]=-(a*(p*v-h*g)-c*(s*v-u*g)+d*(s*h-u*p)),t[5]=n*(p*v-h*g)-c*(i*v-o*g)+d*(i*h-o*p),t[6]=-(n*(s*v-u*g)-a*(i*v-o*g)+d*(i*u-o*s)),t[7]=n*(s*h-u*p)-a*(i*h-o*p)+c*(i*u-o*s),t[8]=a*(f*v-h*y)-c*(l*v-u*y)+d*(l*h-u*f),t[9]=-(n*(f*v-h*y)-c*(r*v-o*y)+d*(r*h-o*f)),t[10]=n*(l*v-u*y)-a*(r*v-o*y)+d*(r*u-o*l),t[11]=-(n*(l*h-u*f)-a*(r*h-o*f)+c*(r*u-o*l)),t[12]=-(a*(f*g-p*y)-c*(l*g-s*y)+d*(l*p-s*f)),t[13]=n*(f*g-p*y)-c*(r*g-i*y)+d*(r*p-i*f),t[14]=-(n*(l*g-s*y)-a*(r*g-i*y)+d*(r*s-i*l)),t[15]=n*(l*p-s*f)-a*(r*p-i*f)+c*(r*s-i*l),t}function ol(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],l=t[6],s=t[7],u=t[8],c=t[9],f=t[10],p=t[11],h=t[12],d=t[13],y=t[14],g=t[15];return(e*a-n*o)*(f*g-p*y)-(e*l-r*o)*(c*g-p*d)+(e*s-i*o)*(c*y-f*d)+(n*l-r*a)*(u*g-p*h)-(n*s-i*a)*(u*y-f*h)+(r*s-i*l)*(u*d-c*h)}function os(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],y=e[12],g=e[13],v=e[14],b=e[15],x=n[0],O=n[1],w=n[2],E=n[3];return t[0]=x*r+O*l+w*f+E*y,t[1]=x*i+O*s+w*p+E*g,t[2]=x*o+O*u+w*h+E*v,t[3]=x*a+O*c+w*d+E*b,x=n[4],O=n[5],w=n[6],E=n[7],t[4]=x*r+O*l+w*f+E*y,t[5]=x*i+O*s+w*p+E*g,t[6]=x*o+O*u+w*h+E*v,t[7]=x*a+O*c+w*d+E*b,x=n[8],O=n[9],w=n[10],E=n[11],t[8]=x*r+O*l+w*f+E*y,t[9]=x*i+O*s+w*p+E*g,t[10]=x*o+O*u+w*h+E*v,t[11]=x*a+O*c+w*d+E*b,x=n[12],O=n[13],w=n[14],E=n[15],t[12]=x*r+O*l+w*f+E*y,t[13]=x*i+O*s+w*p+E*g,t[14]=x*o+O*u+w*h+E*v,t[15]=x*a+O*c+w*d+E*b,t}function ou(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*v+e[12],t[13]=e[1]*y+e[5]*g+e[9]*v+e[13],t[14]=e[2]*y+e[6]*g+e[10]*v+e[14],t[15]=e[3]*y+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=l,t[5]=s,t[6]=u,t[7]=c,t[8]=f,t[9]=p,t[10]=h,t[11]=d,t[12]=r*y+l*g+f*v+e[12],t[13]=i*y+s*g+p*v+e[13],t[14]=o*y+u*g+h*v+e[14],t[15]=a*y+c*g+d*v+e[15]),t}function oc(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function of(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,S,_,P,j=r[0],A=r[1],T=r[2],C=Math.hypot(j,A,T);return C<1e-6?null:(j*=C=1/C,A*=C,T*=C,i=Math.sin(n),a=1-(o=Math.cos(n)),l=e[0],s=e[1],u=e[2],c=e[3],f=e[4],p=e[5],h=e[6],d=e[7],y=e[8],g=e[9],v=e[10],b=e[11],x=j*j*a+o,O=A*j*a+T*i,w=T*j*a-A*i,E=j*A*a-T*i,k=A*A*a+o,M=T*A*a+j*i,S=j*T*a+A*i,_=A*T*a-j*i,P=T*T*a+o,t[0]=l*x+f*O+y*w,t[1]=s*x+p*O+g*w,t[2]=u*x+h*O+v*w,t[3]=c*x+d*O+b*w,t[4]=l*E+f*k+y*M,t[5]=s*E+p*k+g*M,t[6]=u*E+h*k+v*M,t[7]=c*E+d*k+b*M,t[8]=l*S+f*_+y*P,t[9]=s*S+p*_+g*P,t[10]=u*S+h*_+v*P,t[11]=c*S+d*_+b*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function op(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],l=e[6],s=e[7],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*r,t[5]=a*i+c*r,t[6]=l*i+f*r,t[7]=s*i+p*r,t[8]=u*i-o*r,t[9]=c*i-a*r,t[10]=f*i-l*r,t[11]=p*i-s*r,t}function oh(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-u*r,t[1]=a*i-c*r,t[2]=l*i-f*r,t[3]=s*i-p*r,t[8]=o*r+u*i,t[9]=a*r+c*i,t[10]=l*r+f*i,t[11]=s*r+p*i,t}function od(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[4],c=e[5],f=e[6],p=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+u*r,t[1]=a*i+c*r,t[2]=l*i+f*r,t[3]=s*i+p*r,t[4]=u*i-o*r,t[5]=c*i-a*r,t[6]=f*i-l*r,t[7]=p*i-s*r,t}function oy(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function og(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function om(t,e,n){var r,i,o,a=n[0],l=n[1],s=n[2],u=Math.hypot(a,l,s);return u<1e-6?null:(a*=u=1/u,l*=u,s*=u,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=l*a*o+s*r,t[2]=s*a*o-l*r,t[3]=0,t[4]=a*l*o-s*r,t[5]=l*l*o+i,t[6]=s*l*o+a*r,t[7]=0,t[8]=a*s*o+l*r,t[9]=l*s*o-a*r,t[10]=s*s*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function ov(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ob(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ox(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oO(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=r+r,s=i+i,u=o+o,c=r*l,f=r*s,p=r*u,h=i*s,d=i*u,y=o*u,g=a*l,v=a*s,b=a*u;return t[0]=1-(h+y),t[1]=f+b,t[2]=p-v,t[3]=0,t[4]=f-b,t[5]=1-(c+y),t[6]=d+g,t[7]=0,t[8]=p+v,t[9]=d-g,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function ow(t,e){var n=new iU(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=r*r+i*i+o*o+a*a;return f>0?(n[0]=(l*a+c*r+s*o-u*i)*2/f,n[1]=(s*a+c*i+u*r-l*o)*2/f,n[2]=(u*a+c*o+l*i-s*r)*2/f):(n[0]=(l*a+c*r+s*o-u*i)*2,n[1]=(s*a+c*i+u*r-l*o)*2,n[2]=(u*a+c*o+l*i-s*r)*2),oO(t,e,n),t}function oE(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function ok(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],l=e[6],s=e[8],u=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,l),t[2]=Math.hypot(s,u,c),t}function oM(t,e){var n=new iU(3);ok(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,l=e[1]*i,s=e[2]*o,u=e[4]*r,c=e[5]*i,f=e[6]*o,p=e[8]*r,h=e[9]*i,d=e[10]*o,y=a+c+d,g=0;return y>0?(g=2*Math.sqrt(y+1),t[3]=.25*g,t[0]=(f-h)/g,t[1]=(p-s)/g,t[2]=(l-u)/g):a>c&&a>d?(g=2*Math.sqrt(1+a-c-d),t[3]=(f-h)/g,t[0]=.25*g,t[1]=(l+u)/g,t[2]=(p+s)/g):c>d?(g=2*Math.sqrt(1+c-a-d),t[3]=(p-s)/g,t[0]=(l+u)/g,t[1]=.25*g,t[2]=(f+h)/g):(g=2*Math.sqrt(1+d-a-c),t[3]=(l-u)/g,t[0]=(p+s)/g,t[1]=(f+h)/g,t[2]=.25*g),t}function oS(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=e[3],s=i+i,u=o+o,c=a+a,f=i*s,p=i*u,h=i*c,d=o*u,y=o*c,g=a*c,v=l*s,b=l*u,x=l*c,O=r[0],w=r[1],E=r[2];return t[0]=(1-(d+g))*O,t[1]=(p+x)*O,t[2]=(h-b)*O,t[3]=0,t[4]=(p-x)*w,t[5]=(1-(f+g))*w,t[6]=(y+v)*w,t[7]=0,t[8]=(h+b)*E,t[9]=(y-v)*E,t[10]=(1-(f+d))*E,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function o_(t,e,n,r,i){var o=e[0],a=e[1],l=e[2],s=e[3],u=o+o,c=a+a,f=l+l,p=o*u,h=o*c,d=o*f,y=a*c,g=a*f,v=l*f,b=s*u,x=s*c,O=s*f,w=r[0],E=r[1],k=r[2],M=i[0],S=i[1],_=i[2],P=(1-(y+v))*w,j=(h+O)*w,A=(d-x)*w,T=(h-O)*E,C=(1-(p+v))*E,N=(g+b)*E,L=(d+x)*k,I=(g-b)*k,R=(1-(p+y))*k;return t[0]=P,t[1]=j,t[2]=A,t[3]=0,t[4]=T,t[5]=C,t[6]=N,t[7]=0,t[8]=L,t[9]=I,t[10]=R,t[11]=0,t[12]=n[0]+M-(P*M+T*S+L*_),t[13]=n[1]+S-(j*M+C*S+I*_),t[14]=n[2]+_-(A*M+N*S+R*_),t[15]=1,t}function oP(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,l=r+r,s=i+i,u=n*a,c=r*a,f=r*l,p=i*a,h=i*l,d=i*s,y=o*a,g=o*l,v=o*s;return t[0]=1-f-d,t[1]=c+v,t[2]=p-g,t[3]=0,t[4]=c-v,t[5]=1-u-d,t[6]=h+y,t[7]=0,t[8]=p+g,t[9]=h-y,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oj(t,e,n,r,i,o,a){var l=1/(n-e),s=1/(i-r),u=1/(o-a);return t[0]=2*o*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*s,t[6]=0,t[7]=0,t[8]=(n+e)*l,t[9]=(i+r)*s,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t}function oA(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}iq();var oT=oA;function oC(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function oN(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),l=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+l),u=2/(i+o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((a-l)*s*.5),t[9]=(i-o)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function oL(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=(a+o)*u,t[15]=1,t}var oI=oL;function oR(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=o*u,t[15]=1,t}function oD(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d=e[0],y=e[1],g=e[2],v=r[0],b=r[1],x=r[2],O=n[0],w=n[1],E=n[2];return 1e-6>Math.abs(d-O)&&1e-6>Math.abs(y-w)&&1e-6>Math.abs(g-E)?or(t):(h=1/Math.hypot(c=d-O,f=y-w,p=g-E),c*=h,f*=h,p*=h,(h=Math.hypot(i=b*p-x*f,o=x*c-v*p,a=v*f-b*c))?(i*=h=1/h,o*=h,a*=h):(i=0,o=0,a=0),(h=Math.hypot(l=f*a-p*o,s=p*i-c*a,u=c*o-f*i))?(l*=h=1/h,s*=h,u*=h):(l=0,s=0,u=0),t[0]=i,t[1]=l,t[2]=c,t[3]=0,t[4]=o,t[5]=s,t[6]=f,t[7]=0,t[8]=a,t[9]=u,t[10]=p,t[11]=0,t[12]=-(i*d+o*y+a*g),t[13]=-(l*d+s*y+u*g),t[14]=-(c*d+f*y+p*g),t[15]=1,t)}function oF(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=r[0],s=r[1],u=r[2],c=i-n[0],f=o-n[1],p=a-n[2],h=c*c+f*f+p*p;h>0&&(c*=h=1/Math.sqrt(h),f*=h,p*=h);var d=s*p-u*f,y=u*c-l*p,g=l*f-s*c;return(h=d*d+y*y+g*g)>0&&(d*=h=1/Math.sqrt(h),y*=h,g*=h),t[0]=d,t[1]=y,t[2]=g,t[3]=0,t[4]=f*g-p*y,t[5]=p*d-c*g,t[6]=c*y-f*d,t[7]=0,t[8]=c,t[9]=f,t[10]=p,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function oB(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function oz(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function oW(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function o$(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function oG(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function oH(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function oV(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function oU(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],l=t[5],s=t[6],u=t[7],c=t[8],f=t[9],p=t[10],h=t[11],d=t[12],y=t[13],g=t[14],v=t[15],b=e[0],x=e[1],O=e[2],w=e[3],E=e[4],k=e[5],M=e[6],S=e[7],_=e[8],P=e[9],j=e[10],A=e[11],T=e[12],C=e[13],N=e[14],L=e[15];return Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-x)<=1e-6*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(i-O)<=1e-6*Math.max(1,Math.abs(i),Math.abs(O))&&Math.abs(o-w)<=1e-6*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(a-E)<=1e-6*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(l-k)<=1e-6*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(s-M)<=1e-6*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(u-S)<=1e-6*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-_)<=1e-6*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(f-P)<=1e-6*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(p-j)<=1e-6*Math.max(1,Math.abs(p),Math.abs(j))&&Math.abs(h-A)<=1e-6*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(d-T)<=1e-6*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(y-C)<=1e-6*Math.max(1,Math.abs(y),Math.abs(C))&&Math.abs(g-N)<=1e-6*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(v-L)<=1e-6*Math.max(1,Math.abs(v),Math.abs(L))}var oq=os,oY=o$;function oX(){var t=new iU(9);return iU!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function oK(){var t=new iU(4);return iU!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function oZ(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function oQ(){var t=new iU(4);return iU!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function oJ(t,e,n){var r=Math.sin(n*=.5);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function o0(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=n[0],s=n[1],u=n[2],c=n[3];return t[0]=r*c+a*l+i*u-o*s,t[1]=i*c+a*s+o*l-r*u,t[2]=o*c+a*u+r*s-i*l,t[3]=a*c-r*l-i*s-o*u,t}function o1(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,l=a?1/a:0;return t[0]=-n*l,t[1]=-r*l,t[2]=-i*l,t[3]=o*l,t}function o2(t,e,n,r){var i=.5*Math.PI/180,o=Math.sin(e*=i),a=Math.cos(e),l=Math.sin(n*=i),s=Math.cos(n),u=Math.sin(r*=i),c=Math.cos(r);return t[0]=o*s*c-a*l*u,t[1]=a*l*c+o*s*u,t[2]=a*s*u-o*l*c,t[3]=a*s*c+o*l*u,t}oK();var o5=function(t,e,n,r){var i=new iU(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},o3=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},o4=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};iq(),iK(1,0,0),iK(0,1,0),oQ(),oQ(),oX(),PW=new iU(2),iU!=Float32Array&&(PW[0]=0,PW[1]=0);var o6={}.toString,o8=function(t,e){return o6.call(t)==="[object "+e+"]"},o9=function(t){return o8(t,"Number")};function o7(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var at=function(t){return null==t},ae=function(t){return o8(t,"String")},an=function(t,e,n){return t<e?e:t>n?n:t},ar={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ai(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return ar[e]===t.length-1&&"achlmqstvz".includes(e)})}function ao(t){return ai(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function aa(t){return ao(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var al={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function as(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=ar[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,ar[n]))),ar[n]););}function au(t){return t>=48&&t<=57}function ac(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}var af=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function ap(t){if(aa(t))return[].concat(t);for(var e=function(t){if(ao(t))return[].concat(t);var e=function(t){if(ai(t))return[].concat(t);var e=new af(t);for(ac(e);e.index<e.max&&!e.err.length;)!function(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=ar[n[r].toLowerCase()];if(t.segmentStart=r,!function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,ac(t),t.data=[],!o)return as(t);for(;;){for(var a,l=o;l>0;l-=1){if((32|i)==97&&(3===l||4===l)?!function(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);if(48===r){t.param=0,t.index+=1;return}if(49===r){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e}(t):!function(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,l=!1,s=!1,u=!1;if(o>=n){t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';return}if((43===(e=r.charCodeAt(o))||45===e)&&(o+=1,e=r.charCodeAt(o)),!au(e)&&46!==e){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number';return}if(46!==e){if(a=48===e,o+=1,e=r.charCodeAt(o),a&&o<n&&e&&au(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&au(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;au(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(u&&!l&&!s){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent';return}if(o+=1,(43===(e=r.charCodeAt(o))||45===e)&&(o+=1),o<n&&au(r.charCodeAt(o)))for(;o<n&&au(r.charCodeAt(o));)o+=1;else{t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent';return}}t.index=o,t.param=+t.pathValue.slice(i,o)}(t),t.err.length)return;t.data.push(t.param),ac(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,ac(t))}if(t.index>=t.max||!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}as(t)}(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map(function(t){var e,a=t.slice(1).map(Number),l=t[0],s=l.toUpperCase();if("M"===l)return n=a[0],r=a[1],i=n,o=r,["M",n,r];if(l!==s)switch(s){case"A":e=[s,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[s,a[0]+r];break;case"H":e=[s,a[0]+n];break;default:e=[s].concat(a.map(function(t,e){return t+(e%2?r:n)}))}else e=[s].concat(a);var u=e.length;switch(s){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[u-2],r=e[u-1],"M"===s&&(i=n,o=r)}return e})}(t),n=tz({},al),r=0;r<e.length;r+=1){e[r]=function(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,l=t.slice(1).map(Number),s=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)s=["L",t[1],i];else if("V"===n)s=["L",r,t[1]];else if("S"===n){var u=2*r-o,c=2*i-a;e.x1=u,e.y1=c,s=["C",u,c].concat(l)}else if("T"===n){var f=2*r-e.qx,p=2*i-e.qy;e.qx=f,e.qy=p,s=["Q",f,p].concat(l)}else if("Q"===n){var h=l[0],d=l[1];e.qx=h,e.qy=d}return s}(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function ah(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function ad(t,e,n,r,i){var o=o7([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(i<=0)a={x:t,y:e};else if(i>=o)a={x:n,y:r};else{var l=ah([t,e],[n,r],i/o);a={x:l[0],y:l[1]}}return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function ay(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(n*o-r*i<0?-1:1)*Math.acos((n*i+r*o)/a)}function ag(t,e,n,r,i,o,a,l,s,u){var c,f=u.bbox,p=void 0===f||f,h=u.length,d=void 0===h||h,y=u.sampleSize,g=void 0===y?10:y,v="number"==typeof s,b=t,x=e,O=0,w=[b,x,0],E=[b,x],k=0,M={x:0,y:0},S=[{x:b,y:x}];v&&s<=0&&(M={x:b,y:x});for(var _=0;_<=g;_+=1){if(b=(c=function(t,e,n,r,i,o,a,l,s){var u=1-s;return{x:Math.pow(u,3)*t+3*Math.pow(u,2)*s*n+3*u*Math.pow(s,2)*i+Math.pow(s,3)*a,y:Math.pow(u,3)*e+3*Math.pow(u,2)*s*r+3*u*Math.pow(s,2)*o+Math.pow(s,3)*l}}(t,e,n,r,i,o,a,l,_/g)).x,x=c.y,p&&S.push({x:b,y:x}),d&&(O+=o7(E,[b,x])),E=[b,x],v&&O>=s&&s>w[2]){var P=(O-s)/(O-w[2]);M={x:E[0]*(1-P)+w[0]*P,y:E[1]*(1-P)+w[1]*P}}w=[b,x,O]}return v&&s>=O&&(M={x:a,y:l}),{length:O,point:M,min:{x:Math.min.apply(null,S.map(function(t){return t.x})),y:Math.min.apply(null,S.map(function(t){return t.y}))},max:{x:Math.max.apply(null,S.map(function(t){return t.x})),y:Math.max.apply(null,S.map(function(t){return t.y}))}}}function am(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=ap(t),h="number"==typeof e,d=[],y=0,g=0,v=0,b=0,x=[],O=[],w=0,E={x:0,y:0},k=E,M=E,S=E,_=0,P=0,j=p.length;P<j;P+=1)d=(u="M"===(c=(f=p[P])[0]))?d:[y,g].concat(f.slice(1)),u?(k=E={x:v=f[1],y:b=f[2]},w=0,h&&e<.001&&(S=E)):"L"===c?(w=(r=ad(d[0],d[1],d[2],d[3],(e||0)-_)).length,E=r.min,k=r.max,M=r.point):"A"===c?(w=(i=function(t,e,n,r,i,o,a,l,s,u,c){var f,p=c.bbox,h=void 0===p||p,d=c.length,y=void 0===d||d,g=c.sampleSize,v=void 0===g?30:g,b="number"==typeof u,x=t,O=e,w=0,E=[x,O,0],k=[x,O],M=0,S={x:0,y:0},_=[{x:x,y:O}];b&&u<=0&&(S={x:x,y:O});for(var P=0;P<=v;P+=1){if(x=(f=function(t,e,n,r,i,o,a,l,s,u){var c=Math.abs,f=Math.sin,p=Math.cos,h=Math.sqrt,d=Math.PI,y=c(n),g=c(r),v=d/180*((i%360+360)%360);if(t===l&&e===s)return{x:t,y:e};if(0===y||0===g)return ad(t,e,l,s,u).point;var b=(t-l)/2,x=(e-s)/2,O={x:p(v)*b+f(v)*x,y:-f(v)*b+p(v)*x},w=Math.pow(O.x,2)/Math.pow(y,2)+Math.pow(O.y,2)/Math.pow(g,2);w>1&&(y*=h(w),g*=h(w));var E=(Math.pow(y,2)*Math.pow(g,2)-Math.pow(y,2)*Math.pow(O.y,2)-Math.pow(g,2)*Math.pow(O.x,2))/(Math.pow(y,2)*Math.pow(O.y,2)+Math.pow(g,2)*Math.pow(O.x,2)),k=(o!==a?1:-1)*h(E=E<0?0:E),M={x:k*(y*O.y/g),y:k*(-(g*O.x)/y)},S={x:p(v)*M.x-f(v)*M.y+(t+l)/2,y:f(v)*M.x+p(v)*M.y+(e+s)/2},_={x:(O.x-M.x)/y,y:(O.y-M.y)/g},P=ay({x:1,y:0},_),j=ay(_,{x:(-O.x-M.x)/y,y:(-O.y-M.y)/g});!a&&j>0?j-=2*d:a&&j<0&&(j+=2*d);var A=P+(j%=2*d)*u,T=y*p(A),C=g*f(A);return{x:p(v)*T-f(v)*C+S.x,y:f(v)*T+p(v)*C+S.y}}(t,e,n,r,i,o,a,l,s,P/v)).x,O=f.y,h&&_.push({x:x,y:O}),y&&(w+=o7(k,[x,O])),k=[x,O],b&&w>=u&&u>E[2]){var j=(w-u)/(w-E[2]);S={x:k[0]*(1-j)+E[0]*j,y:k[1]*(1-j)+E[1]*j}}E=[x,O,w]}return b&&u>=w&&(S={x:l,y:s}),{length:w,point:S,min:{x:Math.min.apply(null,_.map(function(t){return t.x})),y:Math.min.apply(null,_.map(function(t){return t.y}))},max:{x:Math.max.apply(null,_.map(function(t){return t.x})),y:Math.max.apply(null,_.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-_,n||{})).length,E=i.min,k=i.max,M=i.point):"C"===c?(w=(o=ag(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-_,n||{})).length,E=o.min,k=o.max,M=o.point):"Q"===c?(w=(a=function(t,e,n,r,i,o,a,l){var s,u=l.bbox,c=void 0===u||u,f=l.length,p=void 0===f||f,h=l.sampleSize,d=void 0===h?10:h,y="number"==typeof a,g=t,v=e,b=0,x=[g,v,0],O=[g,v],w=0,E={x:0,y:0},k=[{x:g,y:v}];y&&a<=0&&(E={x:g,y:v});for(var M=0;M<=d;M+=1){if(g=(s=function(t,e,n,r,i,o,a){var l=1-a;return{x:Math.pow(l,2)*t+2*l*a*n+Math.pow(a,2)*i,y:Math.pow(l,2)*e+2*l*a*r+Math.pow(a,2)*o}}(t,e,n,r,i,o,M/d)).x,v=s.y,c&&k.push({x:g,y:v}),p&&(b+=o7(O,[g,v])),O=[g,v],y&&b>=a&&a>x[2]){var S=(b-a)/(b-x[2]);E={x:O[0]*(1-S)+x[0]*S,y:O[1]*(1-S)+x[1]*S}}x=[g,v,b]}return y&&a>=b&&(E={x:i,y:o}),{length:b,point:E,min:{x:Math.min.apply(null,k.map(function(t){return t.x})),y:Math.min.apply(null,k.map(function(t){return t.y}))},max:{x:Math.max.apply(null,k.map(function(t){return t.x})),y:Math.max.apply(null,k.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-_,n||{})).length,E=a.min,k=a.max,M=a.point):"Z"===c&&(w=(l=ad((d=[y,g,v,b])[0],d[1],d[2],d[3],(e||0)-_)).length,E=l.min,k=l.max,M=l.point),h&&_<e&&_+w>=e&&(S=M),O.push(k),x.push(E),_+=w,y=(s="Z"!==c?f.slice(-2):[v,b])[0],g=s[1];return h&&e>=_&&(S={x:y,y:g}),{length:_,point:S,min:{x:Math.min.apply(null,x.map(function(t){return t.x})),y:Math.min.apply(null,x.map(function(t){return t.y}))},max:{x:Math.max.apply(null,O.map(function(t){return t.x})),y:Math.max.apply(null,O.map(function(t){return t.y}))}}}var av=function(t){return Array.isArray?Array.isArray(t):o8(t,"Array")},ab=function(t){if(av(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},ax=function(t){if(av(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},aO=function(t,e){return(t%e+e)%e};function aw(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var aE=function(t,e,n,r){return tq(tq([],ah([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function ak(t,e){if(void 0===e&&(e=!1),aa(t)&&t.every(function(t){var e=t[0];return"MC".includes(e)})){var n,r,i=[].concat(t);return e?[i,[]]:i}for(var o=ap(t),a=tz({},al),l=[],s="",u=o.length,c=[],f=0;f<u;f+=1){o[f]&&(s=o[f][0]),l[f]=s;var p=function(t,e){var n,r,i,o,a,l,s,u,c,f=t[0],p=t.slice(1).map(Number),h=p[0],d=p[1],y=e.x1,g=e.y1,v=e.x,b=e.y;switch(!"TQ".includes(f)&&(e.qx=null,e.qy=null),f){case"M":e.x=h,e.y=d;break;case"A":return["C"].concat(function t(e,n,r,i,o,a,l,s,u,c){var f,p,h,d,y,g=e,v=n,b=r,x=i,O=s,w=u,E=120*Math.PI/180,k=Math.PI/180*(+o||0),M=[];if(c)p=c[0],h=c[1],d=c[2],y=c[3];else{g=(f=aw(g,v,-k)).x,v=f.y,O=(f=aw(O,w,-k)).x,w=f.y;var S=(g-O)/2,_=(v-w)/2,P=S*S/(b*b)+_*_/(x*x);P>1&&(b*=P=Math.sqrt(P),x*=P);var j=b*b,A=x*x,T=(a===l?-1:1)*Math.sqrt(Math.abs((j*A-j*_*_-A*S*S)/(j*_*_+A*S*S)));d=T*b*_/x+(g+O)/2,y=-(T*x)*S/b+(v+w)/2,p=Math.asin(((v-y)/x*1e9>>0)/1e9),h=Math.asin(((w-y)/x*1e9>>0)/1e9),p=g<d?Math.PI-p:p,h=O<d?Math.PI-h:h,p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),l&&p>h&&(p-=2*Math.PI),!l&&h>p&&(h-=2*Math.PI)}var C=h-p;if(Math.abs(C)>E){var N=h,L=O,I=w;M=t(O=d+b*Math.cos(h=p+E*(l&&h>p?1:-1)),w=y+x*Math.sin(h),b,x,o,0,l,L,I,[h,N,d,y])}C=h-p;var R=Math.cos(p),D=Math.cos(h),F=Math.tan(C/4),B=4/3*b*F,z=4/3*x*F,W=[g,v],$=[g+B*Math.sin(p),v-z*R],G=[O+B*Math.sin(h),w-z*D],H=[O,w];if($[0]=2*W[0]-$[0],$[1]=2*W[1]-$[1],c)return $.concat(G,H,M);M=$.concat(G,H,M);for(var V=[],U=0,q=M.length;U<q;U+=1)V[U]=U%2?aw(M[U-1],M[U],k).y:aw(M[U],M[U+1],k).x;return V}((c=[y,g].concat(p))[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9]));case"Q":return e.qx=h,e.qy=d,["C"].concat((n=(c=[y,g].concat(p))[0],r=c[1],i=c[2],o=c[3],a=c[4],l=c[5],[1/3*n+2/3*i,1/3*r+2/3*o,1/3*a+2/3*i,1/3*l+2/3*o,a,l]));case"L":return["C"].concat(aE(y,g,h,d));case"Z":if(y===v&&g===b)return["C",y,g,v,b,v,b];return["C"].concat(aE(y,g,v,b))}return t}(o[f],a);o[f]=p;var h=f;if(o[h].length>7){o[h].shift();for(var d=o[h],y=h;d.length;)l[h]="A",o.splice(y+=1,0,["C"].concat(d.splice(0,6)));o.splice(h,1)}u=o.length,"Z"===s&&c.push(f),r=(n=o[f]).length,a.x1=+n[r-2],a.y1=+n[r-1],a.x2=+n[r-4]||a.x1,a.y2=+n[r-3]||a.y1}return e?[o,c]:o}function aM(t){return t.map(function(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=e&&n[e-1].slice(-2).concat(t.slice(1)),g=e?ag(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],{bbox:!1}).length:0;return d=e?g?(void 0===r&&(r=.5),i=y.slice(0,2),o=y.slice(2,4),a=y.slice(4,6),l=y.slice(6,8),s=ah(i,o,r),u=ah(o,a,r),c=ah(a,l,r),f=ah(s,u,r),p=ah(u,c,r),h=ah(f,p,r),[["C"].concat(s,f,h),["C"].concat(p,c,l)]):[t,t]:[t],{s:t,ss:d,l:g}})}function aS(t){var e,n,r;return e=0,n=0,r=0,ak(t).map(function(t){if("M"===t[0])return e=t[1],n=t[2],0;var i,o,a,l=t.slice(1),s=l[0],u=l[1],c=l[2],f=l[3],p=l[4],h=l[5];return o=e,r=3*((h-(a=n))*(s+c)-(p-o)*(u+f)+u*(o-c)-s*(a-f)+h*(c+o/3)-p*(f+a/3))/20,e=(i=t.slice(-2))[0],n=i[1],r}).reduce(function(t,e){return t+e},0)>=0}var a_=function(t){return o8(t,"Boolean")},aP=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},aj=function(t){return void 0===t};function aA(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function aT(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function aC(){}var aN="\\s*([+-]?\\d+)\\s*",aL="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",aI="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",aR=/^#([0-9a-f]{3,8})$/,aD=RegExp("^rgb\\("+[aN,aN,aN]+"\\)$"),aF=RegExp("^rgb\\("+[aI,aI,aI]+"\\)$"),aB=RegExp("^rgba\\("+[aN,aN,aN,aL]+"\\)$"),az=RegExp("^rgba\\("+[aI,aI,aI,aL]+"\\)$"),aW=RegExp("^hsl\\("+[aL,aI,aI]+"\\)$"),a$=RegExp("^hsla\\("+[aL,aI,aI,aL]+"\\)$"),aG={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function aH(){return this.rgb().formatHex()}function aV(){return this.rgb().formatRgb()}function aU(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=aR.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?aq(e):3===n?new aX(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?aY(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?aY(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=aD.exec(t))?new aX(e[1],e[2],e[3],1):(e=aF.exec(t))?new aX(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=aB.exec(t))?aY(e[1],e[2],e[3],e[4]):(e=az.exec(t))?aY(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=aW.exec(t))?aJ(e[1],e[2]/100,e[3]/100,1):(e=a$.exec(t))?aJ(e[1],e[2]/100,e[3]/100,e[4]):aG.hasOwnProperty(t)?aq(aG[t]):"transparent"===t?new aX(NaN,NaN,NaN,0):null}function aq(t){return new aX(t>>16&255,t>>8&255,255&t,1)}function aY(t,e,n,r){return r<=0&&(t=e=n=NaN),new aX(t,e,n,r)}function aX(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function aK(){return"#"+aQ(this.r)+aQ(this.g)+aQ(this.b)}function aZ(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function aQ(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function aJ(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new a1(t,e,n,r)}function a0(t){if(t instanceof a1)return new a1(t.h,t.s,t.l,t.opacity);if(t instanceof aC||(t=aU(t)),!t)return new a1;if(t instanceof a1)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+(n<r)*6:n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new a1(a,l,s,t.opacity)}function a1(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function a2(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function a5(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function a3(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function a4(t,e){var n=Math.min.apply(Math,tq([],tV(t),!1)),r=Math.min.apply(Math,tq([],tV(e),!1));return{x:n,y:r,width:Math.max.apply(Math,tq([],tV(t),!1))-n,height:Math.max.apply(Math,tq([],tV(e),!1))-r}}function a6(t,e,n,r,i,o){var a=-1,l=1/0,s=[n,r],u=20;o&&o>200&&(u=o/10);for(var c=1/u,f=c/10,p=0;p<=u;p++){var h=p*c,d=[i.apply(void 0,tq([],tV(t.concat([h])),!1)),i.apply(void 0,tq([],tV(e.concat([h])),!1))],y=a3(s[0],s[1],d[0],d[1]);y<l&&(a=h,l=y)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var g=t.length;return{x:t[g-1],y:e[g-1]}}l=1/0;for(var p=0;p<32&&!(f<1e-4);p++){var v=a-f,b=a+f,d=[i.apply(void 0,tq([],tV(t.concat([v])),!1)),i.apply(void 0,tq([],tV(e.concat([v])),!1))],y=a3(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var x=[i.apply(void 0,tq([],tV(t.concat([b])),!1)),i.apply(void 0,tq([],tV(e.concat([b])),!1))],O=a3(s[0],s[1],x[0],x[1]);b<=1&&O<l?(a=b,l=O):f*=.5}}return{x:i.apply(void 0,tq([],tV(t.concat([a])),!1)),y:i.apply(void 0,tq([],tV(e.concat([a])),!1))}}aA(aC,aU,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:aH,formatHex:aH,formatHsl:function(){return a0(this).formatHsl()},formatRgb:aV,toString:aV}),aA(aX,function(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof aC||(i=aU(i)),i)?new aX((i=i.rgb()).r,i.g,i.b,i.opacity):new aX:new aX(t,e,n,null==r?1:r)},aT(aC,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new aX(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new aX(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:aK,formatHex:aK,formatRgb:aZ,toString:aZ})),aA(a1,function(t,e,n,r){return 1==arguments.length?a0(t):new a1(t,e,n,null==r?1:r)},aT(aC,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new a1(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new a1(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new aX(a2(t>=240?t-240:t+120,i,r),a2(t,i,r),a2(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));function a8(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function a9(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function a7(t,e,n,r){var i,o,a,l=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,u=3*e-3*t,c=[];if(a5(l,0))!a5(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;a5(f,0)?c.push(-s/(2*l)):f>0&&(i=(-s+(a=Math.sqrt(f)))/(2*l),o=(-s-a)/(2*l),i>=0&&i<=1&&c.push(i),o>=0&&o<=1&&c.push(o))}return c}function lt(t,e,n,r,i,o,a,l,s,u,c){var f=a6([t,n,i,a],[e,r,o,l],s,u,a9,c);return a3(f.x,f.y,s,u)}function le(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function ln(t,e,n){var r=t+n-2*e;if(a5(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}"undefined"!=typeof globalThis||("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self);var lr={exports:{}};lr.exports=function(){function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return t<e?-1:+(t>e)}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e){i(t,0,t.children.length,e,t)}function i(t,e,n,r,i){i||(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var l=t.children[a];o(i,t.leaf?r(l):l)}return i}function o(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function a(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function s(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function h(n,r,i,o,a){for(var l=[r,i];l.length;)if(!((i=l.pop())-(r=l.pop())<=o)){var s=r+Math.ceil((i-r)/o/2)*o;(function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var l=o-i+1,s=r-i+1,u=Math.log(l),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(l-c)/l)*(s-l/2<0?-1:1),p=Math.max(i,Math.floor(r-s*c/l+f)),h=Math.min(o,Math.floor(r+(l-s)*c/l+f));e(n,r,p,h,a)}var d=n[r],y=i,g=o;for(t(n,i,r),a(n[o],d)>0&&t(n,i,o);y<g;){for(t(n,y,g),y++,g--;0>a(n[y],d);)y++;for(;a(n[g],d)>0;)g--}0===a(n[i],d)?t(n,i,g):t(n,++g,o),g<=r&&(i=g+1),r<=g&&(o=g-1)}})(n,s,r||0,i||n.length-1,a||e),l.push(r,s,s,i)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],l=e.leaf?r(a):a;f(t,l)&&(e.leaf?n.push(a):c(t,l)?this._all(a,n):i.push(a))}e=i.pop()}return n},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||c(t,o))return!0;n.push(i)}}e=n.pop()}return!1},n.prototype.load=function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=p([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var n,r,i,o=this.data,a=this.toBBox(t),l=[],s=[];o||l.length;){if(o||(o=l.pop(),r=l[l.length-1],n=s.pop(),i=!0),o.leaf){var u=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return -1}(t,o.children,e);if(-1!==u){o.children.splice(u,1),l.push(o),this._condense(l);break}}!i&&!o.leaf&&c(o,a)?(l.push(o),s.push(n),n=0,r=o,o=o.children[0]):r?(n++,o=r.children[n],i=!1):o=null}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},n.prototype._build=function(t,e,n,i){var o,a=n-e+1,l=this._maxEntries;if(a<=l)return r(o=p(t.slice(e,n+1)),this.toBBox),o;i||(i=Math.ceil(Math.log(a)/Math.log(l)),l=Math.ceil(a/Math.pow(l,i-1))),(o=p([])).leaf=!1,o.height=i;var s=Math.ceil(a/l),u=s*Math.ceil(Math.sqrt(l));h(t,e,n,u,this.compareMinX);for(var c=e;c<=n;c+=u){var f=Math.min(c+u-1,n);h(t,c,f,s,this.compareMinY);for(var d=c;d<=f;d+=s){var y=Math.min(d+s-1,f);o.children.push(this._build(t,d,y,i-1))}}return r(o,this.toBBox),o},n.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,l=0;l<e.children.length;l++){var u,c,f=e.children[l],p=s(f),h=(u=t,(Math.max((c=f).maxX,u.maxX)-Math.min(c.minX,u.minX))*(Math.max(c.maxY,u.maxY)-Math.min(c.minY,u.minY))-p);h<o?(o=h,i=p<i?p:i,a=f):h===o&&p<i&&(i=p,a=f)}e=a||e.children[0]}return e},n.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],a=this._chooseSubtree(r,this.data,e,i);for(a.children.push(t),o(a,r);e>=0;)if(i[e].children.length>this._maxEntries)this._split(i,e),e--;else break;this._adjustParentBBoxes(r,i,e)},n.prototype._split=function(t,e){var n=t[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);var a=this._chooseSplitIndex(n,o,i),l=p(n.children.splice(a,n.children.length-a));l.height=n.height,l.leaf=n.leaf,r(n,this.toBBox),r(l,this.toBBox),e?t[e-1].children.push(l):this._splitRoot(n,l)},n.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,n){for(var r,o=1/0,a=1/0,l=e;l<=n-e;l++){var u=i(t,0,l,this.toBBox),c=i(t,l,n,this.toBBox),f=function(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY);return Math.max(0,Math.min(t.maxX,e.maxX)-n)*Math.max(0,Math.min(t.maxY,e.maxY)-r)}(u,c),p=s(u)+s(c);f<o?(o=f,r=l,a=p<a?p:a):f===o&&p<a&&(a=p,r=l)}return r||n-e},n.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:a,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},n.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var a=this.toBBox,l=i(t,0,e,a),s=i(t,n-e,n,a),c=u(l)+u(s),f=e;f<n-e;f++){var p=t.children[f];o(l,t.leaf?a(p):p),c+=u(l)}for(var h=n-e-1;h>=e;h--){var d=t.children[h];o(s,t.leaf?a(d):d),c+=u(s)}return c},n.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)o(e[r],t)},n.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},n}();var li=lr.exports;(P$=ja||(ja={})).GROUP="g",P$.CIRCLE="circle",P$.ELLIPSE="ellipse",P$.IMAGE="image",P$.RECT="rect",P$.LINE="line",P$.POLYLINE="polyline",P$.POLYGON="polygon",P$.TEXT="text",P$.PATH="path",P$.HTML="html",P$.MESH="mesh",(PG=jl||(jl={}))[PG.ZERO=0]="ZERO",PG[PG.NEGATIVE_ONE=1]="NEGATIVE_ONE";var lo=function(){function t(){this.plugins=[]}return t.prototype.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},t.prototype.removeAllRenderingPlugins=function(){var t=this;this.plugins.forEach(function(e){var n=t.context.renderingPlugins.indexOf(e);n>=0&&t.context.renderingPlugins.splice(n,1)})},t}(),la=function(){function t(t){this.clipSpaceNearZ=jl.NEGATIVE_ONE,this.plugins=[],this.config=tz({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0},t)}return t.prototype.registerPlugin=function(t){-1===this.plugins.findIndex(function(e){return e===t})&&this.plugins.push(t)},t.prototype.unregisterPlugin=function(t){var e=this.plugins.findIndex(function(e){return e===t});e>-1&&this.plugins.splice(e,1)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getPlugin=function(t){return this.plugins.find(function(e){return e.name===t})},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}();function ll(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function ls(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function lu(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function lc(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function lf(t){return void 0===t?0:t>360||t<-360?t%360:t}function lp(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?iY(t):o9(t)?iK(t,e,n):iK(t[0],t[1]||e,t[2]||n)}function lh(t){return Math.PI/180*t}function ld(t){return 180/Math.PI*t}function ly(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,b;return 16===e.length?(i=.5*Math.PI,a=(o=tV(ok(iq(),e),3))[0],l=o[1],s=o[2],(u=Math.asin(-e[2]/a))<i?u>-i?(n=Math.atan2(e[6]/l,e[10]/s),r=Math.atan2(e[1]/a,e[0]/a)):(r=0,n=-Math.atan2(e[4]/l,e[5]/l)):(r=0,n=Math.atan2(e[4]/l,e[5]/l)),t[0]=n,t[1]=u,t[2]=r,t):(c=e[0],f=e[1],p=e[2],h=e[3],v=c*c+(d=f*f)+(y=p*p)+(g=h*h),(b=c*h-f*p)>.499995*v?(t[0]=Math.PI/2,t[1]=2*Math.atan2(f,c),t[2]=0):b<-.499995*v?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(f,c),t[2]=0):(t[0]=Math.asin(2*(c*p-h*f)),t[1]=Math.atan2(2*(c*h+f*p),1-2*(y+g)),t[2]=Math.atan2(2*(c*f+p*h),1-2*(d+y))),t)}function lg(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var l=ld(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var lm=i9(),lv=i9(),lb=oK(),lx=[iq(),iq(),iq()],lO=iq();function lw(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var lE=function(){function t(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){ll(this.center,t),ll(this.halfExtents,e),ls(this.min,this.center,this.halfExtents),lu(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){lu(this.center,e,t),lc(this.center,this.center,.5),ls(this.halfExtents,e,t),lc(this.halfExtents,this.halfExtents,.5),ll(this.min,t),ll(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e)){if(t.isEmpty(this))return void this.setMinMax(e.getMin(),e.getMax());var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,l=a[0],s=a[1],u=a[2],c=r-l,f=r+l,p=i-s,h=i+s,d=o-u,y=o+u,g=e.center,v=g[0],b=g[1],x=g[2],O=e.halfExtents,w=O[0],E=O[1],k=O[2],M=v-w,S=v+w,_=b-E,P=b+E,j=x-k,A=x+k;M<c&&(c=M),S>f&&(f=S),_<p&&(p=_),P>h&&(h=P),j<d&&(d=j),A>y&&(y=A),n[0]=(c+f)*.5,n[1]=(p+h)*.5,n[2]=(d+y)*.5,a[0]=(f-c)*.5,a[1]=(h-p)*.5,a[2]=(y-d)*.5,this.min[0]=c,this.min[1]=p,this.min[2]=d,this.max[0]=f,this.max[1]=h,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],l=e[4],s=e[8],u=e[1],c=e[5],f=e[9],p=e[2],h=e[6],d=e[10],y=Math.abs(a),g=Math.abs(l),v=Math.abs(s),b=Math.abs(u),x=Math.abs(c),O=Math.abs(f),w=Math.abs(p),E=Math.abs(h),k=Math.abs(d);n[0]=e[12]+a*i[0]+l*i[1]+s*i[2],n[1]=e[13]+u*i[0]+c*i[1]+f*i[2],n[2]=e[14]+p*i[0]+h*i[1]+d*i[2],r[0]=y*o[0]+g*o[1]+v*o[2],r[1]=b*o[0]+x*o[1]+O*o[2],r[2]=w*o[0]+E*o[1]+k*o[2],ls(this.min,n,r),lu(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n,r,i,o,a,l,s=new t,u=(n=[0,0,0],r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n),c=(o=[0,0,0],a=this.getMax(),l=e.getMax(),o[0]=Math.min(a[0],l[0]),o[1]=Math.min(a[1],l[1]),o[2]=Math.min(a[2],l[2]),o);return s.setMinMax(u,c),s},t.prototype.getNegativeFarPoint=function(t){if(273===t.pnVertexFlag)return ll([0,0,0],this.min);if(272===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];if(257===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];if(256===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];if(17===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];else if(16===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];else if(1===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];else return[this.max[0],this.max[1],this.max[2]]},t.prototype.getPositiveFarPoint=function(t){if(273===t.pnVertexFlag)return ll([0,0,0],this.max);if(272===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];if(257===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];if(256===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];if(17===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];else if(16===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];else if(1===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];else return[this.min[0],this.min[1],this.min[2]]},t}(),lk=function(){function t(t,e){this.distance=t||0,this.normal=e||iK(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return i5(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/iX(this.normal);i1(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&i3(n,t,e,i),o},t}();(PH=js||(js={}))[PH.OUTSIDE=0xffffffff]="OUTSIDE",PH[PH.INSIDE=0]="INSIDE",PH[PH.INDETERMINATE=0x7fffffff]="INDETERMINATE";var lM=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new lk)}return t.prototype.extractFromVPMatrix=function(t){var e=tV(t,16),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];iQ(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,iQ(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,iQ(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,iQ(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,iQ(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,iQ(this.planes[5].normal,o+i,u+s,h+p),this.planes[5].distance=v+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}(),lS=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),l_=function(){function t(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),lP="Method not implemented.",lj="Use document.documentElement instead.";(PV=ju||(ju={}))[PV.ORBITING=0]="ORBITING",PV[PV.EXPLORING=1]="EXPLORING",PV[PV.TRACKING=2]="TRACKING",(PU=jc||(jc={}))[PU.DEFAULT=0]="DEFAULT",PU[PU.ROTATIONAL=1]="ROTATIONAL",PU[PU.TRANSLATIONAL=2]="TRANSLATIONAL",PU[PU.CINEMATIC=3]="CINEMATIC",(Pq=jf||(jf={}))[Pq.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Pq[Pq.PERSPECTIVE=1]="PERSPECTIVE";var lA={UPDATED:"updated"},lT=function(){function t(){this.clipSpaceNearZ=jl.NEGATIVE_ONE,this.eventEmitter=new iV,this.matrix=i9(),this.right=iK(1,0,0),this.up=iK(0,1,0),this.forward=iK(0,0,1),this.position=iK(0,0,1),this.focalPoint=iK(0,0,0),this.distanceVector=iK(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=i9(),this.projectionMatrixInverse=i9(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=ju.EXPLORING,this.trackingMode=jc.DEFAULT,this.projectionMode=jf.PERSPECTIVE,this.frustum=new lM,this.orthoMatrix=i9()}return t.prototype.isOrtho=function(){return this.projectionMode===jf.ORTHOGRAPHIC},t.prototype.getProjectionMode=function(){return this.projectionMode},t.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},t.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},t.prototype.getFrustum=function(){return this.frustum},t.prototype.getPosition=function(){return this.position},t.prototype.getFocalPoint=function(){return this.focalPoint},t.prototype.getDollyingStep=function(){return this.dollyingStep},t.prototype.getNear=function(){return this.near},t.prototype.getFar=function(){return this.far},t.prototype.getZoom=function(){return this.zoom},t.prototype.getOrthoMatrix=function(){return this.orthoMatrix},t.prototype.getView=function(){return this.view},t.prototype.setEnableUpdate=function(t){this.enableUpdate=t},t.prototype.setType=function(t,e){return this.type=t,this.type===ju.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===ju.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},t.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},t.prototype.setTrackingMode=function(t){if(this.type!==ju.TRACKING)throw Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},t.prototype.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},t.prototype.getViewTransform=function(){return oo(i9(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=oy(i9(),[t,e,0]);this.jitteredProjectionMatrix=os(i9(),n,this.projectionMatrix)},t.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},t.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},t.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},t.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},t.prototype.setNear=function(t){return this.projectionMode===jf.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},t.prototype.setFar=function(t){return this.projectionMode===jf.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},t.prototype.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===jf.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===jf.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===jf.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===jf.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},t.prototype.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,i=n.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(r,i),this.setFocalPoint(r,i),this.setZoom(t),this.rotate(0,0,o);var a=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),l=iK(a.x-r,a.y-i,0),s=i5(l,this.right)/iX(this.right),u=i5(l,this.up)/iX(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=jf.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,l,s,u,c,f,p,h=this.near*Math.tan(lh(.5*this.fov))/this.zoom,d=2*h,y=this.aspect*d,g=-.5*y;if(null==(p=this.view)?void 0:p.enabled){var v=this.view.fullWidth,b=this.view.fullHeight;g+=this.view.offsetX*y/v,h-=this.view.offsetY*d/b,y*=this.view.width/v,d*=this.view.height/b}return i=this.projectionMatrix,o=g,a=g+y,l=h,s=h-d,u=this.far,this.clipSpaceNearZ===jl.ZERO?(c=-u/(u-t),f=-u*t/(u-t)):(c=-(u+t)/(u-t),f=-2*u*t/(u-t)),i[0]=2*t/(a-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=2*t/(l-s),i[6]=0,i[7]=0,i[8]=(a+o)/(a-o),i[9]=(l+s)/(l-s),i[10]=c,i[11]=-1,i[12]=0,i[13]=0,i[14]=f,i[15]=0,oc(this.projectionMatrix,this.projectionMatrix,iK(1,-1,1)),oo(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=jf.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var a,l=(this.rright-this.left)/(2*this.zoom),s=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,c=(this.top+this.bottom)/2,f=u-l,p=u+l,h=c+s,d=c-s;if(null==(a=this.view)?void 0:a.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,p=f+y*this.view.width,h-=g*this.view.offsetY,d=h-g*this.view.height}return this.clipSpaceNearZ===jl.NEGATIVE_ONE?oI(this.projectionMatrix,f,p,d,h,i,o):oR(this.projectionMatrix,f,p,d,h,i,o),oc(this.projectionMatrix,this.projectionMatrix,iK(1,-1,1)),oo(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},t.prototype.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=lp(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},t.prototype.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r=iK(0,1,0);if(this.focalPoint=lp(t,e,n),this.trackingMode===jc.CINEMATIC){var i=i0(iq(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=ld(Math.asin(e/iX(i))),a=90+ld(Math.atan2(n,t)),l=i9();oh(l,l,lh(a)),op(l,l,lh(o)),r=i4(iq(),[0,1,0],l)}return oo(this.matrix,oD(i9(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},t.prototype.getDistance=function(){return this.distance},t.prototype.getDistanceVector=function(){return this.distanceVector},t.prototype.setDistance=function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=iq();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},t.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},t.prototype.setMinDistance=function(t){return this.minDistance=t,this},t.prototype.setAzimuth=function(t){return this.azimuth=lf(t),this.computeMatrix(),this._getAxes(),this.type===ju.ORBITING||this.type===ju.EXPLORING?this._getPosition():this.type===ju.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=lf(t),this.computeMatrix(),this._getAxes(),this.type===ju.ORBITING||this.type===ju.EXPLORING?this._getPosition():this.type===ju.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=lf(t),this.computeMatrix(),this._getAxes(),this.type===ju.ORBITING||this.type===ju.EXPLORING?this._getPosition():this.type===ju.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getRoll=function(){return this.roll},t.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},t.prototype.computeMatrix=function(){var t=oJ(oQ(),[0,0,1],lh(this.roll));or(this.matrix);var e=oJ(oQ(),[1,0,0],lh((this.rotateWorld&&this.type!==ju.TRACKING||this.type===ju.TRACKING?1:-1)*this.elevation)),n=oJ(oQ(),[0,1,0],lh((this.rotateWorld&&this.type!==ju.TRACKING||this.type===ju.TRACKING?1:-1)*this.azimuth)),r=o0(oQ(),n,e);r=o0(oQ(),r,t);var i=oP(i9(),r);this.type===ju.ORBITING||this.type===ju.EXPLORING?(ou(this.matrix,this.matrix,this.focalPoint),os(this.matrix,this.matrix,i),ou(this.matrix,this.matrix,[0,0,this.distance])):this.type===ju.TRACKING&&(ou(this.matrix,this.matrix,this.position),os(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=lp(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},t.prototype._getAxes=function(){iZ(this.right,lp(oZ(oK(),[1,0,0,0],this.matrix))),iZ(this.up,lp(oZ(oK(),[0,1,0,0],this.matrix))),iZ(this.forward,lp(oZ(oK(),[0,0,1,0],this.matrix))),i2(this.right,this.right),i2(this.up,this.up),i2(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=iX(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===ju.TRACKING||this.rotateWorld?(this.elevation=ld(Math.asin(e/r)),this.azimuth=ld(Math.atan2(-t,-n))):(this.elevation=-ld(Math.asin(e/r)),this.azimuth=-ld(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){iZ(this.position,lp(oZ(oK(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){var t,e,n,r,i,o,a;n=this.distanceVector,r=[0,0,-this.distance],t=oX(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],i=r[0],o=r[1],a=r[2],n[0]=i*m[0]+o*m[3]+a*m[6],n[1]=i*m[1]+o*m[4]+a*m[7],n[2]=i*m[2]+o*m[5]+a*m[8],iJ(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=i0(iq(),this.focalPoint,this.position),this.distance=iX(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===jf.ORTHOGRAPHIC){var t=this.position,e=oJ(oQ(),[0,0,1],-this.roll*Math.PI/180);o_(this.orthoMatrix,e,iK((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),iK(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=os(i9(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(lA.UPDATED)}},t.prototype.rotate=function(t,e,n){throw Error(lP)},t.prototype.pan=function(t,e){throw Error(lP)},t.prototype.dolly=function(t){throw Error(lP)},t.prototype.createLandmark=function(t,e){throw Error(lP)},t.prototype.gotoLandmark=function(t,e){throw Error(lP)},t.prototype.cancelLandmarkAnimation=function(){throw Error(lP)},t}();function lC(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return n.cache=a.set(o,l)||a,l};return n.cache=new(lC.Cache||Map),n}lC.Cache=Map,(PY=jp||(jp={}))[PY.kUnknown=0]="kUnknown",PY[PY.kNumber=1]="kNumber",PY[PY.kPercentage=2]="kPercentage",PY[PY.kEms=3]="kEms",PY[PY.kPixels=4]="kPixels",PY[PY.kRems=5]="kRems",PY[PY.kDegrees=6]="kDegrees",PY[PY.kRadians=7]="kRadians",PY[PY.kGradians=8]="kGradians",PY[PY.kTurns=9]="kTurns",PY[PY.kMilliseconds=10]="kMilliseconds",PY[PY.kSeconds=11]="kSeconds",PY[PY.kInteger=12]="kInteger",(PX=jh||(jh={}))[PX.kUNumber=0]="kUNumber",PX[PX.kUPercent=1]="kUPercent",PX[PX.kULength=2]="kULength",PX[PX.kUAngle=3]="kUAngle",PX[PX.kUTime=4]="kUTime",PX[PX.kUOther=5]="kUOther",(PK=jd||(jd={}))[PK.kAll=0]="kAll",PK[PK.kNonNegative=1]="kNonNegative",PK[PK.kInteger=2]="kInteger",PK[PK.kNonNegativeInteger=3]="kNonNegativeInteger",PK[PK.kPositiveInteger=4]="kPositiveInteger",(PZ=jy||(jy={}))[PZ.kYes=0]="kYes",PZ[PZ.kNo=1]="kNo",(PQ=jg||(jg={}))[PQ.kYes=0]="kYes",PQ[PQ.kNo=1]="kNo";var lN=[{name:"em",unit_type:jp.kEms},{name:"px",unit_type:jp.kPixels},{name:"deg",unit_type:jp.kDegrees},{name:"rad",unit_type:jp.kRadians},{name:"grad",unit_type:jp.kGradians},{name:"ms",unit_type:jp.kMilliseconds},{name:"s",unit_type:jp.kSeconds},{name:"rem",unit_type:jp.kRems},{name:"turn",unit_type:jp.kTurns}];(PJ=jm||(jm={}))[PJ.kUnknownType=0]="kUnknownType",PJ[PJ.kUnparsedType=1]="kUnparsedType",PJ[PJ.kKeywordType=2]="kKeywordType",PJ[PJ.kUnitType=3]="kUnitType",PJ[PJ.kSumType=4]="kSumType",PJ[PJ.kProductType=5]="kProductType",PJ[PJ.kNegateType=6]="kNegateType",PJ[PJ.kInvertType=7]="kInvertType",PJ[PJ.kMinType=8]="kMinType",PJ[PJ.kMaxType=9]="kMaxType",PJ[PJ.kClampType=10]="kClampType",PJ[PJ.kTransformType=11]="kTransformType",PJ[PJ.kPositionType=12]="kPositionType",PJ[PJ.kURLImageType=13]="kURLImageType",PJ[PJ.kColorType=14]="kColorType",PJ[PJ.kUnsupportedColorType=15]="kUnsupportedColorType";var lL=function(t){return t?"number"===t?jp.kNumber:"percent"===t||"%"===t?jp.kPercentage:lN.find(function(e){return e.name===t}).unit_type:jp.kUnknown},lI=function(t){switch(t){case jp.kNumber:case jp.kInteger:return jh.kUNumber;case jp.kPercentage:return jh.kUPercent;case jp.kPixels:return jh.kULength;case jp.kMilliseconds:case jp.kSeconds:return jh.kUTime;case jp.kDegrees:case jp.kRadians:case jp.kGradians:case jp.kTurns:return jh.kUAngle;default:return jh.kUOther}},lR=function(t){switch(t){case jh.kUNumber:return jp.kNumber;case jh.kULength:return jp.kPixels;case jh.kUPercent:return jp.kPercentage;case jh.kUTime:return jp.kSeconds;case jh.kUAngle:return jp.kDegrees;default:return jp.kUnknown}},lD=function(t){var e=1;switch(t){case jp.kPixels:case jp.kDegrees:case jp.kSeconds:break;case jp.kMilliseconds:e=.001;break;case jp.kRadians:e=180/Math.PI;break;case jp.kGradians:e=.9;break;case jp.kTurns:e=360}return e},lF=function(t){switch(t){case jp.kNumber:case jp.kInteger:break;case jp.kPercentage:return"%";case jp.kEms:return"em";case jp.kRems:return"rem";case jp.kPixels:return"px";case jp.kDegrees:return"deg";case jp.kRadians:return"rad";case jp.kGradians:return"grad";case jp.kMilliseconds:return"ms";case jp.kSeconds:return"s";case jp.kTurns:return"turn"}return""},lB=function(){function t(){}return t.isAngle=function(t){return t===jp.kDegrees||t===jp.kRadians||t===jp.kGradians||t===jp.kTurns},t.isLength=function(t){return t>=jp.kEms&&t<jp.kDegrees},t.isRelativeUnit=function(t){return t===jp.kPercentage||t===jp.kEms||t===jp.kRems},t.isTime=function(t){return t===jp.kSeconds||t===jp.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(jy.kNo,jg.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=jm.kUnitType&&this.getType()<=jm.kClampType},t}(),lz=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return tB(e,t),e.prototype.getType=function(){return jm.kColorType},e.prototype.to=function(t){return this},e}(lB);(P0=jv||(jv={}))[P0.Constant=0]="Constant",P0[P0.LinearGradient=1]="LinearGradient",P0[P0.RadialGradient=2]="RadialGradient";var lW=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return tB(e,t),e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(t,e,n){return n},e.prototype.getType=function(){return jm.kColorType},e}(lB),l$=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return tB(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return jm.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(lB),lG=lC(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),lH=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function lV(t){return"function"==typeof t}var lU={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},lq=lC(function(t){var e=lG(t),n=lU[e];return(null==n?void 0:n.alias)||e}),lY=function(t,e){void 0===e&&(e="");var n="";if(Number.isFinite(t)){if(!Number.isNaN(t))throw Error();n="NaN"}else n=t>0?"infinity":"-infinity";return n+e},lX=function(t){return lR(lI(t))},lK=function(t){function e(e,n){void 0===n&&(n=jp.kNumber);var r,i=t.call(this)||this;return i.unit="string"==typeof n?lL(n):n,i.value=e,i}return tB(e,t),e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.equals=function(t){return this.value===t.value&&this.unit===t.unit},e.prototype.getType=function(){return jm.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=lX(this.unit);if(n!==lX(t)||n===jp.kUnknown)return null;var r=lD(this.unit)/lD(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case jp.kUnknown:break;case jp.kInteger:r=Number(this.value).toFixed(0);break;case jp.kNumber:case jp.kPercentage:case jp.kEms:case jp.kRems:case jp.kPixels:case jp.kDegrees:case jp.kRadians:case jp.kGradians:case jp.kMilliseconds:case jp.kSeconds:case jp.kTurns:var i=this.value,o=lF(this.unit);if(i<-999999||i>999999){var a=lF(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?lY(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+r},e}(lB),lZ=new lK(0,"px");new lK(1,"px");var lQ=new lK(0,"deg"),lJ=function(t){function e(e,n,r,i,o){void 0===i&&(i=1),void 0===o&&(o=!1);var a=t.call(this,"rgb")||this;return a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}return tB(e,t),e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(lz),l0=new l$("unset"),l1={"":l0,unset:l0,initial:new l$("initial"),inherit:new l$("inherit")},l2=function(t){return l1[t]||(l1[t]=new l$(t)),l1[t]},l5=new lJ(0,0,0,0,!0),l3=new lJ(0,0,0,0),l4=lC(function(t,e,n,r){return new lJ(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),l6=function(t,e){return void 0===e&&(e=jp.kNumber),new lK(t,e)},l8=new lK(50,"%");(P1=jb||(jb={}))[P1.Standard=0]="Standard",(P2=jx||(jx={}))[P2.ADDED=0]="ADDED",P2[P2.REMOVED=1]="REMOVED",P2[P2.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var l9={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new l_(0,0,0,0)};(P5=jO||(jO={})).COORDINATE="<coordinate>",P5.COLOR="<color>",P5.PAINT="<paint>",P5.NUMBER="<number>",P5.ANGLE="<angle>",P5.OPACITY_VALUE="<opacity-value>",P5.SHADOW_BLUR="<shadow-blur>",P5.LENGTH="<length>",P5.PERCENTAGE="<percentage>",P5.LENGTH_PERCENTAGE="<length> | <percentage>",P5.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",P5.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",P5.LIST_OF_POINTS="<list-of-points>",P5.PATH="<path>",P5.FILTER="<filter>",P5.Z_INDEX="<z-index>",P5.OFFSET_DISTANCE="<offset-distance>",P5.DEFINED_PATH="<defined-path>",P5.MARKER="<marker>",P5.TRANSFORM="<transform>",P5.TRANSFORM_ORIGIN="<transform-origin>",P5.TEXT="<text>",P5.TEXT_TRANSFORM="<text-transform>";var l7=function(){var t={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function n(t){throw Error(e+": "+t)}function r(){return i("linear-gradient",t.linearGradient,a)||i("repeating-linear-gradient",t.repeatingLinearGradient,a)||i("radial-gradient",t.radialGradient,l)||i("repeating-radial-gradient",t.repeatingRadialGradient,l)||i("conic-gradient",t.conicGradient,l)}function i(e,r,i){return o(r,function(r){var o=i();return o&&!b(t.comma)&&n("Missing comma before color stops"),{type:e,orientation:o,colorStops:p(h)}})}function o(e,r){var i=b(e);if(i){b(t.startCall)||n("Missing (");var o=r(i);return b(t.endCall)||n("Missing )"),o}}function a(){return v("directional",t.sideOrCorner,1)||v("angular",t.angleValue,1)}function l(){var n,r,i=s();return i&&((n=[]).push(i),r=e,b(t.comma)&&((i=s())?n.push(i):e=r)),n}function s(){var t,e,n=((t=v("shape",/^(circle)/i,0))&&(t.style=g()||u()),t||((e=v("shape",/^(ellipse)/i,0))&&(e.style=y()||u()),e));if(n)n.at=c();else{var r=u();if(r){n=r;var i=c();i&&(n.at=i)}else{var o=f();o&&(n={type:"default-radial",at:o})}}return n}function u(){return v("extent-keyword",t.extentKeywords,1)}function c(){if(v("position",/^at/,0)){var t=f();return t||n("Missing positioning value"),t}}function f(){var t={x:y(),y:y()};if(t.x||t.y)return{type:"position",value:t}}function p(e){var r=e(),i=[];if(r)for(i.push(r);b(t.comma);)(r=e())?i.push(r):n("One extra comma");return i}function h(){var e=v("hex",t.hexColor,1)||o(t.rgbaColor,function(){return{type:"rgba",value:p(d)}})||o(t.rgbColor,function(){return{type:"rgb",value:p(d)}})||v("literal",t.literalColor,0);return e||n("Expected color definition"),e.length=y(),e}function d(){return b(t.number)[1]}function y(){return v("%",t.percentageValue,1)||v("position-keyword",t.positionKeywords,1)||g()}function g(){return v("px",t.pixelValue,1)||v("em",t.emValue,1)}function v(t,e,n){var r=b(e);if(r)return{type:t,value:r[n]}}function b(t){var n=/^[\n\r\t\s]+/.exec(e);n&&x(n[0].length);var r=t.exec(e);return r&&x(r[0].length),r}function x(t){e=e.substring(t)}return function(t){var i;return e=t,i=p(r),e.length>0&&n("Invalid input not EOF"),i}}(),st=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,se=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,sn=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,sr=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,si={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},so=lC(function(t){var e;return l6("angular"===t.type?Number(t.value):si[t.value]||0,"deg")}),sa=lC(function(t){var e=50,n=50,r="%",i="%";if((null==t?void 0:t.type)==="position"){var o=t.value,a=o.x,l=o.y;(null==a?void 0:a.type)==="position-keyword"&&("left"===a.value?e=0:"center"===a.value?e=50:"right"===a.value?e=100:"top"===a.value?n=0:"bottom"===a.value&&(n=100)),(null==l?void 0:l.type)==="position-keyword"&&("left"===l.value?e=0:"center"===l.value?n=50:"right"===l.value?e=100:"top"===l.value?n=0:"bottom"===l.value&&(n=100)),((null==a?void 0:a.type)==="px"||(null==a?void 0:a.type)==="%"||(null==a?void 0:a.type)==="em")&&(r=null==a?void 0:a.type,e=Number(a.value)),((null==l?void 0:l.type)==="px"||(null==l?void 0:l.type)==="%"||(null==l?void 0:l.type)==="em")&&(i=null==l?void 0:l.type,n=Number(l.value))}return{cx:l6(e,r),cy:l6(n,i)}}),sl=lC(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return l7(t).map(function(t){var e=t.type,n=t.orientation,r=t.colorStops;!function(t){var e,n,r,i=t.length;t[i-1].length=null!=(e=t[i-1].length)?e:{type:"%",value:"100"},i>1&&(t[0].length=null!=(n=t[0].length)?n:{type:"%",value:"0"});for(var o=0,a=Number(t[0].length.value),l=1;l<i;l++){var s=null==(r=t[l].length)?void 0:r.value;if(!at(s)&&!at(a)){for(var u=1;u<l-o;u++)t[o+u].length={type:"%",value:"".concat(a+(Number(s)-a)*u/(l-o))};o=l,a=Number(s)}}}(r);var i=r.map(function(t){var e,n,r;return{offset:l6(Number(t.length.value),"%"),color:(n=(e=t).type,r=e.value,"hex"===n?"#".concat(r):"literal"===n?r:"rgb"===n?"rgb(".concat(r.join(","),")"):"rgba(".concat(r.join(","),")"))}});if("linear-gradient"===e)return new lW(jv.LinearGradient,{angle:n?so(n):lQ,steps:i});if("radial-gradient"===e&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=sa(n[0].at),a=o.cx,l=o.cy,s=void 0;if(n[0].style){var u=n[0].style,c=u.type,f=u.value;s="extent-keyword"===c?l2(f):l6(f,c)}return new lW(jv.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=st.exec(t);if(r){var i=(null==(e=r[2].match(sr))?void 0:e.map(function(t){return t.split(":")}))||[];return[new lW(jv.LinearGradient,{angle:l6(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=tV(t,2),n=e[0],r=e[1];return{offset:l6(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=se.exec(t);if(n){var r=(null==(e=n[4].match(sr))?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:l6(50,"%"),cy:l6(50,"%"),steps:r.map(function(t){var e=tV(t,2),n=e[0],r=e[1];return{offset:l6(100*Number(n),"%"),color:r}})}}return null}(t);if(o)if(!ae(o))return[new lW(jv.RadialGradient,o)];else t=o}else if("p"===n){var a=t,l=sn.exec(a);if(l){var s=l[1],u=l[2];switch(s){case"a":s="repeat";break;case"x":s="repeat-x";break;case"y":s="repeat-y";break;default:s="no-repeat"}return{image:u,repetition:s}}return null}}});function ss(t){return t&&!!t.image}function su(t){return t&&!at(t.r)&&!at(t.g)&&!at(t.b)}var sc=lC(function(t){if(ss(t))return tz({repetition:"repeat"},t);if(at(t)&&(t=""),"transparent"===t)return l3;"currentColor"===t&&(t="black");var e=sl(t);if(e)return e;var n=aU(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),l4.apply(void 0,tq([],tV(r),!1))});function sf(t,e){if(su(t)&&su(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(an(e[n],0,255));return e[3]=an(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function sp(t,e){if(at(e))return l6(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return l6(Number(e),"px");else if("deg".search(t)>=0)return l6(Number(e),"deg")}var n=[];e=e.replace(t,function(t){return n.push(t),"U"+t});var r="U("+t.source+")";return n.map(function(t){return l6(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var sh=function(t){return sp(/px/g,t)},sd=lC(sh);lC(function(t){return sp(RegExp("%","g"),t)});var sy=function(t){return o9(t)||isFinite(Number(t))?l6(Number(t)||0,"px"):sp(RegExp("px|%|em|rem","g"),t)},sg=lC(sy),sm=function(t){return sp(RegExp("deg|rad|grad|turn","g"),t)},sv=lC(sm);function sb(t){var e=0;return t.unit===jp.kDegrees?e=t.value:t.unit===jp.kRadians?e=ld(Number(t.value)):t.unit===jp.kTurns&&(e=360*Number(t.value)),e}function sx(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):ae(t)?n=t.split(" ").map(function(t){return Number(t)}):o9(t)&&(n=[t]),2===e)if(1===n.length)return[n[0],n[0]];else return[n[0],n[1]];return 1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]}function sO(t){return ae(t)?t.split(" ").map(function(t){return sg(t)}):t.map(function(t){return sg(t.toString())})}function sw(t,e,n){if(0===t.value)return 0;if(t.unit===jp.kPixels)return Number(t.value);if(t.unit===jp.kPercentage&&n){var r=n.nodeName===ja.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var sE=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function sk(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;)if(i=e.index+e[0].length,sE.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return sp(/deg|rad|grad|turn|px|%/g,t)||sc(t)})}),n.lastIndex===t.length)return r;return[]}function sM(t){return t.toString()}var sS=function(t){return"number"==typeof t?l6(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?l6(Number(t)):l6(0)},s_=lC(sS);function sP(t,e){return[t,e,sM]}function sj(t,e){return function(n,r){return[n,r,function(n){return sM(an(n,t,e))}]}}function sA(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function sT(t){return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=am(t.parsedStyle.path.absolutePath,void 0,tz(tz({},void 0),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function sC(t,e){return t[0]===e[0]&&t[1]===e[1]}function sN(t,e){var n,r=t.prePoint,i=t.currentPoint,o=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),l=Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2),s=Math.acos((a+l-(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))/(2*Math.sqrt(a)*Math.sqrt(l)));if(!s||0===Math.sin(s)||(void 0===n&&(n=1e-5),Math.abs(s-0)<n))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(o[1]-i[1],o[0]-i[0])),c=Math.abs(Math.atan2(o[0]-i[0],o[1]-i[1]));return{xExtra:e/2*(1/Math.sin(s/2))*Math.cos(s/2-(u=u>Math.PI/2?Math.PI-u:u))-e/2||0,yExtra:e/2*(1/Math.sin(s/2))*Math.cos((c=c>Math.PI/2?Math.PI-c:c)-s/2)-e/2||0}}function sL(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}lC(function(t){return ae(t)?t.split(" ").map(s_):t.map(s_)});var sI=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)},sR=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s=lh(r=aO(r,360));if(t.x===a.x&&t.y===a.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(0===e||0===n)return{x:0,y:0,ellipticalArcAngle:0};var u=(t.x-a.x)/2,c=(t.y-a.y)/2,f={x:Math.cos(s)*u+Math.sin(s)*c,y:-Math.sin(s)*u+Math.cos(s)*c},p=Math.pow(f.x,2)/Math.pow(e,2)+Math.pow(f.y,2)/Math.pow(n,2);p>1&&(e=Math.sqrt(p)*e,n=Math.sqrt(p)*n);var h=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2))/(Math.pow(e,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2)),d=(i!==o?1:-1)*Math.sqrt(h=h<0?0:h),y={x:d*(e*f.y/n),y:d*(-(n*f.x)/e)},g={x:Math.cos(s)*y.x-Math.sin(s)*y.y+(t.x+a.x)/2,y:Math.sin(s)*y.x+Math.cos(s)*y.y+(t.y+a.y)/2},v={x:(f.x-y.x)/e,y:(f.y-y.y)/n},b=sI({x:1,y:0},v),x=sI(v,{x:(-f.x-y.x)/e,y:(-f.y-y.y)/n});!o&&x>0?x-=2*Math.PI:o&&x<0&&(x+=2*Math.PI);var O=b+(x%=2*Math.PI)*l,w=e*Math.cos(O),E=n*Math.sin(O);return{x:Math.cos(s)*w-Math.sin(s)*E+g.x,y:Math.sin(s)*w+Math.cos(s)*E+g.y,ellipticalArcStartAngle:b,ellipticalArcEndAngle:b+x,ellipticalArcAngle:O,ellipticalArcCenter:g,resultantRx:e,resultantRy:n}};function sD(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,o=void 0===i?0:i,a=r.ry,l=void 0===a?0:a,s=r.xRotation,u=r.arcFlag,c=r.sweepFlag,f=sR({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=sR({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),h=p.x-f.x,d=p.y-f.y,y=Math.sqrt(h*h+d*d);return{x:-h/y,y:-d/y}}function sF(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function sB(t,e){return sF(t)*sF(e)?(t[0]*e[0]+t[1]*e[1])/(sF(t)*sF(e)):1}function sz(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(sB(t,e))}function sW(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,l=n-t,s=n+t,u=r-e,c=r+e;return[["M",l,r],["C",l,r-a,n-o,u,n,u],["C",n+o,u,s,r-a,s,r],["C",s,r+a,n+o,c,n,c],["C",n-o,c,l,r+a,l,r],["Z"]]}function s$(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p=[];switch(t.nodeName){case ja.LINE:var h=t.parsedStyle,d=h.x1,y=h.y1,g=h.x2,v=h.y2;p=[["M",void 0===d?0:d,void 0===y?0:y],["L",void 0===g?0:g,void 0===v?0:v]];break;case ja.CIRCLE:var b=t.parsedStyle,x=b.r,O=void 0===x?0:x,w=b.cx,E=void 0===w?0:w,k=b.cy,M=void 0===k?0:k;p=sW(O,O,E,M);break;case ja.ELLIPSE:var S=t.parsedStyle,_=S.rx,P=S.ry,j=S.cx,E=void 0===j?0:j,A=S.cy,M=void 0===A?0:A;p=sW(void 0===_?0:_,void 0===P?0:P,E,M);break;case ja.POLYLINE:case ja.POLYGON:n=t.parsedStyle.points.points,r=t.nodeName===ja.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),p=i;break;case ja.RECT:var T=t.parsedStyle,C=T.width,N=void 0===C?0:C,L=T.height,I=void 0===L?0:L,R=T.x,D=T.y,F=T.radius;p=function(t,e,n,r,i){if(i){var o=tV(i,4),a=o[0],l=o[1],s=o[2],u=o[3],c=t>0?1:-1,f=e>0?1:-1,p=+(c+f!==0);return[["M",c*a+n,r],["L",t-c*l+n,r],l?["A",l,l,0,0,p,t+n,f*l+r]:null,["L",t+n,e-f*s+r],s?["A",s,s,0,0,p,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,p,n,e+r-f*u]:null,["L",n,f*a+r],a?["A",a,a,0,0,p,c*a+n,r]:null,["Z"]].filter(function(t){return t})}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(N,I,void 0===R?0:R,void 0===D?0:D,F&&F.some(function(t){return 0!==t})&&F.map(function(t){return an(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case ja.PATH:p=tq([],tV(t.parsedStyle.path.absolutePath),!1)}if(p.length)return o=p,a=e,u=void 0===(s=(l=t.parsedStyle).defX)?0:s,f=void 0===(c=l.defY)?0:c,o.reduce(function(t,e){var n="";if("M"===e[0]||"L"===e[0]){var r=iK(e[1]-u,e[2]-f,0);a&&i4(r,r,a),n="".concat(e[0]).concat(r[0],",").concat(r[1])}else if("Z"===e[0])n=e[0];else if("C"===e[0]){var i=iK(e[1]-u,e[2]-f,0),o=iK(e[3]-u,e[4]-f,0),l=iK(e[5]-u,e[6]-f,0);a&&(i4(i,i,a),i4(o,o,a),i4(l,l,a)),n="".concat(e[0]).concat(i[0],",").concat(i[1],",").concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1])}else if("A"===e[0]){var s=iK(e[6]-u,e[7]-f,0);a&&i4(s,s,a),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],",").concat(e[5],",").concat(s[0],",").concat(s[1])}else if("Q"===e[0]){var i=iK(e[1]-u,e[2]-f,0),o=iK(e[3]-u,e[4]-f,0);a&&(i4(i,i,a),i4(o,o,a)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}var sG=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};try{e=ap(t)}catch(n){e=ap(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}!function(t){for(var e=0;e<t.length;e++){var n=t[e-1],r=t[e];if("M"===r[0]&&n){var i=n[0],o=[r[1],r[2]],a=void 0;"L"===i||"M"===i?a=[n[1],n[2]]:("C"===i||"A"===i||"Q"===i)&&(a=[n[n.length-2],n[n.length-1]]),a&&sC(o,a)&&(t.splice(e,1),e--)}}}(e);var e,n=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}(e),i=r.polygons,o=r.polylines,a=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=t.length,l=0;l<a;l++){var s=t[l];r=t[l+1];var u=s[0],c={command:u,prePoint:n,params:s,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[s[1],s[2]],o=l;break;case"A":c.arcParams=function(t,e){var n=e[1],r=e[2],i=aO(lh(e[3]),2*Math.PI),o=e[4],a=e[5],l=t[0],s=t[1],u=e[6],c=e[7],f=Math.cos(i)*(l-u)/2+Math.sin(i)*(s-c)/2,p=-1*Math.sin(i)*(l-u)/2+Math.cos(i)*(s-c)/2,h=f*f/(n*n)+p*p/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var d=n*n*(p*p)+r*r*(f*f),y=d?Math.sqrt((n*n*(r*r)-d)/d):1;o===a&&(y*=-1),isNaN(y)&&(y=0);var g=r?y*n*p/r:0,v=n?-(y*r)*f/n:0,b=(l+u)/2+Math.cos(i)*g-Math.sin(i)*v,x=(s+c)/2+Math.sin(i)*g+Math.cos(i)*v,O=[(f-g)/n,(p-v)/r],w=[(-1*f-g)/n,(-1*p-v)/r],E=sz([1,0],O),k=sz(O,w);return -1>=sB(O,w)&&(k=Math.PI),sB(O,w)>=1&&(k=0),0===a&&k>0&&(k-=2*Math.PI),1===a&&k<0&&(k+=2*Math.PI),{cx:b,cy:x,rx:sC(t,[u,c])?0:n,ry:sC(t,[u,c])?0:r,startAngle:E,endAngle:E+k,xRotation:i,arcFlag:o,sweepFlag:a}}(n,s)}if("Z"===u)n=i,r=t[o+1];else{var f=s.length;n=[s[f-2],s[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),c.currentPoint=n,e[o]&&sC(n,e[o].currentPoint)&&(e[o].prePoint=c.prePoint),c.nextPoint=r?[r[r.length-2],r[r.length-1]]:null;var p=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]];else if("Q"===u){var h=[s[1],s[2]];c.startTangent=[p[0]-h[0],p[1]-h[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]]}else if("T"===u){var d=e[l-1],h=sL(d.currentPoint,p);"Q"===d.command?(c.command="Q",c.startTangent=[p[0]-h[0],p[1]-h[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]]):(c.command="TL",c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]])}else if("C"===u){var y=[s[1],s[2]],g=[s[3],s[4]];c.startTangent=[p[0]-y[0],p[1]-y[1]],c.endTangent=[n[0]-g[0],n[1]-g[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[y[0]-g[0],y[1]-g[1]]),0===c.endTangent[0]&&0===c.endTangent[1]&&(c.endTangent=[g[0]-y[0],g[1]-y[1]])}else if("S"===u){var d=e[l-1],y=sL(d.currentPoint,p),g=[s[1],s[2]];"C"===d.command?(c.command="C",c.startTangent=[p[0]-y[0],p[1]-y[1]]):(c.command="SQ",c.startTangent=[p[0]-g[0],p[1]-g[1]]),c.endTangent=[n[0]-g[0],n[1]-g[1]]}else if("A"===u){var v=sD(c,0),b=v.x,x=v.y,O=sD(c,1,!1),w=O.x,E=O.y;c.startTangent=[b,x],c.endTangent=[w,E]}e.push(c)}return e}(e),l=function(t,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=t[o],l=a.currentPoint,s=a.params,u=a.prePoint,c=void 0;switch(a.command){case"Q":c=function(t,e,n,r,i,o){var a=ln(t,n,i)[0],l=ln(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(le(t,n,i,a)),void 0!==l&&u.push(le(e,r,o,l)),a4(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4]);break;case"C":c=function(t,e,n,r,i,o,a,l){for(var s=[t,a],u=[e,l],c=a7(t,n,i,a),f=a7(e,r,o,l),p=0;p<c.length;p++)s.push(a9(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(a9(e,r,o,l,f[p]));return a4(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var f=a.arcParams;c=function(t,e,n,r,i,o,a){for(var l=Math.atan(-r/n*Math.tan(i)),s=1/0,u=-1/0,c=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var p=l+f;o<a?o<p&&p<a&&c.push(p):a<p&&p<o&&c.push(p)}for(var f=0;f<c.length;f++){var h,d=n*Math.cos(i)*Math.cos(h=c[f])-r*Math.sin(i)*Math.sin(h)+t;d<s&&(s=d),d>u&&(u=d)}for(var y=Math.atan(r/(n*Math.tan(i))),g=1/0,v=-1/0,b=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var x=y+f;o<a?o<x&&x<a&&b.push(x):a<x&&x<o&&b.push(x)}for(var f=0;f<b.length;f++){var O,w=n*Math.sin(i)*Math.cos(O=b[f])+r*Math.cos(i)*Math.sin(O)+e;w<g&&(g=w),w>v&&(v=w)}return{x:s,y:g,width:u-s,height:v-g}}(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(l[0]),r.push(l[1])}c&&(a.box=c,n.push(c.x,c.x+c.width),r.push(c.y,c.y+c.height))}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var p=ab(n),h=ab(r),d=ax(n),y=ax(r);if(0===i.length)return{x:p,y:h,width:d-p,height:y-h};for(var o=0;o<i.length;o++){var a=i[o],l=a.currentPoint,g=void 0;l[0]===p?p-=sN(a,0).xExtra:l[0]===d&&(d+=sN(a,e).xExtra),l[1]===h?h-=sN(a,e).yExtra:l[1]===y&&(y+=sN(a,e).yExtra)}return{x:p,y:h,width:d-p,height:y-h}}(a,0),s=l.x,u=l.y,c=l.width,f=l.height;return{absolutePath:e,hasArc:n,segments:a,polygons:i,polylines:o,totalLength:0,rect:{x:Number.isFinite(s)?s:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(c)?c:0,height:Number.isFinite(f)?f:0}}},sH=lC(sG);function sV(t){return ae(t)?sH(t):sG(t)}function sU(t,e,n){var r,i,o,a,l,s,u,c,f,p,h=t.curve,d=e.curve;h&&0!==h.length||(h=ak(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=ak(e.absolutePath,!1),e.curve=d);var y=[h,d];h.length!==d.length&&(y=function t(e,n,r){var i=aM(e),o=aM(n),a=i.length,l=o.length,s=i.filter(function(t){return t.l}).length,u=o.filter(function(t){return t.l}).length,c=i.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,f=o.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/u||0,p=r||Math.max(a,l),h=[c,f],d=[p-a,p-l],y=0,g=[i,o].map(function(t,e){return t.l===p?t.map(function(t){return t.s}):t.map(function(t,n){return y=n&&d[e]&&t.l>=h[e],d[e]-=+!!y,y?t.ss:[t.s]}).flat()});return g[0].length===g[1].length?g:t(g[0],g[1],p)}(h,d));var g=aS(y[0])!==aS(y[1])?[["M"].concat((i=(r=y[0]).slice(1).map(function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):r[0].slice(1).concat(t.slice(1))}).map(function(t){return t.map(function(e,n){return t[t.length-n-2*(1-n%2)]})}).reverse())[0].slice(0,2))].concat(i.map(function(t){return["C"].concat(t.slice(2))})):y[0].map(function(t){return Array.isArray(t)?[].concat(t):t});return[g,(o=y[1],a=o.length-1,l=[],u=0,(f=(c=o.length)-1,p=o.map(function(t,e){return o.map(function(t,n){var r=e+n;return 0===n||o[r]&&"M"===o[r][0]?["M"].concat(o[r].slice(-2)):(r>=c&&(r-=f),o[r])})})).forEach(function(t,e){o.slice(1).forEach(function(t,n){u+=o7(o[(e+n)%a].slice(-2),g[n%a].slice(-2))}),l[e]=u,u=0}),p[l.indexOf(Math.min.apply(null,l))]),function(t){return t}]}function sq(t,e){var n,r,i=ae(t)?t.split(" ").map(function(t){var e=tV(t.split(","),2),n=e[0],r=e[1];return[Number(n),Number(r)]}):t,o=[],a=0,l=function(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=a3(r[0],r[1],i[0],i[1])}return e}(i);i.forEach(function(t,e){if(i[e+1]){var s,u;(n=[0,0])[0]=a/l,s=t[0],u=t[1],r=a3(s,u,i[e+1][0],i[e+1][1]),a+=r,n[1]=a/l,o.push(n)}});var s=Math.min.apply(Math,tq([],tV(i.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,tq([],tV(i.map(function(t){return t[1]})),!1));return e&&(e.parsedStyle.defX=s,e.parsedStyle.defY=u),{points:i,totalLength:l,segments:o}}function sY(t,e){return[t.points,e.points,function(t){return t}]}function sX(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function sK(t){return t}var sZ={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],sK],matrix3d:["NNNNNNNNNNNNNNNN",sK],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",sX([null,null,new lK(1)]),sK],scalex:["N",sX([null,new lK(1),new lK(1)]),sX([null,new lK(1)])],scaley:["N",sX([new lK(1),null,new lK(1)]),sX([new lK(1),null])],scalez:["N",sX([new lK(1),new lK(1),null])],scale3d:["NNN",sK],skew:["Aa",null,sK],skewx:["A",null,sX([null,lQ])],skewy:["A",null,sX([lQ,null])],translate:["Tt",sX([null,null,lZ]),sK],translatex:["T",sX([null,lZ,lZ]),sX([null,lZ])],translatey:["T",sX([lZ,null,lZ]),sX([lZ,null])],translatez:["L",sX([lZ,lZ,null])],translate3d:["TTL",sK]};function sQ(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){i=e.index+e[0].length;var o=e[1],a=sZ[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?lQ:sv(t)},N:s_,T:sg,L:sd})[p.toUpperCase()](f):({a:lQ,n:u[0],t:lZ})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function sJ(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){i=e.index+e[0].length;var o=e[1],a=sZ[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?lQ:sm(t)},N:sS,T:sy,L:sh})[p.toUpperCase()](f):({a:lQ,n:u[0],t:lZ})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function s0(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=lh(sb(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return[Math.cos(i=lh(sb(t.d[0]))),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return[Math.cos(i=lh(sb(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value;var e,n,r,i=lh(sb(t.d[3])),o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var l=Math.sin(i/2),s=l*Math.cos(i/2),u=l*l;return[1-2*(n*n+r*r)*u,2*(e*n*u+r*s),2*(e*r*u-n*s),0,2*(e*n*u-r*s),1-2*(e*e+r*r)*u,2*(n*r*u+e*s),0,2*(e*r*u+n*s),2*(n*r*u-e*s),1-2*(e*e+n*n)*u,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var c=lh(sb(t.d[0]));return[1,Math.tan(lh(sb(t.d[1]))),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return[1,0,0,0,Math.tan(i=lh(sb(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=lh(sb(t.d[0]))),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=sw(t.d[0],0,null)||0,n=sw(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=sw(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=sw(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=sw(t.d[0],0,null)||0,1];case"translate3d":return e=sw(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=sw(t.d[1],0,null)||0,r=sw(t.d[2],0,null)||0,1];case"perspective":var f=sw(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function s1(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function s2(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return!function(t,e,n,r,i,o){if(!(!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0}(lm,t)||(ot(lv,lm),lv[3]=0,lv[7]=0,lv[11]=0,lv[15]=1,1e-8>Math.abs(ol(lv))))){var a,l,s,u,c,f,p,h,d,y,g=lm[3],v=lm[7],b=lm[11],x=lm[12],O=lm[13],w=lm[14],E=lm[15];if(0!==g||0!==v||0!==b){if(lb[0]=g,lb[1]=v,lb[2]=b,lb[3]=E,!oo(lv,lv))return;oi(lv,lv),oZ(i,lb,lv)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=x,e[1]=O,e[2]=w,a=lx,l=lm,a[0][0]=l[0],a[0][1]=l[1],a[0][2]=l[2],a[1][0]=l[4],a[1][1]=l[5],a[1][2]=l[6],a[2][0]=l[8],a[2][1]=l[9],a[2][2]=l[10],n[0]=iX(lx[0]),i2(lx[0],lx[0]),r[0]=i5(lx[0],lx[1]),lw(lx[1],lx[1],lx[0],1,-r[0]),n[1]=iX(lx[1]),i2(lx[1],lx[1]),r[0]/=n[1],r[1]=i5(lx[0],lx[2]),lw(lx[2],lx[2],lx[0],1,-r[1]),r[2]=i5(lx[1],lx[2]),lw(lx[2],lx[2],lx[1],1,-r[2]),n[2]=iX(lx[2]),i2(lx[2],lx[2]),r[1]/=n[2],r[2]/=n[2],s=lx[1],u=lx[2],c=s[0],f=s[1],p=s[2],h=u[0],d=u[1],y=u[2],lO[0]=f*y-p*d,lO[1]=p*h-c*y,lO[2]=c*d-f*h,0>i5(lx[0],lO))for(var k=0;k<3;k++)n[k]*=-1,lx[k][0]*=-1,lx[k][1]*=-1,lx[k][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+lx[0][0]-lx[1][1]-lx[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-lx[0][0]+lx[1][1]-lx[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-lx[0][0]-lx[1][1]+lx[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+lx[0][0]+lx[1][1]+lx[2][2],0)),lx[2][1]>lx[1][2]&&(o[0]=-o[0]),lx[0][2]>lx[2][0]&&(o[1]=-o[1]),lx[1][0]>lx[0][1]&&(o[2]=-o[2])}}(0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(s0).reduce(s1),e,n,r,i,o),[[e,n,r,o,i]]}var s5=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a,l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;s<4;s++)l[s][3]=o[s];for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[3][s]+=e[u]*l[u][s];var c=i[0],f=i[1],p=i[2],h=i[3],d=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];d[0][0]=1-2*(f*f+p*p),d[0][1]=2*(c*f-p*h),d[0][2]=2*(c*p+f*h),d[1][0]=2*(c*f+p*h),d[1][1]=1-2*(c*c+p*p),d[1][2]=2*(f*p-c*h),d[2][0]=2*(c*p-f*h),d[2][1]=2*(f*p+c*h),d[2][2]=1-2*(c*c+f*f),l=t(l,d);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(y[2][1]=r[2],l=t(l,y)),r[1]&&(y[2][1]=0,y[2][0]=r[0],l=t(l,y)),r[0]&&(y[2][0]=0,y[1][0]=r[0],l=t(l,y));for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[s][u]*=n[s];return 0==(a=l)[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}}();function s3(t){return t.toFixed(6).replace(".000000","")}function s4(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=s2(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=s2(e)),null===n[0]||null===r[0])?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e);r=an(r,-1,1);var i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=+Math.sin(n*o)/Math.sqrt(1-r*r),l=0;l<4;l++)i.push(t[l]*(Math.cos(n*o)-r*a)+e[l]*a);return i}(n[0][3],r[0][3],t[5]);return s5(t[0],t[1],t[2],e,t[4]).map(s3).join(",")}])}function s6(t){return t.replace(/[xy]/,"")}function s8(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function s9(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=0;i<t.length;i++)!function(n){var r=t[n],i=r.t,o=r.d,a=+("scale"===i.substring(0,5));e.push({t:i,d:o.map(function(t){return"number"==typeof t?l6(a):l6(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=s4(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]]}else for(var i=0;i<t.length;i++){var u=t[i].t,c=e[i].t,f=t[i].d,p=e[i].d,h=sZ[u],d=sZ[c],y=void 0;if("perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=s4([t[i]],[e[i]]);o.push(s[0]),a.push(s[1]),l.push(["matrix",[s[2]]]);continue}if(u===c)y=u;else if(h[2]&&d[2]&&s6(u)===s6(c))y=s6(u),f=h[2](f),p=d[2](p);else if(h[1]&&d[1]&&s8(u)===s8(c))y=s8(u),f=h[1](f),p=d[1](p);else{var s=s4(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]];break}for(var g=[],v=[],b=[],x=0;x<f.length;x++){var s=function(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,l=e.value||0,s=lX(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=lF(t.unit)):(lK.isLength(t.unit)||lK.isLength(e.unit))&&(a=sw(t,i,n),l=sw(e,i,n),o="px"),[a,l,function(t){return r&&(t=Math.max(t,0)),t+o}]}(f[x],p[x],n,!1,x);g[x]=s[0],v[x]=s[1],b.push(s[2])}o.push(g),a.push(v),l.push([y,b])}if(r){var O=o;o=a,a=O}return[o,a,function(t){return t.map(function(t,e){var n=t.map(function(t,n){return l[e][1][n](t)}).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),l[e][0]+"("+n+")"}).join(" ")}]}var s7=lC(function(t){if(!ae(t))return[l6(t[0]||0,"px"),l6(t[1]||0,"px")];if("text-anchor"===t)return[l6(0,"px"),l6(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[sg(ue(e[0])),sg(ue(e[1]))]}),ut=function(t){if(!ae(t))return[l6(t[0]||0,"px"),l6(t[1]||0,"px")];if("text-anchor"===t)return[l6(0,"px"),l6(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[sy(ue(e[0])),sy(ue(e[1]))]};function ue(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var un=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:jO.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:jO.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:jO.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:jO.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:jO.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:jO.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:jO.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:jO.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:jO.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:jO.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:jO.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:jO.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:jO.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:jO.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:jO.FILTER},{n:"clipPath",syntax:jO.DEFINED_PATH},{n:"textPath",syntax:jO.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:jO.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===ja.CIRCLE||t===ja.ELLIPSE?"center":t===ja.TEXT?"text-anchor":"left top"},l:!0,syntax:jO.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===ja.CIRCLE||t===ja.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:jO.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:jO.COORDINATE},{n:"cy",int:!0,d:"0",syntax:jO.COORDINATE},{n:"cz",int:!0,d:"0",syntax:jO.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:jO.COORDINATE},{n:"y",int:!0,d:"0",syntax:jO.COORDINATE},{n:"z",int:!0,d:"0",syntax:jO.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:jO.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:jO.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:jO.COORDINATE},{n:"y1",int:!0,l:!0,syntax:jO.COORDINATE},{n:"z1",int:!0,l:!0,syntax:jO.COORDINATE},{n:"x2",int:!0,l:!0,syntax:jO.COORDINATE},{n:"y2",int:!0,l:!0,syntax:jO.COORDINATE},{n:"z2",int:!0,l:!0,syntax:jO.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:jO.PATH,p:50},{n:"points",int:!0,l:!0,syntax:jO.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:jO.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:jO.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:jO.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:jO.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:jO.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:jO.NUMBER,d:function(t){return t===ja.PATH||t===ja.POLYGON||t===ja.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:jO.MARKER},{n:"markerEnd",syntax:jO.MARKER},{n:"markerMid",syntax:jO.MARKER},{n:"markerStartOffset",syntax:jO.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:jO.LENGTH,l:!0,int:!0,d:"0"}],ur=un.filter(function(t){return!!t.l}).map(function(t){return t.n}),ui={},uo=new WeakMap,ua=function(t,e){var n=uo.get(t);return!n||0===n.length||n.includes(e)},ul=function(){function t(t){var e=this;this.runtime=t,un.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){tq([t.n],tV(t.a||[]),!1).forEach(function(e){ui[e]=t})},t.prototype.unregisterMetadata=function(t){delete ui[t]},t.prototype.getPropertySyntax=function(t){return this.runtime.CSSPropertySyntaxFactory[t]},t.prototype.processProperties=function(t,e,n){var r=this;if(void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0}),!this.runtime.enableCSSParsing){Object.assign(t.attributes,e);var i=Object.keys(e),o=t.parsedStyle.clipPath,a=t.parsedStyle.offsetPath;t.parsedStyle=Object.assign(t.parsedStyle,e);var l=!!n.forceUpdateGeometry;if(!l){for(var s=0;s<ur.length;s++)if(ur[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=sc(e.fill)),e.stroke&&(t.parsedStyle.stroke=sc(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=sc(e.shadowColor)),e.filter&&(t.parsedStyle.filter=sk(e.filter)),at(e.radius)||(t.parsedStyle.radius=sx(e.radius,4)),at(e.lineDash)||(t.parsedStyle.lineDash=sx(e.lineDash,2)),e.points&&(t.parsedStyle.points=sq(e.points,t)),""===e.path&&(t.parsedStyle.path=tz({},l9)),e.path&&(t.parsedStyle.path=sV(e.path),t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y),e.textTransform&&this.runtime.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:e.textTransform},t,null),e.clipPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,e.clipPath,t,this.runtime),e.offsetPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",a,e.offsetPath,t,this.runtime),e.anchor&&(t.parsedStyle.anchor=sx(e.anchor,2)),e.transform&&(t.parsedStyle.transform=sQ(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=s7(e.transformOrigin)),e.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator("",e.markerMid,e.markerMid,null,null)),(t.nodeName!==ja.CIRCLE&&t.nodeName!==ja.ELLIPSE||at(e.cx)&&at(e.cy))&&(t.nodeName!==ja.RECT&&t.nodeName!==ja.IMAGE&&t.nodeName!==ja.GROUP&&t.nodeName!==ja.HTML&&t.nodeName!==ja.TEXT&&t.nodeName!==ja.MESH||at(e.x)&&at(e.y)&&at(e.z))&&(t.nodeName!==ja.LINE||at(e.x1)&&at(e.y1)&&at(e.z1)&&at(e.x2)&&at(e.y2)&&at(e.z2))||this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),at(e.zIndex)||this.runtime.CSSPropertySyntaxFactory["<z-index>"].postProcessor(t,i),e.path&&this.runtime.CSSPropertySyntaxFactory["<path>"].postProcessor(t,i),e.points&&this.runtime.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(t,i),at(e.offsetDistance)||this.runtime.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(t,i),e.transform&&this.runtime.CSSPropertySyntaxFactory["<transform>"].postProcessor(t,i),l&&this.updateGeometry(t);return}var u=n.skipUpdateAttribute,c=n.skipParse,f=n.forceUpdateGeometry,p=n.usedAttributes,h=n.memoize,d=f,y=Object.keys(e);y.forEach(function(n){var r;u||(t.attributes[n]=e[n]),!d&&(null==(r=ui[n])?void 0:r.l)&&(d=!0)}),c||y.forEach(function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t,h)}),(null==p?void 0:p.length)&&(y=Array.from(new Set(y.concat(p)))),y.forEach(function(e){e in t.computedStyle&&(t.parsedStyle[e]=r.computeProperty(e,t.computedStyle[e],t,h))}),d&&this.updateGeometry(t),y.forEach(function(e){e in t.parsedStyle&&r.postProcessProperty(e,t,y)}),this.runtime.enableCSSParsing&&t.children.length&&y.forEach(function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},t.prototype.parseProperty=function(t,e,n,r){var i=ui[t],o=e;if((""===e||at(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=l2(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=l2(e):s&&(!r&&s.parserUnmemoize?o=s.parserUnmemoize(e,n):s.parser&&(o=s.parser(e,n)))}return o},t.prototype.computeProperty=function(t,e,n,r){var i=ui[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof l$){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)at(u)||(e=this.parseProperty(t,lV(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});return at(f)?void this.addUnresolveProperty(n,t):f}}var p=l&&this.getPropertySyntax(l);if(p&&p.calculator){var h=n.parsedStyle[t];a=p.calculator(t,h,e,n,this.runtime)}else a=e instanceof l$?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=ui[t];if(r&&r.syntax){var i=r.syntax&&this.getPropertySyntax(r.syntax);i&&i.postProcessor&&i.postProcessor(e,n)}},t.prototype.addUnresolveProperty=function(t,e){var n=uo.get(t);n||(uo.set(t,[]),n=uo.get(t)),-1===n.indexOf(e)&&n.push(e)},t.prototype.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&ua(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];if("unset"!==r&&"initial"!==r&&"inherit"!==r)return r}},t.prototype.recalc=function(t){var e=uo.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),uo.delete(t)}},t.prototype.updateGeometry=function(t){var e=t.nodeName,n=this.runtime.geometryUpdaterFactory[e];if(n){var r=t.geometry;r.contentBounds||(r.contentBounds=new lE),r.renderBounds||(r.renderBounds=new lE);var i=t.parsedStyle,o=n.update(i,t),a=o.width,l=o.height,s=o.depth,u=o.offsetX,c=o.offsetY,f=o.offsetZ,p=[Math.abs(a)/2,Math.abs(l)/2,(void 0===s?0:s)/2],h=i.stroke,d=i.lineWidth,y=i.increasedLineWidthForHitTesting,g=i.shadowType,v=i.shadowColor,b=i.filter,x=i.transformOrigin,O=i.anchor;e===ja.TEXT?delete i.anchor:e===ja.MESH&&(i.anchor[2]=.5);var w=[(1-2*(O&&O[0]||0))*a/2+(void 0===u?0:u),(1-2*(O&&O[1]||0))*l/2+(void 0===c?0:c),(1-2*(O&&O[2]||0))*p[2]+(void 0===f?0:f)];r.contentBounds.update(w,p);var E=e===ja.POLYLINE||e===ja.POLYGON||e===ja.PATH?Math.SQRT2:.5;if(h&&!h.isNone){var k=((d||0)+(y||0))*E;p[0]+=k,p[1]+=k}if(r.renderBounds.update(w,p),v&&g&&"inner"!==g){var M=r.renderBounds,S=M.min,_=M.max,P=i.shadowBlur,j=i.shadowOffsetX,A=i.shadowOffsetY,T=P||0,C=j||0,N=A||0,L=S[0]-T+C,I=_[0]+T+C,R=S[1]-T+N,D=_[1]+T+N;S[0]=Math.min(S[0],L),_[0]=Math.max(_[0],I),S[1]=Math.min(S[1],R),_[1]=Math.max(_[1],D),r.renderBounds.setMinMax(S,_)}(void 0===b?[]:b).forEach(function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,lu(r.renderBounds.halfExtents,r.renderBounds.halfExtents,[i,i,0]))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,l=n[2].value,s=r.renderBounds,u=s.min,c=s.max,f=u[0]-l+o,p=c[0]+l+o,h=u[1]-l+a,d=c[1]+l+a;u[0]=Math.min(u[0],f),c[0]=Math.max(c[0],p),u[1]=Math.min(u[1],h),c[1]=Math.max(c[1],d),r.renderBounds.setMinMax(u,c)}}),O=i.anchor;var F=a<0,B=l<0,z=(F?-1:1)*(x?sw(x[0],0,t):0),W=(B?-1:1)*(x?sw(x[1],1,t):0);z-=(F?-1:1)*(O&&O[0]||0)*r.contentBounds.halfExtents[0]*2,W-=(B?-1:1)*(O&&O[1]||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(z,W),this.runtime.sceneGraphService.dirtifyToRoot(t)}},t.prototype.updateSizeAttenuation=function(t,e){t.style.isSizeAttenuation?(t.style.rawLineWidth||(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=t.style.rawLineWidth/e,t.nodeName===ja.CIRCLE&&(t.style.rawR||(t.style.rawR=t.style.r),t.style.r=t.style.rawR/e)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===ja.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=ui[t];return!!e&&e.inh},t}(),us=function(){function t(){this.parser=sv,this.parserUnmemoize=sm,this.parserWithCSSDisabled=null,this.mixer=sP}return t.prototype.calculator=function(t,e,n,r){return sb(n)},t}(),uu=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof l$&&(n=null),i.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&i.sceneGraphService.dirtifyToRoot(t)}),n},t}(),uc=function(){function t(){this.parser=sc,this.parserWithCSSDisabled=sc,this.mixer=sf}return t.prototype.calculator=function(t,e,n,r){return n instanceof l$?"none"===n.value?l5:l3:n},t}(),uf=function(){function t(){this.parser=sk}return t.prototype.calculator=function(t,e,n){return n instanceof l$?[]:n},t}();function up(t){var e=t.parsedStyle.fontSize;return at(e)?null:e}var uh=function(){function t(){this.parser=sg,this.parserUnmemoize=sy,this.parserWithCSSDisabled=null,this.mixer=sP}return t.prototype.calculator=function(t,e,n,r,i){if(o9(n))return n;if(!lK.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===jp.kPercentage)return 0;if(n.unit===jp.kEms){if(r.parentNode){var l=up(r.parentNode);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}if(n.unit===jp.kRems){if(null==(o=null==r?void 0:r.ownerDocument)?void 0:o.documentElement){var l=up(r.ownerDocument.documentElement);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),ud=function(){function t(){this.mixer=sA}return t.prototype.parser=function(t){var e,n=sO(o9(t)?[t]:t);return 1===n.length?[n[0],n[0]]:[n[0],n[1]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),uy=function(){function t(){this.mixer=sA}return t.prototype.parser=function(t){var e,n=sO(o9(t)?[t]:t);return 1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),ug=i9();function um(t,e){var n=e.parsedStyle.defX||0,r=e.parsedStyle.defY||0;return e.resetLocalTransform(),e.setLocalPosition(n,r),t.forEach(function(t){var i=t.t,o=t.d;if("scale"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1];e.scaleLocal(a[0],a[1],1)}else if("scalex"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(a[0],1,1)}else if("scaley"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,a[0],1)}else if("scalez"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,1,a[0])}else if("scale3d"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1,1];e.scaleLocal(a[0],a[1],a[2])}else if("translate"===i){var l=o||[lZ,lZ];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[lZ];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[lZ];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[lZ];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[lZ,lZ,lZ];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[lQ];e.rotateLocal(0,0,sb(s[0]))}else if("rotatex"===i){var s=o||[lQ];e.rotateLocal(sb(s[0]),0,0)}else if("rotatey"===i){var s=o||[lQ];e.rotateLocal(0,sb(s[0]),0)}else if("rotatez"===i){var s=o||[lQ];e.rotateLocal(0,0,sb(s[0]))}else if("rotate3d"===i);else if("skew"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0,0];e.setLocalSkew(lh(u[0]),lh(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(lh(u[0]),e.getLocalSkew()[1])}else if("skewy"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(e.getLocalSkew()[0],lh(u[0]))}else if("matrix"===i){var c=tV(o.map(function(t){return t.value}),6),f=c[0],p=c[1],h=c[2],d=c[3],y=c[4],g=c[5];e.setLocalTransform(on(ug,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(on.apply(tv,tq([ug],tV(o.map(function(t){return t.value})),!1)),ug[12]+=n,ug[13]+=r,e.setLocalTransform(ug))}),e.getLocalTransform()}var uv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case ja.CIRCLE:case ja.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;at(a)||(n=a),at(l)||(r=l),at(s)||(i=s);break;case ja.LINE:var u=t.parsedStyle,c=u.x1,f=u.x2,p=Math.min(u.y1,u.y2);n=Math.min(c,f),r=p,i=0;break;case ja.RECT:case ja.IMAGE:case ja.GROUP:case ja.HTML:case ja.TEXT:case ja.MESH:at(t.parsedStyle.x)||(n=t.parsedStyle.x),at(t.parsedStyle.y)||(r=t.parsedStyle.y),at(t.parsedStyle.z)||(i=t.parsedStyle.z)}if(t.nodeName!==ja.PATH&&t.nodeName!==ja.POLYLINE&&t.nodeName!==ja.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!at(n)||!at(r)||!at(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)um(h,t);else{var d=tV(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(at(n)?y:n,at(r)?g:r,at(i)?v:i)}}},e}(uh),ub=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof l$&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),ux=function(){function t(){this.mixer=sP,this.parser=s_,this.parserUnmemoize=sS,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),uO=function(){function t(){this.parser=s_,this.parserUnmemoize=sS,this.parserWithCSSDisabled=null,this.mixer=sj(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.offsetPath,r=e.offsetDistance;if(n){var i=n.nodeName;if(i===ja.LINE||i===ja.PATH||i===ja.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),uw=function(){function t(){this.parser=s_,this.parserUnmemoize=sS,this.parserWithCSSDisabled=null,this.mixer=sj(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),uE=function(){function t(){this.parser=sV,this.parserWithCSSDisabled=sV,this.mixer=sU}return t.prototype.calculator=function(t,e,n){return n instanceof l$&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new l_(0,0,0,0)}:n},t.prototype.postProcessor=function(t,e){if(t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y,t.nodeName===ja.PATH&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(void 0===r?0:r,void 0===i?0:i)}},t}(),uk=function(){function t(){this.parser=sq,this.mixer=sY}return t.prototype.postProcessor=function(t,e){if((t.nodeName===ja.POLYGON||t.nodeName===ja.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),uM=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.mixer=sj(0,1/0),e}return tB(e,t),e}(uh),uS=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof l$)if("unset"===n.value)return"";else return n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),u_=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value},t}(),uP={},uj=0,uA="undefined"!=typeof window&&void 0!==window.document;function uT(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function uC(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n;n=n.parentElement}while(null!==n);return null}function uN(t,e){if(uA)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var uL={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},uI="object"==typeof performance&&performance.now?performance:Date;function uR(t,e,n){var r=!1,i=!1,o=!!e&&!e.isNone,a=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=o,i=a):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:("visible"===t||"all"===t)&&(r=!0,i=!0),[r,i]}var uD=1,uF="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},uB=Date.now(),uz={},uW=Date.now(),u$=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-uW,r=uD++;return uz[r]=t,Object.keys(uz).length>1||setTimeout(function(){uW=e;var t=uz;uz={},Object.keys(t).forEach(function(e){return t[e](uF.performance&&"function"==typeof uF.performance.now?uF.performance.now():Date.now()-uB)})},n>16?0:16-n),r},uG=function(t){return"string"!=typeof t?u$:""===t?uF.requestAnimationFrame:uF[t+"RequestAnimationFrame"]},uH=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],function(t){return!!uG(t)}),uV=uG(uH),uU="string"!=typeof uH?function(t){delete uz[t]}:""===uH?uF.cancelAnimationFrame:uF[uH+"CancelAnimationFrame"]||uF[uH+"CancelRequestAnimationFrame"];uF.requestAnimationFrame=uV,uF.cancelAnimationFrame=uU;var uq=function(){function t(){this.callbacks=[]}return t.prototype.getCallbacksNum=function(){return this.callbacks.length},t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Promise.all(this.callbacks.map(function(e){return e.apply(void 0,tq([],tV(t),!1))}))},t}(),uY=function(){function t(){this.callbacks=[]}return t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t$(this,void 0,void 0,function(){var e,n,r;return tG(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,tq([],tV(t),!1))];case 1:e=i.sent(),n=0,i.label=2;case 2:if(!(n<this.callbacks.length-1))return[3,5];return[4,(0,this.callbacks[n])(e)];case 3:e=i.sent(),i.label=4;case 4:return n++,[3,2];case 5:return[2,e];case 6:return[2,null]}})})},t}(),uX=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){var t=arguments;this.callbacks.forEach(function(e){e.apply(void 0,t)})},t}(),uK=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){if(this.callbacks.length){for(var t=arguments,e=this.callbacks[0].apply(void 0,t),n=0;n<this.callbacks.length-1;n++)e=(0,this.callbacks[n])(e);return e}return null},t}(),uZ=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],uQ=/([\"\'])[^\'\"]+\1/,uJ=function(){function t(){this.parser=sQ,this.parserUnmemoize=sJ,this.parserWithCSSDisabled=sJ,this.mixer=s9}return t.prototype.calculator=function(t,e,n,r){return n instanceof l$?[]:n},t.prototype.postProcessor=function(t){um(t.parsedStyle.transform,t)},t}(),u0=function(){function t(){this.parser=s_,this.parserUnmemoize=sS}return t.prototype.calculator=function(t,e,n,r){return n.value},t.prototype.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0,r.dirtyReason=jx.Z_INDEX_CHANGED)}},t}(),u1=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),u2=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),u5=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.min(n,i);return{width:Math.max(e,r)-o,height:Math.max(n,i)-a}},t}(),u3=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),u4=function(){function t(){}return t.prototype.update=function(t){if(t.points&&av(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,tq([],tV(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,tq([],tV(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,tq([],tV(e.map(function(t){return t[1]})),!1));return{width:r-n,height:Math.max.apply(Math,tq([],tV(e.map(function(t){return t[1]})),!1))-i}}return{width:0,height:0}},t}(),u6=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=void 0===r?0:r,a=void 0===i?0:i;return n&&!ae(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),u8=function(){function t(t){this.globalRuntime=t}return t.prototype.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,l=t.fontWeight,s=t.fontVariant,u=t.lineWidth;return n&&o&&a&&l&&s&&r&&i&&!at(u)},t.prototype.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,l=t.textBaseline,s=t.dx,u=t.dy;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var c=((null==(r=null==(n=null==e?void 0:e.ownerDocument)?void 0:n.defaultView)?void 0:r.getConfig())||{}).offscreenCanvas,f=this.globalRuntime.textService.measureText(i,t,c);t.metrics=f;var p=f.width,h=f.height,d=f.lineHeight,y=f.fontProperties,g=[p/2,h/2,0],v=[0,1],b=0;"center"===o||"middle"===o?(b=a/2,v=[.5,1]):("right"===o||"end"===o)&&(b=a,v=[1,1]);var x=0;return"middle"===l?x=g[1]:"top"===l||"hanging"===l?x=2*g[1]:"alphabetic"===l?x=this.globalRuntime.enableCSSParsing?d-y.ascent:0:("bottom"===l||"ideographic"===l)&&(x=0),s&&(b+=s),u&&(x+=u),t.anchor=[v[0],v[1],0],{width:2*g[0],height:2*g[1],offsetX:b,offsetY:x}},t}(),u9=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new lS,this.page=new lS,this.canvas=new lS,this.viewport=new lS,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t.prototype.clone=function(){throw Error(lP)},t}(),u7=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.client=new lS,e.movement=new lS,e.offset=new lS,e.global=new lS,e.screen=new lS,e}return tB(e,t),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw Error(lP)},e}(u9),ct=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return tB(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw Error("getPredictedEvents is not supported!")},e.prototype.clone=function(){return this.manager.clonePointerEvent(this)},e}(u7),ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(u7),cn=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return tB(e,t),e}(u9),cr=function(){function t(){this.emitter=new iV}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=a_(n)&&n||aP(n)&&n.capture,i=aP(n)&&n.once,o=lV(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=tV(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=lV(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(null==(t=e[0].target)?void 0:t.name)===l&&c.apply(void 0,tq([],tV(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=a_(n)&&n||aP(n)&&n.capture,i=lV(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=lV(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new cn(t,e))},t.prototype.dispatchEvent=function(t,e){var n,r,i;if(void 0===e&&(e=!1),!t.type)throw Error("DisplayObject cannot propagate events outside of the Federated Events API");if(i=this.document?this:this.defaultView?this.defaultView:null==(n=this.ownerDocument)?void 0:n.defaultView){if(t.manager=i.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null==(r=t.manager)||r.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}(),ci=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return tB(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===ja.TEXT&&(n+=this.style.text);try{for(var r=tH(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===ja.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===ja.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return(void 0===t&&(t={}),this.parentNode)?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw Error(lP)},e.prototype.lookupNamespaceURI=function(t){throw Error(lP)},e.prototype.lookupPrefix=function(t){throw Error(lP)},e.prototype.normalize=function(){throw Error(lP)},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(t){if(t===this)return 0;for(var n,r=t,i=this,o=[r],a=[i];null!=(n=r.parentNode)?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var l=o.length>a.length?o:a,s=l===o?a:o;if(l[l.length-s.length]===s[0])return l===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var u=l.length-s.length,c=s.length-1;c>=0;c--){var f=s[c],p=l[u+c];if(p!==f){var h=f.parentNode.childNodes;if(h.indexOf(f)<h.indexOf(p))if(s===o)return e.DOCUMENT_POSITION_PRECEDING;else break;if(l===o)return e.DOCUMENT_POSITION_PRECEDING;break}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t,e){void 0===e&&(e=!1),t(this)||(e?this.childNodes.slice():this.childNodes).forEach(function(e){e.forEach(t)})},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(cr),co=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new iV,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=i9(),this.tmpVec3=iq(),this.onPointerDown=function(t){var e=n.createPointerEvent(t);if(n.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType)n.dispatchEvent(e,"touchstart");else if("mouse"===e.pointerType||"pen"===e.pointerType){var r=2===e.button;n.dispatchEvent(e,r?"rightdown":"mousedown")}n.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),n.freeEvent(e)},this.onPointerUp=function(t){var e,r=uI.now(),i=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);if(n.dispatchEvent(i,"pointerup"),"touch"===i.pointerType)n.dispatchEvent(i,"touchend");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.dispatchEvent(i,o?"rightup":"mouseup")}var a=n.trackingData(t.pointerId),l=n.findMountedTarget(a.pressTargetsByButton[t.button]),s=l;if(l&&!i.composedPath().includes(l)){for(var u=l;u&&!i.composedPath().includes(u);){if(i.currentTarget=u,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType)n.notifyTarget(i,"touchendoutside");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.notifyTarget(i,o?"rightupoutside":"mouseupoutside")}ci.isNode(u)&&(u=u.parentNode)}delete a.pressTargetsByButton[t.button],s=u}if(s){var c=n.clonePointerEvent(i,"click");c.target=s,c.path=[],a.clicksByButton[t.button]||(a.clicksByButton[t.button]={clickCount:0,target:c.target,timeStamp:r});var f=a.clicksByButton[t.button];f.target===c.target&&r-f.timeStamp<200?++f.clickCount:f.clickCount=1,f.target=c.target,f.timeStamp=r,c.detail=f.clickCount,(null==(e=i.detail)?void 0:e.preventClick)||(n.context.config.useNativeClickEvent||"mouse"!==c.pointerType&&"touch"!==c.pointerType||n.dispatchEvent(c,"click"),n.dispatchEvent(c,"pointertap")),n.freeEvent(c)}n.freeEvent(i)},this.onPointerMove=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0),r="mouse"===e.pointerType||"pen"===e.pointerType,i=n.trackingData(t.pointerId),o=n.findMountedTarget(i.overTargets);if(i.overTargets&&o!==e.target){var a="mousemove"===t.type?"mouseout":"pointerout",l=n.createPointerEvent(t,a,o||void 0);if(n.dispatchEvent(l,"pointerout"),r&&n.dispatchEvent(l,"mouseout"),!e.composedPath().includes(o)){var s=n.createPointerEvent(t,"pointerleave",o||void 0);for(s.eventPhase=s.AT_TARGET;s.target&&!e.composedPath().includes(s.target);)s.currentTarget=s.target,n.notifyTarget(s),r&&n.notifyTarget(s,"mouseleave"),ci.isNode(s.target)&&(s.target=s.target.parentNode);n.freeEvent(s)}n.freeEvent(l)}if(o!==e.target){var u="mousemove"===t.type?"mouseover":"pointerover",c=n.clonePointerEvent(e,u);n.dispatchEvent(c,"pointerover"),r&&n.dispatchEvent(c,"mouseover");for(var f=o&&ci.isNode(o)&&o.parentNode;f&&f!==(ci.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;)f=f.parentNode;if(!f||f===(ci.isNode(n.rootTarget)&&n.rootTarget.parentNode)){var p=n.clonePointerEvent(e,"pointerenter");for(p.eventPhase=p.AT_TARGET;p.target&&p.target!==o&&p.target!==(ci.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),ci.isNode(p.target)&&(p.target=p.target.parentNode);n.freeEvent(p)}n.freeEvent(c)}n.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&n.dispatchEvent(e,"touchmove"),r&&(n.dispatchEvent(e,"mousemove"),n.cursor=n.getCursor(e.target)),i.overTargets=e.composedPath(),n.freeEvent(e)},this.onPointerOut=function(t){var e=n.trackingData(t.pointerId);if(e.overTargets){var r="mouse"===t.pointerType||"pen"===t.pointerType,i=n.findMountedTarget(e.overTargets),o=n.createPointerEvent(t,"pointerout",i||void 0);n.dispatchEvent(o),r&&n.dispatchEvent(o,"mouseout");var a=n.createPointerEvent(t,"pointerleave",i||void 0);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(ci.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),ci.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=null,n.freeEvent(o),n.freeEvent(a)}n.cursor=null},this.onPointerOver=function(t){var e=n.trackingData(t.pointerId),r=n.createPointerEvent(t),i="mouse"===r.pointerType||"pen"===r.pointerType;n.dispatchEvent(r,"pointerover"),i&&n.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(n.cursor=n.getCursor(r.target));var o=n.clonePointerEvent(r,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(ci.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),ci.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=r.composedPath(),n.freeEvent(r),n.freeEvent(o)},this.onPointerUpOutside=function(t){var e=n.trackingData(t.pointerId),r=n.findMountedTarget(e.pressTargetsByButton[t.button]),i=n.createPointerEvent(t);if(r){for(var o=r;o;)i.currentTarget=o,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||("mouse"===i.pointerType||"pen"===i.pointerType)&&n.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),ci.isNode(o)&&(o=o.parentNode);delete e.pressTargetsByButton[t.button]}n.freeEvent(i)},this.onWheel=function(t){var e=n.createWheelEvent(t);n.dispatchEvent(e),n.freeEvent(e)},this.onClick=function(t){if(n.context.config.useNativeClickEvent){var e=n.createPointerEvent(t);n.dispatchEvent(e),n.freeEvent(e)}},this.onPointerCancel=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);n.dispatchEvent(e),n.freeEvent(e)}}return t.prototype.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)},t.prototype.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},t.prototype.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new lS(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},t.prototype.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new lS(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},t.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.context.config,o=i.width,a=i.height,l=r.getPerspectiveInverse(),s=r.getWorldTransform(),u=os(this.tmpMatrix,s,l),c=iQ(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return i4(c,c,u),new lS(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=os(this.tmpMatrix,n,r),o=iQ(this.tmpVec3,t.x,t.y,0);i4(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new lS((o[0]+1)/2*l,(1-(o[1]+1)/2)*s)},t.prototype.setPickHandler=function(t){this.pickHandler=t},t.prototype.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},t.prototype.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},t.prototype.dispatchEvent=function(t,e,n){n?(t.eventPhase=t.AT_TARGET,t.currentTarget=this.rootTarget.defaultView||null,this.notifyListeners(t,e)):(t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e)),this.emitter.emit(e||t.type,t)},t.prototype.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},t.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)ci.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},t.prototype.hitTest=function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,o=r.height,a=r.disableHitTesting;return e<0||n<0||e>i||n>o?null:!a&&this.pickHandler(t)||this.rootTarget||null},t.prototype.isNativeEventFromCanvas=function(t){var e,n=this.context.contextService.getDomElement(),r=null==(e=t.nativeEvent)?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},t.prototype.getExistedHTML=function(t){var e,n;if(t.nativeEvent.composedPath)try{for(var r=tH(t.nativeEvent.composedPath()),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.nativeHTMLMap.get(o);if(a)return a}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return null},t.prototype.pickTarget=function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})},t.prototype.createPointerEvent=function(t,e,n,r){var i=this.allocateEvent(ct);this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.nativeEvent=t.nativeEvent,i.originalEvent=t;var o=this.getExistedHTML(i);return i.target=null!=n?n:o||this.isNativeEventFromCanvas(i)&&this.pickTarget(i)||r,"string"==typeof e&&(i.type=e),i},t.prototype.createWheelEvent=function(t){var e=this.allocateEvent(ce);this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t;var n=this.getExistedHTML(e);return e.target=n||this.isNativeEventFromCanvas(e)&&this.pickTarget(e),e},t.prototype.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},t.prototype.cloneWheelEvent=function(t){var e=this.allocateEvent(ce);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e},t.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(ct);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},t.prototype.copyPointerData=function(t,e){e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist},t.prototype.copyMouseData=function(t,e){e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset)},t.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},t.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=uI.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},t.prototype.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},t.prototype.freeEvent=function(t){if(t.manager!==this)throw Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},t.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},t.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},t.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(r===this.rootTarget||ci.isNode(r)&&r.parentNode===e)e=t[n];else break}return e},t.prototype.getCursor=function(t){for(var e=t;e;){var n=!!e.getAttribute&&e.getAttribute("cursor");if(n)return n;e=ci.isNode(e)&&e.parentNode}},t}(),ca=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||cb.offscreenCanvas)this.canvas=t||cb.offscreenCanvas,this.context=this.canvas.getContext("2d",tz({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",tz({willReadFrequently:!0},e)),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",tz({willReadFrequently:!0},e))}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context},t}();(P3=jw||(jw={}))[P3.CAMERA_CHANGED=0]="CAMERA_CHANGED",P3[P3.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",P3[P3.NONE=2]="NONE";var cl=function(){function t(t,e){this.globalRuntime=t,this.context=e,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new uX,initAsync:new uq,dirtycheck:new uK,cull:new uK,beginFrame:new uX,beforeRender:new uX,render:new uX,afterRender:new uX,endFrame:new uX,destroy:new uX,pick:new uY,pickSync:new uK,pointerDown:new uX,pointerUp:new uX,pointerMove:new uX,pointerOut:new uX,pointerOver:new uX,pointerWheel:new uX,pointerCancel:new uX,click:new uX}}return t.prototype.init=function(t){var e=this,n=tz(tz({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(t){t.apply(n,e.globalRuntime)}),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,t()):this.hooks.initAsync.promise().then(function(){e.inited=!0,t()})},t.prototype.getStats=function(){return this.stats},t.prototype.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(jw.CAMERA_CHANGED)},t.prototype.render=function(t,e){var n=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var r=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(r.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),r.renderReasons.size&&this.inited){r.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var i=1===r.renderReasons.size&&r.renderReasons.has(jw.CAMERA_CHANGED),o=!t.disableRenderHooks||!(t.disableRenderHooks&&i);o&&this.renderDisplayObject(r.root,t,r),this.hooks.beginFrame.call(),o&&r.renderListCurrentFrame.forEach(function(t){n.hooks.beforeRender.call(t),n.hooks.render.call(t),n.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),r.renderListCurrentFrame=[],r.renderReasons.clear(),e()}},t.prototype.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),o=i.enableDirtyCheck,a=i.enableCulling;this.globalRuntime.enableCSSParsing&&this.globalRuntime.styleValueRegistry.recalc(t);var l=t.renderable,s=o?l.dirty||n.dirtyRectangleRenderingDisabled?t:null:t;if(s){var u=a?this.hooks.cull.call(s,this.context.camera):s;u&&(this.stats.rendered++,n.renderListCurrentFrame.push(u))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var c=t.sortable;c.dirty&&(this.sort(t,c),c.dirty=!1,c.dirtyChildren=[],c.dirtyReason=void 0),(c.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)})},t.prototype.sort=function(t,e){e.sorted&&e.dirtyReason!==jx.Z_INDEX_CHANGED?e.dirtyChildren.forEach(function(n){if(-1===t.childNodes.indexOf(n)){var r=e.sorted.indexOf(n);r>=0&&e.sorted.splice(r,1)}else if(0===e.sorted.length)e.sorted.push(n);else{var i=function(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;0>uT(t[i],e)?n=i+1:r=i}return n}(e.sorted,n);e.sorted.splice(i,0,n)}}):e.sorted=t.childNodes.slice().sort(uT)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(jw.DISPLAY_OBJECT_CHANGED)},t}(),cs=/\[\s*(.*)=(.*)\s*\]/,cu=function(){function t(){}return t.prototype.selectOne=function(t,e){var n=this;if(t.startsWith("."))return e.find(function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.find(function(e){return e.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.find(function(n){return e!==n&&n.nodeName===t});var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):null},t.prototype.selectAll=function(t,e){var n=this;if(t.startsWith("."))return e.findAll(function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.findAll(function(r){return e!==r&&r.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.findAll(function(n){return e!==n&&n.nodeName===t});var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):[]},t.prototype.is=function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(!t.startsWith("["))return e.nodeName===t;var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i},t.prototype.getIdOrClassname=function(t){return t.substring(1)},t.prototype.getAttribute=function(t){var e=t.match(cs),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}},t.prototype.attributeToString=function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return at(n)?"":n.toString?n.toString():""},t}(),cc=function(t){function e(e,n,r,i,o,a,l,s){var u=t.call(this,null)||this;return u.relatedNode=n,u.prevValue=r,u.newValue=i,u.attrName=o,u.attrChange=a,u.prevParsedValue=l,u.newParsedValue=s,u.type=e,u}return tB(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(u9);function cf(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(P4=jE||(jE={})).REPARENT="reparent",P4.DESTROY="destroy",P4.ATTR_MODIFIED="DOMAttrModified",P4.INSERTED="DOMNodeInserted",P4.REMOVED="removed",P4.MOUNTED="DOMNodeInsertedIntoDocument",P4.UNMOUNTED="DOMNodeRemovedFromDocument",P4.BOUNDS_CHANGED="bounds-changed",P4.CULLED="culled";var cp=new cc(jE.REPARENT,null,"","","",0,"",""),ch=function(){function t(t){var e,n,r,i,o,a,l,s,u,c,f,p,h=this;this.runtime=t,this.pendingEvents=[],this.boundsChangedEvent=new cn(jE.BOUNDS_CHANGED),this.rotate=(e=oQ(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=iK(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=oQ();o2(a,n[0],n[1],n[2]);var l=h.getRotation(t);o3(e,h.getRotation(t.parentNode)),o1(e,e),o0(a,e,a),o0(o.localRotation,a,l),o4(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=oQ(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=iK(e,r,i));var o=t.transformable;o2(n,e[0],e[1],e[2]),o0(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=oQ(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=iK(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){o2(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);o3(r,o1(oQ(),a)),o0(o.localRotation,o.localRotation,r),h.dirtifyLocal(t,o)}else h.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=iK(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,b,x,O,w,E=t.transformable;i6(e,iq())||(i=e,o=e,l=(a=E.localRotation)[0],s=a[1],u=a[2],c=a[3],f=o[0],p=o[1],y=s*(d=o[2])-u*p,g=u*f-l*d,v=l*p-s*f,b=s*v-u*g,x=u*y-l*v,O=l*g-s*y,y*=w=2*c,g*=w,v*=w,b*=2,x*=2,O*=2,i[0]=f+y+b,i[1]=p+g+x,i[2]=d+v+O,iJ(E.localPosition,E.localPosition,e),h.dirtifyLocal(t,E))},this.setPosition=(i=i9(),o=iq(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,i6(h.getPosition(t),o)||(iZ(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(ot(i,t.parentNode.transformable.worldTransform),oo(i,i),i4(n.localPosition,o,i)):iZ(n.localPosition,o),h.dirtifyLocal(t,n))}),this.setLocalPosition=(a=iq(),function(t,e){var n=t.transformable;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,i6(n.localPosition,a)||(iZ(n.localPosition,a),h.dirtifyLocal(t,n))}),this.translate=(l=iq(),s=iq(),u=iq(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=iQ(s,e,n,r)),i6(e,l)||(iJ(u,h.getPosition(t),e),h.setPosition(t,u))}),this.setRotation=function(){var t=oQ();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=o5(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(o3(t,h.getRotation(e.parentNode)),o1(t,t),o0(a.localRotation,t,n),o4(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=i9(),f=iq(),p=o5(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(o_(t.localTransform,t.localRotation,t.localPosition,iK(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=or(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),os(t.localTransform,t.localTransform,e)}var n=o_(c,p,f,t.localScale,t.origin);os(t.localTransform,t.localTransform,n)}else o_(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)})}return t.prototype.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},t.prototype.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},t.prototype.attach=function(t,e,n){var r,i,o=!1;t.parentNode&&(o=t.parentNode!==e,this.detach(t)),t.parentNode=e,at(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var a=e.sortable;((null==(r=null==a?void 0:a.sorted)?void 0:r.length)||(null==(i=t.style)?void 0:i.zIndex))&&(-1===a.dirtyChildren.indexOf(t)&&a.dirtyChildren.push(t),a.dirty=!0,a.dirtyReason=jx.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(cp)},t.prototype.detach=function(t){var e,n;if(t.parentNode){var r=t.transformable,i=t.parentNode.sortable;((null==(e=null==i?void 0:i.sorted)?void 0:e.length)||(null==(n=t.style)?void 0:n.zIndex))&&(-1===i.dirtyChildren.indexOf(t)&&i.dirtyChildren.push(t),i.dirty=!0,i.dirtyReason=jx.REMOVED);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtifyWorld(t,r),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=[e,n,r]);var i=t.transformable;if(e[0]!==i.origin[0]||e[1]!==i.origin[1]||e[2]!==i.origin[2]){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=iK(e,n,r));var i=t.transformable;o2(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.scaleLocal=function(t,e){var n,r,i,o=t.transformable;n=o.localScale,r=o.localScale,i=iK(e[0],e[1],e[2]||1),n[0]=r[0]*i[0],n[1]=r[1]*i[1],n[2]=r[2]*i[2],this.dirtifyLocal(t,o)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=iK(e[0],e[1],e[2]||n.localScale[2]);i6(r,n.localScale)||(iZ(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=o5(e,n,r,i));var o=t.transformable;o3(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){"number"==typeof e&&(r=e,(i=new iU(2))[0]=r,i[1]=n,e=i);var r,i,o,a,l=t.transformable;o=l.localSkew,a=e,o[0]=a[0],o[1]=a[1],this.dirtifyLocal(t,l)},t.prototype.dirtifyLocal=function(t,e){!e.localDirtyFlag&&(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},t.prototype.triggerPendingEvents=function(){var t=this,e=new Set,n=function(n,r){n.isConnected&&!e.has(n.entity)&&(t.boundsChangedEvent.detail=r,t.boundsChangedEvent.target=n,n.isMutationObserved?n.dispatchEvent(t.boundsChangedEvent):n.ownerDocument.defaultView.dispatchEvent(t.boundsChangedEvent,!0),e.add(n.entity))};this.pendingEvents.forEach(function(t){var e=tV(t,2),r=e[0],i=e[1];i.affectChildren?r.forEach(function(t){n(t,i)}):n(r,i)}),this.clearPendingEvents(),e.clear()},t.prototype.clearPendingEvents=function(){this.pendingEvents=[]},t.prototype.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)cf(n),n=n.parentNode;e&&t.forEach(function(t){cf(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},t.prototype.updateDisplayObjectDependency=function(t,e,n,r){if(e&&e!==n){var i=this.displayObjectDependencyMap.get(e);if(i&&i[t]){var o=i[t].indexOf(r);i[t].splice(o,1)}}if(n){var a=this.displayObjectDependencyMap.get(n);a||(this.displayObjectDependencyMap.set(n,{}),a=this.displayObjectDependencyMap.get(n)),a[t]||(a[t]=[]),a[t].push(r)}},t.prototype.informDependentDisplayObjects=function(t){var e=this,n=this.displayObjectDependencyMap.get(t);n&&Object.keys(n).forEach(function(t){n[t].forEach(function(n){e.dirtifyToRoot(n,!0),n.dispatchEvent(new cc(jE.ATTR_MODIFIED,n,e,e,t,cc.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return oE(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return oM(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return ok(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),(e.localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalSkew=function(t){return t.transformable.localSkew},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.localTransform},t.prototype.setLocalTransform=function(t,e){var n=oE(iq(),e),r=oM(oQ(),e),i=ok(iq(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},t.prototype.getTransformedGeometryBounds=function(t,e,n){void 0===e&&(e=!1);var r=this.getGeometryBounds(t,e);if(lE.isEmpty(r))return null;var i=n||new lE;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new lE},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=e?r.renderBounds:r.bounds,o=this.getTransformedGeometryBounds(t,e,i);if(t.childNodes.forEach(function(t){var r=n.getBounds(t,e);r&&(o?o.add(r):(o=i||new lE).update(r.center,r.halfExtents))}),e){var a=uC(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return o||(o=new lE),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=i9();t.parentNode.transformable&&(e=oo(i9(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!lE.isEmpty(n)){var r=new lE;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);lE.isEmpty(i)||(r=new lE).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null==(n=null==(e=t.ownerDocument)?void 0:e.defaultView)?void 0:n.getContextService().getBoundingClientRect();if(r){var a=tV(r.getMin(),2),l=a[0],s=a[1],u=tV(r.getMax(),2),c=u[0],f=u[1];return new l_(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new l_((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)});var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0)}},t.prototype.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?os(e.worldTransform,r.worldTransform,e.localTransform):ot(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),cd={MetricsString:"|\xc9q\xc5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},cy=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,cg=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),cm=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),cv=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&!!(t&&(cm.exec(n)||cg.exec(t)))},this.trimByKinsokuShorui=function(t){var e=tq([],tV(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(e),i=this.runtime.offscreenCanvasCreator.getOrCreateContext(e,{willReadFrequently:!0});i.font=t;var o=cd.MetricsString+cd.BaselineSymbol,a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText(cd.BaselineSymbol).width),s=cd.HeightMultiplier*l;l=l*cd.BaselineMultiplier|0,r.width=a,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,a,s),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,l);var u=i.getImageData(0,0,a||1,s||1).data,c=u.length,f=4*a,p=0,h=0,d=!1;for(p=0;p<l;++p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h+=f}for(n.ascent=l-p,h=c-f,d=!1,p=s;p>l;--p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h-=f}return n.descent=p-l,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n,n},t.prototype.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,l=e.textBaseline,s=e.textAlign,u=e.letterSpacing,c=e.textPath;e.textPathSide,e.textPathStartOffset;var f=e.leading,p=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=o9(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!uQ.test(u)&&0>uZ.indexOf(u)&&(u='"'.concat(u,'"')),l[s]=u}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(l.join(","))}(e),d=this.measureFont(h,n);0===d.fontSize&&(d.fontSize=r,d.ascent=r);var y=this.runtime.offscreenCanvasCreator.getOrCreateContext(n);y.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),v=Array(g.length),b=0;if(c){c.getTotalLength();for(var x=0;x<g.length;x++)var O=y.measureText(g[x]).width+(g[x].length-1)*u}else{for(var x=0;x<g.length;x++){var w=y.measureText(g[x]).width+(g[x].length-1)*u;v[x]=w,b=Math.max(b,w)}var O=b+a,E=o||d.fontSize+a,k=Math.max(E,d.fontSize+a)+(g.length-1)*(E+p);E+=p;var M=0;return"middle"===l?M=-k/2:"bottom"===l||"alphabetic"===l||"ideographic"===l?M=-k:("top"===l||"hanging"===l)&&(M=0),{font:h,width:O,height:k,lines:g,lineWidths:v,lineHeight:E,maxLineWidth:b,fontProperties:d,lineMetrics:v.map(function(t,e){var n=0;return"center"===s||"middle"===s?n-=t/2:("right"===s||"end"===s)&&(n-=t),new l_(n-a/2,M+e*E,t+a,E)})}}},t.prototype.setGraphemeOnPath=function(){},t.prototype.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=e.letterSpacing,a=e.maxLines,l=void 0===a?1/0:a,s=e.textOverflow,u=this.runtime.offscreenCanvasCreator.getOrCreateContext(n),c=(void 0===i?0:i)+o,f="";"ellipsis"===s?f="...":s&&"clip"!==s&&(f=s);for(var p=[],h=0,d=0,y={},g=function(t){return r.getFromCache(t,o,y,u)},v=Array.from(f).reduce(function(t,e){return t+g(e)},0),b=Array.from(t),x=0;x<b.length;x++){var O=b[x],w=t[x-1],E=t[x+1],k=g(O);if(this.isNewline(O)){if(++h>=l){e.isOverflowing=!0;break}d=0,p[h]="";continue}if(d>0&&d+k>c){if(h+1>=l){if(e.isOverflowing=!0,v>0&&v<=c){for(var M=p[h].length,S=0,_=M,P=0;P<M;P++){var j=g(p[h][P]);if(S+j+v>c){_=P;break}S+=j}p[h]=(p[h]||"").slice(0,_)+f}break}if(d=0,p[++h]="",this.isBreakingSpace(O))continue;this.canBreakInLastChar(O)||(p=this.trimToBreakable(p),d=this.sumTextWidthByCache(p[h]||"",y)),this.shouldBreakByKinsokuShorui(O,E)&&(p=this.trimByKinsokuShorui(p),d+=g(w||""))}d+=k,p[h]=(p[h]||"")+O}return p.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&cd.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&cd.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=tq([],tV(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=this.isBreakingSpace(i);return e[e.length-1]+=n.slice(r+1,n.length),e[e.length-2]=n.slice(0,r+ +!o),e},t.prototype.canBreakInLastChar=function(t){return!(t&&cy.test(t))},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce(function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]},0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!cy.test(t[e]))return e;return -1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t}(),cb={},cx=(P8=new u6,P9=new u4,(P6={})[ja.CIRCLE]=new u1,P6[ja.ELLIPSE]=new u2,P6[ja.RECT]=P8,P6[ja.IMAGE]=P8,P6[ja.GROUP]=P8,P6[ja.LINE]=new u5,P6[ja.TEXT]=new u8(cb),P6[ja.POLYLINE]=P9,P6[ja.POLYGON]=P9,P6[ja.PATH]=new u3,P6[ja.HTML]=null,P6[ja.MESH]=null,P6),cO=(jt=new uc,je=new uh,(P7={})[jO.PERCENTAGE]=null,P7[jO.NUMBER]=new ux,P7[jO.ANGLE]=new us,P7[jO.DEFINED_PATH]=new uu,P7[jO.PAINT]=jt,P7[jO.COLOR]=jt,P7[jO.FILTER]=new uf,P7[jO.LENGTH]=je,P7[jO.LENGTH_PERCENTAGE]=je,P7[jO.LENGTH_PERCENTAGE_12]=new ud,P7[jO.LENGTH_PERCENTAGE_14]=new uy,P7[jO.COORDINATE]=new uv,P7[jO.OFFSET_DISTANCE]=new uO,P7[jO.OPACITY_VALUE]=new uw,P7[jO.PATH]=new uE,P7[jO.LIST_OF_POINTS]=new uk,P7[jO.SHADOW_BLUR]=new uM,P7[jO.TEXT]=new uS,P7[jO.TEXT_TRANSFORM]=new u_,P7[jO.TRANSFORM]=new uJ,P7[jO.TRANSFORM_ORIGIN]=new function(){this.parser=s7,this.parserUnmemoize=ut},P7[jO.Z_INDEX]=new u0,P7[jO.MARKER]=new ub,P7);cb.CameraContribution=lT,cb.AnimationTimeline=null,cb.EasingFunction=null,cb.offscreenCanvasCreator=new ca,cb.sceneGraphSelector=new cu,cb.sceneGraphService=new ch(cb),cb.textService=new cv(cb),cb.geometryUpdaterFactory=cx,cb.CSSPropertySyntaxFactory=cO,cb.styleValueRegistry=new ul(cb),cb.layoutRegistry=null,cb.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},cb.enableCSSParsing=!0,cb.enableDataset=!1,cb.enableStyleSyntax=!0,cb.enableSizeAttenuation=!1;var cw=0,cE=new cc(jE.INSERTED,null,"","","",0,"",""),ck=new cc(jE.REMOVED,null,"","","",0,"",""),cM=new cn(jE.DESTROY),cS=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.entity=cw++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:jb.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle=cb.enableCSSParsing?{anchor:l0,opacity:l0,fillOpacity:l0,strokeOpacity:l0,fill:l0,stroke:l0,transform:l0,transformOrigin:l0,visibility:l0,pointerEvents:l0,lineWidth:l0,lineCap:l0,lineJoin:l0,increasedLineWidthForHitTesting:l0,fontSize:l0,fontFamily:l0,fontStyle:l0,fontWeight:l0,fontVariant:l0,textAlign:l0,textBaseline:l0,textTransform:l0,zIndex:l0,filter:l0,shadowType:l0}:null,e.parsedStyle={},e.attributes={},e}return tB(e,t),Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter(function(t){return""!==t})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw Error(lP)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return cb.sceneGraphService.attach(t,this,e),(null==(n=this.ownerDocument)?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),cE.relatedNode=this,t.dispatchEvent(cE),t},e.prototype.insertBefore=function(t,e){if(e){t.parentElement&&t.parentElement.removeChild(t);var n=this.childNodes.indexOf(e);-1===n?this.appendChild(t):this.appendChild(t,n)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.prototype.removeChild=function(t){var e;return ck.relatedNode=this,t.dispatchEvent(ck),(null==(e=t.ownerDocument)?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),cb.sceneGraphService.detach(t),t},e.prototype.removeChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];this.removeChild(e)}},e.prototype.destroyChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];e.childNodes.length&&e.destroyChildren(),e.destroy()}},e.prototype.matches=function(t){return cb.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return cb.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return cb.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return cb.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return cb.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return cb.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return cb.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(cb.sceneGraphService.matches(t,e))return e;e=e.parentElement}while(null!==e);return null},e.prototype.find=function(t){var e=this,n=null;return this.forEach(function(r){return!!(r!==e&&t(r))&&(n=r,!0)}),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach(function(r){r!==e&&t(r)&&n.push(r)}),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach(function(e,n){var i;return null==(i=t.parentNode)?void 0:i.appendChild(e,r+n+1)})}},e.prototype.before=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this),r=tV(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,tq([],tV(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,tq([],tV(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e){return t.appendChild(e)})},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e,n){return t.appendChild(e,n)})},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,tq([],tV(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(cM),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return cb.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return cb.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return cb.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return cb.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return cb.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(t){if("symbol"==typeof t)return cb.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=lq(t);return e=this.attributes[n],cb.enableCSSParsing&&at(e)?null:e},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw Error(lP)},e.prototype.getAttributeNode=function(t){throw Error(lP)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(lP)},e.prototype.hasAttributeNS=function(t,e){throw Error(lP)},e.prototype.removeAttributeNS=function(t,e){throw Error(lP)},e.prototype.removeAttributeNode=function(t){throw Error(lP)},e.prototype.setAttributeNS=function(t,e,n){throw Error(lP)},e.prototype.setAttributeNode=function(t){throw Error(lP)},e.prototype.setAttributeNodeNS=function(t){throw Error(lP)},e.prototype.toggleAttribute=function(t,e){throw Error(lP)},e}(ci);function c_(t){return!!(null==t?void 0:t.nodeName)}var cP=new cc(jE.ATTR_MODIFIED,null,null,null,null,cc.MODIFICATION,null,null),cj={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},cA={anchor:[0,0],fill:l5,stroke:l5,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},cT=tz(tz({},cA),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),cC=tq(tq([],tV(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),cN="data-",cL=function(t){function e(e){var n,r=t.call(this)||this;r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=e,r.config.interactive=null!=(n=r.config.capture)?n:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||ja.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,cb.enableCSSParsing?cA:cT,r.config.initialParsedStyle),cb.enableCSSParsing&&Object.assign(r.attributes,cj),r.initAttributes(r.config.style);var i=cb.globalThis.Proxy?cb.globalThis.Proxy:function(){};return cb.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(cN).concat(lH(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(cN).concat(lH(e)),n),!0}})),cb.enableStyleSyntax&&(r.style=new i({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}})),r}return tB(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.getAnimations().forEach(function(t){t.cancel()})},e.prototype.cloneNode=function(t,e){var n=tz({},this.attributes);for(var r in n){var i=n[r];c_(i)&&"clipPath"!==r&&"offsetPath"!==r&&"textPath"!==r&&(n[r]=i.cloneNode(t)),e&&(n[r]=e(r,i))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:n});return o.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(e){if(!e.style.isMarker){var n=e.cloneNode(t);o.appendChild(n)}}),o},e.prototype.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable,n={forceUpdateGeometry:!0};cb.enableCSSParsing&&(n.usedAttributes=cC);var r={};for(var i in t)r[lq(i)]=t[i];cb.styleValueRegistry.processProperties(this,r,n),e.dirty=!0},e.prototype.setAttribute=function(e,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=!0);var o=lq(e);!aj(n)&&(r||n!==this.attributes[o])&&(this.internalSetAttribute(o,n,{memoize:i}),t.prototype.setAttribute.call(this,o,n))},e.prototype.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r,i=this.renderable,o=this.attributes[t],a=this.parsedStyle[t];cb.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(cP.relatedNode=this,cP.prevValue=o,cP.newValue=e,cP.attrName=t,cP.prevParsedValue=a,cP.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(cP):(cP.target=this,this.ownerDocument.defaultView.dispatchEvent(cP,!0))),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,o,e,a,l)},e.prototype.getBBox=function(){var t=this.getBounds(),e=tV(t.getMin(),2),n=e[0],r=e[1],i=tV(t.getMax(),2);return new l_(n,r,i[0]-n,i[1]-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cb.sceneGraphService.setOrigin(this,lp(t,e,n)),this},e.prototype.getOrigin=function(){return cb.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cb.sceneGraphService.setPosition(this,lp(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cb.sceneGraphService.setLocalPosition(this,lp(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cb.sceneGraphService.translate(this,lp(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cb.sceneGraphService.translateLocal(this,lp(t,e,n)),this},e.prototype.getPosition=function(){return cb.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return cb.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=lp(t,e,n)),cb.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=lp(t,e,n)),cb.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return cb.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return cb.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return ld(tV(ly(iq(),cb.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return ld(tV(ly(iq(),cb.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return cb.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return cb.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return at(e)&&at(n)?cb.sceneGraphService.rotateLocal(this,0,0,t):cb.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return at(e)&&at(n)?cb.sceneGraphService.rotate(this,0,0,t):cb.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return cb.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return cb.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return cb.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return cb.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return cb.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return cb.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return cb.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return cb.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return cb.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){cb.sceneGraphService.resetLocalTransform(this)},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r=null==(n=this.ownerDocument)?void 0:n.timeline;return r?r.play(this,t,e):null},e.prototype.isVisible=function(){var t;return(null==(t=this.parsedStyle)?void 0:t.visibility)==="visible"},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var t;return(null==(t=this.parsedStyle)?void 0:t.pointerEvents)!=="none"},e.prototype.isCulled=function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,tq([],tV(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,tq([],tV(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))-1),this},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=tV(e,2),i=r[0],o=r[1];return i?aP(i)?(Object.keys(i).forEach(function(e){t.setAttribute(e,i[e])}),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.getMatrix=function(t){var e,n,r,i,o,a,l,s,u=t||this.getWorldTransform(),c=tV(oE(iq(),u),2),f=c[0],p=c[1],h=tV(ok(iq(),u),2),d=h[0],y=h[1],g=oM(oQ(),u),v=tV(ly(iq(),g),3),b=v[0],x=v[2];return n=Math.cos(e=b||x),r=Math.sin(e),i=d*n,o=y*r,a=-d*r,l=y*n,(s=new iU(9))[0]=i,s[1]=o,s[2]=0,s[3]=a,s[4]=l,s[5]=0,s[6]=f,s[7]=p,s[8]=1,s},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=tV(lg(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setEulerAngles(a).setPosition(n,r).setLocalScale(i,o)},e.prototype.setLocalMatrix=function(t){var e=tV(lg(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setLocalEulerAngles(a).setLocalPosition(n,r).setLocalScale(i,o)},e.prototype.show=function(){cb.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){cb.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(t){t.style.visibility="hidden"})},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e}(cS),cI=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;cb.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},cR=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.CIRCLE,style:cb.enableCSSParsing?tz({cx:"",cy:"",r:""},n):tz({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:cb.enableCSSParsing?null:[l8,l8]}},r))||this}return tB(e,t),e}(cL),cD=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tW(e,["style"]);return(n=t.call(this,tz({style:cb.enableCSSParsing?tz({x:"",y:""},r):tz({},r)},i))||this).isCustomElement=!0,n}return tB(e,t),e}(cL),cF=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.ELLIPSE,style:cb.enableCSSParsing?tz({cx:"",cy:"",rx:"",ry:""},n):tz({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:cb.enableCSSParsing?null:[l8,l8]}},r))||this}return tB(e,t),e}(cL),cB=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.GROUP,style:cb.enableCSSParsing?tz({x:"",y:"",width:"",height:""},n):tz({},n)},r))||this}return tB(e,t),e}(cL),cz=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tW(e,["style"]);return(n=t.call(this,tz({type:ja.HTML,style:cb.enableCSSParsing?tz({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):tz({},r)},i))||this).cullable.enable=!1,n}return tB(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){if(this.parsedStyle.$el)return this.parsedStyle.$el.getBoundingClientRect();var t=this.parsedStyle;return new l_(t.x,t.y,t.width,t.height)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(e=null==(t=this.ownerDocument)?void 0:t.defaultView)?void 0:e.getContextService().getBoundingClientRect(),i=new lE,o=n.left-((null==r?void 0:r.left)||0),a=n.top-((null==r?void 0:r.top)||0);return i.setMinMax([o,a,0],[o+n.width,a+n.height,0]),i},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=oo(i9(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!lE.isEmpty(e)){var n=new lE;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(cL),cW=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.IMAGE,style:cb.enableCSSParsing?tz({x:"",y:"",img:"",width:"",height:""},n):tz({},n)},r))||this}return tB(e,t),e}(cL),c$=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tW(e,["style"]);(n=t.call(this,tz({type:ja.LINE,style:tz({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},r)},i))||this).markerStartAngle=0,n.markerEndAngle=0;var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd;return a&&c_(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&c_(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&c_(r)&&(this.markerStartAngle=0,r.remove()),i&&c_(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&c_(r)&&(this.markerEndAngle=0,r.remove()),i&&c_(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.x1,h=l.x2,d=l.y1,y=l.y2,g=l.defX,v=l.defY,b=t?s:u;if(b&&c_(b)){var x=0;t?(r=p-g,i=d-v,e=h-p,n=y-d,o=c||0,a=this.markerStartAngle):(r=h-g,i=y-v,e=p-h,n=d-y,o=f||0,a=this.markerEndAngle),x=Math.atan2(n,e),b.setLocalEulerAngles(180*x/Math.PI+a),b.setLocalPosition(r+Math.cos(x)*o,i+Math.sin(x)*o)}},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,o=n.x2,a=n.y2,l=n.defX,s=n.defY,u=a8(r,i,o,a,t),c=u.x,f=u.y,p=i4(iq(),iK(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new lS(p[0],p[1])},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getTotalLength=function(){var t=this.parsedStyle;return a3(t.x1,t.y1,t.x2,t.y2)},e}(cL),cG=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tW(e,["style"]);(n=t.call(this,tz({type:ja.PATH,style:cb.enableCSSParsing?tz({path:"",miterLimit:""},r):tz({},r),initialParsedStyle:cb.enableCSSParsing?null:{miterLimit:4,path:tz({},l9)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&c_(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&c_(s)&&n.placeMarkerMid(s),l&&c_(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&c_(r)&&(this.markerStartAngle=0,r.remove()),i&&c_(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&c_(r)&&(this.markerEndAngle=0,r.remove()),i&&c_(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.defX,h=l.defY,d=t?s:u;if(d&&c_(d)){var y=0;if(t){var g=tV(this.getStartTangent(),2),v=g[0],b=g[1];r=b[0]-p,i=b[1]-h,e=v[0]-b[0],n=v[1]-b[1],o=c||0,a=this.markerStartAngle}else{var x=tV(this.getEndTangent(),2),v=x[0],b=x[1];r=b[0]-p,i=b[1]-h,e=v[0]-b[0],n=v[1]-b[1],o=f||0,a=this.markerEndAngle}y=Math.atan2(n,e),d.setLocalEulerAngles(180*y/Math.PI+a),d.setLocalPosition(r+Math.cos(y)*o,i+Math.sin(y)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&c_(t))for(var o=1;o<n.length-1;o++){var a=tV(n[o].currentPoint,2),l=a[0],s=a[1],u=1===o?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l-r,s-i)}},e.prototype.getTotalLength=function(){return sT(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=am(n.path.absolutePath,t,tz(tz({},void 0),{bbox:!1,length:!0})).point,a=o.x,l=o.y,s=i4(iq(),iK(a-r,l-i,0),e?this.getWorldTransform():this.getLocalTransform());return new lS(s[0],s[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*sT(this),e)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?e.push([n[0]-i[0],n[1]-i[1]]):e.push([r[0],r[1]]),e.push([n[0],n[1]])}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?n.push([i[0]-o[0],i[1]-o[1]]):n.push([r[0],r[1]]),n.push([i[0],i[1]])}return n},e}(cL),cH=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tW(e,["style"]);(n=t.call(this,tz({type:ja.POLYGON,style:cb.enableCSSParsing?tz({points:"",miterLimit:"",isClosed:!0},r):tz({},r),initialParsedStyle:cb.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&c_(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&c_(s)&&n.placeMarkerMid(s),l&&c_(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&c_(r)&&(this.markerStartAngle=0,r.remove()),i&&c_(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&c_(r)&&(this.markerEndAngle=0,r.remove()),i&&c_(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.points,h=l.defX,d=l.defY,y=(p||{}).points,g=t?s:u;if(g&&c_(g)&&y){var v=0;if(r=y[0][0]-h,i=y[0][1]-d,t)e=y[1][0]-y[0][0],n=y[1][1]-y[0][1],o=c||0,a=this.markerStartAngle;else{var b=y.length;this.parsedStyle.isClosed?(e=y[b-1][0]-y[0][0],n=y[b-1][1]-y[0][1]):(r=y[b-1][0]-h,i=y[b-1][1]-d,e=y[b-2][0]-y[b-1][0],n=y[b-2][1]-y[b-1][1]),o=f||0,a=this.markerEndAngle}v=Math.atan2(n,e),g.setLocalEulerAngles(180*v/Math.PI+a),g.setLocalPosition(r+Math.cos(v)*o,i+Math.sin(v)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points,r=e.defX,i=e.defY,o=(n||{}).points;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&c_(t)&&o)for(var a=1;a<(this.parsedStyle.isClosed?o.length:o.length-1);a++){var l=o[a][0]-r,s=o[a][1]-i,u=1===a?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l,s)}},e}(cL),cV=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.POLYLINE,style:cb.enableCSSParsing?tz({points:"",miterLimit:"",isClosed:!1},n):tz({},n),initialParsedStyle:cb.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return tB(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=n.points,a=o.points,l=o.segments,s=0,u=0;l.forEach(function(e,n){t>=e[0]&&t<=e[1]&&(s=(t-e[0])/(e[1]-e[0]),u=n)});var c=a8(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=i4(iq(),iK(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new lS(h[0],h[1])},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(cH),cU=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.RECT,style:cb.enableCSSParsing?tz({x:"",y:"",width:"",height:"",radius:""},n):tz({},n)},r))||this}return tB(e,t),e}(cL),cq=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tW(e,["style"]);return t.call(this,tz({type:ja.TEXT,style:cb.enableCSSParsing?tz({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},n):tz({fill:"black"},n),initialParsedStyle:cb.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},r))||this}return tB(e,t),e.prototype.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.prototype.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.prototype.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},e}(cL),cY=function(){function t(){this.registry={},this.define(ja.CIRCLE,cR),this.define(ja.ELLIPSE,cF),this.define(ja.RECT,cU),this.define(ja.IMAGE,cW),this.define(ja.LINE,c$),this.define(ja.GROUP,cB),this.define(ja.PATH,cG),this.define(ja.POLYGON,cH),this.define(ja.POLYLINE,cV),this.define(ja.TEXT,cq),this.define(ja.HTML,cz)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),cX=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new cb.AnimationTimeline(e)}catch(t){}var n={};return un.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=lV(i)?i(ja.GROUP):i)}),e.documentElement=new cB({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return tB(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?cq:cB);var r=new n(e);return r.ownerDocument=this,r},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw Error(lP)},e.prototype.destroy=function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(t){}},e.prototype.elementsFromBBox=function(t,e,n,r){var i=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),o=[];return i.forEach(function(t){var e=t.displayObject,n=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e.parsedStyle.pointerEvents);(!n||n&&e.isVisible())&&!e.isCulled()&&e.isInteractive()&&o.push(e)}),o.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),o},e.prototype.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return null;var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f&&f[0]||this.documentElement},e.prototype.elementFromPoint=function(t,e){return t$(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tG(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,null];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return[2,(f=p.sent().picked)&&f[0]||this.documentElement]}})})},e.prototype.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return[];var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f[f.length-1]!==this.documentElement&&f.push(this.documentElement),f},e.prototype.elementsFromPoint=function(t,e){return t$(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tG(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,[]];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return(f=p.sent().picked)[f.length-1]!==this.documentElement&&f.push(this.documentElement),[2,f]}})})},e.prototype.appendChild=function(t,e){throw Error(lj)},e.prototype.insertBefore=function(t,e){throw Error(lj)},e.prototype.removeChild=function(t,e){throw Error(lj)},e.prototype.replaceChild=function(t,e,n){throw Error(lj)},e.prototype.append=function(){throw Error(lj)},e.prototype.prepend=function(){throw Error(lj)},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(ci),cK=function(){function t(t){this.strategies=t}return t.prototype.apply=function(e){var n=e.camera,r=e.renderingService,i=e.renderingContext,o=this.strategies;r.hooks.cull.tap(t.tag,function(t){if(t){var e=t.cullable;return(0===o.length?e.visible=i.unculledEntities.indexOf(t.entity)>-1:e.visible=o.every(function(e){return e.isVisible(n,t)}),!t.isCulled()&&t.isVisible())?t:(t.dispatchEvent(new cn(jE.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),cZ=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new ct(null),this.rootWheelEvent=new ce(null),this.onPointerMove=function(e){var n,r,i,o,a=null==(o=null==(i=t.context.renderingContext.root)?void 0:i.ownerDocument)?void 0:o.defaultView;if(!a.supportsTouchEvents||"touch"!==e.pointerType){var l=t.normalizeToPointerEvent(e,a);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,r,i,o,a=null==(o=null==(i=t.context.renderingContext.root)?void 0:i.ownerDocument)?void 0:o.defaultView,l=t.normalizeToPointerEvent(e,a);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}}return t.prototype.apply=function(e){var n=this;this.context=e;var r=e.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(t){return n.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null}),r.hooks.pointerWheel.tap(t.tag,function(t){var e=n.normalizeWheelEvent(t);n.context.eventService.mapEvent(e)}),r.hooks.pointerDown.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.normalizeToPointerEvent(t,i);n.autoPreventDefault&&o[0].isNormalized&&(!t.cancelable&&"cancelable"in t||t.preventDefault());try{for(var a=tH(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.context.contextService.getDomElement(),a="outside";try{a=o&&t.target&&t.target!==o&&o.contains&&!o.contains(t.target)?"outside":""}catch(t){}var l=n.normalizeToPointerEvent(t,i);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=n.bootstrapEvent(n.rootPointerEvent,c,i,t);f.type+=a,n.context.eventService.mapEvent(f)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerMove.tap(t.tag,this.onPointerMove),r.hooks.pointerOver.tap(t.tag,this.onPointerMove),r.hooks.pointerOut.tap(t.tag,this.onPointerMove),r.hooks.click.tap(t.tag,this.onClick),r.hooks.pointerCancel.tap(t.tag,function(t){var e,r,o=n.normalizeToPointerEvent(t,i);try{for(var a=tH(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)})},t.prototype.getViewportXY=function(t){var e,n,r=t.offsetX,i=t.offsetY,o=t.clientX,a=t.clientY;if(!this.context.config.supportsCSSTransform||at(r)||at(i)){var l=this.context.eventService.client2Viewport(new lS(o,a));e=l.x,n=l.y}else e=r,n=i;return{x:e,y:n}},t.prototype.bootstrapEvent=function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var i=this.getViewportXY(e),o=i.x,a=i.y;t.viewport.x=o,t.viewport.y=a;var l=this.context.eventService.viewport2Canvas(t.viewport),s=l.x,u=l.y;return t.canvas.x=s,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=uL[t.type]||t.type),t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.getViewportXY(t),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.context.eventService.viewport2Canvas(e.viewport),a=o.x,l=o.y;return e.canvas.x=a,e.canvas.y=l,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=uI.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.prototype.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];aj(i.button)&&(i.button=0),aj(i.buttons)&&(i.buttons=1),aj(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),aj(i.width)&&(i.width=i.radiusX||1),aj(i.height)&&(i.height=i.radiusY||1),aj(i.tiltX)&&(i.tiltX=0),aj(i.tiltY)&&(i.tiltY=0),aj(i.pointerType)&&(i.pointerType="touch"),aj(i.pointerId)&&(i.pointerId=i.identifier||0),aj(i.pressure)&&(i.pressure=i.force||.5),aj(i.twist)&&(i.twist=0),aj(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(aj(t.isPrimary)&&(t.isPrimary=!0),aj(t.width)&&(t.width=1),aj(t.height)&&(t.height=1),aj(t.tiltX)&&(t.tiltX=0),aj(t.tiltY)&&(t.tiltY=0),aj(t.pointerType)&&(t.pointerType="mouse"),aj(t.pointerId)&&(t.pointerId=1),aj(t.pressure)&&(t.pressure=.5),aj(t.twist)&&(t.twist=0),aj(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),cQ=[ja.CIRCLE,ja.ELLIPSE,ja.IMAGE,ja.RECT,ja.LINE,ja.POLYLINE,ja.POLYGON,ja.TEXT,ja.PATH,ja.HTML],cJ=function(){function t(){}return t.prototype.isVisible=function(t,e){var n,r,i=e.cullable;if(!i.enable)return!0;var o=e.getRenderBounds();if(lE.isEmpty(o))return!1;var a=t.getFrustum(),l=null==(r=null==(n=e.parentNode)?void 0:n.cullable)?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,l||js.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==js.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===js.OUTSIDE||n===js.INSIDE)return n;for(var i=js.INSIDE,o=cQ.indexOf(t.nodeName)>-1,a=0,l=r.length;a<l;++a){var s=1<<a;if((n&s)!=0&&(!o||4!==a&&5!==a)){var u=r[a],c=u.normal,f=u.distance;if(i5(c,e.getPositiveFarPoint(r[a]))+f<0)return js.OUTSIDE;i5(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),c0=function(){function t(){this.toSync=new Set}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext,o=e.rBushRoot,a=i.root.ownerDocument.defaultView;this.rBush=o;var l=function(t){t.target.renderable.dirty=!0,r.dirtify()},s=function(t){var e=t.detail.affectChildren,i=t.target;e&&i.forEach(function(t){n.toSync.add(t)});for(var o=i;o;)o.renderable&&n.toSync.add(o),o=o.parentElement;r.dirtify()},u=function(t){var e=t.target;cb.enableSizeAttenuation&&cb.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),cb.enableCSSParsing&&cb.styleValueRegistry.recalc(e),cb.sceneGraphService.dirtifyToRoot(e),r.dirtify()},c=function(t){var e=t.target,i=e.rBushNode;i.aabb&&n.rBush.remove(i.aabb),n.toSync.delete(e),cb.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(jE.MOUNTED,u),a.addEventListener(jE.UNMOUNTED,c),a.addEventListener(jE.ATTR_MODIFIED,l),a.addEventListener(jE.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(jE.MOUNTED,u),a.removeEventListener(jE.UNMOUNTED,c),a.removeEventListener(jE.ATTR_MODIFIED,l),a.removeEventListener(jE.BOUNDS_CHANGED,s),n.toSync.clear()}),r.hooks.endFrame.tap(t.tag,function(){n.syncRTree()})},t.prototype.syncRTree=function(){var t=this,e=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(n){var r=n.rBushNode;r&&r.aabb&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=tV(i.getMin(),2),a=o[0],l=o[1],s=tV(i.getMax(),2),u=s[0],c=s[1];r.aabb||(r.aabb={}),r.aabb.displayObject=n,r.aabb.minX=a,r.aabb.minY=l,r.aabb.maxX=u,r.aabb.maxY=c}!r.aabb||isNaN(r.aabb.maxX)||isNaN(r.aabb.maxX)||isNaN(r.aabb.minX)||isNaN(r.aabb.minY)||e.push(r.aabb)}),this.rBush.load(e),e.length=0,this.toSync.clear()},t.tag="Prepare",t}();(jn=jk||(jk={})).READY="ready",jn.BEFORE_RENDER="beforerender",jn.RERENDER="rerender",jn.AFTER_RENDER="afterrender",jn.BEFORE_DESTROY="beforedestroy",jn.AFTER_DESTROY="afterdestroy",jn.RESIZE="resize",jn.DIRTY_RECTANGLE="dirtyrectangle",jn.RENDERER_CHANGED="rendererchanged";var c1=new cn(jE.MOUNTED),c2=new cn(jE.UNMOUNTED),c5=new cn(jk.BEFORE_RENDER),c3=new cn(jk.RERENDER),c4=new cn(jk.AFTER_RENDER),c6=function(t){function e(e){var n,r,i=t.call(this)||this;i.Element=cL,i.inited=!1,i.context={},i.document=new cX,i.document.defaultView=i,i.customElements=new cY;var o=e.container,a=e.canvas,l=e.offscreenCanvas,s=e.width,u=e.height,c=e.devicePixelRatio,f=e.renderer,p=e.background,h=e.cursor,d=e.document,y=e.requestAnimationFrame,g=e.cancelAnimationFrame,v=e.createImage,b=e.supportsPointerEvents,x=e.supportsTouchEvents,O=e.supportsCSSTransform,w=e.supportsMutipleCanvasesInOneContainer,E=e.useNativeClickEvent,k=e.alwaysTriggerPointerEventOnCanvas,M=e.isTouchEvent,S=e.isMouseEvent;w||function(t,e){if(t){var n="string"==typeof t?t:t.id||uj++;uP[n]&&uP[n].destroy(),uP[n]=e}}(o,i);var _=s,P=u,j=c;return a&&(j=(j=c||uA&&window.devicePixelRatio||1)>=1?Math.ceil(j):1,_=s||("auto"===(n=uN(a,"width"))?a.offsetWidth:parseFloat(n))||a.width/j,P=u||("auto"===(r=uN(a,"height"))?a.offsetHeight:parseFloat(r))||a.height/j),l&&(cb.offscreenCanvas=l),i.devicePixelRatio=j,i.requestAnimationFrame=null!=y?y:uV.bind(cb.globalThis),i.cancelAnimationFrame=null!=g?g:uU.bind(cb.globalThis),i.supportsTouchEvents=null!=x?x:"ontouchstart"in cb.globalThis,i.supportsPointerEvents=null!=b?b:!!cb.globalThis.PointerEvent,i.isTouchEvent=null!=M?M:function(t){return i.supportsTouchEvents&&t instanceof cb.globalThis.TouchEvent},i.isMouseEvent=null!=S?S:function(t){return!cb.globalThis.MouseEvent||t instanceof cb.globalThis.MouseEvent&&(!i.supportsPointerEvents||!(t instanceof cb.globalThis.PointerEvent))},i.initRenderingContext({container:o,canvas:a,width:_,height:P,renderer:f,offscreenCanvas:l,devicePixelRatio:j,cursor:h||"default",background:p||"transparent",createImage:v,document:d,supportsCSSTransform:O,useNativeClickEvent:E,alwaysTriggerPointerEventOnCanvas:k}),i.initDefaultCamera(_,P,f.clipSpaceNearZ),i.initRenderer(f,!0),i}return tB(e,t),e.prototype.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.prototype.initDefaultCamera=function(t,e,n){var r=this,i=new cb.CameraContribution;i.clipSpaceNearZ=n,i.setType(ju.EXPLORING,jc.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(-(t/2),t/2,e/2,-(e/2),.1,1e3),i.canvas=this,i.eventEmitter.on(lA.UPDATED,function(){r.context.renderingContext.renderReasons.add(jw.CAMERA_CHANGED),cb.enableSizeAttenuation&&r.getConfig().renderer.getConfig().enableSizeAttenuation&&r.updateSizeAttenuation()}),this.context.camera=i},e.prototype.updateSizeAttenuation=function(){var t=this.getCamera().getZoom();this.document.documentElement.forEach(function(e){cb.styleValueRegistry.updateSizeAttenuation(e,t)})},e.prototype.getConfig=function(){return this.context.config},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.context.camera},e.prototype.getContextService=function(){return this.context.contextService},e.prototype.getEventService=function(){return this.context.eventService},e.prototype.getRenderingService=function(){return this.context.renderingService},e.prototype.getRenderingContext=function(){return this.context.renderingContext},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(this.readyPromise=new Promise(function(e){t.resolveReadyPromise=function(){e(t)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1),e||this.dispatchEvent(new cn(jk.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),t&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),e||this.dispatchEvent(new cn(jk.AFTER_DESTROY))},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.context.config;n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.context.camera,i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===jf.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new cn(jk.RESIZE,{width:t,height:e}))},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.prototype.removeChildren=function(){this.document.documentElement.removeChildren()},e.prototype.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.prototype.render=function(){var t=this;this.dispatchEvent(c5),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(c3)}),this.dispatchEvent(c4)},e.prototype.run=function(){var t=this,e=function(){t.render(),t.frameId=t.requestAnimationFrame(e)};e()},e.prototype.initRenderer=function(t,e){var n=this;if(void 0===e&&(e=!1),!t)throw Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new li,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new cZ,new c0,new cK([new cJ])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(tz(tz({},cb),this.context)),this.context.renderingService=new cl(cb,this.context),this.context.eventService=new co(cb,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(t,e,!0)):this.context.contextService.initAsync().then(function(){n.initRenderingService(t,e)})},e.prototype.initRenderingService=function(t,e,n){var r=this;void 0===e&&(e=!1),void 0===n&&(n=!1),this.context.renderingService.init(function(){r.inited=!0,e?(n?r.requestAnimationFrame(function(){r.dispatchEvent(new cn(jk.READY))}):r.dispatchEvent(new cn(jk.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new cn(jk.RENDERER_CHANGED)),e||r.getRoot().forEach(function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)}),r.mountChildren(r.getRoot()),t.getConfig().enableAutoRendering&&r.run()})},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init(cb)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),tq([],tV(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(cb)}),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(c2):(c2.target=t,this.dispatchEvent(c2,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.prototype.mountChildren=function(t){var e=this;this.inited?t.isConnected||(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(c1):(c1.target=t,this.dispatchEvent(c1,!0))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName),t.childNodes.forEach(function(t){e.mountChildren(t)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(cr),c8={}.toString,c9=function(t,e){return c8.call(t)==="[object "+e+"]"},c7=function(t){function e(){var e=t.apply(this,tq([],tV(arguments),!1))||this;return e.landmarks=[],e}return tB(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=lf(e),this.relAzimuth=lf(t),this.relRoll=lf(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===ju.EXPLORING){var r=oJ(oQ(),[1,0,0],lh((this.rotateWorld?1:-1)*this.relElevation)),i=oJ(oQ(),[0,1,0],lh((this.rotateWorld?1:-1)*this.relAzimuth)),o=oJ(oQ(),[0,0,1],lh(this.relRoll)),a=o0(oQ(),i,r);a=o0(oQ(),a,o);var l=oP(i9(),a);ou(this.matrix,this.matrix,[0,0,-this.distance]),os(this.matrix,this.matrix,l),ou(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===ju.ORBITING||this.type===ju.EXPLORING?this._getPosition():this.type===ju.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=lp(t,e,0),r=iY(this.position);return iJ(r,r,i1(iq(),this.right,n[0])),iJ(r,r,i1(iq(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=iY(this.position),r=t*this.dollyingStep;return r=Math.max(Math.min(this.distance+t*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===ju.ORBITING||this.type===ju.EXPLORING?this._getDistance():this.type===ju.TRACKING&&iJ(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.cancelLandmarkAnimation=function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},e.prototype.createLandmark=function(t,e){void 0===e&&(e={});var n,r,i,o,a=e.position,l=void 0===a?this.position:a,s=e.focalPoint,u=void 0===s?this.focalPoint:s,c=e.roll,f=e.zoom,p=new cb.CameraContribution;p.setType(this.type,void 0),p.setPosition(l[0],null!=(n=l[1])?n:this.position[1],null!=(r=l[2])?r:this.position[2]),p.setFocalPoint(u[0],null!=(i=u[1])?i:this.focalPoint[1],null!=(o=u[2])?o:this.focalPoint[2]),p.setRoll(null!=c?c:this.roll),p.setZoom(null!=f?f:this.zoom);var h={name:t,matrix:i7(p.getWorldTransform()),right:iY(p.right),up:iY(p.up),forward:iY(p.forward),position:iY(p.getPosition()),focalPoint:iY(p.getFocalPoint()),distanceVector:iY(p.getDistanceVector()),distance:p.getDistance(),dollyingStep:p.getDollyingStep(),azimuth:p.getAzimuth(),elevation:p.getElevation(),roll:p.getRoll(),relAzimuth:p.relAzimuth,relElevation:p.relElevation,relRoll:p.relRoll,zoom:p.getZoom()};return this.landmarks.push(h),h},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=c9(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=c9(e,"Number")?{duration:e}:e,a=o.easing,l=o.duration,s=void 0===l?100:l,u=o.easingFunction,c=o.onfinish,f=void 0===c?void 0:c,p=o.onframe,h=void 0===p?void 0:p;if(0===s){this.syncFromLandmark(r),f&&f();return}this.cancelLandmarkAnimation();var d=r.position,y=r.focalPoint,g=r.zoom,v=r.roll,b=(void 0===u?void 0:u)||cb.EasingFunction(void 0===a?"linear":a),x=function(){n.setFocalPoint(y),n.setPosition(d),n.setRoll(v),n.setZoom(g),n.computeMatrix(),n.triggerUpdate(),f&&f()},O=function(t){void 0===i&&(i=t);var e=t-i;if(e>s)return void x();var r=b(e/s),o=iq(),a=iq(),l=1,u=0;if(i3(o,n.focalPoint,y,r),i3(a,n.position,d,r),u=n.roll*(1-r)+v*r,l=n.zoom*(1-r)+g*r,n.setFocalPoint(o),n.setPosition(a),n.setRoll(u),n.setZoom(l),i8(o,y)+i8(a,d)<=.01&&void 0==g&&void 0==v)return void x();n.computeMatrix(),n.triggerUpdate(),e<s&&(h&&h(r),n.landmarkAnimationID=n.canvas.requestAnimationFrame(O))};this.canvas.requestAnimationFrame(O)}},e.prototype.syncFromLandmark=function(t){this.matrix=ot(this.matrix,t.matrix),this.right=iZ(this.right,t.right),this.up=iZ(this.up,t.up),this.forward=iZ(this.forward,t.forward),this.position=iZ(this.position,t.position),this.focalPoint=iZ(this.focalPoint,t.focalPoint),this.distanceVector=iZ(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(lT);cb.CameraContribution=c7;var ft=function(){function t(t,e){this.type=t,this.target=e,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),fe=0,fn=new WeakMap,fr=function(){function t(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return t.prototype.enqueue=function(t){var e,n=this.observer.records,r=n.length;if(n.length>0){var i=function(t,e){return t===e?t:jS&&(t===jS||t===jM)?jS:null}(n[r-1],t);if(i){n[r-1]=i;return}}else{e=this.observer,fl.push(e),fa||(fa=!0,void 0!==cb.globalThis?cb.globalThis.setTimeout(fs):fs())}n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(jE.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(jE.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(jE.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(jE.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(jE.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(jE.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=fn.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}},this)},t.prototype.handleEvent=function(t){switch(t.stopImmediatePropagation(),t.type){case jE.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=jM=new ft("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===cc.ADDITION?null:t.prevValue;fo(n,function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(r)||-1!==t.attributeFilter.indexOf(i))){var n;return t.attributeOldValue?(n=o,jS||((jS=ft.copy(jM)).oldValue=n),jS):e}});break;case jE.REMOVED:case jE.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===jE.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=jM=new ft("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,fo(n,function(t){if(t.childList)return e})}jM=jS=void 0},t}();function fi(t){this.callback=t,this.nodes=[],this.records=[],this.uid=fe++}function fo(t,e){for(var n=t;n;n=n.parentNode){var r=fn.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var l=e(a);l&&o.enqueue(l)}}}}fi.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw SyntaxError();var n,r=fn.get(t);r||fn.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new fr(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},fi.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=fn.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}},this),this.records=[]},fi.prototype.takeRecords=function(){var t=this.records;return this.records=[],t};var fa=!1,fl=[];function fs(){fa=!1;var t=fl;fl=[],t.sort(function(t,e){return t.uid-e.uid});var e=!1;t.forEach(function(t){var n=t.takeRecords();t.nodes.forEach(function(e){var n=fn.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(t.callback(n,t),e=!0)}),e&&fs()}var fu=function(t,e,n){return t<e?e:t>n?n:t},fc={}.toString,ff=function(t){return"[object Number]"===fc.call(t)},fp=function(t){return null==t},fh=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return tB(e,t),e}(u9),fd=0,fy=function(){function t(t,e){var n;this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(fd++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(n=this.effect)?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(Error())}}),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(Error())}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;isNaN(t=Number(t))||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),!isNaN(t=Number(t))&&(this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises())))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&0>=Number(this._currentTime))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){return this._totalDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){var t=this;if(this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var e=new fh(null,this,this.currentTime,null);setTimeout(function(){t.oncancel(e)})}},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){!this._idle&&!this._paused&&(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw Error("Unable to rewind negative playback rate animation with infinite duration")},t.prototype.persist=function(){throw Error(lP)},t.prototype.addEventListener=function(t,e,n){throw Error(lP)},t.prototype.removeEventListener=function(t,e,n){throw Error(lP)},t.prototype.dispatchEvent=function(t){throw Error(lP)},t.prototype.commitStyles=function(){throw Error(lP)},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null==(t=this.effect)?void 0:t.update(-1)):this._inEffect=!!(null==(e=this.effect)?void 0:e.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new fh(null,this,this.currentTime,t);setTimeout(function(){e.onfinish&&e.onfinish(n)})}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new fh(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),fg="function"==typeof Float32Array,fm=function(t,e){return 1-3*e+3*t},fv=function(t,e){return 3*e-6*t},fb=function(t){return 3*t},fx=function(t,e,n){return((fm(e,n)*t+fv(e,n))*t+fb(e))*t},fO=function(t,e,n){return 3*fm(e,n)*t*t+2*fv(e,n)*t+fb(e)},fw=function(t,e,n,r,i){var o,a,l=0;do(o=fx(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},fE=function(t,e,n,r){for(var i=0;i<4;++i){var o=fO(e,n,r);if(0===o)break;var a=fx(e,n,r)-t;e-=a/o}return e},fk=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=fg?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=fx(.1*o,t,n);var a=function(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=.1;var a=r+(e-i[--o])/(i[o+1]-i[o])*.1,l=fO(a,t,n);return l>=.001?fE(e,a,t,n):0===l?a:fw(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:fx(a(t),e,r)}},fM=function(t){return Math.pow(t,2)},fS=function(t){return Math.pow(t,3)},f_=function(t){return Math.pow(t,4)},fP=function(t){return Math.pow(t,5)},fj=function(t){return Math.pow(t,6)},fA=function(t){return 1-Math.cos(t*Math.PI/2)},fT=function(t){return 1-Math.sqrt(1-t*t)},fC=function(t){return t*t*(3*t-2)},fN=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},fL=function(t,e){void 0===e&&(e=[]);var n=tV(e,2),r=n[0],i=n[1],o=fu(Number(void 0===r?1:r),1,10),a=fu(Number(void 0===i?.5:i),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin(2*Math.PI*(t-1-a/(2*Math.PI)*Math.asin(1/o))/a)},fI=function(t,e,n){void 0===e&&(e=[]);var r=tV(e,4),i=r[0],o=void 0===i?1:i,a=r[1],l=void 0===a?100:a,s=r[2],u=void 0===s?10:s,c=r[3],f=void 0===c?0:c;o=fu(o,.1,1e3),l=fu(l,.1,1e3),u=fu(u,.1,1e3),f=fu(f,.1,1e3);var p=Math.sqrt(l/o),h=u/(2*Math.sqrt(l*o)),d=h<1?p*Math.sqrt(1-h*h):0,y=h<1?(h*p+-f)/d:-f+p,g=n?n*t/1e3:t;return(g=h<1?Math.exp(-g*h*p)*(+Math.cos(d*g)+y*Math.sin(d*g)):(1+y*g)*Math.exp(-g*p),0===t||1===t)?t:1-g},fR=function(t,e){void 0===e&&(e=[]);var n=tV(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(fu(t,0,1)*i)/i},fD=function(t,e){void 0===e&&(e=[]);var n=tV(e,4);return fk(n[0],n[1],n[2],n[3])(t)},fF=fk(.42,0,1,1),fB=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},fz=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},fW=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},f$={steps:fR,"step-start":function(t){return fR(t,[1,"start"])},"step-end":function(t){return fR(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":fD,ease:function(t){return fD(t,[.25,.1,.25,1])},in:fF,out:fB(fF),"in-out":fz(fF),"out-in":fW(fF),"in-quad":fM,"out-quad":fB(fM),"in-out-quad":fz(fM),"out-in-quad":fW(fM),"in-cubic":fS,"out-cubic":fB(fS),"in-out-cubic":fz(fS),"out-in-cubic":fW(fS),"in-quart":f_,"out-quart":fB(f_),"in-out-quart":fz(f_),"out-in-quart":fW(f_),"in-quint":fP,"out-quint":fB(fP),"in-out-quint":fz(fP),"out-in-quint":fW(fP),"in-expo":fj,"out-expo":fB(fj),"in-out-expo":fz(fj),"out-in-expo":fW(fj),"in-sine":fA,"out-sine":fB(fA),"in-out-sine":fz(fA),"out-in-sine":fW(fA),"in-circ":fT,"out-circ":fB(fT),"in-out-circ":fz(fT),"out-in-circ":fW(fT),"in-back":fC,"out-back":fB(fC),"in-out-back":fz(fC),"out-in-back":fW(fC),"in-bounce":fN,"out-bounce":fB(fN),"in-out-bounce":fz(fN),"out-in-bounce":fW(fN),"in-elastic":fL,"out-elastic":fB(fL),"in-out-elastic":fz(fL),"out-in-elastic":fW(fL),spring:fI,"spring-in":fI,"spring-out":fB(fI),"spring-in-out":fz(fI),"spring-out-in":fW(fI)},fG=function(t){var e;return("-"===(e=(e=t).replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())})).charAt(0)?e.substring(1):e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},fH=function(t){return t};function fV(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var fU="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",fq=RegExp("cubic-bezier\\("+fU+","+fU+","+fU+","+fU+"\\)"),fY=/steps\(\s*(\d+)\s*\)/,fX=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function fK(t){var e=fq.exec(t);if(e)return fk.apply(void 0,tq([],tV(e.slice(1).map(Number)),!1));var n=fY.exec(t);if(n)return fV(Number(n[1]),0);var r=fX.exec(t);return r?fV(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):f$[fG(t)]||f$.linear}function fZ(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var fQ=function(t,e,n){return function(r){var i=function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)){for(var i=e.length,o=n.length,a=Math.max(i,o),l=[],s=0;s<a;s++)l.push(t(e[s<i?s:i-1],n[s<o?s:o-1],r));return l}throw Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r);return!cb.enableCSSParsing&&ff(i)?i:n(i)}},fJ=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=fH,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=fK(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function f0(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}return e.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),e}(t));for(var n=t.map(function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(!isFinite(i=Number(i)))throw Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(fp(a))r=!1;else{if(a<i)throw TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter(function(t){return Number(t.offset)>=0&&1>=Number(t.offset)}),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!=(t=n[r-1].offset)?t:1),r>1&&(n[0].computedOffset=Number(null!=(e=n[0].offset)?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var l=n[a].computedOffset;if(!fp(l)&&!fp(o)){for(var s=1;s<a-i;s++)n[i+s].computedOffset=o+(Number(l)-o)*s/(a-i);i=a,o=Number(l)}}}(),n}var f1="backwards|forwards|both|none".split("|"),f2="reverse|alternate|alternate-reverse".split("|"),f5=function(){function t(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=("number"==typeof(r=null!=(a=n)?a:{duration:"auto"})&&(r=isNaN(r)?{duration:"auto"}:{duration:r}),l=a=r,s=new fJ,"number"!=typeof l||isNaN(l)?void 0!==l&&Object.keys(l).forEach(function(t){void 0!==l[t]&&null!==l[t]&&"auto"!==l[t]&&(("number"==typeof s[t]||"duration"===t)&&("number"!=typeof l[t]||isNaN(l[t]))||"fill"===t&&-1===f1.indexOf(l[t])||("direction"!==t||-1!==f2.indexOf(l[t]))&&(s[t]=l[t]))}):s.duration=l,s),this.timing.effect=this,this.timing.activeDuration=Math.abs((0===(i=u=this.timing).duration||0===i.iterations?0:("auto"===i.duration?0:Number(i.duration))*(null!=(o=i.iterations)?o:1))/(u.playbackRate||1)),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=f0(e,this.timing),this.interpolations=(c=this.normalizedKeyframes,f=this.timing,p=this.target,d=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;o<i.length-1;o++){var a=o,l=o+1,s=i[a].computedOffset,u=i[l].computedOffset,c=s,f=u;0===o&&(c=-1/0,0===u&&(l=a)),o===i.length-2&&(f=1/0,1===s&&(a=l)),n.push({applyFrom:c,applyTo:f,startOffset:i[a].computedOffset,endOffset:i[l].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:function(t,e,n,r){var i=ui[t];if(i&&i.syntax&&i.int){var o=cb.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(cb.enableCSSParsing){var s=cb.styleValueRegistry.parseProperty(t,e,r,!1),u=cb.styleValueRegistry.parseProperty(t,n,r,!1);a=cb.styleValueRegistry.computeProperty(t,s,r,!1),l=cb.styleValueRegistry.computeProperty(t,u,r,!1)}else{var c=o.parserWithCSSDisabled;a=c?c(e,r):e,l=c?c(n,r):n}var f=o.mixer(a,l,r);if(f){var p=fQ.apply(void 0,tq([],tV(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return fQ(!1,!0,function(t){return t?n:e})}(r,i[a].value,i[l].value,e)})}return n.sort(function(t,e){return t.startOffset-e.startOffset}),n}(h=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(fZ(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:fK(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(c,f),p),function(t,e){if(null!==e)d.filter(function(t){return e>=t.applyFrom&&e<t.applyTo}).forEach(function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.setAttribute(n.property,n.interpolation(o),!1,!1)});else for(var n in h)fZ(n)&&t.setAttribute(n,null)});var g=cb.globalThis.Proxy;this.computedTiming=g?new g(this.timing,{get:function(t,e){if("duration"===e)return"auto"===t.duration?0:t.duration;if("fill"===e)return"auto"===t.fill?"none":t.fill;if("localTime"===e)return y.animation&&y.animation.currentTime||null;if("currentIteration"===e)return y.animation&&"running"===y.animation.playState?t.currentIteration||0:null;if("progress"===e)return y.animation&&"running"===y.animation.playState?t.progress||0:null;return t[e]},set:function(){return!0}}):this.timing}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=function(t,e,n){var r,i,o,a,l,s,u,c=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),f=function(t,e,n,r,i){switch(r){case 1:if("backwards"===e||"both"===e)return 0;return null;case 3:return n-i;case 2:if("forwards"===e||"both"===e)return t;return null;case 0:return null}}(t,n.fill,e,c,n.delay);if(null===f)return null;var p="auto"===n.duration?0:n.duration,h=(r=n.iterations,o=i=n.iterationStart,0===p?1!==c&&(o+=r):o+=f/p,o),d=(a=n.iterationStart,l=n.iterations,0==(s=h===1/0?a%1:h%1)&&2===c&&0!==l&&(0!==f||0===p)&&(s=1),s),y=(u=n.iterations,2===c&&u===1/0?1/0:1===d?Math.floor(h)-1:Math.floor(h)),g=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,y,d);return n.currentIteration=y,n.progress=g,n.easingFunction(g)}(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=f0(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach(function(n){e.timing[n]=t[n]})},t}();function f3(t,e){return Number(t.id)-Number(e.id)}var f4=function(){function t(t){var e=this;this.document=t,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(f3),e.animations=e.tick(t,!0,e.animations)[0],n.forEach(function(e){e[1](t)}),e.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t,e,n){var r=new fy(new f5(t,e,n),this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(f3),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach(function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)}),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null==t||t.applyInterpolations()}),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF(function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()})},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],l=[],s=[],u=[];return n.forEach(function(n){n.tick(t,e),n._inEffect?(l.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?s.push(n):u.push(n)}),(r=this.pendingEffects).push.apply(r,tq([],tV(a),!1)),(i=this.pendingEffects).push.apply(i,tq([],tV(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();function f6(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function f8(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function f9(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function f7(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function pt(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function pe(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function pn(t){return f7(t)||f8(t)}function pr(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function pi(t,e=!0){let{transformations:n}=t.getOptions(),[,r,i]=n.find(t=>"polar"===t[0]);return e?[180*+r/Math.PI,180*+i/Math.PI]:[r,i]}cb.EasingFunction=fK,cb.AnimationTimeline=f4;let po=(t={})=>{var e,n;let r=Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t);return Object.assign(Object.assign({},r),(e=r.startAngle,n=r.endAngle,e%=2*Math.PI,n%=2*Math.PI,e<0&&(e=2*Math.PI+e),n<0&&(n=2*Math.PI+n),e>=n&&(n+=2*Math.PI),{startAngle:e,endAngle:n}))},pa=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=po(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};pa.props={};let pl=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),ps=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=pl(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...pa({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};function pu(t,e){let n,r;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}function pc(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function pf(t){return t.map((t,e)=>e)}function pp(t){return t[t.length-1]}function ph(t,e){let n=[[],[]];return t.forEach(t=>{n[+!e(t)].push(t)}),n}function pd([t,e],[n,r]){return[t-n,e-r]}ps.props={};function py([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function pg([t,e]){return Math.atan2(e,t)}function pm([t,e]){return pg([t,e])+Math.PI/2}function pv(t,e){let n=pg(t),r=pg(e);return n<r?r-n:2*Math.PI-(n-r)}function pb(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(let[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);let o=n-e,a=i-r;return[e,r,o,a]}function px([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function pO(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function pw(t,e,n,r,i){let o=pg(pd(r,e))+Math.PI,a=pg(pd(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function pE(t,e,n,r="y",i="between",o=!1){let a="y"===r||!0===r?n:e,l=((t,e)=>{if("y"===t||!0===t)if(e)return 180;else return 90;return 90*!!e})(r,o),s=pf(a),[u,c]=pu(s,t=>a[t]),f=new ec({domain:[u,c],range:[0,100]}),p=t=>iH(a[t])&&!Number.isNaN(a[t])?f.map(a[t]):0,h={between:e=>`${t[e]} ${p(e)}%`,start:e=>0===e?`${t[e]} ${p(e)}%`:`${t[e-1]} ${p(e)}%, ${t[e]} ${p(e)}%`,end:e=>e===t.length-1?`${t[e]} ${p(e)}%`:`${t[e]} ${p(e)}%, ${t[e+1]} ${p(e)}%`},d=s.sort((t,e)=>p(t)-p(e)).map(h[i]||h.between).join(",");return`linear-gradient(${l}deg, ${d})`}function pk(t){let[e,n,r,i]=t;return[i,e,n,r]}function pM(t,e,n){let[r,i,,o]=f6(t)?pk(e):e,[a,l]=n,s=t.getCenter(),u=pm(pd(r,s)),c=pm(pd(i,s)),f=c===u&&a!==l?c+2*Math.PI:c;return{startAngle:u,endAngle:f-u>=0?f:2*Math.PI+f,innerRadius:py(o,s),outerRadius:py(r,s)}}function pS(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function p_(t,e){if(!f8(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function pP(t){if(1===t.length)return t[0];let[[e,n,r=0],[i,o,a=0]]=t;return[(e+i)/2,(n+o)/2,(r+a)/2]}function pj(t){return new pA([t],null,t,t.ownerDocument)}class pA{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=o,this._facetElements=a}selectAll(t){return new pA("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)}selectFacetAll(t){let e="string"==typeof t?this._parent.querySelectorAll(t):t;return new pA(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){let e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new pA([e],null,e,this._document)}append(t){let e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){let r=this._data[t],[i,o]=Array.isArray(r)?r:[r,null],a=e(i,t);a.__data__=i,null!==o&&(a.__fromElements__=o),this._parent.appendChild(a),n.push(a)}return new pA(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){let r=this._elements[t],i=e(r.__data__,t);r.appendChild(i),n.push(i)}return new pA(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new pA([i],null,this._parent,this._document);let o="string"==typeof e?this.createElement(e):e();return o.id=t,n&&(o.className=n),r.appendChild(o),new pA([o],null,this._parent,this._document)}data(t,e=t=>t,n=()=>null){let r=[],i=[],o=new Set(this._elements),a=[],l=new Set,s=new Map(this._elements.map((t,n)=>[e(t.__data__,n),t])),u=new Map(this._facetElements.map((t,n)=>[e(t.__data__,n),t])),c=ij(this._elements,t=>n(t.__data__));for(let f=0;f<t.length;f++){let p=t[f],h=e(p,f),d=n(p,f);if(s.has(h)){let t=s.get(h);t.__data__=p,t.__facet__=!1,i.push(t),o.delete(t),s.delete(h)}else if(u.has(h)){let t=u.get(h);t.__data__=p,t.__facet__=!0,i.push(t),u.delete(h)}else if(c.has(h)){let t=c.get(h);for(let e of(a.push([p,t]),t))o.delete(e);c.delete(h)}else if(s.has(d)){let t=s.get(d);t.__toData__?t.__toData__.push(p):t.__toData__=[p],l.add(t),o.delete(t)}else r.push(p)}let f=[new pA([],r,this._parent,this._document),new pA(i,null,this._parent,this._document),new pA(o,null,this._parent,this._document),new pA([],a,this._parent,this._document),new pA(l,null,this._parent,this._document)];return new pA(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new pA(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=pA.registry[t];return e?new e:nV(`Unknown node type: ${t}`)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){let o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)}remove(){for(let t=0;t<this._elements.length;t++){let e=this._transitions[t];e?Promise.all((Array.isArray(e)?e:[e]).map(t=>t.finished)).then(()=>{this._elements[t].remove()}):this._elements[t].remove()}return new pA([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e<this._elements.length;e++){let n=this._elements[e];t(n.__data__,e,n)}return this}attr(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o[t]=n(r,i,o))})}style(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o.style[t]=n(r,i,o))})}transition(t){let e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each(function(t,r,i){n[r]=e(t,r,i)})}on(t,e){return this.each(function(n,r,i){i.addEventListener(t,e)}),this}call(t,...e){return t(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}pA.registry={g:cB,rect:cU,circle:cR,path:cG,text:cq,ellipse:cF,image:cW,line:c$,polygon:cH,polyline:cV,html:cz};var pT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let pC={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},pN={style:{shape:(t,e)=>{let{shape:n,radius:r}=t,i=pT(t,["shape","radius"]),o=nY(i,"pointer"),a=nY(i,"pin"),{shape:l}=o,s=pT(o,["shape"]),{shape:u}=a,c=pT(a,["shape"]),{coordinate:f,theme:p}=e;return(t,e)=>{let n=t.map(t=>f.invert(t)),[o,a,h]=function(t,e){let{transformations:n}=t.getOptions(),[,...r]=n.find(t=>t[0]===e);return r}(f,"polar"),d=f.clone(),{color:y}=e,g=ps({startAngle:o,endAngle:a,innerRadius:h,outerRadius:r});g.push(["cartesian"]),d.update({transformations:g});let v=n.map(t=>d.map(t)),[b,x]=pP(v),[O,w]=f.getCenter(),E=Object.assign(Object.assign({x1:b,y1:x,x2:O,y2:w,stroke:y},s),i),k=Object.assign(Object.assign({cx:O,cy:w,stroke:y},c),i),M=pj(new cB);return nJ(l)||("function"==typeof l?M.append(()=>l(v,e,d,p)):M.append("line").call(pO,E).node()),nJ(u)||("function"==typeof u?M.append(()=>u(v,e,d,p)):M.append("circle").call(pO,k).node()),M.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},pL={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}},pI=t=>{var e;let{data:n={},scale:r={},style:i={},animate:o={},transform:a=[]}=t,l=pT(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:u,target:c,total:f,scale:p}=function(t,e){let{name:n="score",target:r,total:i,percent:o,thresholds:a=[]}=function(t){if(iH(t)){let e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}(t),l=o||r,s=o?1:i,u=Object.assign({y:{domain:[0,s]}},e);return a.length?{targetData:[{x:n,y:l,color:"target"}],totalData:a.map((t,e)=>({x:n,y:e>=1?t-a[e-1]:t,color:e})),target:l,total:s,scale:u}:{targetData:[{x:n,y:l,color:"target"}],totalData:[{x:n,y:l,color:"target"},{x:n,y:s-l,color:"total"}],target:l,total:s,scale:u}}(n,r),h=nY(i,"text"),d=(e=["pointer","pin"],Object.fromEntries(Object.entries(i).filter(([t])=>e.find(e=>t.startsWith(e)))));return[nz({},pC,Object.assign({type:"interval",transform:[{type:"stackY"}],data:u,scale:p,style:nY(i,"arc"),animate:"object"==typeof o?nY(o,"arc"):o},l)),nz({},pC,pN,Object.assign({type:"point",data:s,scale:p,style:d,animate:"object"==typeof o?nY(o,"indicator"):o},l)),nz({},pL,{style:Object.assign({text:function(t,{target:e,total:n}){let{content:r}=t;return r?r(e,n):e.toString()}(h,{target:c,total:f})},h),animate:"object"==typeof o?nY(o,"text"):o})]};pI.props={};let pR=Math.PI/180;function pD(t){return t.text}function pF(){return"serif"}function pB(){return"normal"}function pz(t){return t.value}function pW(){return 90*~~(2*Math.random())}function p$(){return 1}function pG(){}function pH(t){let e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function pV(t){let e=[],n=-1;for(;++n<t;)e[n]=0;return e}function pU(t){return"function"==typeof t?t:function(){return t}}let pq={archimedean:pH,rectangular:function(t){let e=4*t[0]/t[1],n=0,r=0;return function(t){let i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}};var pY=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let pX={size:[500,500],fontSize:[14,28]};function pK(t){return new Promise((e,n)=>{if(t instanceof HTMLImageElement)return void e(t);if("string"==typeof t){let r=new Image;r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()};return}n()})}let pZ=t=>e=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let n=Object.assign({},pX,t),r=function(){let t=[256,256],e=pD,n=pF,r=pz,i=pB,o=pW,a=p$,l=pH,s=Math.random,u=pG,c=[],f=null,p=1/0,h={};return h.start=function(){let[d,y]=t,g=function(t){t.width=t.height=1;let e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;let n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(document.createElement("canvas")),v=h.board?h.board:pV((t[0]>>5)*t[1]),b=c.length,x=[],O=c.map(function(t,l,s){return t.text=e.call(this,t,l,s),t.font=n.call(this,t,l,s),t.style=pB.call(this,t,l,s),t.weight=i.call(this,t,l,s),t.rotate=o.call(this,t,l,s),t.size=~~r.call(this,t,l,s),t.padding=a.call(this,t,l,s),t}).sort(function(t,e){return e.size-t.size}),w=-1,E=h.board?[{x:0,y:0},{x:d,y:y}]:void 0;function k(){let e=Date.now();for(;Date.now()-e<p&&++w<b;){let e=O[w];e.x=d*(s()+.5)>>1,e.y=y*(s()+.5)>>1,function(t,e,n,r){if(e.sprite)return;let i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);let a=0,l=0,s=0,u=n.length;for(--r;++r<u;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;let t=i.measureText(e.text+"m").width*o,u=e.size<<1;if(e.rotate){let n=Math.sin(e.rotate*pR),r=Math.cos(e.rotate*pR),i=t*r,o=t*n,a=u*r,l=u*n;t=Math.max(Math.abs(i+l),Math.abs(i-l))+31>>5<<5,u=~~Math.max(Math.abs(o+a),Math.abs(o-a))}else t=t+31>>5<<5;if(u>s&&(s=u),a+t>=2048&&(a=0,l+=s,s=0),l+u>=2048)break;i.translate((a+(t>>1))/o,(l+(u>>1))/o),e.rotate&&i.rotate(e.rotate*pR),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=u,e.xoff=a,e.yoff=l,e.x1=t>>1,e.y1=u>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}let c=i.getImageData(0,0,2048/o,2048/o).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;let t=e.width,i=t>>5,o=e.y1-e.y0;for(let t=0;t<o*i;t++)f[t]=0;if(null==(a=e.xoff))return;l=e.yoff;let s=0,u=-1;for(let n=0;n<o;n++){for(let e=0;e<t;e++){let t=i*n+(e>>5),r=c[(l+n)*2048+(a+e)<<2]?1<<31-e%32:0;f[t]|=r,s|=r}s?u=n:(e.y0++,o--,n--,l++)}e.y1=e.y0+u,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}(g,e,O,w),e.hasText&&function(e,n,r){let i=n.x,o=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),u=l(t),c=.5>s()?1:-1,f,p=-c,h,d;for(;(f=u(p+=c))&&!(Math.min(Math.abs(h=~~f[0]),Math.abs(d=~~f[1]))>=a);){;if((n.x=i+h,n.y=o+d,!(n.x+n.x0<0)&&!(n.y+n.y0<0)&&!(n.x+n.x1>t[0])&&!(n.y+n.y1>t[1]))&&(!r||!function(t,e,n){n>>=5;let r=t.sprite,i=t.width>>5,o=t.x-(i<<4),a=127&o,l=32-a,s=t.y1-t.y0,u=(t.y+t.y0)*n+(o>>5),c;for(let t=0;t<s;t++){c=0;for(let n=0;n<=i;n++)if((c<<l|(n<i?(c=r[t*i+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}(n,e,t[0]))&&(!r||n.x+n.x1>r[0].x&&n.x+n.x0<r[1].x&&n.y+n.y1>r[0].y&&n.y+n.y0<r[1].y)){let r=n.sprite,i=n.width>>5,o=t[0]>>5,a=n.x-(i<<4),l=127&a,s=32-l,u=n.y1-n.y0,c,f=(n.y+n.y0)*o+(a>>5);for(let t=0;t<u;t++){c=0;for(let n=0;n<=i;n++)e[f+n]|=c<<s|(n<i?(c=r[t*i+n])>>>l:0);f+=o}return delete n.sprite,!0}}return!1}(v,e,E)&&(u.call(null,"word",{cloud:h,word:e}),x.push(e),E?h.hasImage||function(t,e){let n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}(E,e):E=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}h._tags=x,h._bounds=E,w>=b&&(h.stop(),u.call(null,"end",{cloud:h,words:x,bounds:E}))}return f&&clearInterval(f),f=setInterval(k,0),k(),h},h.stop=function(){return f&&(clearInterval(f),f=null),h},h.createMask=e=>{let n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;let o=r>>5,a=pV((r>>5)*i);n.width=r,n.height=i;let l=n.getContext("2d");l.drawImage(e,0,0,e.width,e.height,0,0,r,i);let s=l.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){let n=o*t+(e>>5),i=t*r+e<<2,l=s[i]>=250&&s[i+1]>=250&&s[i+2]>=250?1<<31-e%32:0;a[n]|=l}h.board=a,h.hasImage=!0},h.timeInterval=function(t){p=null==t?1/0:t},h.words=function(t){c=t},h.size=function(e=[]){t=[+e[0],+e[1]]},h.text=function(t){e=pU(t)},h.font=function(t){n=pU(t)},h.fontWeight=function(t){i=pU(t)},h.rotate=function(t){o=pU(t)},h.spiral=function(t){l=pq[t]||t},h.fontSize=function(t){r=pU(t)},h.padding=function(t){a=pU(t)},h.random=function(t){s=pU(t)},h.on=function(t){u=pU(t)},h}();yield({set(t,e,i){if(void 0===n[t])return this;let o=e?e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},setAsync(t,e,i){var o,a,l,s;return o=this,a=void 0,l=void 0,s=function*(){if(void 0===n[t])return this;let o=e?yield e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},new(l||(l=Promise))(function(t,e){function n(t){try{i(s.next(t))}catch(t){e(t)}}function r(t){try{i(s.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof l?i:new l(function(t){t(i)})).then(n,r)}i((s=s.apply(o,a||[])).next())})}}).set("fontSize",t=>{let n=e.map(t=>t.value);var r=[ih(n),id(n)];if("function"==typeof t)return t;if(Array.isArray(t)){let[e,n]=t;if(!r)return()=>(n+e)/2;let[i,o]=r;return o===i?()=>(n+e)/2:({value:t})=>(n-e)/(o-i)*(t-i)+e}return()=>t}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",pK,r.createMask),r.words([...e]);let i=r.start(),[o,a]=n.size,l=[{x:0,y:0},{x:o,y:a}],{_bounds:s=l,_tags:u,hasImage:c}=i,f=u.map(t=>{var{x:e,y:n}=t;return Object.assign(Object.assign({},pY(t,["x","y"])),{x:e+o/2,y:n+a/2})}),[{x:p,y:h},{x:d,y:y}]=s,g={text:"",value:0,opacity:0,fontSize:0};return f.push(Object.assign(Object.assign({},g),{x:c?0:p,y:c?0:h}),Object.assign(Object.assign({},g),{x:c?o:d,y:c?a:y})),f},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};pZ.props={};var pQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let pJ=(t,e)=>({size:[t,e]}),p0=(t,e)=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}}),p1=(t,e)=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let{width:n,height:r}=e,{data:i,encode:o={},scale:a,style:l={},layout:s={}}=t,u=pQ(t,["data","encode","scale","style","layout"]),c=function(t,e){let{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(i,o),f=yield pZ(Object.assign(Object.assign({},pJ(n,r)),s))(c);return nz({},p0(n,r),Object.assign(Object.assign({data:f,encode:o,scale:a,style:l},u),{axis:!1}))},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};function p2(t,e,n){return Math.max(e,Math.min(t,n))}function p5(t,e=10){return"number"!=typeof t||1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}p1.props={};var p3=function(t){return"function"==typeof t};let p4={pin:function(t,e,n){let r=4*n/3,i=Math.max(r,2*n),o=r/2,a=o+e-i/2,l=Math.asin(o/((i-o)*.85)),s=Math.sin(l)*o,u=Math.cos(l)*o,c=t-u,f=a+s,p=a+o/Math.sin(l);return`
|
|
11
11
|
M ${c} ${f}
|
|
12
12
|
A ${o} ${o} 0 1 1 ${c+2*u} ${f}
|
|
13
13
|
Q ${t} ${p} ${t} ${e+i/2}
|